Pagination
How pagination works on the API
Requests that return multiple items will be paginated to 100 items by default.
All paginated requests will return the total number of entries that exist as total_entries in the response.
Pagination linksCopied!
The pagination info is included in the links object. It is recommended to follow these links instead of constructing your own URLs
{
"total_entries": 400,
"data": [
{
"id": 1532618,
...
},
{
"id": 1526806,
...
},
...
],
"links": {
"previous": null,
"self": "https://apitest.neptune.practicehub.io/api/patients?page=1",
"next": "https://apitest.neptune.practicehub.io/api/patients?page=2"
}
}
The possible pagination links are:
-
next Shows the URL of the immediate next page of results.
-
self Shows the URL of the current page of results.
-
previous Shows the URL of the immediate previous page of results.
The pagination links will only be included if they are relevant (eg. there will be no next link if you are on the last page).
Page sizeCopied!
The default page size (number of records per page) is 100.
If you like, you can add a page_size query parameter to core API GET requests to override the default page size, although the maximum allowed page size is still 100.
The following request will return patient data with 10 records per page:
https://apitest.neptune.practicehub.io/api/patients?page_size=10