from retab import Retab
client = Retab()
run = client.workflows.evals.runs.cancel("wfevalrun_q1z2")
print(run.lifecycle.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const run = await client.workflows.evals.runs.cancel("wfevalrun_q1z2");
console.log(run.lifecycle.status);
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)
}
run, err := client.Workflows.Evals.Runs.Cancel(ctx, "wfevalrun_q1z2")
if err != nil {
log.Fatal(err)
}
fmt.Println(run.Lifecycle.Status())
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
run = client.workflows.evals.runs.cancel(run_id: 'wfevalrun_q1z2')
puts run.lifecycle.status
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 run = client.workflows().evals().runs().cancel("wfevalrun_q1z2").await?;
println!("{:?}", run.lifecycle);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->evals()->runs()->cancel(
runId: 'run_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.Evals.Runs.CancelAsync("run_abc123");
Console.WriteLine(result);
import com.retab.RetabClient;
import com.retab.workflowevalruns.WorkflowEvalRunsApi;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = new WorkflowEvalRunsApi(client).cancel("run_abc123");
System.out.println(result);
}
}
curl -X 'POST' \
'https://api.retab.com/v1/workflows/evals/runs/wfevalrun_q1z2/cancel' \
-H 'Authorization: Bearer <your-api-key>'
{
"id": "wfevalrun_q1z2",
"workflow_id": "wf_abc123xyz",
"workflow_version_id": "draft_2026_05_18",
"trigger": { "type": "api" },
"lifecycle": { "status": "cancelled" },
"timing": {
"created_at": "2026-05-18T10:00:00Z",
"started_at": "2026-05-18T10:00:01Z",
"completed_at": "2026-05-18T10:00:04Z",
"duration_ms": 3000
},
"eval_id": "wfnodeeval_hsLEQiM61ez9Piv147MWk",
"target": { "type": "block", "block_id": "block_extract_invoice" },
"total_evals": 1,
"counts": {
"lifecycle_counts": {
"pending": 0,
"queued": 0,
"running": 0,
"completed": 0,
"error": 0,
"cancelled": 1
},
"outcome": {
"passed": 0,
"failed": 0,
"blocked": 0
}
}
}
Cancel Workflow Eval Run
Cancel a workflow eval run.
Identified by run_id. Stops the run and returns it with its updated
cancelled lifecycle. Returns 404 if the run does not exist or is not in a
cancellable state.
from retab import Retab
client = Retab()
run = client.workflows.evals.runs.cancel("wfevalrun_q1z2")
print(run.lifecycle.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const run = await client.workflows.evals.runs.cancel("wfevalrun_q1z2");
console.log(run.lifecycle.status);
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)
}
run, err := client.Workflows.Evals.Runs.Cancel(ctx, "wfevalrun_q1z2")
if err != nil {
log.Fatal(err)
}
fmt.Println(run.Lifecycle.Status())
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
run = client.workflows.evals.runs.cancel(run_id: 'wfevalrun_q1z2')
puts run.lifecycle.status
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 run = client.workflows().evals().runs().cancel("wfevalrun_q1z2").await?;
println!("{:?}", run.lifecycle);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->evals()->runs()->cancel(
runId: 'run_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.Evals.Runs.CancelAsync("run_abc123");
Console.WriteLine(result);
import com.retab.RetabClient;
import com.retab.workflowevalruns.WorkflowEvalRunsApi;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = new WorkflowEvalRunsApi(client).cancel("run_abc123");
System.out.println(result);
}
}
curl -X 'POST' \
'https://api.retab.com/v1/workflows/evals/runs/wfevalrun_q1z2/cancel' \
-H 'Authorization: Bearer <your-api-key>'
{
"id": "wfevalrun_q1z2",
"workflow_id": "wf_abc123xyz",
"workflow_version_id": "draft_2026_05_18",
"trigger": { "type": "api" },
"lifecycle": { "status": "cancelled" },
"timing": {
"created_at": "2026-05-18T10:00:00Z",
"started_at": "2026-05-18T10:00:01Z",
"completed_at": "2026-05-18T10:00:04Z",
"duration_ms": 3000
},
"eval_id": "wfnodeeval_hsLEQiM61ez9Piv147MWk",
"target": { "type": "block", "block_id": "block_extract_invoice" },
"total_evals": 1,
"counts": {
"lifecycle_counts": {
"pending": 0,
"queued": 0,
"running": 0,
"completed": 0,
"error": 0,
"cancelled": 1
},
"outcome": {
"passed": 0,
"failed": 0,
"blocked": 0
}
}
}
run_id. Cancellation is
run-specific; you do not pass the workflow id or eval id when cancelling.
from retab import Retab
client = Retab()
run = client.workflows.evals.runs.cancel("wfevalrun_q1z2")
print(run.lifecycle.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const run = await client.workflows.evals.runs.cancel("wfevalrun_q1z2");
console.log(run.lifecycle.status);
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)
}
run, err := client.Workflows.Evals.Runs.Cancel(ctx, "wfevalrun_q1z2")
if err != nil {
log.Fatal(err)
}
fmt.Println(run.Lifecycle.Status())
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
run = client.workflows.evals.runs.cancel(run_id: 'wfevalrun_q1z2')
puts run.lifecycle.status
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 run = client.workflows().evals().runs().cancel("wfevalrun_q1z2").await?;
println!("{:?}", run.lifecycle);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->evals()->runs()->cancel(
runId: 'run_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.Evals.Runs.CancelAsync("run_abc123");
Console.WriteLine(result);
import com.retab.RetabClient;
import com.retab.workflowevalruns.WorkflowEvalRunsApi;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = new WorkflowEvalRunsApi(client).cancel("run_abc123");
System.out.println(result);
}
}
curl -X 'POST' \
'https://api.retab.com/v1/workflows/evals/runs/wfevalrun_q1z2/cancel' \
-H 'Authorization: Bearer <your-api-key>'
{
"id": "wfevalrun_q1z2",
"workflow_id": "wf_abc123xyz",
"workflow_version_id": "draft_2026_05_18",
"trigger": { "type": "api" },
"lifecycle": { "status": "cancelled" },
"timing": {
"created_at": "2026-05-18T10:00:00Z",
"started_at": "2026-05-18T10:00:01Z",
"completed_at": "2026-05-18T10:00:04Z",
"duration_ms": 3000
},
"eval_id": "wfnodeeval_hsLEQiM61ez9Piv147MWk",
"target": { "type": "block", "block_id": "block_extract_invoice" },
"total_evals": 1,
"counts": {
"lifecycle_counts": {
"pending": 0,
"queued": 0,
"running": 0,
"completed": 0,
"error": 0,
"cancelled": 1
},
"outcome": {
"passed": 0,
"failed": 0,
"blocked": 0
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
A batch execution of a workflow's evals, with overall lifecycle, timing, and pass/fail counts.
Show child attributes
Show child attributes
The eval run has been created but execution has not started.
- PendingWorkflowEvalRun
- QueuedWorkflowEvalRun
- RunningWorkflowEvalRun
- CompletedWorkflowEvalRun
- ErrorWorkflowEvalRun
- CancelledWorkflowEvalRun
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Public workflow-eval target.
The storage layer remains block-scoped today, but the API shape names the tested entity explicitly so workflow-level targets can be added later.
Show child attributes
Show child attributes
Aggregate counts for a batch of block-eval runs.
Each individual run contributes to exactly one lifecycle_counts
bucket, and additionally to one outcome bucket when
lifecycle_counts.completed is incremented.
Show child attributes
Show child attributes
Compatibility envelope only. WorkflowEval.freshness is the authoritative read-time staleness verdict for saved eval definitions.
Show child attributes
Show child attributes