Get All Index Patterns

Hello, Just wanted to ask if there is a way we can get a list of all index patterns either from Kibana or ES (version 6.x)?
Actually, I am using Kibana API plugin to add new visualizations to my dashboard dynamically, but I am not finding a way to select Index Pattern (from the list) dynamically.

1 Like

Hi Waleed,

GET _cat/indices in devtools will get you the list of all index patterns: https://www.elastic.co/guide/en/elasticsearch/reference/current/_list_all_indices.html

Not sure if you can use it to select index patterns dynamically though.

Thanks,
Bhavya

Hi Bhavya,

Thanks for your kind help. Unfortunately, this is not the thing I was looking for. I needed the index patterns (the ones we create in Kibana).
However, I managed to get it working by myself. Kibana API provides a way to do so (and I am not sure why is it not documented).
For all those trying to get Index Patterns, you can get it through the following endpoint:
http://localhost:5601/api/saved_objects/?type=index-pattern&fields=title&per_page=10000

Please correct me, if there is a better solution to that.

Best,
Waleed

5 Likes

Yay. That should be it :). We don't document the Kibana api because its still considered experimental. Just keep an eye on it.

Cheers,
Bhavya

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