Pagination
One Record API implements pagination to efficiently manage and navigate through large datasets, ensuring a smooth and scalable experience. Pagination allows applications to fetch subsets of records, making data retrieval more manageable and reducing server load. This document outlines the use of page[cursor]
and page[limit]
parameters for pagination in the API requests.
Understanding Pagination Parameters
How to Use Pagination
First Request: the first request is sent without specifying a
page[cursor]
parameter. Thepage[limit]
can be set to retrieve a number of records per page, up to a maximum of 200.Subsequent Requests: the
next
cursor received in the previous responsemetadata
is used to make the next request. It is included in thepage[cursor]
parameter to fetch the next set of data.
Example Request without Cursor
This request fetches the first 100 records based on page[limit]
parameter. The response will include a cursor in the metadata.next
value for fetching the next 100 records.
Example Request with Cursor
Following the initial request, the subsequent 100 records can be retrieved by utilizing both the page[limit]
parameter and the page[cursor]
parameter with the value of metadata.next
obtained from the previous response. Once the last page is reached, the value of next
in metadata
will be null
.
Last updated