Pagination
All collection endpoints (e.g. GET /people
) are paginated, usually returning 50 items by default. The amount can be increased through the limit
parameter, usually to 200 items.
The API response will indicate whether more records are available through a nextCursor
property in the JSON response body (using cursor-based pagination).
curl \
-H 'Authorization: Bearer <token>' \
-H 'Accept-Version: 1.0.0' \
https://api.runn.io/people
Response:
{
"values": [
{
"id": 1,
"...": null
},
{
"id": 2,
"...": null
}
],
"nextCursor": "string"
}
In order to get more results, you need to pass through the nextCursor
from the response as the cursor
parameter in your next request.
curl \
-H 'Authorization: Bearer <token>' \
-H 'Accept-Version: 1.0.0' \
https://api.runn.io/people/?cursor={nextCursor}
Response:
{
"values": [
{
"id": 3,
"...": null
},
{
"id": 4,
"...": null
}
],
"nextCursor": null
}
When no further items are available, the nextCursor
value will be null
.
Updated 3 months ago