showSiteDeviceMacTable
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
{ "subscribe": "/sites/{site_id}/devices/{device_id}/cmd"Example output from ws stream
{ "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 \"}}"}...Preferred 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
MAC table lookup filters
Client MAC address filter for the MAC table lookup
Interface identifier filter for the MAC table lookup
VLAN identifier filter for the MAC table lookup
Response Body
curl -X POST "https://example.com/api/v1/sites/000000ab-00ab-00ab-00ab-0000000000ab/devices/000000ab-00ab-00ab-00ab-0000000000ab/show_mac_table" \ -H "Content-Type: application/json" \ -d '{}'{ "session": "19e73828-937f-05e6-f709-e29efdb0a82b"}showSiteDeviceForwardingTable POST
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` ```json { "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 10 ```
startSiteLocateDevice POST
### Access Points Locate an Access Point by blinking it's LED. It is a persisted state that has to be stopped by calling Stop Locating API ### Switches Locate a Switch by blinking all port LEDs. By default, request is sent to `master` switch and LEDs will keep flashing for 5 minutes. In case of virtual chassis (VC) the desired member mac has to be passed in the request payload. At anypoint, only one VC member can be requested to flash the LED. To stop LED flashing before the duration ends /unlocate API request can be made. If /unlocate API is not called LED will continue to flash on device for the given duration. Default duration is 5 minutes and 120 minutes is the maximum.