Pagination
Offset-and-limit pagination, response envelope shape, and iteration patterns
List endpoints in the SigSentry API use offset-and-limit pagination. Every list response wraps results plus pagination metadata.
Query parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
page | int ≥ 1 | 1 | 1-indexed page number |
limit | int 1–100 | 20 | Items per page; capped at 100 |
Response shape
{
"success": true,
"data": {
"items": [ /* array of resources */ ],
"pagination": {
"page": 1,
"limit": 20,
"total": 47,
"totalPages": 3
}
}
}| Field | Meaning |
|---|---|
total | Total resources matching the query (across all pages) |
totalPages | Math.ceil(total / limit) |
Iteration pattern
let page = 1;
while (true) {
const res = await fetch(
`https://api.sigsentry.com/v1/analyses?page=${page}&limit=100`,
{ headers: { Authorization: `Bearer ${key}` } }
).then((r) => r.json());
if (!res.success) break;
for (const item of res.data.items) handle(item);
if (page >= res.data.pagination.totalPages) break;
page += 1;
}Maximum page size
limit is capped at 100 to keep response times bounded. For larger
exports, paginate. The performance penalty of multiple requests is
small compared to the cost of a single 10,000-item response.
Filtering
Where the resource supports it, list endpoints accept additional
filter parameters (e.g. status, severity, fromDate/toDate on
analyses). See each endpoint's reference for the filter set.
Filters apply before pagination — total reflects the filtered
count.
Sort order
Lists are sorted by most recent first by default (createdAt
descending). Endpoints that support other orderings document them
explicitly.
Stability
The API doesn't guarantee a fully stable order across pages while new resources are being created. If you need a snapshot:
- Use
toDateto pin the upper bound of the result set, or - Iterate quickly (the typical race window is sub-second)
For audit-style use cases where consistency matters, the audit log is the canonical source.
