Operations
Project members can start, steer, and cancel investigations. Only an owner or admin can approve,
reject, or resolve an action, and only with a signed-in user token: the dashboard, or the CLI after
squasher login. The API refuses API keys for these three operations, even a key with the
actions:approve scope. The decision records your user id.
Start an investigation
The body has a question, a subject, or both:201, created: true, and the new investigation. An incident has one
investigation. When the subject is an incident that already has one, the response has status 200,
created: false, and the existing investigation. A repeated idempotency_key also returns 200.
confidence is a number from 0 to 100.
time_to_diagnosis_seconds is the time from the start to the first diagnosis. thread_id is the
chat that is linked to the investigation.
List investigations
The response is
{ "investigations": [...], "total", "limit", "offset" }.
Read an investigation
investigation, entries, and actions. Each timeline entry has a sequence
number, a kind, an actor, and a payload. The kinds are hypothesis, evidence, action,
note, redirect, and status. Add after_sequence=<n> to get only the entries after entry n.
Add include_actions=false to leave out the action proposals (actions is empty) when you poll;
read them with actions.list.
Add a note, steer, or cancel
notesadds a note to the timeline. The body is{ "text" }. The response has status201and the new entry inentry.redirectrecords the direction, and Squasher continues the investigation in that direction. This also works after a diagnosis. The body is{ "text" }. The response has status202.cancelstops an active investigation. The body is optional:{ "reason" }.
List actions
status, investigation_id, and incident_id, and set limit (1 to 100,
default 50). The statuses are proposed, approved, executing, unknown, succeeded, failed,
expired, and rejected. unknown means Squasher sent the call but did not see the result. Squasher
does not run the action again; it reads the provider to settle the result.
Approve or reject an action
status, precondition, and
postcondition. Reject uses the same body at /reject. The reason is optional.
When the result is unknown, settle it at /resolve. Squasher reads the provider first. When the
provider cannot tell, send your finding after you check the provider:
outcome is succeeded or failed. note is optional. When the provider cannot tell and you send
no outcome, the response has status 409.
Errors
TypeScript client and CLI
squasher actions approve and squasher actions reject ask you to confirm. Add --yes to skip the
prompt.