Skip to main content

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.

OperationMethod and path
Read where new workspaces runGET /api/v1/admin/sandbox-backend
Set where new workspaces runPUT /api/v1/admin/sandbox-backend
Build the environments' microVM root filesystemsPOST /api/v1/admin/sandbox-backend/rootfs
List the environment images on the engine hostGET /api/v1/admin/environment-images
List connectorsGET /api/v1/admin/connectors
Create or replace a connectorPUT /api/v1/admin/connectors/{name}
Delete a connectorDELETE /api/v1/admin/connectors/{name}
The install's tool servers, by name, for an administrator's shared-profile formGET /api/v1/admin/mcp/servers
List environment templatesGET /api/v1/admin/templates
Create or replace an environment templatePUT /api/v1/admin/templates/{name}
Delete an environment templateDELETE /api/v1/admin/templates/{name}
Make a template the defaultPOST /api/v1/admin/templates/{name}/default
Reset a customised built-in environmentPOST /api/v1/admin/templates/{name}/reset
Check a template againPOST /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

StatusMeaningBody
200Where new workspaces runAdminSandboxBackend
401Authentication requiredError
403Not an administratorError
503Database unavailable or gateway restartingError

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

NameInRequiredTypeDescription
Idempotency-KeyheaderstringA retried write with the same key answers the same.

Request body

application/json: AdminSandboxBackendWrite

Responses

StatusMeaningBody
200SetAdminSandboxBackend
400invalid_request: default is not docker, firecracker or null, or the body or version is invalid (see details)Error
401Authentication requiredError
403Not an administratorError
409conflict (stale version), or backend_not_ready: the chosen backend can't start sandboxes on this computerError
422The Idempotency-Key was used with another requestError
503Database unavailable or gateway restartingError

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

StatusMeaningBody
202Builds started; the answer is where new workspaces run, with each environment's root filesystemAdminSandboxBackend
401Authentication requiredError
403Not an administratorError
409backend_not_ready: microVMs don't run on this computerError
503Database unavailable or gateway restartingError

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

StatusMeaningBody
200The imagesEnvironmentImages
401Authentication requiredError
403Not an administratorError
503engine_unavailable (retryable): the container engine didn't answer, or the gateway has none; or the database is unavailable or the gateway is restartingError

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

StatusMeaningBody
200The connectorsAdminConnectors
401Authentication requiredError
403Not an administratorError
503Database unavailable or gateway restartingError

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

NameInRequiredTypeDescription
namepathyesstringThe connector name: immutable, shared with the [[mcp.servers]] namespace ([a-z][a-z0-9_]{0,15}, no "__", no trailing "_").
Idempotency-KeyheaderstringA retried write with the same key replays the stored response before the version check.

Request body

application/json: AdminConnectorWrite

Responses

StatusMeaningBody
200ReplacedAdminConnector
201CreatedAdminConnector
400Invalid name, connector field, display name, version or body (see details)Error
401Authentication requiredError
403Not an administratorError
409conflict (stale, missing or unexpected version), name_taken, or connector_limitError
422The Idempotency-Key was used with another requestError
503Database unavailable or gateway restartingError

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

NameInRequiredTypeDescription
namepathyesstringThe connector name: immutable, shared with the [[mcp.servers]] namespace ([a-z][a-z0-9_]{0,15}, no "__", no trailing "_").
versionqueryyesinteger 1 or more
Idempotency-KeyheaderstringA retried write with the same key replays the stored response before the version check.

Responses

StatusMeaningBody
204Deleted
400Invalid name, version or parameter (see details)Error
401Authentication requiredError
403Not an administratorError
404No such routeError
409conflict (stale version)Error
422The Idempotency-Key was used with another requestError
503Database unavailable or gateway restartingError

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

StatusMeaningBody
200The catalogue, in file order.McpServers
401Authentication requiredError
403Not an administratorError
503Database unavailable or gateway restartingError

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

StatusMeaningBody
200The templatesAdminTemplates
401Authentication requiredError
403Not an administratorError
503Database unavailable or gateway restartingError

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

NameInRequiredTypeDescription
namepathyesstringThe 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-KeyheaderstringA retried write with the same key replays the stored response before the version check.

Request body

application/json: AdminTemplateWrite

Responses

StatusMeaningBody
200ReplacedAdminTemplate
201CreatedAdminTemplate
400Invalid field or body (see details)Error
401Authentication requiredError
403Not an administratorError
409conflict (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
422The Idempotency-Key was used with another requestError
503Database unavailable or gateway restartingError

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

NameInRequiredTypeDescription
namepathyesstringThe 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.
versionqueryyesinteger 1 or more
Idempotency-KeyheaderstringA retried write with the same key replays the stored response before the version check.

Responses

StatusMeaningBody
204Deleted
400Invalid version or parameter (see details)Error
401Authentication requiredError
403Not an administratorError
404Record not foundError
409conflict (stale or missing version) or template_in_use (see in_use)Error
422The Idempotency-Key was used with another requestError
503Database unavailable or gateway restartingError

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

NameInRequiredTypeDescription
namepathyesstringThe 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-KeyheaderstringA retried write with the same key replays the stored response before the version check.

Request body

application/json: object

Responses

StatusMeaningBody
200The new defaultAdminTemplate
400Invalid bodyError
401Authentication requiredError
403Not an administratorError
404Record not foundError
409conflict (stale version), template_unavailable (the template is not offered now: disabled, refused, or created through the API and not yet verified)Error
422The Idempotency-Key was used with another requestError
503Database unavailable or gateway restartingError

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

NameInRequiredTypeDescription
namepathyesstringThe 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-KeyheaderstringA retried write with the same key replays the stored response before the version check.

Request body

application/json: object

Responses

StatusMeaningBody
200The new defaultAdminTemplate
400Invalid bodyError
401Authentication requiredError
403Not an administratorError
404Record not foundError
409conflict (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
422The Idempotency-Key was used with another requestError
503engine_unavailable (retryable): the container engine didn't answer; or the database is unavailable or the gateway is restartingError

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

NameInRequiredTypeDescription
namepathyesstringThe 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

StatusMeaningBody
202Queued
401Authentication requiredError
403Not an administratorError
404Record not foundError
503Database unavailable or gateway restartingError