Pagination allows you to retrieve data in manageable chunks, controlling the number of records you receive per request.
All endpoints whose responses are a list are displayed as paginated results by default.
Query Parameters
Parameter | Type | Description |
---|---|---|
page | integer | Specifies the page number you want to view. |
perPage | integer | Determines the number of records per page (default 10) |
orderBy | string | Specifies the order in which you want your records displayed. Options include 'asc' (ascending) and 'desc' (descending). |
Response Headers
When making requests to paginated endpoints, we send the following response headers:
Header | Description |
---|---|
page | Indicates the current active page of results. |
totalPage | Specifies the total number of pages available in the paginated result set. |
Note: We make the best effort to respect the specified perPage value, but occasionally, you may receive fewer or more records than requested.
Example
Let's say you want to retrieve records from a Bitpowr endpoint:
GET /API/endpoint?perPage=2page=1&orderBy=asc
This request fetches the first page of results, with two records per page, ordered in ascending order.