LogsSearch log records

Search log records

Records for the window, newest first by default, keyset-paged with next_cursor. Bodies are cut to body_max_bytes and flagged body_truncated. A page is bounded to about 4 MB; meta.truncated says it was cut and next_cursor continues after the last record returned.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/logs?location_id=example_string&from=2026-10-18T10%3A00%3A00Z&to=example_string&range=15m&levels=error%2Cfatal&services=checkout&q=timeout%20%22connection%20reset%22&attr=%5B%22http.status_code%3D500%22%5D&distinct_id=example_string&distinct_ids=user_42%2Cjane%40example.com&received_before=2026-10-18T11%3A00%3A00Z&session_id=example_string&trace_id=example_string&pattern_id=v1%3A892ea82429dfa0bf975caecb03a9e5ea&limit=100&order=desc&cursor=example_string&body_max_bytes=2048" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "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",
      "order": "example_string",
      "limit": 42,
      "truncated": true
    }
  }
}
GET
/client/v1/logs
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.
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
levelsstring

Comma list of levels.

query
servicesstring

Comma list of service names, at most 20.

query
qstring

Case-insensitive body search. Whitespace-separated terms must all match; double quotes keep a phrase. At most 5 terms.

query
attrarray

Repeatable attribute filter, key=value or a bare key. Resource attributes are resource.<key>. At most 5.

query
distinct_idstring

Records linked to this distinct_id (from mythic.distinct_id, distinct_id, user.id or enduser.id).

query
distinct_idsstring

Records linked to ANY of these distinct_ids: a comma list, or the param repeated. At most 50 values of at most 256 bytes. A value cannot contain a comma. To read one person's logs across all their identities, use GET /client/v1/data/people/{personId}/logs, which fills this in from the identity graph.

query
received_beforestring

Only records Mythic accepted strictly before this instant (ISO 8601 or epoch milliseconds). Pins a read so that records arriving late cannot change it.

query
trace_idstring

32 hex characters. A filter only.

query
limitinteger
Min: 1 • Max: 500
query
orderstring
Options: desc, asc
query
cursorstring

next_cursor from the previous page.

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.

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
levelsstring

Comma list of levels.

Example:
error,fatal
servicesstring

Comma list of service names, at most 20.

Example:
checkout
qstring

Case-insensitive body search. Whitespace-separated terms must all match; double quotes keep a phrase. At most 5 terms.

Example:
timeout "connection reset"
attrarray

Repeatable attribute filter, key=value or a bare key. Resource attributes are resource.<key>. At most 5.

Example:
["http.status_code=500"]
distinct_idstring

Records linked to this distinct_id (from mythic.distinct_id, distinct_id, user.id or enduser.id).

distinct_idsstring

Records linked to ANY of these distinct_ids: a comma list, or the param repeated. At most 50 values of at most 256 bytes. A value cannot contain a comma. To read one person's logs across all their identities, use GET /client/v1/data/people/{personId}/logs, which fills this in from the identity graph.

Example:
user_42,jane@example.com
received_beforestring

Only records Mythic accepted strictly before this instant (ISO 8601 or epoch milliseconds). Pins a read so that records arriving late cannot change it.

Example:
2026-10-18T11:00:00Z
trace_idstring

32 hex characters. A filter only.

pattern_idstring
Example:
v1:892ea82429dfa0bf975caecb03a9e5ea
orderstring
Allowed values:descasc
cursorstring

next_cursor from the previous page.

Responses

successboolean
dataobject