I have JSON file which has an Index and its corresponding Searches, Visualizations and Dashbords.
Now I want to import that JSON file in to the kibana using the Import API call. I used the following api call to import a JSON file named X. curl -u elastic:changeme -k -XPOST -H 'Content-Type: application/json' 'http://localhost:5601/api/kibana/dashboards/import' -H "kbn-xsrf: true" -d @Cloudtrail.json
It is showing following error: {"statusCode":400,"error":"Bad Request","message":"\"value\" must be an object","validation":{"source":"payload","keys":["value"]}}
Thanks for responding.
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"]}}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.