Administration: environments and connectors
Environment templates and images, where new workspaces run (Docker containers or microVMs) and the microVMs' root filesystems, connectors and the install's tool servers. Administrators only.
| Operation | Method and path |
|---|---|
| Read where new workspaces run | GET /api/v1/admin/sandbox-backend |
| Set where new workspaces run | PUT /api/v1/admin/sandbox-backend |
| Build the environments' microVM root filesystems | POST /api/v1/admin/sandbox-backend/rootfs |
| List the environment images on the engine host | GET /api/v1/admin/environment-images |
| List connectors | GET /api/v1/admin/connectors |
| Create or replace a connector | PUT /api/v1/admin/connectors/{name} |
| Delete a connector | DELETE /api/v1/admin/connectors/{name} |
| The install's tool servers, by name, for an administrator's shared-profile form | GET /api/v1/admin/mcp/servers |
| List environment templates | GET /api/v1/admin/templates |
| Create or replace an environment template | PUT /api/v1/admin/templates/{name} |
| Delete an environment template | DELETE /api/v1/admin/templates/{name} |
| Make a template the default | POST /api/v1/admin/templates/{name}/default |
| Reset a customised built-in environment | POST /api/v1/admin/templates/{name}/reset |
| Check a template again | POST /api/v1/admin/templates/{name}/check |
Read where new workspaces run
GET /api/v1/admin/sandbox-backend
Where new workspaces' tasks run (Docker containers or microVMs), whether each backend can start sandboxes on this computer, each environment's microVM root filesystem when microVMs are ready, and how many workspaces run on each backend. Existing workspaces keep the backend they were made with. Administrators only.
Sign-in: A signed-in session or an API token.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Where new workspaces run | AdminSandboxBackend |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 503 | Database unavailable or gateway restarting | Error |
Set where new workspaces run
PUT /api/v1/admin/sandbox-backend
The backend new workspaces take (docker, firecracker, or null to follow the configuration), with the version read. A Desktop workspace is always a Docker one. Administrators only; audited under sandboxes.
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | A retried write with the same key answers the same. |
Request body
application/json: AdminSandboxBackendWrite
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Set | AdminSandboxBackend |
| 400 | invalid_request: default is not docker, firecracker or null, or the body or version is invalid (see details) | Error |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 409 | conflict (stale version), or backend_not_ready: the chosen backend can't start sandboxes on this computer | Error |
| 422 | The Idempotency-Key was used with another request | Error |
| 503 | Database unavailable or gateway restarting | Error |
Build the environments' microVM root filesystems
POST /api/v1/admin/sandbox-backend/rootfs
Builds, in the background and one at a time, the microVM root filesystem of every offered environment that isn't ready; the answer and later reads say building, then ready or failed. Choosing microVMs starts the same builds. Administrators only.
Sign-in: A signed-in session or an API token.
Responses
| Status | Meaning | Body |
|---|---|---|
| 202 | Builds started; the answer is where new workspaces run, with each environment's root filesystem | AdminSandboxBackend |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 409 | backend_not_ready: microVMs don't run on this computer | Error |
| 503 | Database unavailable or gateway restarting | Error |
List the environment images on the engine host
GET /api/v1/admin/environment-images
The images on the container engine's host that carry the TensorQuay runtime's label (every build of the runtime, and every image built FROM one), newest first, so an administrator picks an environment's image instead of typing its ID. Each says what it is from its labels, whether this version can run it and why not in plain words, which environments use it and how many sandboxes run it, and whether it is a built-in and added. Read-only; the gateway never pulls. Administrators only; a session or a personal token.
Sign-in: A signed-in session or an API token.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The images | EnvironmentImages |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 503 | engine_unavailable (retryable): the container engine didn't answer, or the gateway has none; or the database is unavailable or the gateway is restarting | Error |
List connectors
GET /api/v1/admin/connectors
Every stored connector (ADR-0031), sorted by name, with its record and metadata. No credential appears: secret_ref names a secret, and key_missing says whether it has a value. Administrators only; a session or a personal token.
Sign-in: A signed-in session or an API token.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The connectors | AdminConnectors |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 503 | Database unavailable or gateway restarting | Error |
Create or replace a connector
PUT /api/v1/admin/connectors/{name}
Creates without a version (201) or replaces the version read (200). The same validator checks the [[connectors]] seed, except that insecure_http and ca_file are file-only (400 file_only). At most 64 connectors (409 connector_limit); a name held by an [[mcp.servers]] entry is 409 name_taken. A secret_ref whose name looks like a key is refused 400 name_key_shaped. Applies from the next request. Administrators only; a session or a personal token. Audited without values.
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
name | path | yes | string | The connector name: immutable, shared with the [[mcp.servers]] namespace ([a-z][a-z0-9_]{0,15}, no "__", no trailing "_"). |
Idempotency-Key | header | string | A retried write with the same key replays the stored response before the version check. |
Request body
application/json: AdminConnectorWrite
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Replaced | AdminConnector |
| 201 | Created | AdminConnector |
| 400 | Invalid name, connector field, display name, version or body (see details) | Error |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 409 | conflict (stale, missing or unexpected version), name_taken, or connector_limit | Error |
| 422 | The Idempotency-Key was used with another request | Error |
| 503 | Database unavailable or gateway restarting | Error |
Delete a connector
DELETE /api/v1/admin/connectors/{name}
Deletes the version read. A seeded connector returns at a later start only if its [[connectors]] entry changes. Administrators only; a session or a personal token. Audited.
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
name | path | yes | string | The connector name: immutable, shared with the [[mcp.servers]] namespace ([a-z][a-z0-9_]{0,15}, no "__", no trailing "_"). |
version | query | yes | integer 1 or more | |
Idempotency-Key | header | string | A retried write with the same key replays the stored response before the version check. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 204 | Deleted | |
| 400 | Invalid name, version or parameter (see details) | Error |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 404 | No such route | Error |
| 409 | conflict (stale version) | Error |
| 422 | The Idempotency-Key was used with another request | Error |
| 503 | Database unavailable or gateway restarting | Error |
The install's tool servers, by name, for an administrator's shared-profile form
GET /api/v1/admin/mcp/servers
Names, templates and defaults only: commands, arguments and environment stay in gateway.toml. Administrators only; members get no such list (their personal profiles name no server).
Sign-in: A signed-in session or an API token.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The catalogue, in file order. | McpServers |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 503 | Database unavailable or gateway restarting | Error |
List environment templates
GET /api/v1/admin/templates
Every stored template, sorted by name, with its definition, check state, provenance and the conversations bound to it (ADR-0032). Administrators only; a session or a personal token.
Sign-in: A signed-in session or an API token.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The templates | AdminTemplates |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 503 | Database unavailable or gateway restarting | Error |
Create or replace an environment template
PUT /api/v1/admin/templates/{name}
Creates without a version (201) or replaces the version read (200). The same validator as [[templates]] refuses the same fields for the same reasons. A change to the image, capabilities, CPUs or memory resets the template's check: it is offered again once the checker verifies it. Other changes keep the check. Applies from the next request. Administrators only; a session or a personal token. Audited without values.
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
name | path | yes | string | The template name: immutable, because conversations store it. new is reserved (the web's Add page lives at that address): a write naming it is refused with name_reserved on name. |
Idempotency-Key | header | string | A retried write with the same key replays the stored response before the version check. |
Request body
application/json: AdminTemplateWrite
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Replaced | AdminTemplate |
| 201 | Created | AdminTemplate |
| 400 | Invalid field or body (see details) | Error |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 409 | conflict (stale, missing or unexpected version), name_taken (create over an existing name), default_count (a second default, or none), template_count (more than 32), template_is_default (the default cannot be disabled, and its image, capabilities, CPUs or memory cannot change: make another template the default first) | Error |
| 422 | The Idempotency-Key was used with another request | Error |
| 503 | Database unavailable or gateway restarting | Error |
Delete an environment template
DELETE /api/v1/admin/templates/{name}
Deletes the version read, unless the template is the default, a conversation binds it, or an [[mcp.servers]] entry lists it (409 template_in_use, with in_use). A seeded template returns at a later start only if its [[templates]] entry changes. Administrators only; a session or a personal token. Audited.
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
name | path | yes | string | The template name: immutable, because conversations store it. new is reserved (the web's Add page lives at that address): a write naming it is refused with name_reserved on name. |
version | query | yes | integer 1 or more | |
Idempotency-Key | header | string | A retried write with the same key replays the stored response before the version check. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 204 | Deleted | |
| 400 | Invalid version or parameter (see details) | Error |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 404 | Record not found | Error |
| 409 | conflict (stale or missing version) or template_in_use (see in_use) | Error |
| 422 | The Idempotency-Key was used with another request | Error |
| 503 | Database unavailable or gateway restarting | Error |
Make a template the default
POST /api/v1/admin/templates/{name}/default
Makes the template at the version read the default, taking the default from the current one in the same change. Only a template offered now (enabled, and verified or file-provided and not yet checked) can be the default. The definition is unchanged. Administrators only; a session or a personal token. Audited.
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
name | path | yes | string | The template name: immutable, because conversations store it. new is reserved (the web's Add page lives at that address): a write naming it is refused with name_reserved on name. |
Idempotency-Key | header | string | A retried write with the same key replays the stored response before the version check. |
Request body
application/json: object
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The new default | AdminTemplate |
| 400 | Invalid body | Error |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 404 | Record not found | Error |
| 409 | conflict (stale version), template_unavailable (the template is not offered now: disabled, refused, or created through the API and not yet verified) | Error |
| 422 | The Idempotency-Key was used with another request | Error |
| 503 | Database unavailable or gateway restarting | Error |
Reset a customised built-in environment
POST /api/v1/admin/templates/{name}/reset
Hands a built-in environment an administrator edited (customised) back to the rebuilds: it takes the image its canonical tag (tqa-runtime:<name>) names on the engine host now, with that image's name and tools, becomes last_set_by: builtin again and is checked again; its size, description and enabled switch stay. Audited as the administrator's replace, with admin->builtin as detail. The body is the version read. Administrators only; a session or a personal token; an Idempotency-Key replays a retry.
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
name | path | yes | string | The template name: immutable, because conversations store it. new is reserved (the web's Add page lives at that address): a write naming it is refused with name_reserved on name. |
Idempotency-Key | header | string | A retried write with the same key replays the stored response before the version check. |
Request body
application/json: object
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The new default | AdminTemplate |
| 400 | Invalid body | Error |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 404 | Record not found | Error |
| 409 | conflict (a stale version), not_customised (not an edited built-in), template_is_default (the default's image or tools would change: make another environment the default first), or builtin_image_missing (no usable build of it is on the host: build it again, then reset) | Error |
| 422 | The Idempotency-Key was used with another request | Error |
| 503 | engine_unavailable (retryable): the container engine didn't answer; or the database is unavailable or the gateway is restarting | Error |
Check a template again
POST /api/v1/admin/templates/{name}/check
Queues the template's image and rootfs checks again, for example after its rootfs was built; the result appears in the list. Administrators only; a session or a personal token. It takes no Idempotency-Key: a repeat only queues the same check again.
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
name | path | yes | string | The template name: immutable, because conversations store it. new is reserved (the web's Add page lives at that address): a write naming it is refused with name_reserved on name. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 202 | Queued | |
| 401 | Authentication required | Error |
| 403 | Not an administrator | Error |
| 404 | Record not found | Error |
| 503 | Database unavailable or gateway restarting | Error |