Graylog API 3.2< POST /views for dashboards

Description of your problem

We upgraded Graylog from 3.1 to 4.1. We wrote a client that interacts with the API to export and import dashboards. We adjusted the API and it works mostly. We encountered an issue while POSTing a new dashboard to a fresh Graylog. The API states that the search_id is optional. We expect that an object will be created if the search_id is not in the POST. However, it seems to be mandatory.

Description of steps you’ve taken to attempt to solve the issue

Since we create our dashboards on a dev Graylog and afterwards export them to our production Graylog, we can retrieve the search object and POST it to our production Graylog before we POST the dasboard itself.

Hello,
I noticed there was not a reply. Maybe I can help.

From what I understand from this post is that you have a client that will post dashboard/s from your Dev GL server to your Production GL server, is this correct?
After upgrading this no longer works? or I think you stated it kind of works? Could you explain in greater detail about this?

What section of the API browser are you using?

There were some changes with dashboard since version 4.0. you can check it out here. Maybe this will answer some of your questions.
https://docs.graylog.org/en/4.1/pages/changelog.html#graylog-4-0-0

According to the API, a POST against “/view” has an optional field search_id but instead it is mandatory. We assumed that a new search object would be created upon leaving search_id empty.

While using the API as it is, one always have to supply the corresponding search object which changes all the time.

Hello

Thanks for the added info.
One of the reason I want to help you out was that in our environment we use mainly GET API’s. I haven’t got around to actually using POST API’s yet.

I’ve been banging my head against the wall over here for hours. I tried multiple ways of not using search_id but like your self I received the same error.

Sorry I cant be more help, maybe someone else here has a fix for this.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.