Stackurity Start free trial

API reference Setup

Setup

5 operations. Base URL https://app.stackurity.dev/api/v1 on Stackurity Cloud; see authentication.

Report errors people hit in the dashboard

POST /client-errors

Role: none (rate limited)

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

StatusMeaningBody
204Recorded, or reports are offno body
4XXAn errorError
5XXAn errorError

Version, whether first-time setup is required, and features

GET /meta

Role: none

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

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

This OpenAPI document

GET /openapi.json

Role: none

This API as an OpenAPI 3.1 document

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

Create the first admin

POST /setup

Role: setup token

Request body

application/json, required: object

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

Report a paid-feature notice or a browser export (usage counts)

POST /usage-counts

Role: a browser session

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

FieldTypeDescription
event requiredstringOne of teaser_view, teaser_click, export.
key requiredstring

Responses

StatusMeaningBody
204Counted, or the key is not one the server countsno body
4XXAn errorError
5XXAn errorError