Help centre
العربية Back to sayvara.com

Pagination

Read long lists from the Sayvara API page by page with a cursor, without missing or repeating items.

Updated

List completed responses returns its results in pages. Each page has the items and a next cursor:

{
  "items": [ { "id": "7b1e4c2a-5f3d-4e8b-9a6c-2d1f0e3b4a5c", "completedAt": "2026-11-01T09:30:00.000Z" } ],
  "next": "WyIyMDI2LTExLTAxVDA5OjMwOjAwLjAwMDAwMFoiLCI3YjFlNGMyYS01ZjNkLTRlOGItOWE2Yy0yZDFmMGUzYjRhNWMiXQ"
}

Read every page

  1. Call the operation without cursor. Set limit from 1 to 200; the default is 50.
  2. Handle the items.
  3. If next is not null, call again with the same filters and cursor set to next.
  4. Stop when next is null.
curl "https://api.sayvara.com/v1/data/responses?limit=200&from=2026-11-01T00:00:00Z" \
  -H "Authorization: Bearer $SAYVARA_API_KEY"

curl "https://api.sayvara.com/v1/data/responses?limit=200&from=2026-11-01T00:00:00Z&cursor=WyIyMDI2LTExLTAxVDA5OjMwOjAwLjAwMDAwMFoiLCI3YjFlNGMyYS01ZjNkLTRlOGItOWE2Yy0yZDFmMGUzYjRhNWMiXQ" \
  -H "Authorization: Bearer $SAYVARA_API_KEY"

Good to know

  • Responses come oldest first, so new responses appear on the following pages.
  • Treat next as an opaque string. Pass it back exactly as you received it; do not build or change it yourself.
  • from includes responses completed at that time; to excludes them. To read in daily batches, use the same time as to of one batch and from of the next.
  • To pick up new responses on your next run, keep the last completedAt you handled and start the next run with it as from. Responses completed at exactly that time come again, so skip ids you already have.