Pagination
The list endpoints for alerts, audit logs, teams, and users return results in pages. This page explains how to ask for a page and how to fetch the next one.
Invites and API keys are not paginated. Those lists are small, so one request returns all of them.
Query Parameters
Section titled “Query Parameters”| Parameter | Description |
|---|---|
limit | Maximum number of items in a page. Optional. |
id | The cursor for the next page. Pass the value from the previous response’s pk. |
Limit Values
Section titled “Limit Values”limit can be any whole number from 1 to 100.
Anything else (zero, a negative number, a number over 100, a decimal, or text) is treated as 20.
| Endpoint | Default when limit is omitted |
|---|---|
| Alerts | 20 |
| Audit logs | 20 |
| Teams | 20 |
| Users | No default. Without limit, the response contains as many users as fit in one page. |
Response
Section titled “Response”A list response has these fields:
| Field | Description |
|---|---|
items | The items in this page |
pk | The cursor for the next page. Treat it as opaque. It is only present when more results exist. |
Getting the Next Page
Section titled “Getting the Next Page”- Make the first request, with or without
limit. - If the response has no
pk, you have the last page. You’re done. - If the response has
pk, repeat the same request and add thepkvalue as a query parameter. For example, passid=<pk.id>. - Keep the same
limitand other parameters on every request. - Repeat until a response has no
pk.
The user list uses a cursor with two values. The pk holds a username and an email. To get the next page, pass both as query parameters: username=<pk.username> and email=<pk.email>. Passing only one of them doesn’t work.
Alerts and Audit Logs
Section titled “Alerts and Audit Logs”These endpoints also accept:
| Parameter | Description |
|---|---|
order | Set to asc for oldest first. Any other value, or no value, returns newest first. |
start | The earliest time to include. The bound is inclusive. |
end | The latest time to include. The bound is inclusive. |
Use start and end to filter by time. You can use either one alone, or both together. The unit depends on the endpoint:
- Audit logs: epoch milliseconds.
- Alerts: epoch microseconds.
Teams are sorted by ID, lowest first. The team list does not support order.