API reference Setup
Setup
Report errors people hit in the dashboard
POST /client-errors
The dashboard's error reports ({"reports": [...]}, at most 16 KB and 20 reports): each with source (api, error, rejection, render), route (the route pattern), and optionally method, api_route, status, code, name, message (at most 300 characters), stack (file:line of the dashboard's own bundle), version, browser (family and major version) and page_id. Identifiers, query strings, email addresses and tokens are removed again on the server, and each report is counted per fingerprint, day and organisation (none before sign-in). Answers 204, also when reports are off (STACKURITY_CLIENT_ERRORS=off), which keeps nothing. Browser sessions and pages before sign-in only (403 for API tokens); 30 a minute per address before sign-in, 60 a minute per person (429). A beacon without the X-Stackurity-CSRF header is accepted with Sec-Fetch-Site: same-origin (install.md#error-reports)
Request body
application/json, required: object
Responses
Version, whether first-time setup is required, and features
GET /meta
Version, whether first-time setup is required, and features: what this server supports that an older one would silently ignore. upload_project means POST /ingest and POST /sbom/import honour project_id (0.10); stackurity checks it before an upload with --project
Responses
This OpenAPI document
GET /openapi.json
This API as an OpenAPI 3.1 document
Responses
Create the first admin
POST /setup
Request body
application/json, required: object
Responses
Report a paid-feature notice or a browser export (usage counts)
POST /usage-counts
The dashboard's usage counts (install.md#usage-counts): {"event": "teaser_view" | "teaser_click", "key": "<feature>"} when a notice that a feature needs a paid plan is shown or a link in it followed, and {"event": "export", "key": "evidence_json" | "evidence_print" | "outcomes_print"} for exports made in the browser. Adds one to the organisation's count for the day; nothing about the person or page is kept. 204 also for a key the server does not know (nothing counted); 400 for another event. Browser sessions only (403 for API tokens); not counted against a plan's API requests an hour
Request body
application/json, required: object
| Field | Type | Description |
|---|---|---|
event required | string | One of teaser_view, teaser_click, export. |
key required | string |