# REST call to List only index names and Docs count

**URL:** <https://discuss.elastic.co/t/rest-call-to-list-only-index-names-and-docs-count/52957>\
**Category:** Elasticsearch\
**Created:** [June 16, 2016, 7:29am UTC](https://discuss.elastic.co/t/rest-call-to-list-only-index-names-and-docs-count/52957 "2016-06-16T07:29:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramkchirra](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@ramkchirra](https://discuss.elastic.co/u/ramkchirra)\
**Post date:** [June 16, 2016, 7:29am UTC](https://discuss.elastic.co/t/rest-call-to-list-only-index-names-and-docs-count/52957/1 "2016-06-16T07:29:13Z")

</div>

Hi,  
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.

Thanks.  
RK

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 16, 2016, 7:35am UTC](https://discuss.elastic.co/t/rest-call-to-list-only-index-names-and-docs-count/52957/2 "2016-06-16T07:35:31Z")

</div>

Hey,

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

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

```

Hope this helps!

--Alex

---

<div class="post-metadata">

**Author:** ![ramkchirra](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@ramkchirra](https://discuss.elastic.co/u/ramkchirra)\
**Post date:** [June 16, 2016, 8:35am UTC](https://discuss.elastic.co/t/rest-call-to-list-only-index-names-and-docs-count/52957/3 "2016-06-16T08:35:42Z")

</div>

Thank you !! 🙂

---

<div class="post-metadata">

**Author:** ![ramkchirra](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@ramkchirra](https://discuss.elastic.co/u/ramkchirra)\
**Post date:** [June 20, 2016, 7:11am UTC](https://discuss.elastic.co/t/rest-call-to-list-only-index-names-and-docs-count/52957/4 "2016-06-20T07:11:48Z")

</div>

Hi,

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

Thanks,  
RK

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 20, 2016, 2:01pm UTC](https://discuss.elastic.co/t/rest-call-to-list-only-index-names-and-docs-count/52957/5 "2016-06-20T14:01:20Z")

</div>

please open new topics for new questions in the forum. Also check the infos about `pretty` in the [documentation](https://www.elastic.co/guide/en/elasticsearch/guide/current/get-doc.html#get-doc)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:42pm UTC](https://discuss.elastic.co/t/rest-call-to-list-only-index-names-and-docs-count/52957/6 "2017-07-05T22:42:12Z")

</div>


