Aggregate events

POST {{baseUrl}}/api/v2/logs/analytics/aggregate

The API endpoint to aggregate events into buckets and compute metrics and timeseries.

Request Body

{"compute"=>[{"aggregation"=>"cardinality", "interval"=>"<string>", "metric"=>"<string>", "type"=>"total"}, {"aggregation"=>"cardinality", "interval"=>"<string>", "metric"=>"<string>", "type"=>"total"}], "filter"=>{"from"=>"now-15m", "indexes"=>["*"], "query"=>"*", "storage_tier"=>"indexes", "to"=>"now"}, "group_by"=>[{"facet"=>"<string>", "histogram"=>{"interval"=>"<double>", "min"=>"<double>", "max"=>"<double>"}, "limit"=>10, "missing"=>"<string>", "sort"=>{"aggregation"=>"median", "metric"=>"<string>", "order"=>"asc", "type"=>"alphabetical"}, "total"=>"<boolean>"}, {"facet"=>"<string>", "histogram"=>{"interval"=>"<double>", "min"=>"<double>", "max"=>"<double>"}, "limit"=>10, "missing"=>"<string>", "sort"=>{"aggregation"=>"cardinality", "metric"=>"<string>", "order"=>"asc", "type"=>"alphabetical"}, "total"=>"<boolean>"}], "options"=>{"timeOffset"=>"<long>", "timezone"=>"UTC"}, "page"=>{"cursor"=>"<string>"}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;data&quot;:{&quot;buckets&quot;:[{&quot;by&quot;:{&quot;in__11&quot;:{&quot;description&quot;:&quot;The values for each group by&quot;},&quot;magna_c7&quot;:{&quot;description&quot;:&quot;The values for each group by&quot;}},&quot;computes&quot;:{&quot;id_3&quot;:&quot;\u003cstring\u003e&quot;}},{&quot;by&quot;:{&quot;cillum_d9&quot;:{&quot;description&quot;:&quot;The values for each group by&quot;},&quot;est_ec&quot;:{&quot;description&quot;:&quot;The values for each group by&quot;},&quot;in_5a4&quot;:{&quot;description&quot;:&quot;The values for each group by&quot;}},&quot;computes&quot;:{&quot;ex_b&quot;:&quot;\u003cstring\u003e&quot;}}]},&quot;meta&quot;:{&quot;elapsed&quot;:&quot;\u003clong\u003e&quot;,&quot;page&quot;:{&quot;after&quot;:&quot;\u003cstring\u003e&quot;},&quot;request_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;status&quot;:&quot;done&quot;,&quot;warnings&quot;:[{&quot;code&quot;:&quot;\u003cstring\u003e&quot;,&quot;detail&quot;:&quot;\u003cstring\u003e&quot;,&quot;title&quot;:&quot;\u003cstring\u003e&quot;},{&quot;code&quot;:&quot;\u003cstring\u003e&quot;,&quot;detail&quot;:&quot;\u003cstring\u003e&quot;,&quot;title&quot;:&quot;\u003cstring\u003e&quot;}]}}