# Saved Objects Import/Export

**URL:** <https://discuss.elastic.co/t/saved-objects-import-export/186882>\
**Category:** Kibana\
**Created:** [June 21, 2019, 12:59pm UTC](https://discuss.elastic.co/t/saved-objects-import-export/186882 "2019-06-21T12:59:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matheu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matheu/32/48655_2.png) [@Matheu](https://discuss.elastic.co/u/Matheu)\
**Post date:** [June 21, 2019, 12:59pm UTC](https://discuss.elastic.co/t/saved-objects-import-export/186882/1 "2019-06-21T12:59:22Z")

</div>

Hi  
We are using ElasticSearch and Kibana within a kubernetes environment, so periodically containers will be deleted, and recreated. I have been trying to find a way to create all the index-patterns, visualizations, and Dashboards, from API calls which we can run during the creation process of the containers.  
I'm having trouble finding the way of doing this, even when using the documentation. For example, I have created 2 indexs, and a dashboard with 1 visualization, but.....

curl -X GET "[http://172.17.0.2:9200/api/saved\_objects/\_export](http://172.17.0.2:9200/api/saved_objects/_export)"  
-H 'kbn-xsrf: true'  
-H 'Content-Type: application/json'  
-u elastic:changeme  
-d '{  
"type": "[visualization, dashboard, search, index-pattern]"  
}';

{"\_index":"api","\_type":"saved\_objects","\_id":"\_export","found":false}

Can anyone give me some help with the best process for doing this.

ps: I'm using the docker container, version 7.1.1

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [June 21, 2019, 10:08pm UTC](https://discuss.elastic.co/t/saved-objects-import-export/186882/2 "2019-06-21T22:08:00Z")

</div>

There is no `_export` endpoint, but you could use the [\_find endpoint](https://www.elastic.co/guide/en/kibana/current/saved-objects-api-find.html) to get all of the saved objects of a particular type.

If you're primarily interested in re-creating dashboards then you could also use the [dashboard import/export API](https://www.elastic.co/guide/en/kibana/current/dashboard-import-api.html).

---

<div class="post-metadata">

**Author:** ![Matheu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matheu/32/48655_2.png) [@Matheu](https://discuss.elastic.co/u/Matheu)\
**Post date:** [June 24, 2019, 8:23am UTC](https://discuss.elastic.co/t/saved-objects-import-export/186882/3 "2019-06-24T08:23:21Z")

</div>

This is my problem, I have been reading and trying all these different methods from the documentation, and I get results like this:

curl:  
curl -X GET "[http://x.x.x.x:9200/api/kibana/dashboards/export?dashboard=ea010c90-9407-11e9-bb2b-65c8f6e0978d](http://x.x.x.x:9200/api/kibana/dashboards/export?dashboard=ea010c90-9407-11e9-bb2b-65c8f6e0978d)" -H 'kbn-xsrf: true'

result:  
{"error":"no handler found for uri [/api/kibana/dashboards/export?dashboard=ea010c90-9407-11e9-bb2b-65c8f6e0978d] and method [GET]"}

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

Does the Docker ElasticSearch container have any limitations, or require any addons...?

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [June 25, 2019, 10:03pm UTC](https://discuss.elastic.co/t/saved-objects-import-export/186882/4 "2019-06-25T22:03:10Z")

</div>

These APIs are hosted by Kibana and need to be sent to the Kibana server, but based on the port number in your example (9200) it looks like you are sending your requests to Elasticsearch.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 23, 2019, 10:03pm UTC](https://discuss.elastic.co/t/saved-objects-import-export/186882/5 "2019-07-23T22:03:16Z")

</div>

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