Snapshots

Snapshot a running sandbox

Captures a full-VM image of a running sandbox. The sandbox keeps running throughout: the capture is crash-consistent for the filesystem and does not reboot or otherwise disturb it.

The call returns 202 with the snapshot still pending; poll GET /snapshots until it is available. A snapshot can then be restored into a new sandbox with POST /sandboxes and snapshot_id, which restores the captured filesystem state. Processes are not resumed.

The source sandbox must stay alive until the snapshot is available — a capture outlasting the sandbox fails. Extend the sandbox (POST /sandboxes/{id}/extend) before snapshotting it for a long-running capture. Capture requires a positive balance. At most 3 snapshots are kept per account and only one capture may be in flight; snapshots are deleted automatically after 7 days of retention. This operation is REST-only.

post/sandboxes/{id}/snapshots

Request

  • Base URL: https://sandbox-as-a-service.com/v1
  • URL: https://sandbox-as-a-service.com/v1/sandboxes/{id}/snapshots
  • Auth: HTTP bearer

Request body

namestring

Optional label for your own reference.

Response

Capture accepted and in progress. Poll GET /snapshots until the status is available.

object'snapshot'
idstring
sandbox_idstring
namestring nullable
status'pending' | 'available' | 'failed' | 'deleted'

Capture lifecycle: pending while the image is being created, available once it is restorable, failed if the capture could not finish, deleted once it is gone.

size'small' | 'medium' | 'large'
created_atstring date-time
available_atstring date-time nullable
expires_atstring date-time nullable

When the snapshot is deleted automatically (retention).

deleted_atstring date-time nullable

Example response

{
  "id": "snap_4b1d2e3f4a5b6c7d9e",
  "sandbox_id": "sbx_9f2c4a1b8d3e6f0a12",
  "name": "env-after-setup"
}

Changes

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