REST call to List only index names and Docs count

I want to know whether there is any REST call which can list down the indexes present in the ElasticSearch. I am using Sense plugin for Chrome, where i am using GET /_cat/indices?v which lists down all the details of the ES, but i want only index names and doc's count columns to be listed.



the cat API supports formatting and you can decide which headers you want to display, try GET _cat/indices?help for a list of parameters. Your problem can be solved like this

GET _cat/indices?h=i,dc
GET _cat/indices?h=index,docsCount

Hope this helps!


1 Like

Thank you !! :slight_smile:


Can i have specify the size=1000 and also get pretty format of the results?
For eg: Can i get the 1000 results and apply pretty on the result so that i get formatted JSON ?
like GET /testindex-2016.06.20/_search?size=1000 and then apply pretty on the results


please open new topics for new questions in the forum. Also check the infos about pretty in the documentation