Servers
Add or update an interface
Create the interface if the address is new, update it otherwise. Returns the recomputed list of interfaces rather than the single one you sent. The primary interface follows its address: sent without `networkId`, or with a new address, it joins the most precise network containing that address, or a new detected `/24` when no network contains a private address. On a server reported by an agent (`automatic: true`), changing or removing the network of the primary interface is rejected with a 422 (`detected_server_primary_network_locked`). A `networkId` also requires `networks:edit`; without it, the interface keeps its current network.
Required scope servers:edit
/servers/{id}/interfaces/{ipAddress}Authorizations
AuthorizationstringrequiredAuthorization header carrying a workspace API key, as “Bearer kbn_live_…”. The X-Api-Key header is accepted equivalently.
Path parameters
idstring<uuid>requiredIdentifier of the server.
ipAddressstringrequiredIP address of the interface.
Bodyapplication/json
ipAddressstringrequiredAddress of the interface after the call: the same value as the path to keep it, another one to change it.
isPrimarybooleanrequiredWhether this becomes the primary interface.
networkIdstring<uuid>Network to attach the interface to.
Response200 · application/json
The interfaces after the change.
ipAddressstringrequiredIP address carried by the interface.
isPrimarybooleanrequiredWhether this is the primary interface of the server.
networkIdstring<uuid> | nullIdentifier of the network the interface is attached to; `null` when it has none, or when the key does not carry `networks:read`.
networkNamestring | nullName of that network; `null` when the interface has none, or when the key does not carry `networks:read`.