Session ReplaysList a session's logs

List a session's logs

Server log records (sent over OTLP to POST /i/v1/logs) whose session_id is this session: what your backend logged for the visitor's requests, when it forwards the browser's Mythic session id (see Link logs to people and sessions). Works for any session id, recorded or not. Oldest first by default, keyset-paged with next_cursor.

The search window is the session id's embedded time minus 24 hours to plus 48 hours (meta.from/meta.to). The id is minted from the visitor's clock, so this is where to look, not the session's start.

Needs the Logs feature in the plan (402 feature_not_in_plan) and, for a scoped mcp_ key, BOTH replays:read and logs:read. HIPAA locations are refused (403 hipaa_restricted); a location whose configuration cannot be read answers 503 privacy_unknown, retryable. Shares the logs read budget (120 requests per minute per location) with /client/v1/logs.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/data/replays/example_string/logs?location_id=example_string&levels=example_string&services=example_string&q=example_string&attr=%5B%22example_string%22%5D&trace_id=example_string&limit=200&order=asc&cursor=example_string&body_max_bytes=2048" \
  -H "Content-Type: application/json" \
  -H "X-Location-Id: example_string" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "session_id": "example_string",
    "records": [
      {
        "uuid": "example_string",
        "timestamp": "2024-12-25T10:00:00Z",
        "received_at": "2024-12-25T10:00:00Z",
        "level": "trace",
        "service": "example_string",
        "body": "example_string",
        "body_truncated": true,
        "attributes": {},
        "resource_attributes": {},
        "trace_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
/replays/{sessionId}/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_) as a bearer token. Format: Bearer ak_... or Bearer sk_.... Scoped keys (mcp_) are accepted too and need replays:read; the session logs route, and include=logs on the timeline, also need logs:read. See Using an mcp_ key over HTTP.

Agency key (ak_) or location secret key (sk_) as a bearer token. Format: Bearer ak_... or Bearer sk_.... Scoped keys (mcp_) are accepted too and need replays:read; the session logs route, and include=logs on the timeline, also need logs:read. See Using an mcp_ key over HTTP.
path
sessionIdstring
Required

The session id (UUIDv7).

query
location_idstring

Alternative to the X-Location-Id header for agency (ak_) keys. Ignored for secret (sk_) keys.

query
levelsstring

Comma list of levels, e.g. warn,error,fatal.

query
servicesstring

Comma list of service names, at most 20.

query
qstring

Case-insensitive body search, at most 5 terms (all must match).

query
attrarray

Repeatable attribute filter, key=value or a bare key. At most 5.

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

next_cursor from the previous page.

query
body_max_bytesinteger
Min: 64 • Max: 32768
header
X-Location-Idstring

Location to scope the request to. Required for agency (ak_) keys. Ignored for secret (sk_) keys, which resolve their own location.

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_) as a bearer token. Format: Bearer ak_... or Bearer sk_.... Scoped keys (mcp_) are accepted too and need replays:read; the session logs route, and include=logs on the timeline, also need logs:read. See Using an mcp_ key over HTTP.

Path Parameters

sessionIdstring
Required

The session id (UUIDv7).

Query Parameters

location_idstring

Alternative to the X-Location-Id header for agency (ak_) keys. Ignored for secret (sk_) keys.

levelsstring

Comma list of levels, e.g. warn,error,fatal.

servicesstring

Comma list of service names, at most 20.

qstring

Case-insensitive body search, at most 5 terms (all must match).

attrarray

Repeatable attribute filter, key=value or a bare key. At most 5.

orderstring
Allowed values:ascdesc
cursorstring

next_cursor from the previous page.

Headers

X-Location-Idstring

Location to scope the request to. Required for agency (ak_) keys. Ignored for secret (sk_) keys, which resolve their own location.

Responses

successboolean
dataobject