Run your organization's containers and virtual workers on machines you own: add hosts with a one-step pairing command or an approval, drain and revoke them, place workers on hosts or host groups, and manage the hosts' firewall rules, managed operating-system accounts and agent updates. Sending ad hoc jobs straight to a host is not available yet.
GET /v1/containers/host-placement
Read the host placement policy
Placement decides where the organization's virtual worker containers run: on Backbuild's cloud (`cloud`), on any of its hosts (`all_hosts`), on the hosts in one group (`pool`), or on chosen hosts (`hosts`), optionally falling back to the cloud when none is ready. A worker can also be pinned to one host. Changes apply at each worker's next container start; running containers are not moved. Part of Container Operations, which needs Containers to be on for the organization. Returns the policy, the hosts with whether each is ready and how many containers it runs, the groups that can serve as pools, and each worker's placement: pinned or following the policy, where its next container would start and why, and where its current one runs. Requires the permission to manage containers or container policy.
Auth Session JWT (Bearer)
Responses
| Status | Description |
200 | The placement view. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
policy | object | |
hosts | array of object | The hosts (revoked ones left out). |
pools | array of object | Groups that can be pools. |
workers | array of object | Each virtual worker's placement. |
PUT /v1/containers/host-placement
Change the host placement policy
Placement decides where the organization's virtual worker containers run: on Backbuild's cloud (`cloud`), on any of its hosts (`all_hosts`), on the hosts in one group (`pool`), or on chosen hosts (`hosts`), optionally falling back to the cloud when none is ready. A worker can also be pinned to one host. Changes apply at each worker's next container start; running containers are not moved. Part of Container Operations, which needs Containers to be on for the organization. `pool_id` goes with `pool`, and `host_ids` (1 to 50) with `hosts`. The answer counts workers pinned to a host the new policy no longer includes. Recorded in the audit log with the policy before and after. Requires the permission to manage container policy.
Auth Session JWT (Bearer)
Request Body
| Field | Type | Required | Description |
mode | string (enum) cloudall_hostspoolhosts | yes | Where containers run. |
pool_id | string<uuid> | no | The group, with `pool`. |
host_ids | array of string | no | The hosts, with `hosts`. |
fallback_to_cloud | boolean | no | Optional. Use the cloud when no host is ready. |
{
"mode": "pool",
"pool_id": "0190a6f2-3c1e-7d4b-9a2f-5b6c7d8e9f02",
"fallback_to_cloud": true
}
Responses
| Status | Description |
200 | The saved policy. |
400 | `VALIDATION_ERROR` or `INVALID_INPUT`: a missing or mismatched field; `INVALID_STATE`: a listed host is revoked. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: the group or a host named is not in the organization. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
policy | object | |
pins_outside_policy | integer | Workers pinned to a host the new policy does not include. |
POST /v1/containers/host-placement/reset-pins
Clear every worker's host pin
Clears the host pin of every virtual worker in the organization, so each follows the placement policy again from its next container start. Recorded in the audit log. Requires the permission to manage virtual workers.
Auth Session JWT (Bearer)
Responses
| Status | Description |
200 | How many pins were cleared. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
cleared | integer | How many pins were cleared. |
GET /v1/docker-hosts
List hosts
Lists the organization's Remote Hosts with their status, agent version and update state, Docker state, last heartbeat and capacity. Revoked hosts are left out unless `include_revoked=true`. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
include_revoked | query | string (enum) | no | Optional. Include revoked hosts. |
Responses
| Status | Description |
200 | The hosts. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
hosts | array of object | |
GET /v1/docker-hosts/{id}
Get a host
Returns one host. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The host. |
Responses
| Status | Description |
200 | The host. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such host, or one in another organization. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
host | object | |
POST /v1/docker-hosts/{id}/docker
Turn a host's Docker role on or off
Turns the Docker role on or off. With it on, the agent installs and runs Docker on its next check-in and the host can run the organization's containers and virtual workers; turning it off stops new placements but does not remove Docker from the machine. Recorded in the audit log. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The host. |
Request Body
| Field | Type | Required | Description |
docker_enabled | boolean | yes | True to give the host the Docker role. |
{
"docker_enabled": true
}
Responses
| Status | Description |
200 | The host's Docker role. |
400 | `VALIDATION_ERROR`, `MISSING_FIELD`, `INVALID_INPUT` or `INVALID_FORMAT`: a missing or malformed field. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such host, or one in another organization. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
host_id | string<uuid> | The host. |
docker_enabled | boolean | The role as saved. |
POST /v1/docker-hosts/{id}/fence
Drain a host
Puts a running host in `draining`: it takes no new containers while what is already running finishes, so you can reimage or service it. Draining a draining host changes nothing. Recorded in the audit log. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The host. |
Responses
| Status | Description |
200 | The host is draining. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such host, or one in another organization. |
409 | `INVALID_STATE`: only a running host can be drained. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
host_id | string<uuid> | The host. |
status | string | `draining`. |
inflight_jobs | integer | Work still finishing. |
POST /v1/docker-hosts/{id}/revoke
Revoke a host
Removes a host from the organization for good: its unfinished jobs are marked orphaned (`orphaned_jobs`) and its private connection is torn down so the host can no longer reach Backbuild. `tunnel_teardown` reports whether the connection was removed; when it reads `failed`, revoke again to retry. Revoking a revoked host changes nothing. Recorded in the audit log. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The host. |
Responses
| Status | Description |
200 | The host is revoked. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such host, or one in another organization. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
host_id | string<uuid> | The host. |
status | string | `revoked`. |
orphaned_jobs | integer | Work in progress that was stopped. |
tunnel_teardown | string (enum) nonedonefailednot_configured | The connection teardown: `done`, `none` (there was none), `failed` (revoke again to retry), or `not_configured`. |
GET /v1/docker-hosts/{id}/tunnel
Check a host's connection
Reports whether the host's private connection to Backbuild is set up and routed, its private address, and its live health: the connection status, how many agents are connected, and whether more than one machine is using the same connection (for example a cloned machine). Health is advisory: when it cannot be read, `health` is null and `health_error` says why, and the rest of the answer still stands. At most 60 checks a minute per organization. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The host. |
Responses
| Status | Description |
200 | The connection state. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such host, or one in another organization. |
429 | 429 Too Many Requests: a rate limit or usage quota was exceeded. Retry after the indicated window. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
assigned | boolean | Whether the host has its private connection. |
routed | boolean | Whether that connection is routed. |
overlay_address | string | null | The host's private address. |
health | object | null | Live health, or null when it could not be read. |
health_error | string (enum) TUNNEL_NOT_CONFIGUREDTUNNEL_HEALTH_UNAVAILABLE | Present when health could not be read. |
POST /v1/docker-hosts/{id}/unfence
Return a drained host to service
Moves a draining host back to `running`, so it takes new containers again; a running host stays as it is. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The host. |
Responses
| Status | Description |
200 | The host is running. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such host, or one in another organization. |
409 | `INVALID_STATE`: only a draining host can be returned to service. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
host_id | string<uuid> | The host. |
status | string | `running`. |
GET /v1/docker-hosts/agent-install
Get the host agent install command
Returns the Linux install command for the Backbuild host agent and its download addresses for x64 and arm64, with each file's SHA-256, for the agent version this organization uses (its pinned version when it pins one, else the current release). The command checks the download's hash before installing. Without a pairing code the agent shows a code and a confirmation secret on the host to approve with `POST /v1/docker-hosts/device/approve`; for a one-step pairing use `POST /v1/docker-hosts/pair-token` instead. Any signed-in member can read it: the command alone joins nothing until someone with the permission approves the host.
Auth Session JWT (Bearer)
Responses
| Status | Description |
200 | The install details. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
503 | `SERVICE_UNAVAILABLE`: no verified agent release is available right now, or the organization pins a version that is not available (change the pin under agent updates). |
200 response body: data fields
| Field | Type | Description |
product | string | `cli`: the agent ships in the Backbuild CLI. |
version | string | The agent version the command installs. |
sha256 | object | SHA-256 of each download. |
download_url | string<uri> | The x64 download. |
download_url_arm64 | string<uri> | The arm64 download. |
api_base | string<uri> | The API address the agent uses. |
install_command | string | A shell command for the host: it picks the right download, checks its hash, installs the agent and starts setup. |
GET /v1/docker-hosts/agent-updates
Read the agent update policy
Returns the organization's agent update policy (automatic updates on or off, and an optional pinned version) and, for each host, its own override, the policy in effect for it, its current agent version and its last update error. By default updates are on with no pin. A pin holds hosts at that version: agents never downgrade, so a pin older than a host's version keeps that host where it is. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Responses
| Status | Description |
200 | The policy. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
org | object | The organization's policy. |
hosts | array of object | Each host's override and the policy in effect for it. |
PUT /v1/docker-hosts/agent-updates
Change the agent update policy
Without `host_id`, changes the organization's policy (`auto_update`, `pinned_version`); with `host_id`, changes that host's override (`mode`: `inherit` follows the organization, `auto` or `off`; `pinned_version`). A field you leave out stays as it is; `pinned_version: null` clears a pin. Recorded in the audit log with the values before and after. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Request Body
| Field | Type | Required | Description |
host_id | string<uuid> | no | Optional. Set this host's override instead of the organization's policy. |
auto_update | boolean | no | Organization policy: whether agents update themselves. |
mode | string (enum) inheritautooff | no | Host override. |
pinned_version | string | null | no | A release version to hold at, or null to clear the pin. |
{
"auto_update": true,
"pinned_version": null
}
Responses
| Status | Description |
200 | The policy as saved. |
400 | `VALIDATION_ERROR`, `MISSING_FIELD`, `INVALID_INPUT` or `INVALID_FORMAT`: a missing or malformed field. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such host. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
scope | string (enum) orghost | What was changed. |
host_id | string<uuid> | The host, for a host override. |
auto_update | boolean | Organization policy. |
mode | string | Host override. |
pinned_version | string | null | The pin. |
updated_at | string<date-time> | When. |
POST /v1/docker-hosts/device/approve
Approve a host
Enrolls a host that is waiting for approval. Send the code the host shows and, unless the host came from your own pairing command (`via_pair_token: true`), the confirmation secret shown on the host's console, which proves you can see the machine. Choose its name, an optional region label, and whether it takes the Docker role (on by default). The new host starts as `pending` while its secure connection is set up. Every approval is recorded in the audit log with the approver, the fingerprint and the address. Requires the permission to add Remote Hosts (owners and admins hold it), a session that completed its second factor, and a second-factor check within the last 10 minutes.
Auth Session JWT (Bearer)
Request Body
| Field | Type | Required | Description |
user_code | string | yes | The code the host shows, or from the pending list. |
confirm_secret | string | no | The confirmation secret shown on the host's console. Required unless `via_pair_token` is true. |
name | string | yes | A name for the host. |
region | string | no | Optional. A region label of your own. |
docker_enabled | boolean | no | Optional. Give the host the Docker role (default true). |
via_pair_token | boolean | no | Optional. True when the host came from your own pairing command; the confirmation secret is then not needed, and you must be the person who created the command. |
{
"user_code": "KQ7M-2XWP",
"confirm_secret": "4F9C2A",
"name": "build-01",
"region": "us-east",
"docker_enabled": true
}
Responses
| Status | Description |
200 | The host was approved. |
400 | `VALIDATION_ERROR`, `MISSING_FIELD`, `INVALID_INPUT` or `INVALID_FORMAT`: a missing or malformed field. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`, `MFA_VERIFICATION_REQUIRED` or `MFA_STEPUP_REQUIRED` as above; `CONFIRM_MISMATCH`: the confirmation secret is wrong. |
404 | `NOT_FOUND`: no host is waiting with that code. |
409 | `FLOW_NOT_APPROVABLE`: the request expired or was already handled; `ALREADY_ENROLLED`: that host is already enrolled. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
host_id | string<uuid> | The new host. |
hostname | string | The host's name on its private network. |
state | string | `approved`. |
docker_enabled | boolean | Whether it has the Docker role. |
GET /v1/docker-hosts/device/pending
List hosts waiting for your approval
Lists hosts that ran a pairing command for this organization but still need a person to approve them, with what to check before approving: the host's label, its key fingerprint, the address it connected from, and its code. Never returns the host's secrets. Requires the permission to add Remote Hosts.
Auth Session JWT (Bearer)
Responses
| Status | Description |
200 | The waiting hosts. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
pending | array of object | |
GET /v1/docker-hosts/firewall-rules
List firewall rules
Lists the inbound allow rules the agent applies to the organization's hosts. A rule applies at one of three scopes: every host (`global`), the hosts in one group (`host_group`), or a single host (`host`). A host allows the union of the rules that apply to it. With `host_id`, lists only the rules that apply to that host. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
host_id | query | string<uuid> | no | Optional. Only the rules that apply to this host. |
Responses
| Status | Description |
200 | The rules. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
rules | array of object | |
POST /v1/docker-hosts/firewall-rules
Add a firewall rule
Allows inbound traffic from a CIDR range to a port. A rule applies at one of three scopes: every host (`global`), the hosts in one group (`host_group`), or a single host (`host`). A host allows the union of the rules that apply to it. The agent picks up the change on its next check-in. Recorded in the audit log. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Request Body
| Field | Type | Required | Description |
scope | string (enum) globalhost_grouphost | yes | Where the rule applies. |
host_group_id | string<uuid> | no | Required for `host_group`. |
host_id | string<uuid> | no | Required for `host`. |
cidr | string | yes | The source range, for example `203.0.113.0/24`. |
port | integer | yes | The port to allow. |
proto | string (enum) tcpudp | no | Optional, default `tcp`. |
description | string | no | Optional. A note. |
{
"scope": "host_group",
"host_group_id": "0190a6f2-3c1e-7d4b-9a2f-5b6c7d8e9f01",
"cidr": "203.0.113.0/24",
"port": 22,
"proto": "tcp",
"description": "Office SSH"
}
Responses
| Status | Description |
200 | The new rule's id. |
400 | `VALIDATION_ERROR`, `MISSING_FIELD`, `INVALID_INPUT` or `INVALID_FORMAT`: a missing or malformed field. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: the host or group named is not in the organization. |
500 | `INTERNAL_ERROR`. A malformed `cidr`, a `port` outside 1 to 65535, an unknown `proto` or an invalid `scope` currently answers 500 rather than 400; check those fields first. |
200 response body: data fields
| Field | Type | Description |
id | string<uuid> | The new record. |
DELETE /v1/docker-hosts/firewall-rules/{id}
Remove a firewall rule
Removes a rule. Recorded in the audit log. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The rule. |
Responses
| Status | Description |
200 | Deleted. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such rule. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
deleted | boolean | True. |
GET /v1/docker-hosts/groups
List host groups
Lists the organization's host groups with their members. A group is a pool for container placement and a target for firewall rules and managed accounts. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Responses
| Status | Description |
200 | The groups. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
groups | array of object | |
POST /v1/docker-hosts/groups
Create a host group
Creates an empty group. Names are unique in the organization. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Request Body
| Field | Type | Required | Description |
name | string | yes | A unique name. |
description | string | no | Optional. A note. |
{
"name": "gpu-pool",
"description": "Hosts with GPUs"
}
Responses
| Status | Description |
200 | The new group's id. |
400 | `VALIDATION_ERROR`, `MISSING_FIELD`, `INVALID_INPUT` or `INVALID_FORMAT`: a missing or malformed field. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
409 | `ALREADY_EXISTS`: a group with that name exists. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
id | string<uuid> | The new record. |
DELETE /v1/docker-hosts/groups/{id}
Delete a host group
Deletes a group and its membership list (the hosts themselves are untouched). A group still used by firewall rules, managed accounts or the container placement policy cannot be deleted until those are changed (`IN_USE`). Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The group. |
Responses
| Status | Description |
200 | Deleted. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such group. |
409 | `IN_USE`: the group is used by firewall rules, managed accounts or the placement policy. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
deleted | boolean | True. |
POST /v1/docker-hosts/groups/{id}/members
Add a host to a group
Adds a host to a group; adding a member again changes nothing. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The group. |
Request Body
| Field | Type | Required | Description |
host_id | string<uuid> | yes | The host to add. |
Responses
| Status | Description |
200 | Whether the host was added. |
400 | `VALIDATION_ERROR`, `MISSING_FIELD`, `INVALID_INPUT` or `INVALID_FORMAT`: a missing or malformed field. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such group or host. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
added | boolean | True. |
host_id | string<uuid> | The host. |
newly_added | boolean | False when it was already a member. |
DELETE /v1/docker-hosts/groups/{id}/members/{hostId}
Remove a host from a group
Removes a host from a group. Requires the permission to manage Remote Hosts in the organization; owners and admins hold it, members do not.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The group. |
hostId | path | string<uuid> | yes | The host. |
Responses
| Status | Description |
200 | Whether the host was removed. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such group or host. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
removed | boolean | False when it was not a member. |
POST /v1/docker-hosts/pair-token
Create a one-step pairing command
Creates a single-use pairing code and returns the install command with the code built in. Run the command on the host (as root, or a user that can use sudo); the host then joins this organization with no further approval. The code works once and expires after 10 minutes; it is shown only in this answer. A host paired this way starts with no serving role: turn on its Docker role with `POST /v1/docker-hosts/{id}/docker`. If pairing cannot complete automatically, the host waits for approval (see `GET /v1/docker-hosts/device/pending`). Requires the permission to add Remote Hosts (owners and admins hold it), a session that completed its second factor, and a second-factor check within the last 10 minutes.
Auth Session JWT (Bearer)
Responses
| Status | Description |
200 | The pairing code and install command. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller lacks the permission. `MFA_VERIFICATION_REQUIRED`: the session never completed its second factor. `MFA_STEPUP_REQUIRED`: verify again; the last check is older than 10 minutes, or the caller is an API key. |
503 | `SERVICE_UNAVAILABLE`: no verified agent release is available, so no command can be made; no code is created. |
200 response body: data fields
| Field | Type | Description |
product | string | `cli`: the agent ships in the Backbuild CLI. |
version | string | The agent version the command installs. |
sha256 | object | SHA-256 of each download. |
download_url | string<uri> | The x64 download. |
download_url_arm64 | string<uri> | The arm64 download. |
api_base | string<uri> | The API address the agent uses. |
install_command | string | A shell command for the host: it picks the right download, checks its hash, installs the agent and starts setup. |
pair_token | string | The single-use pairing code, already built into `install_command`. Shown only here. |
expires_at | string<date-time> | When the code stops working, 10 minutes after creation. |
GET /v1/docker-hosts/provision-map
List managed account rules
Lists the rules that give people operating-system accounts on the organization's hosts. Each rule maps a person, group, department or role to all hosts, a host group or one host, with the account's options: a home directory, the login shell, sudo, membership of the Docker group, and whether the person's SSH sources are added to the host firewall. Every host applies changes within about 30 seconds: accounts are created for people a rule now covers, and locked for people it no longer covers or who leave the organization or are deactivated. Requires the permission to provision Remote Host accounts (owners and admins hold it).
Auth Session JWT (Bearer)
Responses
| Status | Description |
200 | The rules. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
rules | array of object | |
POST /v1/docker-hosts/provision-map
Add a managed account rule
Adds a rule. Sudo and Docker group membership can be granted only to a single person, never to a group, department or role (`INVALID_GRANT`). Editing these rules needs a session that completed its second factor. Recorded in the audit log. Requires the permission to provision Remote Host accounts.
Auth Session JWT (Bearer)
Request Body
| Field | Type | Required | Description |
principal_type | string (enum) usergrouproledepartment | yes | Who gets accounts. |
principal_user_id | string<uuid> | no | For `user`. |
principal_group_id | string<uuid> | no | For `group`. |
principal_department_id | string<uuid> | no | For `department`. |
principal_role_key | string | no | For `role`. |
target_type | string (enum) all_hostshost_grouphost | yes | Which hosts. |
target_host_id | string<uuid> | no | For `host`. |
target_group_id | string<uuid> | no | For `host_group`. |
create_home | boolean | no | Optional, default true. |
grant_sudo | boolean | no | Optional. One person only. |
grant_docker | boolean | no | Optional. One person only. |
add_ssh_sources | boolean | no | Optional. Add the person's SSH sources to the host firewall. |
login_shell | string (enum) /bin/bash/bin/sh/usr/bin/zsh/bin/zsh/usr/sbin/nologin/sbin/nologin | no | Optional, default `/bin/bash`. |
{
"principal_type": "user",
"principal_user_id": "0190a6f2-3c1e-7d4b-9a2f-5b6c7d8e9f01",
"target_type": "host_group",
"target_group_id": "0190a6f2-3c1e-7d4b-9a2f-5b6c7d8e9f02",
"grant_sudo": false,
"grant_docker": true,
"login_shell": "/bin/bash"
}
Responses
| Status | Description |
200 | The new rule's id. |
400 | `VALIDATION_ERROR`, `MISSING_FIELD`, `INVALID_FORMAT`; `INVALID_GRANT`: sudo or Docker for more than one person. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller lacks the permission. `MFA_REQUIRED`: the session never completed its second factor. |
404 | `NOT_FOUND`: the person, group, department, host or host group named is not in the organization. |
500 | `INTERNAL_ERROR`. An unknown `principal_type` or `target_type`, or a `login_shell` that is not allowed, currently answers 500 rather than 400; check those fields first. |
200 response body: data fields
| Field | Type | Description |
id | string<uuid> | The new record. |
DELETE /v1/docker-hosts/provision-map/{id}
Remove a managed account rule
Removes a rule; hosts lock the accounts it no longer grants. Needs a session that completed its second factor. Recorded in the audit log. Requires the permission to provision Remote Host accounts.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The rule. |
Responses
| Status | Description |
200 | Deleted. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller lacks the permission. `MFA_REQUIRED`: the session never completed its second factor. |
404 | `NOT_FOUND`: no such rule. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
deleted | boolean | True. |
GET /v1/virtual-workers/{id}/run-host
Read where a worker runs
Returns the host a virtual worker is pinned to and whether that host can take it now, or null when the worker follows the placement policy. Any active member of the organization can read it.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The virtual worker. |
Responses
| Status | Description |
200 | The worker's host pin. |
400 | `INVALID_ID_FORMAT`: the worker id is not a UUID. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such worker. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
virtual_worker_id | string<uuid> | The worker. |
run_host_id | string | null | Its pinned host; null when it follows the policy. |
run_host_name | string | null | That host's name. |
run_host_ready | boolean | null | Whether that host can take it now. |
POST /v1/virtual-workers/{id}/run-host
Pin a worker to a host
Pins a virtual worker to one of the organization's hosts, or clears the pin with `host_id: null`. The host must be running with its Docker role on and, when the policy places workers on hosts, must be one the policy includes (`PLACEMENT_RESTRICTED`). Takes effect at the worker's next container start. Recorded in the audit log. Requires the permission to manage virtual workers.
Auth Session JWT (Bearer)
Parameters
| Name | In | Type | Required | Description |
id | path | string<uuid> | yes | The virtual worker. |
Request Body
| Field | Type | Required | Description |
host_id | string | null | yes | The host to pin to, or null to follow the policy. |
{
"host_id": "0190a6f2-3c1e-7d4b-9a2f-5b6c7d8e9f03"
}
Responses
| Status | Description |
200 | The worker's host pin. |
400 | `VALIDATION_ERROR` or `INVALID_ID_FORMAT`: a malformed body or id. |
401 | 401 Unauthorized: missing, expired, malformed, or revoked credentials. |
403 | `FORBIDDEN`: the caller is not an active member with the permission this route needs. |
404 | `NOT_FOUND`: no such worker or host. |
409 | `INVALID_STATE`: the host is not running or has no Docker role; `PLACEMENT_RESTRICTED`: the placement policy excludes that host. |
500 | 500 Internal Server Error: an unexpected server-side error. The message is sanitized; the correlation id is logged server-side. |
200 response body: data fields
| Field | Type | Description |
virtual_worker_id | string<uuid> | The worker. |
run_host_id | string | null | Its pinned host. |
run_host_name | string | null | That host's name. |