Update IP address
PATCH
/api/ip-addresses/{id}
const url = 'http://localhost:3000/api/ip-addresses/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {cookie: 'session=<session>', 'Content-Type': 'application/json'}, body: '{"address":"10.0.0.10/24","vrfId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","deviceId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","status":"active","role":"example","family":4,"dnsName":"example","description":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/api/ip-addresses/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --cookie session=<session> \ --data '{ "address": "10.0.0.10/24", "vrfId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "deviceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "status": "active", "role": "example", "family": 4, "dnsName": "example", "description": "example" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
Request Body required
Section titled “Request Body required ” Media type application/json
object
address
string
Example
10.0.0.10/24 vrfId
string format: uuid
deviceId
string format: uuid
status
string
role
E.g. loopback, mgmt, peering, vip, secondary
string
family
Denormalised IP family
integer
dnsName
string
description
string
Responses
Section titled “ Responses ”IpAddress updated
Media type application/json
object
data
object
id
required
string format: uuid
address
required
string
vrfId
string format: uuid
deviceId
string format: uuid
interfaceId
Device_ports.id this address is bound to. Setting it on create/update re-homes deviceId to that port’s device so the address shows under both the interface and the device. ON DELETE SET NULL.
string format: uuid
interfaceName
Join-only: the interface name, returned by GET /api/devices/{id}/ips.
string
status
required
string
role
E.g. loopback, mgmt, peering, vip, secondary
string
family
integer
dnsName
string
description
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "data": { "address": "10.0.0.10/24", "status": "active", "family": 4 }}Validation error
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}Not authenticated
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}IpAddress not found
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}