# Stream test-run events (SSE)

GET

/v1/test-runs/{testRunId}/events

```sh
curl --request GET \
  --url https://example.com/v1/test-runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/events \
  --header 'Authorization: Bearer <token>'
```

Server-Sent Events. Per-case progress events (`test-run.case-completed` / `test-run.case-failed`) followed by a terminal event (`test-run.completed` / `test-run.failed` / `test-run.cancelled`) carrying the aggregate result. Mirrors `/v1/runs/:runId/stream` structurally.

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/v0.5.0/reference/api.md#bearerauth)**

## Parameters

### Path Parameters

**testRunId**

required

string format: uuid

TestRunId — opaque branded UUID.

### Header Parameters

**Last-Event-Id**

string

Resume marker (`<runId>:<sequence>`). Server replays events with `sequence > lastSeen` before entering live-poll.

## Responses

### 200

Server-Sent Event stream (`text/event-stream`).

### 401

Missing / malformed / expired / revoked bearer token.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 404

No test run with that id under this workspace.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 503

The database was too busy to answer in time (`database-busy`); `Retry-After` (whole seconds) says when to try again.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

## See also

- [`GET /v1/test-runs/{testRunId}`: Fetch a test run](https://docs.kindgi.com/v0.5.0/reference/api/operations/testrunsget.md)
- [`POST /v1/test-runs/{testRunId}/cancel`: Cancel a test run](https://docs.kindgi.com/v0.5.0/reference/api/operations/testrunscancel.md)
- [`POST /v1/test-runs/{testRunId}/rescore`: Rescore a comparison test run](https://docs.kindgi.com/v0.5.0/reference/api/operations/testrunsrescore.md)
- [Error code `database-busy`](https://docs.kindgi.com/v0.5.0/reference/errors.md#database-busy)
- [Every error code](https://docs.kindgi.com/v0.5.0/reference/errors.md)
