use retab::models::{CreateWorkflowEvalRunRequest, WorkflowEvalRunSingleScope};use retab::resources::workflow_eval_runs::CreateParams;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() .create(CreateParams::new(CreateWorkflowEvalRunRequest { workflow_id: "wf_abc123xyz".into(), scope: Some(WorkflowEvalRunSingleScope { type_: "single".into(), eval_id: "wfnodeeval_hsLEQiM61ez9Piv147MWk".into(), }.into()), })) .await?; println!("{} {:?}", run.id, run.lifecycle); Ok(())}
<?phprequire 'vendor/autoload.php';use Retab\Client;$client = new Client(apiKey: getenv('RETAB_API_KEY'));$result = $client->workflows()->evals()->runs()->create();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.CreateAsync( new WorkflowEvalRunsCreateOptions { WorkflowId = "wf_abc123xyz", Scope = new WorkflowEvalRunSingleScope { EvalId = "wfnodeeval_hsLEQiM61ez9Piv147MWk", }, });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).create("wf_abc123", null); System.out.println(result); }}
use retab::models::{CreateWorkflowEvalRunRequest, WorkflowEvalRunSingleScope};use retab::resources::workflow_eval_runs::CreateParams;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() .create(CreateParams::new(CreateWorkflowEvalRunRequest { workflow_id: "wf_abc123xyz".into(), scope: Some(WorkflowEvalRunSingleScope { type_: "single".into(), eval_id: "wfnodeeval_hsLEQiM61ez9Piv147MWk".into(), }.into()), })) .await?; println!("{} {:?}", run.id, run.lifecycle); Ok(())}
<?phprequire 'vendor/autoload.php';use Retab\Client;$client = new Client(apiKey: getenv('RETAB_API_KEY'));$result = $client->workflows()->evals()->runs()->create();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.CreateAsync( new WorkflowEvalRunsCreateOptions { WorkflowId = "wf_abc123xyz", Scope = new WorkflowEvalRunSingleScope { EvalId = "wfnodeeval_hsLEQiM61ez9Piv147MWk", }, });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).create("wf_abc123", null); System.out.println(result); }}
Create a workflow-eval run against the current workflow draft. A run can execute
one saved eval, every eval for one block, or every eval in the workflow.The canonical route is flat: send workflow_id in the request body and
optionally narrow execution with scope. If scope is omitted, every saved
eval in the workflow runs.The response is a run resource. Use its id with the run-id-first endpoints:
Get Workflow Eval Run, List Eval
Run Results.The request body has a workflow context and an optional scope:
omitted scope - run every saved eval in the workflow.
scope.type = "single" - run one saved eval by eval_id.
scope.type = "block" - run every saved eval for one block by block_id.
use retab::models::{CreateWorkflowEvalRunRequest, WorkflowEvalRunSingleScope};use retab::resources::workflow_eval_runs::CreateParams;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() .create(CreateParams::new(CreateWorkflowEvalRunRequest { workflow_id: "wf_abc123xyz".into(), scope: Some(WorkflowEvalRunSingleScope { type_: "single".into(), eval_id: "wfnodeeval_hsLEQiM61ez9Piv147MWk".into(), }.into()), })) .await?; println!("{} {:?}", run.id, run.lifecycle); Ok(())}
<?phprequire 'vendor/autoload.php';use Retab\Client;$client = new Client(apiKey: getenv('RETAB_API_KEY'));$result = $client->workflows()->evals()->runs()->create();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.CreateAsync( new WorkflowEvalRunsCreateOptions { WorkflowId = "wf_abc123xyz", Scope = new WorkflowEvalRunSingleScope { EvalId = "wfnodeeval_hsLEQiM61ez9Piv147MWk", }, });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).create("wf_abc123", null); System.out.println(result); }}
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Create a workflow eval run. Provide a workflow_id, and optionally narrow execution with scope to a single eval or one block. Omit scope to run every saved workflow eval.
Each individual run contributes to exactly one lifecycle_counts
bucket, and additionally to one outcome bucket when
lifecycle_counts.completed is incremented.