I read this thread (Kibana API for automatic Export all) which is attempting to do something very similar to what I'm trying and the information in it is valuable.
That being said, I'm not entirely sure how to apply what is discussed there to Elastic Cloud, which is where my cluster is running.
I was wondering if someone had automated the export of searches, views and dashboards from Elastic Cloud through a "backup script" of some sort.
You can use the Kibana API on Cloud instance the same, just plugin the Kibana Cloud URL and your credentials to authenticate the request.
Hope this helps.
Thanks for the reply. I'm not entirely sure how I would go about getting the credentials. What kind of credentials would I be able to utilize via curl?
{"statusCode":400,"error":"Bad Request","message":"child \"id\" fails because [\"id\" is not allowed to be empty]","validation":{"source":"params","keys":["id"]}}%
I've tried escaping the request (--data) in all ways I knew how.
I was hoping bulk would allow me to export all objects by type (without having to specify the ID) but that doesn't seem to be possible.
I was actually trying to use the _bulk_get API but have since changed to the one you mentioned to better follow up with the recommendations you are giving.
I'm now passing everything as per the documentation:
I had that before and eventually moved to what I posted on the post before the error. Basically, if you use what you mentioned, you'll get:
`{"statusCode":400,"error":"Bad Request","message":"Request must contain a kbn-xsrf header."}%``
That's what I'm using -H "kbn-xsrf: script" even though putting anything in front of kbn-xsrf: will get rid of that error. Saw that being recommended here: Request must contain a kbn-xsrf header
Worthy of ! It works! Thank you very much @LizaD! It's was actually my bad as the "copy as curl" link in the documentation actually creates the curl command identical to what we have here.
To make it easier for someone that might end up here, the full command:
Another question, and this might be something for another threat, is related to the IDs. I always assumed that (and the documentation provides an example of this), similar to the web UX, I could specify a type and download all saved objects of that type.
However, using api/saved_objects/_export specifying an ID id required. Is there an endpoint that would allow exporting all from type?
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.