Links

Pagination

Some list resources in the API are paginated by default to allow clients to traverse data over multiple requests. Their responses may contain a Pagesobject that contains pagination links a client can use to traverse the data without having to construct a query. The link relations for thePagesfield are as follows
Parameter
Description
Next
A link to the next page of results. A response that does not contain link does not have further data to fetch.
Prev
A link to the previous page of results.
First
A link to the first page of results.
Last
A link to the last page of results.
Pagination page out of bounds: return 200 status code - with empty array as data. In addition, you should provide hyperlinks to point clients to "correct" pages, for example the first page or the last "valid" page.
{
"Pages": {
"First": "href": "http://example.org/api/user",
"Prev": "href": "http://example.org/api/user?page=2",
"Next": "href": "http://example.org/api/user?page=4",
"Last": "href": "http://example.org/api/user?page=133"
},
"PerPage": 50,
"Page": 1,
"Count": 100,
"Results": [
{
"Param1": "test1",
"Param2": "test2",
},
{
"Param1": "test1",
"Param2": "test2",
}
]
}