Each of my elasticrecords I’m searching contain a “status” field that contains an http status code,
I made this request to get the average of the api-response-time on a defined time range by uri :
GET /gravitee-*/_search
{
"query": {
"bool": {
"filter": [
{ "range": { "@timestamp": { "gte": "now-50d/d" }}}
]
}
},
"aggs": {
"average_api-response-time": {
"terms": {
"field" : "uri"
},
"avg": { "field" : "api-response-time" }
}
}
}
I wish to also get all the values that the “status” field took during this timerange ( it contains numericals : 200,401,etc.. ).
Is it possible without an histogram request ?
Thanks for helping !