Register the Docker host machine as a managed server
POST
/api/environments/{envId}/servers/register-host
const url = 'https://example.com/api/environments/example/servers/register-host';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"host"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/environments/example/servers/register-host \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "host" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”envId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
Responses
Section titled “Responses”Bad request — malformed input or failed validation.
Media typeapplication/json
object
code
Stable, machine-readable error code. Always present on the wire.
string
message
Human-readable error message. Always present on the wire.
string
field
Field name when the error is tied to a specific input (e.g. validation).
string
hint
Optional, human-friendly hint for resolving the error.
string
requestId
Server-assigned request ID; quote this when reporting issues.
string
key
additional properties
any
Example
{ "code": "READONLY_FIELD", "message": "Field \"exposedPorts\" is read-only and cannot be set via PATCH.", "field": "exposedPorts", "hint": "Exposed ports are discovered from the running container. Change the ports mapping in the compose file at composePath and redeploy.", "requestId": "req_01H0…"}Unauthorized — missing or invalid bearer token.
Media typeapplication/json
object
code
Stable, machine-readable error code. Always present on the wire.
string
message
Human-readable error message. Always present on the wire.
string
field
Field name when the error is tied to a specific input (e.g. validation).
string
hint
Optional, human-friendly hint for resolving the error.
string
requestId
Server-assigned request ID; quote this when reporting issues.
string
key
additional properties
any
Example
{ "code": "READONLY_FIELD", "message": "Field \"exposedPorts\" is read-only and cannot be set via PATCH.", "field": "exposedPorts", "hint": "Exposed ports are discovered from the running container. Change the ports mapping in the compose file at composePath and redeploy.", "requestId": "req_01H0…"}