Skip to main content
GET
/
v1
/
workflows
/
{workflow_id}
/
block-tests
/
{test_id}
from retab import Retab

client = Retab()

test = client.workflows.tests.get(
    workflow_id="wf_abc123xyz",
    test_id="wfnodetest_hsLEQiM61ez9Piv147MWk",
)

print(test.assertion.condition)
print(test.schema_drift)
{
  "id": "wfnodetest_hsLEQiM61ez9Piv147MWk",
  "workflow_id": "wf_abc123xyz",
  "organization_id": "org_123",
  "target": { "type": "block", "block_id": "block_extract_invoice" },
  "source": {
    "type": "manual",
    "handle_inputs": {
      "input-document-0": { "type": "file", "file_id": "file_invoice_q1" }
    }
  },
  "name": "Q1 invoice total",
  "assertion": {
    "id": "assert_xyz",
    "target": { "output_handle_id": "output-json-0", "path": "total" },
    "condition": { "kind": "equals", "expected": 1234.56 },
    "label": null
  },
  "schema_drift": "fresh",
  "schema_drift_detail": null,
  "validation_status": "valid",
  "validation_issues": [],
  "latest_run_summary": {
    "run_record_id": "wfnodetestrun_abc123",
    "status": "passed",
    "started_at": "2026-05-01T13:55:00Z",
    "completed_at": "2026-05-01T13:55:18Z",
    "duration_ms": 18221,
    "workflow_draft_fingerprint": "ddd95baadce6045f",
    "block_config_fingerprint": "0ff93ddc7cefcb42",
    "assertions_passed": 1,
    "assertions_failed": 0,
    "blocked_assertions": 0
  },
  "latest_passing_run_summary": { "...": "as above" },
  "latest_failing_run_summary": null,
  "created_at": "2026-04-08T14:22:26Z",
  "updated_at": "2026-04-08T14:27:52Z"
}

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.

Fetch a single block test by id. The response refreshes the test’s validation_status and schema-drift state against the current workflow draft before returning, so the caller always sees the latest staleness.
from retab import Retab

client = Retab()

test = client.workflows.tests.get(
    workflow_id="wf_abc123xyz",
    test_id="wfnodetest_hsLEQiM61ez9Piv147MWk",
)

print(test.assertion.condition)
print(test.schema_drift)
{
  "id": "wfnodetest_hsLEQiM61ez9Piv147MWk",
  "workflow_id": "wf_abc123xyz",
  "organization_id": "org_123",
  "target": { "type": "block", "block_id": "block_extract_invoice" },
  "source": {
    "type": "manual",
    "handle_inputs": {
      "input-document-0": { "type": "file", "file_id": "file_invoice_q1" }
    }
  },
  "name": "Q1 invoice total",
  "assertion": {
    "id": "assert_xyz",
    "target": { "output_handle_id": "output-json-0", "path": "total" },
    "condition": { "kind": "equals", "expected": 1234.56 },
    "label": null
  },
  "schema_drift": "fresh",
  "schema_drift_detail": null,
  "validation_status": "valid",
  "validation_issues": [],
  "latest_run_summary": {
    "run_record_id": "wfnodetestrun_abc123",
    "status": "passed",
    "started_at": "2026-05-01T13:55:00Z",
    "completed_at": "2026-05-01T13:55:18Z",
    "duration_ms": 18221,
    "workflow_draft_fingerprint": "ddd95baadce6045f",
    "block_config_fingerprint": "0ff93ddc7cefcb42",
    "assertions_passed": 1,
    "assertions_failed": 0,
    "blocked_assertions": 0
  },
  "latest_passing_run_summary": { "...": "as above" },
  "latest_failing_run_summary": null,
  "created_at": "2026-04-08T14:22:26Z",
  "updated_at": "2026-04-08T14:27:52Z"
}

Authorizations

Api-Key
string
header
required

Path Parameters

workflow_id
string
required
test_id
string
required

Query Parameters

access_token
string | null

Response

Successful Response

workflow_id
string
required
organization_id
string
required
block_id
string
required
block_type
string
required
id
string
captured_from
CapturedFrom · object
captured_at
string<date-time> | null
name
string | null
handle_inputs
Handle Inputs · object
handle_inputs_fingerprint
string
default:""
schema_fingerprint
string
default:""
validation_status
enum<string>
default:valid
Available options:
valid,
warning,
invalid
validation_issues
ValidationIssue · object[]
created_at
string<date-time>
updated_at
string<date-time>
assertion
AssertionSpec · object

Block-test assertion against one declared output handle.

target is the only supported shape: an output handle id and an optional relative path inside that handle's payload.

assertion_schema_dep
AssertionSchemaDep · object

Single-rule schema dependency for Level 2 drift detection.

assertion_drift_status
enum<string> | null
Available options:
valid,
drifted,
broken
schema_drift
enum<string>
default:unknown
Available options:
none,
partial,
drifted,
unknown
schema_drift_detail
string | null
latest_run_summary
LatestBlockTestRunSummary · object
latest_passing_run_summary
LatestBlockTestRunSummary · object
latest_failing_run_summary
LatestBlockTestRunSummary · object