Guide
Pagination
In this guide, we will look at how to work with paginated responses when querying the Status200 API. By default, all responses limit results to ten.
When an API response returns a list of objects, no matter the amount, pagination is supported. In paginated responses, objects are nested in a data attribute. The API response also has count attribute that indicates total count in the list with that query. You can use the limit and skip query parameters to query pages.
Pagination Example
In this example, we request the list of monitors. As a result, we get a list of three monitors and can tell by the count attribute that we have reached the end of the result set
Query Parameters
limit— Number of items you need to fetch. More items will lead to slower responses. Max limit is 100.skip— Number of items to skip. This can be useful when you are paginating items.
Response Body
data— List of items fetched.count— Total number of items in the database
Example Pagination Request
Example Pagination Response
{
"count": 10,
"limit": 3,
"skip": 0,
"data": [
{
"_id": "p39d997a-026c-44b2-8b02-7b2814d886d2",
// ...
},
{
"_id": "l34e743e-1af5-4b0a-998f-1d421c22f7a1",
// ...
},
{
"_id": "6a5aa129-0b3e-45b7-a7f6-b4b6df338a19",
// ...
}
]
}