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

# Pipeline Runs

> Monitor pipeline execution progress, download validation errors, and retry failed runs with checkpoint support.

<Frame caption="The Flow Runs page in the Data module.">
  <img src="https://mintcdn.com/kaireonai/l-jsUQlUEuA3B6hG/images/screenshots/pipeline-runs-list.png?fit=max&auto=format&n=l-jsUQlUEuA3B6hG&q=85&s=f7d5d8fa75b78d89b7266c4b27764544" alt="Flow Runs list view showing pipeline execution history" width="1440" height="900" data-path="images/screenshots/pipeline-runs-list.png" />
</Frame>

## GET /api/v1/pipelines/{id}/runs/{runId}/progress

Returns detailed progress information for a pipeline run including row counts, partition details, ETA, validation errors (first 20), and log entries.

### Path Parameters

| Parameter | Type   | Description     |
| --------- | ------ | --------------- |
| `id`      | string | Pipeline ID     |
| `runId`   | string | Pipeline run ID |

### Response

```json theme={null}
{
  "status": "running",
  "totalRows": 50000,
  "processedRows": 32000,
  "failedRows": 12,
  "skippedRows": 3,
  "partitions": 4,
  "completedPartitions": 2,
  "partitionDetails": [
    { "index": 0, "status": "completed", "rows": 12500 },
    { "index": 1, "status": "completed", "rows": 12500 },
    { "index": 2, "status": "running", "rows": 7000, "progress": 56 },
    { "index": 3, "status": "pending", "rows": 0 }
  ],
  "validationErrors": [
    { "row": 142, "column": "email", "value": "not-an-email", "error": "Invalid email format" }
  ],
  "eta": "3m",
  "durationMs": 45200,
  "loadStrategy": "upsert",
  "log": [
    { "stage": "extract", "message": "Read 50000 rows from source", "timestamp": "2026-03-30T10:00:05Z" }
  ]
}
```

### Response Fields

| Field                 | Type           | Description                                                          |
| --------------------- | -------------- | -------------------------------------------------------------------- |
| `status`              | string         | `pending`, `running`, `completed`, `failed`, `completed_with_errors` |
| `totalRows`           | integer        | Total rows to process (`rowsTotal`)                                  |
| `processedRows`       | integer        | Rows processed so far (`rowsProcessed`)                              |
| `failedRows`          | integer        | Rows that failed validation                                          |
| `skippedRows`         | integer        | Rows skipped (e.g., duplicates)                                      |
| `partitions`          | integer        | Total partition count                                                |
| `completedPartitions` | integer        | Partitions finished                                                  |
| `partitionDetails`    | array          | Per-partition status breakdown                                       |
| `validationErrors`    | array          | First 20 validation errors (use the errors endpoint for full list)   |
| `eta`                 | string or null | Estimated time remaining (e.g., `"3m"`, `"1.2h"`)                    |
| `durationMs`          | integer        | Elapsed time in milliseconds                                         |
| `loadStrategy`        | string         | Load strategy used (`append`, `upsert`, `replace`)                   |
| `log`                 | array          | Execution log entries                                                |

### Roles

admin, editor, viewer

***

## GET /api/v1/pipelines/{id}/runs/{runId}/errors

Returns all validation errors for a pipeline run. Supports both JSON and CSV formats via the `Accept` header.

### Path Parameters

| Parameter | Type   | Description     |
| --------- | ------ | --------------- |
| `id`      | string | Pipeline ID     |
| `runId`   | string | Pipeline run ID |

### Headers

| Header   | Value              | Description                   |
| -------- | ------------------ | ----------------------------- |
| `Accept` | `application/json` | Returns JSON (default)        |
| `Accept` | `text/csv`         | Returns downloadable CSV file |

### Response (JSON)

```json theme={null}
{
  "runId": "run_001",
  "total": 12,
  "errors": [
    { "row": 142, "column": "email", "value": "not-an-email", "error": "Invalid email format" },
    { "row": 305, "column": "age", "value": "abc", "error": "Expected integer" }
  ]
}
```

### Response (CSV)

When `Accept: text/csv` is set, returns a downloadable CSV file with headers: `Row, Column, Value, Error`.

```
Content-Type: text/csv; charset=utf-8
Content-Disposition: attachment; filename="pipeline-run-{runId}-errors.csv"
```

### Roles

admin, editor, viewer

***

## POST /api/v1/pipelines/{id}/runs/{runId}/retry

<Warning>
  **Deprecated — always returns `410 Gone`.** The legacy resume-from-checkpoint
  retry was removed on 2026-04-28 along with the BullMQ worker path. IR-native
  runs are short in-process executions that are idempotent at the row level (via
  `_kaireon_lineage`), so there is nothing to resume. To re-run a pipeline, call
  `POST /api/v1/pipelines/{id}/run` again.
</Warning>

### Path Parameters

| Parameter | Type   | Description     |
| --------- | ------ | --------------- |
| `id`      | string | Pipeline ID     |
| `runId`   | string | Original run ID |

### Response (410)

```json theme={null}
{
  "title": "Retry endpoint deprecated",
  "detail": "Pipeline {id}, run {runId}: legacy retry-with-checkpoint was removed on 2026-04-28. To re-run an IR-native pipeline, POST /api/v1/pipelines/{id}/run again."
}
```

### Roles

admin, editor (the role gate is still enforced before the `410` is returned).

***

## GET /api/v1/pipeline-runs/{id}/dlq

Return the failed-row (dead-letter queue) sample written by a `validate` node for a
specific run. Powers the Errors tab and the "Fix with AI" prompt. Note the path is
`/pipeline-runs/{id}/dlq` — `{id}` is the **run** id, not the pipeline id.

### Path Parameters

| Parameter | Type   | Description         |
| --------- | ------ | ------------------- |
| `id`      | string | Pipeline **run** ID |

### Query Parameters

| Parameter | Type    | Default | Description                                                         |
| --------- | ------- | ------- | ------------------------------------------------------------------- |
| `node`    | string  | —       | **Required.** The `validate` node id whose quarantine rows to read. |
| `limit`   | integer | `50`    | Max rows to return (clamped to 1–1000).                             |

### Response `200`

```json theme={null}
{
  "runId": "run_001",
  "nodeId": "validate_email",
  "quarantineTable": "public._flow_dlq_validate_email",
  "count": 2,
  "rows": [
    { "id": "1", "ruleId": "email_regex", "row": { "email": "not-an-email" }, "createdAt": "2026-03-30T10:00:05Z" }
  ]
}
```

When the validate node has no `quarantine.table`, or the quarantine table was never
created (no rows ever failed), the endpoint still returns `200` with `count: 0`,
`rows: []`, and a `residual` message explaining why.

### Error Codes

| Code  | Reason                                                                                                                                                        |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `400` | Missing/invalid `node` param, the referenced node is not a `validate` node, the run has no `metadata.irVersion`, or the quarantine table identifier is unsafe |
| `404` | Run not found, IR version not found, or `node` is not present in that IR version                                                                              |

### Roles

admin, editor, viewer

***

## Role Summary

| Endpoint                                | Method | Allowed Roles                      |
| --------------------------------------- | ------ | ---------------------------------- |
| `/pipelines/{id}/runs/{runId}/progress` | GET    | admin, editor, viewer              |
| `/pipelines/{id}/runs/{runId}/errors`   | GET    | admin, editor, viewer              |
| `/pipelines/{id}/runs/{runId}/retry`    | POST   | admin, editor (deprecated → `410`) |
| `/pipeline-runs/{id}/dlq`               | GET    | admin, editor, viewer              |

See also: [Pipelines](/api-reference/pipelines) | [Data Platform](/data/overview)
