# Change index dynamically in dashboard

**URL:** <https://discuss.elastic.co/t/change-index-dynamically-in-dashboard/133545>\
**Category:** Kibana\
**Created:** [May 28, 2018, 1:01pm UTC](https://discuss.elastic.co/t/change-index-dynamically-in-dashboard/133545 "2018-05-28T13:01:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alessio\_Frabotta](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@Alessio\_Frabotta](https://discuss.elastic.co/u/Alessio_Frabotta)\
**Post date:** [May 28, 2018, 1:01pm UTC](https://discuss.elastic.co/t/change-index-dynamically-in-dashboard/133545/1 "2018-05-28T13:01:45Z")

</div>

Based on what I wrote on another post, I read that to dynamically reload a dashboard compared to a new index you must edit this section of the json file:

```
"kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"01421930-5ff7-11e8-93dd-8314717cf9ad\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"
      }

```

But I do not understand where I can find the id of the new index:  
**01421930-5ff7-11e8-93dd-8314717cf9ad**

My old index is called "dev-index" and new index is called "dev-index-2".  
I don't know where to find the matching id.

I don't think it should replace "01421930-5ff7-11e8-93dd-8314717cf9ad" with "dev-index-2"  
So, how can I do?

---

<div class="post-metadata">

**Author:** ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)\
**Post date:** [May 28, 2018, 1:54pm UTC](https://discuss.elastic.co/t/change-index-dynamically-in-dashboard/133545/2 "2018-05-28T13:54:25Z")

</div>

Hey @Alessio_Frabotta,

> Based on what I wrote on another post

Could you please point to that post to get some more context on what you're trying to accomplish? Any details will be highly appreciated.

Best,  
Oleg

---

<div class="post-metadata">

**Author:** ![Alessio\_Frabotta](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@Alessio\_Frabotta](https://discuss.elastic.co/u/Alessio_Frabotta)\
**Post date:** [May 28, 2018, 2:00pm UTC](https://discuss.elastic.co/t/change-index-dynamically-in-dashboard/133545/3 "2018-05-28T14:00:49Z")

</div>

@azasypkin

this is the discussion I was referring to:

> [@Change Index on Visualisatons](https://discuss.elastic.co/t/change-index-on-visualisatons/58593/2):
>
> Hi Alvaro, It's not possible to change the index pattern of an existing visualization. Instead, you will need to rebuild the visualization using the new index pattern. Thanks, CJ

---

<div class="post-metadata">

**Author:** ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)\
**Post date:** [May 28, 2018, 2:19pm UTC](https://discuss.elastic.co/t/change-index-dynamically-in-dashboard/133545/4 "2018-05-28T14:19:34Z")

</div>

I see, I believe this GUID/Id is identifier of the `index pattern`, not `index`.

You can get index pattern id with the following command e.g.:

- Kibana 6.3+: `curl -s http://localhost:5601/api/saved_objects/_find?type=index-pattern | json_pp`
- Kibana 6.2: `curl -s http://localhost:5601/api/saved_objects/index-pattern | json_pp` (don't have 6.2 handy, so haven't checked, but let me know if it doesn't work).

Or just open required `index pattern` in Kibana UI and take a look at the URL - id should be there.

Best,  
Oleg

---

<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 25, 2018, 2:19pm UTC](https://discuss.elastic.co/t/change-index-dynamically-in-dashboard/133545/5 "2018-06-25T14:19:40Z")

</div>

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