Skip to main content
GET
Wait for a Sailbox to change

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

sailbox_id
string
required

Id of the Sailbox, as returned by create. It is sb_ followed by a UUID.

Query Parameters

since
string<date-time>

An RFC 3339 timestamp, normally the updated_at of the last response you saw. The call returns as soon as the Sailbox's updated_at is later than this, compared at millisecond precision, so the updated_at you received never counts as a change on its own. Leave it out to get the Sailbox at once.

timeout
integer
default:60

How many whole seconds to hold the response while nothing changes, up to 60; larger values count as 60. When the time is up, the Sailbox is returned as it is.

Required range: x >= 0

Response

The Sailbox, either changed since since or as it is when the timeout passes.

A Sailbox and its latest observed resource usage. The can_ flags are hints for deciding which actions are worth offering. They are all false on a private Sailbox you did not create, even where X-Sail-Owner-Override-Reason would still let you act.

sailbox_id
string
required

Unique id of the Sailbox.

name
string
required

The Sailbox's display name: the one you gave at create or restore time, or one derived from the source when you left it out.

app_id
string
required

Id of the app the Sailbox belongs to.

app_name
string
required

Name of the app the Sailbox belongs to.

image_id
string
required

Id of the built image the Sailbox boots from. Two Sailboxes created from the same image share this id.

state
string
required

Lifecycle state of the Sailbox. One of creating, running, pausing, paused, sleeping, resuming, terminating, terminated, or failed. creating, pausing, resuming, and terminating end on their own. running, paused, and sleeping hold until a call, inbound traffic, or a scheduled wake time moves the Sailbox, or until Sail moves it on its own. failed holds until you terminate the Sailbox, or until Sail terminates it seven days after it failed. terminated is final. New values can appear over time, so treat this as an open set.

status
string
required

The older status field, kept for existing clients. Read state instead.

architecture
string
required

CPU architecture the Sailbox runs on.

vcpu_count
integer
required

Virtual CPUs allocated to the Sailbox.

memory_mib
integer
required

Memory limit in MiB.

state_disk_size_gib
integer
required

Disk limit in GiB.

size
string
required
deprecated

Deprecated; read vcpu_count instead. The retired size label whose vCPU count matches this Sailbox: s for 1, m for 4, l for 8. Empty for any other count.

limits_pending
boolean
required

true when the Sailbox is powered off with a limits change recorded that takes effect at its next wake. Always false on a running Sailbox.

resize_pending
boolean
required
deprecated

Deprecated. Use limits_pending.

volume_mounts
object[]
required

Volumes attached to this Sailbox and the paths they are mounted at. Empty when the Sailbox has none.

cpu_used_vcpu
number
required

Virtual CPUs in use in the most recent sample. 0 when the Sailbox is not running or there is no recent sample.

memory_used_bytes
integer<int64>
required

Memory in use in the most recent sample. 0 when the Sailbox is not running or there is no recent sample.

disk_used_bytes
integer<int64>
required

Disk in use in the most recent sample. 0 when the Sailbox is not running or there is no recent sample.

network_rx_bytes_per_second
number
required

Bytes received per second in the most recent sample. 0 when the Sailbox is not running or there is no recent sample.

network_tx_bytes_per_second
number
required

Bytes sent per second in the most recent sample. 0 when the Sailbox is not running or there is no recent sample.

network_rx_packets_per_second
number
required

Packets received per second in the most recent sample. 0 when the Sailbox is not running or there is no recent sample.

network_tx_packets_per_second
number
required

Packets sent per second in the most recent sample. 0 when the Sailbox is not running or there is no recent sample.

error_message
string | null
required

Why the Sailbox failed, when it failed.

deprecation
object | null
required

Upgrade notice when this Sailbox has a deadline to act on and your credential can act on it. null otherwise, which is the usual case.

guest_schema_version
integer<int64> | null
required

Version of the Sail runtime inside the Sailbox. null when the version is not known.

created_by_user_id
string | null
required

User whose key created the Sailbox. null when a service key created it.

visibility
string | null
required

private means only the creator can operate the Sailbox, though an organization admin can take any operation with X-Sail-Owner-Override-Reason. org or null means anyone in the organization can operate it.

auto_sleep
object
required

The Sailbox's automatic-sleep preference. Set it at create time or with POST /sailboxes/{sailbox_id}/auto_sleep.

egress_policy
object
required

The egress policy the Sailbox runs under: what it may connect to and what happens to the HTTPS requests it sends. Always present. A Sailbox created without one has the empty document {}, which allows every destination and applies no rules.

env
object
required

The environment variables every command in the Sailbox starts with, before any exec env overrides. They come from the image, then the Sailbox's create env, then its egress policy's env, and when two set the same name the later one wins. An egress policy secret shows as the placeholder the Sailbox holds, not the real value. Variables Sail adds to every Sailbox, such as LANG and SAILBOX_ID, are left out. {} when nothing is set, or when the Sailbox is private and the caller did not create it.

started_at
string<date-time> | null
required

When the Sailbox first started running. It is not rewritten when a Sailbox resumes.

last_checkpointed_at
string<date-time> | null
required

When the Sailbox last saved its state.

checkpoint_generation
integer<int64>
required

Checkpoint counter for the Sailbox. It goes up by one every time the Sailbox saves its state, which includes pausing and sleeping. Compare it across two reads to tell whether the Sailbox saved again in between.

expires_at
string<date-time> | null
required

The Sailbox's termination deadline, or null for unlimited lifetime. Termination may occur after this time.

created_at
string<date-time>
required

When the Sailbox was created.

updated_at
string<date-time>
required

When the Sailbox last changed, with milliseconds. It moves with every change of state.

can_pause
boolean
required

Whether pausing would change this Sailbox now. False once it is paused.

can_sleep
boolean
required

Whether sleeping would change this Sailbox now. False once it is asleep.

can_resume
boolean
required

Whether resuming would change this Sailbox now. False once it is running.

can_terminate
boolean
required

Whether terminating would change this Sailbox now. False once it is shutting down or gone.

external_id
string | null

The key the Sailbox was created with in external_id, or null if it has none.

reason
string

What put the Sailbox in its state: user_request (a call you made, or a schedule you set), auto_wake (a command or traffic to a port you exposed woke a sleeping Sailbox), idle_timeout (auto-sleep, or termination after idle), lifetime_expired, capacity_unavailable (no machine could run it), or platform_event (something on Sail's side, such as maintenance). Absent when Sail did not record one.

initiated_by
string

Who moved the Sailbox into its state: user for a call you made or a schedule you set, system for everything Sail did on its own, including a wake caused by a command or traffic. Absent when Sail did not record one.

terminate_after_idle_seconds
integer | null

Seconds without activity after which Sail terminates the Sailbox, or null for no limit. Set it at create time or with POST /sailboxes/{sailbox_id}/auto_sleep.