Cancel a run
Stops a run that is running. The run becomes cancelled, and the work it has not done yet is dropped; a pull request it already opened stays open. A run in any other state answers 400, so cancelling twice is harmless.
api_key runsAuthorizationBearer <token>A team API key, made by an admin under Settings, API keys. Send it as Authorization: Bearer chk_....
Scope: runs
run_id*stringThe run's id.
The run is cancelled.
application/json- response
What a run action did.
status*stringretrying after a retry, cancelled after a cancel.
"retrying"curl -X POST 'https://api.coderhelm.com/api/runs/01JB8X6F4M2C9QZ3T7V5W1K0HA/cancel' \ -H "Authorization: Bearer $CODERHELM_API_KEY"{ "status": "cancelled"}Get a run GET
Returns one run in full: its status and current step, the pull requests and branches it opened, the files it changed, token use and cost, and the notes it wrote while working. Poll it to follow a run; a few seconds apart is plenty.
Retry a run POST
Starts the run's ticket again as a new run. Only a run that is `failed`, `needs_input`, `needs_outside_change`, `cancelled` or `closed` can be retried; the old run becomes `retried`, so retrying it twice is refused with `400`. Find the new run with `GET /api/runs?q=<ticket id>`.