longrun.
Cancel a run

Docs

Runs / Cancel a run

Cancel a run

Request cancellation and inspect the returned run status.

POSThttps://uselongrun.app/v1/runs/{run_id}/cancel
Request
curl --request POST "https://uselongrun.app/v1/runs/${RUN_ID}/cancel" \
  --header "Authorization: Bearer ${API_KEY}"

Request parameters

path
idstringRequired

The run ID to use. Copy the id returned when you submitted the run, or from Runs. This is not a file ID. Replace {id} in the URL with that value.

Example
"${RUN_ID}"

Returns

Returns HTTP 200.

idstring
statusobject

Allowed values: queued running completed failed cancelled

outputsobject
errorobject
retry_of_run_idstringnull
created_atstring
updated_atstring