Pagination
All list endpoints share the same pagination, sorting, and search contract. Single-resource endpoints (e.g. GET /api/scans/{scanId}) do not paginate.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer ≥ 1 | 1 | Page number (1-indexed) |
limit | integer 1–200 | 50 | Page size; values above 200 are rejected |
sort | string | endpoint-specific | column:direction, e.g. riskScore:desc |
search | string | none | Free-text filter; supported fields vary per endpoint |
Endpoint-specific filters (such as severity, status, provider) layer on top of these. Each endpoint page documents its own filter set and the columns its sort parameter accepts.
Sortable columns
The set of columns you may pass to sort is fixed per endpoint and silently ignored if invalid:
| Endpoint | Sortable columns |
|---|---|
GET /api/scans | scannedAt, status, compliance, riskScore |
GET /api/images | name, createdAt, riskScore |
GET /api/vulnerabilities | severity, cveId, detectedAt, cvss, triageStatus |
GET /api/reports | createdAt, type, status |
Direction must be asc or desc. Unknown columns silently fall back to the endpoint's default ordering.
Response envelope
A paginated response wraps results in data, meta, and links:
links always echoes the request path and serialized query string, making it safe to follow links.next directly without rebuilding URLs.
Examples
Fetch the second page of 100 scans, newest first:
Iterate every page (pseudo-code):
Errors
Invalid page, limit, or sort values return 400 BAD_REQUEST: