API requests that return collections of records are always paginated.
The default page size of 20 records can be adjusted by setting the
The maximum number of records per page is 100.
?page= parameter can be used to browse through the pages.
$ curl https://api.itrp.com/v1/requests?page=3&per_page=25
Pagination information will be returned in the response header.
X-Pagination-Per-Page: 25 X-Pagination-Current-Page: 3 X-Pagination-Total-Pages: 10 X-Pagination-Total-Entries: 243
Apart from this, the pagination info is included in the Link header:
Link: <https://api.itrp.com/v1/requests?page=1&per_page=25>; rel="first", <https://api.itrp.com/v1/requests?page=2&per_page=25>; rel="prev", <https://api.itrp.com/v1/requests?page=4&per_page=25>; rel="next", <https://api.itrp.com/v1/requests?page=10&per_page=25>; rel="last"
rel values are:
- Shows the URL of the first page of results.
- Shows the URL of the immediate previous page of results.
- Shows the URL of the immediate next page of results.
- Shows the URL of the last page of results.
The pagination feature limits the maximum number of records that can be retrieved as a single collection of pages to 100.000 records. When more than 100.000 records are found by an API request, the following is included in the HTTP Response Header: