# Read the boot console

URL: https://heaven.dev/docs/reference/computers/logs
Updated: 2026-11-21

Read a Computer's boot console output. Use `previous: true` for the preceding boot.

`GET /v1/computer/?view=logs`

## Parameters

- `computer` (string, required): Computer name or ID.
- `previous` (boolean): Read the previous boot's console log.

## Returns

- `data` (object, always present): Retained console output for the selected boot.
  - `boot` (string, always present): `current` or `previous`, identifying the selected boot.
  - `computer` (object, always present): Computer's ID and name.
  - `log` (string, always present): Retained console text for that boot.
  - `message` (string): Reason the log is empty. May be omitted.
  - `start_found` (boolean, always present): Whether the boot's first line was found. False means output is missing, the start predates the retained log, or there is no previous boot.
  - `truncated` (boolean, always present): True when only the end of the boot's output is included.

## Errors

Each code is explained in full at https://heaven.dev/docs/reference/errors.

| Code | Status | What happened |
|---|---:|---|
| `invalid` | 400 | An input is missing or invalid. |
| `unauthenticated` | 401 | The credential is missing, invalid, expired or revoked. |
| `denied` | 403 | The caller lacks permission for this action. |
| `not_found` | 404 | The resource is absent or inaccessible to this caller. |
| `conflict` | 409 | The request conflicts with the current resource state or an earlier request. |
| `over_capacity` | 409 | The request exceeds a resource or credential allowance. |
| `access_list_full` | 409 | The change would exceed the access-list allowance. |
| `rate_limited` | 429 | The caller's request rate exceeds its limit. |
| `busy` | 429 | Too much work is in progress to accept this request. |
| `unknown` | 503 | The outcome is unconfirmed; a change may have happened. |
| `unavailable` | 503 | The service or requested feature is unavailable. |

## Notes

- API key permission: `logs`.

## Examples

```sh tab="heaven CLI"
heaven logs COMPUTER [--previous]
```

```sh tab="SSH"
ssh cli@heaven.dev logs COMPUTER [--previous]
```

```sh tab="cURL"
curl "https://heaven.dev/v1/computer/?view=logs&computer=my-site" \
  -H "Authorization: Bearer $HEAVEN_API_KEY"
```

```json tab="MCP"
{ "tool": "logs",
  "arguments": { "computer": "my-site" } }
```

Response:

```json title="Response excerpt"
{
  "version": 1,
  "data": {
    "boot": "current",
    "computer": {},
    "log": "[    0.000000] Linux version 6.8.0-49-generic (buildd@lcy02-amd64-103)\n[    1.204331] systemd[1]: Startup finished in 1.204s.\n",
    "start_found": true,
    "truncated": false
  }
}
```
