Skip to main content
POST
Create the managed sandbox of a claim a self-hosted runner or a fleet machine holds

Authorizations

X-Outerlayer-App-Id
string
header
required

Factory id the request is scoped to.

Authorization
string
header
required

API key (sk_outerlayer_*)

Headers

Signature
string

HTTP Message Signature (RFC 9421) made with the runner key's host key: runner=:<base64>:.

Signature-Input
string

The signature's covered components and parameters: runner=("@method" "@path" "@query" "content-digest");created=<unix seconds>;nonce="<random>";keyid="<host key fingerprint>";alg="ed25519".

Content-Digest
string

RFC 9530 digest of the request body, always sent, including for a request with none: sha-256=:<base64>:.

Path Parameters

workItemId
string
required

Body

application/json
apis
string[]

The forms the runner can call a sandbox in besides header, such as helper. The gateway makes a new sandbox at the first provider in its order whose sandboxes the runner can call, and at the next one when that provider refuses with a fault that can clear. Absent, the runner gets only sandboxes of the form header.

Maximum array length: 8
Maximum string length: 32
fromState
string

The id of a saved state of the caller's factory (save-managed-sandbox-state) to make the sandbox from, instead of the base snapshot. The state is read only for a new sandbox: a claim that has a sandbox gets that sandbox, whatever this names. A state that cannot be used gets sandbox_state_unusable (409, with reason), and nothing is bound. It does not apply to a resume.

idleMinutes
number

Minutes with no activity after which the provider ends the sandbox. Kept inside 1 to 60.

machine
enum<string>

The sandbox gets the machine size in the factory's build settings, and a runner key's request may not change it: the gateway ignores this field from a runner key. A fleet machine's claim recorded the factory's size when it started; a fleet machine that names another size gets machine_differs. A claim that had a sandbox before keeps the size of its first one. The answer's machine names the size.

Available options:
small,
large
metadata
object

The runner's own labels for the sandbox, which a list returns.

preview
boolean

Set true to make the sandbox of the preview lease the caller holds. A preview lease runs beside the item's own lease, so a runner that holds both names the one it means. Absent, the sandbox is the item's own lease's, or the preview's when the item has no live lease of its own. A preview sandbox is always the small size, ends after four hours, and ignores resume.

resume
string

The id of the work item's kept sandbox, which the claim resumes instead of a new sandbox. The claim is billed from the resume at the kept sandbox's size, which must be the machine size in the factory's build settings. idleMinutes and metadata do not apply to a resume, and timeLimitMinutes starts the sandbox's time limit again. A sandbox that cannot be resumed gets sandbox_not_resumable (409), and the runner then asks again without resume.

timeLimitMinutes
number

Minutes of running time after which the provider ends the sandbox. At most 1440.

waits
boolean

Set true when the runner can wait for a sandbox that is still starting. The gateway then answers 200 with the sandbox in the state starting, and the runner reads it until it has started. Absent, the gateway answers only with a sandbox that has started, and a sandbox that is still starting gets sandbox_provider_refused (502). It does not apply to a resume.

Response

The sandbox of the claim.

data
object
required