Get dashboards related saved objects using REST API

I want to programatically export/import a dashboard from one space to another including all its related saved objects. The steps I am thinking about are:

  1. Create Space let's call it "Space-X"
  2. Get id of the dashboard I want to import ( can be done manually in Kibana)
  3. Get list of ids for all related saved objects (index-patterns, visualizations and saved searches)
  4. Import everything at once

How can I get list of ids for all related saved objects programatically using Kibana REST API?

I found that I can do this easily using import/export dashboards APIs

But I don't know how can I set the space to where I want this dashboard to be exported

There is a blog post with more information on this here:

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