# Get the output's state

`GET /v1/outputs/{id}/state`

What's on an output now: what's on air, every value it's been given and how its timers read.

## Path parameters

- `id` (string, required): The output's id.

## Response

- `revision` (integer): Goes up with every change to the output.
- `active` (object | null): The version the output plays: `compositionId`, `versionId` and `versionNumber`. Null until it's given a composition.
- `onAir` (object): Layers and components by id: `true` on air, `false` off.
- `data` (object): The values sent so far, as `global`, `layers` by layer id and `components` by component id. Each holds values by field key. Fields not listed show their defaults.
- `timers` (object): Every timer field by id, with its `text` as it reads now and whether it's `running`.
- `liveInstances` (object): Which instance each component on air is showing, by component id.

To follow changes as they happen, rather than asking again and again, open the [control WebSocket](https://docs.airframe.tv/api/websocket).

## Example request

```sh
curl https://api.airframe.tv/v1/outputs/OUTPUT_ID/state \
  -H "Authorization: Bearer $AIRFRAME_KEY"
```

### 200 OK

```json
{
  "revision": 42,
  "active": {
    "compositionId": "c_9b2f…",
    "versionId": "v_51ad…",
    "versionNumber": 4
  },
  "onAir": {
    "lower-third": true,
    "score-bug": true,
    "sponsors": false
  },
  "data": {
    "global": {
      "homeScore": 3,
      "awayScore": 1
    },
    "layers": {},
    "components": {
      "lower-third": {
        "name": "Jane Doe",
        "title": "Head coach"
      }
    }
  },
  "timers": {
    "match-clock": {
      "text": "45:00",
      "running": true
    }
  },
  "liveInstances": {
    "lower-third": "4c1d…"
  }
}
```
