from retab import Retab
client = Retab()
run = client.workflows.tests.runs.cancel("wftestrun_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.tests.runs.cancel("wftestrun_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.Tests.Runs.Cancel(ctx, "wftestrun_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.workflow_test_runs.cancel(run_id: 'wftestrun_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().tests().runs().cancel("wftestrun_q1z2").await?;
println!("{:?}", run.lifecycle);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflowTestRuns()->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.Tests.Runs.CancelAsync("run_abc123");
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().tests().runs().cancel("run_abc123");
System.out.println(result);
}
}
curl -X 'POST' \
'https://api.retab.com/v1/workflows/tests/runs/wftestrun_q1z2/cancel' \
-H 'Authorization: Bearer <your-api-key>'
{
"id": "wftestrun_q1z2",
"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"
}
}
Cancel Workflow Test Run
Cancel a workflow test 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.tests.runs.cancel("wftestrun_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.tests.runs.cancel("wftestrun_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.Tests.Runs.Cancel(ctx, "wftestrun_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.workflow_test_runs.cancel(run_id: 'wftestrun_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().tests().runs().cancel("wftestrun_q1z2").await?;
println!("{:?}", run.lifecycle);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflowTestRuns()->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.Tests.Runs.CancelAsync("run_abc123");
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().tests().runs().cancel("run_abc123");
System.out.println(result);
}
}
curl -X 'POST' \
'https://api.retab.com/v1/workflows/tests/runs/wftestrun_q1z2/cancel' \
-H 'Authorization: Bearer <your-api-key>'
{
"id": "wftestrun_q1z2",
"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"
}
}
run_id. Cancellation is
run-specific; you do not pass the workflow id or test id when cancelling.
from retab import Retab
client = Retab()
run = client.workflows.tests.runs.cancel("wftestrun_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.tests.runs.cancel("wftestrun_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.Tests.Runs.Cancel(ctx, "wftestrun_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.workflow_test_runs.cancel(run_id: 'wftestrun_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().tests().runs().cancel("wftestrun_q1z2").await?;
println!("{:?}", run.lifecycle);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflowTestRuns()->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.Tests.Runs.CancelAsync("run_abc123");
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().tests().runs().cancel("run_abc123");
System.out.println(result);
}
}
curl -X 'POST' \
'https://api.retab.com/v1/workflows/tests/runs/wftestrun_q1z2/cancel' \
-H 'Authorization: Bearer <your-api-key>'
{
"id": "wftestrun_q1z2",
"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"
}
}
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 tests, with overall lifecycle, timing, and pass/fail counts.
Public summary of what started a run: just the trigger category.
The full per-variant detail (schedule_id, parent_run_id, sender, ...) is
kept internally on StoredWorkflowRun.trigger but intentionally not
exposed in the public API surface.
Show child attributes
Show child attributes
The test run has been created but execution has not started.
- PendingWorkflowTestRun
- QueuedWorkflowTestRun
- RunningWorkflowTestRun
- CompletedWorkflowTestRun
- ErrorWorkflowTestRun
- CancelledWorkflowTestRun
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Public workflow-test 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-test 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
Show child attributes
Show child attributes