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

client = Retab()

run = client.workflows.tests.runs.get("wftestrun_q1z2")

print(run.lifecycle.status)
print(run.counts)
{
  "id": "wftestrun_q1z2",
  "workflow": {
    "workflow_id": "wf_abc123xyz",
    "version_id": "draft_2026_05_18"
  },
  "trigger": { "type": "api" },
  "lifecycle": { "status": "completed" },
  "timing": {
    "created_at": "2026-05-18T10:00:00Z",
    "started_at": "2026-05-18T10:00:01Z",
    "completed_at": "2026-05-18T10:00:29Z",
    "duration_ms": 28000
  },
  "test_id": "wfnodetest_hsLEQiM61ez9Piv147MWk",
  "target": { "type": "block", "block_id": "block_extract_invoice" },
  "total_tests": 1,
  "counts": {
    "queued": 0,
    "running": 0,
    "passed": 1,
    "failed": 0,
    "blocked": 0,
    "error": 0,
    "cancelled": 0
  }
}
Fetch a workflow-test run by run_id. Use this while polling for lifecycle.status, then fetch the child results with List Test Run Results.
from retab import Retab

client = Retab()

run = client.workflows.tests.runs.get("wftestrun_q1z2")

print(run.lifecycle.status)
print(run.counts)
{
  "id": "wftestrun_q1z2",
  "workflow": {
    "workflow_id": "wf_abc123xyz",
    "version_id": "draft_2026_05_18"
  },
  "trigger": { "type": "api" },
  "lifecycle": { "status": "completed" },
  "timing": {
    "created_at": "2026-05-18T10:00:00Z",
    "started_at": "2026-05-18T10:00:01Z",
    "completed_at": "2026-05-18T10:00:29Z",
    "duration_ms": 28000
  },
  "test_id": "wfnodetest_hsLEQiM61ez9Piv147MWk",
  "target": { "type": "block", "block_id": "block_extract_invoice" },
  "total_tests": 1,
  "counts": {
    "queued": 0,
    "running": 0,
    "passed": 1,
    "failed": 0,
    "blocked": 0,
    "error": 0,
    "cancelled": 0
  }
}

Authorizations

Api-Key
string
header
required

Path Parameters

run_id
string
required

Response

Successful Response

A batch execution of a workflow's tests, with overall lifecycle, timing, and pass/fail counts.

id
string
required
workflow_id
string
required
workflow_version_id
string
required
trigger
TriggerInfo · object
required

Public summary of what started a run: just the trigger category.

The full per-variant detail (schedule_id, parent_run_id, sender, ...) is kept internally on StoredWorkflowRun.trigger but intentionally not exposed in the public API surface.

lifecycle
PendingWorkflowTestRun · object
required

The test run has been created but execution has not started.

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

Aggregate counts for a batch of block-test runs.

Each individual run contributes to exactly one lifecycle_counts bucket, and additionally to one outcome bucket when lifecycle_counts.completed is incremented.

freshness
ArtifactFreshness · object