Overview
Pagination is a method of splitting large sets of API results into smaller chunks (pages), retrieved sequentially using parameters like limit and a cursor to navigate through them.
List endpoints are always forward paginated (e.g., GET /users).
Limit
limit controls how many results are returned in a single page.
- Default page size is 50.
- Most endpoints allow a maximum of 100.
- If the requested value exceeds the endpoint maximum, the API returns a
400error.
'https://rest.ripplingapis.com/users?limit=25' \
-H 'accept: application/json' \
-H 'Authorization: Bearer UOCgmwb.....'
Use smaller limits when testing or debugging to reduce payload size.
Cursor
cursor is used to fetch the next page of results.
- Start with a request without cursor.
- Read the
next_linkvalue from the response. - Use
next_linkas-is to request the next page. - Continue until
next_linkisnull.
Example flow using GET List leave requests:
- Initial request:
GET https://rest.ripplingapis.com/leave-requests?filter=...&order_by=created_at desc - Response includes:
"next_link": "https://rest.ripplingapis.com/leave-requests?cursor=..." - Request the URL in
next_linkto fetch the next page.
'https://rest.ripplingapis.com/users?cursor=cD01ODNmZDg5MDA1ZWQyMzNmOGYxZGY0Zjk%3D&limit=25' \
-H 'accept: application/json' \
-H 'Authorization: Bearer UOCgmwb.....'