Skip to main content

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.

Retrieve the persisted step list for a workflow run. Use this when you want the complete set of step documents for a run, including lifecycle states, handle inputs/outputs, and loop metadata. Returns the canonical { "data": [...], "list_metadata": { "before": null, "after": null } } pagination envelope shared with all Retab list endpoints. Cursor pagination is not yet implemented for this endpoint — list_metadata is always { before: null, after: null }. Steps include an artifact ref when the block produced a persisted record. Use List Artifacts with step_id to dereference one ref, or with run_id to fetch all artifact records for the run.
from retab import Retab

client = Retab()

steps = client.workflows.steps.list("run_abc123xyz")

for step in steps.data:
    print(step.block_id, step.lifecycle.status, step.artifact)
{
  "data": [
    {
      "run_id": "run_abc123xyz",
      "block_id": "extract-block-1",
      "step_id": "extract-block-1",
      "block_type": "extract",
      "block_label": "Extract Invoice",
      "lifecycle": { "status": "completed" },
      "artifact": { "operation": "extraction", "id": "ext_abc123" },
      "started_at": "2026-03-12T09:00:00Z",
      "completed_at": "2026-03-12T09:00:03Z",
      "handle_outputs": {
        "output-json-0": {
          "type": "json",
          "data": {
            "invoice_number": "INV-2024-001",
            "total_amount": 1234.56
          }
        }
      },
      "handle_inputs": {
        "input-file-0": {
          "type": "file",
          "document": {
            "id": "file_123",
            "filename": "invoice.pdf",
            "mime_type": "application/pdf"
          }
        }
      },
      "created_at": "2026-03-12T09:00:00Z"
    },
    {
      "run_id": "run_abc123xyz",
      "block_id": "split-block-1",
      "step_id": "split-block-1",
      "block_type": "split",
      "block_label": "Split Documents",
      "lifecycle": { "status": "completed" },
      "artifact": { "operation": "split", "id": "spl_def456" },
      "started_at": "2026-03-12T09:00:03Z",
      "completed_at": "2026-03-12T09:00:04Z",
      "handle_outputs": {
        "output-file-invoice": {
          "type": "file",
          "document": {
            "id": "file_456",
            "filename": "invoice_page_1.pdf",
            "mime_type": "application/pdf"
          }
        }
      },
      "handle_inputs": {
        "input-file-0": {
          "type": "file",
          "document": {
            "id": "file_123",
            "filename": "invoice.pdf",
            "mime_type": "application/pdf"
          }
        }
      },
      "created_at": "2026-03-12T09:00:03Z"
    }
  ],
  "list_metadata": {
    "before": null,
    "after": null
  }
}