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

client = Retab()

# All edges
edges = client.workflows.edges.list("wf_abc123xyz")

# Outgoing edges of one block
outgoing = client.workflows.edges.list(
    "wf_abc123xyz",
    source_block="extract-1",
)

# Incoming edges of one block
incoming = client.workflows.edges.list(
    "wf_abc123xyz",
    target_block="hil-1",
)

for edge in edges:
    print(f"{edge.source_block}/{edge.source_handle} -> {edge.target_block}/{edge.target_handle}")
[
  {
    "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"
  },
  {
    "id": "edge-2",
    "workflow_id": "wf_abc123xyz",
    "organization_id": "org_123",
    "draft_version": "draft_v3",
    "source_block": "extract-1",
    "target_block": "hil-1",
    "source_handle": "output-json-0",
    "target_handle": "input-json-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.

List edges in a workflow’s current draft. Optionally filter to edges incident to a specific block by passing source_block or target_block. For the full graph in a single call, use Get Workflow Entities.
from retab import Retab

client = Retab()

# All edges
edges = client.workflows.edges.list("wf_abc123xyz")

# Outgoing edges of one block
outgoing = client.workflows.edges.list(
    "wf_abc123xyz",
    source_block="extract-1",
)

# Incoming edges of one block
incoming = client.workflows.edges.list(
    "wf_abc123xyz",
    target_block="hil-1",
)

for edge in edges:
    print(f"{edge.source_block}/{edge.source_handle} -> {edge.target_block}/{edge.target_handle}")
[
  {
    "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"
  },
  {
    "id": "edge-2",
    "workflow_id": "wf_abc123xyz",
    "organization_id": "org_123",
    "draft_version": "draft_v3",
    "source_block": "extract-1",
    "target_block": "hil-1",
    "source_handle": "output-json-0",
    "target_handle": "input-json-0",
    "updated_at": "2026-04-30T17:00:00Z"
  }
]

Authorizations

Api-Key
string
header
required

Path Parameters

workflow_id
string
required

Query Parameters

source_block
string | null

Filter by source block ID

target_block
string | null

Filter by target block ID

access_token
string | null

Response

Successful Response

workflow_id
string
required

Foreign key to workflow

organization_id
string
required

Organization ID for data isolation

source_block
string
required

ID of the source block

target_block
string
required

ID of the target block

id
string
draft_version
string | null

Draft version for live entities

source_handle
string | null

Output handle on source block

target_handle
string | null

Input handle on target block

updated_at
string<date-time>