Launch a background analysis job (operator+).
const url = 'https://example.com/api/v1/analysis/jobs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"baseline_secs":1,"depth":"example","family":"example","notify":true,"scope_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","scope_kind":"example","scope_label":"example","sensitivity":1,"tool":"example","window_secs":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/analysis/jobs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "baseline_secs": 1, "depth": "example", "family": "example", "notify": true, "scope_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scope_kind": "example", "scope_label": "example", "sensitivity": 1, "tool": "example", "window_secs": 1 }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Request body to launch an analysis (launch drawer / report config bar).
object
Examplegenerated
{ "baseline_secs": 1, "depth": "example", "family": "example", "notify": true, "scope_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scope_kind": "example", "scope_label": "example", "sensitivity": 1, "tool": "example", "window_secs": 1}Responses
Section titled “Responses”The queued job row; it progresses over /api/v1/stream/analysis
A job row, as served to the API / SSE. Timestamps are epoch-millis so the WebUI formats relative times without a date dependency.
object
Where an analysis run is in its lifecycle.
A bare String until v0.2.6, and the cost of that was paid twice. The vocabulary had to be
written out by hand at the API edge to validate the runs filter, and again in the WebUI to fill
its dropdown — two lists nothing compared. Worse, state: string compares equal to any
string: the in-app “your analysis finished” notice tested state === 'succeeded', which is the
report-run vocabulary, so every successful analysis announced itself as a failure. Typing it
makes that comparison a compile error on both sides.
Example
{ "state": "queued"}Unknown tool, unknown scope kind, or a group/node scope with no scope_id
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}No valid bearer token
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role below Operator
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}The runner is at its concurrency or rate limit — retryable
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}This deployment has no runner
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}