network
The network domain has 9 actions. On the meta surface they are all reached through arcane_network; on the individual surface each one is its own tool; on the dynamic surface run them with arcane_execute_action and the canonical ID.
Summary
Section titled “Summary”| Action | Title | Kind |
|---|---|---|
network.connect_container | Connect container to network | write |
network.counts | Network counts | read |
network.create | Create network | write |
network.delete | Delete network | destructive |
network.disconnect_container | Disconnect container from network | write |
network.get | Get network | read |
network.list | List networks | read |
network.prune | Prune networks | destructive |
network.topology | Get network topology | read |
Actions
Section titled “Actions”network.connect_container
Section titled “network.connect_container”Connect container to network
- Kind: write
- Required parameters:
networkId,containerId - Meta tool:
arcane_networkwith"action": "connect_container" - Individual tool:
arcane_network_connect_container - Arcane route:
POST /api/environments/{id}/networks/{networkId}/connect - Operation ID:
connect-network-container - Usage: Attaches an existing container, running or stopped, to a network without recreating it. networkId from network.list or network.create, containerId (ID or name) from container.list. aliases adds network-scoped DNS names. ipv4Address/ipv6Address request a static address, which Docker allows only on a user-defined network with a configured subnet (a malformed address gives 400). Verify with network.get containersList or container.get.
- Related actions:
container.list,network.get,network.disconnect_container
network.counts
Section titled “network.counts”Network counts
- Kind: read
- Required parameters: none
- Meta tool:
arcane_networkwith"action": "counts" - Individual tool:
arcane_network_counts - Arcane route:
GET /api/environments/{id}/networks/counts - Operation ID:
network-counts - Usage: Returns inuse, unused and total for the environment’s networks, a cheap overview before network.prune. total counts every network, but inuse and unused count only non-default networks (default ones such as bridge, host and none are skipped), so they need not add up to total. Use network.list for the networks themselves.
- Related actions:
network.list,network.prune
network.create
Section titled “network.create”Create network
- Kind: write
- Required parameters:
name,options - Meta tool:
arcane_networkwith"action": "create" - Individual tool:
arcane_network_create - Arcane route:
POST /api/environments/{id}/networks - Operation ID:
create-network - Usage: name and options are both required (options may be {}): driver (Docker uses bridge when empty, and overlay needs a Swarm manager), labels, internal (no outside access), attachable, enableIPv6, options (driver options) and ipam {driver, config: [{subnet, gateway, ipRange}]} for fixed subnets. Returns the new network id (and Docker’s warning, if any) for network.connect_container or network.get.
- Related actions:
network.list,network.connect_container,network.get
network.delete
Section titled “network.delete”Delete network
- Kind: destructive — requires
confirm: true - Required parameters:
networkId - Meta tool:
arcane_networkwith"action": "delete" - Individual tool:
arcane_network_delete - Arcane route:
DELETE /api/environments/{id}/networks/{networkId} - Operation ID:
delete-network - Usage: Removes one network. networkId takes the ID or name from network.list. Docker refuses while containers are still connected (disconnect them with network.disconnect_container first) and never removes the default bridge, host or none networks. Use network.prune to remove every unused network at once.
- Related actions:
network.list,network.disconnect_container,network.prune
network.disconnect_container
Section titled “network.disconnect_container”Disconnect container from network
- Kind: write
- Required parameters:
networkId,containerId - Meta tool:
arcane_networkwith"action": "disconnect_container" - Individual tool:
arcane_network_disconnect_container - Arcane route:
POST /api/environments/{id}/networks/{networkId}/disconnect - Operation ID:
disconnect-network-container - Usage: Detaches a container from a network without recreating it. networkId from network.list, containerId (ID or name) from container.list or the network’s containersList in network.get. force=true forces the disconnect. Check the result with network.get or container.get.
- Related actions:
network.get,network.connect_container,container.get
network.get
Section titled “network.get”Get network
- Kind: read
- Required parameters:
networkId - Meta tool:
arcane_networkwith"action": "get" - Individual tool:
arcane_network_get - Arcane route:
GET /api/environments/{id}/networks/{networkId} - Operation ID:
get-network - Usage: Inspects one network. networkId takes the ID or name from network.list, and an unknown network gives 404. Returns driver, scope, ipam (subnets, gateways), options, labels, internal, attachable, enableIPv6 and containersList, one entry per connected container with id, name, ipv4Address, ipv6Address and macAddress, sorted by name or with sort=ip by address (order asc or desc).
- Related actions:
network.list,network.topology,network.connect_container
network.list
Section titled “network.list”List networks
- Kind: read
- Required parameters: none
- Meta tool:
arcane_networkwith"action": "list" - Individual tool:
arcane_network_list - Arcane route:
GET /api/environments/{id}/networks - Operation ID:
list-networks - Usage: Pages through the environment’s Docker networks (start, limit, default 20). search matches name, driver, scope, ID, subnet and gateway, sort takes name, driver, scope, created, inUse, subnet or gateway. inUse=true keeps networks a container uses plus Docker’s default networks, inUse=false the unused non-default ones. Each item gives id, name, driver, scope, ipam, labels, inUse and isDefault. The response counts always cover every network, ignoring search and inUse, and treat default networks as in use.
- Related actions:
network.get,network.counts,network.topology,network.create
network.prune
Section titled “network.prune”Prune networks
- Kind: destructive — requires
confirm: true - Required parameters: none
- Meta tool:
arcane_networkwith"action": "prune" - Individual tool:
arcane_network_prune - Arcane route:
POST /api/environments/{id}/networks/prune - Operation ID:
prune-networks - Usage: Deletes every network no container is connected to (Docker keeps its default bridge, host and none networks) and returns networksDeleted. Check what would go with network.counts or network.list inUse=false first, and use network.delete for a single network or system.prune_all to prune containers, images and volumes too.
- Related actions:
network.counts,network.list,network.delete,system.prune_all
network.topology
Section titled “network.topology”Get network topology
- Kind: read
- Required parameters: none
- Meta tool:
arcane_networkwith"action": "topology" - Individual tool:
arcane_network_topology - Arcane route:
GET /api/environments/{id}/networks/topology - Operation ID:
get-network-topology - Usage: Takes no parameters and returns the environment’s network graph: nodes of type network (metadata driver, scope, isDefault) and container (metadata status, image), and edges from a network id (source) to a connected container id (target) with that container’s ipv4Address/ipv6Address. Only containers attached to some network appear. Use network.get for one network in detail.
- Related actions:
network.list,network.get,container.get