openapi: 3.1.0 info: contact: email: tmunzer@juniper.net name: Thomas Munzer description: '> Version: **2604.1.1** > > Date: **May 13, 2026**
NOTE:
Some important API changes will be introduced. Please make sure to read the announcements
--- ## Additional Documentation * [Mist Automation Guide](https://www.juniper.net/documentation/us/en/software/mist/automation-integration/index.html) * [Mist Location SDK](https://www.juniper.net/documentation/us/en/software/mist/location-services/topics/concept/mist-how-get-mist-sdk.html) * [Mist Product Updates](https://www.juniper.net/documentation/us/en/software/mist/product-updates/) ## Helpful Resources * [API Sandbox and Exercises](https://api-class.mist.com/) * [Postman Collection, Runners and Webhook Samples](https://www.postman.com/juniper-mist/workspace/mist-systems-s-public-workspace) * [Python Script Examples](https://github.com/tmunzer/mist_library) * [API Demo Apps](https://apps.mist-lab.fr/) * [Juniper Blog](https://blogs.juniper.net/) ## Mist Web Browser Extension: * Google Chrome, Microsoft Edge and other Chromium-based browser: [Chrome Web Store](https://chromewebstore.google.com/detail/mist-extension/ejhpdcljeamillfhdihkkmoakanpbplh) * Firefox: [Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/addon/mist-extension/) ---' license: name: MIT url: https://raw.githubusercontent.com/tmunzer/Mist-OAS3.0/main/LICENSE title: Mist Admins Sites Stats - Discovered Switches API version: 2604.1.1 x-logo: altText: Juniper-MistAI backgroundColor: '#FFFFFF' url: https://www.mist.com/wp-content/uploads/logo.png servers: - description: Mist Global 01 url: https://api.mist.com - description: Mist Global 02 url: https://api.gc1.mist.com - description: Mist Global 03 url: https://api.ac2.mist.com - description: Mist Global 04 url: https://api.gc2.mist.com - description: Mist Global 05 url: https://api.gc4.mist.com - description: Mist EMEA 01 url: https://api.eu.mist.com - description: Mist EMEA 02 url: https://api.gc3.mist.com - description: Mist EMEA 03 url: https://api.ac6.mist.com - description: Mist EMEA 04 url: https://api.gc6.mist.com - description: Mist APAC 01 url: https://api.ac5.mist.com - description: Mist APAC 02 url: https://api.gc5.mist.com - description: Mist APAC 03 url: https://api.gc7.mist.com security: - apiToken: [] - basicAuth: [] - basicAuth: [] csrfToken: [] tags: - description: API Calls to retrieve statistics about the Discovered Switches at the Site level name: Sites Stats - Discovered Switches paths: /api/v1/sites/{site_id}/stats/discovered_switch_metrics/search: parameters: - $ref: '#/components/parameters/site_id' get: description: Search Discovered Switch Metrics operationId: searchSiteDiscoveredSwitchesMetrics parameters: - description: Metric scope in: query name: scope schema: $ref: '#/components/schemas/discovered_switches_metric_scope' - description: Metric type in: query name: type schema: $ref: '#/components/schemas/discovered_switch_metric_type' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/start' - $ref: '#/components/parameters/end' - $ref: '#/components/parameters/duration' - $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/search_after' responses: '200': $ref: '#/components/responses/DiscoveredSwitchMetrics' '400': $ref: '#/components/responses/HTTP400' '401': $ref: '#/components/responses/HTTP401' '403': $ref: '#/components/responses/HTTP403' '404': $ref: '#/components/responses/HTTP404' '429': $ref: '#/components/responses/HTTP429' summary: searchSiteDiscoveredSwitchesMetrics tags: - Sites Stats - Discovered Switches /api/v1/sites/{site_id}/stats/discovered_switches/count: parameters: - $ref: '#/components/parameters/site_id' get: description: Count Discovered Switches operationId: countSiteDiscoveredSwitches parameters: - in: query name: distinct schema: $ref: '#/components/schemas/site_discovered_switches_count_distinct' - $ref: '#/components/parameters/start' - $ref: '#/components/parameters/end' - $ref: '#/components/parameters/duration' - $ref: '#/components/parameters/limit' responses: '200': $ref: '#/components/responses/Count' '400': $ref: '#/components/responses/HTTP400' '401': $ref: '#/components/responses/HTTP401' '403': $ref: '#/components/responses/HTTP403' '404': $ref: '#/components/responses/HTTP404' '429': $ref: '#/components/responses/HTTP429' summary: countSiteDiscoveredSwitches tags: - Sites Stats - Discovered Switches /api/v1/sites/{site_id}/stats/discovered_switches/metrics: parameters: - $ref: '#/components/parameters/site_id' get: description: Discovered switches related metrics, lists related switch system names & details if not compliant operationId: listSiteDiscoveredSwitchesMetrics parameters: - description: 'Configurable # ap per switch threshold, default 12' in: query name: threshold schema: examples: - '12' type: string - description: System name for switch level metrics, optional in: query name: system_name schema: examples: - switch1.example.com type: string responses: '200': $ref: '#/components/responses/DiscoveredSwitchesMetrics' '400': $ref: '#/components/responses/HTTP400' '401': $ref: '#/components/responses/HTTP401' '403': $ref: '#/components/responses/HTTP403' '404': $ref: '#/components/responses/HTTP404' '429': $ref: '#/components/responses/HTTP429' summary: listSiteDiscoveredSwitchesMetrics tags: - Sites Stats - Discovered Switches /api/v1/sites/{site_id}/stats/discovered_switches/search: parameters: - $ref: '#/components/parameters/site_id' get: description: Search Discovered Switches operationId: searchSiteDiscoveredSwitches parameters: - in: query name: adopted schema: examples: - true type: boolean - in: query name: system_name schema: examples: - switch1.example.com type: string - in: query name: hostname schema: examples: - switch1 type: string - in: query name: vendor schema: examples: - Cisco type: string - in: query name: model schema: examples: - WS-C3850-24P type: string - in: query name: version schema: examples: - 1.0.0 type: string - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/start' - $ref: '#/components/parameters/end' - $ref: '#/components/parameters/duration' - $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/search_after' responses: '200': $ref: '#/components/responses/DiscoveredSwitches' '400': $ref: '#/components/responses/HTTP400' '401': $ref: '#/components/responses/HTTP401' '403': $ref: '#/components/responses/HTTP403' '404': $ref: '#/components/responses/HTTP404' '429': $ref: '#/components/responses/HTTP429' summary: searchSiteDiscoveredSwitches tags: - Sites Stats - Discovered Switches components: examples: DiscoveredSwitchesExample: value: end: 1604496474.8978634 limit: 1000 results: - aps: - hostname: ap41nearlab inactive_wired_vlans: [] mac: 5c5b352e2001 poe_status: true when: 2019-06-13T19:53:16.870+0000 mgmt_addr: 10.1.1.1 model: EX2300-C-12P org_id: 6748cfa6-4e12-11e6-9188-0242ac110007 site_id: 67970e46-4e12-11e6-9188-0242ac110007 system_desc: 'Juniper Networks, Inc. ex2300-c-12p Ethernet Switch, kernel JUNOS 18.2R2.6, Build date: 2018-12-07 13:19:04 UTC Copyright (c) 1996-2018 Juniper Networks, Inc.' system_name: mist-lab-ex2300c timestamp: 1560457177.037 vendor: Juniper Networks version: 18.2R2.6 start: 1604410074.8978484 total: 1 CountExample: value: distinct: string end: 0 limit: 0 results: - count: 0 property: string start: 0 total: 0 DiscoveredSwitchMetricsExample: value: end: 1675193686.0191767 limit: 1 next: /api/v1/sites/f5fcbee5-fbca-45b3-8bf1-1619ede87879/stats/discovered_switch_metrics/search?end=1675193686.0191767&limit=1&search_after=%5B1675193400000%5D&start=1675107286.0191767 results: - org_id: 203d3d02-dbc0-4c1b-9f41-76896a3330f4 scope: site score: 100 site_id: f5fcbee5-fbca-45b3-8bf1-1619ede87879 timestamp: 1675193400 type: inactive_wired_vlans start: 1675107286.0191767 total: 3 DiscoveredSwitchesMetricsExample: value: inactive_wired_vlans: details: {} score: 100 poe_compliance: details: total_aps: 63 total_power: 981500 score: 100 switch_ap_affinity: details: system_name: - mist-lab-ex2300c - switch1 threshold: 12 score: 33.3333 version_compliance: details: major_versions: - major_count: 2 model: EX2300-C-12P system_names: - switch1 - mist-lab-ex2300c - major_count: 1 model: EX4300-48P system_names: [] total_switch_count: 5 score: 75 HTTP400Example: value: detail: 'JSON parse error - Expecting value: line 5 column 8 (char 56)' HTTP403Example: value: detail: You do not have permission to perform this action. HTTP429Example: value: detail: Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold HTTP401Example: value: detail: Authentication credentials were not provided. schemas: response_count: additionalProperties: false properties: distinct: type: string end: type: integer limit: type: integer results: $ref: '#/components/schemas/count_results' start: type: integer total: type: integer required: - distinct - end - limit - results - start - total type: object ap_redundancy: additionalProperties: false properties: modules: $ref: '#/components/schemas/ap_redundancy_modules' num_aps: examples: - 15 type: integer num_aps_with_switch_redundancy: examples: - 8 type: integer type: object discovered_switch_metric_aps: items: $ref: '#/components/schemas/discovered_switch_metric_ap' type: array strings: items: type: string type: array uniqueItems: true dswitches_metrics_switch_ap_affinity_details: additionalProperties: false properties: system_name: $ref: '#/components/schemas/strings' threshold: type: number required: - threshold - system_name type: object dswitches_metrics_poe_compliance_details: additionalProperties: false properties: total_aps: type: integer total_power: type: number required: - total_power - total_aps type: object response_discovered_switch_metrics: additionalProperties: false properties: end: type: number limit: type: integer next: type: string results: $ref: '#/components/schemas/response_discovered_switch_metrics_results' start: type: number total: type: integer required: - results - start - end - limit - total type: object discovered_switches_metric_scope: default: site description: 'enum: `site`, `switch`' enum: - site - switch type: string response_http403: additionalProperties: false properties: detail: examples: - You do not have permission to perform this action. type: string type: object dswitches_metrics_version_compliance: additionalProperties: false properties: details: $ref: '#/components/schemas/dswitches_metrics_version_compliance_details' score: type: number required: - score - details type: object dswitches_compliance_major_version: additionalProperties: false properties: major_count: type: number model: type: string system_names: $ref: '#/components/schemas/strings' required: - model - major_count type: object discovered_switch_metric: additionalProperties: false properties: adopted: type: boolean aps: $ref: '#/components/schemas/discovered_switch_metric_aps' chassis_id: $ref: '#/components/schemas/discovered_switch_metric_chassis_id' hostname: examples: - SW-HLAB-ea2e00 type: string mgmt_addr: examples: - 10.10.20.42 type: string model: type: string org_id: $ref: '#/components/schemas/org_id' scope: examples: - site type: string score: examples: - 100 type: integer site_id: $ref: '#/components/schemas/site_id' system_desc: examples: - 'Juniper Networks, Inc. ex4100-f-12p Ethernet Switch, kernel JUNOS 22.4R3.25, Build date: 2024-02-10 00:49:09 UTC Copyright (c) 1996-2024 Juniper Networks, Inc.' type: string system_name: examples: - SW-HLAB-ea2e00 type: string timestamp: $ref: '#/components/schemas/timestamp' type: examples: - inactive_wired_vlans type: string vendor: type: string version: type: string type: object site_discovered_switches_count_distinct: default: system_name description: 'enum: `mgmt_addr`, `model`, `system_name`, `version`' enum: - mgmt_addr - model - system_name - version type: string count_results: items: $ref: '#/components/schemas/count_result' type: array uniqueItems: true response_dswitches_metrics: additionalProperties: false properties: inactive_wired_vlans: $ref: '#/components/schemas/dswitches_metrics_inactive_wired_vlans' poe_compliance: $ref: '#/components/schemas/dswitches_metrics_poe_compliance' switch_ap_affinity: $ref: '#/components/schemas/dswitches_metrics_switch_ap_affinity' version_compliance: $ref: '#/components/schemas/dswitches_metrics_version_compliance' required: - version_compliance - switch_ap_affinity - inactive_wired_vlans - poe_compliance type: object dswitches_metrics_version_compliance_details: additionalProperties: false properties: major_versions: $ref: '#/components/schemas/dswitches_compliance_major_versions' total_switch_count: type: integer required: - major_versions - total_switch_count type: object count_result: additionalProperties: type: string properties: count: type: integer required: - count type: object discovered_switch: additionalProperties: false properties: adopted: type: boolean ap_redundancy: $ref: '#/components/schemas/ap_redundancy' aps: $ref: '#/components/schemas/discovered_switch_aps' chassis_id: $ref: '#/components/schemas/strings' for_site: readOnly: true type: boolean mgmt_addr: type: string model: type: string org_id: $ref: '#/components/schemas/org_id' site_id: $ref: '#/components/schemas/site_id' system_desc: type: string system_name: type: string timestamp: $ref: '#/components/schemas/timestamp' vendor: type: string version: type: string type: object discovered_switch_metric_type: description: 'enum: `inactive_wired_vlans`, `poe_compliance`, `switch_ap_affinity`, `version_compliance`' enum: - inactive_wired_vlans - poe_compliance - switch_ap_affinity - version_compliance type: string dswitches_compliance_major_versions: items: $ref: '#/components/schemas/dswitches_compliance_major_version' type: array uniqueItems: true site_id: examples: - 441a1214-6928-442a-8e92-e1d34b8ec6a6 format: uuid readOnly: true type: string response_http404: additionalProperties: false properties: id: type: string type: object timestamp: description: Epoch (seconds) format: double readOnly: true type: number ap_redundancy_module: additionalProperties: false properties: num_aps: examples: - 15 type: integer num_aps_with_switch_redundancy: examples: - 8 type: integer type: object response_discovered_switches_results: items: $ref: '#/components/schemas/discovered_switch' type: array uniqueItems: true discovered_switch_metric_chassis_id: items: type: string type: array response_http400: additionalProperties: false properties: detail: examples: - 'JSON parse error - Expecting value: line 5 column 8 (char 56)' type: string type: object dswitches_metrics_poe_compliance: additionalProperties: false properties: details: $ref: '#/components/schemas/dswitches_metrics_poe_compliance_details' score: type: number required: - score - details type: object discovered_switch_aps: items: $ref: '#/components/schemas/discovered_switch_ap' type: array uniqueItems: true response_discovered_switches: additionalProperties: false properties: end: type: number limit: type: integer next: type: string results: $ref: '#/components/schemas/response_discovered_switches_results' start: type: number total: type: integer required: - end - limit - results - start - total type: object integers: items: type: integer type: array response_http429: additionalProperties: false properties: detail: examples: - Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold type: string type: object discovered_switch_ap: additionalProperties: false properties: hostname: type: string inactive_wired_vlans: $ref: '#/components/schemas/integers' mac: type: string poe_status: type: boolean port: type: string port_id: type: string power_draw: type: number when: type: string type: object ap_redundancy_modules: additionalProperties: $ref: '#/components/schemas/ap_redundancy_module' description: Property key is the node id type: object dswitches_metrics_inactive_wired_vlans: additionalProperties: false properties: details: additionalProperties: true type: object score: type: number required: - score - details type: object discovered_switch_metric_ap: additionalProperties: false properties: hostname: type: string mac: type: string poe_status: type: boolean port: type: string port_id: type: string power_draw: type: integer when: type: string type: object dswitches_metrics_switch_ap_affinity: additionalProperties: false properties: details: $ref: '#/components/schemas/dswitches_metrics_switch_ap_affinity_details' score: type: number required: - score - details type: object response_discovered_switch_metrics_results: items: $ref: '#/components/schemas/discovered_switch_metric' type: array response_http401: additionalProperties: false properties: detail: examples: - Authentication credentials were not provided. type: string type: object org_id: examples: - a97c1b22-a4e9-411e-9bfd-d8695a0f9e61 format: uuid readOnly: true type: string responses: DiscoveredSwitchesMetrics: content: application/json: examples: Example: $ref: '#/components/examples/DiscoveredSwitchesMetricsExample' schema: $ref: '#/components/schemas/response_dswitches_metrics' application/vnd.api+json: examples: Example: $ref: '#/components/examples/DiscoveredSwitchesMetricsExample' schema: $ref: '#/components/schemas/response_dswitches_metrics' description: OK HTTP404: content: application/json: schema: $ref: '#/components/schemas/response_http404' application/vnd.api+json: schema: $ref: '#/components/schemas/response_http404' description: Not found. The API endpoint doesn’t exist or resource doesn’ t exist HTTP429: content: application/json: examples: Example: $ref: '#/components/examples/HTTP429Example' schema: $ref: '#/components/schemas/response_http429' application/vnd.api+json: examples: Example: $ref: '#/components/examples/HTTP429Example' schema: $ref: '#/components/schemas/response_http429' description: Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold HTTP403: content: application/json: examples: Example: $ref: '#/components/examples/HTTP403Example' schema: $ref: '#/components/schemas/response_http403' application/vnd.api+json: examples: Example: $ref: '#/components/examples/HTTP403Example' schema: $ref: '#/components/schemas/response_http403' description: Permission Denied DiscoveredSwitchMetrics: content: application/json: examples: Example: $ref: '#/components/examples/DiscoveredSwitchMetricsExample' schema: $ref: '#/components/schemas/response_discovered_switch_metrics' application/vnd.api+json: examples: Example: $ref: '#/components/examples/DiscoveredSwitchMetricsExample' schema: $ref: '#/components/schemas/response_discovered_switch_metrics' description: OK HTTP400: content: application/json: examples: Example: $ref: '#/components/examples/HTTP400Example' schema: $ref: '#/components/schemas/response_http400' application/vnd.api+json: examples: Example: $ref: '#/components/examples/HTTP400Example' schema: $ref: '#/components/schemas/response_http400' description: Bad Syntax HTTP401: content: application/json: examples: Example: $ref: '#/components/examples/HTTP401Example' schema: $ref: '#/components/schemas/response_http401' application/vnd.api+json: examples: Example: $ref: '#/components/examples/HTTP401Example' schema: $ref: '#/components/schemas/response_http401' description: Unauthorized Count: content: application/json: examples: Example: $ref: '#/components/examples/CountExample' schema: $ref: '#/components/schemas/response_count' application/vnd.api+json: examples: Example: $ref: '#/components/examples/CountExample' schema: $ref: '#/components/schemas/response_count' description: Result of Count DiscoveredSwitches: content: application/json: examples: Example: $ref: '#/components/examples/DiscoveredSwitchesExample' schema: $ref: '#/components/schemas/response_discovered_switches' application/vnd.api+json: examples: Example: $ref: '#/components/examples/DiscoveredSwitchesExample' schema: $ref: '#/components/schemas/response_discovered_switches' description: OK parameters: start: description: Start time (epoch timestamp in seconds, or relative string like "-1d", "-1w") in: query name: start schema: type: string sort: description: On which field the list should be sorted, -prefix represents DESC order in: query name: sort schema: default: timestamp examples: - -site_id type: string duration: description: Duration like 7d, 2w in: query name: duration schema: default: 1d examples: - 10m type: string search_after: description: Pagination cursor for retrieving subsequent pages of results. This value is automatically populated by Mist in the `next` URL from the previous response and should not be manually constructed. in: query name: search_after schema: type: string end: description: End time (epoch timestamp in seconds, or relative string like "-1d", "-2h", "now") in: query name: end schema: type: string site_id: in: path name: site_id required: true schema: examples: - 000000ab-00ab-00ab-00ab-0000000000ab format: uuid type: string limit: in: query name: limit schema: default: 100 minimum: 0 type: integer securitySchemes: apiToken: description: "Like many other API providers, it’s also possible to generate API Tokens to be used (in HTTP Header) for authentication. An API token ties to a Admin with equal or less privileges.\n\n**Format**:\n API Token value format is `Token {apitoken}`\n\n**Notes**:\n* an API token generated for a specific admin has the same privilege as the user\n* an API token will be automatically removed if not used for > 90 days\n* SSO admins cannot generate these API tokens. Refer Org level API tokens which can have privileges of a specific Org/Site for more information." in: header name: Authorization type: apiKey basicAuth: description: While our current UI uses Session / Cookie-based authentication, it’s also possible to do Basic Auth. scheme: basic type: http csrfToken: description: "This protects the website against [Cross Site Request Forgery](https://en.wikipedia.org/wiki/Cross-site_request_forgery), all the POST / PUT / DELETE APIs needs to have CSRF token in the AJAX Request header when using Login/Password authentication (with or without MFA)\n\n\nThe CSRF Token is sent back by Mist in the Cookies from the Login Response API Call:\n`cookies[csrftoken]` \n\nThe CSRF Token must be added in the HTTP Request Headers:\n```\nX-CSRFToken: vwvBuq9qkqaKh7lu8tNc0gkvBfEaLAmx\n```" in: header name: X-CSRFToken type: apiKey