startSiteLocateDevice
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.
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
Request body for locating a switch or virtual chassis member by MAC address for a limited duration
Minutes the leds should keep flashing
1 <= value <= 1205For virtual chassis, the MAC of the member
Response Body
curl -X POST "https://example.com/api/v1/sites/000000ab-00ab-00ab-00ab-0000000000ab/devices/000000ab-00ab-00ab-00ab-0000000000ab/locate" \ -H "Content-Type: application/json" \ -d '{}'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 \"}}" } ... ```
stopSiteLocateDevice POST
Stop Locate a Device