# Get the output's composition

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

The composition an output is linked to, the version it plays, and the newest version published, so you can tell when there's an update.

## Path parameters

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

## Response

- `composition` (object | null): The linked composition's `id` and `name`, or null if it has none yet.
- `active` (object | null): The version it plays: `compositionId`, `versionId` and `versionNumber`.
- `latestVersion` (integer | null): The composition's newest version number. When it's higher than `active.versionNumber`, there's a newer version to move to.

## Example request

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

### 200 OK

```json
{
  "composition": {
    "id": "c_9b2f…",
    "name": "Matchday graphics"
  },
  "active": {
    "compositionId": "c_9b2f…",
    "versionId": "v_51ad…",
    "versionNumber": 4
  },
  "latestVersion": 5
}
```
