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

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

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

Lists Layer 0 knowledge documents

## Path parameters

- `context_id` string, required

## Query parameters

- `status` string
- `mimeType` string
- `limit` integer
- `cursor` string
- `count` boolean
- `page` integer
- `pageSize` integer

## Response `200`

Documents

- DocumentPageJson
  - `documents` DocumentJson[], required
    - `contentHash` string, required
    - `createdAt` string, date-time, required
    - `error` string, nullable
    - `id` string, required
    - `mimeType` string, required
    - `observedAt` string, date-time, nullable — Known/observed time of the content (explicit or front-matter-detected at upload); facts extracted from the document carry it as their known-time.
    - `processingCompletedAt` string, date-time, nullable
    - `processingStartedAt` string, date-time, nullable
    - `sizeBytes` integer, required
    - `source` string, required
    - `status` 'queued' | 'extracting' | 'chunking' | 'embedding' | 'keywording' | 'extracting_nodes' | 'ready' | 'failed', required — Lifecycle state of a [`Document`] in the ingestion pipeline. Matches the SurrealQL `ASSERT $value IN [...]` on `document.status` in `V1__schema.surql`. The `Keywording` state is reserved for Phase C; in Phase A the pipeline transitions straight from `Embedding` to `Ready`.
    - `title` string, required
    - `updatedAt` string, date-time, required
    - `version` integer, required
  - `page` PageMeta, required — The pagination block returned beside a page's rows.
    - `hasMore` boolean, required — Whether a further page exists.
    - `nextCursor` string, nullable — Token for the next page; absent on the last page.
    - `totalSize` integer, nullable — Total rows matching the filters, present only when the request asked for it with `count=true`.

## Other responses

- `401` — Unauthorized
- `422` — Invalid context id
- `500` — Unexpected error
- `503` — Server too busy: the per-pod in-flight request cap was exceeded. Retry per the `Retry-After` header.

## Changes

- **2026-08-24** `9f1598713067` — 3 breaking, 8 info
  - the `page` response's property type/format changed from `integer`/`int32` to `object`/`` for status `200`
  - removed the required property `pageSize` from the response with the `200` status
  - removed the required property `total` from the response with the `200` status
  - added the new optional `query` request parameter `count`
  - …7 more
- **2026-06-16** `52b41ab517b6` — 5 warning, 2 info
  - deleted the `query` request parameter `mime_type`
  - deleted the `query` request parameter `page_size`
  - removed the optional property `documents/items/chunkCount` from the response with the `200` status
  - removed the optional property `documents/items/keywordCount` from the response with the `200` status
  - …3 more
- **2026-06-08** `741d58b9ef89` — 2 warning, 5 info
  - deleted the `query` request parameter `mimeType`
  - deleted the `query` request parameter `pageSize`
  - added the new optional `query` request parameter `mime_type`
  - added the new optional `query` request parameter `page_size`
  - …3 more

[Change history](https://skmtc.dev/surrealdb/apis/spectron/changes/api/v1/:context_id/documents/get.md)

---

[API](https://skmtc.dev/surrealdb/apis/spectron.md) · [All operations](https://skmtc.dev/surrealdb/apis/spectron/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/surrealdb/spectron/revisions/9f1598713067/schema)
