Pagination
Every list operation answers with the same envelope:
{
"object": "list",
"data": [{ "object": "session", "id": "9c1e…" }],
"has_more": true,
"next_cursor": "…"
}
limitsets how many items one page holds. Each operation has its own default and maximum; the API reference gives them.- While
has_moreistrue, passnext_cursorback ascursorto get the next page. On the last pagehas_moreisfalseandnext_cursorisnull. - 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.