> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://onepin.ai/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://onepin.ai/docs/_mcp/server.

# Get Run Overview

GET https://api.onepin.ai/api/v1/workflows/{workflow_id}/runs/{run_id}/overview

Fetch server-computed overview aggregates for a workflow run.

Returns structured metric sections (e.g. audio duration totals, validation
pass rates) grouped by display section, along with per-language audio
breakdowns and per-validator scoring summaries. Also includes a
`workflow_snapshot` with the graph definition and per-node completion states.

This endpoint is best suited for a summary/results view after a run
completes. It differs from the other run sub-resources as follows:

* `GET /runs/{run_id}` — full run record including the raw definition snapshot.
* `GET /runs/{run_id}/status` — volatile status fields only; for polling.
* `GET /runs/{run_id}/steps` — lightweight per-node step log by default;
  `include_result=true` includes results and audio playback URLs.
* `GET /runs/{run_id}/outputs` — one logical result per snapshot sink node.
* `GET /runs/{run_id}/data` — paginated script+audio rows for a data table.
* `GET /runs/{run_id}/overview` (this endpoint) — pre-aggregated metrics and
  node state map for a dashboard/overview panel.

Reference: https://onepin.ai/docs/reference/api-reference/workflows/get-run-overview-api-v-1-workflows-workflow-id-runs-run-id-overview-get

## Authentication

- `Authorization` header (bearer token, required) — Clerk JWT token
- `Authorization` header (bearer token, required) — Onepin live API key (`op_live_...`). Test and public keys are reserved in Phase 1.

## Servers

- `https://api.onepin.ai` (prod, default)
- `https://dev-api.onepin.ai` (dev)

## Request

### Path parameters

- `workflow_id` (string, required)
- `run_id` (string, required)

### Headers

- `X-Workspace-Id` (string, optional, nullable)

## Response

### 200

Successful Response

- `data` (WorkflowRunOverviewOut, required)
- `meta` (Meta, required)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### WorkflowRunOverviewOut

- `workflow` (WorkflowRunOverviewWorkflowOut, required)
- `run` (WorkflowRunOverviewRunOut, required)
- `workflow_snapshot` (WorkflowRunOverviewSnapshotOut, required)
- `share` (RunShareOriginOut, optional, nullable) — Who published this run, and when. `shared_by` is the WORKSPACE name, never a person. The display-name path (`donut.utils.user.user_display_name`) falls back to the user's email address when both name fields are empty, which is not something to render on a page anyone can open. Note the workspace name is not automatically impersonal either: the default created at signup is "\<given name>'s Workspace", and that is an accepted, recorded trade-off rather than an oversight.
- `metric_sections` (list of WorkflowRunOverviewMetricSectionOut, optional)
- `audio_by_language` (list of WorkflowRunOverviewAudioLanguageOut, optional)
- `validators` (list of WorkflowRunOverviewValidatorOut, optional)
- `capabilities` (WorkflowRunOverviewCapabilitiesOut, optional)
- `future_links` (WorkflowRunOverviewFutureLinksOut, optional)

### Meta

- `request_id` (string, required)
- `timestamp` (datetime, required)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (ValidationErrorCtx, optional)

### WorkflowRunOverviewWorkflowOut

- `id` (string, required)
- `name` (string, required)

### WorkflowRunOverviewRunOut

- `id` (string, required)
- `status` (string, required)
- `run_number` (integer, required)
- `created_at` (datetime, required)
- `started_at` (datetime, optional, nullable)
- `completed_at` (datetime, optional, nullable)
- `paused_ms` (integer, optional, default: 0)
- `has_export` (boolean, optional, default: false)
- `error` (string, optional, nullable)

### WorkflowRunOverviewSnapshotOut

- `definition` (map from string to any, required)
- `node_states` (list of WorkflowRunOverviewNodeStateOut, optional)

### RunShareOriginOut

Who published this run, and when. `shared_by` is the WORKSPACE name, never a person. The display-name path (`donut.utils.user.user_display_name`) falls back to the user's email address when both name fields are empty, which is not something to render on a page anyone can open. Note the workspace name is not automatically impersonal either: the default created at signup is "\<given name>'s Workspace", and that is an accepted, recorded trade-off rather than an oversight.

- `shared_by` (string, required)
- `shared_at` (datetime, required)

### WorkflowRunOverviewMetricSectionOut

- `key` (string, required)
- `layout` (string, required)
- `title` (string, optional, nullable)
- `metrics` (list of WorkflowRunOverviewMetricOut, optional)

### WorkflowRunOverviewAudioLanguageOut

- `locale_code` (string, required)
- `line_count` (integer, required)
- `total_duration_ms` (integer, required)
- `avg_duration_ms` (integer, optional, nullable)

### WorkflowRunOverviewValidatorOut

- `node_id` (string, required)
- `kind` (string, required)
- `label` (string, required)
- `status` (enum, required)
  - Allowed values: `available`, `not_ready`, `unsupported`, `unavailable`
- `avg_score` (double, optional, nullable)
- `pass_rate` (double, optional, nullable)
- `pass_count` (integer, optional, nullable)
- `fail_count` (integer, optional, nullable)
- `retry_count` (integer, optional, nullable)
- `reason` (string, optional, nullable)

### WorkflowRunOverviewCapabilitiesOut

- `validator_drilldown` (boolean, optional, default: false)
- `live_trace_timing` (boolean, optional, default: false)
- `persisted_aggregates` (boolean, optional, default: false)

### WorkflowRunOverviewFutureLinksOut

- `validator_drilldown` (string, optional, nullable)
- `live_trace` (string, optional, nullable)

### ValidationErrorLocItems

### ValidationErrorCtx

### WorkflowRunOverviewNodeStateOut

- `node_id` (string, required)
- `node_type` (string, required)
- `status` (string, required)
- `node_display_name` (string, optional, default: )
- `iteration` (integer, optional, default: 1)
- `started_at` (datetime, optional, nullable)
- `completed_at` (datetime, optional, nullable)
- `duration_ms` (integer, optional, nullable)
- `error` (string, optional, nullable)

### WorkflowRunOverviewMetricOut

- `key` (string, required)
- `label` (string, required)
- `formatted_value` (string, required)
- `status` (enum, required)
  - Allowed values: `available`, `not_ready`, `unsupported`, `unavailable`
- `display` (WorkflowRunOverviewMetricDisplay, required)
- `value` (WorkflowRunOverviewMetricOutValue, optional, nullable)
- `unit` (string, optional, nullable)
- `reason` (string, optional, nullable)
- `annotation` (WorkflowRunOverviewMetricAnnotation, optional, nullable) — Small subtext under a metric value (e.g. `output_lines` → "2 dropped").

### WorkflowRunOverviewMetricDisplay

- `variant` (string, required)
- `emphasis` (string, optional, nullable)

### WorkflowRunOverviewMetricOutValue

### WorkflowRunOverviewMetricAnnotation

Small subtext under a metric value (e.g. `output_lines` → "2 dropped").

- `text` (string, required)
- `emphasis` (string, optional, nullable)

## Examples

**Response**

```json
{
  "data": {
    "workflow": {
      "id": "string",
      "name": "string"
    },
    "run": {
      "id": "string",
      "status": "string",
      "run_number": 1,
      "created_at": "2024-01-15T09:30:00Z",
      "started_at": "2024-01-15T09:30:00Z",
      "completed_at": "2024-01-15T09:30:00Z",
      "paused_ms": 0,
      "has_export": false,
      "error": "string"
    },
    "workflow_snapshot": {
      "definition": {},
      "node_states": [
        {
          "node_id": "string",
          "node_type": "string",
          "status": "string",
          "node_display_name": "",
          "iteration": 1,
          "started_at": "2024-01-15T09:30:00Z",
          "completed_at": "2024-01-15T09:30:00Z",
          "duration_ms": 1,
          "error": "string"
        }
      ]
    },
    "share": {
      "shared_by": "string",
      "shared_at": "2024-01-15T09:30:00Z"
    },
    "metric_sections": [
      {
        "key": "string",
        "layout": "string",
        "title": "string",
        "metrics": [
          {
            "key": "string",
            "label": "string",
            "formatted_value": "string",
            "status": "available",
            "display": {
              "variant": "string",
              "emphasis": "string"
            },
            "value": 1,
            "unit": "string",
            "reason": "string",
            "annotation": {
              "text": "string",
              "emphasis": "string"
            }
          }
        ]
      }
    ],
    "audio_by_language": [
      {
        "locale_code": "string",
        "line_count": 1,
        "total_duration_ms": 1,
        "avg_duration_ms": 1
      }
    ],
    "validators": [
      {
        "node_id": "string",
        "kind": "string",
        "label": "string",
        "status": "available",
        "avg_score": 1.1,
        "pass_rate": 1.1,
        "pass_count": 1,
        "fail_count": 1,
        "retry_count": 1,
        "reason": "string"
      }
    ],
    "capabilities": {
      "validator_drilldown": false,
      "live_trace_timing": false,
      "persisted_aggregates": false
    },
    "future_links": {
      "validator_drilldown": "string",
      "live_trace": "string"
    }
  },
  "meta": {
    "request_id": "string",
    "timestamp": "2024-01-15T09:30:00Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.onepin.ai/api/v1/workflows/workflow_id/runs/run_id/overview"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.onepin.ai/api/v1/workflows/workflow_id/runs/run_id/overview';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.onepin.ai/api/v1/workflows/workflow_id/runs/run_id/overview"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.onepin.ai/api/v1/workflows/workflow_id/runs/run_id/overview")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.onepin.ai/api/v1/workflows/workflow_id/runs/run_id/overview")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.onepin.ai/api/v1/workflows/workflow_id/runs/run_id/overview', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.onepin.ai/api/v1/workflows/workflow_id/runs/run_id/overview");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.onepin.ai/api/v1/workflows/workflow_id/runs/run_id/overview")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```