Pagination Guide
Many endpoints in Civillo support pagination, allowing you to retrieve results in smaller, manageable chunks.
Query Parameters
Section titled “Query Parameters”Use the following query parameters to control pagination:
| Parameter | Type | Description |
|---|---|---|
pageSize |
Integer | The number of items to return per page. Default is 50. |
pageNumber |
Integer | The page number to retrieve. Starts from 1. |
Example
Section titled “Example”To retrieve the first 10 items:
GET /api/items?pageSize=10&pageNumber=1To retrieve the next 10 items (items 11-20):
GET /api/items?pageSize=10&pageNumber=2Example Response
Section titled “Example Response”{ "pageNumber": 1, "pageSize": 50, "totalCount": 100, "totalPages": 2, "items": [ { "id": "1", "name": "Example Item 1" }, { "id": "2", "name": "Example Item 2" } // ... more items ... ]}- If
pageSizeis not specified, the API defaults to a standard size (e.g., 50 items per page). - If
pageNumberis not specified, it defaults to the first page (pageNumber=1). totalCountrepresents the total number of items available across all pages.totalPagesis calculated based ontotalCountandpageSize.
- Use
pageSizeandpageNumbertogether to paginate through large datasets. - Always check the response for pagination metadata (
totalCount,totalPages) to help guide navigation. - To fetch all results, loop through pages incrementally until
pageNumberexceedstotalPages.