from datetime import date
from retab import Retab
client = Retab()
# All recent runs of a single workflow
runs = client.workflows.runs.list(
workflow_id="wf_abc123xyz",
limit=20,
order="desc",
sort_by="created_at",
)
# Failed runs in the last 7 days
recent_failures = client.workflows.runs.list(
workflow_id="wf_abc123xyz",
status="error",
from_date=date(2026, 4, 24),
to_date=date(2026, 5, 1),
limit=50,
)
# ID pagination — second page
next_page = client.workflows.runs.list(
workflow_id="wf_abc123xyz",
after=runs.list_metadata.after,
limit=20,
)
# Slim payload — IDs and statuses only
slim = client.workflows.runs.list(
workflow_id="wf_abc123xyz",
limit=100,
)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const runs = await client.workflows.runs.list({
workflowId: "wf_abc123xyz",
limit: 20,
order: "desc",
sortBy: "created_at",
});
const recentFailures = await client.workflows.runs.list({
workflowId: "wf_abc123xyz",
status: "error",
fromDate: "2026-04-24",
toDate: "2026-05-01",
limit: 50,
});
const nextPage = await client.workflows.runs.list({
workflowId: "wf_abc123xyz",
after: runs.list_metadata.after,
limit: 20,
});
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)
}
runs, err := client.Workflows.Runs.List(ctx, &retab.WorkflowRunsListParams{
PaginationParams: retab.PaginationParams{Limit: ptr(20), Order: ptr("desc")},
WorkflowID: ptr("wf_abc123xyz"),
SortBy: ptr("created_at"),
})
if err != nil {
log.Fatal(err)
}
recentFailures, err := client.Workflows.Runs.List(ctx, &retab.WorkflowRunsListParams{
PaginationParams: retab.PaginationParams{Limit: ptr(50)},
WorkflowID: ptr("wf_abc123xyz"),
Status: ptr(retab.WorkflowRunsStatus("error")),
FromDate: ptr("2026-04-24"),
ToDate: ptr("2026-05-01"),
})
if err != nil {
log.Fatal(err)
}
nextPage, err := client.Workflows.Runs.List(ctx, &retab.WorkflowRunsListParams{
PaginationParams: retab.PaginationParams{
After: ptr(runs.ListMetadata.After),
Limit: ptr(20),
},
WorkflowID: ptr("wf_abc123xyz"),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(len(runs.Data), len(recentFailures.Data), len(nextPage.Data))
}
require 'retab'
require 'date'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
# All recent runs of a single workflow
runs = client.workflows.runs.list(
workflow_id: 'wf_abc123xyz',
limit: 20,
order: 'desc',
sort_by: 'created_at',
)
# Failed runs in the last 7 days
recent_failures = client.workflows.runs.list(
workflow_id: 'wf_abc123xyz',
status: 'error',
from_date: Date.new(2026, 4, 24),
to_date: Date.new(2026, 5, 1),
limit: 50,
)
# ID pagination — second page
next_page = client.workflows.runs.list(
workflow_id: 'wf_abc123xyz',
after: runs.list_metadata.after,
limit: 20,
)
use retab::enums::WorkflowRunsOrder;
use retab::resources::workflow_runs::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")?);
let runs = client
.workflows().runs()
.list(ListParams {
workflow_id: Some("wf_abc123xyz".into()),
limit: Some(20),
order: Some(WorkflowRunsOrder::Desc),
sort_by: Some("created_at".into()),
..Default::default()
})
.await?;
let _recent_failures = client
.workflows().runs()
.list(ListParams {
workflow_id: Some("wf_abc123xyz".into()),
status: Some(retab::enums::WorkflowRunsStatus::Error),
from_date: Some("2026-04-24".into()),
to_date: Some("2026-05-01".into()),
limit: Some(50),
..Default::default()
})
.await?;
let _next_page = client
.workflows().runs()
.list(ListParams {
workflow_id: Some("wf_abc123xyz".into()),
after: runs.list_metadata.after.clone(),
limit: Some(20),
..Default::default()
})
.await?;
println!("{}", runs.data.len());
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->runs()->list();
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.Runs.ListAsync(new WorkflowRunsListOptions());
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().runs().list("wf_abc123", null, null, null, null, null, null, null, null, null, null, null, 10L, null, "created_at");
System.out.println(result);
}
}
# All recent runs of one workflow
curl -X 'GET' \
'https://api.retab.com/v1/workflows/runs?workflow_id=wf_abc123xyz&limit=20&order=desc&sort_by=created_at' \
-H 'Authorization: Bearer <your-api-key>'
# Status filter + date range
curl -X 'GET' \
'https://api.retab.com/v1/workflows/runs?workflow_id=wf_abc123xyz&status=error&from_date=2026-04-24&to_date=2026-05-01&limit=50' \
-H 'Authorization: Bearer <your-api-key>'
{
"data": [
{
"id": "run_abc123",
"workflow": {
"workflow_id": "wf_abc123xyz",
"version_id": "ver_abc123xyz"
},
"trigger": { "type": "api" },
"lifecycle": { "status": "completed" },
"timing": {
"created_at": "2026-05-01T14:30:00Z",
"started_at": "2026-05-01T14:30:00Z",
"completed_at": "2026-05-01T14:30:15Z"
},
"inputs": {
"documents": {
"start-1": {
"id": "file_123",
"filename": "invoice.pdf",
"mime_type": "application/pdf"
}
},
"json_data": {}
}
},
{
"id": "run_def456",
"workflow": {
"workflow_id": "wf_abc123xyz",
"version_id": "ver_abc123xyz"
},
"trigger": { "type": "api" },
"lifecycle": {
"status": "error",
"message": "Extract block failed: schema validation",
"stage": "execution",
"category": null,
"details": null,
"failing_step_id": "extract-block-1"
},
"timing": {
"created_at": "2026-05-01T13:55:00Z",
"started_at": "2026-05-01T13:55:00Z",
"completed_at": "2026-05-01T13:55:08Z"
},
"inputs": {
"documents": {
"start-1": {
"id": "file_456",
"filename": "scan_blurry.pdf",
"mime_type": "application/pdf"
}
},
"json_data": {}
}
}
],
"list_metadata": {
"before": "run_abc123",
"after": "run_def456"
}
}
List Runs
List workflow runs with pagination and optional filters.
from datetime import date
from retab import Retab
client = Retab()
# All recent runs of a single workflow
runs = client.workflows.runs.list(
workflow_id="wf_abc123xyz",
limit=20,
order="desc",
sort_by="created_at",
)
# Failed runs in the last 7 days
recent_failures = client.workflows.runs.list(
workflow_id="wf_abc123xyz",
status="error",
from_date=date(2026, 4, 24),
to_date=date(2026, 5, 1),
limit=50,
)
# ID pagination — second page
next_page = client.workflows.runs.list(
workflow_id="wf_abc123xyz",
after=runs.list_metadata.after,
limit=20,
)
# Slim payload — IDs and statuses only
slim = client.workflows.runs.list(
workflow_id="wf_abc123xyz",
limit=100,
)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const runs = await client.workflows.runs.list({
workflowId: "wf_abc123xyz",
limit: 20,
order: "desc",
sortBy: "created_at",
});
const recentFailures = await client.workflows.runs.list({
workflowId: "wf_abc123xyz",
status: "error",
fromDate: "2026-04-24",
toDate: "2026-05-01",
limit: 50,
});
const nextPage = await client.workflows.runs.list({
workflowId: "wf_abc123xyz",
after: runs.list_metadata.after,
limit: 20,
});
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)
}
runs, err := client.Workflows.Runs.List(ctx, &retab.WorkflowRunsListParams{
PaginationParams: retab.PaginationParams{Limit: ptr(20), Order: ptr("desc")},
WorkflowID: ptr("wf_abc123xyz"),
SortBy: ptr("created_at"),
})
if err != nil {
log.Fatal(err)
}
recentFailures, err := client.Workflows.Runs.List(ctx, &retab.WorkflowRunsListParams{
PaginationParams: retab.PaginationParams{Limit: ptr(50)},
WorkflowID: ptr("wf_abc123xyz"),
Status: ptr(retab.WorkflowRunsStatus("error")),
FromDate: ptr("2026-04-24"),
ToDate: ptr("2026-05-01"),
})
if err != nil {
log.Fatal(err)
}
nextPage, err := client.Workflows.Runs.List(ctx, &retab.WorkflowRunsListParams{
PaginationParams: retab.PaginationParams{
After: ptr(runs.ListMetadata.After),
Limit: ptr(20),
},
WorkflowID: ptr("wf_abc123xyz"),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(len(runs.Data), len(recentFailures.Data), len(nextPage.Data))
}
require 'retab'
require 'date'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
# All recent runs of a single workflow
runs = client.workflows.runs.list(
workflow_id: 'wf_abc123xyz',
limit: 20,
order: 'desc',
sort_by: 'created_at',
)
# Failed runs in the last 7 days
recent_failures = client.workflows.runs.list(
workflow_id: 'wf_abc123xyz',
status: 'error',
from_date: Date.new(2026, 4, 24),
to_date: Date.new(2026, 5, 1),
limit: 50,
)
# ID pagination — second page
next_page = client.workflows.runs.list(
workflow_id: 'wf_abc123xyz',
after: runs.list_metadata.after,
limit: 20,
)
use retab::enums::WorkflowRunsOrder;
use retab::resources::workflow_runs::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")?);
let runs = client
.workflows().runs()
.list(ListParams {
workflow_id: Some("wf_abc123xyz".into()),
limit: Some(20),
order: Some(WorkflowRunsOrder::Desc),
sort_by: Some("created_at".into()),
..Default::default()
})
.await?;
let _recent_failures = client
.workflows().runs()
.list(ListParams {
workflow_id: Some("wf_abc123xyz".into()),
status: Some(retab::enums::WorkflowRunsStatus::Error),
from_date: Some("2026-04-24".into()),
to_date: Some("2026-05-01".into()),
limit: Some(50),
..Default::default()
})
.await?;
let _next_page = client
.workflows().runs()
.list(ListParams {
workflow_id: Some("wf_abc123xyz".into()),
after: runs.list_metadata.after.clone(),
limit: Some(20),
..Default::default()
})
.await?;
println!("{}", runs.data.len());
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->runs()->list();
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.Runs.ListAsync(new WorkflowRunsListOptions());
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().runs().list("wf_abc123", null, null, null, null, null, null, null, null, null, null, null, 10L, null, "created_at");
System.out.println(result);
}
}
# All recent runs of one workflow
curl -X 'GET' \
'https://api.retab.com/v1/workflows/runs?workflow_id=wf_abc123xyz&limit=20&order=desc&sort_by=created_at' \
-H 'Authorization: Bearer <your-api-key>'
# Status filter + date range
curl -X 'GET' \
'https://api.retab.com/v1/workflows/runs?workflow_id=wf_abc123xyz&status=error&from_date=2026-04-24&to_date=2026-05-01&limit=50' \
-H 'Authorization: Bearer <your-api-key>'
{
"data": [
{
"id": "run_abc123",
"workflow": {
"workflow_id": "wf_abc123xyz",
"version_id": "ver_abc123xyz"
},
"trigger": { "type": "api" },
"lifecycle": { "status": "completed" },
"timing": {
"created_at": "2026-05-01T14:30:00Z",
"started_at": "2026-05-01T14:30:00Z",
"completed_at": "2026-05-01T14:30:15Z"
},
"inputs": {
"documents": {
"start-1": {
"id": "file_123",
"filename": "invoice.pdf",
"mime_type": "application/pdf"
}
},
"json_data": {}
}
},
{
"id": "run_def456",
"workflow": {
"workflow_id": "wf_abc123xyz",
"version_id": "ver_abc123xyz"
},
"trigger": { "type": "api" },
"lifecycle": {
"status": "error",
"message": "Extract block failed: schema validation",
"stage": "execution",
"category": null,
"details": null,
"failing_step_id": "extract-block-1"
},
"timing": {
"created_at": "2026-05-01T13:55:00Z",
"started_at": "2026-05-01T13:55:00Z",
"completed_at": "2026-05-01T13:55:08Z"
},
"inputs": {
"documents": {
"start-1": {
"id": "file_456",
"filename": "scan_blurry.pdf",
"mime_type": "application/pdf"
}
},
"json_data": {}
}
}
],
"list_metadata": {
"before": "run_abc123",
"after": "run_def456"
}
}
before / after cursors:
- Pass the last
idfrom a page asafterto get the next page. - Pass the first
idfrom a page asbeforeto get the previous page.
statusfilters to a single run status (e.g."completed").trigger_typefilters to a single trigger type (e.g."api").from_date/to_dateaccept eitherYYYY-MM-DDstrings or Pythondateobjects (the SDK serializes them).fieldslets you slim the response down to just the keys you need (e.g."id,lifecycle,timing").
from datetime import date
from retab import Retab
client = Retab()
# All recent runs of a single workflow
runs = client.workflows.runs.list(
workflow_id="wf_abc123xyz",
limit=20,
order="desc",
sort_by="created_at",
)
# Failed runs in the last 7 days
recent_failures = client.workflows.runs.list(
workflow_id="wf_abc123xyz",
status="error",
from_date=date(2026, 4, 24),
to_date=date(2026, 5, 1),
limit=50,
)
# ID pagination — second page
next_page = client.workflows.runs.list(
workflow_id="wf_abc123xyz",
after=runs.list_metadata.after,
limit=20,
)
# Slim payload — IDs and statuses only
slim = client.workflows.runs.list(
workflow_id="wf_abc123xyz",
limit=100,
)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const runs = await client.workflows.runs.list({
workflowId: "wf_abc123xyz",
limit: 20,
order: "desc",
sortBy: "created_at",
});
const recentFailures = await client.workflows.runs.list({
workflowId: "wf_abc123xyz",
status: "error",
fromDate: "2026-04-24",
toDate: "2026-05-01",
limit: 50,
});
const nextPage = await client.workflows.runs.list({
workflowId: "wf_abc123xyz",
after: runs.list_metadata.after,
limit: 20,
});
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)
}
runs, err := client.Workflows.Runs.List(ctx, &retab.WorkflowRunsListParams{
PaginationParams: retab.PaginationParams{Limit: ptr(20), Order: ptr("desc")},
WorkflowID: ptr("wf_abc123xyz"),
SortBy: ptr("created_at"),
})
if err != nil {
log.Fatal(err)
}
recentFailures, err := client.Workflows.Runs.List(ctx, &retab.WorkflowRunsListParams{
PaginationParams: retab.PaginationParams{Limit: ptr(50)},
WorkflowID: ptr("wf_abc123xyz"),
Status: ptr(retab.WorkflowRunsStatus("error")),
FromDate: ptr("2026-04-24"),
ToDate: ptr("2026-05-01"),
})
if err != nil {
log.Fatal(err)
}
nextPage, err := client.Workflows.Runs.List(ctx, &retab.WorkflowRunsListParams{
PaginationParams: retab.PaginationParams{
After: ptr(runs.ListMetadata.After),
Limit: ptr(20),
},
WorkflowID: ptr("wf_abc123xyz"),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(len(runs.Data), len(recentFailures.Data), len(nextPage.Data))
}
require 'retab'
require 'date'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
# All recent runs of a single workflow
runs = client.workflows.runs.list(
workflow_id: 'wf_abc123xyz',
limit: 20,
order: 'desc',
sort_by: 'created_at',
)
# Failed runs in the last 7 days
recent_failures = client.workflows.runs.list(
workflow_id: 'wf_abc123xyz',
status: 'error',
from_date: Date.new(2026, 4, 24),
to_date: Date.new(2026, 5, 1),
limit: 50,
)
# ID pagination — second page
next_page = client.workflows.runs.list(
workflow_id: 'wf_abc123xyz',
after: runs.list_metadata.after,
limit: 20,
)
use retab::enums::WorkflowRunsOrder;
use retab::resources::workflow_runs::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")?);
let runs = client
.workflows().runs()
.list(ListParams {
workflow_id: Some("wf_abc123xyz".into()),
limit: Some(20),
order: Some(WorkflowRunsOrder::Desc),
sort_by: Some("created_at".into()),
..Default::default()
})
.await?;
let _recent_failures = client
.workflows().runs()
.list(ListParams {
workflow_id: Some("wf_abc123xyz".into()),
status: Some(retab::enums::WorkflowRunsStatus::Error),
from_date: Some("2026-04-24".into()),
to_date: Some("2026-05-01".into()),
limit: Some(50),
..Default::default()
})
.await?;
let _next_page = client
.workflows().runs()
.list(ListParams {
workflow_id: Some("wf_abc123xyz".into()),
after: runs.list_metadata.after.clone(),
limit: Some(20),
..Default::default()
})
.await?;
println!("{}", runs.data.len());
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->runs()->list();
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.Runs.ListAsync(new WorkflowRunsListOptions());
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().runs().list("wf_abc123", null, null, null, null, null, null, null, null, null, null, null, 10L, null, "created_at");
System.out.println(result);
}
}
# All recent runs of one workflow
curl -X 'GET' \
'https://api.retab.com/v1/workflows/runs?workflow_id=wf_abc123xyz&limit=20&order=desc&sort_by=created_at' \
-H 'Authorization: Bearer <your-api-key>'
# Status filter + date range
curl -X 'GET' \
'https://api.retab.com/v1/workflows/runs?workflow_id=wf_abc123xyz&status=error&from_date=2026-04-24&to_date=2026-05-01&limit=50' \
-H 'Authorization: Bearer <your-api-key>'
{
"data": [
{
"id": "run_abc123",
"workflow": {
"workflow_id": "wf_abc123xyz",
"version_id": "ver_abc123xyz"
},
"trigger": { "type": "api" },
"lifecycle": { "status": "completed" },
"timing": {
"created_at": "2026-05-01T14:30:00Z",
"started_at": "2026-05-01T14:30:00Z",
"completed_at": "2026-05-01T14:30:15Z"
},
"inputs": {
"documents": {
"start-1": {
"id": "file_123",
"filename": "invoice.pdf",
"mime_type": "application/pdf"
}
},
"json_data": {}
}
},
{
"id": "run_def456",
"workflow": {
"workflow_id": "wf_abc123xyz",
"version_id": "ver_abc123xyz"
},
"trigger": { "type": "api" },
"lifecycle": {
"status": "error",
"message": "Extract block failed: schema validation",
"stage": "execution",
"category": null,
"details": null,
"failing_step_id": "extract-block-1"
},
"timing": {
"created_at": "2026-05-01T13:55:00Z",
"started_at": "2026-05-01T13:55:00Z",
"completed_at": "2026-05-01T13:55:08Z"
},
"inputs": {
"documents": {
"start-1": {
"id": "file_456",
"filename": "scan_blurry.pdf",
"mime_type": "application/pdf"
}
},
"json_data": {}
}
}
],
"list_metadata": {
"before": "run_abc123",
"after": "run_def456"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter by workflow ID
Filter by run status
pending, queued, running, completed, error, failed, awaiting_review, cancelled Exclude runs with this status
pending, queued, running, completed, error, failed, awaiting_review, cancelled Filter by trigger type
manual, api, schedule, webhook, email, restart Filter runs created on or after this date (YYYY-MM-DD)
Filter runs created on or before this date (YYYY-MM-DD)
Filter runs with duration >= this value in milliseconds
Filter runs with duration <= this value in milliseconds
Search by run ID (partial match)
Filter by metadata equality: a JSON object of key/value pairs (e.g. {"tenant":"acme"}). Pairs AND together.
Items per page
1 <= x <= 100asc, desc Response
Successful Response
A page of WorkflowRun resources. data holds the items and list_metadata carries the before/after cursors; pass after to fetch the next page.