better/compute
API

sandboxSnapshots

Sandbox snapshots are their own resource, so a snapshot kept with `keep: true` outlives the sandbox it came from. `sandboxes.snapshot` takes them and `sandboxes.create` restores from them with `fromSnapshot`. These methods list, read and delete them. Snapshots stay private to their tenant and are never promoted to shared images. See [Sandboxes](/docs/guides/vps/sandboxes).

Sandbox snapshots are their own resource, so a snapshot kept with keep: true outlives the sandbox it came from. sandboxes.snapshot takes them and sandboxes.create restores from them with fromSnapshot. These methods list, read and delete them. Snapshots stay private to their tenant and are never promoted to shared images. See Sandboxes.

All 3 methods are served by this release.

MethodKindAuthorizationPhaseStatus
listreadcompute:sandboxes:read @ compute-tenant + itemsv0.5registered
getreadcompute:sandboxes:read @ compute-sandbox-snapshotv0.5registered
deletemutationcompute:sandboxes:delete @ compute-sandbox-snapshotv0.5registered

list

POST /api/compute/sandboxSnapshots/list

Returns a page of the tenant's snapshots, newest first, including kept snapshots of deleted sandboxes.

scope defaults to mine, the caller's own snapshots; all lists the tenant's. sandboxId keeps one sandbox's snapshots. limit is 1 to 200 (default 50), and cursor, the last snapshot id of the previous page, is set while more remain. Deleted snapshots are never listed. Decided as compute:sandboxes:read on the tenant.

  • Kind: read
  • Authorization: compute:sandboxes:read @ compute-tenant + items
  • Module: vps
  • Phase: v0.5 (registered)

Input

FieldTypeRequiredConstraints
tenantIdstringyesat most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$
scopeone of mine, alldefault "mine"
sandboxIdstringat most 56 characters; matches ^sbx_[0-9a-hjkmnp-tv-z]{26,52}$
limitinteger1-200
cursorstringat most 57 characters; matches ^snap_[0-9a-hjkmnp-tv-z]{26,52}$

get

POST /api/compute/sandboxSnapshots/get

Returns one snapshot of the tenant with its state (pending, ready or failed), and once ready its sha256, size, runtime and CPU model.

A deleted snapshot, or one of another tenant, is NOT_FOUND. Decided as compute:sandboxes:read on the snapshot.

  • Kind: read
  • Authorization: compute:sandboxes:read @ compute-sandbox-snapshot
  • Module: vps
  • Phase: v0.5 (registered)

Input

FieldTypeRequiredConstraints
tenantIdstringyesat most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$
snapshotIdstringyesat most 57 characters; matches ^snap_[0-9a-hjkmnp-tv-z]{26,52}$

delete

POST /api/compute/sandboxSnapshots/delete

Deletes a snapshot at once for reads and restores; the stored object is removed by the next vps.sandboxes pass (after its upload settled, for a pending one), so no network call runs in the request.

Idempotent: deleting a deleted snapshot answers { deleted: true } again; an unknown one is NOT_FOUND. Publishes sandbox.snapshot.deleted. Decided as compute:sandboxes:delete on the snapshot.

  • Kind: mutation
  • Authorization: compute:sandboxes:delete @ compute-sandbox-snapshot
  • Module: vps
  • Phase: v0.5 (registered)

Input

FieldTypeRequiredConstraints
tenantIdstringyesat most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$
snapshotIdstringyesat most 57 characters; matches ^snap_[0-9a-hjkmnp-tv-z]{26,52}$

Was this page helpful?

Better Compute is created by Sean Filimon

Last updated

On this page