{ "opencollection": "1.0.0", "info": { "name": "Mist Admins Utilities Common API", "version": "2604.1.1" }, "request": { "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "items": [ { "info": { "name": "Utilities Common", "type": "folder" }, "items": [ { "info": { "name": "restartSiteMultipleDevices", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/restart", "params": [ { "name": "site_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Note that only the devices that are connected will be restarted." }, { "info": { "name": "arpFromDevice", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/arp", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "ARP can be performed on the Device. The output will be available through websocket. As there can be multiple commands issued against the same AP at the same time and the output all goes through the same websocket stream, session is introduced for demux.\n\n\n#### Subscribe to Device Command outputs\n`WS /api-ws/v1/stream`\n\n```json\n{\n \"subscribe\": \"/sites/{site_id}/devices/{device_id}/cmd\"\n}\n```\n##### Example output from ws stream\n```json\n{ \n \"event\": \"data\", \n \"channel\": \"/sites/4ac1dcf4-9d8b-721" }, { "info": { "name": "bounceDevicePort", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/bounce_port", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Port Bounce can be performed from Switch/Gateway.\n\n **Note:** Ports starting with vme, ae, irb, and HA control ports (for SSR only) are not supported\n\nThe output will be available through websocket. As there can be multiple commands issued against the same AP at the same time and the output all goes through the same websocket stream, session is introduced for demux.\n\n#### Subscribe to Device Command outputs\n`WS /api-ws/v1/stream`\n\n```json\n{\n \"subscribe\": \"/sites/{site_id}/devices/{device_id}/" }, { "info": { "name": "clearSiteDeviceMacTable", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/clear_mac_table", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Clear MAC Table from the Device.\n\nThe 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.\n\n#### Subscribe to Device Command outputs\n`WS /api-ws/v1/stream`\n\n```json\n{\n \"subscribe\": \"/sites/{site_id}/devices/{device_id}/cmd\"\n}\n```\n" }, { "info": { "name": "clearSiteDevicePolicyHitCount", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/clear_policy_hit_count", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Clear application policy hit counts for the specified policy." }, { "info": { "name": "getSiteDeviceConfigCmd", "type": "http" }, "http": { "method": "GET", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/config_cmd", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" }, { "name": "sort", "value": "", "type": "query", "description": "Make output cmds sorted (for better readability) or not." } ] }, "docs": "Get Config CLI Commands\nFor a brown-field switch deployment where we adopted the switch through Adoption Command, we do not wipe out / overwrite the existing config automatically. Instead, we generate CLI commands that we would have generated. The user can inspect, modify, and incorporate this into their existing config manually.\n\nOnce they feel comfortable about the config we generate, they can enable allow_mist_config where we will take full control of their config like a claimed switch" }, { "info": { "name": "startSiteLocateDevice", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/locate", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "### Access Points\nLocate an Access Point by blinking it's LED.\nIt is a persisted state that has to be stopped by calling Stop Locating API\n\n### Switches\nLocate a Switch by blinking all port LEDs. \nBy default, request is sent to `master` switch and LEDs will keep flashing for 5 minutes.\nIn case of virtual chassis (VC) the desired member mac has to be passed in the request payload. \nAt anypoint, only one VC member can be requested to flash the LED. \nTo stop LED flashing before the duration ends /u" }, { "info": { "name": "monitorSiteDeviceTraffic", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/monitor_traffic", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Monitor traffic on switches and SRX.\n * JUNOS uses cmd \"monitor interface \" to monitor traffic on particular \n * JUNOS uses cmd \"monitor interface traffic\" to monitor traffic on all ports" }, { "info": { "name": "pingFromDevice", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/ping", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Ping from AP, Switch and SSR\n\nPing can be performed from the Device. The output will be available through websocket. As there can be multiple commands issued against the same AP at the same time and the output all goes through the same websocket stream, session is introduced for demux.\n\n#### Subscribe to Device Command outputs\n`WS /api-ws/v1/stream`\n\n```json\n{\n \"subscribe\": \"/sites/{site_id}/devices/{device_id}/cmd\"\n}\n```\n##### Example output from ws stream\n```json\n{\n \"event\": \"data\",\n " }, { "info": { "name": "readoptSiteOctermDevice", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/readopt", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ] }, "docs": "For the octerm devices, the device ID must come from fpc0. However, for a VC, the users may change the original fpc0 from CLI. To fix the issue, the readopt API could be used to trigger the readopt process so the device would get the correct device ID to connect the cloud." }, { "info": { "name": "releaseSiteDeviceDhcpLease", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/release_dhcp_leases", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Releases an active DHCP lease." }, { "info": { "name": "readoptSiteOctermDevice", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/reprovision", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ] }, "docs": "To force one device to reprovision itself again." }, { "info": { "name": "getSiteDeviceZtpPassword", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/request_ztp_password", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ] }, "docs": "In the case where something happens during/after ZTP, the root-password is modified (required for ZTP to set up outbound-ssh) but the user-defined password config has not be configured. This API can be used to retrieve the temporary password." }, { "info": { "name": "restartSiteDevice", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/restart", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Restart / Reboot a device" }, { "info": { "name": "createSiteDeviceShellSession", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/shell", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Create Shell Session" }, { "info": { "name": "showSiteDeviceBgpSummary", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/show_bgp_summary", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Get BGP Summary from SSR, SRX and Switch.\n\n\nThe 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.\n\n#### Subscribe to Device Command outputs\n`WS /api-ws/v1/stream`\n\n```json\n{\n \"subscribe\": \"/sites/{site_id}/devices/{device_id}/cmd\"\n\n}\n```\n\n##### Example output from ws stream\n```\nTue 2024-04-23 16:36:06 UTC\nRetrieving bgp entri" }, { "info": { "name": "showSiteDeviceDhcpLeases", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/show_dhcp_leases", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Shows DHCP leases" }, { "info": { "name": "showSiteDeviceDot1xTable", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/show_dot1x", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Get Dot1X Table from the Device.\n\nThe 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.\n\n#### Subscribe to Device Command outputs\n`WS /api-ws/v1/stream`\n\n```json\n{\n \"subscribe\": \"/sites/{site_id}/devices/{device_id}/cmd\"\n}\n```\n" }, { "info": { "name": "showSiteDeviceEvpnDatabase", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/show_evpn_database", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Get EVPN Database from the Device. The output will be available through websocket." }, { "info": { "name": "showSiteDeviceForwardingTable", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/show_forwarding_table", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "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.\n\n#### Subscribe to Device Command outputs\n`WS /api-ws/v1/stream`\n\n```json\n{\n \"subscribe\": \"/sites/{site_id}/devices/{device_id}/cmd\"\n}\n```\n\n##### Example output from ws stream\n```\nMon 2024-05-20 16:47:30 UTC Retrieving fib entries… Ent" }, { "info": { "name": "showSiteDeviceMacTable", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/show_mac_table", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Get MAC Table from the Device.\n\nThe 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.\n\n\n\n#### Subscribe to Device Command outputs\n\n`WS /api-ws/v1/stream`\n\n```json\n{\n \"subscribe\": \"/sites/{site_id}/devices/{device_id}/cmd\"\n```\n\n\n#### Example output from ws stream\n\n```json \n{\n \"event\": \"data\",\n \"channel\": \"/sites/d6fb4f96" }, { "info": { "name": "uploadSiteDeviceSupportFile", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/support", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Support / Upload device support files\n\n#### Info Param\n| Name | Type | Description |\n| --- | --- | --- |\n| process | string | Upload 1 file with output of show system processes extensive |\n| outbound-ssh | string | Upload 1 file that concatenates all /var/log/outbound-ssh.log* files |\n| messages | string | Upload 1 to 10 /var/log/messages* files |\n| core-dumps | string | Upload all core dump files, if any. Uploads for all members of VC on switches.|\n| full | string | Upload 1 file with output of" }, { "info": { "name": "tracerouteFromDevice", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/traceroute", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Traceroute can be performed from the Device.\n\nThe 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.\n\n\n#### Subscribe to Device Command outputs\n\n`WS /api-ws/v1/stream`\n\n```json\n{\n \"subscribe\": \"/sites/{site_id}/devices/{device_id}/cmd\"\n}\n```\n\n\n#### Example output from ws stream\n```json\n{\n \"channel\": \"/sites/d6fb4f96-xxxx-xxxx-x" }, { "info": { "name": "stopSiteLocateDevice", "type": "http" }, "http": { "method": "POST", "url": "https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/unlocate", "params": [ { "name": "site_id", "value": "", "type": "path" }, { "name": "device_id", "value": "", "type": "path" } ] }, "docs": "Stop Locate a Device" } ] } ], "bundled": true }