Hi!
I'm trying to use the cURL API together with the request library i python and having problems with the parameters for sorting my response isn't affecting the result I'm receving.
The same parameters works fine running the in the dev console in Kibana, but generates a completly different response in my python lambda.
I use elastic search 5.1.
What I'm trying to do is to fetch the last entry and check it's timestamp and compare it to the current time in order to see that data is sent to our cluster.
See code here:
paramters = {
"size": 1,
"sort":
{"@timestamp" : "desc"}
}
response = requests.get(url='https://{name}.{region}.es.amazonaws.com/dss-services-*/_search' ,
params=paramters, auth=auth)
Do you see any obvious errors in my parameters?
Best Regards /Viktor