Skip to main content
Any sandbox of your account can be started from that name, and each one begins exactly where the saved sandbox was: files, processes and memory included. To keep one sandbox for yourself, see Timeouts, pause and resume.

Save a sandbox

The answer is {"snapshotID", "names", "name", "sandboxID", "templateID", "created"}. name is optional; without one the snapshot’s id is its name. A name is 1 to 128 characters of letters, digits, ., _ and -, starts with a letter or a digit, and is unique in your account: saving a name you already have answers 409. Other accounts never see your names.

Start sandboxes from a snapshot

snapshot replaces templateID; every other field of a create works as usual. The sandbox is placed on the node that holds the snapshot, so a create from a name waits for capacity on that node only. A name you do not have answers 404, and so does a name you deleted.

List, read and delete

  • GET /snapshots lists your saved snapshots, newest first.
  • GET /sandboxes/{id}/snapshots lists the snapshots taken of one sandbox; the sandbox may be gone.
  • GET /snapshots/{name} reads one.
  • DELETE /snapshots/{name} removes the files and then the name (204). It answers 503 when the node holding the snapshot does not answer, and leaves the name in place so the delete can be repeated.
Sandboxes already started from a snapshot are not affected by deleting it. DELETE /snapshots removes every saved snapshot of your account at once and answers {"deleted": 3, "failed": 0}. A snapshot whose node does not answer stays listed and is counted in failed (the status is then 503), so the call can be repeated until failed is 0.

Look inside a snapshot

You can read the files of a saved snapshot without starting it; the sandbox it came from can be stopped or gone.
  • tree answers [{"path", "size", "dir"}] for the path and everything below it, sorted by path (the whole disk when path is empty; at most 20,000 entries).
  • files returns the bytes of one regular file, at most 32 MiB.
  • archive returns a tar of a file or a folder, at most 32 MiB of file data in total, with names relative to the parent of the path.
  • A path that does not exist answers 404, a .. in a path 400, a result over the limits 413. A snapshot of a template that keeps its files in memory (the code template) has no disk to browse and answers 409; create a sandbox from it to read its files.
What you see is the sandbox’s writable disk as it was at the snapshot. Data a program had only in memory, or had not yet flushed to the disk, is part of a restored sandbox but not of this view; run sync in the sandbox before you save it when you need a file to show up here. Symbolic links and special files are listed but not downloaded.

Operations