How to find out if component templates are used in any index template via ElasticSearch API?

1k Views Asked by At

I'm looking for an API call for ElasticSearch which helps me figuring out if the component template has any usage count, if it is used by any index template.

We can see this information through Kibana -> Index management -> Component templates -> Usage count. But not sure which API call would provide this.

Thanks

1

There are 1 best solutions below

0
On

There's no API providing that information directly, Kibana infers that count on the client-side by retrieving all index templates and counting the component templates usage.

An easy way to do it is to call the following API and parse the response

GET _cat/templates?format=json&filter_path=name,composed_of