Skip to main content
GET
/
v1
/
workflows
/
{workflow_id}
/
entities
from retab import Retab

client = Retab()

graph = client.workflows.get_entities("wf_abc123xyz")

print(graph.workflow.name)
print(f"{len(graph.blocks)} blocks, {len(graph.edges)} edges")

for block in graph.start_blocks:
    print(f"document input: {block.id}")

for block in graph.start_json_blocks:
    print(f"json input: {block.id}")
{
  "workflow": {
    "id": "wf_abc123xyz",
    "name": "Invoice Processing",
    "description": "Extract invoice fields and route for review",
    "organization_id": "org_123",
    "published": {
      "snapshot_id": "snap_v2_def456",
      "published_at": "2026-04-30T18:00:00Z"
    },
    "email_trigger": {
      "allowed_senders": [],
      "allowed_domains": ["acme.com"]
    },
    "created_at": "2026-04-30T17:00:00Z",
    "updated_at": "2026-05-01T14:30:00Z"
  },
  "blocks": [
    {
      "id": "start-1",
      "workflow_id": "wf_abc123xyz",
      "organization_id": "org_123",
      "draft_version": "draft_v3",
      "type": "start",
      "label": "Invoice Input",
      "position_x": 0,
      "position_y": 0,
      "width": 240,
      "height": 120,
      "config": null,
      "parent_id": null,
      "updated_at": "2026-04-30T17:00:00Z"
    },
    {
      "id": "extract-1",
      "workflow_id": "wf_abc123xyz",
      "organization_id": "org_123",
      "draft_version": "draft_v3",
      "type": "extract",
      "label": "Extract Invoice Fields",
      "position_x": 320,
      "position_y": 0,
      "width": 240,
      "height": 120,
      "config": {
        "json_schema": {
          "type": "object",
          "properties": {
            "invoice_number": {"type": "string"},
            "total": {"type": "number"},
            "vendor": {
              "type": "object",
              "properties": {"name": {"type": "string"}}
            }
          }
        },
        "model": "gpt-5"
      },
      "parent_id": null,
      "resolved_schemas": {
        "input_schemas": {},
        "output_schemas": {
          "output-json-0": {"type": "object"}
        }
      },
      "updated_at": "2026-05-01T14:30:00Z"
    }
  ],
  "edges": [
    {
      "id": "edge-1",
      "workflow_id": "wf_abc123xyz",
      "organization_id": "org_123",
      "draft_version": "draft_v3",
      "source_block": "start-1",
      "target_block": "extract-1",
      "source_handle": "output-file-0",
      "target_handle": "input-file-0",
      "updated_at": "2026-04-30T17:00:00Z"
    }
  ]
}

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 workflow together with its full graph: every block and edge in the current draft. This is the easiest way to discover the IDs you need for other endpoints — most importantly, the start and start_json block IDs you must pass to Run Workflow. The Python SDK exposes two convenience properties on the response:
  • start_blocks — document-input blocks (type == "start")
  • start_json_blocks — JSON-input blocks (type == "start_json")
from retab import Retab

client = Retab()

graph = client.workflows.get_entities("wf_abc123xyz")

print(graph.workflow.name)
print(f"{len(graph.blocks)} blocks, {len(graph.edges)} edges")

for block in graph.start_blocks:
    print(f"document input: {block.id}")

for block in graph.start_json_blocks:
    print(f"json input: {block.id}")
{
  "workflow": {
    "id": "wf_abc123xyz",
    "name": "Invoice Processing",
    "description": "Extract invoice fields and route for review",
    "organization_id": "org_123",
    "published": {
      "snapshot_id": "snap_v2_def456",
      "published_at": "2026-04-30T18:00:00Z"
    },
    "email_trigger": {
      "allowed_senders": [],
      "allowed_domains": ["acme.com"]
    },
    "created_at": "2026-04-30T17:00:00Z",
    "updated_at": "2026-05-01T14:30:00Z"
  },
  "blocks": [
    {
      "id": "start-1",
      "workflow_id": "wf_abc123xyz",
      "organization_id": "org_123",
      "draft_version": "draft_v3",
      "type": "start",
      "label": "Invoice Input",
      "position_x": 0,
      "position_y": 0,
      "width": 240,
      "height": 120,
      "config": null,
      "parent_id": null,
      "updated_at": "2026-04-30T17:00:00Z"
    },
    {
      "id": "extract-1",
      "workflow_id": "wf_abc123xyz",
      "organization_id": "org_123",
      "draft_version": "draft_v3",
      "type": "extract",
      "label": "Extract Invoice Fields",
      "position_x": 320,
      "position_y": 0,
      "width": 240,
      "height": 120,
      "config": {
        "json_schema": {
          "type": "object",
          "properties": {
            "invoice_number": {"type": "string"},
            "total": {"type": "number"},
            "vendor": {
              "type": "object",
              "properties": {"name": {"type": "string"}}
            }
          }
        },
        "model": "gpt-5"
      },
      "parent_id": null,
      "resolved_schemas": {
        "input_schemas": {},
        "output_schemas": {
          "output-json-0": {"type": "object"}
        }
      },
      "updated_at": "2026-05-01T14:30:00Z"
    }
  ],
  "edges": [
    {
      "id": "edge-1",
      "workflow_id": "wf_abc123xyz",
      "organization_id": "org_123",
      "draft_version": "draft_v3",
      "source_block": "start-1",
      "target_block": "extract-1",
      "source_handle": "output-file-0",
      "target_handle": "input-file-0",
      "updated_at": "2026-04-30T17:00:00Z"
    }
  ]
}

Authorizations

Api-Key
string
header
required

Path Parameters

workflow_id
string
required

Query Parameters

access_token
string | null

Response

Successful Response

Public workflow payload with graph entities.

workflow
WorkflowResponse · object
required

Public workflow resource returned by workflow metadata endpoints.

blocks
WorkflowBlock · object[]
edges
WorkflowEdgeDoc · object[]