简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM