I have been using various scripts to create dashboards and visualizations from a template successfully on 7.5. When I try the same script on 7.10 it fails, and every visualization returns a 409 conflict error.
I'm posting this to Kibana: /api/saved_objects/_bulk_create?overwrite=true and including a json file with my dashboard and linked visualizations. With 7.10 I get something like this on each visualization:
From reading the documentation it says I can use the Resolve Import Errors to resolve each conflict one by one. This seems tedious because I always want to overwrite, and secondly I do not think these are real conflicts, as far as I can tell the objects do not exist.
Hm, I can't think of any changes between 7.5 and 7.10 that would have this effect on the Bulk create API. If you are using the overwrite option, it should happily overwrite any existing objects for you.
Can you provide your full payload and the full response that you receive?
Also, I understand you said this object doesn't exist, but can you try the following and see what you get back?
GET /api/saved_objects/dashboard/Summary-data
The Resolve import errors API should only be used to resolve errors that are received when using the Import objects API. That said, you would probably be better off exporting your dashboard and visualizations, and using the Import API in the future so that you can take advantage of any saved object migrations that occur between Kibana versions. If you are directly using the Bulk create API like that without specifying a migrationVersion for each saved object, Kibana assumes that you are creating a brand new object, and that all of the fields are up to date with the current version of Kibana.
Also keep in mind that all Saved Objects APIs are marked as experimental at the moment.
It would also be useful to see verbose logging and the elasticsearch queries just before and after your request. Can you add the following to your configuration:
Thanks Rudolph, my json file template definitely has version and migration version on probably every object. I was setting overwrite to true and it would fail as well. Since changing the API I was using I have not re-visited this.
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.