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"]}}
Hey, it's possible there's a bug - context and few questions:
There's two ways to import/export via Kibana. The dashboard import api, which only accepts the format outputted from the dashboard export API. And then import/export from the settings page.
The import/export from the settings page isn't compatible with the dashboard api, and does some modifications in the browser before pushing the data to elasticsearch.
Does importing from the UI work? Can you share your before and after kibana versions? If no luck with either of these do you have a snippet of the json file we can look through?
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.