Pagination
All top-level API resources have support for bulk fetches through “list“ API methods. For example, you can list tanks, devices and customers. These list API methods share a common structure and accept a minimum, the following two parameters: page and size.
Parameters
page optional, default is 1
Specifies which page of result to retrieve.
size optional, default is 10
This specifies a limit on the number of objects to return, ranging between 1 and 100.
List Response Format
object string, value is “list“
A string that provides a description of the object type that returns.
data array
An array containing the actual response elements, paginated by any request parameters.
page integer
Represents the current page number in the paginated results.
size integer
Represents the number of items returned per page.
total_pages integer
Represents the total number of pages available for the current query.
total_items integer
Represents the total number of items available for the current query.
Response
{
"object": "list",
"data": [
{ ... },
],
"page": 1,
"size": 10,
"total_pages": 100,
"total_items": 1000
}
}