Update virtual machine network
const url = 'https://sylve.lan:8181/api/vm/1/networks/1';const options = { method: 'PATCH', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"emulation":"example","enable":true,"macId":1,"switchName":"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 https://sylve.lan:8181/api/vm/1/networks/1 \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "emulation": "example", "enable": true, "macId": 1, "switchName": "example" }'Partially update a network interface attached to a shut-off virtual machine
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Virtual Machine RID
Network Attachment ID
Request Body
Section titled “Request Body”Network changes
object
Examplegenerated
{ "emulation": "example", "enable": true, "macId": 1, "switchName": "example"}Responses
Section titled “Responses”Success
object
object
object
object
IP, CIDR, port, country code, FQDN, etc.
“”, “dhcp” for now
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.
“”, “dhcp” for now
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
IP, CIDR, port, country code, FQDN, etc.
“”, “dhcp” for now
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
IP, CIDR, port, country code, FQDN, etc.
“”, “dhcp” for now
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
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.
“”, “dhcp” for now
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
IP, CIDR, port, country code, FQDN, etc.
“”, “dhcp” for now
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
IP, CIDR, port, country code, FQDN, etc.
“”, “dhcp” for now
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
object
IP, CIDR, port, country code, FQDN, etc.
“”, “dhcp” for now
object
Deprecated mirror for resolved IP entries
“Host”, “Mac”, “Network”, “Port”, “Country”, “List”, “FQDN”, “DUID”
object
Examplegenerated
{ "data": { "emulation": "example", "enable": true, "id": 1, "mac": "example", "macId": 1, "macObj": { "autoUpdate": true, "createdAt": "example", "description": "example", "entries": [ { "createdAt": "example", "id": 1, "objectId": 1, "updatedAt": "example", "value": "example" } ], "id": 1, "isUsed": true, "isUsedBy": "example", "lastRefreshAt": "example", "lastRefreshError": "example", "name": "example", "refreshIntervalSeconds": 1, "resolutionChecksum": "example", "resolutions": [ { "createdAt": "example", "id": 1, "objectId": 1, "resolvedIp": "example", "resolvedValue": "example", "updatedAt": "example" } ], "sourceChecksum": "example", "type": "example", "updatedAt": "example" }, "manualSwitch": { "bridge": "example", "createdAt": "example", "id": 1, "name": "example", "updatedAt": "example" }, "standardSwitch": { "address": "example", "address6": "example", "address6Id": 1, "address6Obj": { "autoUpdate": true, "createdAt": "example", "description": "example", "entries": [ { "createdAt": "example", "id": 1, "objectId": 1, "updatedAt": "example", "value": "example" } ], "id": 1, "isUsed": true, "isUsedBy": "example", "lastRefreshAt": "example", "lastRefreshError": "example", "name": "example", "refreshIntervalSeconds": 1, "resolutionChecksum": "example", "resolutions": [ { "createdAt": "example", "id": 1, "objectId": 1, "resolvedIp": "example", "resolvedValue": "example", "updatedAt": "example" } ], "sourceChecksum": "example", "type": "example", "updatedAt": "example" }, "addressId": 1, "addressObj": { "autoUpdate": true, "createdAt": "example", "description": "example", "entries": [ { "createdAt": "example", "id": 1, "objectId": 1, "updatedAt": "example", "value": "example" } ], "id": 1, "isUsed": true, "isUsedBy": "example", "lastRefreshAt": "example", "lastRefreshError": "example", "name": "example", "refreshIntervalSeconds": 1, "resolutionChecksum": "example", "resolutions": [ { "createdAt": "example", "id": 1, "objectId": 1, "resolvedIp": "example", "resolvedValue": "example", "updatedAt": "example" } ], "sourceChecksum": "example", "type": "example", "updatedAt": "example" }, "bridgeMacMode": "example", "bridgeMacObject": { "autoUpdate": true, "createdAt": "example", "description": "example", "entries": [ { "createdAt": "example", "id": 1, "objectId": 1, "updatedAt": "example", "value": "example" } ], "id": 1, "isUsed": true, "isUsedBy": "example", "lastRefreshAt": "example", "lastRefreshError": "example", "name": "example", "refreshIntervalSeconds": 1, "resolutionChecksum": "example", "resolutions": [ { "createdAt": "example", "id": 1, "objectId": 1, "resolvedIp": "example", "resolvedValue": "example", "updatedAt": "example" } ], "sourceChecksum": "example", "type": "example", "updatedAt": "example" }, "bridgeMacObjectId": 1, "bridgeMacSourcePort": "example", "bridgeName": "example", "createdAt": "example", "defaultRoute": true, "defaultRoute6": true, "dhcp": true, "disableBridgeOffloads": true, "disableIPv6": true, "gateway6AddressId": 1, "gateway6AddressObj": { "autoUpdate": true, "createdAt": "example", "description": "example", "entries": [ { "createdAt": "example", "id": 1, "objectId": 1, "updatedAt": "example", "value": "example" } ], "id": 1, "isUsed": true, "isUsedBy": "example", "lastRefreshAt": "example", "lastRefreshError": "example", "name": "example", "refreshIntervalSeconds": 1, "resolutionChecksum": "example", "resolutions": [ { "createdAt": "example", "id": 1, "objectId": 1, "resolvedIp": "example", "resolvedValue": "example", "updatedAt": "example" } ], "sourceChecksum": "example", "type": "example", "updatedAt": "example" }, "gateway6Manual": "example", "gatewayAddressId": 1, "gatewayAddressObj": { "autoUpdate": true, "createdAt": "example", "description": "example", "entries": [ { "createdAt": "example", "id": 1, "objectId": 1, "updatedAt": "example", "value": "example" } ], "id": 1, "isUsed": true, "isUsedBy": "example", "lastRefreshAt": "example", "lastRefreshError": "example", "name": "example", "refreshIntervalSeconds": 1, "resolutionChecksum": "example", "resolutions": [ { "createdAt": "example", "id": 1, "objectId": 1, "resolvedIp": "example", "resolvedValue": "example", "updatedAt": "example" } ], "sourceChecksum": "example", "type": "example", "updatedAt": "example" }, "gatewayManual": "example", "id": 1, "mtu": 1, "name": "example", "network6Id": 1, "network6Manual": "example", "network6Obj": { "autoUpdate": true, "createdAt": "example", "description": "example", "entries": [ { "createdAt": "example", "id": 1, "objectId": 1, "updatedAt": "example", "value": "example" } ], "id": 1, "isUsed": true, "isUsedBy": "example", "lastRefreshAt": "example", "lastRefreshError": "example", "name": "example", "refreshIntervalSeconds": 1, "resolutionChecksum": "example", "resolutions": [ { "createdAt": "example", "id": 1, "objectId": 1, "resolvedIp": "example", "resolvedValue": "example", "updatedAt": "example" } ], "sourceChecksum": "example", "type": "example", "updatedAt": "example" }, "networkId": 1, "networkManual": "example", "networkObj": { "autoUpdate": true, "createdAt": "example", "description": "example", "entries": [ { "createdAt": "example", "id": 1, "objectId": 1, "updatedAt": "example", "value": "example" } ], "id": 1, "isUsed": true, "isUsedBy": "example", "lastRefreshAt": "example", "lastRefreshError": "example", "name": "example", "refreshIntervalSeconds": 1, "resolutionChecksum": "example", "resolutions": [ { "createdAt": "example", "id": 1, "objectId": 1, "resolvedIp": "example", "resolvedValue": "example", "updatedAt": "example" } ], "sourceChecksum": "example", "type": "example", "updatedAt": "example" }, "ports": [ { "id": 1, "name": "example", "switch": {}, "switchId": 1 } ], "private": true, "slaac": true, "updatedAt": "example", "vlan": 1 }, "switchId": 1, "switchType": "example", "vmId": 1 }, "error": "example", "message": "example", "status": "example"}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"}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"}