Skip to Content
Eval runs

Cancel an eval run

Permissioneval-runs:updateRetriesIdempotency-Key requiredAuthentication
POST
/eval-runs/{id}/cancel

Requests cooperative cancellation. Queued runs become cancelled immediately; running runs finish in-flight calls and skip remaining scenarios. Only queued or running runs are cancelable.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Header Parameters

Idempotency-Key*string

Required. Reuse the same key to retry this write safely. Retries and idempotency.

Match^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
Length1 <= length <= 255

Response Body

Cancellation state after the request.

application/json
  1. response
id*string
Formatuuid
status*EvalRunStatus
Value in"queued""running""done""failed""cancelled"
completed*integer
Range0 <= value
total*integer
Range0 <= value
cancel_requested_at?|
Formatdate-time
ended_at?|
Formatdate-time
Example Request
curl -X POST 'https://api.kejue.co/v1/eval-runs/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel' \  -H 'Idempotency-Key: string'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "queued",  "completed": 0,  "total": 0,  "cancel_requested_at": "2019-08-24T14:15:22Z",  "ended_at": "2019-08-24T14:15:22Z"}