Pagination
All top-level API resources have support for bulk fetches through API methods that respond with a list. These list API methods share a common structure and accept, at a minimum, the following two parameters: limit
and offset
.
Pagination limits and page size
slaOS API uses offset based pagination through the limit
and offset
parameters. Both parameters accept an existing object ID value (see below) and return objects in chronological order. The limit
parameter specifies how many records to fetch per page. The offset
parameter indicates where to start fetching data or how many records to skip, defining the initial position within the list.
See details on the parameters below 👇
limit
Limit specifies how many records to fetch per page. Default value is 10.
offset
Offset indicates where to start fetching data or how many records to skip, defining the initial position within the list. Default value is 0.
In the response, you will get the total number of items (total
) which signifies how many results of data we have for the requested information.
Example
For example, if you call GET https://api.rated.co/v1/slis/
you will get all the SLIs that are currently defined on your workspace.
Depending on the request, you can also get more than one page of results. You can navigate between these pages using the previous
and next
URLs. Just use the URL in next
to continue fetching the rest of the data. You will also get a url in previous
as you navigate throught pages 2,3,4... and so on. When there's no more data left, the API will stop giving you the next link and show next: null
.
Last updated