Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

Pause a lease

Pauses a lease: its disk is kept and its machine destroyed; the generation increases.

This method is not served on the public API. api.sylphx.com does not route this call: its backend is not deployed behind the public API, or does not implement the call. This page documents the contract. It is kept out of the sidebar and of search engines.

Pauses a lease: its disk is kept and its machine destroyed; the generation increases. Process memory is not kept.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/leases/lease:pause
  • Scope sandboxes:write
  • Effect write — a successful call changes state.
  • Collection leases
  • Validate-only validate_only=true runs every check and writes nothing

#Request

FieldTypeWhat it is
namestringThe name of the lease. Required.
etagstringAct only if the current etag matches.
validate_onlyboolValidate without acting.

#Response

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/leases/{lease}.
uidstringsbx_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
specLeaseSpecDesired state. Required.
statusLeaseStatusObserved state. Output only.

#ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only.
create_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

#LeaseSpec

FieldTypeWhat it is
shapestringThe shape. Required.
imagestringThe image: an artifact in Sylphx Artifacts, by digest, or template:<name> (base, desktop, browser, android). Ignored when source_snapshot is set.
kindLeaseKindWhat the machine serves; default GENERAL. One of general, browser, desktop, android.
regionstringThe region; default the project's home region.
poolstringThe Pool to take a warm machine from; default the platform pool for the shape and image.
ttldurationThe maximum wall time from grant: 1 minute to 24 hours for microVMs, 24 hours to 30 days for macOS. :renew extends it within the shape's bound. Reaching it ends the lease EXPIRED. Required.
idle_timeoutdurationEnd the lease IDLE after no data-plane call, stream input, or exec for this long; unset never idles out.
networkLeaseNetworkThe outbound policy. Change it on a running lease with :setNetwork.
portsLeasePort[]Guest ports to expose.
envmap<string, string>Plain environment variables. Secrets bind through Sylphx Secrets, never here.
volumesVolumeMount[]Volumes attached at grant, each by name. A volume is attached to at most one lease at a time; a volume already attached refuses the lease with RESOURCE_IN_USE.
budgetLeaseBudgetSpend bounds beyond ttl and idle_timeout.
displayDisplaySpecThe display of a DESKTOP, BROWSER, or ANDROID lease.
browserBrowserSpecThe browser of a BROWSER lease.
source_snapshotstringBoot from this Snapshot's disk and image instead of image.
webhookLeaseWebhookWhere lease events are delivered as signed webhooks, in addition to leases/*/events.
deviceDeviceSpecThe device of an ANDROID lease: model and OS version. The device sets the display; display is ignored.

#LeaseStatus

FieldTypeWhat it is
observed_generationint64The generation this status was computed from. Output only.
conditionsCondition[]Ready, Reconciling, Stalled. Output only.
stateLeaseStateThe state machine. Output only. One of requested, granted, ready, paused, ending, ended, refused.
lease_generationint64Increases on grant, pause, resume, and end; every token and platform command carries it, and a stale one is refused STALE_GENERATION. Output only.
short_idstringEight Crockford base32 characters naming the lease in data-plane routes. Output only.
endpointsLeaseEndpointsData-plane addresses. Output only.
refusalLeaseRefusalWhy the lease was refused, when state is REFUSED. Output only. One of no_capacity, no_matching_cell, shape_not_offered, shape_not_entitled, image_not_found, abuse_hold.
end_reasonEndReasonWhy the lease ended, once state is ENDING or ENDED. Output only. One of released, expired, idle, cpu_budget, cost_budget, abuse, quota, org_deleted, machine_lost, boot_failed.
grant_timetimestampWhen a machine was assigned. Output only.
ready_timetimestampWhen the guest became ready. Output only.
expire_timetimestampWhen the lease ends unless renewed. Output only.
end_timetimestampWhen the lease ended. Output only.
usageLeaseUsageWhat the lease has consumed so far. Output only.
controlControlStateWho holds input control of the display. Output only.
displayDisplayInfoThe effective display, for kinds that have one. Output only.
networkLeaseNetworkThe effective outbound policy, including the ranges always blocked. Output only.

#LeaseNetwork

FieldTypeWhat it is
egressEgressPolicyDefault ALLOW. One of allow, deny, allowlist.
allowed_domainsstring[]Hosts reachable when egress is ALLOWLIST: exact names or one leading *. wildcard label, for example api.openai.com, *.github.com.
allowed_cidrsstring[]Public CIDRs reachable when egress is ALLOWLIST.
blocked_cidrsstring[]The ranges blocked under every policy. Output only.

#LeasePort

FieldTypeWhat it is
portint32The guest port. Required.
visibilityPortVisibilityDefault PRIVATE: a lease token or an Access key with sandboxes:exec is required. One of private, public.
uristringThe port's URL. Output only.

#VolumeMount

FieldTypeWhat it is
volumestringThe volume. Required.
mount_pathstringThe absolute guest path; default /home/user/volumes/{volume id}.
read_onlyboolMount read-only.

#LeaseBudget

FieldTypeWhat it is
max_cpu_secondsint64End CPU_BUDGET after this many vCPU-seconds of guest CPU time.
max_cost_microsint64End COST_BUDGET once the shape's list price times wall seconds reaches this many millionths of a US dollar.

#DisplaySpec

FieldTypeWhat it is
widthint32Logical width in pixels; default 1280.
heightint32Logical height in pixels; default 800.
dpiint32Dots per inch; default 96.

#BrowserSpec

FieldTypeWhat it is
headlessboolRun headless instead of on the display. A headless browser has no stream and no computer actions; CDP only.
user_data_dirstringThe profile directory; put it on a volume to keep cookies and storage across leases. Default a fresh profile.
start_urlstringThe page opened at start; default about:blank.

#LeaseWebhook

FieldTypeWhat it is
uristringThe HTTPS URL that receives the POSTs. Required.
kindsLeaseEventKind[]Deliver only these kinds; default every kind. One of granted, ready, refused, ended, renewed, network_changed, control_acquired, control_released, control_expired, budget_warning, paused, resumed.

#DeviceSpec

FieldTypeWhat it is
modelstringA model id from the device catalog, e.g. pixel_7; default pixel_7.
os_versionstringThe OS version, e.g. 14; default the newest offered.

#Condition

FieldTypeWhat it is
typestringThe condition type, for example Ready.
statusConditionStatusWhether the condition holds. One of true, false, unknown.
observed_generationint64The generation this observation was made against.
reasonstringA machine-readable UpperCamelCase reason.
messagestringA customer-safe human-readable message.
severitySeverityHow severe a FALSE condition is. One of info, warning, error.
transition_timetimestampWhen status last changed.

#LeaseEndpoints

FieldTypeWhat it is
guest_uristringThe guest daemon: the E2B envd protocol (Connect-RPC process.Process, filesystem.Filesystem, HTTP /files), routed by the E2b-Sandbox-Id header, for streaming exec and PTYs. Output only.
cdp_uristringThe Chrome DevTools Protocol WebSocket of a BROWSER lease. Output only.
e2b_sandbox_idstringThe E2B sandbox id this lease answers to on the E2B-compatible API. Output only.

#LeaseUsage

FieldTypeWhat it is
wall_secondsint64Wall seconds from grant. Output only.
cpu_secondsint64Guest vCPU-seconds. Output only.
cost_microsint64List-price cost so far, in millionths of a US dollar; 0 on classes that are not priced. Output only.
measure_timetimestampWhen this usage was measured. Output only.
memory_gib_secondsint64Memory GiB-seconds (shape memory times wall seconds). Output only.
egress_bytesint64Bytes sent to the internet. Output only.
stream_secondsint64Seconds of live stream viewing, summed over viewers. Output only.

#ControlState

FieldTypeWhat it is
holderControlHolderWho holds control; UNSPECIFIED when nobody does (agent actions allowed). Output only. One of agent, human.
epochint64Increases on every acquire; release names it. Output only.
principalstringThe Access principal that acquired control. Output only.
holder_labelstringThe caller's label for the person or agent, for example a user id. Output only.
acquire_timetimestampWhen control was acquired. Output only.
expire_timetimestampWhen control lapses unless re-acquired. Output only.

#DisplayInfo

FieldTypeWhat it is
widthint32Logical width in pixels; action coordinates are in this space. Output only.
heightint32Logical height in pixels. Output only.
dpiint32Dots per inch. Output only.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/leases/lease:pause" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'