ModernLoop Internal API
Apidatadog

Search Datadog indexed logs

Read operation: does not mutate upstream state.

curl -X POST "https://api.modernloop.dev/rest/v1/datadog/logs/search" \  -H "Authorization: Bearer $MLOOP_INTERNAL_MCP_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "query": "string"  }'
{  "logs": [    {      "id": "string",      "timestamp": "string",      "status": "string",      "service": "string",      "host": "string",      "message": "string",      "tags": [        "string"      ],      "attributes": {        "property1": null,        "property2": null      }    }  ],  "nextCursor": "string"}
{  "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 log search query

Length1 <= length
from?string

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

to?string

End time as ISO timestamp (default: now)

sort?string

Sort order by event timestamp

Default"-timestamp"

Value in

  • "timestamp"
  • "-timestamp"
limit?integer

Maximum number of logs to return (max 1000)

Range1 <= value <= 1000
Default100
cursor?string

Pagination cursor from a previous response (nextCursor)

indexes?array<string>

Log indexes to search (default: all indexes)

Response Body

application/json

application/json

application/json

application/json

application/json