# List All the field names in an index matching

**URL:** <https://discuss.elastic.co/t/list-all-the-field-names-in-an-index-matching/54875>\
**Category:** Elasticsearch\
**Created:** [July 6, 2016, 10:43pm UTC](https://discuss.elastic.co/t/list-all-the-field-names-in-an-index-matching/54875 "2016-07-06T22:43:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sridhar\_Yadav\_Manoha](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@Sridhar\_Yadav\_Manoha](https://discuss.elastic.co/u/Sridhar_Yadav_Manoha)\
**Post date:** [July 6, 2016, 10:43pm UTC](https://discuss.elastic.co/t/list-all-the-field-names-in-an-index-matching/54875/1 "2016-07-06T22:43:41Z")

</div>

How do i only list all the field names using the GET API without any extra information.? I don't want it's specific value.

For eg:

curl -XGET 'localhost:9200/metricsindex/\_search?scroll=10m&pretty' -d '{ "query": { "filtered": { "query": { "match\_all": {} }, "filter": { "range": { "@timestamp": { "gte": "2016-07-05T14:00:00", "lte": "2016-07-07T15:00:00" } } } } } } '

I need to know all the field names(metrics) associated with the index metricsindex within the given time range.

Then drill down to get the value of a particular metric.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 6, 2016, 11:46pm UTC](https://discuss.elastic.co/t/list-all-the-field-names-in-an-index-matching/54875/2 "2016-07-06T23:46:43Z")

</div>

You cannot do this, the closest you can get is to use the `_mapping` API and something like `jq`.

---

<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:37pm UTC](https://discuss.elastic.co/t/list-all-the-field-names-in-an-index-matching/54875/3 "2017-07-05T22:37:32Z")

</div>


