Some endpoints use keyset pagination to return data in chunks, rather than all at once.
X-Has-Next-Page is true if more data is available; otherwise, it’s false.
X-Per-Page indicates the number of items returned in each response.
Page sizes are currently fixed at 5 and cannot be configured.
Paginated endpoints will also return an extra key in the JSON body called pagination
. For example, a response might look like this:
X-Has-Next-Page: true
X-Per-Page: 5
{
"data": {...},
"pagination": {
"pageSize": 5,
"next": "00000000-0000-0000-000000000005"
}
}
To fetch the next page, use the next query parameter with the ID returned in the pagination.nex
t field.
https://app.visibuild.com.au/api/v2/projects/visi-counts?next=00000000-0000-0000-000000000005
If there are no more pages, the next field will be null and X-Has-Next-Page will be false:
X-Has-Next-Page: false
X-Per-Page: 5
{
"data": {...},
"pagination": {
"pageSize": 5,
"next": null
}
}