Skip to main content
POST
/
api
/
test-runs
/
{id}
/
cancel
Cancel Test Run
curl --request POST \
  --url https://dash.empirical.run/api/test-runs/{id}/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "<string>"
}
'
{
  "message": "Test run cancelled successfully"
}
Cancels a test run that is currently in progress or pending. The test run will transition to the cancelling state and then to cancelled once the operation completes.
{
  "message": "Test run cancelled successfully"
}

Basic cancel

curl -X POST \
  "https://dash.empirical.run/api/test-runs/456/cancel" \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY"

Cancel with reason

curl -X POST \
  "https://dash.empirical.run/api/test-runs/456/cancel" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY" \
  -d '{
    "reason": "Deployment rolled back"
  }'

Authorizations

Authorization
string
header
required

API key from the Empirical dashboard.

Path Parameters

id
integer
required

Test run ID.

Required range: -9007199254740991 <= x <= 9007199254740991

Body

application/json

Cancel options.

reason
string

Response

Test run cancelled.

message
string
required