Skip to main content

Pagination

Every list operation answers with the same envelope:

{
"object": "list",
"data": [{ "object": "session", "id": "9c1e…" }],
"has_more": true,
"next_cursor": "…"
}
  • limit sets how many items one page holds. Each operation has its own default and maximum; the API reference gives them.
  • While has_more is true, pass next_cursor back as cursor to get the next page. On the last page has_more is false and next_cursor is null.
  • A cursor is opaque: pass it back as it is, never build or change one. A cursor that was not returned by the API is refused with 422 validation_failed.
curl -s "$NEWEYES_API_BASE/v1/sessions?limit=20&cursor=$NEXT_CURSOR" \
-H "Authorization: Bearer $NEWEYES_USER_TOKEN"

Each list has a fixed order — sessions and generations newest first, end users oldest first, a session's messages in conversation order — and a cursor keeps its place in it as new items are added.