v2

latestOpenAPI 3.0.02026-08-0688139156.5 KB
Devices

Update device network configuration

Update the network configuration for a device. The configuration is tested after it is applied, and rolled back if invalid.

patch/v1/device/{device_id}/network

Path parameters

device_idstring required

ID of a device

Example:d_0123456789ab

Request body

dns_server_primarystring ipv4

Primary DNS server IP address. Required when network_mode is "static".

dns_server_secondarystring ipv4

Secondary DNS server IP address. Optional when network_mode is "static".

network_addressstring

IP address and network mask in CIDR notation (e.g., "192.168.1.100/24"). Required when network_mode is "static".

network_gatewaystring ipv4

Gateway IP address. Required when network_mode is "static".

network_mode'dhcp' | 'static'

Network mode (DHCP or static IP)

Example request

{
  "dns_server_primary": "1.1.1.1",
  "dns_server_secondary": "8.8.8.8",
  "network_address": "192.168.1.100/24",
  "network_gateway": "192.168.1.1",
  "network_mode": "static"
}

Response

OK

dns_server_primarystring ipv4

Primary DNS server IP address. Required when network_mode is "static".

dns_server_secondarystring ipv4

Secondary DNS server IP address. Optional when network_mode is "static".

network_addressstring

IP address and network mask in CIDR notation (e.g., "192.168.1.100/24"). Required when network_mode is "static".

network_gatewaystring ipv4

Gateway IP address. Required when network_mode is "static".

network_mode'dhcp' | 'static' required

Network mode (DHCP or static IP)

network_update_pendingboolean

Returned in response only, to indicate that the network update is in progress.

Example response

{
  "dns_server_primary": "1.1.1.1",
  "dns_server_secondary": "8.8.8.8",
  "network_address": "192.168.1.100/24",
  "network_gateway": "192.168.1.1",
  "network_mode": "static"
}