---
title: "A finished run's stored events by step"
url: https://hexelstudio.com/docs/api/harness/runs/replay
---

# A finished run's stored events by step

**GET** `/harness/runs/{id}/replay`

`409 run_not_ended` for a run still going. Page on with `after=<next_after>`.

## Query parameters

- `from_step: optional integer`

- `to_step: optional integer`

- `after: optional integer`

  An event seq (a previous page's next_after).

- `limit: optional integer`

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for your organization.

- `X-Workspace-Id: string`

  The workspace the request acts in (`ws_...`). It never grants access by itself.

- `X-Environment-Id: string`

  The environment the request acts in (`env_...`). It never grants access by itself.

## Returns

`200` A page of the run's events. (`Replay`)

- `run_id: string`

- `task_id: string`

- `steps: integer`

- `from_step: integer`

- `to_step: integer`

- `events: array of ReplayEvent`

  - `data: any`

    Any JSON value.

  - `environment_id: optional string`

  - `id: string`

  - `org_id: string`

  - `run_id: optional string`

  - `seq: integer`

  - `step: integer`

  - `task_id: string`

  - `time: string`

  - `type: string`

  - `workspace_id: optional string`

- `next_after: optional integer`

## Errors

- `default` 

## Example

```bash
curl --request GET \
  --url 'https://api.hexelstudio.com/v1/harness/runs/{id}/replay' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'X-Workspace-Id: X_WORKSPACE_ID' \
  --header 'X-Environment-Id: X_ENVIRONMENT_ID'
```

### Response (200)

```json
{
  "run_id": "string",
  "task_id": "string",
  "steps": 0,
  "from_step": 0,
  "to_step": 0,
  "events": [
    {
      "data": "string",
      "environment_id": "string",
      "id": "string",
      "org_id": "string",
      "run_id": "string",
      "seq": 0,
      "step": 0,
      "task_id": "string",
      "time": "2026-01-01T00:00:00Z",
      "type": "string",
      "workspace_id": "string"
    }
  ],
  "next_after": 0
}
```
