Update a standard switch
PUT
/network/switch/standard/{id}
const url = 'https://sylve.lan:8181/api/network/switch/standard/1';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"addresses4":[{"cidr":"example","objectId":1}],"addresses6":[{"cidr":"example","objectId":1}],"bridgeMac":{"macObjectId":1,"mode":"example","port":"example"},"confirmHostLayer3Removal":true,"confirmRCConflicts":true,"defaultAccessVlan":1,"defaultRoute":true,"defaultRoute6":true,"dhcp":true,"disableBridgeOffloads":true,"disableIPv6":true,"gateway4":1,"gateway4Manual":"example","gateway6":1,"gateway6Manual":"example","hostVlan":1,"mtu":1,"network4":1,"network4Manual":"example","network6":1,"network6Manual":"example","portPolicies":{"additionalProperty":{"mode":"example","taggedVlans":[1],"untaggedVlan":1}},"ports":["example"],"private":true,"slaac":true,"vlan":1,"vlanFiltering":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://sylve.lan:8181/api/network/switch/standard/1 \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "addresses4": [ { "cidr": "example", "objectId": 1 } ], "addresses6": [ { "cidr": "example", "objectId": 1 } ], "bridgeMac": { "macObjectId": 1, "mode": "example", "port": "example" }, "confirmHostLayer3Removal": true, "confirmRCConflicts": true, "defaultAccessVlan": 1, "defaultRoute": true, "defaultRoute6": true, "dhcp": true, "disableBridgeOffloads": true, "disableIPv6": true, "gateway4": 1, "gateway4Manual": "example", "gateway6": 1, "gateway6Manual": "example", "hostVlan": 1, "mtu": 1, "network4": 1, "network4Manual": "example", "network6": 1, "network6Manual": "example", "portPolicies": { "additionalProperty": { "mode": "example", "taggedVlans": [ 1 ], "untaggedVlan": 1 } }, "ports": [ "example" ], "private": true, "slaac": true, "vlan": 1, "vlanFiltering": true }'Replace and apply a managed standard network switch by ID. Changing VLAN-filtering mode recreates the bridge and requires all VM and jail interfaces to be detached; changing the default access VLAN requires all attached VMs to be stopped.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Standard Switch ID
Request Body
Section titled “Request Body”Update Standard Switch Request
Media typeapplication/json
object
addresses4
Ordered IPv4 sources. All CIDRs in each selected Network object are assigned; replaces network4/network4Manual when supplied.
Array<object>
object
cidr
string
objectId
integer
addresses6
Ordered IPv6 sources, including ULA and GUA. Replaces network6/network6Manual when supplied.
Array<object>
object
cidr
string
objectId
integer
bridgeMac
object
macObjectId
integer
mode
string
port
string
confirmHostLayer3Removal
boolean
confirmRCConflicts
boolean
defaultAccessVlan
integer
defaultRoute
boolean
defaultRoute6
boolean
dhcp
boolean
disableBridgeOffloads
boolean
disableIPv6
boolean
gateway4
integer
gateway4Manual
string
gateway6
integer
gateway6Manual
string
hostVlan
integer
mtu
integer
network4
integer
network4Manual
string
network6
integer
network6Manual
string
portPolicies
object
key
additional properties
object
mode
string
taggedVlans
Array<integer>
untaggedVlan
integer
ports
Array<string>
private
required
boolean
slaac
boolean
vlan
integer
vlanFiltering
boolean
Examplegenerated
{ "addresses4": [ { "cidr": "example", "objectId": 1 } ], "addresses6": [ { "cidr": "example", "objectId": 1 } ], "bridgeMac": { "macObjectId": 1, "mode": "example", "port": "example" }, "confirmHostLayer3Removal": true, "confirmRCConflicts": true, "defaultAccessVlan": 1, "defaultRoute": true, "defaultRoute6": true, "dhcp": true, "disableBridgeOffloads": true, "disableIPv6": true, "gateway4": 1, "gateway4Manual": "example", "gateway6": 1, "gateway6Manual": "example", "hostVlan": 1, "mtu": 1, "network4": 1, "network4Manual": "example", "network6": 1, "network6Manual": "example", "portPolicies": { "additionalProperty": { "mode": "example", "taggedVlans": [ 1 ], "untaggedVlan": 1 } }, "ports": [ "example" ], "private": true, "slaac": true, "vlan": 1, "vlanFiltering": true}Responses
Section titled “Responses”Success
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Unauthorized
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Forbidden
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Not Found
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Conflict
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Request Entity Too Large
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}