Flow

Cancel an execution

POST
/flows/{flow}/executions/{execution}:cancel

Cancels a pending or running execution. If the execution is already in a terminal state (completed, failed, cancelled), this is a no-op and the current execution is returned.

BearerAuth
headerAuthorizationBearer <JWT>

Admin token, API token issued via /api-tokens, or an OIDC JWT access token issued by the configured OIDC provider.

flow*string
Formatuuid
execution*string
Formatuuid

The execution after cancellation.

application/json
  1. response
name*string

Unique resource name

status*string

Current execution status. Known values: pending, running, completed, failed, cancelled. Clients should handle unknown values gracefully.

stdout*string

Captured standard output.

stderr*string

Captured standard error.

exitCode*integer

Process exit code. 0 indicates success.

duration*string

Wall-clock duration

createTime*string

Time at which the execution was created.

Formatdate-time
tracePath?string

Object-store key of the .trace artifact, empty unless the run was started with trace: true and produced one. Download the bytes with GET /flows/{flow}/executions/{execution}/trace.

files?array<>

Files uploaded to this execution via POST :upload. Populated by GET /flows/{flow}/executions/{execution} (owner or admin only); omitted from list responses to keep them lightweight.

Example Request
curl -X POST 'https://example.com/api/hub/flows/497f6eca-6276-4993-bfeb-53cbbbba6f08/executions/497f6eca-6276-4993-bfeb-53cbbbba6f08:cancel'
Example Response
{  "name": "flows/550e8400-e29b-41d4-a716-446655440000/executions/660e8400-e29b-41d4-a716-446655440000",  "status": "completed",  "stdout": "string",  "stderr": "string",  "exitCode": 0,  "duration": "3.5s",  "createTime": "2019-08-24T14:15:22Z",  "tracePath": "executions/660e8400-e29b-41d4-a716-446655440000/trace",  "files": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "filename": "string",      "uploadedBy": "1e2815fd-75c7-4289-86d5-2503daeb59b8",      "createTime": "2019-08-24T14:15:22Z"    }  ]}