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="extract-1",
)
for edge in edges.data:
print(f"{edge.source_block}/{edge.source_handle} -> {edge.target_block}/{edge.target_handle}")
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edges = await client.workflows.edges.list({ workflowId: "wf_abc123xyz" });
const outgoing = await client.workflows.edges.list({ workflowId: "wf_abc123xyz",
sourceBlock: "extract-1",
});
const incoming = await client.workflows.edges.list({ workflowId: "wf_abc123xyz",
targetBlock: "extract-1",
});
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
// All edges
edges, err := client.Workflows.Edges.List(ctx, &retab.WorkflowEdgesListParams{
WorkflowID: "wf_abc123xyz",
})
if err != nil {
log.Fatal(err)
}
// Outgoing edges of one block
outgoing, err := client.Workflows.Edges.List(ctx, &retab.WorkflowEdgesListParams{
WorkflowID: "wf_abc123xyz",
SourceBlock: ptr("extract-1"),
})
if err != nil {
log.Fatal(err)
}
// Incoming edges of one block
incoming, err := client.Workflows.Edges.List(ctx, &retab.WorkflowEdgesListParams{
WorkflowID: "wf_abc123xyz",
TargetBlock: ptr("extract-1"),
})
if err != nil {
log.Fatal(err)
}
for _, edge := range edges.Data {
fmt.Printf("%s/%v -> %s/%v\n", edge.SourceBlock, edge.SourceHandle, edge.TargetBlock, edge.TargetHandle)
}
_, _ = outgoing, incoming
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
# All edges
edges = client.workflows.edges.list(workflow_id: 'wf_abc123xyz')
# Outgoing edges of one block
outgoing = client.workflows.edges.list(
workflow_id: 'wf_abc123xyz',
source_block: 'extract-1',
)
# Incoming edges of one block
incoming = client.workflows.edges.list(
workflow_id: 'wf_abc123xyz',
target_block: 'extract-1',
)
edges.data.each do |edge|
puts "#{edge.source_block}/#{edge.source_handle} -> #{edge.target_block}/#{edge.target_handle}"
end
use retab::resources::workflow_edges::ListParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
// All edges
let edges = client
.workflows().edges()
.list(ListParams::new("wf_abc123xyz"))
.await?;
// Outgoing edges of one block
let _outgoing = client
.workflows().edges()
.list(ListParams {
source_block: Some("extract-1".into()),
..ListParams::new("wf_abc123xyz")
})
.await?;
// Incoming edges of one block
let _incoming = client
.workflows().edges()
.list(ListParams {
target_block: Some("extract-1".into()),
..ListParams::new("wf_abc123xyz")
})
.await?;
for edge in &edges.data {
println!(
"{}/{} -> {}/{}",
edge.source_block,
edge.source_handle.as_deref().unwrap_or(""),
edge.target_block,
edge.target_handle.as_deref().unwrap_or(""),
);
}
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->edges()->list(
workflowId: 'wf_abc123',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Workflows.Edges.ListAsync(new WorkflowEdgesListOptions());
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.workflows().edges().list("wf_abc123", null, null, null, null, 10L);
System.out.println(result);
}
}
# All edges
curl -X 'GET' \
'https://api.retab.com/v1/workflows/edges?workflow_id=wf_abc123xyz' \
-H 'Authorization: Bearer <your-api-key>'
# Filter by source block
curl -X 'GET' \
'https://api.retab.com/v1/workflows/edges?workflow_id=wf_abc123xyz&source_block=extract-1' \
-H 'Authorization: Bearer <your-api-key>'
{
"data": [
{
"id": "edge-1",
"workflow_id": "wf_abc123xyz",
"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"
}
],
"list_metadata": {
"before": null,
"after": null
}
}
{
"detail": "Workflow not found"
}
List Edges
List edges for a workflow with keyset cursor pagination.
Optionally filter by source or target block ID. Sorted by updated_at
descending with id as the tiebreaker. Pass after for the next
page, before for the previous page — mutually exclusive.
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="extract-1",
)
for edge in edges.data:
print(f"{edge.source_block}/{edge.source_handle} -> {edge.target_block}/{edge.target_handle}")
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edges = await client.workflows.edges.list({ workflowId: "wf_abc123xyz" });
const outgoing = await client.workflows.edges.list({ workflowId: "wf_abc123xyz",
sourceBlock: "extract-1",
});
const incoming = await client.workflows.edges.list({ workflowId: "wf_abc123xyz",
targetBlock: "extract-1",
});
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
// All edges
edges, err := client.Workflows.Edges.List(ctx, &retab.WorkflowEdgesListParams{
WorkflowID: "wf_abc123xyz",
})
if err != nil {
log.Fatal(err)
}
// Outgoing edges of one block
outgoing, err := client.Workflows.Edges.List(ctx, &retab.WorkflowEdgesListParams{
WorkflowID: "wf_abc123xyz",
SourceBlock: ptr("extract-1"),
})
if err != nil {
log.Fatal(err)
}
// Incoming edges of one block
incoming, err := client.Workflows.Edges.List(ctx, &retab.WorkflowEdgesListParams{
WorkflowID: "wf_abc123xyz",
TargetBlock: ptr("extract-1"),
})
if err != nil {
log.Fatal(err)
}
for _, edge := range edges.Data {
fmt.Printf("%s/%v -> %s/%v\n", edge.SourceBlock, edge.SourceHandle, edge.TargetBlock, edge.TargetHandle)
}
_, _ = outgoing, incoming
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
# All edges
edges = client.workflows.edges.list(workflow_id: 'wf_abc123xyz')
# Outgoing edges of one block
outgoing = client.workflows.edges.list(
workflow_id: 'wf_abc123xyz',
source_block: 'extract-1',
)
# Incoming edges of one block
incoming = client.workflows.edges.list(
workflow_id: 'wf_abc123xyz',
target_block: 'extract-1',
)
edges.data.each do |edge|
puts "#{edge.source_block}/#{edge.source_handle} -> #{edge.target_block}/#{edge.target_handle}"
end
use retab::resources::workflow_edges::ListParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
// All edges
let edges = client
.workflows().edges()
.list(ListParams::new("wf_abc123xyz"))
.await?;
// Outgoing edges of one block
let _outgoing = client
.workflows().edges()
.list(ListParams {
source_block: Some("extract-1".into()),
..ListParams::new("wf_abc123xyz")
})
.await?;
// Incoming edges of one block
let _incoming = client
.workflows().edges()
.list(ListParams {
target_block: Some("extract-1".into()),
..ListParams::new("wf_abc123xyz")
})
.await?;
for edge in &edges.data {
println!(
"{}/{} -> {}/{}",
edge.source_block,
edge.source_handle.as_deref().unwrap_or(""),
edge.target_block,
edge.target_handle.as_deref().unwrap_or(""),
);
}
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->edges()->list(
workflowId: 'wf_abc123',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Workflows.Edges.ListAsync(new WorkflowEdgesListOptions());
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.workflows().edges().list("wf_abc123", null, null, null, null, 10L);
System.out.println(result);
}
}
# All edges
curl -X 'GET' \
'https://api.retab.com/v1/workflows/edges?workflow_id=wf_abc123xyz' \
-H 'Authorization: Bearer <your-api-key>'
# Filter by source block
curl -X 'GET' \
'https://api.retab.com/v1/workflows/edges?workflow_id=wf_abc123xyz&source_block=extract-1' \
-H 'Authorization: Bearer <your-api-key>'
{
"data": [
{
"id": "edge-1",
"workflow_id": "wf_abc123xyz",
"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"
}
],
"list_metadata": {
"before": null,
"after": null
}
}
{
"detail": "Workflow not found"
}
source_block or target_block.
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 }.
Use this endpoint with List Blocks when you need to reconstruct a workflow graph.
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="extract-1",
)
for edge in edges.data:
print(f"{edge.source_block}/{edge.source_handle} -> {edge.target_block}/{edge.target_handle}")
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edges = await client.workflows.edges.list({ workflowId: "wf_abc123xyz" });
const outgoing = await client.workflows.edges.list({ workflowId: "wf_abc123xyz",
sourceBlock: "extract-1",
});
const incoming = await client.workflows.edges.list({ workflowId: "wf_abc123xyz",
targetBlock: "extract-1",
});
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
// All edges
edges, err := client.Workflows.Edges.List(ctx, &retab.WorkflowEdgesListParams{
WorkflowID: "wf_abc123xyz",
})
if err != nil {
log.Fatal(err)
}
// Outgoing edges of one block
outgoing, err := client.Workflows.Edges.List(ctx, &retab.WorkflowEdgesListParams{
WorkflowID: "wf_abc123xyz",
SourceBlock: ptr("extract-1"),
})
if err != nil {
log.Fatal(err)
}
// Incoming edges of one block
incoming, err := client.Workflows.Edges.List(ctx, &retab.WorkflowEdgesListParams{
WorkflowID: "wf_abc123xyz",
TargetBlock: ptr("extract-1"),
})
if err != nil {
log.Fatal(err)
}
for _, edge := range edges.Data {
fmt.Printf("%s/%v -> %s/%v\n", edge.SourceBlock, edge.SourceHandle, edge.TargetBlock, edge.TargetHandle)
}
_, _ = outgoing, incoming
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
# All edges
edges = client.workflows.edges.list(workflow_id: 'wf_abc123xyz')
# Outgoing edges of one block
outgoing = client.workflows.edges.list(
workflow_id: 'wf_abc123xyz',
source_block: 'extract-1',
)
# Incoming edges of one block
incoming = client.workflows.edges.list(
workflow_id: 'wf_abc123xyz',
target_block: 'extract-1',
)
edges.data.each do |edge|
puts "#{edge.source_block}/#{edge.source_handle} -> #{edge.target_block}/#{edge.target_handle}"
end
use retab::resources::workflow_edges::ListParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
// All edges
let edges = client
.workflows().edges()
.list(ListParams::new("wf_abc123xyz"))
.await?;
// Outgoing edges of one block
let _outgoing = client
.workflows().edges()
.list(ListParams {
source_block: Some("extract-1".into()),
..ListParams::new("wf_abc123xyz")
})
.await?;
// Incoming edges of one block
let _incoming = client
.workflows().edges()
.list(ListParams {
target_block: Some("extract-1".into()),
..ListParams::new("wf_abc123xyz")
})
.await?;
for edge in &edges.data {
println!(
"{}/{} -> {}/{}",
edge.source_block,
edge.source_handle.as_deref().unwrap_or(""),
edge.target_block,
edge.target_handle.as_deref().unwrap_or(""),
);
}
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->edges()->list(
workflowId: 'wf_abc123',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Workflows.Edges.ListAsync(new WorkflowEdgesListOptions());
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.workflows().edges().list("wf_abc123", null, null, null, null, 10L);
System.out.println(result);
}
}
# All edges
curl -X 'GET' \
'https://api.retab.com/v1/workflows/edges?workflow_id=wf_abc123xyz' \
-H 'Authorization: Bearer <your-api-key>'
# Filter by source block
curl -X 'GET' \
'https://api.retab.com/v1/workflows/edges?workflow_id=wf_abc123xyz&source_block=extract-1' \
-H 'Authorization: Bearer <your-api-key>'
{
"data": [
{
"id": "edge-1",
"workflow_id": "wf_abc123xyz",
"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"
}
],
"list_metadata": {
"before": null,
"after": null
}
}
{
"detail": "Workflow not found"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter by source block ID
Filter by target block ID
Edge id cursor: return the page before this id (mutually exclusive with after).
Edge id cursor: return the page after this id (mutually exclusive with before).
Maximum number of edges to return per page (1-200).
1 <= x <= 200Response
Successful Response
A page of WorkflowEdge resources. data holds the items and list_metadata carries the before/after cursors; pass after to fetch the next page.