AIR Assessments
Create, list, inspect, and control risk assessments on a project. Starting or retrying an assessment dispatches RiskAssessmentWorkflow and consumes org credits.
Start assessment for project
Creates a project assessment, locks org credits for the run, and dispatches `RiskAssessmentWorkflow`. Requires project contributor scope and a billable org (`assertCanRunAssessment`). Returns 202 with `assessmentPid` and `workflowRunId`. May return 402 or 403 billing errors when credits are insufficient, the trial has expired, or billing is inactive.
List project assessments
Lists assessment summaries for a project. Requires project reader scope. Omits assessments the caller's org cannot access under report-history billing rules. Returns 404 when the project is unknown or not visible.
Create assessment draft
Creates an assessment row without starting the risk pipeline. Requires project contributor scope. When `artifactPids` are provided, stores them as draft selection on the assessment. Auto-generates a display name when `name` is empty. Returns 201 with `assessmentPid`.
Get assessment details
Returns assessment metadata including `workflowRunId` and whether a report is available. Requires project reader scope and report-history billing access for the assessment. Returns 404 when the assessment is unknown or not visible; may return 403 when billing or feature gates block access.
Get assessment report
Renders the structured risk report for a completed (or partially completed) assessment. Requires project reader scope and report-history billing access. Returns 404 when the assessment is unknown, not visible, or has no renderable report.
List assessment stage logs
Returns per-stage checkpoint logs (`stageName`, `status`, timestamps, `errorMessage`) for an assessment run. Requires project reader scope and report-history billing access. Returns 404 when the assessment is unknown or not visible.
List assessment input artifacts
Lists artifacts that were used as inputs when the assessment report was generated. Requires project reader scope on the assessment's project. Returns 404 when the assessment or its artifacts are unknown or not visible.
Retry failed assessment
Re-queues a failed assessment by dispatching a new `RiskAssessmentWorkflow` with `resume: true` from the last completed stage, locks credits again, and returns 202 with `workflowRunId` and optional `resumedFromStage`. Requires project contributor scope and a billable org. Returns 409 when status is not `failed` (including `completed`, `queued`, or `running`); returns 404 when the assessment or prior workflow input is missing.
Terminate running assessment
Marks a queued or running assessment as failed, fails in-flight stage checkpoints, interrupts the linked workflow run when active, and releases locked credits. Requires project contributor scope. Returns 409 when the assessment is not terminatable (not `queued`/`running` and no running stages). Returns 404 when the assessment is unknown or not visible.