Is there a query or some way to ask elasticsearch that which field is being used as timefield for the index?
Elasticsearch doesn't have the concept of THE
timefield for an index. Rather it has a concept of mapping (0 to N) fields to date types . This can be explicit  or implicit via dynamic mappings .
You can query the mappings for a given index to get the mappings  and look for the (0 to N) date type(s), which may get you close to what you are asking.
However, I assume you question is more in reference to how to get Kibana's default time field for a given Kibana's index pattern. For example, it is the (date type) field used to build out the graphic (date histogram) at the top of the discover page in Kibana. For that you will need to checkout the Kibana docs , or ask over in #kibana to see if they expose that as part of their API.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.