Pagination
In this guide, we will look at how to work with paginated responses when querying the Pointhub API. By default, all responses limit results to ten. However, you can go as high as 100 by adding a limit
parameter to your requests.
Example
This endpoint allows you to retrieve a paginated list of all your roles. By default, a maximum of ten roles are shown per page.
Optional attributes
- Name
page
- Type
- integer
- Description
The page number of roles returned.
- Name
page_size
- Type
- integer
- Description
The page size number of roles returned.
Request
GET
/v1/rolesconst response = axios.get('/v1/roles', {
page:1,
page_size: 10
})
Response
{
"roles": [
{ ... },
{ ... },
],
"pagination": {
"page": 1,
"page_size": 10,
"page_count": 1,
"total_document": 2
}
}