# Get list of fields for index in kibana plugin

**URL:** <https://discuss.elastic.co/t/get-list-of-fields-for-index-in-kibana-plugin/77664>\
**Category:** Kibana\
**Created:** [March 7, 2017, 1:16pm UTC](https://discuss.elastic.co/t/get-list-of-fields-for-index-in-kibana-plugin/77664 "2017-03-07T13:16:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saurabh\_Jambhule](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@Saurabh\_Jambhule](https://discuss.elastic.co/u/Saurabh_Jambhule)\
**Post date:** [March 7, 2017, 1:16pm UTC](https://discuss.elastic.co/t/get-list-of-fields-for-index-in-kibana-plugin/77664/1 "2017-03-07T13:16:51Z")

</div>

Hi,  
I am developing kibana app plugin and I want to get list of all fields in particular index in client side to list them in drop down menu.  
How to get them?

Thanks.

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [March 8, 2017, 9:35pm UTC](https://discuss.elastic.co/t/get-list-of-fields-for-index-in-kibana-plugin/77664/2 "2017-03-08T21:35:52Z")

</div>

Injecting `es` into your controller will give you access to an instance of the elasticsearch-js client. You can use that to pull down and parse your index's mappings. An example of how kibana does this can be seen [here](https://github.com/elastic/kibana/blob/26ec66bf05a1c2f0a3081f2b930605e9a631cca7/src/ui/public/index_patterns/_mapper.js#L65)

---

<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:** [April 5, 2017, 9:35pm UTC](https://discuss.elastic.co/t/get-list-of-fields-for-index-in-kibana-plugin/77664/3 "2017-04-05T21:35:58Z")

</div>

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