Pagination
All top-level resources in the API are paginated. In each paginated response, information related to the previous and next page of the result set is included.
A ?limit argument can be added to a request, in order to change the amount of results on each page.
To retrieve the next page of results, use the query param ?page to specify which page.
Example:
curlcurl \
-H 'Timekit-App: back-to-the-future' \
-u doc.brown@timekit.io:nvHfRSlhvsnlg4rS7Wt28Ty47qdgegwSu3YK7hPW \
https://api.timekit.io/v2/bookings?limit=3&page=2
Will return:
json{
"total": 5,
"per_page": "3",
"current_page": 2,
"last_page": 2,
"next_page_url": null,
"prev_page_url": "https://api.timekit.io/v2/bookings?limit=3&page=1",
"from": 4,
"to": 5,
"data": [
{
"id": "c125d175-132a-499e-8beb-87f31378d5ab",
"state": "initialized",
"graph": "instant",
"completed": false,
"created_at": "2016-09-15T11:23:09+0300",
"updated_at": "2016-09-15T11:23:09+0300"
},
{
"id": "06502f41-78b3-4d03-9b6d-4c8b84e360ff",
"state": "initialized",
"graph": "instant",
"completed": false,
"created_at": "2016-09-15T11:23:09+0300",
"updated_at": "2016-09-15T11:23:09+0300"
}
]
}