ModernLoop Internal API
Apidatadog

Aggregate Datadog logs

Read operation: does not mutate upstream state.

curl -X POST "https://api.modernloop.dev/rest/v1/datadog/logs/aggregate" \  -H "Authorization: Bearer $MLOOP_INTERNAL_MCP_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "query": "string"  }'
{  "buckets": [    {      "by": {        "property1": null,        "property2": null      },      "computes": {        "property1": null,        "property2": null      }    }  ]}
{  "error": {    "code": "string",    "message": "string",    "upstreamStatus": 0  }}
{  "error": {    "code": "string",    "message": "string",    "upstreamStatus": 0  }}
{  "error": {    "code": "string",    "message": "string",    "upstreamStatus": 0  }}
{  "error": {    "code": "string",    "message": "string",    "upstreamStatus": 0  }}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

query*string

Datadog search query

Length1 <= length
from?string

Start time as ISO timestamp (default: 1 day ago)

to?string

End time as ISO timestamp (default: now)

groupBy?string

Facet to group by (e.g. 'status', 'service', '@http.status_code')

computeType?string

Aggregation type (default: count)

Default"count"

Value in

  • "count"
  • "cardinality"
  • "sum"
  • "avg"
  • "min"
  • "max"
  • "pc75"
  • "pc90"
  • "pc95"
  • "pc99"
computeField?string

Field to compute on (required for non-count aggregations, e.g. '@duration')

Response Body

application/json

application/json

application/json

application/json

application/json