Pagination

API methods that return a large number of items, will return them inside a paginated array. Onehub utilizes offset-based pagination. Some methods will respond to an offset parameter. To retrieve a complete set of paginated results, you perform multiple requests while increasing the offset. This can be passed in the body of the request or by appending ?offset= to the endpoint.

get
Pagination Example

https://ws-api.onehub.com/:endpoint?offset=1
Request
Response
Path Parameters
:endpoint
required
string
The endpoint for the method you are hitting.
Query Parameters
offset
optional
integer
The number of items you want to move past in the response. Typically, this will be specified as a multiplier of the per_page amount.
Body Parameters
offset
optional
integer
The number of items you want to move past in the response. Typically, this will be specified as a multiplier of the per_page amount.
200: OK
{
"total_entries": 42,
"current_page": 2,
"total_pages": 2,
"per_page": 30,
"items": [
...
]
}