Importing Kibana JSON file Using Kibana SaveObject API call


(Shri Harsha) #1

I created the JSON file with Saved Objects bulk get api call. My API Call is as follows:
curl -X POST "http://localhost:5601/api/saved_objects/_bulk_get" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'
[
{
"type": "index-pattern",
"id": "4afc1210-cb86-11e8-a511-856ad0f7e2c7"
}
]
' > Cloudtrail.json

Then I used bulk created api call to import this JSON file as follows:
curl -X POST "http://localhost:5601/api/saved_objects/_bulk_create" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d @Cloudtrail.json

It is showing the following error:
{"statusCode":400,"error":"Bad Request","message":"\"value\" must be an array","validation":{"source":"payload","keys":["value"]}}

So what to do now?


(system) #2

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