Skip to content

Network API

POST /api/v1/network/{host_id}/{node}/apply

Section titled “POST /api/v1/network/{host_id}/{node}/apply”

Apply Network

Promote the staged config. Typed confirmation required.

Doc 08 §1’s typed-name guardrail, reused verbatim from selfguard’s self_target shape so the frontend has one confirm dialog, not two. The phrase is the NODE NAME because the node is what is at risk: ifreload -a with a broken bridge takes the node off the network until someone reaches its physical console. Unlike a stopped CT this has no in-band undo.

Parameters

NameInTypeRequiredDescription
host_idpathintegeryes
nodepathstringyes

Request body (required), application/json, ApplyIn

FieldTypeRequiredDescription
confirmstring | nullno

Responses

StatusDescriptionSchema
202Successful Responseany
422Validation ErrorHTTPValidationError

POST /api/v1/network/{host_id}/{node}/revert

Section titled “POST /api/v1/network/{host_id}/{node}/revert”

Revert Network

Discard /etc/network/interfaces.new. No confirmation and no job: this deletes a staged file and cannot disturb the running config.

Parameters

NameInTypeRequiredDescription
host_idpathintegeryes
nodepathstringyes

Responses

StatusDescriptionSchema
200Successful Responseany
422Validation ErrorHTTPValidationError

List Bridges

Bridges/bonds/VLANs/physical NICs per node + the guest attachment map.

# ponytail: the attachment map costs one guest_config read per adopted app # and VM on the host: fine for a homelab, linear in guest count for a # 200-guest fleet. This is a human-triggered route, explicitly outside the # poller’s O(nodes) budget (proxmox.py’s “per-guest, user-triggered calls” # section). If it ever gets slow, cache netN in the poller’s cluster_resources # pass; do not add per-guest calls to the poll loop to get it.

One bad host (unreachable, or missing its API token credential; a routine state, not an outage) must not 500 the whole page: it is degraded out into errors and every other host is still served.

Parameters

NameInTypeRequiredDescription
hostqueryinteger | nullno

Responses

StatusDescriptionSchema
200Successful Responseany
422Validation ErrorHTTPValidationError

Create Bridge

Request body (required), application/json, BridgeIn

FieldTypeRequiredDescription
configobjectno
host_idintegeryes
ifacestringyes
nodestringyes
typestringno

Responses

StatusDescriptionSchema
201Successful Responseany
422Validation ErrorHTTPValidationError

DELETE /api/v1/network/bridges/{host_id}/{node}/{iface}

Section titled “DELETE /api/v1/network/bridges/{host_id}/{node}/{iface}”

Delete Bridge

Parameters

NameInTypeRequiredDescription
host_idpathintegeryes
nodepathstringyes
ifacepathstringyes

Responses

StatusDescriptionSchema
200Successful Responseany
422Validation ErrorHTTPValidationError

PUT /api/v1/network/bridges/{host_id}/{node}/{iface}

Section titled “PUT /api/v1/network/bridges/{host_id}/{node}/{iface}”

Update Bridge

Parameters

NameInTypeRequiredDescription
host_idpathintegeryes
nodepathstringyes
ifacepathstringyes

Request body (required), application/json, BridgePatchIn

FieldTypeRequiredDescription
configobjectno

Responses

StatusDescriptionSchema
200Successful Responseany
422Validation ErrorHTTPValidationError

Throughput

Per-host in/out series from the MetricsStore rows the poller already writes.

Same reader as /metrics/query (services/metrics.py::query_series); this endpoint only exists so the Network page can ask for both metrics across every host in one round trip instead of 2N.

Parameters

NameInTypeRequiredDescription
hoursqueryintegerno

Responses

StatusDescriptionSchema
200Successful Responseany
422Validation ErrorHTTPValidationError