---
title: "Run one command in a sandbox made for it"
description: "Creates a sandbox, runs the command in it, answers with the result and deletes the sandbox. The sandbox lives exactly as long as the request: it goes when the command ends and when the caller hangs up. The command gets 300 seconds unless `timeout_seconds` says otherwise. The call waits for the command however long it runs: there is no 202 here. A sandbox that was given a `name` has left the node's table, and its name is free, before the answer says that the command has ended (the JSON answer, or the `exit`, `error` or `end` event of a stream): the next call can give the same name at once.\n\nAs a stream (`text/event-stream`): its events are `start`, `stdout`, `stderr`, `gap`, `exit` and `error`: [Event streams and terminals](/docs/api/#event-streams-and-terminals).\n\nTakes `write` and `exec`."
---

> Documentation Index
> Fetch the complete documentation index at: https://glac.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Glac API › Sandboxes

`POST /v1/run`

Creates a sandbox, runs the command in it, answers with the result and deletes the sandbox. The sandbox lives exactly as long as the request: it goes when the command ends and when the caller hangs up. The command gets 300 seconds unless `timeout_seconds` says otherwise. The call waits for the command however long it runs: there is no 202 here. A sandbox that was given a `name` has left the node's table, and its name is free, before the answer says that the command has ended (the JSON answer, or the `exit`, `error` or `end` event of a stream): the next call can give the same name at once.

As a stream (`text/event-stream`): its events are `start`, `stdout`, `stderr`, `gap`, `exit` and `error`: [Event streams and terminals](/docs/api/#event-streams-and-terminals).

Takes `write` and `exec`.

## Authentication

- `apiKey`, http, header `Authorization`, scopes: `write`, `exec`

## Header parameters

- `X-Request-Id` (`runOnce.header.X-Request-Id`; string, optional) — The caller's own id for the request: 1 to 64 letters, digits, `.`, `_` and `-`. The node then knows the request by it: in the answer's `X-Request-Id`, in error bodies and in its log. Anything else is ignored, and the node makes an id.
  - pattern `^[A-Za-z0-9._\-]{1,64}$`
- `Idempotency-Key` (`runOnce.header.Idempotency-Key`; string, optional) — Makes the request safe to send again. See "Idempotency-Key" in the introduction.
  - minLength 1; maxLength 255

## Request body

_Required._

- `command` (`runOnce.command`; one of, required) — A string is one line for `sh -c`; a list is run as it is, without a shell, its first word found as a shell finds it: along the `PATH` of the command's own environment (the image's, with what `env` says). At most 1000 arguments, no NUL bytes.
  - one of: `string`, `array<string>`
- `start` (`runOnce.start`; boolean, optional) — `true`: start the image's own start command (ENTRYPOINT and CMD) when the machine boots; `false`: start nothing, whatever the image's labels ask for. Given (as any of `start`, `start_command` and `ready`), it is all that counts: the image's labels `sbx.start` and `sbx.ready` are not read. The sandbox is made from a template built with these settings and `env` (two settings of one image are two templates; the first sandbox of a setting is returned `starting` while it is built), which only its owner's sandboxes are made from. Not for a sandbox made from a `snapshot` or a `template` (400 `invalid_start`).
- `start_command` (`runOnce.start_command`; one of, optional) — The start command, run as the image's user, its output kept by the sandbox's agent as that of the command `exe-start` (the last 16 MiB of it, read like any command's with `GET …/exec/exe-start` and `…/exec/exe-start/output`; for an app's instance it is also what the app's log has of the instance): a string is run by `/bin/sh -c` and may hold several lines; a list is run as it is, without a shell (for an image that has none). At most 1000 arguments and 64 KiB, no NUL bytes, the first argument not empty. With `start: false`, 400 `invalid_start`.
  - one of: `string`, `array<string>`
- `ready` (`runOnce.ready`; one of, optional) — When the machine of the sandbox's template counts as up: the node saves the template, which every sandbox of these settings is cloned from, only once this check passes, so that the service is running in each of them from the start. One of three. `tcp` and `http` are tried by the node from the host, at the address the preview URLs reach the sandbox by: nothing runs in the sandbox for them, so an image without a shell can be checked, and the service has to listen on all addresses, not on 127.0.0.1 alone. `command` runs in the sandbox as the image's user, by `sh`, like the label `sbx.ready`. Tried every 0.2 s for at most 120 s; a start command that ends with a failure meanwhile ends the wait at once. Either way the sandbox fails with `failure_code` `boot_failed`, and `failure` says what the check last got and what the start command printed last. Needs `start: true` or `start_command` (400 `invalid_start`). Not given: the template is saved without waiting.
  - one of: `object`, `object`, `object`
- `egress` (`runOnce.egress`; object | null, optional) — What the sandbox may reach, and which of its requests get a secret added, as in `SandboxCreate`.
  - `default` (`runOnce.egress.default`; string | null, optional)
    - one of `"allow"`, `"deny"`, `null`
  - `allow` (`runOnce.egress.allow`; array | null, optional)
  - `deny` (`runOnce.egress.deny`; array | null, optional)
  - `http` (`runOnce.egress.http`; array | null, optional)
  - `inject` (`runOnce.egress.inject`; array | null, optional)
  - `deny_ports` (`runOnce.egress.deny_ports`; array | null, optional) — Ports no connection reaches, TCP or UDP, whatever else the rules say: at most 64, each from 1 to 65535. Null or empty: none.
- `guest_mitigations` (`runOnce.guest_mitigations`; boolean, optional) — Whether the guest kernel keeps its mitigations against speculative execution. They guard the guest's kernel against processes in the same sandbox: turn them on when a sandbox runs code of several users who do not trust each other. Sandboxes are kept apart from each other by the host either way. Default: the node's setting (off). The setting is fixed when the kernel boots: the first sandbox with a setting other than its image template's starts like a new image (returned `starting`), and a sandbox made from a snapshot keeps the snapshot's (asking for the other is 400).
- `tmp` (`runOnce.tmp`; string, optional) — Where the sandbox's /tmp is. `disk`: on its disk, as the rest. `memory`: a tmpfs of at most half of its memory, mounted before its first command (in a sandbox made from a template or an image, over what the template's guest had put there; by the guest's init where it starts from its disk): what is written there is the guest's memory, billed as memory, kept when it sleeps, and gone when it starts again from its disk. A sandbox made from a snapshot whose sandbox had it in memory has it so whatever this says.
  - one of `"disk"`, `"memory"`; default `"disk"`
- `runtime` (`runOnce.runtime`; any of, optional) — Runtime settings of its machine and its commands, as a Compose file's `ulimits`, `sysctls`, `tmpfs`, `dns` and `shm_size` ask for them (`Runtime`). For a sandbox made from an image: they make a template of the caller's own, built with them (with nothing said of the start, the image is started as its labels ask). Refused for one made from a snapshot or a template (400 `invalid_start`), which goes on with what its machine has.
  - any of: `NodeRuntime`, `null`
- `init` (`runOnce.init`; one of, optional) — What the sandbox's PID 1 is. Not given, or null: the platform's init, which starts the image's start command where there is one (`start`, `start_command`, the image's labels). `systemd`: a whole system. The image's own systemd is PID 1 and the node's agent is one of its services: the user installs packages, starts services with `systemctl`, uses cron and the journal and logs in by SSH, as on a machine. Nothing a create names is started (`start`, `start_command` and `ready` are refused with 400 `invalid_start`), and the template is saved once systemd says the machine has booted. Without `image`: the node's image of a whole system (`--systemd-image`; Ubuntu 24.04 with systemd and OpenSSH, sandboxd/images/ubuntu), refused with 400 `invalid_start` on a node that has none. An image without systemd (/usr/lib/systemd/systemd) fails its build, with `failure_code` `invalid_image`. Its template is anybody's who asks for the same image so, unless something of the caller's is in it (`runtime`, `image_pull_secret`). Refused for one made from a snapshot or a template (400 `invalid_start`), which goes on as its machine was. Everything else a sandbox does works as for any sandbox: commands, files, terminals, the SSH gateway, sleep and wake, snapshots and forks, moves, egress rules (sandboxd/README.md, 「整个系统：systemd 当 PID 1」).
  - one of: `string`, `null`
- `project_network` (`runOnce.project_network`; boolean, optional) — `true`: the sandbox is on its project's private network from before it runs anything, at the first of the addresses the node was left to spare for the project (`setProjectNetwork`): the answer says which (`project_address`). The project is the call's owner, so this is for a call the control plane makes for a project; on a node that stands alone a sandbox is nobody's, and is put on a network by being named in it. A sandbox is on no project's network unless it asks: default `false`. A copy made by a fork is on none, whatever its original is on.
- `image` (`runOnce.image`; string, optional) — An OCI image reference (`python:3.12`, `ghcr.io/org/app@sha256:…`), in a registry on the internet: one that gives the image to anybody, or one that wants a login, with `image_pull_secret`. The first sandbox of an image is returned `starting` while the node pulls the image and builds a template; later ones start from the template. Default: the node's base image.
  - maxLength 512
- `image_pull_secret` (`runOnce.image_pull_secret`; string, optional) — The name of a secret (`PUT /v1/secrets/{name}`) that holds the credentials of the image's registry, for an image that is not public: `username:password` in printable ASCII, the user name ending at the first colon. A registry that takes a token alone documents the user name that goes with it (`AWS` for ECR, `oauth2accesstoken` for Google's, any name for GHCR). The node hands the credentials to the tool that pulls the image and to nothing else: nothing of them is in the sandbox, in its template or in the node's log, and what a registry says when it refuses them comes back without them (`failure_code` `registry_auth_failed`). The sandbox is made from a template of its owner's alone, which a create that names credentials finds and no other: the same image named without them is asked of its registry without a login, whether or not the node has the template. The secret has to exist (404 `secret_not_found`), to be one that may go to the image's registry (its `allowed_hosts` cover the registry's host as the reference writes it, without its port, `docker.io` where it names none; 403 `secret_host_not_allowed` otherwise) and to hold such a pair (400 `invalid_field`), and it goes with `image` (400 `invalid_field` for a sandbox made from none).
  - maxLength 128
- `snapshot` (`runOnce.snapshot`; string, optional) — A snapshot's id or name: the sandbox goes on from the instant the snapshot was taken, processes included.
- `template` (`runOnce.template`; string, optional) — A template's key on the node (`base`, `img-…`), as `GET /internal/node` lists them. Not in the reference README; the benchmark scripts use it.
- `limits` (`runOnce.limits`; object, optional) — The shape a create asks for. Each part that is not given (or is null) is the node's base template's, which is what a sandbox that asks for none gets. Up to the most this node gives a sandbox, `max_vcpus` and `max_memory_bytes` of `GET /internal/node` (by default the host's CPUs, up to 32, and its memory; never less than the base template's shape); more is 400 `invalid_field`. Each shape of an image is a template of its own: the first sandbox of a shape the node has not built that image in is returned `starting` while the node builds it, from the same image, and later ones are cloned from it. Without `image`, another shape than the base template's is built from the node's base image. A sandbox made from a `snapshot` or a `template` has that one's shape: asking for it is fine, for another 400 `invalid_field` (param `limits`). The disk's size is the node's: `disk_bytes` is 400 `invalid_field`.
  - `vcpus` (`runOnce.limits.vcpus`; integer | null, optional) — Virtual CPUs.
    - min 1; max 32
  - `memory_bytes` (`runOnce.limits.memory_bytes`; integer | null, optional) — Memory, in bytes: an even number of MiB (a whole number of 2 MiB pages), 128 MiB or more. Any other size is 400 `invalid_field` (param `limits.memory_bytes`), as is the same size in a template made ahead (`POST /internal/templates`) and a shape of the ready list (`ready_images.unread_lines`): a node that keeps its templates' memory in huge pages loads a machine's memory in 2 MiB pages, and Firecracker refuses to load one of another size, so a template of 285 MiB would be built and every sandbox made from it fail. Not rounded: a sandbox has the size it is asked for, or is refused.
    - format `int64`; min 134217728
- `name` (`runOnce.name`; string, optional) — A name given by the caller to a sandbox, a snapshot, a volume or an SSH key: 1 to 63 lower-case letters, digits and hyphens, not starting or ending with a hyphen, and not starting with an id prefix (`sbx-`, `exe-`, `snap-`, `vol-`, `evt-`, `req-`; an SSH key's not with `sshkey-` either). A DNS label that cannot be taken for an id. Unique among sandboxes, among snapshots, among volumes and among SSH keys.
  - pattern `^[a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?$`
- `env` (`runOnce.env`; map<string>, optional) — Added to the sandbox's `env` for this command; the same name wins here.
- `metadata` (`runOnce.metadata`; map<string>, optional) — 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/usage` groups and filters by them).
- `volumes` (`runOnce.volumes`; array<object>, optional) — Volumes to mount before the call returns. At most two that are not shared.
  - `path` (`runOnce.volumes.path`; string, required) — Where the volume is mounted in the sandbox: an absolute path other than `/`.
  - `volume` (`runOnce.volumes.volume`; string, required) — The volume's id or name.
  - `read_only` (`runOnce.volumes.read_only`; boolean | null, optional) — Mount it read-only. For a shared volume this is enforced on the node, not in the sandbox.
    - default `false`
  - `copy` (`runOnce.volumes.copy`; boolean | null, optional) — `true`: a volume that is new (its file system holds nothing yet) is given what the sandbox's image has at `path` when it is first mounted, as Docker gives a new named volume: every file, directory and link, with its owner, mode, times, extended attributes and hard links (a database image's data directory, with the owner its server wants); and it is left empty then, without `lost+found`, as a new named volume is (a server that sets up its data directory refuses one that holds anything). A volume that holds something is mounted as it is. Only when a sandbox is made: a volume attached later (`PATCH`) takes no `copy` (400 `unknown_field`).
    - default `false`
  - `version` (`runOnce.volumes.version`; one of, optional) — A version of the Drive `volume` names, as a snapshot of it says it (slice D7): the sandbox is given a read-only view of that version, its own, fetched from the store as it is read, whatever has the Drive and wherever it is (the Drive may be deleted since). Mounted read-only.
    - one of: `NodeDriveVersion`, `null`
- `public_ports` (`runOnce.public_ports`; array<integer>, optional) — Ports anybody may open at their short preview URL.
  - min 1; max 65535
- `public_ports_except` (`runOnce.public_ports_except`; array | null, optional) — Every port but these is public as well: its short preview URL opens it for anybody, as a port in `public_ports` (how E2B makes a sandbox's ports; the control plane's E2B compatibility gives `[49983]`, envd's port, which a sandbox token opens). `[]`: every port. Null (the default): only `public_ports`. Ports are taken once each, in order.
- `inbound` (`runOnce.inbound`; array | null, optional) — Ports open to the internet at the sandbox's own IPv6 address from the start, each with its sources (`…/tcp/{port}` opens one later). A node without a pool of addresses refuses a list that is not empty: 409 `no_ipv6`.
- `sleep_after_seconds` (`runOnce.sleep_after_seconds`; number | null, optional) — Sleep after this long idle. Null: never by itself. The default is the node's (`--sleep-after-seconds`, 30 unless set).
  - min 1; max 1000000000; default `30`
- `expires_at` (`runOnce.expires_at`; string | null, optional) — Delete the sandbox at this time, which must be in the future (or what `on_expiry` says). Null or absent: never.
  - format `date-time`
- `on_expiry` (`runOnce.on_expiry`; string | null, optional) — What `expires_at` does when it comes: `delete` the sandbox (null or absent: this); `sleep`, put it to sleep whatever goes on in it, and keep it (its `expires_at` is null from then on, and a request wakes it as ever); `hold`, the same, held asleep (`held_asleep` is set then: a request does not wake it). How E2B pauses a sandbox when its time is up (the control plane's E2B compatibility). Another word is 400 `invalid_field`.
  - one of `"delete"`, `"sleep"`, `"hold"`, `null`; default `"delete"`
- `held_asleep` (`runOnce.held_asleep`; boolean | null, optional) — True: while it sleeps, a request to one of its ports does not wake it: the preview listener answers 502 `sandbox_paused` in its place, as E2B's proxy answers for a paused sandbox (`x-preview-ingress`), and only a call of the API (or its own timer) wakes it. It is not put to sleep by this: `POST /v1/sandboxes/{id}/sleep` does that. False or null: as any sandbox. (E2B's `pause` without its `autoResume`, which the control plane's E2B compatibility sets, and takes away at its `connect`.)
  - default `false`
- `sleep_notice_ms` (`runOnce.sleep_notice_ms`; integer | null, optional) — As in `SandboxCreate`: accepted, and of no effect, since the sandbox never sleeps.
  - min 0; max 60000
- `sleep_hold_max_ms` (`runOnce.sleep_hold_max_ms`; integer | null, optional) — As in `SandboxCreate`: accepted, and of no effect, since the sandbox never sleeps.
  - min 0; max 900000
- `suspend_after_ms` (`runOnce.suspend_after_ms`; integer | null, optional) — As in `SandboxCreate`: accepted, and of no effect, since the sandbox never sleeps.
  - min 1000; max 86400000
- `wake_daily_at` (`runOnce.wake_daily_at`; string | null, optional) — As in `SandboxCreate`: accepted, and of no effect, since the sandbox never sleeps.
  - pattern `^([01][0-9]|2[0-3]):[0-5][0-9]$`
- `checkpoint` (`runOnce.checkpoint`; one of, optional) — As in `SandboxCreate`: accepted, and its checkpoints taken while the command runs.
  - one of: `object`, `null`
- `delete_after_idle_ms` (`runOnce.delete_after_idle_ms`; integer | null, optional) — As in `SandboxCreate`: accepted, and of no effect, since the sandbox never sleeps.
  - format `int64`; min 1000
- `hostname` (`runOnce.hostname`; string | null, optional) — As in `SandboxCreate`.
  - maxLength 63; pattern `^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$`
- `stop` (`runOnce.stop`; object | null, optional) — How the sandbox's start command is stopped before its machine is ended for good: before a restart (`POST /v1/sandboxes/{id}/restart`) and a delete. The signal goes to the start command, which is then given `grace_ms` to end; what has not ended then goes with the machine. A machine that sleeps or is paused is not stopped: it goes on from where it was. Not given: the start command goes with its machine, as it always has. Unknown keys: 400 `unknown_field`; a signal that is none of these, or a grace beyond ten minutes: 400 `invalid_field`.
  - `signal` (`runOnce.stop.signal`; string | null, optional) — By its name, with `SIG` or without. Null: the image's own (its `STOPSIGNAL`), else SIGTERM.
    - one of `"SIGTERM"`, `"SIGINT"`, `"SIGQUIT"`, `"SIGHUP"`, `"SIGUSR1"`, `"SIGUSR2"`, `"SIGKILL"`, `"SIGWINCH"`, `"SIGPWR"`, `"SIGSTOP"`, `"TERM"`, `"INT"`, `"QUIT"`, `"HUP"`, `"USR1"`, `"USR2"`, `"KILL"`, `"WINCH"`, `"PWR"`, `"STOP"`, `null`
  - `grace_ms` (`runOnce.stop.grace_ms`; integer | null, optional) — Null or not given: 10000.
    - min 0; max 600000
- `secret_env` (`runOnce.secret_env`; map<string>, optional) — As in `SandboxCreate`: more variables, whose values are secrets, the sandbox's and so the command's; none of them in `env` too (400 `invalid_field`, `param` `secret_env.<name>`). No answer shows a value.
- `cwd` (`runOnce.cwd`; string, optional) — An absolute path to run in. Default: the image's working directory. A directory that does not exist is not an error of the call: the command ends with exit code 126.
- `user` (`runOnce.user`; string, optional) — A user name, a uid, or `uid:gid`. Default: the image's user.
  - minLength 1; maxLength 64
- `timeout_seconds` (`runOnce.timeout_seconds`; number, optional) — As in `RunRequest`, with a default: nothing else would stop the sandbox.
  - max 1000000000; default `300`
- `stdin` (`runOnce.stdin`; string, optional) — Fed to the command's input, which is then closed (unless `stdin_open`). Base64 when `encoding` says so. The whole request is 64 MiB at the most (413 `body_too_large` beyond): a longer input goes in `…/exec/{exec_id}/stdin` calls, or in a file first.
- `encoding` (`runOnce.encoding`; string, optional) — `base64`: `stdin` is base64, and `stdout` and `stderr` come back as base64 (in a stream: events carry `base64` instead of `text`). For output that is not text.
  - one of `"utf8"`, `"base64"`; default `"utf8"`
- `stream` (`runOnce.stream`; boolean, optional) — Answer with an event stream. Default: true if the request's `Accept` contains `text/event-stream`.
- `wait_for_reader` (`runOnce.wait_for_reader`; boolean, optional) — Have the command wait for whoever reads this call's answer, instead of running ahead of it. As in `RunRequest`.
  - default `false`
- `region` (`runOnce.region`; string | null, optional) — The region to make it in, read by the API and not passed on. Null or left out: the region the API itself runs in. Where no machine of that region can take it, the next region does; what has to go to one machine (made from a snapshot or with volumes, or sent again with the same `Idempotency-Key`) goes there, whatever the region. A volume made from a backup is made in the backup's region: another is 400 `invalid_field`. Not a region: 400 `unknown_region`. The answer's `region` says where it was made.
  - one of `"na"`, `"eu"`, `"ap"`, `null`

## Example request

```json
{
  "start": true,
  "start_command": "string",
  "ready": {
    "tcp": true,
    "port": 1
  },
  "egress": {
    "default": "allow",
    "allow": [
      "string"
    ],
    "deny": [
      "string"
    ],
    "http": [
      {
        "host": "string",
        "allow": [
          {
            "methods": [
              "string"
            ],
            "paths": [
              "string"
            ]
          }
        ]
      }
    ],
    "inject": [
      {
        "host": "string",
        "headers": {
          "property1": "string",
          "property2": "string"
        }
      }
    ],
    "deny_ports": [
      1
    ]
  },
  "guest_mitigations": true,
  "tmp": "disk",
  "runtime": {
    "ulimits": {
      "property1": -1,
      "property2": -1
    },
    "sysctls": {
      "property1": "string",
      "property2": "string"
    },
    "tmpfs": [
      {
        "path": "string",
        "size_bytes": 1048576,
        "mode": 4095
      }
    ],
    "dns": {
      "servers": [
        "string"
      ],
      "search": [
        "string"
      ],
      "options": [
        "string"
      ]
    },
    "shm_size_bytes": 1048576
  },
  "init": "systemd",
  "project_network": true,
  "image": "string",
  "image_pull_secret": "string",
  "snapshot": "string",
  "template": "string",
  "limits": {
    "vcpus": 1,
    "memory_bytes": 134217728
  },
  "name": "string",
  "env": {
    "property1": "string",
    "property2": "string"
  },
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "volumes": [
    {
      "path": "string",
      "volume": "string",
      "read_only": false,
      "copy": false,
      "version": {
        "name": "string",
        "bytes": 0,
        "epoch": 1,
        "number": 1,
        "token": "string",
        "refs": "string",
        "store": "string",
        "key": "string"
      }
    }
  ],
  "public_ports": [
    1
  ],
  "public_ports_except": [
    1
  ],
  "inbound": [
    {
      "protocol": "tcp",
      "port": 1,
      "from": [
        "string"
      ]
    }
  ],
  "sleep_after_seconds": 30,
  "expires_at": "2019-08-24T14:15:22Z",
  "on_expiry": "delete",
  "held_asleep": false,
  "sleep_notice_ms": 60000,
  "sleep_hold_max_ms": 900000,
  "suspend_after_ms": 1000,
  "wake_daily_at": "string",
  "checkpoint": {
    "every_seconds": 1
  },
  "delete_after_idle_ms": 1000,
  "hostname": "string",
  "stop": {
    "signal": "SIGTERM",
    "grace_ms": 600000
  },
  "secret_env": {
    "property1": "string",
    "property2": "string"
  },
  "command": "string",
  "cwd": "string",
  "user": "string",
  "timeout_seconds": 300,
  "stdin": "string",
  "encoding": "utf8",
  "stream": true,
  "wait_for_reader": false,
  "region": "na"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.glac.ai/v1/run \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "start": true,
  "start_command": "string",
  "ready": {
    "tcp": true,
    "port": 1
  },
  "egress": {
    "default": "allow",
    "allow": [
      "string"
    ],
    "deny": [
      "string"
    ],
    "http": [
      {
        "host": "string",
        "allow": [
          {
            "methods": [
              "string"
            ],
            "paths": [
              "string"
            ]
          }
        ]
      }
    ],
    "inject": [
      {
        "host": "string",
        "headers": {
          "property1": "string",
          "property2": "string"
        }
      }
    ],
    "deny_ports": [
      1
    ]
  },
  "guest_mitigations": true,
  "tmp": "disk",
  "runtime": {
    "ulimits": {
      "property1": -1,
      "property2": -1
    },
    "sysctls": {
      "property1": "string",
      "property2": "string"
    },
    "tmpfs": [
      {
        "path": "string",
        "size_bytes": 1048576,
        "mode": 4095
      }
    ],
    "dns": {
      "servers": [
        "string"
      ],
      "search": [
        "string"
      ],
      "options": [
        "string"
      ]
    },
    "shm_size_bytes": 1048576
  },
  "init": "systemd",
  "project_network": true,
  "image": "string",
  "image_pull_secret": "string",
  "snapshot": "string",
  "template": "string",
  "limits": {
    "vcpus": 1,
    "memory_bytes": 134217728
  },
  "name": "string",
  "env": {
    "property1": "string",
    "property2": "string"
  },
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "volumes": [
    {
      "path": "string",
      "volume": "string",
      "read_only": false,
      "copy": false,
      "version": {
        "name": "string",
        "bytes": 0,
        "epoch": 1,
        "number": 1,
        "token": "string",
        "refs": "string",
        "store": "string",
        "key": "string"
      }
    }
  ],
  "public_ports": [
    1
  ],
  "public_ports_except": [
    1
  ],
  "inbound": [
    {
      "protocol": "tcp",
      "port": 1,
      "from": [
        "string"
      ]
    }
  ],
  "sleep_after_seconds": 30,
  "expires_at": "2019-08-24T14:15:22Z",
  "on_expiry": "delete",
  "held_asleep": false,
  "sleep_notice_ms": 60000,
  "sleep_hold_max_ms": 900000,
  "suspend_after_ms": 1000,
  "wake_daily_at": "string",
  "checkpoint": {
    "every_seconds": 1
  },
  "delete_after_idle_ms": 1000,
  "hostname": "string",
  "stop": {
    "signal": "SIGTERM",
    "grace_ms": 600000
  },
  "secret_env": {
    "property1": "string",
    "property2": "string"
  },
  "command": "string",
  "cwd": "string",
  "user": "string",
  "timeout_seconds": 300,
  "stdin": "string",
  "encoding": "utf8",
  "stream": true,
  "wait_for_reader": false,
  "region": "na"
}
'
```

### TypeScript

```typescript
const url = 'https://api.glac.ai/v1/run';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    start: true,
    start_command: 'string',
    ready: {tcp: true, port: 1},
    egress: {
      default: 'allow',
      allow: ['string'],
      deny: ['string'],
      http: [{host: 'string', allow: [{methods: ['string'], paths: ['string']}]}],
      inject: [{host: 'string', headers: {property1: 'string', property2: 'string'}}],
      deny_ports: [1]
    },
    guest_mitigations: true,
    tmp: 'disk',
    runtime: {
      ulimits: {property1: -1, property2: -1},
      sysctls: {property1: 'string', property2: 'string'},
      tmpfs: [{path: 'string', size_bytes: 1048576, mode: 4095}],
      dns: {servers: ['string'], search: ['string'], options: ['string']},
      shm_size_bytes: 1048576
    },
    init: 'systemd',
    project_network: true,
    image: 'string',
    image_pull_secret: 'string',
    snapshot: 'string',
    template: 'string',
    limits: {vcpus: 1, memory_bytes: 134217728},
    name: 'string',
    env: {property1: 'string', property2: 'string'},
    metadata: {property1: 'string', property2: 'string'},
    volumes: [
      {
        path: 'string',
        volume: 'string',
        read_only: false,
        copy: false,
        version: {
          name: 'string',
          bytes: 0,
          epoch: 1,
          number: 1,
          token: 'string',
          refs: 'string',
          store: 'string',
          key: 'string'
        }
      }
    ],
    public_ports: [1],
    public_ports_except: [1],
    inbound: [{protocol: 'tcp', port: 1, from: ['string']}],
    sleep_after_seconds: 30,
    expires_at: '2019-08-24T14:15:22Z',
    on_expiry: 'delete',
    held_asleep: false,
    sleep_notice_ms: 60000,
    sleep_hold_max_ms: 900000,
    suspend_after_ms: 1000,
    wake_daily_at: 'string',
    checkpoint: {every_seconds: 1},
    delete_after_idle_ms: 1000,
    hostname: 'string',
    stop: {signal: 'SIGTERM', grace_ms: 600000},
    secret_env: {property1: 'string', property2: 'string'},
    command: 'string',
    cwd: 'string',
    user: 'string',
    timeout_seconds: 300,
    stdin: 'string',
    encoding: 'utf8',
    stream: true,
    wait_for_reader: false,
    region: 'na'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.glac.ai/v1/run"

payload = {
    "start": True,
    "start_command": "string",
    "ready": {
        "tcp": True,
        "port": 1
    },
    "egress": {
        "default": "allow",
        "allow": ["string"],
        "deny": ["string"],
        "http": [
            {
                "host": "string",
                "allow": [
                    {
                        "methods": ["string"],
                        "paths": ["string"]
                    }
                ]
            }
        ],
        "inject": [
            {
                "host": "string",
                "headers": {
                    "property1": "string",
                    "property2": "string"
                }
            }
        ],
        "deny_ports": [1]
    },
    "guest_mitigations": True,
    "tmp": "disk",
    "runtime": {
        "ulimits": {
            "property1": -1,
            "property2": -1
        },
        "sysctls": {
            "property1": "string",
            "property2": "string"
        },
        "tmpfs": [
            {
                "path": "string",
                "size_bytes": 1048576,
                "mode": 4095
            }
        ],
        "dns": {
            "servers": ["string"],
            "search": ["string"],
            "options": ["string"]
        },
        "shm_size_bytes": 1048576
    },
    "init": "systemd",
    "project_network": True,
    "image": "string",
    "image_pull_secret": "string",
    "snapshot": "string",
    "template": "string",
    "limits": {
        "vcpus": 1,
        "memory_bytes": 134217728
    },
    "name": "string",
    "env": {
        "property1": "string",
        "property2": "string"
    },
    "metadata": {
        "property1": "string",
        "property2": "string"
    },
    "volumes": [
        {
            "path": "string",
            "volume": "string",
            "read_only": False,
            "copy": False,
            "version": {
                "name": "string",
                "bytes": 0,
                "epoch": 1,
                "number": 1,
                "token": "string",
                "refs": "string",
                "store": "string",
                "key": "string"
            }
        }
    ],
    "public_ports": [1],
    "public_ports_except": [1],
    "inbound": [
        {
            "protocol": "tcp",
            "port": 1,
            "from": ["string"]
        }
    ],
    "sleep_after_seconds": 30,
    "expires_at": "2019-08-24T14:15:22Z",
    "on_expiry": "delete",
    "held_asleep": False,
    "sleep_notice_ms": 60000,
    "sleep_hold_max_ms": 900000,
    "suspend_after_ms": 1000,
    "wake_daily_at": "string",
    "checkpoint": { "every_seconds": 1 },
    "delete_after_idle_ms": 1000,
    "hostname": "string",
    "stop": {
        "signal": "SIGTERM",
        "grace_ms": 600000
    },
    "secret_env": {
        "property1": "string",
        "property2": "string"
    },
    "command": "string",
    "cwd": "string",
    "user": "string",
    "timeout_seconds": 300,
    "stdin": "string",
    "encoding": "utf8",
    "stream": True,
    "wait_for_reader": False,
    "region": "na"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The command has ended: its result as JSON, or the event stream that led there. `sandbox_id` names the sandbox, which no longer exists.

#### Body (application/json)

- `id` (`runOnce.response.200.id`; string, required) — `exe-` and 16 characters. With an `Idempotency-Key` it is derived from the sandbox's id, the call (`run` or `exec`) and the key.
  - pattern `^exe-[0-9a-hjkmnp-tv-z]{16}$`
- `object` (`runOnce.response.200.object`; string, required)
- `sandbox_id` (`runOnce.response.200.sandbox_id`; string, required)
  - pattern `^sbx-[0-9a-hjkmnp-tv-z]{16}$`
- `command` (`runOnce.response.200.command`; string, required) — The command as text: the line, or the arguments joined by spaces; `shell` for a terminal started without a command. At most 1024 characters. A command that came with a snapshot or a fork is listed as it was where it started: the sandbox keeps this itself.
- `tty` (`runOnce.response.200.tty`; boolean, required) — Whether it runs on a terminal.
- `status` (`runOnce.response.200.status`; string, required) — `exited`: it ended by itself, with any exit code. `timed_out`: `timeout_seconds` was up. `killed`: a signal ended it.
- `exit_code` (`runOnce.response.200.exit_code`; integer | null, required) — Null while running. 128 plus the signal's number when a signal ended it. A non-zero code is a result, not an error.
- `signal` (`runOnce.response.200.signal`; string | null, required) — The signal that ended it, as `SIGTERM`, `SIGKILL`, … or `SIG<number>` for one the daemon has no name for; null otherwise.
  - pattern `^SIG[A-Z0-9]+$`
- `started_at` (`runOnce.response.200.started_at`; string, required) — From the sandbox's clock: the same in the full object and in a list.
  - format `date-time`
- `pid` (`runOnce.response.200.pid`; integer, required) — Its process id in the sandbox.
- `duration_seconds` (`runOnce.response.200.duration_seconds`; number | null, required) — Wall time from start to end. Null while running.
  - min 0
- `usage` (`runOnce.response.200.usage`; one of, required) — Null while running.
  - one of: `ExecUsage`, `null`
- `output` (`runOnce.response.200.output`; object, required) — How much the command has written and which part of it can still be read.
  - `stdout_bytes` (`runOnce.response.200.output.stdout_bytes`; integer, required) — Bytes written to stdout so far.
    - format `int64`; min 0
  - `stderr_bytes` (`runOnce.response.200.output.stderr_bytes`; integer, required)
    - format `int64`; min 0
  - `start` (`runOnce.response.200.output.start`; integer, required) — The position of the oldest byte still kept. Positions count the bytes of both streams together, in the order they were written; the sandbox keeps the last 16 MiB.
    - format `int64`; min 0
  - `end` (`runOnce.response.200.output.end`; integer, required) — The position after the newest byte.
    - format `int64`; min 0
- `stdout` (`runOnce.response.200.stdout`; string, required) — The last 1 MiB of stdout. Text, with bytes that are not UTF-8 replaced; base64 when `encoding` is `base64`.
- `stderr` (`runOnce.response.200.stderr`; string, required) — The last 1 MiB of stderr.
- `truncated` (`runOnce.response.200.truncated`; boolean, required) — True when either stream was longer than 1 MiB, or part of the output was no longer kept.
- `encoding` (`runOnce.response.200.encoding`; string, required) — How `stdout` and `stderr` are written: as the request asked.

##### Example

```json
{
  "id": "string",
  "object": "exec",
  "sandbox_id": "string",
  "command": "string",
  "tty": true,
  "status": "string",
  "exit_code": 0,
  "signal": "string",
  "started_at": "2019-08-24T14:15:22Z",
  "pid": 0,
  "duration_seconds": 0,
  "usage": {
    "cpu_seconds": 0,
    "max_memory_bytes": 0
  },
  "output": {
    "stdout_bytes": 0,
    "stderr_bytes": 0,
    "start": 0,
    "end": 0
  },
  "stdout": "string",
  "stderr": "string",
  "truncated": true,
  "encoding": "string"
}
```

#### Body (text/event-stream)

##### Example

```text
string
```

### 400

The request is not one this call takes. `invalid_json`: the body is not a JSON object; `unknown_field`: the body has a field this call does not take; `unknown_parameter`: the query has a parameter this call does not take; `invalid_field`: a field or query parameter has the wrong type or is out of range; `invalid_name`: `name` is not a valid name; `invalid_env`: `env` has a name or a value an environment cannot hold; `invalid_metadata`: `metadata` is over its limits; `expires_in_the_past`: `expires_at` is not in the future; `invalid_egress`: `egress` is not a set of rules: `param` names the part that is wrong; `invalid_start`: `start`, `start_command` and `ready` do not go together as given (`ready` without a start command, `start: false` with `start_command`), or one of them is given with `init: "systemd"`, whose systemd starts what its units say, or `init: "systemd"` names no `image` on a node that has no image of a whole system (`--systemd-image`), or the sandbox is made from a `snapshot` or a `template`: `param` names the field; `ambiguous_source`: more than one of `image`, `snapshot` and `template`; `invalid_image`: `image` is not a reference to an image in a registry on the internet; `invalid_path`: a volume's `path` is not absolute or is `/`; `missing_command`: no `command`; `no_such_user`: `user` is not a user of the sandbox; `invalid_idempotency_key`: `Idempotency-Key` is empty or over 255 characters.

#### Example

```json
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "retryable": true,
    "request_id": "string",
    "docs_url": "string"
  },
  "allowed_hosts": [
    "string"
  ],
  "to": "string",
  "epoch": 1,
  "offset": 0,
  "exec_id": "string",
  "disk_ms": 0,
  "memory_ms": 0,
  "drives_ms": 0,
  "image_ms": 0,
  "image": "string",
  "build": "string"
}
```

- `error` (`runOnce.response.400.error`; object, required)
  - `type` (`runOnce.response.400.error.type`; string, required) — The kind of failure. It decides the status: `invalid_request` 400, `unauthenticated` 401, `forbidden` 403, `not_found` 404, `conflict` 409, `too_large` 413, `internal` 500, `bad_gateway` 502 (the preview listener, the egress proxy, and a takeover that could not bring its sandbox), `unavailable` 503, `timeout` 504.
  - `code` (`runOnce.response.400.error.code`; string, required) — Which failure. The top-level `x-error-codes` table of this document says what each one means.
  - `message` (`runOnce.response.400.error.message`; string, required) — For people. English.
  - `param` (`runOnce.response.400.error.param`; string | null, required) — The field or query parameter at fault, when there is one.
  - `retryable` (`runOnce.response.400.error.retryable`; boolean, required) — True when the same request may succeed later without anything else changing.
  - `request_id` (`runOnce.response.400.error.request_id`; string, required) — The `X-Request-Id` of the response it is in, also when that response is a replay for an `Idempotency-Key`.
    - pattern `^[A-Za-z0-9._\-]{1,64}$`
  - `docs_url` (`runOnce.response.400.error.docs_url`; string | null, required) — The node's `--docs-url` with the code appended, or null.
- `allowed_hosts` (`runOnce.response.400.allowed_hosts`; array | null, optional) — With `secret_host_not_allowed`: the hosts the secret may go to, as the secret has them; null where it was given none.
- `to` (`runOnce.response.400.to`; string | null, optional) — With `moved` and `sandbox_moved`: the node the sandbox was released to, as the control plane named it, or null.
- `epoch` (`runOnce.response.400.epoch`; integer, optional) — With `moved` and `sandbox_moved`: the epoch the sandbox was released at. With `wrong_epoch`: the epoch this node holds it at, or released it at.
  - format `int64`; min 1
- `offset` (`runOnce.response.400.offset`; integer, optional) — With `sandbox_moved`: the position in the command's output the call, stream or terminal had reached (a stream's last event's `id`): read on from it where the sandbox went (`Last-Event-ID`, or `from`).
  - format `int64`; min 0
- `exec_id` (`runOnce.response.400.exec_id`; string, optional) — With `sandbox_moved` of `POST …/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 with `GET …/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.
- `disk_ms` (`runOnce.response.400.disk_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the disk as of the sleep; null where it did.
  - min 0
- `memory_ms` (`runOnce.response.400.memory_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the memory image of that sleep; null where it did.
  - min 0
- `drives_ms` (`runOnce.response.400.drives_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the sandbox's Drives as they are (slice D2); null where it did, or where it has none.
  - min 0
- `image_ms` (`runOnce.response.400.image_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the image the sandbox's disk is over (its node copies a disk before its template's image is there); null where it did.
  - min 0
- `image` (`runOnce.response.400.image`; string, optional) — With `image_missing`: the id of the image the object store does not have, as the disks over it and a template's `disk_image` name it.
  - pattern `^[A-Za-z0-9_-]{1,128}$`
- `build` (`runOnce.response.400.build`; string, optional) — With `build_missing`: the build of Firecracker that wrote the sandbox's memory, which this node does not keep.
  - pattern `^[0-9a-f]{16}$`

### 401

`missing_api_key`, `invalid_api_key`, `expired_api_key`, `invalid_token`.

#### Example

```json
{
  "move_id": "string",
  "upgrade_id": "string",
  "move": {
    "object": "move",
    "id": "string",
    "sandbox_id": "string",
    "project_id": "string",
    "from": {
      "id": "string",
      "name": "string"
    },
    "to": {
      "id": "string",
      "name": "string"
    },
    "epoch": 1,
    "step": "string",
    "why": "string",
    "wake": true,
    "from_store": true,
    "release": {},
    "takeover": {},
    "error": {
      "code": "string",
      "message": "string",
      "status": 0,
      "takeover_refused": {
        "code": "string",
        "message": "string",
        "status": 0
      },
      "image": "string",
      "holder": "string",
      "holder_says": "has"
    },
    "attempts": 0,
    "next_attempt_at": "2019-08-24T14:15:22Z",
    "batch": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "ended_at": "2019-08-24T14:15:22Z"
  },
  "lease_until": "2019-08-24T14:15:22Z",
  "active": {
    "name": "string",
    "url": "string",
    "term": 1
  },
  "allowed_hosts": [
    "string"
  ],
  "problems": [
    {
      "at": "string",
      "message": "string"
    }
  ],
  "report": {
    "object": "compose_import",
    "name": "string",
    "dry_run": true,
    "strict": true,
    "profiles": [
      "string"
    ],
    "treatments": {
      "done": 0,
      "adapted": 0,
      "ignored": 0,
      "refused": 0
    },
    "items": [
      {
        "at": "string",
        "treatment": "done",
        "why": "string",
        "change": "string"
      }
    ],
    "services": [
      {
        "name": "string",
        "app_id": "string",
        "status": "created",
        "kind": "service",
        "stateful": true,
        "version": true,
        "items": [
          {
            "at": "string",
            "treatment": "done",
            "why": "string",
            "change": "string"
          }
        ],
        "app": {
          "image": "string",
          "image_pull_secret": "string",
          "start_command": "string",
          "start_args": [
            "string"
          ],
          "port": 0,
          "ready": {
            "http": "string"
          },
          "env": {
            "property1": "string",
            "property2": "string"
          },
          "secrets": {
            "property1": "string",
            "property2": "string"
          },
          "size": {
            "vcpus": 1,
            "memory_bytes": 134217728
          },
          "volumes": [
            {
              "volume": "string",
              "path": "string",
              "read_only": true,
              "nocopy": true
            }
          ],
          "drives": [
            {
              "drive": "string",
              "path": "string",
              "mode": "string"
            }
          ],
          "key_drives": [
            {
              "name": "string",
              "path": "string",
              "size_bytes": 0,
              "nocopy": true
            }
          ],
          "kind": "string",
          "files": [
            {
              "path": "string",
              "content": "string",
              "secret": "string",
              "mode": 0,
              "uid": 0,
              "gid": 0
            }
          ],
          "user": "string",
          "working_dir": "string",
          "stop": {
            "signal": "string",
            "grace_ms": 0
          },
          "hostname": "string",
          "runtime": {
            "ulimits": {
              "property1": {},
              "property2": {}
            },
            "sysctls": {
              "property1": "string",
              "property2": "string"
            },
            "tmpfs": [
              {}
            ],
            "dns": {
              "servers": [
                null
              ],
              "search": [
                null
              ],
              "options": [
                null
              ]
            },
            "shm_size_bytes": 0
          },
          "regions": [
            "string"
          ],
          "scale": {
            "min_instances": 0,
            "max_instances": 1,
            "concurrency": 1,
            "sleep_after_ms": 600000,
            "sleep_notice_ms": 60000,
            "sleep_hold_max_ms": 900000,
            "suspend_after_ms": 1000,
            "wake_daily_at": "string",
            "delete_after_ms": 1000
          },
          "keys": {
            "from": {
              "header": "string"
            },
            "upgrade_on_deploy": true,
            "delete_after_idle_ms": 1000
          },
          "egress": {
            "default": "allow",
            "allow": [
              "string"
            ],
            "deny": [
              "string"
            ],
            "http": [
              {
                "allow": []
              }
            ],
            "inject": [
              {
                "headers": {}
              }
            ],
            "deny_ports": [
              1
            ]
          },
          "metadata": {
            "property1": "string",
            "property2": "string"
          },
          "logs": {
            "output": true,
            "keep": true,
            "requests": {
              "sample_rate": 1,
              "keep_errors": true
            }
          },
          "traces": {
            "sample_rate": 1,
            "trust_incoming": true
          },
          "public": true,
          "depends_on": [
            {
              "service": "string",
              "condition": "string"
            }
          ],
          "network": {
            "aliases": [
              "string"
            ],
            "endpoint_mode": "string"
          }
        }
      }
    ],
    "volumes": [
      {
        "model": "string",
        "name": "string",
        "id": "string",
        "shared": true,
        "status": "to_make",
        "used_by": [
          "string"
        ]
      }
    ],
    "secrets": [
      {
        "model": "string",
        "name": "string",
        "there": true,
        "used_by": [
          "string"
        ]
      }
    ],
    "left_out": [
      {
        "name": "string",
        "profiles": [
          "string"
        ]
      }
    ],
    "absent": [
      "string"
    ],
    "deploy": "string"
  },
  "accounts": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "retryable": true,
    "request_id": "string",
    "docs_url": "string"
  }
}
```

- `error` (`runOnce.response.401.error`; object, required)
  - `type` (`runOnce.response.401.error.type`; string, required)
  - `code` (`runOnce.response.401.error.code`; string, required)
  - `message` (`runOnce.response.401.error.message`; string, required)
  - `param` (`runOnce.response.401.error.param`; string | null, required)
  - `retryable` (`runOnce.response.401.error.retryable`; boolean, required)
  - `request_id` (`runOnce.response.401.error.request_id`; string, required)
  - `docs_url` (`runOnce.response.401.error.docs_url`; string | null, required)
- `move_id` (`runOnce.response.401.move_id`; string, optional) — With `already_moving`: the move of the sandbox that is under way.
- `upgrade_id` (`runOnce.response.401.upgrade_id`; string, optional) — With `upgrade_in_progress` (the key's upgrade that is not over), `upgrade_started` (the upgrade that has begun) and `rollback_gone` (the upgrade whose revert is refused): that upgrade.
  - pattern `^upg-[0-9a-hjkmnp-tv-z]{16}$`
- `move` (`runOnce.response.401.move`; object, optional) — With `move_over`, `move_going_back` and `move_taken_over` (`POST /internal/moves/{id}/cancel`): the move, as it stands.
  - `object` (`runOnce.response.401.move.object`; string, required)
  - `id` (`runOnce.response.401.move.id`; string, required)
    - pattern `^mov-[0-9a-hjkmnp-tv-z]{16}$`
  - `sandbox_id` (`runOnce.response.401.move.sandbox_id`; string, required)
  - `project_id` (`runOnce.response.401.move.project_id`; string, required)
  - `from` (`runOnce.response.401.move.from`; object, required)
    - `id` (`runOnce.response.401.move.from.id`; string, required)
    - `name` (`runOnce.response.401.move.from.name`; string | null, required) — Its name; null for a node that is off the books since.
  - `to` (`runOnce.response.401.move.to`; object, required)
    - `id` (`runOnce.response.401.move.to.id`; string, required)
    - `name` (`runOnce.response.401.move.to.name`; string | null, required) — Its name; null for a node that is off the books since.
  - `epoch` (`runOnce.response.401.move.epoch`; integer, required) — The epoch the table held the sandbox at when the move began: the old node releases it at it, the new one takes it over one on, the old one takes it back two on, and from the object store three on.
    - min 1
  - `step` (`runOnce.response.401.move.step`; string, required) — Where it stands: `releasing` (the old node is asked to release it; the table has it there), `taking_over` (the new node is asked to take it over; the table has it there), `reclaiming` (the new node refused it, and the old one is asked to take it back), `restoring` (the old one kept nothing of it, and takes it over from the object store), `done` (on the new node), `failed` (where it was, or back there, or where a failure no time clears or an operator's cancel found it: `error` says why).
  - `why` (`runOnce.response.401.move.why`; string, required) — What made it: the operator's move, an evacuation, a recovery.
  - `wake` (`runOnce.response.401.move.wake`; boolean, required) — Whether the new node wakes it: as the call said, or as it was (it ran) when the move began.
  - `from_store` (`runOnce.response.401.move.from_store`; boolean, required) — The new node takes it from the object store alone.
  - `release` (`runOnce.response.401.move.release`; object | null, required) — What the old node's release answered (sandboxd/openapi/openapi.json, `releaseSandbox`), without the release's key; null before it answered.
  - `takeover` (`runOnce.response.401.move.takeover`; object | null, required) — What the takeover that ended it answered (`takeoverSandbox` of the node's document): where its disk and memory came from (`source`), how long each took (`ms`), `memory`; null before.
  - `error` (`runOnce.response.401.move.error`; one of, required) — Why it failed, of one that failed (the new node's refusal, where it was taken back to the old node); null, of one that is done; of one under way, what the step it is at was last told where it is asked again.
    - one of: `object`, `null`
  - `attempts` (`runOnce.response.401.move.attempts`; integer, required) — How many times the step it is at was asked without an answer that settles it.
    - min 0
  - `next_attempt_at` (`runOnce.response.401.move.next_attempt_at`; string | null, required) — When that step is asked again; null where it is not waiting.
    - format `date-time`
  - `batch` (`runOnce.response.401.move.batch`; string | null, required) — The evacuation (`evc-…`) or recovery (`rcv-…`) it is of.
  - `created_at` (`runOnce.response.401.move.created_at`; string, required)
    - format `date-time`
  - `updated_at` (`runOnce.response.401.move.updated_at`; string, required)
    - format `date-time`
  - `ended_at` (`runOnce.response.401.move.ended_at`; string | null, required)
    - format `date-time`
- `lease_until` (`runOnce.response.401.lease_until`; string, optional) — With `lease_held`: until when the node may still hold the lease it was granted last, and the time after it for the node to have seen it run out (`recoverNode` is refused until then).
  - format `date-time`
- `active` (`runOnce.response.401.active`; object | null, optional) — With `standby`: the active copy, as the standby last read the lease; null while no copy holds it.
  - `name` (`runOnce.response.401.active.name`; string, required)
  - `url` (`runOnce.response.401.active.url`; string, required)
  - `term` (`runOnce.response.401.active.term`; integer, required)
    - min 1
- `allowed_hosts` (`runOnce.response.401.allowed_hosts`; array | null, optional) — With `secret_host_not_allowed`: the hosts the secret may go to, as the secret has them; null where it was given none (the node's `SecretHosts`).
- `problems` (`runOnce.response.401.problems`; array<object>, optional) — With `invalid_definition`: every problem of the definition, each where it is and what it is.
  - `at` (`runOnce.response.401.problems.at`; string, required) — Where in the definition, a dotted path (`services.web.port`); empty for the whole of it.
  - `message` (`runOnce.response.401.problems.message`; string, required)
- `report` (`runOnce.response.401.report`; object, optional) — With `compose_refused`: the import's report, which says what is refused, why, and what to change.
  - `object` (`runOnce.response.401.report.object`; string, required)
    - one of `"compose_import"`
  - `name` (`runOnce.response.401.report.name`; string | null, required) — The model's `name`: each service's label `compose.project`. Null: it has none.
  - `dry_run` (`runOnce.response.401.report.dry_run`; boolean, required)
  - `strict` (`runOnce.response.401.report.strict`; boolean, required)
  - `profiles` (`runOnce.response.401.report.profiles`; array<string>, required)
  - `treatments` (`runOnce.response.401.report.treatments`; object, required) — How many items of the report have each treatment.
    - `done` (`runOnce.response.401.report.treatments.done`; integer, required)
      - min 0
    - `adapted` (`runOnce.response.401.report.treatments.adapted`; integer, required)
      - min 0
    - `ignored` (`runOnce.response.401.report.treatments.ignored`; integer, required)
      - min 0
    - `refused` (`runOnce.response.401.report.treatments.refused`; integer, required)
      - min 0
  - `items` (`runOnce.response.401.report.items`; array<object>, required) — The model's top-level elements: `name`, each volume, network, config and secret, extensions.
    - `at` (`runOnce.response.401.report.items.at`; string, required) — Where in the model: of a service, its attribute (`ports[0]`, `depends_on.db`, `environment.KEY`), empty for the service as a whole; of the top level, the element (`volumes.db-data`).
    - `treatment` (`runOnce.response.401.report.items.treatment`; string, required) — `done`: it means the same on the platform; `adapted`: the platform does the same another way; `ignored`: it matters to a local run alone (refused with `strict`); `refused`: the platform cannot do it, and doing without it would let the program go wrong quietly.
      - one of `"done"`, `"adapted"`, `"ignored"`, `"refused"`
    - `why` (`runOnce.response.401.report.items.why`; string, required)
    - `change` (`runOnce.response.401.report.items.change`; string | null, required) — Of one that is refused: what to change. Null otherwise.
  - `services` (`runOnce.response.401.report.services`; array<object>, required) — The services the import takes, in the model's order.
    - `name` (`runOnce.response.401.report.services.name`; string, required) — The service's name, which is its app's.
    - `app_id` (`runOnce.response.401.report.services.app_id`; string | null, required) — Its app. Null: a dry run of a service the project does not have.
      - pattern `^app-`
    - `status` (`runOnce.response.401.report.services.status`; string, required) — What the import does (or, in a dry run, would do) to its app: makes it, writes what changed, or nothing.
      - one of `"created"`, `"changed"`, `"unchanged"`
    - `kind` (`runOnce.response.401.report.services.kind`; string, required) — `job`: a service of the model waits for it to complete, and it runs to its end in each deploy that needs it.
      - one of `"service"`, `"job"`
    - `stateful` (`runOnce.response.401.report.services.stateful`; boolean, required) — It mounts a volume of its own: one instance, which has the volume.
    - `version` (`runOnce.response.401.report.services.version`; boolean, required) — Whether the import's deploy makes a version of it: what its version would be made of, its references resolved, is not what its current version is.
    - `items` (`runOnce.response.401.report.services.items`; array<object>, required)
      - `at` (`runOnce.response.401.report.services.items.at`; string, required) — Where in the model: of a service, its attribute (`ports[0]`, `depends_on.db`, `environment.KEY`), empty for the service as a whole; of the top level, the element (`volumes.db-data`).
      - `treatment` (`runOnce.response.401.report.services.items.treatment`; string, required) — `done`: it means the same on the platform; `adapted`: the platform does the same another way; `ignored`: it matters to a local run alone (refused with `strict`); `refused`: the platform cannot do it, and doing without it would let the program go wrong quietly.
        - one of `"done"`, `"adapted"`, `"ignored"`, `"refused"`
      - `why` (`runOnce.response.401.report.services.items.why`; string, required)
      - `change` (`runOnce.response.401.report.services.items.change`; string | null, required) — Of one that is refused: what to change. Null otherwise.
    - `app` (`runOnce.response.401.report.services.app`; object, required) — The fields of the service's app as the import writes them: what its versions are made of, and what holds at once.
      - `image` (`runOnce.response.401.report.services.app.image`; string | null, required) — What the app's next version is made of, with the seven fields after it: its newest version's, with what was changed since. `null`: the app has no image, and no version.
      - `image_pull_secret` (`runOnce.response.401.report.services.app.image_pull_secret`; string | null, required) — The name of the secret that holds the credentials of the image's registry. No answer has its value. `null`: none.
      - `start_command` (`runOnce.response.401.report.services.app.start_command`; any of, required)
        - any of: `StartCommand`, `null`
      - `start_args` (`runOnce.response.401.report.services.app.start_args`; any of, required) — What follows the image's ENTRYPOINT in the place of its CMD. `null`: the image's CMD, or the whole of `start_command`.
        - any of: `array<string>`, `null`
      - `port` (`runOnce.response.401.report.services.app.port`; integer | null, required)
      - `ready` (`runOnce.response.401.report.services.app.ready`; object, required) — How to tell that an instance is up, which a version's template is saved after: exactly one of the three. The first two are asked from outside the instance, so the service has to listen on every address (`0.0.0.0`).
        - `http` (`runOnce.response.401.report.services.app.ready.http`; string, optional) — A path, beginning with `/`: a `GET` of it on the app's port is answered with a status from 200 to 399.
        - `tcp` (`runOnce.response.401.report.services.app.ready.tcp`; boolean, optional) — The app's port takes a connection.
          - one of `true`
        - `command` (`runOnce.response.401.report.services.app.ready.command`; one of, optional) — A command that succeeds in the instance. It is run by the instance's shell: a list of arguments is written as one line for it.
          - one of: `string`, `array<string>`
      - `env` (`runOnce.response.401.report.services.app.env`; map<string>, required)
      - `secrets` (`runOnce.response.401.report.services.app.secrets`; map<string>, required) — Names of secrets. No answer has a value.
      - `size` (`runOnce.response.401.report.services.app.size`; object, required) — What one instance may use at most. It is billed by what it uses.
        - `vcpus` (`runOnce.response.401.report.services.app.size.vcpus`; integer, required)
          - min 1
        - `memory_bytes` (`runOnce.response.401.report.services.app.size.memory_bytes`; integer, required) — An even number of MiB (a whole number of the 2 MiB pages a node loads a machine's memory in), in bytes. Any other size is 400 `invalid_field` (param `size.memory_bytes`): no node would make an instance of it, as none makes a sandbox of it (the node's `SandboxLimitsCreate.memory_bytes`).
          - min 134217728
      - `volumes` (`runOnce.response.401.report.services.app.volumes`; array<object>, required)
        - `volume` (`runOnce.response.401.report.services.app.volumes.volume`; string, required)
        - `path` (`runOnce.response.401.report.services.app.volumes.path`; string, required)
        - `read_only` (`runOnce.response.401.report.services.app.volumes.read_only`; boolean, required)
        - `nocopy` (`runOnce.response.401.report.services.app.volumes.nocopy`; unknown, optional) — There only where it was given as `true`.
      - `kind` (`runOnce.response.401.report.services.app.kind`; string, required)
      - `files` (`runOnce.response.401.report.services.app.files`; array<object>, required)
        - `path` (`runOnce.response.401.report.services.app.files.path`; string, required)
        - `mode` (`runOnce.response.401.report.services.app.files.mode`; integer, required)
        - `uid` (`runOnce.response.401.report.services.app.files.uid`; integer, required)
        - `gid` (`runOnce.response.401.report.services.app.files.gid`; integer, required)
        - `content` (`runOnce.response.401.report.services.app.files.content`; string, optional)
        - `secret` (`runOnce.response.401.report.services.app.files.secret`; string, optional)
      - `user` (`runOnce.response.401.report.services.app.user`; string | null, required)
      - `working_dir` (`runOnce.response.401.report.services.app.working_dir`; string | null, required)
      - `stop` (`runOnce.response.401.report.services.app.stop`; any of, required)
        - any of: `ServiceStop`, `null`
      - `hostname` (`runOnce.response.401.report.services.app.hostname`; string | null, required)
      - `regions` (`runOnce.response.401.report.services.app.regions`; array<string>, required) — In the order na, eu, ap.
      - `scale` (`runOnce.response.401.report.services.app.scale`; object, required)
        - `min_instances` (`runOnce.response.401.report.services.app.scale.min_instances`; integer, required) — How many instances of the app are kept awake in a region, whether a request comes or not: the floor. The nodes of the region that serve the app share it as they share `max_instances` (two nodes and a floor of 2: one on each; a floor of 1: one, on the node that is tried first; a floor of 5: three and two), and a node that is away is made up for by the others. A node makes its part when it is told, not at the first request, and neither stops nor deletes those instances for being idle; they are metered as instances that are awake. 0, which is what it is when nothing is said: none. Lowered, the instances beyond it are idle from that moment, and are stopped and deleted as idle instances are. At most `max_instances`, where that is given, and at most what the account's plan lets an app ask for in a region (`caps.app_instances.limit`: 5, 50 and 500): more is refused, 403 `plan_cap_reached`.
          - min 0
        - `max_instances` (`runOnce.response.401.report.services.app.scale.max_instances`; integer | null, required) — How many instances the app has at the most in a region: the nodes of the region that serve the app share it. At most what the account's plan lets an app ask for (`caps.app_instances.limit`: 5 on the free plan, 50 on `p20`, 200 on `p100`, 500 on `p300`, 1,000 on `p1000`, 2,000 on `p2000`): more is refused, 403 `plan_cap_reached`, and what an app asked for on a plan that let it is kept, and held to the plan's number. `null`: the plan's number for an app that names none (`caps.app_instances.default`: 2, 10, 20, 50, 100 and 200), or `min_instances` where that is more. What the nodes are told is no more than the account has room for awake beside everything else of it that is awake, nor less than the app has awake.
          - min 1
        - `concurrency` (`runOnce.response.401.report.services.app.scale.concurrency`; integer | null, required) — A cap on what one instance has in hand at a time: the requests the edges sent it, and the connections it has open on its project's network (through its service's address, which the node shares out among the instances connection by connection, or to its own). An instance with that many is full, and another is made for more. `null`, which is what it is when nothing is said: no cap. A node then adds an instance when the ones it has are near their size in CPU or memory, and an app does not have to guess a number; a service that takes one request at a time gives one.
          - min 1; max 1000
        - `sleep_after_ms` (`runOnce.response.401.report.services.app.scale.sleep_after_ms`; integer, required) — After how long without a request an instance stops. One that stays stopped is deleted by its node after `delete_after_ms`, and the next request that needs an instance gets a new one; the instances `min_instances` keeps awake are neither stopped nor deleted.
          - min 0; max 600000
        - `sleep_notice_ms` (`runOnce.response.401.report.services.app.scale.sleep_notice_ms`; integer | null, required) — How long before an instance stops for being idle the programs connected to its guest's `/run/sbx/awake` are sent the line `sleep N`, in milliseconds: they flush what they hold, close their connections, or raise a hold, which puts the stop off. The stop comes that long after, whether they answer or not; where nobody is connected, it is not put off. A keyed instance is told as well. 0 or null: not told (the default).
          - min 0; max 60000
        - `sleep_hold_max_ms` (`runOnce.response.401.report.services.app.scale.sleep_hold_max_ms`; integer, required) — How long the holds a program in an instance raises keep it up after its time idle has run out, in milliseconds: a program connects to `/run/sbx/awake` and sends `+` before it answers a request whose work goes on after the answer, and `-` (or closes the connection, or dies) when that work is done; the instance stops `sleep_after_ms` after the last hold is lowered. Past this time it stops whatever holds it, the programs connected told `sleep N cap` first where `sleep_notice_ms` asks for a notice. Held, it runs and is metered as running. 0: holds are not heeded. Null: 30000 (the default).
          - min 0; max 900000
        - `delete_after_ms` (`runOnce.response.401.report.services.app.scale.delete_after_ms`; integer | null, required) — After how long idle an instance is deleted, counted from where its stop is counted from: the next request that needs one gets a new instance, a clone of the version's template, without what the deleted one had gathered in its memory and on its disk (keep what is to last in a volume or a database). A second to an hour, the platform's time, which is the most: more is refused (400 `invalid_field`), and an instance that is to stay warm is one of `min_instances`. `null`, which is what it is when nothing is said: the hour of the nodes (`--app-delete-after-seconds`). A change holds for the instances the app has as for the ones made after: each node judges every instance by the app's time as it is, once a second at the least. Not for the app's keyed instances, which `keys.delete_after_idle_ms` is for.
          - min 1000; max 3600000
        - `suspend_after_ms` (`runOnce.response.401.report.services.app.scale.suspend_after_ms`; integer | null, optional) — How long a stopped instance stays paused before its memory is saved and it sleeps for real, in milliseconds: paused, the next request is answered in a millisecond or two and its memory is metered; asleep, it wakes in a few more and only what it keeps is. Its node holds it to the longest it holds any instance paused (ten minutes); the host's memory running short, a slot another machine needs and a sleep somebody asks for put it to sleep sooner. Null (the default): its node's longest. A database's `suspend_after_seconds` is its app's.
          - min 1000; max 86400000
        - `wake_daily_at` (`runOnce.response.401.report.services.app.scale.wake_daily_at`; string | null, optional) — A time of day in UTC, `HH:MM`, at which the app's keyed instances and its stateful service's instance that rest are woken every day, for work of their own that waits for a wake (a database's maintenance, say); the instances the nodes make and delete by the app's requests are woken by requests alone. The wake is no activity: what runs then is, and once that is done the instance rests again. A stateful service's instance is woken besides for the next run of its PostgreSQL server's `pg_cron` jobs, whatever this says. Null (the default): none. A database's `wake_daily_at` is its app's.
          - pattern `^([01][0-9]|2[0-3]):[0-5][0-9]$`
      - `keys` (`runOnce.response.401.report.services.app.keys`; any of, required)
        - any of: `object`, `null`
      - `egress` (`runOnce.response.401.report.services.app.egress`; object | null, required) — Egress rules as a sandbox has them (`default`, `allow`, `deny`, `http`, `inject`), null when there are none; kept as the calls gave them (a `PATCH` merges them key by key, as a node does). They hold at once and make no version: the nodes that serve the app put them on every instance of its group, the ones there are (one that runs for the connections it has too) and the ones made after; a keyed instance does not have them. The control plane checks only that they are an object of those keys of at most 256 KiB: what the rules say is a node's to check, when it applies them, and an instance whose rules its node cannot read is refused everything (the node's log says why).
        - `default` (`runOnce.response.401.report.services.app.egress.default`; string | null, optional)
          - one of `"allow"`, `"deny"`, `null`
        - `allow` (`runOnce.response.401.report.services.app.egress.allow`; array | null, optional)
        - `deny` (`runOnce.response.401.report.services.app.egress.deny`; array | null, optional)
        - `http` (`runOnce.response.401.report.services.app.egress.http`; array | null, optional)
        - `inject` (`runOnce.response.401.report.services.app.egress.inject`; array | null, optional)
        - `deny_ports` (`runOnce.response.401.report.services.app.egress.deny_ports`; array | null, optional) — Ports no connection reaches, TCP or UDP, wherever it goes and whatever else the rules say. A Browsers session's always hold 25, 465, 587 and the ports mining pools listen on (3333, 4444, 5555, 7777, 14444, 45700): the control plane adds them to whatever a change of its rules gives.
      - `metadata` (`runOnce.response.401.report.services.app.metadata`; map<string>, required)
      - `logs` (`runOnce.response.401.report.services.app.logs`; object, required) — What the app's log has, each part as it was given or at its default (`AppLogSettings`).
        - `output` (`runOnce.response.401.report.services.app.logs.output`; boolean, required)
        - `keep` (`runOnce.response.401.report.services.app.logs.keep`; boolean, required)
        - `requests` (`runOnce.response.401.report.services.app.logs.requests`; object, required)
          - `sample_rate` (`runOnce.response.401.report.services.app.logs.requests.sample_rate`; number, required)
            - min 0; max 1
          - `keep_errors` (`runOnce.response.401.report.services.app.logs.requests.keep_errors`; boolean, required)
      - `public` (`runOnce.response.401.report.services.app.public`; boolean, required) — Whether it answers at its default domain (`url`).
      - `depends_on` (`runOnce.response.401.report.services.app.depends_on`; array<object>, required)
        - `service` (`runOnce.response.401.report.services.app.depends_on.service`; string, required)
        - `condition` (`runOnce.response.401.report.services.app.depends_on.condition`; string, required)
      - `network` (`runOnce.response.401.report.services.app.network`; object, required)
        - `aliases` (`runOnce.response.401.report.services.app.network.aliases`; array<string>, required)
        - `endpoint_mode` (`runOnce.response.401.report.services.app.network.endpoint_mode`; string, required)
      - `drives` (`runOnce.response.401.report.services.app.drives`; array<object>, optional) — The Drives its instance mounts (`AppCreate.drives`): none, `[]`, where it names none.
        - `drive` (`runOnce.response.401.report.services.app.drives.drive`; string, required)
        - `path` (`runOnce.response.401.report.services.app.drives.path`; string, required)
        - `mode` (`runOnce.response.401.report.services.app.drives.mode`; string, required)
      - `key_drives` (`runOnce.response.401.report.services.app.key_drives`; array<object>, optional) — The Drives each key's instance has of its own (`AppCreate.key_drives`): none, `[]`, where it gives none.
        - `name` (`runOnce.response.401.report.services.app.key_drives.name`; string, required)
        - `path` (`runOnce.response.401.report.services.app.key_drives.path`; string, required)
        - `size_bytes` (`runOnce.response.401.report.services.app.key_drives.size_bytes`; integer | null, required)
          - format `int64`
        - `nocopy` (`runOnce.response.401.report.services.app.key_drives.nocopy`; unknown, optional) — There only where it was given as `true`.
      - `runtime` (`runOnce.response.401.report.services.app.runtime`; any of, optional) — Its runtime settings (`AppCreate.runtime`). `null`: none.
        - any of: `Runtime`, `null`
      - `traces` (`runOnce.response.401.report.services.app.traces`; object, optional) — What the app's requests' traces have, each part as it was given or at its default (`AppTraceSettings`): no span where `sample_rate` is 0.
        - `sample_rate` (`runOnce.response.401.report.services.app.traces.sample_rate`; number, required)
          - min 0; max 1
        - `trust_incoming` (`runOnce.response.401.report.services.app.traces.trust_incoming`; boolean, required)
  - `volumes` (`runOnce.response.401.report.volumes`; array<object>, required) — The volumes of the project the services mount.
    - `model` (`runOnce.response.401.report.volumes.model`; string | null, required) — Its name in the model. Null: made for a path a stateful service mounts with no volume named.
    - `name` (`runOnce.response.401.report.volumes.name`; string, required) — Its name in the project.
    - `id` (`runOnce.response.401.report.volumes.id`; string | null, required) — Null: not made yet (`to_make`).
      - pattern `^vol-`
    - `shared` (`runOnce.response.401.report.volumes.shared`; boolean, required) — Several services mount it, or one with several instances: every instance of each mounts it at once.
    - `status` (`runOnce.response.401.report.volumes.status`; string, required) — `to_make`: the import makes it (a dry run says so of what it would make); `made`: this import made it; `there`: an earlier import made it, or a volume of its name was there; `external`: the model names it `external`, and the project has it.
      - one of `"to_make"`, `"made"`, `"there"`, `"external"`
    - `used_by` (`runOnce.response.401.report.volumes.used_by`; array<string>, required)
  - `secrets` (`runOnce.response.401.report.secrets`; array<object>, required) — The secrets of the model that services are granted.
    - `model` (`runOnce.response.401.report.secrets.model`; string, required) — Its name in the model.
    - `name` (`runOnce.response.401.report.secrets.name`; string, required) — The project's secret that holds it: the model's name, with each character a secret's name does not take written as an underscore.
    - `there` (`runOnce.response.401.report.secrets.there`; boolean, required) — Whether the project has it. An import (not a dry run) with one that is not there is refused 404 `secret_not_found`.
    - `used_by` (`runOnce.response.401.report.secrets.used_by`; array<string>, required)
  - `left_out` (`runOnce.response.401.report.left_out`; array<object>, required) — The services of profiles that are not turned on, which the import does not touch.
    - `name` (`runOnce.response.401.report.left_out.name`; string, required)
    - `profiles` (`runOnce.response.401.report.left_out.profiles`; array<string>, required)
  - `absent` (`runOnce.response.401.report.absent`; array<string>, required) — The project's services that the model does not have: kept as they are.
  - `deploy` (`runOnce.response.401.report.deploy`; string | null, required) — The deploy the import made (`GET /v1/deploys/{id}`). Null: a dry run, or nothing would get a version.
    - pattern `^dpl-`
- `accounts` (`runOnce.response.401.accounts`; array<object>, optional) — With `sole_owner`: the accounts the user is the only owner of.
  - `id` (`runOnce.response.401.accounts.id`; string, required)
    - pattern `^acct-[0-9a-hjkmnp-tv-z]{16}$`
  - `name` (`runOnce.response.401.accounts.name`; string, required)

### 403

The credential may not do this. `needs_api_key`: a sandbox token cannot do this. `spend_limit_reached`: a spend limit was reached. `secret_host_not_allowed`: a secret would be sent to a host it may not go to: by `egress.inject`, or as `image_pull_secret` to the `image`'s registry (`param` says which; `allowed_hosts` beside `error` says where it may go). `account_share_reached`: its account holds as much of this node's data drive as one account may (`drive.accounts` of `GET /internal/node`), and has not the room for the sandbox's memory and a gigabyte to write. Nothing was made.

#### Example

```json
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "retryable": true,
    "request_id": "string",
    "docs_url": "string"
  },
  "allowed_hosts": [
    "string"
  ],
  "to": "string",
  "epoch": 1,
  "offset": 0,
  "exec_id": "string",
  "disk_ms": 0,
  "memory_ms": 0,
  "drives_ms": 0,
  "image_ms": 0,
  "image": "string",
  "build": "string"
}
```

- `error` (`runOnce.response.403.error`; object, required)
  - `type` (`runOnce.response.403.error.type`; string, required) — The kind of failure. It decides the status: `invalid_request` 400, `unauthenticated` 401, `forbidden` 403, `not_found` 404, `conflict` 409, `too_large` 413, `internal` 500, `bad_gateway` 502 (the preview listener, the egress proxy, and a takeover that could not bring its sandbox), `unavailable` 503, `timeout` 504.
  - `code` (`runOnce.response.403.error.code`; string, required) — Which failure. The top-level `x-error-codes` table of this document says what each one means.
  - `message` (`runOnce.response.403.error.message`; string, required) — For people. English.
  - `param` (`runOnce.response.403.error.param`; string | null, required) — The field or query parameter at fault, when there is one.
  - `retryable` (`runOnce.response.403.error.retryable`; boolean, required) — True when the same request may succeed later without anything else changing.
  - `request_id` (`runOnce.response.403.error.request_id`; string, required) — The `X-Request-Id` of the response it is in, also when that response is a replay for an `Idempotency-Key`.
    - pattern `^[A-Za-z0-9._\-]{1,64}$`
  - `docs_url` (`runOnce.response.403.error.docs_url`; string | null, required) — The node's `--docs-url` with the code appended, or null.
- `allowed_hosts` (`runOnce.response.403.allowed_hosts`; array | null, optional) — With `secret_host_not_allowed`: the hosts the secret may go to, as the secret has them; null where it was given none.
- `to` (`runOnce.response.403.to`; string | null, optional) — With `moved` and `sandbox_moved`: the node the sandbox was released to, as the control plane named it, or null.
- `epoch` (`runOnce.response.403.epoch`; integer, optional) — With `moved` and `sandbox_moved`: the epoch the sandbox was released at. With `wrong_epoch`: the epoch this node holds it at, or released it at.
  - format `int64`; min 1
- `offset` (`runOnce.response.403.offset`; integer, optional) — With `sandbox_moved`: the position in the command's output the call, stream or terminal had reached (a stream's last event's `id`): read on from it where the sandbox went (`Last-Event-ID`, or `from`).
  - format `int64`; min 0
- `exec_id` (`runOnce.response.403.exec_id`; string, optional) — With `sandbox_moved` of `POST …/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 with `GET …/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.
- `disk_ms` (`runOnce.response.403.disk_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the disk as of the sleep; null where it did.
  - min 0
- `memory_ms` (`runOnce.response.403.memory_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the memory image of that sleep; null where it did.
  - min 0
- `drives_ms` (`runOnce.response.403.drives_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the sandbox's Drives as they are (slice D2); null where it did, or where it has none.
  - min 0
- `image_ms` (`runOnce.response.403.image_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the image the sandbox's disk is over (its node copies a disk before its template's image is there); null where it did.
  - min 0
- `image` (`runOnce.response.403.image`; string, optional) — With `image_missing`: the id of the image the object store does not have, as the disks over it and a template's `disk_image` name it.
  - pattern `^[A-Za-z0-9_-]{1,128}$`
- `build` (`runOnce.response.403.build`; string, optional) — With `build_missing`: the build of Firecracker that wrote the sandbox's memory, which this node does not keep.
  - pattern `^[0-9a-f]{16}$`

### 404

Something the request names does not exist. `snapshot_not_found`: no such snapshot; `template_not_found`: no such template; `volume_not_found`: a volume named in `volumes` does not exist; `secret_not_found`: a secret named in `egress.inject`, or the one `image_pull_secret` names, does not exist.

#### Example

```json
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "retryable": true,
    "request_id": "string",
    "docs_url": "string"
  },
  "allowed_hosts": [
    "string"
  ],
  "to": "string",
  "epoch": 1,
  "offset": 0,
  "exec_id": "string",
  "disk_ms": 0,
  "memory_ms": 0,
  "drives_ms": 0,
  "image_ms": 0,
  "image": "string",
  "build": "string"
}
```

- `error` (`runOnce.response.404.error`; object, required)
  - `type` (`runOnce.response.404.error.type`; string, required) — The kind of failure. It decides the status: `invalid_request` 400, `unauthenticated` 401, `forbidden` 403, `not_found` 404, `conflict` 409, `too_large` 413, `internal` 500, `bad_gateway` 502 (the preview listener, the egress proxy, and a takeover that could not bring its sandbox), `unavailable` 503, `timeout` 504.
  - `code` (`runOnce.response.404.error.code`; string, required) — Which failure. The top-level `x-error-codes` table of this document says what each one means.
  - `message` (`runOnce.response.404.error.message`; string, required) — For people. English.
  - `param` (`runOnce.response.404.error.param`; string | null, required) — The field or query parameter at fault, when there is one.
  - `retryable` (`runOnce.response.404.error.retryable`; boolean, required) — True when the same request may succeed later without anything else changing.
  - `request_id` (`runOnce.response.404.error.request_id`; string, required) — The `X-Request-Id` of the response it is in, also when that response is a replay for an `Idempotency-Key`.
    - pattern `^[A-Za-z0-9._\-]{1,64}$`
  - `docs_url` (`runOnce.response.404.error.docs_url`; string | null, required) — The node's `--docs-url` with the code appended, or null.
- `allowed_hosts` (`runOnce.response.404.allowed_hosts`; array | null, optional) — With `secret_host_not_allowed`: the hosts the secret may go to, as the secret has them; null where it was given none.
- `to` (`runOnce.response.404.to`; string | null, optional) — With `moved` and `sandbox_moved`: the node the sandbox was released to, as the control plane named it, or null.
- `epoch` (`runOnce.response.404.epoch`; integer, optional) — With `moved` and `sandbox_moved`: the epoch the sandbox was released at. With `wrong_epoch`: the epoch this node holds it at, or released it at.
  - format `int64`; min 1
- `offset` (`runOnce.response.404.offset`; integer, optional) — With `sandbox_moved`: the position in the command's output the call, stream or terminal had reached (a stream's last event's `id`): read on from it where the sandbox went (`Last-Event-ID`, or `from`).
  - format `int64`; min 0
- `exec_id` (`runOnce.response.404.exec_id`; string, optional) — With `sandbox_moved` of `POST …/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 with `GET …/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.
- `disk_ms` (`runOnce.response.404.disk_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the disk as of the sleep; null where it did.
  - min 0
- `memory_ms` (`runOnce.response.404.memory_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the memory image of that sleep; null where it did.
  - min 0
- `drives_ms` (`runOnce.response.404.drives_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the sandbox's Drives as they are (slice D2); null where it did, or where it has none.
  - min 0
- `image_ms` (`runOnce.response.404.image_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the image the sandbox's disk is over (its node copies a disk before its template's image is there); null where it did.
  - min 0
- `image` (`runOnce.response.404.image`; string, optional) — With `image_missing`: the id of the image the object store does not have, as the disks over it and a template's `disk_image` name it.
  - pattern `^[A-Za-z0-9_-]{1,128}$`
- `build` (`runOnce.response.404.build`; string, optional) — With `build_missing`: the build of Firecracker that wrote the sandbox's memory, which this node does not keep.
  - pattern `^[0-9a-f]{16}$`

### 409

The state of something stands in the way. `name_taken`: the name is taken; `volume_in_use`: a volume in `volumes` that is not shared is another sandbox's; `duplicate_volume`: a volume is listed twice in `volumes`; `mount_path_taken`: two volumes in `volumes` have one `path`; `too_many_volumes`: `volumes` has more that are not shared than the sandbox's machine has spare drives (eight; two for one made from a template or a snapshot of before there were eight); `snapshot_lost`: the snapshot's `status` is `lost`; `no_project_address`: `project_network` was asked for, and the node has no network of the project, or no address of it left to spare; `command_lost`: the command went away while the call waited for it; `sandbox_failed`: the sandbox could not be started: the message says why (its image cannot be pulled, for one); `idempotency_key_reused`: the key was used with another body; `idempotency_in_progress`: the first request with the key is still running. `checkpoints_unavailable` (`param` `checkpoint`): `checkpoint` is on, and this node takes no checkpoints (it does not copy its disks to an object store, or its memory is not in layers).

#### Example

```json
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "retryable": true,
    "request_id": "string",
    "docs_url": "string"
  },
  "allowed_hosts": [
    "string"
  ],
  "to": "string",
  "epoch": 1,
  "offset": 0,
  "exec_id": "string",
  "disk_ms": 0,
  "memory_ms": 0,
  "drives_ms": 0,
  "image_ms": 0,
  "image": "string",
  "build": "string"
}
```

- `error` (`runOnce.response.409.error`; object, required)
  - `type` (`runOnce.response.409.error.type`; string, required) — The kind of failure. It decides the status: `invalid_request` 400, `unauthenticated` 401, `forbidden` 403, `not_found` 404, `conflict` 409, `too_large` 413, `internal` 500, `bad_gateway` 502 (the preview listener, the egress proxy, and a takeover that could not bring its sandbox), `unavailable` 503, `timeout` 504.
  - `code` (`runOnce.response.409.error.code`; string, required) — Which failure. The top-level `x-error-codes` table of this document says what each one means.
  - `message` (`runOnce.response.409.error.message`; string, required) — For people. English.
  - `param` (`runOnce.response.409.error.param`; string | null, required) — The field or query parameter at fault, when there is one.
  - `retryable` (`runOnce.response.409.error.retryable`; boolean, required) — True when the same request may succeed later without anything else changing.
  - `request_id` (`runOnce.response.409.error.request_id`; string, required) — The `X-Request-Id` of the response it is in, also when that response is a replay for an `Idempotency-Key`.
    - pattern `^[A-Za-z0-9._\-]{1,64}$`
  - `docs_url` (`runOnce.response.409.error.docs_url`; string | null, required) — The node's `--docs-url` with the code appended, or null.
- `allowed_hosts` (`runOnce.response.409.allowed_hosts`; array | null, optional) — With `secret_host_not_allowed`: the hosts the secret may go to, as the secret has them; null where it was given none.
- `to` (`runOnce.response.409.to`; string | null, optional) — With `moved` and `sandbox_moved`: the node the sandbox was released to, as the control plane named it, or null.
- `epoch` (`runOnce.response.409.epoch`; integer, optional) — With `moved` and `sandbox_moved`: the epoch the sandbox was released at. With `wrong_epoch`: the epoch this node holds it at, or released it at.
  - format `int64`; min 1
- `offset` (`runOnce.response.409.offset`; integer, optional) — With `sandbox_moved`: the position in the command's output the call, stream or terminal had reached (a stream's last event's `id`): read on from it where the sandbox went (`Last-Event-ID`, or `from`).
  - format `int64`; min 0
- `exec_id` (`runOnce.response.409.exec_id`; string, optional) — With `sandbox_moved` of `POST …/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 with `GET …/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.
- `disk_ms` (`runOnce.response.409.disk_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the disk as of the sleep; null where it did.
  - min 0
- `memory_ms` (`runOnce.response.409.memory_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the memory image of that sleep; null where it did.
  - min 0
- `drives_ms` (`runOnce.response.409.drives_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the sandbox's Drives as they are (slice D2); null where it did, or where it has none.
  - min 0
- `image_ms` (`runOnce.response.409.image_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the image the sandbox's disk is over (its node copies a disk before its template's image is there); null where it did.
  - min 0
- `image` (`runOnce.response.409.image`; string, optional) — With `image_missing`: the id of the image the object store does not have, as the disks over it and a template's `disk_image` name it.
  - pattern `^[A-Za-z0-9_-]{1,128}$`
- `build` (`runOnce.response.409.build`; string, optional) — With `build_missing`: the build of Firecracker that wrote the sandbox's memory, which this node does not keep.
  - pattern `^[0-9a-f]{16}$`

### 503

Not available. `not_served_here`: `egress` rules were given, and this node cannot put rules in force (it has no `nft`); or `project_network` was asked for, and this node puts no sandbox on a project's network; or the sandbox is to be made from an `image` the node has no template of, and this node fetches no images (`image_pulls` of `GET /internal/node` says why; `param` is `image`); or `key_missing`: this node is keyed (src/seal.rs) and does not hold the key of the project whose it is, or the platform's (the message says which): the control plane gives it, and the same call is made again (`Retry-After`); or `unavailable`: a volume in `volumes` could not be attached in time, and the same call is made again (`Retry-After`): the guest's mount of it did not finish within 60 s (a Drive whose blocks do not come: its object store away, or its fetcher out of reach), or it is still being taken off the machine after such an attach, or it is a Drive that comes block by block and nothing answers for its blocks yet.

#### Example

```json
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "retryable": true,
    "request_id": "string",
    "docs_url": "string"
  },
  "allowed_hosts": [
    "string"
  ],
  "to": "string",
  "epoch": 1,
  "offset": 0,
  "exec_id": "string",
  "disk_ms": 0,
  "memory_ms": 0,
  "drives_ms": 0,
  "image_ms": 0,
  "image": "string",
  "build": "string"
}
```

- `error` (`runOnce.response.503.error`; object, required)
  - `type` (`runOnce.response.503.error.type`; string, required) — The kind of failure. It decides the status: `invalid_request` 400, `unauthenticated` 401, `forbidden` 403, `not_found` 404, `conflict` 409, `too_large` 413, `internal` 500, `bad_gateway` 502 (the preview listener, the egress proxy, and a takeover that could not bring its sandbox), `unavailable` 503, `timeout` 504.
  - `code` (`runOnce.response.503.error.code`; string, required) — Which failure. The top-level `x-error-codes` table of this document says what each one means.
  - `message` (`runOnce.response.503.error.message`; string, required) — For people. English.
  - `param` (`runOnce.response.503.error.param`; string | null, required) — The field or query parameter at fault, when there is one.
  - `retryable` (`runOnce.response.503.error.retryable`; boolean, required) — True when the same request may succeed later without anything else changing.
  - `request_id` (`runOnce.response.503.error.request_id`; string, required) — The `X-Request-Id` of the response it is in, also when that response is a replay for an `Idempotency-Key`.
    - pattern `^[A-Za-z0-9._\-]{1,64}$`
  - `docs_url` (`runOnce.response.503.error.docs_url`; string | null, required) — The node's `--docs-url` with the code appended, or null.
- `allowed_hosts` (`runOnce.response.503.allowed_hosts`; array | null, optional) — With `secret_host_not_allowed`: the hosts the secret may go to, as the secret has them; null where it was given none.
- `to` (`runOnce.response.503.to`; string | null, optional) — With `moved` and `sandbox_moved`: the node the sandbox was released to, as the control plane named it, or null.
- `epoch` (`runOnce.response.503.epoch`; integer, optional) — With `moved` and `sandbox_moved`: the epoch the sandbox was released at. With `wrong_epoch`: the epoch this node holds it at, or released it at.
  - format `int64`; min 1
- `offset` (`runOnce.response.503.offset`; integer, optional) — With `sandbox_moved`: the position in the command's output the call, stream or terminal had reached (a stream's last event's `id`): read on from it where the sandbox went (`Last-Event-ID`, or `from`).
  - format `int64`; min 0
- `exec_id` (`runOnce.response.503.exec_id`; string, optional) — With `sandbox_moved` of `POST …/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 with `GET …/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.
- `disk_ms` (`runOnce.response.503.disk_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the disk as of the sleep; null where it did.
  - min 0
- `memory_ms` (`runOnce.response.503.memory_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the memory image of that sleep; null where it did.
  - min 0
- `drives_ms` (`runOnce.response.503.drives_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the sandbox's Drives as they are (slice D2); null where it did, or where it has none.
  - min 0
- `image_ms` (`runOnce.response.503.image_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the image the sandbox's disk is over (its node copies a disk before its template's image is there); null where it did.
  - min 0
- `image` (`runOnce.response.503.image`; string, optional) — With `image_missing`: the id of the image the object store does not have, as the disks over it and a template's `disk_image` name it.
  - pattern `^[A-Za-z0-9_-]{1,128}$`
- `build` (`runOnce.response.503.build`; string, optional) — With `build_missing`: the build of Firecracker that wrote the sandbox's memory, which this node does not keep.
  - pattern `^[0-9a-f]{16}$`

### 504

The caller went away. `caller_gone`: the caller hung up.

#### Example

```json
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "retryable": true,
    "request_id": "string",
    "docs_url": "string"
  },
  "allowed_hosts": [
    "string"
  ],
  "to": "string",
  "epoch": 1,
  "offset": 0,
  "exec_id": "string",
  "disk_ms": 0,
  "memory_ms": 0,
  "drives_ms": 0,
  "image_ms": 0,
  "image": "string",
  "build": "string"
}
```

- `error` (`runOnce.response.504.error`; object, required)
  - `type` (`runOnce.response.504.error.type`; string, required) — The kind of failure. It decides the status: `invalid_request` 400, `unauthenticated` 401, `forbidden` 403, `not_found` 404, `conflict` 409, `too_large` 413, `internal` 500, `bad_gateway` 502 (the preview listener, the egress proxy, and a takeover that could not bring its sandbox), `unavailable` 503, `timeout` 504.
  - `code` (`runOnce.response.504.error.code`; string, required) — Which failure. The top-level `x-error-codes` table of this document says what each one means.
  - `message` (`runOnce.response.504.error.message`; string, required) — For people. English.
  - `param` (`runOnce.response.504.error.param`; string | null, required) — The field or query parameter at fault, when there is one.
  - `retryable` (`runOnce.response.504.error.retryable`; boolean, required) — True when the same request may succeed later without anything else changing.
  - `request_id` (`runOnce.response.504.error.request_id`; string, required) — The `X-Request-Id` of the response it is in, also when that response is a replay for an `Idempotency-Key`.
    - pattern `^[A-Za-z0-9._\-]{1,64}$`
  - `docs_url` (`runOnce.response.504.error.docs_url`; string | null, required) — The node's `--docs-url` with the code appended, or null.
- `allowed_hosts` (`runOnce.response.504.allowed_hosts`; array | null, optional) — With `secret_host_not_allowed`: the hosts the secret may go to, as the secret has them; null where it was given none.
- `to` (`runOnce.response.504.to`; string | null, optional) — With `moved` and `sandbox_moved`: the node the sandbox was released to, as the control plane named it, or null.
- `epoch` (`runOnce.response.504.epoch`; integer, optional) — With `moved` and `sandbox_moved`: the epoch the sandbox was released at. With `wrong_epoch`: the epoch this node holds it at, or released it at.
  - format `int64`; min 1
- `offset` (`runOnce.response.504.offset`; integer, optional) — With `sandbox_moved`: the position in the command's output the call, stream or terminal had reached (a stream's last event's `id`): read on from it where the sandbox went (`Last-Event-ID`, or `from`).
  - format `int64`; min 0
- `exec_id` (`runOnce.response.504.exec_id`; string, optional) — With `sandbox_moved` of `POST …/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 with `GET …/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.
- `disk_ms` (`runOnce.response.504.disk_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the disk as of the sleep; null where it did.
  - min 0
- `memory_ms` (`runOnce.response.504.memory_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the memory image of that sleep; null where it did.
  - min 0
- `drives_ms` (`runOnce.response.504.drives_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the sandbox's Drives as they are (slice D2); null where it did, or where it has none.
  - min 0
- `image_ms` (`runOnce.response.504.image_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the image the sandbox's disk is over (its node copies a disk before its template's image is there); null where it did.
  - min 0
- `image` (`runOnce.response.504.image`; string, optional) — With `image_missing`: the id of the image the object store does not have, as the disks over it and a template's `disk_image` name it.
  - pattern `^[A-Za-z0-9_-]{1,128}$`
- `build` (`runOnce.response.504.build`; string, optional) — With `build_missing`: the build of Firecracker that wrote the sandbox's memory, which this node does not keep.
  - pattern `^[0-9a-f]{16}$`

### 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.

#### Example

```json
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "retryable": true,
    "request_id": "string",
    "docs_url": "string"
  },
  "allowed_hosts": [
    "string"
  ],
  "to": "string",
  "epoch": 1,
  "offset": 0,
  "exec_id": "string",
  "disk_ms": 0,
  "memory_ms": 0,
  "drives_ms": 0,
  "image_ms": 0,
  "image": "string",
  "build": "string"
}
```

- `error` (`runOnce.response.default.error`; object, required)
  - `type` (`runOnce.response.default.error.type`; string, required) — The kind of failure. It decides the status: `invalid_request` 400, `unauthenticated` 401, `forbidden` 403, `not_found` 404, `conflict` 409, `too_large` 413, `internal` 500, `bad_gateway` 502 (the preview listener, the egress proxy, and a takeover that could not bring its sandbox), `unavailable` 503, `timeout` 504.
  - `code` (`runOnce.response.default.error.code`; string, required) — Which failure. The top-level `x-error-codes` table of this document says what each one means.
  - `message` (`runOnce.response.default.error.message`; string, required) — For people. English.
  - `param` (`runOnce.response.default.error.param`; string | null, required) — The field or query parameter at fault, when there is one.
  - `retryable` (`runOnce.response.default.error.retryable`; boolean, required) — True when the same request may succeed later without anything else changing.
  - `request_id` (`runOnce.response.default.error.request_id`; string, required) — The `X-Request-Id` of the response it is in, also when that response is a replay for an `Idempotency-Key`.
    - pattern `^[A-Za-z0-9._\-]{1,64}$`
  - `docs_url` (`runOnce.response.default.error.docs_url`; string | null, required) — The node's `--docs-url` with the code appended, or null.
- `allowed_hosts` (`runOnce.response.default.allowed_hosts`; array | null, optional) — With `secret_host_not_allowed`: the hosts the secret may go to, as the secret has them; null where it was given none.
- `to` (`runOnce.response.default.to`; string | null, optional) — With `moved` and `sandbox_moved`: the node the sandbox was released to, as the control plane named it, or null.
- `epoch` (`runOnce.response.default.epoch`; integer, optional) — With `moved` and `sandbox_moved`: the epoch the sandbox was released at. With `wrong_epoch`: the epoch this node holds it at, or released it at.
  - format `int64`; min 1
- `offset` (`runOnce.response.default.offset`; integer, optional) — With `sandbox_moved`: the position in the command's output the call, stream or terminal had reached (a stream's last event's `id`): read on from it where the sandbox went (`Last-Event-ID`, or `from`).
  - format `int64`; min 0
- `exec_id` (`runOnce.response.default.exec_id`; string, optional) — With `sandbox_moved` of `POST …/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 with `GET …/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.
- `disk_ms` (`runOnce.response.default.disk_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the disk as of the sleep; null where it did.
  - min 0
- `memory_ms` (`runOnce.response.default.memory_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the memory image of that sleep; null where it did.
  - min 0
- `drives_ms` (`runOnce.response.default.drives_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the sandbox's Drives as they are (slice D2); null where it did, or where it has none.
  - min 0
- `image_ms` (`runOnce.response.default.image_ms`; number | null, optional) — With `copy_behind`: how long the release waited for the store to hold the image the sandbox's disk is over (its node copies a disk before its template's image is there); null where it did.
  - min 0
- `image` (`runOnce.response.default.image`; string, optional) — With `image_missing`: the id of the image the object store does not have, as the disks over it and a template's `disk_image` name it.
  - pattern `^[A-Za-z0-9_-]{1,128}$`
- `build` (`runOnce.response.default.build`; string, optional) — With `build_missing`: the build of Firecracker that wrote the sandbox's memory, which this node does not keep.
  - pattern `^[0-9a-f]{16}$`


Source: https://glac.ai/docs/api/run/create/index.md
