Skip to main content
POST
Cancel a live test run

Authorizations

Authorization
string
header
required

Better Auth account-session JWT. The token audience must be ${GOLOCO_PUBLIC_API_URL}/v1.

Headers

Idempotency-Key
string
required

A unique key for this logical mutation. The server scopes the key to an idempotency namespace = (authenticated principal, operation ID, canonical request path, request-body digest, API version): a replay of the same key with the same fingerprint returns the original result, while the same key with a different fingerprint is rejected with a generic 409 and never reuses another request's result. Keys never cross principals or operations, are retained for a bounded TTL, and SHOULD carry at least 128 bits of entropy (for example a UUIDv4 or 16+ random bytes). Reuse a key only when retrying the exact same request.

Required string length: 1 - 255

Path Parameters

agent_id
string
required
Pattern: ^[A-Za-z0-9_-]{1,128}$
run_id
string
required
Minimum string length: 1

Body

application/json

The body is of type object.

Response

The run, with cancel_requested set.

run_id
string
required
kind
enum<string>
required
Available options:
test,
job
state
enum<string>
required

Extensible response enum; clients must tolerate unknown values.

Available options:
queued,
starting,
running,
collecting,
delivering,
finished,
failed,
cancelled
outcome
enum<string> | null
required

Extensible response enum; clients must tolerate unknown values.

Available options:
delivered,
test_completed,
no_output,
too_large,
budget_reached,
vendor_error,
deadline,
owner_cancelled,
insufficient_credits,
ceiling_reached,
null
version
integer
required
Required range: x >= 1
vendor
enum<string>
required
Available options:
claude-managed-agents,
openai-agents
task_id
string | null
required
cancel_requested
boolean
required
cap_micros
string
required
Pattern: ^[0-9]+$
cost_micros
string | null
required
Pattern: ^[0-9]+$
duration_ms
integer | null
required
Required range: x >= 0
created_at
string<date-time>
required
started_at
string<date-time> | null
required
finished_at
string<date-time> | null
required
inputs
object | null
required
output
object | null
required