Create a standard switch
POST
/network/switch/standard
const url = 'https://sylve.lan:8181/api/network/switch/standard';const options = { method: 'POST', 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"},"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,"name":"example","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 POST \ --url https://sylve.lan:8181/api/network/switch/standard \ --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" }, "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, "name": "example", "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 }'Create and apply a managed standard network switch, optionally using FreeBSD 15 per-member VLAN filtering. A filtered base bridge remains layer 2; an optional managed Host VLAN interface provides host addressing.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Create 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
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
name
required
string
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" }, "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, "name": "example", "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”Created
Media typeapplication/json
object
data
integer
error
string
message
string
status
string
Examplegenerated
{ "data": 1, "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"}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"}