Hi,
After a long and painful journey, I was able to write a script that changes the index id on imported visualizations/searchs/dashboard from kibana index into one of kibana's indeces that the user wants.
What I try to do is to send the files with the new id to kibana, using the saved_object api, like so:
curl -XPOST localhost:5601/api/saved_objects/search -H 'kbn-xsrf:true' -H 'Content-type:application/json' -d @./SOME_FILE.json
The problem:
It works only for imported searchs. For dashboards and visualizations, I get this error:
{"message":"mapping set to strict, dynamic introduction of [panelsJSON] within [search] is not allowed: [strict_dynamic_mapping_exception] mapping set to strict, dynamic introduction of [panelsJSON] within [search] is not allowed","statusCode":400,"error":"Bad Request"}
(BTW, I talked about a similar issue in this feed, but I open here another question because it wasn't answered there, and that post was quite lengthy and the basic topic was different, so I decided to open a dedicated one).
My questions are:
- Why dosen't it work for visualizations and dashboard but it does for searchs?
- How to work around/solve this issue?
It's realy frustrating that I'm so close to have a simple script that imports everything from any kibana index and to be stuck on this...
Can anyone help?
BTW 2: If anyone will find it helpful to see how my script works, I would love to share. Just message me.
Thanks!