API reference

Pagination

How list endpoints page their results, by page number or by cursor.

List endpoints return one page at a time. Most page by number; a few workspace-wide feeds page by cursor. Each endpoint page says which it uses and its page size.

Page number#

Send page (starting at 1) and, where the endpoint allows it, limit. The response carries the list and these fields next to it:

FieldDescription
total_pagesNumber of pages at the current page size.
current_pageThe page returned.
next_pageThe next page number, or null on the last page.
prev_pageThe previous page number, or null on the first page.
per_pageItems per page.
cURLbash
curl "https://api.scute.io/v1/$SCUTE_APP_ID/users?page=2&limit=50" \  -H "Authorization: Bearer $SCUTE_APP_SECRET"
Response 200json
{  "total_pages": 4,  "current_page": 2,  "next_page": 3,  "prev_page": 1,  "per_page": 50,  "users": []}

Read pages until next_page is null.

EndpointDefault sizeSize parameter
GET /v1/:app_id/users10limit
GET /v1/apps/:app_id/events50, at most 100limit or perpage. The response also has count, the total number of matching events.

Page number with a meta object#

GET /v1/apps/:app_id/webhooks/:id/deliveries takes page, returns 25 deliveries per page, and puts the counts in meta:

Response 200json
{  "deliveries": [],  "meta": {    "total_count": 112,    "total_pages": 5,    "current_page": 1  }}

Cursor#

Cursor feeds return the newest items first and a cursor for the next, older page. Send the cursor back on the next call; the last page has no cursor.

GET /v1/workspaces/:workspace_id/events takes limit (50 by default, at most 100) and before, set to the next value of the previous page:

Response 200json
{  "events": [],  "next": "0193fa10-2b3c-7d4e-8f50-6a7b8c9d0e1f"}

Other cursor feeds name their cursor parameter on their own page.