Skip to content

Cancel benchmark

POST
/api/v1/benchmarks/{id}/cancel
curl --request POST \
--url https://dashboard.justcrawl.io/api/v1/benchmarks/example/cancel \
--header 'Authorization: Bearer <token>'

Cancels a pending or running benchmark by transitioning it to failed with the reason “Cancelled by user.” Cancellation is cooperative — the in-flight runner exits at its next checkpoint, so already-dispatched probes may still bill before the row flips. completed and already-failed benchmarks return 400 (nothing to cancel). Org-scoped — cross-tenant probes return 404 indistinguishably from missing IDs.

id
required
string

Benchmark cancelled; runner exits at next checkpoint.

Media type application/json
object
status
string
Allowed values: cancelled
Example
{
"status": "cancelled"
}

Validation failed — request body or query is missing/invalid

Media type application/json
object
error
string
Example
{
"error": "Missing or invalid \"url\" field"
}

Missing or invalid authentication token

Media type application/json
object
error
string
Example
{
"error": "Missing or invalid authentication token"
}

Insufficient permissions for this operation

Media type application/json
object
error
string
Example
{
"error": "No organization. Complete onboarding first."
}

Resource not found

Media type application/json
object
error
string
Example
{
"error": "Workflow not found"
}

Unexpected server error. Logs and PostHog $exception capture

Media type application/json
object
error
string
Example
{
"error": "Something went wrong"
}