Look at a sandbox
Never waits and wakes nothing. A sandbox token reads its own sandbox with any scopes, without url_secret and url_pattern.
Takes read, or a token of the sandbox.
https://api.glac.ai/v1/sandboxes/{id}Yetkilendirme
Yol parametreleri
Başlık parametreleri
Returns
200
The sandbox.
- start_commandrequired
How its start command runs, how often it was started again in its machine after it ended, and how its last run ended, as its guest said last (once a second while its machine runs: src/restarts.rs). The node has the guest start it again in the same machine, with its disk and volumes as they are, for an instance that is its owner's state (a key's, a stateful service's: a database's), once its command is up; an instance of an app's group is retired instead, and another takes its place; any other sandbox's start command is left as it ended. Null where its guest has said nothing of it: it has none, it has not begun (a stateful service's waits for its volumes), or its machine has not run since the node knew to ask.
- devtoolsobject | nullrequired
Of a sandbox of a browser's image (one with the label
sbx.devtools, the port of its browser's DevTools protocol): the browser's own address, as the node asked it (/json/version) when it built the image's template. The browser is the template's, the same in every sandbox made from it, and this goes with the sandbox wherever it goes. A client that takes nothing but a WebSocket's address connects topathat the signed link ofport. Null for any other sandbox. - image_digeststring | nullrequired
The image its disk was made of, by the digest of its manifest (or list of manifests) as its registry named it when its template was built (
Template.image_digest): what a tag named then. A tag that is moved since makes another image of the sandboxes made after it (a newer template), and this one's stays. While its template is being built (starting): the image the build is of, where the create knew it (a tag found to name a newer image than the template there holds, built by that digest), else null; and null where the template does not say (one built from a disk file, or before templates said so).pattern: ^[A-Za-z0-9]+:[0-9A-Fa-f]{32,}$ - appstring | nullrequired
For an instance of an app, one of those the node makes and deletes by the app's requests (
PUT /internal/apps/{key}): the app, by the key of its template, as the node's inventory says it. Null for any other sandbox, a keyed instance of an app among them (itsmetadatasay its app and its key). A control plane shown an instance first in the answer to a call keeps it out of its edges' table by this, as it keeps one its node's inventory lists. - ipv6string | nullrequired
Its own public IPv6 address, for its whole life: what it sends over IPv6 leaves from it, untranslated, and what comes to it is let in as
inboundsays. Given when it is made, on a node with a pool of addresses; kept through sleep, snapshot and move; a fork, or a sandbox made from a snapshot, has one of its own. Null: IPv4 alone (its node has no pool, or its template's agent is from before addresses of their own). - statusstringrequired
Information: a caller need not look at it before a call.
starting: its image is being pulled and built, and calls that need it wait.sleeping: memory saved, nothing running (also shown for a sandbox that has only its disk left, and for one that is paused in the node's memory:sleep_tiersays which); the next call that needs it wakes it.failed: it could not be built or woken, or its record on the node could not be read after the node's host went down, and calls that need it answer 409sandbox_failed. The answer of a call that changes it (create, sleep, restart, restore) shows the status that call left. - sleep_tierrequired
How a
sleepingsandbox sleeps; null for every other status.paused: its machine stands still in the node's memory, with its processes and connections (a node with the pause tier on pauses an idle sandbox instead of saving it), and a call resumes it in about a millisecond; the memory its machine holds is metered as a running sandbox's is (usage.memory_bytes,memory_gib_seconds), and its CPU is not.saved: its memory and the state of its devices are saved on the node, and nothing runs; a call wakes it from them in a few milliseconds.disk: only its disk is left (its machine ended by itself, the node's daemon ended without putting it to sleep, or its memory could not be kept); the next call that needs it boots it from the disk, and what ran is gone.POST /v1/sandboxes/{id}/sleepsaves a sandbox, paused or running. - failure_coderequired
Why the sandbox is
failed, for programs; null otherwise.image_not_found: the image is not in its registry, or is not public (a registry that wants a login says no more than that to a create that names no credentials).image_pull_failed: the registry could not be reached or did not hand the image out, or the tool that fetches was stopped at a limit of the node's (failuresays which).registry_auth_failed: the registry refused the credentials the create named (image_pull_secret);failurehas what the registry said.image_unpack_failed: the image does not fit the disk, is larger than the node takes (failurehas the numbers), or cannot be unpacked.invalid_image: the registry is at an address on the node or in a private network, or the image cannot be started as asked (no ENTRYPOINT or CMD forstart: true, labels that ask for what cannot be done).boot_failed: the machine made from the image did not start, or its start command did not come up (thenfailuresays what its ready check got and what it printed last).no_capacity: the node had no room.memory_full: the host's memory had no room for the machine its template is built in, or for its own.drive_full: the node's data drive filled while the image's template was being built.record_lost: the sandbox's record cannot be read; its files are kept on the node, but it cannot be started, only deleted.recovery_failed: the sandbox's startup recovery could not finish; its files and recovery intent are kept on the node, and it cannot be started, only deleted.start_failed: anything else; the node's log has it. - snapshotstring | nullrequired
The id of the snapshot whose state the sandbox last took: the one it was created from or restored to. Null for a sandbox made from an image. Not cleared when that snapshot is deleted, and for a fork it names the fork's own temporary snapshot, which is gone by the time the call returns.
pattern: ^snap-[0-9a-hjkmnp-tv-z]{16}$ - metadatasözlük, değer türü:stringrequired
Free key-value pairs for the caller's own use; lists of sandboxes filter by them. At most 64 keys of 1 to 64 characters, values of up to 1024. Not a place for secrets: metadata are stored in clear, and every set of them a sandbox has had while it used something is kept with its usage for thirteen months, also after the sandbox is deleted (
GET /v1/usagegroups and filters by them). - egressobjectrequired
A sandbox's egress rules, as they are stored: what it may reach, what it may ask of a host, and which of its requests get a secret added. Always there; a sandbox without rules has
defaultallowand four empty lists, and its traffic takes the path it would take without rules. A connection or a packet thatdenyspeaks of is refused; one thatallowspeaks of passes; anything else getsdefault. A host ininjectcounts as allowed, and so does a host inhttp, for the requests its entry allows. Whatever the rules say, a sandbox reaches neither the node, nor other sandboxes, nor private ranges, nor the metadata addresses of clouds.A host name is matched against the server name of a TLS handshake and the Host header of an HTTP request, on any port, and against the sandbox's DNS questions, which the node answers itself for a sandbox whose rules can refuse a name (for a refused name the answer is
REFUSED). A connection that names an allowed host goes to an address the node has for that name, whatever address the sandbox was connecting to. A TCP connection that is neither TLS nor HTTP passes to an address the rules list, or to one the node gave the sandbox as that of an allowed name. UDP and every other protocol go by address only. Underdefault: allowadenylist is not a wall: anything allowed that relays traffic gets around it. - on_expirydeleteveyasleepveyaholdrequired
What
expires_atdoes when it comes:delete, the sandbox is deleted (the default);sleep, it is put to sleep whatever goes on in it and kept, itsexpires_atnull from then on;hold, the same, held asleep (held_asleepset). The control plane's E2B compatibility givessleeporholdto a sandbox whose time being up pauses it. - held_asleepbooleanrequired
Asleep and not woken by requests (E2B's paused sandbox, which the control plane's E2B compatibility holds so between its
pauseand itsconnect): while it sleeps, a request to one of its ports does not wake it, and the preview listener answers 502sandbox_pausedin its place (x-preview-ingress). A call of the API wakes it as ever, and so does its own timer; a request that comes while it is awake goes on to it. - delete_after_idle_msinteger | nullrequired
After how long asleep the node deletes the sandbox, in milliseconds, counted from
idle_since: a sandbox that is woken counts again from its next sleep. Null: never for that (the default); the sandbox stays until it is deleted, or until itsexpires_at. A sandbox that does not sleep by itself (sleep_after_secondsnull) counts the sleeps it is put to (POST /v1/sandboxes/{id}/sleep, a restart of its node). Not while it is frozen (its owner's spend limit): a freeze keeps it with its data, and once let go of, the sleep it is in counts from then.format: int64 · minimum: 1000 - idle_sincestring | nullrequired
When its current sleep began, while
statusissleeping: when its machine was paused or put to sleep, or found to have ended. One that was running when its node stopped sleeps from the moment its node was started again; one that was frozen, from the moment it was let go of. Null while it is not asleep.format: date-time - last_active_atstring | nullrequired
The last activity the node saw: a call, a packet on its link, its guest computing (more than 2% of a core over
sleep_after_seconds, by the guest's own count where the host saw more than that; by the host's count for a template from before guests said what they computed), noted when the node looks.format: date-time - awake_becausestring | nullrequired
Why a running sandbox has not been put to sleep, in a few words of prose. Null unless
statusisrunning. An instance of an app says what the node gave it: a request in its hand, a call in flight, a request that ended less than itssleep_after_secondsago, or that its app's floor keeps it awake. One that a packet on its project's network woke, and that nothing else has kept awake since, says so and which packet it was:woken by a packet: TCP from 10.64.0.7:41594 to port 5432 [S] …. Connections inside its project keep no sandbox awake: what comes over them while it sleeps is the node's hold's (Node.hold). - host_failurerequired
What the sandbox last lost to the host it is on, and why (
cause): its memory when the host went down hard (power, a kernel that gave up), as the node found it when it came back; or its memory when the node was started again with another Firecracker than had saved it, and the sandbox was then used. Null for a sandbox that lost nothing: one that never went through either, and one that was asleep with everything it needs on the host's disk, which wakes as it always does on a node that is what it was. It stays as it is until the next such loss. - project_addressstring | nullrequired
Its address on its project's private network: where the project's other sandboxes on that network reach it, and what they see it as, whichever slot of the node it runs in. Null for a sandbox that is on no project's network. Given by whoever tells the node of the network (
setProjectNetwork), or taken by a create that saidproject_network: true.pattern: ^10\.(6[4-9]|[7-9][0-9]|1[01][0-9]|12[0-7])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){2}$ - usable_atstring | nullrequired
Where its disk came back from the object store (a restore, a move to this node, or a sandbox made here from a snapshot taken on another node, whose disk is in the store), the moment it could answer: its node had it and, for a disk filled as it is read, something listened for the blocks not here yet. Null for a sandbox whose disk was made on its node. Each such arrival starts the four fields over.
format: date-time - hydrated_bytesinteger | nullrequired
How many bytes of its disk are on its node, of
total_bytes, while it fills after it came back from the object store (a block brought ahead of the guest's first read counts);total_bytesonce it is all there. Bytes, not files: what a few large files that come last hold shows as what is left. Null astotal_bytesis.format: int64 · minimum: 0 - total_bytesinteger | nullrequired
How many bytes its disk brings from the object store: its own, and its image's where its node did not have the image and it comes block by block too. Null for a sandbox whose disk was made on its node, and in the moment before its node has counted them.
format: int64 · minimum: 0 - disk_writesrequired
What its disk has written today (UTC), against the day's share at full speed: past the share its disk takes writes slowly until the day ends, and no write fails. Null on a node that does not copy its disks to an object store, which counts nothing and slows nothing, and for a static instance (
SandboxInternals.static), whose disk is not copied. - initoptional
What its PID 1 is (
initat creation):systemd, its image's own systemd (a whole system), or null, the platform's init. One made from a snapshot, or a fork, has the snapshot's sandbox's. A whole system has a machine ID of its own (/etc/machine-id, and D-Bus's copy, /var/lib/dbus/machine-id), given when its machine is made (a clone of a template or a snapshot, a fork, a boot from a snapshot's disk) and kept from then on, through sleeps, wakes, moves and boots from its disk; its journal is filed under it (/var/log/journal/). - url_patternoptionalstring | null
The preview URL of a port, with
{port}and{signature}to fill in: the signature is the first 12 characters of base32(HMAC-SHA256(key =url_secret, message = the port in decimal)), in the alphabet0123456789abcdefghjkmnpqrstvwxyz. For a public port (public_ports, or onepublic_ports_exceptdoes not name where it is given), drop-{signature}. Null when the node has no preview domain; absent when the caller is a sandbox token.
400
The request is not one this call takes. unknown_parameter: the query has a parameter this call does not take.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
401
missing_api_key, invalid_api_key, expired_api_key, invalid_token.
404
Something the request names does not exist. sandbox_not_found: no such sandbox.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
default
Any other failure, in the same shape. internal (500): the node failed; the message says no more, and the node's log has the reason under the request's id. unavailable (503, retryable): no_capacity, every network slot of the node is in use; memory_full, a machine the call has to start (made, woken, booted from its disk, resumed, rolled back, built) does not fit in the host's memory beside what the machines that run on it are promised, and nothing paused or idle could be put to sleep to make room for it (memory of the node); drive_full, the call would have a template built and the node's data drive has no room for one (drive of the node); unavailable, the node is shutting down, the sandbox was still starting after 10 minutes, or it did not answer, or it is being moved to this node (with Retry-After: 1); fenced, the node's lease fences the sandbox (Node.lease). moved (409): the sandbox was moved to another node, which to names.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.