Elasticsearch - get list if field_names for a given index


I am trying to get the list of field names of any index using node.js. Is there any API I can use to access the list?

In general is there a way to get list of field names using any elasticsearch API?

Thanks in advance!


you can use the Get Mapping API to get all your fields.

Hope it helps