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"
}

Documentation Index

Fetch the complete documentation index at: https://docs.empirical.run/llms.txt

Use this file to discover all available pages before exploring further.

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

Project 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

Optional reason for cancelling the test run. Recorded for auditing purposes.

Response

Test run cancelled.

message
string
required

Confirmation message indicating the test run was cancelled.