Paginate and sync records
Walk list endpoints with cursors and keep another system in sync.
Walk a list
List endpoints return one page at a time:
{
"data": [{ "id": "…" }, { "id": "…" }],
"next_cursor": "WyI1ZjBjMWE1Mi04ZDNlIl0"
}limit: Records per page, from 1 to 200. The default is 50.cursor: Thenext_cursorfrom the previous page. Leave it out for the first page.
Repeat the request with each next_cursor until it is null. Keep the other query parameters the same on every page. Treat cursors as opaque: their format can change.
Most lists return records in a stable order, so a walk returns each record once, even while records are added. The attempts and reports lists differ, as the next sections explain.
Sync attempts
GET /attempts returns the oldest updates first and accepts updated_since. To copy attempts into another system:
- On the first run, leave out
updated_sinceand walk every page. - Store the latest
updated_atyou received. - On the next run, send that value as
updated_sinceand walk every page again.
Attempts at exactly the updated_since instant come back again, so de-duplicate by id. Attempts submitted while you walk the pages appear on a later page of the same run.
Page through reports
GET /reports/users and GET /reports/materials compute their rows when you request each page. Rows can shift between pages if records change during the walk. Keep the same limit on every page.