Dashboard API import problem

Hi

I’m a Graylog novice and I’m using Graylog Open Version 6.3.3, trying to export my first dashboards so that I can import them into another Graylog installation.

curl -s -u “$USER:$PW” -H “X-Requested-By: cli” “$GRAYLOG_URL/api/views/$id” -o “dashboard_${title}_${id}.json”

However, I’m not quite sure yet how to import the dumps.

Ive tried:
curl -u admin:$PW -H “X-Requested-By: cli” -H “Content-Type: application/json” -X POST -d @dashboardtest.json http://e15:8080/api/views | jq .
with this error message as result:
{
“type”: “ApiError”,
“message”: “Search 6877a587db9d3c1f19315ee9 not available”
}

The json file really contains the mentioned search_id - but what is wrong with it?

Best regards

Hey @tgohde,

Take a look at the Content Pack function, it achieves what you are looking for.

That works impressively well. Is there a way to create such a content pack with the API?

Looking at the available endpoints, it doesn’t look like it. It would need to be created manually but they can be downloaded, uploaded and installed via the api.

ok, the really interesting point is to create them. Thats a pity.

But thanx anyway