page
and size
parameters.
Pagination Parameters
page
Parameter
Description: Specifies the page number of the results to retrieve.
Type: Integer
Minimum Value: 1
Default Value: 1
Usage:
size
Parameter
Description: Determines the number of items displayed per page.
Type: Integer
Default Value: 10
Usage:
offset
Parameter
Description: An alternative to page
, representing the number of items to skip before starting to collect the result set.
Type: Integer
Note: While available, offset is translated internally and can be complex to handle. It’s recommended to use page
and size
instead.
Usage:
Best Practices
Consistentsize
: To avoid skipping or repeating items, maintain a consistent size
across pagination requests.
Start from Page 1: Always initiate pagination from page=1 unless you have a specific reason to start elsewhere.
Avoid Changing size
Midway: Changing the size
parameter when navigating beyond the first page can lead to inconsistent data retrieval, such as skipped or duplicated items.
Prefer page
over offset
: Use the page
and size
parameters for a more straightforward and reliable pagination experience.
Examples
Retrieving the first page (default)
Retrieving a specific page with custom size
Using offset
and size
offset
is generally discouraged due to its complexity and potential for data inconsistency.
Warnings
Changing size
on subsequent pages
Issue: Adjusting the size
parameter when on page 2 or higher can cause items to be skipped or repeated.
Example:
Initial Request (items 6-10):
Avoid using offset for manual pagination:
Theoffset
parameter is intended for internal use and can complicate manual pagination efforts. Stick to page
and size
for a smoother experience.
For further assistance or questions, please contact our support team.