How It Works
All list endpoints use offset-based pagination with two query parameters:
| Parameter | Default | Max | Description |
|---|---|---|---|
limit |
25 | 100 | Number of results per page |
offset |
0 | — | Number of results to skip |
Response Meta
Every list response includes a meta object:
{
"data": [...],
"meta": {
"total": 142,
"limit": 25,
"offset": 0,
"has_more": true
}
}
| Field | Description |
|---|---|
total |
Total number of matching resources |
limit |
The limit used for this request |
offset |
The offset used for this request |
has_more |
true if there are more results beyond this page |
Examples
First page (default)
curl "https://app.alert24.io/api/v1/incidents" \
-H "Authorization: Bearer ak_live_YOUR_KEY"
Second page
curl "https://app.alert24.io/api/v1/incidents?limit=25&offset=25" \
-H "Authorization: Bearer ak_live_YOUR_KEY"
Smaller pages
curl "https://app.alert24.io/api/v1/incidents?limit=10" \
-H "Authorization: Bearer ak_live_YOUR_KEY"
Iterating Through All Results
async function fetchAll(baseUrl, headers) {
const results = [];
let offset = 0;
const limit = 100;
while (true) {
const res = await fetch(`${baseUrl}?limit=${limit}&offset=${offset}`, { headers });
const json = await res.json();
results.push(...json.data);
if (!json.meta.has_more) break;
offset += limit;
}
return results;
}
// Usage
const incidents = await fetchAll(
'https://app.alert24.io/api/v1/incidents',
{ Authorization: 'Bearer ak_live_YOUR_KEY' }
);
Combining with Filters
Pagination works alongside all filter parameters:
# Page 3 of critical incidents
curl "https://app.alert24.io/api/v1/incidents?severity=critical&limit=10&offset=20" \
-H "Authorization: Bearer ak_live_YOUR_KEY"
The meta.total reflects the filtered count, not the total number of incidents.