This in an application context, not "human consumption".
With a bit of searching I finally found this answer.
The up-to-date (v. 8.11) documentation for this appears to be here, "cat indices API". But there it says "cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index API." There is mention there of this "h" parameter which the above answer referenced, but no information about the index creation datetime (however, it appears to work, i.e. it is possible to get the index creation datetime using the recipe from the linked answer).
Going to that "index API" page, I find nowhere, on any of those pages, anything about digging the index creation datetime out of metadata or settings or anything.
Does ES actually not want us to have access to the index creation datetime? Is use of this information discouraged? Is it deprecated and slated for removal from the API imminently?
Or is this another example of the ES API documentation not really being up to scratch?
If anyone knows where this is documented (ideally for an application context*) please tell me.
* obviously the "human consumption" output can be used by an application, as plain text, not a JSON object. But ES on that page is fairly explicitly saying "don't use that for an app, use something else."
I would recommend using the get index settings API: GET /_settings?human&filter_path=*.settings.index.creation_date_string. I don't see this documented anywhere, which is definitely a bug. It's not deprecated or slated for removal or anything.
ILM is nothing to do with setting this property, it pre-dates ILM by a very long time and will be set on all indices whether ILM-managed or not. It's true that ILM does use it tho.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.