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

put/servers/{id}/interfaces/{ipAddress}

Authorizations

Authorizationstringrequired

Authorization header carrying a workspace API key, as “Bearer kbn_live_…”. The X-Api-Key header is accepted equivalently.

Path parameters

idstring<uuid>required

Identifier of the server.

ipAddressstringrequired

IP address of the interface.

Bodyapplication/json

ipAddressstringrequired

Address of the interface after the call: the same value as the path to keep it, another one to change it.

isPrimarybooleanrequired

Whether this becomes the primary interface.

networkIdstring<uuid>

Network to attach the interface to.

Response200 · application/json

The interfaces after the change.

ipAddressstringrequired

IP address carried by the interface.

isPrimarybooleanrequired

Whether this is the primary interface of the server.

networkIdstring<uuid> | null

Identifier of the network the interface is attached to; `null` when it has none, or when the key does not carry `networks:read`.

networkNamestring | null

Name of that network; `null` when the interface has none, or when the key does not carry `networks:read`.