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

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

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

List live relation edges, newest first. Paginated: follow `page.nextCursor`.

## Path parameters

- `context_id` string, required

## Query parameters

- `src` string
- `dst` string
- `label` string
- `limit` integer
- `cursor` string
- `count` boolean

## Response `200`

- RelationListResponseJson
  - `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`.
  - `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 — Navigable ref of the object entity, `entity:<type>/<name>`.
    - `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 — Navigable ref of the subject entity, `entity:<type>/<name>` — resolvable via `GET /entities/{type}/{name}` or the `inspect` ref grammar.
    - `validFrom` string, nullable
    - `validUntil` string, nullable

## Other responses

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

## Changes

- **2026-08-24** `9f1598713067` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/surrealdb/apis/spectron/changes/api/v1/:context_id/relations/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)
