Pagination
We are using a Cursor-based pagination, a method of pagination that uses a unique identifier (cursor) to keep track of the current position in the dataset.
Here's a general overview of how it works:
Usage: The Retrieve Batch API takes in parameters such as
limit
,search
,before
, andafter
to control the pagination.Cursor: The
before
andafter
parameters are used to specify the cursor for fetching the previous or next page of results. The cursor typically represents the position of a specific record in the dataset.Sorting: The data is sorted by the
createdAt
followed byid
Result: The response returns the paginated results along with cursors for the next and previous pages, allowing for easy navigation through the dataset.
For example:
hasNextPage
tells you if there's a next page in the querieddata
objectTo go to the next page, you can use the
after
Query Parameter with the current page'sendCursor
value.
hasPreviousPage
tells you if there's a previous page in the querieddata
objectTo go to the previous page, you can use the
before
Query Parameter with the current page'sstartCursor
value.
List of Apis that has pagination
Last updated