Environment Management
Update Environment
Update an existing Docker environment configuration
PUT
Update Environment
Description
Updates the configuration of an existing Docker environment. Only the fields provided in the request body will be updated. The Docker client cache is automatically cleared after updates.Authentication
Requiresenvironments:edit permission when authentication is enabled.
Path Parameters
number
required
The unique identifier of the environment to update
Request Body
All fields are optional. Only include fields you want to update.string
Display name of the environment
string
Type of Docker connection:
socket- Local Unix socketdirect- Direct TCP connection to Docker APIhawser-standard- HTTP proxy via Hawser agenthawser-edge- WebSocket reverse proxy via Hawser agent
Connection Parameters
string
Hostname or IP address
number
Port number for Docker API connection
string
Connection protocol:
http or httpsstring
Unix socket path (used when
connectionType is socket)TLS Configuration
string
TLS Certificate Authority (CA) certificate in PEM formatFormat: Multi-line PEM string with BEGIN/END markers
string
TLS client certificate in PEM formatFormat: Multi-line PEM string with BEGIN/END markers
string
TLS client private key in PEM formatFormat: Multi-line PEM string with BEGIN/END markers
boolean
Skip TLS certificate verification
Hawser Configuration
string
Authentication token for
hawser-standard connectionsDisplay Options
string
Icon identifier for UI display
string[]
Array of label strings for categorization (maximum 10 labels)
Collection Settings
boolean
Enable collection of container activity events
boolean
Enable collection of host metrics
boolean
Highlight recent changes in the UI
Network Information
string
Public IP address of the environment host. Set to empty string or null to remove.
Response
Returns the updated environment object with parsed labels and public IP.number
Environment identifier
string
Updated name
string[]
Parsed array of labels
string | null
Public IP address
string
ISO 8601 timestamp of the update
Example Requests
Update Connection Type
Update TLS Configuration
Enable TLS Skip Verify (Insecure)
Update Labels and Icon
Update Collection Settings
Switch to Hawser Standard
Switch to Hawser Edge
Update Public IP
Remove Public IP
Example Response
Error Responses
object
User lacks
environments:edit permissionobject
Environment does not exist
object
Failed to update environment
Behavior Notes
Cache Management
- The Docker client cache is automatically cleared before the update to ensure fresh connections
- This prevents stale connection issues when changing hosts, ports, or TLS settings
Subprocess Notification
- When
collectActivityorcollectMetricssettings are changed, subprocess collectors are automatically notified - This ensures metric collection starts or stops immediately
Audit Logging
- All updates are logged in the audit trail
- Sensitive fields (TLS certificates, keys, tokens) are excluded from the audit diff
- The audit log includes a computed diff showing what changed
Partial Updates
- Only fields included in the request body are updated
- Omitted fields retain their current values
- To clear a field, explicitly set it to
nullor an empty string
Label Handling
- Labels array is only updated if explicitly provided
- Maximum of 10 labels per environment
- Labels are serialized as JSON in the database
Public IP Management
- Setting
publicIptonullor empty string removes the IP - Public IPs are stored separately and included in GET responses
