# GET /api/v1/machines

**Preview.** Ships with the next server release.

**In short:** `GET https://<contour>.cmdop.ai/api/v1/machines` with `Authorization: Bearer $CMDOP_TOKEN` (owner or agent token).

## Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `200` | Known machines in the contour | `application/json` `object[]` |
| `401` | No owner or agent token of this contour | `application/json` |

## Response fields

| Field | Type | Always | Meaning |
| --- | --- | --- | --- |
| `arch` | `string` | yes |  |
| `epoch` | `integer` | yes |  |
| `id` | `string` | yes |  |
| `last_seen` | `integer` | yes | Unix seconds of the last message from the machine. |
| `name` | `string` | yes |  |
| `online` | `boolean` | yes |  |
| `os` | `string` | yes |  |
| `program` | `string` | yes |  |
| `since` | `integer` | yes | Unix seconds: when the current link came up, or when the machine was last seen. |
| `tools` | `string[]` | yes | Tools the machine runs, as it announced them on its current or last link. |

## Example

```bash
curl -sS "https://<contour>.cmdop.ai/api/v1/machines" \
  -H "Authorization: Bearer $CMDOP_TOKEN"
```
