Get index pattern ID?

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.

1 Like

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"
    }
  }
}
6 Likes

Thanks @klof exactly what I needed.

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