---
title: "Get a VM's console log tail"
method: GET
path: "/api/nomad/vms/{vmId}/logs"
tags: ["VMs"]
---

# Get a VM's console log tail

`GET /api/nomad/vms/{vmId}/logs`

## Request

- Base URL: `https://api.openrelay.inc`
- URL: `https://api.openrelay.inc/api/nomad/vms/{vmId}/logs`
- Auth: HTTP bearer

Returns the tail of a VM's serial console, capped to a bounded size; a VM with no logs yet answers 200 with found false and a message, not an error.
A transient state (no allocation yet, logs temporarily unavailable) answers 200 with found false, so a polling UI renders a state instead of an error. The cap is the one pod logs use, so a long-running console never exceeds the response size orl reads.

Also works for pods: `orl vms logs` and `orl pods logs` are the same operation pair with different id params, and `orl vms <verb> <pod-id>` reaches every other pod lifecycle command.

Requires the `compute.read` permission. See [Permissions](https://docs.openrelay.inc/docs/permissions) for the roles and API key permissions that include it.

## Path parameters

- `vmId` string, required

## Response `200`

OK

- GuestLogs: A guest's console text, or a soft "not ready yet" status: a transient state (no allocation yet, logs temporarily unavailable) answers 200 with found false and a message, so a polling UI renders a state instead of an error toast; only ownership/existence failures are 404. Output is capped to a bounded tail (the same cap pods and VMs share), not the whole console.
  - `content` string, nullable: The console's tail, when found is true.
  - `found` boolean, required
  - `message` string: Present when found is false (or on other soft states); human-readable.

## Other responses

- `401`: Missing or invalid API key
- `404`: Resource not found

## Changes

- **2026-10-26** `7fe59d94a9f5`: 2 info
  - added the optional property `requestId` to the response with the `401` status
  - added the optional property `requestId` to the response with the `404` status
- **2026-10-21** `dc9750cb25b5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openrelay/apis/openrelay-api/changes/api/nomad/vms/:vmId/logs/get.md)

---

[API](https://skmtc.dev/openrelay/apis/openrelay-api.md) - [All operations](https://skmtc.dev/openrelay/apis/openrelay-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openrelay/apis/openrelay-api/revisions/7fe59d94a9f5?raw)
