Overview
List endpoints support two pagination modes. Which one you get is decided by a single parameter: sendcursor and you are in cursor mode, omit it and you
stay in legacy page/limit mode.
Cursor pagination is the recommended mode for anything that walks a full result
set. It is stable under concurrent writes, and its cost does not grow as you
move deeper into the results.
Legacy
page/limit pagination is still fully supported and unchanged. No
existing integration needs to be updated.Endpoints that support cursor pagination
Cursor pagination
Examples use the default base URL,
https://api.orion.file.ai/prod/v1. If
your workspace is on an instance-specific host, swap the hostname and change
nothing else — see Switching between
instances.1
Request the first page
Send
cursor with an empty value — the parameter’s presence is what
selects cursor mode.2
Read the pagination block
The response is wrapped in
data plus a pagination object.3
Follow nextCursor until hasMore is false
Pass the previous
nextCursor value back as cursor. When hasMore is
false, nextCursor is null and you have reached the end.Parameters
Pagination object
Legacy page/limit pagination
Omitcursor entirely and the response keeps its original shape: a named array
(see the table above), plus count and currentPage.
Choosing a mode
Use cursor pagination
Walking a full result set, syncing to a warehouse, or paging through data
that is being written to concurrently.
Use page/limit
You need a total
count, jump-to-page behaviour, or you have an existing
integration that already works.Legacy mode gives you a total
count; cursor mode does not — computing an
exact total is what makes deep offset paging expensive. Use hasMore to drive
your loop instead of a total.