Skip to main content

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​

ScopeDescription
environmentAuto-provisioned per environment for isolation
sharedUser-created networks for cross-environment communication
proxyDedicated reverse proxy network
systemSystem-managed networks (e.g., Docker default)

Network Statuses​

StatusDescription
activeNetwork exists on Docker host and is usable
pendingNetwork creation requested, not yet confirmed
failedNetwork creation or verification failed
deletedNetwork 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"
}
ParameterTypeRequiredDescription
namestringYesNetwork display name
driverstringNobridge (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."
}
warning

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}
ParameterTypeDescription
typestringapplication, service, or database
uuidstringResource 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."
}
note

After attaching or detaching networks, redeploy the resource for the network changes to take effect.