# Get all fieldnames of index from

**URL:** <https://discuss.elastic.co/t/get-all-fieldnames-of-index-from/339769>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management, runtime-fields\
**Created:** [August 1, 2023, 8:27am UTC](https://discuss.elastic.co/t/get-all-fieldnames-of-index-from/339769 "2023-08-01T08:27:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aniket\_mandhare](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aniket_mandhare/32/122986_2.png) [@aniket\_mandhare](https://discuss.elastic.co/u/aniket_mandhare)\
**Post date:** [August 1, 2023, 8:27am UTC](https://discuss.elastic.co/t/get-all-fieldnames-of-index-from/339769/1 "2023-08-01T08:27:39Z")

</div>

How to get all only fieldnames(key name) and not the values of it from index in Elasticsearch  
I tried using following request

```auto
GET /my_index/_field_caps?fields=*&filter_path=fields.*

```

Expected output  
{  
fields:{  
"field\_1",  
"field\_2.subfield\_1",  
"field\_2.subfield\_2",  
"field\_3.subfield\_1.another\_field"  
}  
}

---

<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:** [August 29, 2023, 8:27am UTC](https://discuss.elastic.co/t/get-all-fieldnames-of-index-from/339769/2 "2023-08-29T08:27:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
