# Programaticaly import / export dashboard with visualisations

**URL:** <https://discuss.elastic.co/t/programaticaly-import-export-dashboard-with-visualisations/131151>\
**Category:** Kibana\
**Created:** [May 9, 2018, 9:49am UTC](https://discuss.elastic.co/t/programaticaly-import-export-dashboard-with-visualisations/131151 "2018-05-09T09:49:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![astropanic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/astropanic/32/20726_2.png) [@astropanic](https://discuss.elastic.co/u/astropanic)\
**Post date:** [May 9, 2018, 9:49am UTC](https://discuss.elastic.co/t/programaticaly-import-export-dashboard-with-visualisations/131151/1 "2018-05-09T09:49:14Z")

</div>

Is there a way to programmatically (API call) import / export the dashboards with visualisations?

I've seen [https://github.com/elastic/kibana/pull/10858/files](https://github.com/elastic/kibana/pull/10858/files)

When I export my dashboard, I get a JSON representation, but it references other documents (visualisations) which are not presented in the exported JSON.

I know I can parse it, and make more API calls to fetch the visualisation documents, but this is cumbersome.

Fiddling around and modifying the JSON is not an option.

What is the proper way to do it?

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [May 9, 2018, 6:20pm UTC](https://discuss.elastic.co/t/programaticaly-import-export-dashboard-with-visualisations/131151/2 "2018-05-09T18:20:13Z")

</div>

Hi,

When you do `curl -XGET localhost:5601/api/kibana/dashboards/export?dashboard=79ffd6e0-faa0-11e6-947f-177f697178b8` , you are exporting the dashboard with all its associated visualizations/saved searches.

So when you import that file again - you should be able to access and see your visualizations on the dashboard.

I am not sure why you don't have vizs in your json. can you open the imported json in Kibana and see if you can see visualizations?

Thanks,  
Bhavya

---

<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:** [June 6, 2018, 6:20pm UTC](https://discuss.elastic.co/t/programaticaly-import-export-dashboard-with-visualisations/131151/3 "2018-06-06T18:20:22Z")

</div>

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