ChartnautDocs

Cancel a run

POST/runs/{run_id}/cancel

Cancels a queued or running run. A run that has already finished is returned unchanged.

Scope

Heavy call

Long poll

CLI

runs:write

No

No

chartnaut runs cancel

Guidance

  • It is safe to repeat: cancelling a run that has finished, or was already cancelled, returns it as it is.

  • Cancel runs you no longer need. A queued or running run holds one of your API run places, and a running one holds one of your runs at once, shared with the app.

  • A cancelled run has status cancelled and failure.kind cancelled, and has no results.

  • A study run made in the app is cancelled in the app. If it has not stopped by the time the call returns, the answer is 202; poll Get a run to see it end.

Path parameters

Name

Type

Description

run_id

string

A run id, run_… or srun_…

Response

Returns the Run: 200 once it is cancelled or already finished, 202 while a study run made in the app is still stopping.

Status codes

Status

Code

Meaning

200

-

The run is cancelled, or had already finished

202

-

A study run made in the app is still stopping

404

not_found

You have no run with that id

500

internal

The run could not be cancelled. Retry