Pagination
Our List API endpoints (e.g. GET /projects
) return a limited number of results each request.
By default, we return between 10 and 100 results per page, depending on the Source System. You can change the number of results returned to any number between 1 and 1000 with the ?per_page
query parameter, e.g. GET /jobs?page=1&per_page=20
.
At the end of a response object for a List API endpoint, a meta
field including pagination information is returned. If you want to get all results, you should
continue paginating (by increasing the value of ?page=
) until has_more_results
becomes false
.
Certain Source Systems may return a value of null
for has_more_results
.
Please make sure to continue paginating until you receive a response with has_more_results
set to false
.
{
"data": [
{
"id": "15baed1e-7eff-52f4-8fef-3851b4a509d6",
"source_id": "1120",
"name": "Job 1120",
"status": "Completed",
"description": "Call customer before arrival.",
},
{
"id": "1e9df19c-161f-5b18-96ee-21a19c14ff28",
"source_id": "2172",
"name": "Job 2172",
"status": "Completed",
"description": "Call customer before arrival.",
}
],
"meta": {
"current_page": 1,
"has_more_results": false // true, false, or null (if unknown). Paginate until you receive `false`.
}
}