While the _cat endpoint is good for people, if you want something more user-friendly script / program, you can do something like ...
Single index search:
curl -GET 'http://es-host:9200/_cluster/state' | jq '.metadata.indices["index_name"].state'
List of all indexes:
curl -GET 'http://es-host:9200/_cluster/state' | jq '.metadata.indices | to_entries | .[] | {index: .key, state: .value.state}'
Andrew White
source share