sandboxes

Copies of a sandbox as it is now: files, memory and running processes.

A running sandbox is paused for the moment it takes to snapshot it (usually well under a second), then woken again. Answers once the copies are running: {sandboxes, snapshot}, where snapshot is null unless keepSnapshot. Each copy has the source's vCPUs, memory, disk and CPU (cpu and cpuFloorMillis), is quoted as a create with them would be, and runs on its host. A fork that fails after its snapshot is taken answers with the failing step's error; details.startedSandboxIds names the copies that did start, which keep running until stopped.

post/v1/sandboxes/{id}:fork

Request

  • Base URL: https://api.withruntime.com
  • URL: https://api.withruntime.com/v1/sandboxes/{id}:fork
  • Auth: HTTP bearer

Path parameters

idstring required

Resource identifier (UUID).

Headers

Idempotency-Keystring

Replaying the same key with the same request within 24 hours returns the first result and never repeats the effect. A refusal is not kept: a request refused before it ran (no_capacity, busy, a limit) runs afresh when sent again with its key. The SDKs send one automatically; the server makes one when absent and returns it in the idempotency-key response header.

Request body

countinteger

How many copies: 1 to 100 on prepaid credit, 1 to 4 without credit. One fork takes at most a quarter of its server's free memory.

namestring

Your own handle for the resource. Letters, digits, dot, dash, underscore.

labelsobject

Your own key/value tags, at most 32. Filter lists with label=key:value.

secretsstring[]

The egress secrets the copies may use: a narrower list than the source's. Omit it and each copy keeps the source's list (every secret that reaches it, when the source names none). A name the source may not use is refused.

keepSnapshotboolean

Keep the snapshot the copies started from, to start more later (it is billed as snapshot storage). By default it is deleted when the fork ends, whether every copy started or not, and nothing is billed for it.

funding'trial' | 'paid'

Accepted and not read: copies run on what the account's new sandboxes run on, as for a create. On an account without credit, each copy must fit the limits without credit (it has the source's size) and takes one of its running slots.

Response

Success

snapshotobject nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.