# Get index pattern ID?

**URL:** <https://discuss.elastic.co/t/get-index-pattern-id/132598>\
**Category:** Elasticsearch\
**Created:** [May 20, 2018, 6:44pm UTC](https://discuss.elastic.co/t/get-index-pattern-id/132598 "2018-05-20T18:44:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdndude](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sdndude/32/24608_2.png) [@sdndude](https://discuss.elastic.co/u/sdndude)\
**Post date:** [May 20, 2018, 6:44pm UTC](https://discuss.elastic.co/t/get-index-pattern-id/132598/1 "2018-05-20T18:44:06Z")

</div>

Is there an API to get the index pattern IDs? I had to delete the index pattern that I had because the mappings changed and now none of my visualizations work. I would hate to have to re-create them when I can just edit the json to point to the new id, but I can't figure out how to get the ID.

Thanks.

---

<div class="post-metadata">

**Author:** ![klof](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/klof/32/31590_2.png) [@klof](https://discuss.elastic.co/u/klof)\
**Post date:** [May 24, 2018, 9:34am UTC](https://discuss.elastic.co/t/get-index-pattern-id/132598/2 "2018-05-24T09:34:30Z")

</div>

A search query, in the kibana index, should give you the list of the index pattern Ids (see below). You could also filter "index-pattern.title" by the name of your new index pattern.

`GET .kibana/_search`

```
{
  "_source": ["index-pattern.title"],
  "query": {
    "term": {
      "type": "index-pattern"
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![sdndude](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sdndude/32/24608_2.png) [@sdndude](https://discuss.elastic.co/u/sdndude)\
**Post date:** [May 24, 2018, 5:01pm UTC](https://discuss.elastic.co/t/get-index-pattern-id/132598/3 "2018-05-24T17:01:54Z")

</div>

Thanks @klof exactly what I needed.

---

<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 21, 2018, 5:01pm UTC](https://discuss.elastic.co/t/get-index-pattern-id/132598/4 "2018-06-21T17:01:59Z")

</div>

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