How to use the Elasticsearch API to get the date of the oldest document in the index?
According to the documentation https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html such a query should look like this:
curl -s -u user:pass-H 'Content-type:application/json' -XPOST '127.0.0.1:9200/indices-name-*/_doc/_search?pretty=true' -d '{ "sort" : [ { "timestamp" : {"order" : "asc"}}, "_score" ], "size": 1 }'