Pagination
Paginated v4 endpoints
All list endpoints with the /v4/ prefix are paginated using cursor pagination.
caution
Versions of supported endpoints not prefixed with /v4/ are limited to 100 records.
Fetch options (query params)
inteface PaginationFetchOptions <T> {
limit?: number // Default 10, max. 250
before?: string // Use endCursor to get the next page
after?: string // Use startCursor to get the previous page
}
Example requests
Get next page
`GET /v4/sensors?limit=10&after=${PREVIOUS_REQUEST.pageInfo.endCursor}`
Get previous page
`GET /v4/sensors?limit=10&before=${PREVIOUS_REQUEST.pageInfo.startCursor}`
Response
inteface PaginationResponse <T> {
edges: Array<{
node: T,
cursor: string
}>
pageInfo: {
hasNextPage: boolean
hasPreviousPage: boolean
startCursor: string // Cursor of the first edge
endCursor: string // Cursor of the last edge
}
totalCount: number
}
Supported endpoints
GET /v4/sensors