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

# watchDashboardHealth

> Dashboard health transitions.

```typescript theme={null}
streaming.dashboards.watchDashboardHealth(request, options?) → AsyncIterable<DashboardHealthEvent>
```

The first event is the current verified state; subsequent events fire on
health transitions.

## Example

```typescript theme={null}
import { createStreamingClient } from "@textql/sdk/streaming";
import { CheckDashboardHealthResponse_HealthStatus as HealthStatus } from "@textql/sdk/generated/connect/public/dashboard_pb.js";

const streaming = createStreamingClient({ apiKey });

for await (const health of streaming.dashboards.watchDashboardHealth({ dashboardId })) {
  switch (health.status) {
    case HealthStatus.HEALTHY:
      embed(health.streamlitUrl!);
      break;
    case HealthStatus.STARTING:
      showSpinner(health.spawnPhase);
      break;
    case HealthStatus.FAILED:
      showError(health.errorMessage);
      break;
  }
}
```

## Events

| Field                           | Type                 | Notes                                                          |
| ------------------------------- | -------------------- | -------------------------------------------------------------- |
| `dashboardId`                   | `string`             |                                                                |
| `status`                        | `HealthStatus`       | `NOT_RUNNING` / `HEALTHY` / `STARTING` / `FAILED` / `UPDATING` |
| `streamlitUrl`, `embedUrl`      | `string?`            | live URLs while running                                        |
| `errorMessage`                  | `string?`            | on `FAILED`                                                    |
| `spawnPhase`                    | `string?`            | progress detail during `STARTING`                              |
| `dashboardStatus`               | `DashboardStatus`    | `DRAFT` / `PUBLISHED`                                          |
| `warnings`                      | `string[]`           | non-fatal (e.g. data-source truncation)                        |
| `refreshedAt`, `publishedAt`    | `Timestamp?`         | convert with `timestampDate()`                                 |
| `code`, `publishedCode`         | `string?`            | dashboard source                                               |
| `scheduleEnabled`, `cronString` | `boolean`, `string?` | refresh schedule                                               |
| `dataSources`                   | `DataSource[]`       |                                                                |
