API referencePagination

Pagination contract

List routes do not share one pagination style. There are three, and the OpenAPI document says which one each route uses.

Keyset cursor

GET /facts and GET /timeline page with an opaque cursor.

GET /facts?limit=50&cursor=<nextCursor from the previous page>
{
  "items": [],
  "nextCursor": "b3BhcXVlLWN1cnNvcg",
  "total": 1234
}
  • limit defaults to 50 and goes up to 500 on /facts. On /timeline it defaults to 100, with the same maximum.
  • nextCursor is opaque. Store it and pass it back as cursor unchanged. It is null on the last page.
  • total (on /facts) is the count for the filter set, without the cursor.
  • /timeline returns { "events": [], "nextCursor": "..." }. Its cursor carries the window start, so since is only read on the first page.
  • A cursor the server cannot read returns 400.

Offset and limit

/tasks, /events, /reasoning, /strategies, /workflows, /skills, /hyperedges, /governance/worth, /composition/rules and /composition/inferences take offset and limit:

GET /tasks?offset=50&limit=50
{
  "items": [],
  "total": 132,
  "offset": 50,
  "limit": 50,
  "hasMore": true
}

limit goes up to 200. The default is 50, except on /events and /reasoning, where it is 25.

Limit only

/decisions, /entities, /episodes, /relations, /review, /citations and /reminders take a limit and return a single page. There is no cursor and no offset. Narrow the result with the route’s filters.

Time travel

GET /facts accepts asOf (see Bitemporal model). An asOf in the future returns 400.

Export

To move a whole workspace, use GET /export/jsonl. It returns gzip JSONL: a versioned header line, then one record per line with a _type field.