LogsGet a trace's logs

Get a trace's logs

Every record that shares one trace id (one request across services), oldest first, at most 500, with a summary. Built from logs only: Mythic does not ingest spans. Default window 24 hours, so pass from/to around a record's timestamp for older traces. Filters and paging params answer 400 param_not_allowed. meta.complete is false when more records exist or the 4 MB bound cut the list; continue with GET /client/v1/logs?trace_id=...&order=asc&cursor=<next_cursor>.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/logs/traces/5b8efff798038103d269b633813fc60c?location_id=example_string&from=2026-10-18T10%3A00%3A00Z&to=example_string&range=15m&body_max_bytes=2048" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "trace_id": "5b8efff798038103d269b633813fc60c",
    "summary": {
      "started_at": "2024-12-25T10:00:00Z",
      "ended_at": "2024-12-25T10:00:00Z",
      "duration_ms": 42,
      "records": 42,
      "errors": 42,
      "levels": {},
      "services": [
        {
          "service": "example_string",
          "records": 42,
          "errors": 42
        }
      ],
      "spans": [
        {
          "span_id": "eee19b7ec3c1b174",
          "services": [
            "example_string"
          ],
          "first_at": "2024-12-25T10:00:00Z",
          "last_at": "2024-12-25T10:00:00Z",
          "records": 42,
          "errors": 42
        }
      ]
    },
    "records": [
      {
        "uuid": "example_string",
        "timestamp": "2024-12-25T10:00:00Z",
        "observed_at": "2024-12-25T10:00:00Z",
        "received_at": "2024-12-25T10:00:00Z",
        "level": "trace",
        "severity_number": 42,
        "severity_text": "example_string",
        "service": "checkout",
        "scope_name": "John Doe",
        "scope_version": "example_string",
        "event_name": "John Doe",
        "body": "example_string",
        "body_bytes": 42,
        "body_truncated": true,
        "attributes": {},
        "resource_attributes": {},
        "trace_id": "example_string",
        "span_id": "example_string",
        "distinct_id": "example_string",
        "session_id": "example_string",
        "pattern_id": "example_string"
      }
    ],
    "next_cursor": "example_string",
    "meta": {
      "from": "2024-12-25T10:00:00Z",
      "to": "2024-12-25T10:00:00Z",
      "limit": 500,
      "complete": true,
      "truncated": true
    },
    "truncated": true
  }
}
GET
/client/v1/logs/traces/{trace_id}
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need logs:read. See Using an mcp_ key over HTTP.

Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need logs:read. See Using an mcp_ key over HTTP.
path
trace_idstring
Required

32 hex characters, not all zeros.

query
location_idstring

Location to scope to. Required for ak_ keys (or send the X-Location-Id header); ignored for sk_.

query
fromstring

Window start, ISO 8601 or epoch milliseconds. Default is range (or 1 hour) before to.

query
tostring

Window end, exclusive. Default now.

query
rangestring

Preset window ending at to. Ignored when from is set. At most 30 days.

Options: 15m, 1h, 6h, 24h, 7d, 30d
query
body_max_bytesinteger
Min: 64 • Max: 32768
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need logs:read. See Using an mcp_ key over HTTP.

Path Parameters

trace_idstring
Required

32 hex characters, not all zeros.

Example:
5b8efff798038103d269b633813fc60c

Query Parameters

location_idstring

Location to scope to. Required for ak_ keys (or send the X-Location-Id header); ignored for sk_.

fromstring

Window start, ISO 8601 or epoch milliseconds. Default is range (or 1 hour) before to.

Example:
2026-10-18T10:00:00Z
tostring

Window end, exclusive. Default now.

rangestring

Preset window ending at to. Ignored when from is set. At most 30 days.

Allowed values:15m1h6h24h7d30d

Responses

successboolean
dataobject