Update a jail network
const url = 'https://sylve.lan:8181/api/jail/1/networks/1';const options = { method: 'PATCH', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"defaultGateway":true,"dhcp":true,"ip4":1,"ip4Raw":"example","ip4gw":1,"ip4gwRaw":"example","ip6":1,"ip6Raw":"example","ip6gw":1,"ip6gwRaw":"example","macId":1,"macRaw":"example","name":"example","slaac":true,"switchName":"example","vlanPolicy":{"mode":"example","taggedVlans":[1],"untaggedVlan":1}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://sylve.lan:8181/api/jail/1/networks/1 \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "defaultGateway": true, "dhcp": true, "ip4": 1, "ip4Raw": "example", "ip4gw": 1, "ip4gwRaw": "example", "ip6": 1, "ip6Raw": "example", "ip6gw": 1, "ip6gwRaw": "example", "macId": 1, "macRaw": "example", "name": "example", "slaac": true, "switchName": "example", "vlanPolicy": { "mode": "example", "taggedVlans": [ 1 ], "untaggedVlan": 1 } }'Partially update a network attachment belonging to an inactive jail. Omitted fields are preserved, and a filtered switch requires an explicit access or trunk VLAN policy.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Jail CTID
Network attachment ID
Request Body
Section titled “Request Body”Network update request
object
object
Examplegenerated
{ "defaultGateway": true, "dhcp": true, "ip4": 1, "ip4Raw": "example", "ip4gw": 1, "ip4gwRaw": "example", "ip6": 1, "ip6Raw": "example", "ip6gw": 1, "ip6gwRaw": "example", "macId": 1, "macRaw": "example", "name": "example", "slaac": true, "switchName": "example", "vlanPolicy": { "mode": "example", "taggedVlans": [ 1 ], "untaggedVlan": 1 }}Responses
Section titled “Responses”Success
object
object
object
object
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
object
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
DefaultRoute owns the IPv4 default route for static or DHCP addressing.
DefaultRoute6 owns the IPv6 default route for static or SLAAC addressing.
DisableBridgeOffloads keeps FreeBSD from changing bridge-member capabilities as transient tap and epair interfaces come and go. Sorts flapping issues (Please tell @hayzam if you faced flapping before/after enabling this option).
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
object
IP, CIDR, port, country code, FQDN, etc.
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
object
object
Example
{ "data": { "attachment": { "kind": "vm" } }}Bad Request
object
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Unauthorized
object
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Forbidden
object
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Not Found
object
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Conflict
object
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Request Entity Too Large
object
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
object
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Service Unavailable
object
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}