Skip to main content
POST
/
v1
/
workflows
/
tests
/
runs
/
{run_id}
/
cancel
from retab import Retab

client = Retab()

run = client.workflows.tests.runs.cancel("wftestrun_q1z2")
print(run.lifecycle.status)
{
  "id": "wftestrun_q1z2",
  "lifecycle": { "status": "cancelled" },
  "timing": {
    "created_at": "2026-05-18T10:00:00Z",
    "started_at": "2026-05-18T10:00:01Z",
    "completed_at": "2026-05-18T10:00:04Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.retab.com/llms.txt

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

Cancel a pending or running workflow-test run by run_id. Cancellation is run-specific; you do not pass the workflow id or test id when cancelling.
from retab import Retab

client = Retab()

run = client.workflows.tests.runs.cancel("wftestrun_q1z2")
print(run.lifecycle.status)
{
  "id": "wftestrun_q1z2",
  "lifecycle": { "status": "cancelled" },
  "timing": {
    "created_at": "2026-05-18T10:00:00Z",
    "started_at": "2026-05-18T10:00:01Z",
    "completed_at": "2026-05-18T10:00:04Z"
  }
}

Authorizations

Api-Key
string
header
required

Path Parameters

run_id
string
required

Response

Successful Response

id
string
required
workflow
WorkflowSnapshotRef · object
required

Reference to the workflow + immutable version that drove the run.

The class name is retained temporarily for compatibility with surrounding run-model code, but public API output uses version_id rather than snapshot identity.

trigger
ManualTrigger · object
required

Manual run started by a user from the dashboard.

lifecycle
WorkflowTestRunLifecycle · object
required
timing
WorkflowTestRunTiming · object
required
total_tests
integer
required
target
WorkflowTestBlockTarget · object

Public workflow-test target.

The storage layer remains block-scoped today, but the API shape names the tested entity explicitly so workflow-level targets can be added later.

test_id
string | null
counts
BlockTestBatchExecutionCounts · object