# Load index-pattern, dashboard, searches from file

**URL:** <https://discuss.elastic.co/t/load-index-pattern-dashboard-searches-from-file/120014>\
**Category:** Kibana\
**Created:** [February 15, 2018, 3:03pm UTC](https://discuss.elastic.co/t/load-index-pattern-dashboard-searches-from-file/120014 "2018-02-15T15:03:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rinmalavi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rinmalavi/32/24876_2.png) [@rinmalavi](https://discuss.elastic.co/u/rinmalavi)\
**Post date:** [February 15, 2018, 3:03pm UTC](https://discuss.elastic.co/t/load-index-pattern-dashboard-searches-from-file/120014/1 "2018-02-15T15:03:49Z")

</div>

Application must be loaded automatically without human intervention.  
From other replays on this forum suggest coping .kibana index.  
So i devised a little script which  
adds template indexes,  
bulk insert .kibana index that was exported from development instance,  
then adds some data.

And it works, mostly...

Sometimes it takes me to add index-pattern page?  
Is there some middle step I am missing here, or could it be just some cache?

---

<div class="post-metadata">

**Author:** ![Bill\_McConaghy](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Bill\_McConaghy](https://discuss.elastic.co/u/Bill_McConaghy)\
**Post date:** [February 15, 2018, 5:48pm UTC](https://discuss.elastic.co/t/load-index-pattern-dashboard-searches-from-file/120014/2 "2018-02-15T17:48:08Z")

</div>

If you look at this comment: [https://github.com/elastic/kibana/issues/3709#issuecomment-349335920](https://github.com/elastic/kibana/issues/3709#issuecomment-349335920) you will see an example of how to create an index pattern in Kibana via API call. I had to adjust the URL myself to include the context root for Kibana. My current Kibana root is: [http://localhost:5601/kmz/app/kibana](http://localhost:5601/kmz/app/kibana) so I made the api call to /kmz/api... Note that the kmz portion of that URL will change every time you restart kibana.

---

<div class="post-metadata">

**Author:** ![rinmalavi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rinmalavi/32/24876_2.png) [@rinmalavi](https://discuss.elastic.co/u/rinmalavi)\
**Post date:** [February 19, 2018, 11:43am UTC](https://discuss.elastic.co/t/load-index-pattern-dashboard-searches-from-file/120014/3 "2018-02-19T11:43:42Z")

</div>

Thanks,  
Adjusted script from response works for me in 6.2.

Maybe not under this topic, but:

Could I get an export without clicking?

---

<div class="post-metadata">

**Author:** ![Bill\_McConaghy](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Bill\_McConaghy](https://discuss.elastic.co/u/Bill_McConaghy)\
**Post date:** [February 21, 2018, 5:06pm UTC](https://discuss.elastic.co/t/load-index-pattern-dashboard-searches-from-file/120014/4 "2018-02-21T17:06:22Z")

</div>

That is somewhere on our roadmap for sure, as many people ask for it.

---

<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:** [March 21, 2018, 5:06pm UTC](https://discuss.elastic.co/t/load-index-pattern-dashboard-searches-from-file/120014/5 "2018-03-21T17:06:54Z")

</div>

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