showSiteDeviceForwardingTable
Get forwarding table from the Device. The output will be available through websocket. As there can be multiple commands issued against the same device at the same time and the output all goes through the same websocket stream, session is introduced for demux.
Subscribe to Device Command outputs
WS /api-ws/v1/stream
{ "subscribe": "/sites/{site_id}/devices/{device_id}/cmd"}Example output from ws stream
Mon 2024-05-20 16:47:30 UTC Retrieving fib entries… Entry Count: 3268 Capacity: 22668 ==================== ====== ======= ================== ===== ====================== =========== =========== ====== IP Prefix Port Proto Tenant VRF Service Next Hops Vector Cost ==================== ====== ======= ================== ===== ====================== =========== =========== ====== 0.0.0.0/0 0 None Old_Mgmt - internet-wan_and_lte 1-2.0 broadband 1 1-4.0 lte 10 branch1-Kiosk - internet-wan_and_lte 1-2.0 broadband 1 1-4.0 lte 10 branch1-MGT - internet-wan_and_lte 1-2.0 broadband 1 1-4.0 lte 10 3.1.1.0/24 0 None Old_Mgmt - internet-wan_and_lte 1-2.0 broadband 1 1-4.0 lte 10 branch1-Kiosk - internet-wan_and_lte 1-2.0 broadband 1 1-4.0 lte 10 branch1-MGT - internet-wan_and_lte 1-2.0 broadband 1 1-4.0 lte 10Preferred authentication method for automation and integrations. Send the API token in the HTTP Authorization header.
Format:
Authorization: Token {apitoken}
Notes:
- An API token generated for a specific admin has the same privileges as that admin
- An API token is automatically removed if it is not used for more than 90 days
- SSO admins cannot generate admin API tokens. Use organization API tokens when scoped Org/Site privileges are needed.
In: header
Path Parameters
uuiduuidRequest Body
application/json
All attributes are optional
Forwarding table lookup request for device command output
HA cluster node on which to show the forwarding table. enum: node0, node1.
Value in
- "node0"
- "node1"
IPv4 or IPv6 prefix filter for forwarding table entries
Only supported with SSR
Only supported with SSR
Only supported with SSR
Only supported with SSR
Only supported with SSR
Routing instance or VRF filter for forwarding table entries
Response Body
curl -X POST "https://example.com/api/v1/sites/000000ab-00ab-00ab-00ab-0000000000ab/devices/000000ab-00ab-00ab-00ab-0000000000ab/show_forwarding_table" \ -H "Content-Type: application/json" \ -d '{}'{ "session": "19e73828-937f-05e6-f709-e29efdb0a82b"}showSiteDeviceEvpnDatabase POST
Get EVPN Database from the Device. The output will be available through websocket.
showSiteDeviceMacTable POST
Get MAC Table from the Device. The output will be available through websocket. As there can be multiple commands issued against the same device at the same time and the output all goes through the same websocket stream, `session` is introduced for demux. #### Subscribe to Device Command outputs `WS /api-ws/v1/stream` ```json { "subscribe": "/sites/{site_id}/devices/{device_id}/cmd" ``` #### Example output from ws stream ```json { "event": "data", "channel": "/sites/d6fb4f96-xxxx-xxxx-xxxx-a8d7b85087ac/devices/00000000-0000-0000-1000-209339xxxxxx/cmd", "data": "{\"event\": \"data\", \"channel\": \"/sites/d6fb4f96-xxxx-xxxx-xxxx-a8d7b85087ac/devices/209339xxxxxx/cmd\", \"data\": {\"session\": \"eec2b6e4-1e63-4f9f-9cf8-ef7f9632861e\", \"raw\": \"\\nMAC flags (S - static MAC, D - dynamic MAC, L - locally learned, P - Persistent static, C - Control MAC\\n SE - statistics enabled, NM - non configured MAC, R - remote PE MAC, O - ovsdb MAC\\n GBP - group based policy, B - Blocked MAC)\\n\\n\\nE\"}}" } { "event": "data", "channel": "/sites/d6fb4f96-xxxx-xxxx-xxxx-a8d7b85087ac/devices/00000000-0000-0000-1000-209339xxxxxx/cmd", "data": "{\"event\": \"data\", \"channel\": \"/sites/d6fb4f96-xxxx-xxxx-xxxx-a8d7b85087ac/devices/209339xxxxxx/cmd\", \"data\": {\"session\": \"eec2b6e4-1e63-4f9f-9cf8-ef7f9632861e\", \"raw\": \"thernet switching table : 59 entries, 59 learned\\nRouting instance : default-switch\\n Vlan MAC MAC Age GBP Logical NH MAC RTR\\n name address flags \"}}" } { "event": "data", "channel": "/sites/d6fb4f96-xxxx-xxxx-xxxx-a8d7b85087ac/devices/00000000-0000-0000-1000-209339xxxxxx/cmd", "data": "{\"event\": \"data\", \"channel\": \"/sites/d6fb4f96-xxxx-xxxx-xxxx-a8d7b85087ac/devices/209339xxxxxx/cmd\", \"data\": {\"session\": \"eec2b6e4-1e63-4f9f-9cf8-ef7f9632861e\", \"raw\": \" Tag interface Index property ID\\n corp 00:50:56:87:4f:69 D - xe-0/1/3.0 0 0 \\n corp 00:50:56:87:ce:f5 D - x\"}}" } { "event": "data", "channel": "/sites/d6fb4f96-xxxx-xxxx-xxxx-a8d7b85087ac/devices/00000000-0000-0000-1000-209339xxxxxx/cmd", "data": "{\"event\": \"data\", \"channel\": \"/sites/d6fb4f96-xxxx-xxxx-xxxx-a8d7b85087ac/devices/209339xxxxxx/cmd\", \"data\": {\"session\": \"eec2b6e4-1e63-4f9f-9cf8-ef7f9632861e\", \"raw\": \"e-0/1/3.0 0 0 \\n corp 20:93:39:0f:62:00 D - xe-0/1/3.0 0 0 \\n ifo 00:50:56:87:2d:42 D - xe-0/1/3.0 \"}}" } ... ```