List network switches
const url = 'https://sylve.lan:8181/api/network/switch';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://sylve.lan:8181/api/network/switch \ --header 'Authorization: <Authorization>'List all configured standard and manual network switches. Manual switches include live VLAN-state availability and an observation error without failing the whole list.
Authorizations
Section titled “Authorizations”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
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
Examplegenerated
{ "data": { "manual": [ { "bridge": "example", "createdAt": "example", "defaultAccessVlan": 1, "id": 1, "name": "example", "updatedAt": "example", "vlanFiltering": true, "vlanStateAvailable": true, "vlanStateError": "example" } ], "standard": [ { "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", "usedBy": [ { "id": 1, "name": "example", "type": "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", "usedBy": [ { "id": 1, "name": "example", "type": "example" } ] }, "addresses": [ { "cidr": "example", "family": 1, "id": 1, "object": { "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", "usedBy": [ { "id": 1, "name": "example", "type": "example" } ] }, "objectId": 1, "ordering": 1, "switchId": 1 } ], "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", "usedBy": [ { "id": 1, "name": "example", "type": "example" } ] }, "bridgeMacObjectId": 1, "bridgeMacSourcePort": "example", "bridgeName": "example", "createdAt": "example", "defaultAccessVlan": 1, "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", "usedBy": [ { "id": 1, "name": "example", "type": "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", "usedBy": [ { "id": 1, "name": "example", "type": "example" } ] }, "gatewayManual": "example", "hostVlan": 1, "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", "usedBy": [ { "id": 1, "name": "example", "type": "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", "usedBy": [ { "id": 1, "name": "example", "type": "example" } ] }, "ports": [ { "id": 1, "name": "example", "switch": {}, "switchId": 1, "vlanPolicy": { "mode": "example", "taggedVlans": [ 1 ], "untaggedVlan": 1 } } ], "private": true, "slaac": true, "updatedAt": "example", "vlan": 1, "vlanFiltering": true } ] }, "error": "example", "message": "example", "status": "example"}Unauthorized
object
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
object
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}