Reference
View as MarkdownNetworks API
6 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes
/networksList the team's shared networks
Needs servers:read. Each network lives on one server and lists the services attached to it.
| Parameter | In | Type | Description |
|---|---|---|---|
serverId | query | string (uuid) | Only the networks on this server |
Response 200 · OK · application/json
- NetworkView[] | nullrequired
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/networksCreate a shared network
Needs servers:write. A shared network spans one server: services of any project of the team that run on it attach explicitly and are reachable by <service>.<env>.<project>. 409 network_name_taken, 422 server_not_found.
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-chosen key (<=255 chars). A retry with the same key replays the original response for 24 hours. |
Request body · application/json · required
- namestringrequiredUnique per team; letters, digits, spaces, '.', '_' and '-'
- serverIdstringrequiredThe server the network lives on; only services on this server can attach
Response 201 · Created · application/json
- createdAtstring (date-time)required
- dockerNamestringrequired
- idstringrequired
- namestringrequired
- serverIdstringrequired
- serverNamestringrequired
- AttachedService[] | nullrequiredServices attached (staged or deployed); services of projects the token cannot see are left out
401Unauthorized403Forbidden409Conflictnetwork_name_taken422Unprocessable Entityserver_not_found500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/networks/{networkId}Get a shared network
| Parameter | In | Type | Description |
|---|---|---|---|
networkIdrequired | path | string |
Response 200 · OK · application/json
- createdAtstring (date-time)required
- dockerNamestringrequired
- idstringrequired
- namestringrequired
- serverIdstringrequired
- serverNamestringrequired
- AttachedService[] | nullrequiredServices attached (staged or deployed); services of projects the token cannot see are left out
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/networks/{networkId}Delete a shared network
Needs servers:write. 409 network_in_use while a service is attached.
| Parameter | In | Type | Description |
|---|---|---|---|
networkIdrequired | path | string |
Response 204 · No Content
No body.
401Unauthorized403Forbidden409Conflictnetwork_in_use422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/services/{serviceId}/networks/{networkId}Attach a service to a shared network (staged)
Needs deployments:write. Advances the service generation; the next deployment joins the network. 422 network_wrong_server when the service is on another server than the network, 422 egress_blocked while the service blocks outbound internet.
| Parameter | In | Type | Description |
|---|---|---|---|
serviceIdrequired | path | string | |
networkIdrequired | path | string |
Response 200 · OK · application/json
- aliasstringrequired
- idstringrequired
- namestringrequired
- serverIdstringrequired
401Unauthorized403Forbidden422Unprocessable Entitynetwork_wrong_serveregress_blocked500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/services/{serviceId}/networks/{networkId}Detach a service from a shared network (staged)
Needs deployments:write. Advances the service generation; the next deployment leaves the network.
| Parameter | In | Type | Description |
|---|---|---|---|
serviceIdrequired | path | string | |
networkIdrequired | path | string |
Response 204 · No Content
No body.
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.