Chilkat Online Tools

PureBasic / Datadog API Collection / Aggregate pipelines events

Back to Collection Items

IncludeFile "CkJsonObject.pb"
IncludeFile "CkStringBuilder.pb"
IncludeFile "CkHttp.pb"
IncludeFile "CkHttpResponse.pb"

Procedure ChilkatExample()

    ; This example assumes the Chilkat API to have been previously unlocked.
    ; See Global Unlock Sample for sample code.

    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success.i

    ; Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    ; The following JSON is sent in the request body.

    ; {
    ;   "compute": [
    ;     {
    ;       "aggregation": "pc95",
    ;       "interval": "<string>",
    ;       "metric": "<string>",
    ;       "type": "total"
    ;     },
    ;     {
    ;       "aggregation": "avg",
    ;       "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": "pc99",
    ;         "metric": "<string>",
    ;         "order": "desc",
    ;         "type": "alphabetical"
    ;       },
    ;       "total": "<boolean>"
    ;     }
    ;   ],
    ;   "options": {
    ;     "time_offset": "<long>",
    ;     "timezone": "UTC"
    ;   }
    ; }

    json.i = CkJsonObject::ckCreate()
    If json.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckUpdateString(json,"compute[0].aggregation","pc95")
    CkJsonObject::ckUpdateString(json,"compute[0].interval","<string>")
    CkJsonObject::ckUpdateString(json,"compute[0].metric","<string>")
    CkJsonObject::ckUpdateString(json,"compute[0].type","total")
    CkJsonObject::ckUpdateString(json,"compute[1].aggregation","avg")
    CkJsonObject::ckUpdateString(json,"compute[1].interval","<string>")
    CkJsonObject::ckUpdateString(json,"compute[1].metric","<string>")
    CkJsonObject::ckUpdateString(json,"compute[1].type","total")
    CkJsonObject::ckUpdateString(json,"filter.from","now-15m")
    CkJsonObject::ckUpdateString(json,"filter.query","*")
    CkJsonObject::ckUpdateString(json,"filter.to","now")
    CkJsonObject::ckUpdateString(json,"group_by[0].facet","<string>")
    CkJsonObject::ckUpdateString(json,"group_by[0].histogram.interval","<double>")
    CkJsonObject::ckUpdateString(json,"group_by[0].histogram.min","<double>")
    CkJsonObject::ckUpdateString(json,"group_by[0].histogram.max","<double>")
    CkJsonObject::ckUpdateInt(json,"group_by[0].limit",10)
    CkJsonObject::ckUpdateString(json,"group_by[0].missing","<string>")
    CkJsonObject::ckUpdateString(json,"group_by[0].sort.aggregation","delta")
    CkJsonObject::ckUpdateString(json,"group_by[0].sort.metric","<string>")
    CkJsonObject::ckUpdateString(json,"group_by[0].sort.order","asc")
    CkJsonObject::ckUpdateString(json,"group_by[0].sort.type","alphabetical")
    CkJsonObject::ckUpdateString(json,"group_by[0].total","<boolean>")
    CkJsonObject::ckUpdateString(json,"group_by[1].facet","<string>")
    CkJsonObject::ckUpdateString(json,"group_by[1].histogram.interval","<double>")
    CkJsonObject::ckUpdateString(json,"group_by[1].histogram.min","<double>")
    CkJsonObject::ckUpdateString(json,"group_by[1].histogram.max","<double>")
    CkJsonObject::ckUpdateInt(json,"group_by[1].limit",10)
    CkJsonObject::ckUpdateString(json,"group_by[1].missing","<string>")
    CkJsonObject::ckUpdateString(json,"group_by[1].sort.aggregation","pc99")
    CkJsonObject::ckUpdateString(json,"group_by[1].sort.metric","<string>")
    CkJsonObject::ckUpdateString(json,"group_by[1].sort.order","desc")
    CkJsonObject::ckUpdateString(json,"group_by[1].sort.type","alphabetical")
    CkJsonObject::ckUpdateString(json,"group_by[1].total","<boolean>")
    CkJsonObject::ckUpdateString(json,"options.time_offset","<long>")
    CkJsonObject::ckUpdateString(json,"options.timezone","UTC")

    CkHttp::ckSetRequestHeader(http,"Content-Type","application/json")
    CkHttp::ckSetRequestHeader(http,"Accept","application/json")

    resp.i = CkHttp::ckPostJson3(http,"https://api.app.ddog-gov.com/api/v2/ci/pipelines/analytics/aggregate","application/json",json)
    If CkHttp::ckLastMethodSuccess(http) = 0
        Debug CkHttp::ckLastErrorText(http)
        CkHttp::ckDispose(http)
        CkJsonObject::ckDispose(json)
        ProcedureReturn
    EndIf

    sbResponseBody.i = CkStringBuilder::ckCreate()
    If sbResponseBody.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkHttpResponse::ckGetBodySb(resp,sbResponseBody)

    jResp.i = CkJsonObject::ckCreate()
    If jResp.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckLoadSb(jResp,sbResponseBody)
    CkJsonObject::setCkEmitCompact(jResp, 0)

    Debug "Response Body:"
    Debug CkJsonObject::ckEmit(jResp)

    respStatusCode.i = CkHttpResponse::ckStatusCode(resp)
    Debug "Response Status Code = " + Str(respStatusCode)
    If respStatusCode >= 400
        Debug "Response Header:"
        Debug CkHttpResponse::ckHeader(resp)
        Debug "Failed."
        CkHttpResponse::ckDispose(resp)

        CkHttp::ckDispose(http)
        CkJsonObject::ckDispose(json)
        CkStringBuilder::ckDispose(sbResponseBody)
        CkJsonObject::ckDispose(jResp)
        ProcedureReturn
    EndIf

    CkHttpResponse::ckDispose(resp)

    ; Sample JSON response:
    ; (Sample code for parsing the JSON response is shown below)

    ; {
    ;   "data": {
    ;     "buckets": [
    ;       {
    ;         "by": {
    ;           "reprehenderit461": {
    ;             "description": "The values for each group-by."
    ;           },
    ;           "qui72": {
    ;             "description": "The values for each group-by."
    ;           }
    ;         },
    ;         "computes": {
    ;           "dolore4": "<string>"
    ;         }
    ;       },
    ;       {
    ;         "by": {
    ;           "proident9a": {
    ;             "description": "The values for each group-by."
    ;           }
    ;         },
    ;         "computes": {
    ;           "Lorem62": "<string>",
    ;           "ut5": "<string>"
    ;         }
    ;       }
    ;     ]
    ;   },
    ;   "links": {
    ;     "next": "<string>"
    ;   },
    ;   "meta": {
    ;     "elapsed": "<long>",
    ;     "request_id": "<string>",
    ;     "status": "done",
    ;     "warnings": [
    ;       {
    ;         "code": "<string>",
    ;         "detail": "<string>",
    ;         "title": "<string>"
    ;       },
    ;       {
    ;         "code": "<string>",
    ;         "detail": "<string>",
    ;         "title": "<string>"
    ;       }
    ;     ]
    ;   }
    ; }

    ; Sample code for parsing the JSON response...
    ; Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    Description.s
    Qui72Description.s
    Dolore4.s
    Proident9aDescription.s
    Lorem62.s
    Ut5.s
    code.s
    detail.s
    title.s

    v_Next.s = CkJsonObject::ckStringOf(jResp,"links.next")
    Elapsed.s = CkJsonObject::ckStringOf(jResp,"meta.elapsed")
    Request_id.s = CkJsonObject::ckStringOf(jResp,"meta.request_id")
    Status.s = CkJsonObject::ckStringOf(jResp,"meta.status")
    i.i = 0
    count_i.i = CkJsonObject::ckSizeOfArray(jResp,"data.buckets")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        Description = CkJsonObject::ckStringOf(jResp,"data.buckets[i].by.reprehenderit461.description")
        Qui72Description = CkJsonObject::ckStringOf(jResp,"data.buckets[i].by.qui72.description")
        Dolore4 = CkJsonObject::ckStringOf(jResp,"data.buckets[i].computes.dolore4")
        Proident9aDescription = CkJsonObject::ckStringOf(jResp,"data.buckets[i].by.proident9a.description")
        Lorem62 = CkJsonObject::ckStringOf(jResp,"data.buckets[i].computes.Lorem62")
        Ut5 = CkJsonObject::ckStringOf(jResp,"data.buckets[i].computes.ut5")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"meta.warnings")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        code = CkJsonObject::ckStringOf(jResp,"meta.warnings[i].code")
        detail = CkJsonObject::ckStringOf(jResp,"meta.warnings[i].detail")
        title = CkJsonObject::ckStringOf(jResp,"meta.warnings[i].title")
        i = i + 1
    Wend


    CkHttp::ckDispose(http)
    CkJsonObject::ckDispose(json)
    CkStringBuilder::ckDispose(sbResponseBody)
    CkJsonObject::ckDispose(jResp)


    ProcedureReturn
EndProcedure

Curl Command

curl -X POST
	-H "Content-Type: application/json"
	-H "Accept: application/json"
	-d '{
  "compute": [
    {
      "aggregation": "pc95",
      "interval": "<string>",
      "metric": "<string>",
      "type": "total"
    },
    {
      "aggregation": "avg",
      "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": "pc99",
        "metric": "<string>",
        "order": "desc",
        "type": "alphabetical"
      },
      "total": "<boolean>"
    }
  ],
  "options": {
    "time_offset": "<long>",
    "timezone": "UTC"
  }
}'
https://api.app.ddog-gov.com/api/v2/ci/pipelines/analytics/aggregate

Postman Collection Item JSON

{
  "name": "Aggregate pipelines events",
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"compute\": [\n    {\n      \"aggregation\": \"pc95\",\n      \"interval\": \"<string>\",\n      \"metric\": \"<string>\",\n      \"type\": \"total\"\n    },\n    {\n      \"aggregation\": \"avg\",\n      \"interval\": \"<string>\",\n      \"metric\": \"<string>\",\n      \"type\": \"total\"\n    }\n  ],\n  \"filter\": {\n    \"from\": \"now-15m\",\n    \"query\": \"*\",\n    \"to\": \"now\"\n  },\n  \"group_by\": [\n    {\n      \"facet\": \"<string>\",\n      \"histogram\": {\n        \"interval\": \"<double>\",\n        \"min\": \"<double>\",\n        \"max\": \"<double>\"\n      },\n      \"limit\": 10,\n      \"missing\": \"<string>\",\n      \"sort\": {\n        \"aggregation\": \"delta\",\n        \"metric\": \"<string>\",\n        \"order\": \"asc\",\n        \"type\": \"alphabetical\"\n      },\n      \"total\": \"<boolean>\"\n    },\n    {\n      \"facet\": \"<string>\",\n      \"histogram\": {\n        \"interval\": \"<double>\",\n        \"min\": \"<double>\",\n        \"max\": \"<double>\"\n      },\n      \"limit\": 10,\n      \"missing\": \"<string>\",\n      \"sort\": {\n        \"aggregation\": \"pc99\",\n        \"metric\": \"<string>\",\n        \"order\": \"desc\",\n        \"type\": \"alphabetical\"\n      },\n      \"total\": \"<boolean>\"\n    }\n  ],\n  \"options\": {\n    \"time_offset\": \"<long>\",\n    \"timezone\": \"UTC\"\n  }\n}",
      "options": {
        "raw": {
          "headerFamily": "json",
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{baseUrl}}/api/v2/ci/pipelines/analytics/aggregate",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v2",
        "ci",
        "pipelines",
        "analytics",
        "aggregate"
      ]
    },
    "description": "Use this API endpoint to aggregate CI Visibility pipeline events into buckets of computed metrics and timeseries."
  },
  "response": [
    {
      "name": "OK",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"compute\": [\n    {\n      \"aggregation\": \"pc95\",\n      \"interval\": \"<string>\",\n      \"metric\": \"<string>\",\n      \"type\": \"total\"\n    },\n    {\n      \"aggregation\": \"avg\",\n      \"interval\": \"<string>\",\n      \"metric\": \"<string>\",\n      \"type\": \"total\"\n    }\n  ],\n  \"filter\": {\n    \"from\": \"now-15m\",\n    \"query\": \"*\",\n    \"to\": \"now\"\n  },\n  \"group_by\": [\n    {\n      \"facet\": \"<string>\",\n      \"histogram\": {\n        \"interval\": \"<double>\",\n        \"min\": \"<double>\",\n        \"max\": \"<double>\"\n      },\n      \"limit\": 10,\n      \"missing\": \"<string>\",\n      \"sort\": {\n        \"aggregation\": \"delta\",\n        \"metric\": \"<string>\",\n        \"order\": \"asc\",\n        \"type\": \"alphabetical\"\n      },\n      \"total\": \"<boolean>\"\n    },\n    {\n      \"facet\": \"<string>\",\n      \"histogram\": {\n        \"interval\": \"<double>\",\n        \"min\": \"<double>\",\n        \"max\": \"<double>\"\n      },\n      \"limit\": 10,\n      \"missing\": \"<string>\",\n      \"sort\": {\n        \"aggregation\": \"pc99\",\n        \"metric\": \"<string>\",\n        \"order\": \"desc\",\n        \"type\": \"alphabetical\"\n      },\n      \"total\": \"<boolean>\"\n    }\n  ],\n  \"options\": {\n    \"time_offset\": \"<long>\",\n    \"timezone\": \"UTC\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/ci/pipelines/analytics/aggregate",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "ci",
            "pipelines",
            "analytics",
            "aggregate"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"data\": {\n    \"buckets\": [\n      {\n        \"by\": {\n          \"reprehenderit461\": {\n            \"description\": \"The values for each group-by.\"\n          },\n          \"qui72\": {\n            \"description\": \"The values for each group-by.\"\n          }\n        },\n        \"computes\": {\n          \"dolore4\": \"<string>\"\n        }\n      },\n      {\n        \"by\": {\n          \"proident9a\": {\n            \"description\": \"The values for each group-by.\"\n          }\n        },\n        \"computes\": {\n          \"Lorem62\": \"<string>\",\n          \"ut5\": \"<string>\"\n        }\n      }\n    ]\n  },\n  \"links\": {\n    \"next\": \"<string>\"\n  },\n  \"meta\": {\n    \"elapsed\": \"<long>\",\n    \"request_id\": \"<string>\",\n    \"status\": \"done\",\n    \"warnings\": [\n      {\n        \"code\": \"<string>\",\n        \"detail\": \"<string>\",\n        \"title\": \"<string>\"\n      },\n      {\n        \"code\": \"<string>\",\n        \"detail\": \"<string>\",\n        \"title\": \"<string>\"\n      }\n    ]\n  }\n}"
    },
    {
      "name": "Bad Request",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"compute\": [\n    {\n      \"aggregation\": \"pc95\",\n      \"interval\": \"<string>\",\n      \"metric\": \"<string>\",\n      \"type\": \"total\"\n    },\n    {\n      \"aggregation\": \"avg\",\n      \"interval\": \"<string>\",\n      \"metric\": \"<string>\",\n      \"type\": \"total\"\n    }\n  ],\n  \"filter\": {\n    \"from\": \"now-15m\",\n    \"query\": \"*\",\n    \"to\": \"now\"\n  },\n  \"group_by\": [\n    {\n      \"facet\": \"<string>\",\n      \"histogram\": {\n        \"interval\": \"<double>\",\n        \"min\": \"<double>\",\n        \"max\": \"<double>\"\n      },\n      \"limit\": 10,\n      \"missing\": \"<string>\",\n      \"sort\": {\n        \"aggregation\": \"delta\",\n        \"metric\": \"<string>\",\n        \"order\": \"asc\",\n        \"type\": \"alphabetical\"\n      },\n      \"total\": \"<boolean>\"\n    },\n    {\n      \"facet\": \"<string>\",\n      \"histogram\": {\n        \"interval\": \"<double>\",\n        \"min\": \"<double>\",\n        \"max\": \"<double>\"\n      },\n      \"limit\": 10,\n      \"missing\": \"<string>\",\n      \"sort\": {\n        \"aggregation\": \"pc99\",\n        \"metric\": \"<string>\",\n        \"order\": \"desc\",\n        \"type\": \"alphabetical\"\n      },\n      \"total\": \"<boolean>\"\n    }\n  ],\n  \"options\": {\n    \"time_offset\": \"<long>\",\n    \"timezone\": \"UTC\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/ci/pipelines/analytics/aggregate",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "ci",
            "pipelines",
            "analytics",
            "aggregate"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Not Authorized",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"compute\": [\n    {\n      \"aggregation\": \"pc95\",\n      \"interval\": \"<string>\",\n      \"metric\": \"<string>\",\n      \"type\": \"total\"\n    },\n    {\n      \"aggregation\": \"avg\",\n      \"interval\": \"<string>\",\n      \"metric\": \"<string>\",\n      \"type\": \"total\"\n    }\n  ],\n  \"filter\": {\n    \"from\": \"now-15m\",\n    \"query\": \"*\",\n    \"to\": \"now\"\n  },\n  \"group_by\": [\n    {\n      \"facet\": \"<string>\",\n      \"histogram\": {\n        \"interval\": \"<double>\",\n        \"min\": \"<double>\",\n        \"max\": \"<double>\"\n      },\n      \"limit\": 10,\n      \"missing\": \"<string>\",\n      \"sort\": {\n        \"aggregation\": \"delta\",\n        \"metric\": \"<string>\",\n        \"order\": \"asc\",\n        \"type\": \"alphabetical\"\n      },\n      \"total\": \"<boolean>\"\n    },\n    {\n      \"facet\": \"<string>\",\n      \"histogram\": {\n        \"interval\": \"<double>\",\n        \"min\": \"<double>\",\n        \"max\": \"<double>\"\n      },\n      \"limit\": 10,\n      \"missing\": \"<string>\",\n      \"sort\": {\n        \"aggregation\": \"pc99\",\n        \"metric\": \"<string>\",\n        \"order\": \"desc\",\n        \"type\": \"alphabetical\"\n      },\n      \"total\": \"<boolean>\"\n    }\n  ],\n  \"options\": {\n    \"time_offset\": \"<long>\",\n    \"timezone\": \"UTC\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/ci/pipelines/analytics/aggregate",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "ci",
            "pipelines",
            "analytics",
            "aggregate"
          ]
        }
      },
      "status": "Forbidden",
      "code": 403,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Too many requests",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"compute\": [\n    {\n      \"aggregation\": \"pc95\",\n      \"interval\": \"<string>\",\n      \"metric\": \"<string>\",\n      \"type\": \"total\"\n    },\n    {\n      \"aggregation\": \"avg\",\n      \"interval\": \"<string>\",\n      \"metric\": \"<string>\",\n      \"type\": \"total\"\n    }\n  ],\n  \"filter\": {\n    \"from\": \"now-15m\",\n    \"query\": \"*\",\n    \"to\": \"now\"\n  },\n  \"group_by\": [\n    {\n      \"facet\": \"<string>\",\n      \"histogram\": {\n        \"interval\": \"<double>\",\n        \"min\": \"<double>\",\n        \"max\": \"<double>\"\n      },\n      \"limit\": 10,\n      \"missing\": \"<string>\",\n      \"sort\": {\n        \"aggregation\": \"delta\",\n        \"metric\": \"<string>\",\n        \"order\": \"asc\",\n        \"type\": \"alphabetical\"\n      },\n      \"total\": \"<boolean>\"\n    },\n    {\n      \"facet\": \"<string>\",\n      \"histogram\": {\n        \"interval\": \"<double>\",\n        \"min\": \"<double>\",\n        \"max\": \"<double>\"\n      },\n      \"limit\": 10,\n      \"missing\": \"<string>\",\n      \"sort\": {\n        \"aggregation\": \"pc99\",\n        \"metric\": \"<string>\",\n        \"order\": \"desc\",\n        \"type\": \"alphabetical\"\n      },\n      \"total\": \"<boolean>\"\n    }\n  ],\n  \"options\": {\n    \"time_offset\": \"<long>\",\n    \"timezone\": \"UTC\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/ci/pipelines/analytics/aggregate",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "ci",
            "pipelines",
            "analytics",
            "aggregate"
          ]
        }
      },
      "status": "Too Many Requests",
      "code": 429,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    }
  ]
}