# Importing dashboards via CLI 5.1.1

**URL:** <https://discuss.elastic.co/t/importing-dashboards-via-cli-5-1-1/70236>\
**Category:** Kibana\
**Created:** [December 29, 2016, 9:52pm UTC](https://discuss.elastic.co/t/importing-dashboards-via-cli-5-1-1/70236 "2016-12-29T21:52:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mormaii](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mormaii/32/10790_2.png) [@Mormaii](https://discuss.elastic.co/u/Mormaii)\
**Post date:** [December 29, 2016, 9:52pm UTC](https://discuss.elastic.co/t/importing-dashboards-via-cli-5-1-1/70236/1 "2016-12-29T21:52:48Z")

</div>

What I want to do is import the .json dashboards that Kibana generates with:

Management -\> Saved Objects -\> Export

And then import them via command line or something that can be automated and doesn't require me to use the web interface. Is this possible to do ?

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [December 30, 2016, 7:43pm UTC](https://discuss.elastic.co/t/importing-dashboards-via-cli-5-1-1/70236/2 "2016-12-30T19:43:16Z")

</div>

Hi @Mormaii,

While I don't know of a CLI tool that would let you easily import saved objects into Kibana, you could write a small program to do it yourself, if you are up to it. The things you would need to be aware of are:

- These saved objects are stored in a special index in Elasticsearch (default: `.kibana`).
- The exported JSON is an array of objects. Each object represents a saved object in Kibana. Each object is a document in the special Elasticsearch index I mentioned above.

So essentially you could write a program to loop over the array in the exported JSON and [index](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html) each of those documents into the special index under the appropriate `_type` and with the right `_id`. If you have a lot of saved objects, you might consider using Elasticsearch's [bulk API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html).

One big caveat: The structure of the special Elasticsearch index used by Kibana for storing saved objects could change at any time. If this happens your program would need to be updated.

---

<div class="post-metadata">

**Author:** ![Helene\_Joanin](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@Helene\_Joanin](https://discuss.elastic.co/u/Helene_Joanin)\
**Post date:** [January 18, 2017, 10:20am UTC](https://discuss.elastic.co/t/importing-dashboards-via-cli-5-1-1/70236/3 "2017-01-18T10:20:21Z")

</div>

Hi @shaunak  
It would be great if this kind of tool came with Kibana.  
Why it doesn't ?  
Regards.  
Hélene Joanin.

---

<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:** [February 15, 2017, 10:20am UTC](https://discuss.elastic.co/t/importing-dashboards-via-cli-5-1-1/70236/4 "2017-02-15T10:20:42Z")

</div>

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