Skip to main content
GET
/
v1
/
machines
List all machines
import requests

url = "https://api.13-215-85-171.sslip.io/v1/machines"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
[
  {
    "id": "<string>",
    "config": {
      "vcpus": 123,
      "memory_mb": 123,
      "disk_mb": 123
    },
    "template": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "metadata": {},
    "started_at": "2023-11-07T05:31:56Z",
    "timeout_ms": 123,
    "timeout_at": "2023-11-07T05:31:56Z",
    "expires_at": "2023-11-07T05:31:56Z",
    "remaining_ms": 123,
    "last_active_at": "2023-11-07T05:31:56Z",
    "inactivity_timeout_ms": 123,
    "auto_delete_after_ms": 123,
    "ephemeral": true,
    "cwd": "<string>",
    "snapshot_id": "<string>",
    "warm_pool_checkout": {
      "hit": true,
      "id": "<string>"
    }
  }
]

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Query Parameters

state
string

Filter machines by state. Multiple states may be supplied as a single comma-separated list (e.g. running,paused). Valid states: creating, running, paused, destroyed, error. The server parses this as one comma-separated string parameter.

limit
integer

Maximum number of machines to return when using cursor pagination.

Required range: 1 <= x <= 100
next_token
string

Cursor token returned by a previous paginated list response.

template
string

Filter machines by template ref.

metadata
string

JSON object whose key/value pairs must match machine metadata.

fields
string

Comma-separated field mask for machine list/get responses. Supported fields: id, status, config, template, metadata, started_at, timeout_ms, timeout_at, expires_at, timeout_action, created_at, cwd, snapshot_id, traffic_access_token.

Response

List of machines. Calls without list filters, pagination, or field masks return the legacy bare array; filtered or paginated calls return a paginated object.

id
string
required
status
enum<string>
required
Available options:
creating,
running,
paused,
destroyed,
error
config
object
required
template
string
required
created_at
string<date-time>
required
metadata
object

Machine metadata. Attached volume state is exposed under volume_attachments in request order. Free-form user-supplied object stored verbatim; deliberately open.

started_at
string<date-time>
timeout_ms
integer<int64>
timeout_at
string<date-time>
expires_at
string<date-time>

Alias of timeout_at for clients that expect an expiry timestamp field.

remaining_ms
integer<int64>

Milliseconds remaining until timeout_at (clamped at 0), computed at response time. Lets callers schedule a timeout refresh without re-deriving the deadline from timeout_at themselves.

timeout_action
enum<string>
Available options:
destroy,
hibernate
last_active_at
string<date-time> | null

Most recent activity timestamp (edge ingress or exec/file/pty/process traffic). Drives inactivity-relative deadlines. Absent if no activity has been observed yet.

inactivity_timeout_ms
integer<int64> | null

Effective idle timeout in milliseconds, if an inactivity policy is set.

auto_delete_after_ms
integer<int64> | null

Effective auto-delete window in milliseconds, if set.

ephemeral
boolean

Whether the machine is ephemeral (destroyed, never hibernated, on idle).

cwd
string

Normalized default working directory for this machine when one was configured.

snapshot_id
string

Present only when status is paused. The snapshot ID needed to resume this machine.

warm_pool_checkout
object

Create-time warm-pool checkout result. Omitted when create did not consider a warm pool.