Chilkat Online Tools

DataFlex / Datadog API Collection / Aggregate spans

Back to Collection Items

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vJson
    Handle hoJson
    Variant vResp
    Handle hoResp
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    String sDescription
    String sNulla_7feDescription
    String sUllamco_2f
    String sDo_fc0
    String sId
    String sV_type
    String sNisi9aDescription
    String sSunt_d
    String sElit_d4
    String sCode
    String sDetail
    String sTitle
    String sElapsed
    String sRequest_id
    String sStatus
    Integer i
    Integer iCount_i
    String sTemp1
    Boolean bTemp1

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

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

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

    // The following JSON is sent in the request body.

    // {
    //   "data": {
    //     "attributes": {
    //       "compute": [
    //         {
    //           "aggregation": "avg",
    //           "interval": "<string>",
    //           "metric": "<string>",
    //           "type": "total"
    //         },
    //         {
    //           "aggregation": "pc98",
    //           "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": "count",
    //             "metric": "<string>",
    //             "order": "desc",
    //             "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": {
    //         "timeOffset": "<long>",
    //         "timezone": "UTC"
    //       }
    //     },
    //     "type": "aggregate_request"
    //   }
    // }

    Get Create (RefClass(cComChilkatJsonObject)) To hoJson
    If (Not(IsComObjectCreated(hoJson))) Begin
        Send CreateComObject of hoJson
    End
    Get ComUpdateString Of hoJson "data.attributes.compute[0].aggregation" "avg" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.compute[0].interval" "<string>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.compute[0].metric" "<string>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.compute[0].type" "total" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.compute[1].aggregation" "pc98" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.compute[1].interval" "<string>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.compute[1].metric" "<string>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.compute[1].type" "total" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.filter.from" "now-15m" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.filter.query" "*" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.filter.to" "now" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[0].facet" "<string>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[0].histogram.interval" "<double>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[0].histogram.min" "<double>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[0].histogram.max" "<double>" To iSuccess
    Get ComUpdateInt Of hoJson "data.attributes.group_by[0].limit" 10 To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[0].missing" "<string>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[0].sort.aggregation" "count" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[0].sort.metric" "<string>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[0].sort.order" "desc" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[0].sort.type" "alphabetical" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[0].total" "<boolean>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[1].facet" "<string>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[1].histogram.interval" "<double>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[1].histogram.min" "<double>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[1].histogram.max" "<double>" To iSuccess
    Get ComUpdateInt Of hoJson "data.attributes.group_by[1].limit" 10 To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[1].missing" "<string>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[1].sort.aggregation" "pc99" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[1].sort.metric" "<string>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[1].sort.order" "desc" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[1].sort.type" "alphabetical" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.group_by[1].total" "<boolean>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.options.timeOffset" "<long>" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.options.timezone" "UTC" To iSuccess
    Get ComUpdateString Of hoJson "data.type" "aggregate_request" To iSuccess

    Send ComSetRequestHeader To hoHttp "Content-Type" "application/json"
    Send ComSetRequestHeader To hoHttp "Accept" "application/json"

    Get pvComObject of hoJson to vJson
    Get ComPostJson3 Of hoHttp "https://api.app.ddog-gov.com/api/v2/spans/analytics/aggregate" "application/json" vJson To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess

    Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
    If (Not(IsComObjectCreated(hoJResp))) Begin
        Send CreateComObject of hoJResp
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
    Set ComEmitCompact Of hoJResp To False

    Showln "Response Body:"
    Get ComEmit Of hoJResp To sTemp1
    Showln sTemp1

    Get ComStatusCode Of hoResp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComHeader Of hoResp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Send Destroy of hoResp
        Procedure_Return
    End

    Send Destroy of hoResp

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

    // {
    //   "data": [
    //     {
    //       "attributes": {
    //         "by": {
    //           "ea3": {
    //             "description": "The values for each group by."
    //           },
    //           "nulla_7fe": {
    //             "description": "The values for each group by."
    //           }
    //         },
    //         "compute": {},
    //         "computes": {
    //           "ullamco_2f": "<string>",
    //           "do_fc0": "<string>"
    //         }
    //       },
    //       "id": "<string>",
    //       "type": "bucket"
    //     },
    //     {
    //       "attributes": {
    //         "by": {
    //           "nisi9a": {
    //             "description": "The values for each group by."
    //           }
    //         },
    //         "compute": {},
    //         "computes": {
    //           "sunt_d": "<string>",
    //           "elit_d4": "<string>"
    //         }
    //       },
    //       "id": "<string>",
    //       "type": "bucket"
    //     }
    //   ],
    //   "meta": {
    //     "elapsed": "<long>",
    //     "request_id": "<string>",
    //     "status": "timeout",
    //     "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

    Get ComStringOf Of hoJResp "meta.elapsed" To sElapsed
    Get ComStringOf Of hoJResp "meta.request_id" To sRequest_id
    Get ComStringOf Of hoJResp "meta.status" To sStatus
    Move 0 To i
    Get ComSizeOfArray Of hoJResp "data" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "data[i].attributes.by.ea3.description" To sDescription
        Get ComStringOf Of hoJResp "data[i].attributes.by.nulla_7fe.description" To sNulla_7feDescription
        Get ComStringOf Of hoJResp "data[i].attributes.computes.ullamco_2f" To sUllamco_2f
        Get ComStringOf Of hoJResp "data[i].attributes.computes.do_fc0" To sDo_fc0
        Get ComStringOf Of hoJResp "data[i].id" To sId
        Get ComStringOf Of hoJResp "data[i].type" To sV_type
        Get ComStringOf Of hoJResp "data[i].attributes.by.nisi9a.description" To sNisi9aDescription
        Get ComStringOf Of hoJResp "data[i].attributes.computes.sunt_d" To sSunt_d
        Get ComStringOf Of hoJResp "data[i].attributes.computes.elit_d4" To sElit_d4
        Move (i + 1) To i
    Loop

    Move 0 To i
    Get ComSizeOfArray Of hoJResp "meta.warnings" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "meta.warnings[i].code" To sCode
        Get ComStringOf Of hoJResp "meta.warnings[i].detail" To sDetail
        Get ComStringOf Of hoJResp "meta.warnings[i].title" To sTitle
        Move (i + 1) To i
    Loop



End_Procedure

Curl Command

curl -X POST
	-H "Content-Type: application/json"
	-H "Accept: application/json"
	-d '{
  "data": {
    "attributes": {
      "compute": [
        {
          "aggregation": "avg",
          "interval": "<string>",
          "metric": "<string>",
          "type": "total"
        },
        {
          "aggregation": "pc98",
          "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": "count",
            "metric": "<string>",
            "order": "desc",
            "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": {
        "timeOffset": "<long>",
        "timezone": "UTC"
      }
    },
    "type": "aggregate_request"
  }
}'
https://api.app.ddog-gov.com/api/v2/spans/analytics/aggregate

Postman Collection Item JSON

{
  "name": "Aggregate spans",
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"data\": {\n    \"attributes\": {\n      \"compute\": [\n        {\n          \"aggregation\": \"avg\",\n          \"interval\": \"<string>\",\n          \"metric\": \"<string>\",\n          \"type\": \"total\"\n        },\n        {\n          \"aggregation\": \"pc98\",\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\": \"count\",\n            \"metric\": \"<string>\",\n            \"order\": \"desc\",\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        \"timeOffset\": \"<long>\",\n        \"timezone\": \"UTC\"\n      }\n    },\n    \"type\": \"aggregate_request\"\n  }\n}",
      "options": {
        "raw": {
          "headerFamily": "json",
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{baseUrl}}/api/v2/spans/analytics/aggregate",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v2",
        "spans",
        "analytics",
        "aggregate"
      ]
    },
    "description": "The API endpoint to aggregate spans into buckets and compute metrics and timeseries.\nThis endpoint is rate limited to `300` requests per hour."
  },
  "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  \"data\": {\n    \"attributes\": {\n      \"compute\": [\n        {\n          \"aggregation\": \"avg\",\n          \"interval\": \"<string>\",\n          \"metric\": \"<string>\",\n          \"type\": \"total\"\n        },\n        {\n          \"aggregation\": \"pc98\",\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\": \"count\",\n            \"metric\": \"<string>\",\n            \"order\": \"desc\",\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        \"timeOffset\": \"<long>\",\n        \"timezone\": \"UTC\"\n      }\n    },\n    \"type\": \"aggregate_request\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/spans/analytics/aggregate",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "spans",
            "analytics",
            "aggregate"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"data\": [\n    {\n      \"attributes\": {\n        \"by\": {\n          \"ea3\": {\n            \"description\": \"The values for each group by.\"\n          },\n          \"nulla_7fe\": {\n            \"description\": \"The values for each group by.\"\n          }\n        },\n        \"compute\": {},\n        \"computes\": {\n          \"ullamco_2f\": \"<string>\",\n          \"do_fc0\": \"<string>\"\n        }\n      },\n      \"id\": \"<string>\",\n      \"type\": \"bucket\"\n    },\n    {\n      \"attributes\": {\n        \"by\": {\n          \"nisi9a\": {\n            \"description\": \"The values for each group by.\"\n          }\n        },\n        \"compute\": {},\n        \"computes\": {\n          \"sunt_d\": \"<string>\",\n          \"elit_d4\": \"<string>\"\n        }\n      },\n      \"id\": \"<string>\",\n      \"type\": \"bucket\"\n    }\n  ],\n  \"meta\": {\n    \"elapsed\": \"<long>\",\n    \"request_id\": \"<string>\",\n    \"status\": \"timeout\",\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  \"data\": {\n    \"attributes\": {\n      \"compute\": [\n        {\n          \"aggregation\": \"avg\",\n          \"interval\": \"<string>\",\n          \"metric\": \"<string>\",\n          \"type\": \"total\"\n        },\n        {\n          \"aggregation\": \"pc98\",\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\": \"count\",\n            \"metric\": \"<string>\",\n            \"order\": \"desc\",\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        \"timeOffset\": \"<long>\",\n        \"timezone\": \"UTC\"\n      }\n    },\n    \"type\": \"aggregate_request\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/spans/analytics/aggregate",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "spans",
            "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": "Forbidden",
      "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  \"data\": {\n    \"attributes\": {\n      \"compute\": [\n        {\n          \"aggregation\": \"avg\",\n          \"interval\": \"<string>\",\n          \"metric\": \"<string>\",\n          \"type\": \"total\"\n        },\n        {\n          \"aggregation\": \"pc98\",\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\": \"count\",\n            \"metric\": \"<string>\",\n            \"order\": \"desc\",\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        \"timeOffset\": \"<long>\",\n        \"timezone\": \"UTC\"\n      }\n    },\n    \"type\": \"aggregate_request\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/spans/analytics/aggregate",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "spans",
            "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  \"data\": {\n    \"attributes\": {\n      \"compute\": [\n        {\n          \"aggregation\": \"avg\",\n          \"interval\": \"<string>\",\n          \"metric\": \"<string>\",\n          \"type\": \"total\"\n        },\n        {\n          \"aggregation\": \"pc98\",\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\": \"count\",\n            \"metric\": \"<string>\",\n            \"order\": \"desc\",\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        \"timeOffset\": \"<long>\",\n        \"timezone\": \"UTC\"\n      }\n    },\n    \"type\": \"aggregate_request\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/spans/analytics/aggregate",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "spans",
            "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}"
    }
  ]
}