---
title: "GET /api/v1/{context_id}/traces"
method: GET
path: "/api/v1/{context_id}/traces"
---

# GET /api/v1/{context_id}/traces

`GET /api/v1/{context_id}/traces`

List recent query traces

## Path parameters

- `context_id` string, required

## Query parameters

- `limit` integer

## Response `200`

- TraceListResponseJson
  - `traces` TraceRecordJson[], required
    - `cached` boolean, required
    - `createdAt` string, required
    - `id` string, required
    - `latencyMs` integer, required
    - `parent` ResponseTraceSummaryJson — Summary of the response trace that owns a decision trace.
      - `cached` boolean, required
      - `createdAt` string, required
      - `id` string, required
      - `latencyMs` integer, required
      - `responseText` string, required
      - `reusedFrom` string, nullable
      - `sessionId` string, nullable
      - `source` string, required
      - `userMessage` string, required
    - `queryText` string, required
    - `resolutionTier` string, required
    - `retrievals` RetrievalTraceSummaryJson[], nullable — The retrieval traces that fed this decision, with their returned targets. Populated on single-trace reads only; absent from `/traces` lists.
      - `createdAt` string, required
      - `id` string, required
      - `latencyMs` integer, required
      - `mode` string, required
      - `retrievedIds` string[], required
      - `returned` ReturnedRefJson[], required — The targets this retrieval returned, ranked. Empty for legacy traces that persisted only the `retrievedIds` array.
        - `id` string, required — The target row id (`table:key` form).
        - `label` string, nullable — A short human label for the target.
        - `rank` integer, nullable
        - `ref` string, nullable — An inspect ref for the target (`attribute:<type>/<name>/<key>`, `entity:<type>/<name>`, `passage:<document_id>/<index>`), when the target kind has one.
        - `score` number, double, nullable
        - `table` string, required — The target's table (`attribute` / `entity` / `chunk` / `memory_chunk`).
      - `scores` number[], required
      - `tierEntered` integer, required
      - `tierReason` string, required
    - `tierReason` string, required

## Other responses

- `401` — Unauthorized
- `422` — Invalid context id

---

[API](https://skmtc.net/surrealdb/apis/spectron.md) · [All operations](https://skmtc.net/surrealdb/apis/spectron/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/surrealdb/spectron/versions/52b41ab517b6/schema)
