Networks
Manage Docker networks for environment isolation, shared service communication, and proxy configuration. Networks are server-scoped and can be automatically provisioned per environment or manually created as shared networks.
List Server Networks
GET /api/v1/networks/{serverUuid}
Response:
{
"data": [
{
"uuid": "net-abc123",
"docker_network_name": "ce-env-xyz789",
"scope": "environment",
"driver": "bridge",
"status": "active",
"server_id": 1,
"environment_id": 5,
"docker_id": "sha256:abc...",
"is_proxy_network": false,
"resource_count": 3
},
{
"uuid": "net-def456",
"docker_network_name": "ce-proxy",
"scope": "proxy",
"driver": "bridge",
"status": "active",
"server_id": 1,
"is_proxy_network": true,
"resource_count": 8
}
]
}
Network Scopes
| Scope | Description |
|---|---|
environment | Auto-provisioned per environment for isolation |
shared | User-created networks for cross-environment communication |
proxy | Dedicated reverse proxy network |
system | System-managed networks (e.g., Docker default) |
Network Statuses
| Status | Description |
|---|---|
active | Network exists on Docker host and is usable |
pending | Network creation requested, not yet confirmed |
failed | Network creation or verification failed |
deleted | Network removed from Docker host |
Get Network Details
GET /api/v1/networks/{serverUuid}/{networkUuid}
Returns network details including Docker inspection data (subnet, gateway, connected containers).
Create Shared Network
Create a user-defined shared network on a server:
POST /api/v1/networks/{serverUuid}
{
"name": "shared-backend",
"driver": "bridge"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Network display name |
driver | string | No | bridge (standalone) or overlay (Swarm). Auto-detected if omitted |
Response: 201 Created
{
"message": "Network created.",
"data": {
"uuid": "net-abc123",
"docker_network_name": "ce-shared-abc123",
"scope": "shared",
"driver": "bridge",
"status": "active"
}
}
Delete Network
DELETE /api/v1/networks/{serverUuid}/{networkUuid}
Response:
{
"message": "Network deleted."
}
Deleting a network disconnects all attached resources. Ensure resources are redeployed after network changes.
Sync Networks
Discover new networks and verify existing ones by syncing with the Docker host:
POST /api/v1/networks/{serverUuid}/sync
Proxy Isolation
Migrate to Proxy Isolation
Create a dedicated proxy network and connect all FQDN-bearing resources:
POST /api/v1/networks/{serverUuid}/proxy/migrate
This creates a ce-proxy network and connects all resources that have public domains. After migration, the reverse proxy only communicates with resources through the dedicated proxy network.
Cleanup Legacy Proxy Connections
After all resources are redeployed with proxy isolation, disconnect the proxy from non-proxy networks:
POST /api/v1/networks/{serverUuid}/proxy/cleanup
Resource Network Attachment
List Resource Networks
Get networks attached to a specific resource:
GET /api/v1/networks/resource/{type}/{uuid}
| Parameter | Type | Description |
|---|---|---|
type | string | application, service, or database |
uuid | string | Resource UUID |
Attach Resource to Network
POST /api/v1/networks/resource/{type}/{uuid}/attach
{
"network_uuid": "net-abc123"
}
Response:
{
"message": "Resource attached to network."
}
Detach Resource from Network
DELETE /api/v1/networks/resource/{type}/{uuid}/{networkUuid}
Response:
{
"message": "Resource detached from network."
}
After attaching or detaching networks, redeploy the resource for the network changes to take effect.