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

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

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

Resolve an inspect ref (entity, attribute, relation, passage, or trace) to a normalised view. Ref grammar: `entity:<type>/<name>`, `attribute:<type>/<name>/<key>`, `relation:<src_type>/<src_name>-[<label>]-><dst_type>/<dst_name>`, `passage:<document_id>/<index>`, `trace:<id>`.

## Path parameters

- `context_id` string, required

## Query parameters

- `ref` string, required
- `asOf` string
- `atInstant` string
- `validFrom` string
- `validUntil` string

## Response `200`

- union
  - object
    - `attributes` AttributeDetailJson[], required
      - `createdAt` string, required
      - `entity` string, required
      - `id` string, required
      - `importance` number, double, required
      - `key` string, required
      - `memoryCategory` 'identity' | 'knowledge' | 'context', required — Memory category classification applied during extraction.
      - `source` SourceRefJson — Compact provenance ref carried on attribute/relation detail JSON.
        - `kind` string, required — Source kind: `turn`, `document`, `upsert`, `reflect`, `elaboration`, or `consolidation`.
        - `ref` string, nullable — Compact navigable ref — `turn:<id>`, `doc:<id>`, or `trace:<id>` — when the source carries one. Document refs carry no passage index (only the passage record id is stored).
        - `sessionId` string, nullable — The session the source turn belongs to (`turn` kind only).
      - `supersededBy` string, nullable
      - `supersedes` string, nullable
      - `validFrom` string, nullable
      - `validUntil` string, nullable
      - `value` string, required
    - `entity` EntityDetailJson, required
      - `createdAt` string, required
      - `entityType` string, required
      - `id` string, required
      - `importance` number, double, required
      - `memoryCategory` 'identity' | 'knowledge' | 'context', required — Memory category classification applied during extraction.
      - `name` string, required
      - `updatedAt` string, required
    - `kind` 'entity', required
    - `relations` RelationDetailJson[], required
      - `createdAt` string, required
      - `id` string, required
      - `label` string, required
      - `memoryCategory` 'identity' | 'knowledge' | 'context', required — Memory category classification applied during extraction.
      - `object` string, required
      - `source` SourceRefJson — Compact provenance ref carried on attribute/relation detail JSON.
        - `kind` string, required — Source kind: `turn`, `document`, `upsert`, `reflect`, `elaboration`, or `consolidation`.
        - `ref` string, nullable — Compact navigable ref — `turn:<id>`, `doc:<id>`, or `trace:<id>` — when the source carries one. Document refs carry no passage index (only the passage record id is stored).
        - `sessionId` string, nullable — The session the source turn belongs to (`turn` kind only).
      - `subject` string, required
      - `validFrom` string, nullable
      - `validUntil` string, nullable
  - object
    - `current` AttributeDetailJson
      - `createdAt` string, required
      - `entity` string, required
      - `id` string, required
      - `importance` number, double, required
      - `key` string, required
      - `memoryCategory` 'identity' | 'knowledge' | 'context', required — Memory category classification applied during extraction.
      - `source` SourceRefJson — Compact provenance ref carried on attribute/relation detail JSON.
        - `kind` string, required — Source kind: `turn`, `document`, `upsert`, `reflect`, `elaboration`, or `consolidation`.
        - `ref` string, nullable — Compact navigable ref — `turn:<id>`, `doc:<id>`, or `trace:<id>` — when the source carries one. Document refs carry no passage index (only the passage record id is stored).
        - `sessionId` string, nullable — The session the source turn belongs to (`turn` kind only).
      - `supersededBy` string, nullable
      - `supersedes` string, nullable
      - `validFrom` string, nullable
      - `validUntil` string, nullable
      - `value` string, required
    - `history` AttributeDetailJson[], required — Full supersession chain, newest-first. Includes `current` when present.
      - `createdAt` string, required
      - `entity` string, required
      - `id` string, required
      - `importance` number, double, required
      - `key` string, required
      - `memoryCategory` 'identity' | 'knowledge' | 'context', required — Memory category classification applied during extraction.
      - `source` SourceRefJson — Compact provenance ref carried on attribute/relation detail JSON.
        - `kind` string, required — Source kind: `turn`, `document`, `upsert`, `reflect`, `elaboration`, or `consolidation`.
        - `ref` string, nullable — Compact navigable ref — `turn:<id>`, `doc:<id>`, or `trace:<id>` — when the source carries one. Document refs carry no passage index (only the passage record id is stored).
        - `sessionId` string, nullable — The session the source turn belongs to (`turn` kind only).
      - `supersededBy` string, nullable
      - `supersedes` string, nullable
      - `validFrom` string, nullable
      - `validUntil` string, nullable
      - `value` string, required
    - `kind` 'attribute', required
  - object
    - `kind` 'relation', required
    - `matches` RelationDetailJson[], required — Live relations matching the `src -[label]-> dst` shape. Empty if none survive the temporal filter.
      - `createdAt` string, required
      - `id` string, required
      - `label` string, required
      - `memoryCategory` 'identity' | 'knowledge' | 'context', required — Memory category classification applied during extraction.
      - `object` string, required
      - `source` SourceRefJson — Compact provenance ref carried on attribute/relation detail JSON.
        - `kind` string, required — Source kind: `turn`, `document`, `upsert`, `reflect`, `elaboration`, or `consolidation`.
        - `ref` string, nullable — Compact navigable ref — `turn:<id>`, `doc:<id>`, or `trace:<id>` — when the source carries one. Document refs carry no passage index (only the passage record id is stored).
        - `sessionId` string, nullable — The session the source turn belongs to (`turn` kind only).
      - `subject` string, required
      - `validFrom` string, nullable
      - `validUntil` string, nullable
  - object
    - `kind` 'trace', required
    - `trace` 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

- `400` — Malformed ref
- `401` — Unauthorized
- `404` — Referent not found
- `422` — Invalid context id
- `501` — Ref kind not yet supported

---

[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/revisions/52b41ab517b6/schema)
