Skip to main content
Server Actions

Add, remove or change primary IP addresses and reverse DNS of a server

Asynchronous Request

Adds, removes or changes the primary IP addresses of a server and sets reverse DNS per IP, as one atomic change: if any part is invalid nothing is changed. The response is the resulting IP list. Address changes are then applied inside the server; track them with X-Callback-ID. X-Callback-ID is empty when only reverse DNS changed. A stopped server is started to apply the change. Removing an IP or changing the primary interrupts connections using those addresses. Send the body as JSON. Available to Webdock Private Cloud customers; requires the write:servers and change:server_ip token permissions.

PATCH
/servers/{serverSlug}/ips
Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

serverSlugstringrequired

Slug of the server

Body

application/json
addobject[]

IPs to assign from your Private Cloud blocks on this server's host. Each entry sets exactly one of ipId or blockId.

banRemovedIpIdsinteger[]

IP row IDs from remove to also ban for your account, so they are never auto-picked for your servers again (undo with setIpBannedState).

primaryIpIdinteger | null

IP row ID that becomes the primary IP: an IP that stays on the server, or an add entry given by ipId. It needs an IPv4 address. The server's alias DNS and default reverse DNS follow the primary.

Example: 8812
removeinteger[]

IP row IDs on this server (from listServerIps) to release. Removing the primary requires a new primary in the same request.

reverseDnsobject[]

Reverse DNS changes for IPs that stay on the server. Applied to the IP's IPv4 and IPv6.

Response

application/json

IP assignments updated. The body is the resulting IP list (primary first); the in-server network change, if any, completes asynchronously.

X-Callback-IDstringheader

Callback ID of the last step (test-network on a running server; the address change itself is the set-containerip event before it). Empty when only reverse DNS changed.

itemsobject[]