incidents
Módulo Safety · 6 operaciones
List incident rows
GET/incidents
An incident with dispatch. A critical incident cannot be relabeled and closed in one statement; closing requires sign-off. Returns a cursor page of incident rows the caller may see. The default order is `created_at` ascending. Supports sparse fieldsets and the filter grammar.
Create an incident
POST/incidents
An incident with dispatch. A critical incident cannot be relabeled and closed in one statement; closing requires sign-off. Creates an incident. Requires `Idempotency-Key`; a replay returns the original response. The organization is derived from the credential or the parent row, never from the body.
Get an incident
GET/incidents/{id}
An incident with dispatch. A critical incident cannot be relabeled and closed in one statement; closing requires sign-off. Returns one incident with its `ETag`. A incident the caller may not see returns 404.
Update an incident
PATCH/incidents/{id}
An incident with dispatch. A critical incident cannot be relabeled and closed in one statement; closing requires sign-off. Updates the fields sent; omitted fields are unchanged. Requires `If-Match` with the current `ETag`: a stale tag returns 412 and a missing tag returns 428.
Transition the incident state
POST/incidents/{id}/transitions
Moves the incident lifecycle to another state through its transition RPC, which writes the transition ledger. Uses compare-and-set on `expected_state`; a disallowed transition returns a 422 refusal. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
Close an incident
POST/incidents/{id}/close
Closes a contained incident with sign-off through app.close_incident; the caller is recorded as the person signing off. The reporter of a critical incident cannot sign off its closure (422). Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.