> ## Documentation Index
> Fetch the complete documentation index at: https://docs.retab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Workflow Eval Run

> Retrieve a single workflow eval run.

Identified by `run_id`. Returns the run with its lifecycle status, timing,
and pass/fail counts. Returns 404 if no run with that ID exists.

Fetch a workflow-eval run by `run_id`. Use this while polling for
`lifecycle.status`, then fetch the child results with [List Eval Run Results](/api-reference/workflows/evals/results/list).

<RequestExample>
  ```python Python theme={null}
  from retab import Retab

  client = Retab()

  run = client.workflows.evals.runs.get("wfevalrun_q1z2")

  print(run.lifecycle.status)
  print(run.counts)
  ```

  ```typescript TypeScript theme={null}
  import { Retab } from "@retab/node";

  const client = new Retab({ apiKey: process.env.RETAB_API_KEY });

  const run = await client.workflows.evals.runs.get("wfevalrun_q1z2");

  console.log(run.lifecycle.status);
  console.log(run.counts);
  ```

  ```go Go theme={null}
  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.Get(
  		ctx,
  		"wfevalrun_q1z2",
  	)
  	if err != nil {
  		log.Fatal(err)
  	}

  	fmt.Println(run.Lifecycle.Status())
  	fmt.Println(run.Counts)
  }
  ```

  ```ruby Ruby theme={null}
  require 'retab'

  client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])

  run = client.workflows.evals.runs.get(run_id: 'wfevalrun_q1z2')

  puts run.lifecycle.status
  puts run.counts
  ```

  ```rust Rust theme={null}
  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().get("wfevalrun_q1z2").await?;
      println!("{:?}", run.lifecycle);
      println!("{:?}", run.counts);
      Ok(())
  }
  ```

  ```php PHP theme={null}
  <?php
  require 'vendor/autoload.php';

  use Retab\Client;

  $client = new Client(apiKey: getenv('RETAB_API_KEY'));

  $result = $client->workflows()->evals()->runs()->get(
      runId: 'run_abc123',
  );
  print_r($result);
  ```

  ```csharp C# theme={null}
  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.GetAsync("run_abc123");
  Console.WriteLine(result);
  ```

  ```java Java theme={null}
  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).get("run_abc123");
      System.out.println(result);
    }
  }
  ```

  ```curl cURL theme={null}
  curl -X 'GET' \
    'https://api.retab.com/v1/workflows/evals/runs/wfevalrun_q1z2' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer <your-api-key>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "wfevalrun_q1z2",
    "workflow_id": "wf_abc123xyz",
    "workflow_version_id": "draft_2026_05_18",
    "trigger": { "type": "api" },
    "lifecycle": { "status": "completed" },
    "timing": {
      "created_at": "2026-05-18T10:00:00Z",
      "started_at": "2026-05-18T10:00:01Z",
      "completed_at": "2026-05-18T10:00:29Z",
      "duration_ms": 28000
    },
    "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": 1,
        "error": 0,
        "cancelled": 0
      },
      "outcome": {
        "passed": 1,
        "failed": 0,
        "blocked": 0
      }
    }
  }
  ```

  ```json 404 theme={null}
  {
    "detail": "Workflow eval run not found: wfevalrun_q1z2"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /v1/workflows/evals/runs/{run_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.retab.com
security: []
paths:
  /v1/workflows/evals/runs/{run_id}:
    get:
      tags:
        - Workflows
        - Workflow Eval Runs
      summary: Get Workflow Eval Run
      description: >-
        Retrieve a single workflow eval run.


        Identified by `run_id`. Returns the run with its lifecycle status,
        timing,

        and pass/fail counts. Returns 404 if no run with that ID exists.
      operationId: get_workflow_eval_run
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            type: string
            title: Run Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowEvalRun'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WorkflowEvalRun:
      properties:
        id:
          type: string
          title: Id
        workflow_id:
          type: string
          title: Workflow Id
        workflow_version_id:
          type: string
          title: Workflow Version Id
        trigger:
          $ref: '#/components/schemas/EvalRunTrigger'
        lifecycle:
          oneOf:
            - $ref: '#/components/schemas/PendingWorkflowEvalRun'
            - $ref: '#/components/schemas/QueuedWorkflowEvalRun'
            - $ref: '#/components/schemas/RunningWorkflowEvalRun'
            - $ref: '#/components/schemas/CompletedWorkflowEvalRun'
            - $ref: '#/components/schemas/ErrorWorkflowEvalRun'
            - $ref: '#/components/schemas/CancelledWorkflowEvalRun'
          title: Lifecycle
          discriminator:
            propertyName: status
            mapping:
              cancelled:
                $ref: '#/components/schemas/CancelledWorkflowEvalRun'
              completed:
                $ref: '#/components/schemas/CompletedWorkflowEvalRun'
              error:
                $ref: '#/components/schemas/ErrorWorkflowEvalRun'
              pending:
                $ref: '#/components/schemas/PendingWorkflowEvalRun'
              queued:
                $ref: '#/components/schemas/QueuedWorkflowEvalRun'
              running:
                $ref: '#/components/schemas/RunningWorkflowEvalRun'
        timing:
          $ref: '#/components/schemas/WorkflowEvalRunTiming'
        target:
          anyOf:
            - $ref: '#/components/schemas/EvalRunBlockTarget'
            - type: 'null'
        eval_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Eval Id
        total_evals:
          type: integer
          title: Total Evals
        counts:
          $ref: '#/components/schemas/BlockEvalBatchExecutionCounts'
          default:
            lifecycle_counts:
              cancelled: 0
              completed: 0
              error: 0
              pending: 0
              queued: 0
              running: 0
            outcome:
              blocked: 0
              failed: 0
              passed: 0
        freshness:
          $ref: '#/components/schemas/EvalRunFreshness'
          description: >-
            Compatibility envelope only. WorkflowEval.freshness is the
            authoritative read-time staleness verdict for saved eval
            definitions.
      type: object
      required:
        - id
        - lifecycle
        - timing
        - total_evals
        - trigger
        - workflow_id
        - workflow_version_id
      title: WorkflowEvalRun
      description: >-
        A batch execution of a workflow's evals, with overall `lifecycle`,
        `timing`, and pass/fail `counts`.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          default: []
      type: object
      title: HTTPValidationError
    EvalRunTrigger:
      properties:
        type:
          type: string
          enum:
            - manual
            - api
            - schedule
            - webhook
            - email
            - custom
            - restart
          title: Type
      type: object
      required:
        - type
      title: EvalRunTrigger
    PendingWorkflowEvalRun:
      properties:
        status:
          type: string
          const: pending
          title: Status
          default: pending
      type: object
      title: PendingWorkflowEvalRun
      description: The eval run has been created but execution has not started.
    QueuedWorkflowEvalRun:
      properties:
        status:
          type: string
          const: queued
          title: Status
          default: queued
      type: object
      title: QueuedWorkflowEvalRun
      description: The eval run is enqueued and waiting for a worker.
    RunningWorkflowEvalRun:
      properties:
        status:
          type: string
          const: running
          title: Status
          default: running
      type: object
      title: RunningWorkflowEvalRun
      description: The eval run is executing assertions.
    CompletedWorkflowEvalRun:
      properties:
        status:
          type: string
          const: completed
          title: Status
          default: completed
      type: object
      title: CompletedWorkflowEvalRun
      description: The eval run finished. Per-eval verdicts live on each result row.
    ErrorWorkflowEvalRun:
      properties:
        status:
          type: string
          const: error
          title: Status
          default: error
        message:
          type: string
          title: Message
          description: Human-readable error message
          default: (no message)
        details:
          anyOf:
            - $ref: '#/components/schemas/ErrorDetails'
            - type: 'null'
          description: Structured error context including stack trace
      type: object
      title: ErrorWorkflowEvalRun
      description: |-
        The eval run failed. The error message lives on this variant.

        Carries the same structured `details` envelope as workflow runs so
        consumers can branch on `error_code` / `stage` rather than parsing
        a free-text message.
    CancelledWorkflowEvalRun:
      properties:
        status:
          type: string
          const: cancelled
          title: Status
          default: cancelled
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: Human-readable reason, when known
      type: object
      title: CancelledWorkflowEvalRun
      description: The eval run was cancelled before reaching a natural terminal state.
    WorkflowEvalRunTiming:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the workflow-eval run was created.
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
      type: object
      title: WorkflowEvalRunTiming
    EvalRunBlockTarget:
      properties:
        type:
          type: string
          const: block
          title: Type
          default: block
        block_id:
          type: string
          title: Block Id
      type: object
      required:
        - block_id
      title: EvalRunBlockTarget
      description: >-
        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.
    BlockEvalBatchExecutionCounts:
      properties:
        lifecycle_counts:
          $ref: '#/components/schemas/BlockEvalLifecycleCounts'
          default:
            pending: 0
            queued: 0
            running: 0
            completed: 0
            error: 0
            cancelled: 0
        outcome:
          $ref: '#/components/schemas/BlockEvalOutcomeCounts'
          default:
            passed: 0
            failed: 0
            blocked: 0
      type: object
      title: BlockEvalBatchExecutionCounts
      description: |-
        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.
    EvalRunFreshness:
      properties:
        status:
          type: string
          enum:
            - fresh
            - stale
            - unknown
          title: Status
          default: unknown
        reasons:
          items:
            type: string
            enum:
              - validity_changed
              - inputs_changed
              - engine_changed
              - metrics_engine_changed
              - no_baseline
          type: array
          title: Reasons
          default: []
        validity_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Validity Fingerprint
        input_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Fingerprint
        baseline_run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Baseline Run Id
      type: object
      required:
        - baseline_run_id
        - input_fingerprint
        - validity_fingerprint
      title: EvalRunFreshness
      description: >-
        Compatibility envelope on WorkflowEvalRun. This is not the authoritative
        stale/fresh verdict for saved eval definitions; use
        WorkflowEval.freshness for current staleness presentation.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
          default: null
        ctx:
          type: object
          title: Context
          default: {}
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ErrorDetails:
      properties:
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: >-
            Human-readable error message. Free-text; the structured fields below
            are the machine-readable counterpart.
        stack_trace:
          anyOf:
            - type: string
            - type: 'null'
          title: Stack Trace
          description: Full stack trace
        block_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Block Id
          description: ID of the block that failed
        block_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Block Name
          description: Name/label of the block that failed
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code if available
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
          description: Additional context about the error
      type: object
      title: ErrorDetails
      description: |-
        Detailed error information for debugging.

        Captures stack traces and context about where and why an error occurred.
    BlockEvalLifecycleCounts:
      properties:
        pending:
          type: integer
          title: Pending
          default: 0
        queued:
          type: integer
          title: Queued
          default: 0
        running:
          type: integer
          title: Running
          default: 0
        completed:
          type: integer
          title: Completed
          default: 0
        error:
          type: integer
          title: Error
          default: 0
        cancelled:
          type: integer
          title: Cancelled
          default: 0
      type: object
      title: BlockEvalLifecycleCounts
      description: Per-lifecycle counts for a batch of block-eval runs.
    BlockEvalOutcomeCounts:
      properties:
        passed:
          type: integer
          title: Passed
          default: 0
        failed:
          type: integer
          title: Failed
          default: 0
        blocked:
          type: integer
          title: Blocked
          default: 0
      type: object
      title: BlockEvalOutcomeCounts
      description: Per-outcome counts. Only completed runs contribute to these buckets.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````