Export / Import objects

I have multiple space in kibana 7.1.1
I would like to export dashboard and viz for each of this space using curl command.
is it possible?

Use the export API for exporting saved objects from spaces.

You must include /s/{space_name} in the URL to identify the space used for the API call.
http://localhost:5603/s/test/api/saved_objects/_export is an example for the test space. Please see https://www.elastic.co/blog/how-to-migrate-to-kibana-spaces for more details

it works great I can find id of dashboard from web browser and use curl to export jason file.
but can't find a curl syntax to display id of all the dashboard I have on that.
if there is a way to find all the IDs I can setup script to automatically export all dashboard daily for as backup.

I am using 7.1.1
and don't have /.kibana/dashboard present.

trying one more time if anyone has a command to display ID of dashboard

Looks like no one has try this before.

I've received a message today (24th June 19) that there is no "_export" endpoint...?

When I use:
https://www.elastic.co/guide/en/kibana/current/dashboard-import-api-import.html , and

{"error":"no handler found for uri [/api/kibana/dashboards/import?force=true] and method [POST]"}

same result from export... "no handler..."

FYI: I'm using the elasticsearch and kibana docker containers from DockerHub

Just a update. upgraded to 7.2 and now export is dumping this in to ndjason file.

When you select dashboard it does export all associated objects, index template/viz and dashboard.

I guess will have to do it manually from gui. untill find something that works from command line

Hi, I have finally got this working as I want to, and my process is:

  1. http://localhost:5601/api/kibana/dashboards/export?dashboard=ea010......
  2. From the result, save only the "objects " value, to a file.
  3. Use the http://localhost:5601/api/saved_objects/_bulk_create?overwrite=true
    Remove invalid properties. Valid properties are : type, id, attributes, reference, and version

This creates a call that will create everything required (or overwrite) for you dashboard

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.