v1 list endpoint returns a bounded page of results and an opaque cursor
that points at the next page. There is no page number: you follow nextCursor
until it is null.
Request parameters
All list endpoints accept the same two query parameters.Self-hosted deployments use the same parameters behind their own origin and
the
/api/public-api prefix, for example
https://tembo.example.com/api/public-api/v1/sessions?limit=25.Response shape
Paginated responses always wrap results initems and pair them with
nextCursor. nextCursor is null on the last page.
items and nextCursor envelope does not.
Treat the cursor as opaque. Its format differs per endpoint — some endpoints
return the ID of the last item, /v1/sessions returns a composite sort key —
and it can change without notice. Pass the value back unmodified.
Walk every page
Stop whennextCursor is null, not when a page looks short. Some endpoints
bound how much data they scan per request and can return a partial page while
more results remain.
sortBy returns wrong results or a
400.
Total counts
Counting rows is extra work, so totals are opt-in.GET /v1/sessions,
GET /v1/pull-requests, and GET /v1/integrations accept includeTotal=true
and then add totalCount to the response. Other list endpoints do not return a
total.
totalCount reflects everything matching your filters, not just the current
page. On /v1/sessions, includeTotal=true is rejected with a 400 when you
also pass state=active.
Errors
Invalid pagination input returns400 with an error message.
limitoutside1–100, or a non-integer value such as1.5,1e2, or0.- A cursor that does not match the endpoint’s cursor format.
- Unknown query parameters. List endpoints reject any parameter they do not
define, so a stray
page=2fails the whole request.
Constraints and pitfalls
- No
pageparameter. Page numbers only exist on the deprecated/session/listand/session/searchendpoints. Migrating tov1means replacingpagewith thenextCursorloop above. - Short pages are not the end of the list. Always check
nextCursor. - Cursors are not bookmarks. They are tied to the exact query that produced them, so store the filters alongside a cursor if you resume a walk later.
- Pages count against rate limits. Each page is one request, so prefer
limit=100for bulk reads. See Overview for the current limits.