Aggregate pipelines events

POST {{baseUrl}}/api/v2/ci/pipelines/analytics/aggregate

Use this API endpoint to aggregate CI Visibility pipeline events into buckets of computed metrics and timeseries.

Request Body

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

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;data&quot;:{&quot;buckets&quot;:[{&quot;by&quot;:{&quot;Uta5b&quot;:{&quot;description&quot;:&quot;The values for each group-by.&quot;},&quot;cillum_c51&quot;:{&quot;description&quot;:&quot;The values for each group-by.&quot;},&quot;commodoe6&quot;:{&quot;description&quot;:&quot;The values for each group-by.&quot;}},&quot;computes&quot;:{&quot;labore_f8&quot;:&quot;\u003cstring\u003e&quot;,&quot;commodoc1&quot;:&quot;\u003cstring\u003e&quot;}},{&quot;by&quot;:{&quot;proidentf&quot;:{&quot;description&quot;:&quot;The values for each group-by.&quot;},&quot;dolore_a&quot;:{&quot;description&quot;:&quot;The values for each group-by.&quot;}},&quot;computes&quot;:{&quot;incididunt_5&quot;:&quot;\u003cstring\u003e&quot;,&quot;id_27d&quot;:&quot;\u003cstring\u003e&quot;,&quot;reprehenderit4&quot;:&quot;\u003cstring\u003e&quot;,&quot;nostrud01&quot;:&quot;\u003cstring\u003e&quot;}}]},&quot;links&quot;:{&quot;next&quot;:&quot;\u003cstring\u003e&quot;},&quot;meta&quot;:{&quot;elapsed&quot;:&quot;\u003clong\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;}]}}