Juniper Mist AI Orgs Stats - Tunnels API
API Calls to retrieve statistics about the Mist Tunnels at the Org level
API Calls to retrieve statistics about the Mist Tunnels at the Org level
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/mist-ai-orgs-stats-tunnels-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
contact:
email: tmunzer@juniper.net
name: Thomas Munzer
description: '> Version: **2604.1.1**
>
> Date: **May 13, 2026**
<div class="notification"> NOTE:<br>Some important API changes will be introduced. Please make sure to read the <a href="https://www.juniper.net/documentation/us/en/software/mist/api/http/guides/important-api-changes">announcements</a> </div>
---
## 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 Orgs Stats - Tunnels 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 Mist Tunnels at the Org level
name: Orgs Stats - Tunnels
paths:
/api/v1/orgs/{org_id}/stats/tunnels/count:
parameters:
- $ref: '#/components/parameters/org_id'
get:
description: Count by Distinct Attributes of Mist Tunnels Stats
operationId: countOrgTunnelsStats
parameters:
- description: "- If `type`==`wxtunnel`: wxtunnel_id / ap / remote_ip / remote_port / state / mxedge_id / mxcluster_id / site_id / peer_mxedge_id; default is wxtunnel_id \n- If `type`==`wan`: mac / site_id / node / peer_ip / peer_host/ ip / tunnel_name / protocol / auth_algo / encrypt_algo / ike_version / last_event / up"
in: query
name: distinct
schema:
$ref: '#/components/schemas/org_tunnel_count_distinct'
- in: query
name: type
schema:
$ref: '#/components/schemas/org_tunnel_type_count'
- $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: countOrgTunnelsStats
tags:
- Orgs Stats - Tunnels
/api/v1/orgs/{org_id}/stats/tunnels/search:
parameters:
- $ref: '#/components/parameters/org_id'
get:
description: 'By default the endpoint returns only `wxtunnel` type stats, to get `wan` type stats
you need to specify `type=wan` in the query parameters.
Tunnel types:
- `wxtunnel` (default) - A WxLan Tunnel (WxTunnel) are used to create a secure connection between Juniper Mist Access Points and third-party VPN concentrators using protocols such as L2TPv3 or dmvpn.
- `wan` - A WAN Tunnel is a secure connection between two Gateways, typically used for site-to-site or mesh connectivity. It can be configured with various protocols and encryption methods.
If `type` is not specified or `type`==`wxtunnel`, the following parameters are supported:
- `mxcluster_id` - the MX cluster ID
- `site_id` - the site ID
- `wxtunnel_id` - the WX tunnel ID
- `ap` - the AP MAC address
If `type`==`wan`, the following parameters are supported:
- `mac` - the MAC address of the WAN device
- `node` - the node ID
- `peer_ip` - the peer IP address
- `peer_host` - the peer host name
- `ip` - the IP address of the WAN device
- `tunnel_name` - the name of the tunnel
- `protocol` - the protocol used for the tunnel
- `auth_algo` - the authentication algorithm used for the tunnel
- `encrypt_algo` - the encryption algorithm used for the tunnel
- `ike_version` - the IKE version used for the tunnel
- `up` - the status of the tunnel (up or down)
'
operationId: searchOrgTunnelsStats
parameters:
- description: If `type`==`wxtunnel`
in: query
name: mxcluster_id
schema:
type: string
- in: query
name: site_id
schema:
type: string
- description: If `type`==`wxtunnel`
in: query
name: wxtunnel_id
schema:
type: string
- description: If `type`==`wxtunnel`
in: query
name: ap
schema:
type: string
- description: If `type`==`wan`
in: query
name: mac
schema:
type: string
- description: If `type`==`wan`
in: query
name: node
schema:
type: string
- description: If `type`==`wan`
in: query
name: peer_ip
schema:
type: string
- description: If `type`==`wan`
in: query
name: peer_host
schema:
type: string
- description: If `type`==`wan`
in: query
name: ip
schema:
type: string
- description: If `type`==`wan`
in: query
name: tunnel_name
schema:
type: string
- description: If `type`==`wan`
in: query
name: protocol
schema:
type: string
- description: If `type`==`wan`
in: query
name: auth_algo
schema:
type: string
- description: If `type`==`wan`
in: query
name: encrypt_algo
schema:
type: string
- description: If `type`==`wan`
in: query
name: ike_version
schema:
type: string
- description: If `type`==`wan`
in: query
name: up
schema:
type: string
- in: query
name: type
schema:
$ref: '#/components/schemas/tunnel_type'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/end'
- $ref: '#/components/parameters/duration_5m'
- $ref: '#/components/parameters/sort'
- $ref: '#/components/parameters/search_after'
responses:
'200':
$ref: '#/components/responses/TunnelsSearch'
'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: searchOrgTunnelsStats
tags:
- Orgs Stats - Tunnels
components:
responses:
TunnelsSearch:
content:
application/json:
examples:
Type Wan:
$ref: '#/components/examples/TunnelsSearchTypeWan'
Type Wxtunnel:
$ref: '#/components/examples/TunnelsSearchTypeWxtunnel'
schema:
$ref: '#/components/schemas/response_tunnel_search'
application/vnd.api+json:
examples:
Type Wan:
$ref: '#/components/examples/TunnelsSearchTypeWan'
Type Wxtunnel:
$ref: '#/components/examples/TunnelsSearchTypeWxtunnel'
schema:
$ref: '#/components/schemas/response_tunnel_search'
description: OK
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
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
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
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
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
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
schemas:
response_http403:
additionalProperties: false
properties:
detail:
examples:
- You do not have permission to perform this action.
type: string
type: object
org_id:
examples:
- a97c1b22-a4e9-411e-9bfd-d8695a0f9e61
format: uuid
readOnly: true
type: string
response_http400:
additionalProperties: false
properties:
detail:
examples:
- 'JSON parse error - Expecting value: line 5 column 8 (char 56)'
type: string
type: object
wan_tunnel_protocol:
description: 'enum: `gre`, `ipsec`'
enum:
- gre
- ipsec
type: string
fwupdate_stat:
additionalProperties: false
properties:
progress:
examples:
- 10
maximum: 100
minimum: 0
readOnly: true
type:
- integer
- 'null'
status:
$ref: '#/components/schemas/fwupdate_stat_status'
status_id:
examples:
- 5
readOnly: true
type:
- integer
- 'null'
timestamp:
$ref: '#/components/schemas/timestamp'
will_retry:
examples:
- false
readOnly: true
type:
- boolean
- 'null'
type: object
tunnel_type:
default: wxtunnel
description: 'enum: `wan`, `wxtunnel`'
enum:
- wan
- wxtunnel
type: string
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
org_tunnel_count_distinct:
default: wxtunnel_id
description: 'enum: `ap`, `auth_algo`, `encrypt_algo`, `ike_version`, `ip`, `last_event`, `mac`, `mxcluster_id`, `mxedge_id`, `node`, `peer_host`, `peer_ip`, `peer_mxedge_id`, `protocol`, `remote_ip`, `remote_port`, `site_id`, `state`, `tunnel_name`, `up`, `wxtunnel_id`'
enum:
- ap
- auth_algo
- encrypt_algo
- ike_version
- ip
- last_event
- mac
- mxcluster_id
- mxedge_id
- node
- peer_host
- peer_ip
- peer_mxedge_id
- protocol
- remote_ip
- remote_port
- site_id
- state
- tunnel_name
- up
- wxtunnel_id
type: string
tx_bytes:
description: Amount of traffic sent since connection
examples:
- 211217389682
format: int64
readOnly: true
type:
- integer
- 'null'
rx_pkts:
description: Amount of packets received since connection
examples:
- 57770567
format: int64
readOnly: true
type:
- integer
- 'null'
response_tunnel_search_item:
oneOf:
- $ref: '#/components/schemas/stats_mxtunnel'
- $ref: '#/components/schemas/stats_wan_tunnel'
fwupdate_stat_status:
description: 'enum: `inprogress`, `failed`, `upgraded`, `success`, `scheduled`, `error`'
enum:
- inprogress
- failed
- upgraded
- success
- scheduled
- error
readOnly: true
type:
- string
- 'null'
count_results:
items:
$ref: '#/components/schemas/count_result'
type: array
uniqueItems: true
timestamp:
description: Epoch (seconds)
format: double
readOnly: true
type: number
last_seen:
description: Last seen timestamp
examples:
- 1470417522
format: double
readOnly: true
type:
- number
- 'null'
count_result:
additionalProperties:
type: string
properties:
count:
type: integer
required:
- count
type: object
stats_mxtunnel_state:
description: 'enum: `established`, `established_with_sessions`, `idle`, `wait-ctrl-conn`, `wait-ctrl-reply`'
enum:
- established
- established_with_sessions
- idle
- wait-ctrl-conn
- wait-ctrl-reply
readOnly: true
type: string
stats_mxtunnel:
additionalProperties: false
description: MxTunnels statistics
properties:
ap:
readOnly: true
type: string
for_site:
readOnly: true
type: boolean
fwupdate:
$ref: '#/components/schemas/fwupdate_stat'
last_seen:
$ref: '#/components/schemas/last_seen'
mtu:
readOnly: true
type: integer
mxcluster_id:
format: uuid
readOnly: true
type: string
mxedge_id:
format: uuid
readOnly: true
type: string
mxtunnel_id:
format: uuid
readOnly: true
type: string
org_id:
$ref: '#/components/schemas/org_id'
peer_mxedge_id:
description: MxEdge ID of the peer(mist edge to mist edge tunnel)
format: uuid
readOnly: true
type: string
remote_ip:
readOnly: true
type: string
remote_port:
readOnly: true
type: integer
rx_control_pkts:
readOnly: true
type: integer
sessions:
$ref: '#/components/schemas/stats_mxtunnel_sessions'
site_id:
$ref: '#/components/schemas/site_id'
state:
$ref: '#/components/schemas/stats_mxtunnel_state'
tx_control_pkts:
readOnly: true
type: integer
uptime:
readOnly: true
type: integer
required:
- remote_ip
type: object
tx_pkts:
description: Amount of packets sent since connection
examples:
- 812204062
format: int64
readOnly: true
type:
- integer
- 'null'
stats_mxtunnel_session:
additionalProperties: false
properties:
local_sid:
description: Remote sessions id (dynamically unless Tunnel is said to be static)
type: integer
remote_id:
description: WxlanTunnel Remote ID
type: string
remote_sid:
description: Remote sessions id (dynamically unless Tunnel is said to be static)
type: integer
state:
type: string
required:
- local_sid
- remote_id
- remote_sid
- state
type: object
response_http404:
additionalProperties: false
properties:
id:
type: string
type: object
response_http401:
additionalProperties: false
properties:
detail:
examples:
- Authentication credentials were not provided.
type: string
type: object
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
site_id:
examples:
- 441a1214-6928-442a-8e92-e1d34b8ec6a6
format: uuid
readOnly: true
type: string
response_tunnel_search:
additionalProperties: false
properties:
end:
type: integer
limit:
type: integer
next:
type: string
results:
$ref: '#/components/schemas/response_tunnel_search_results'
start:
type: integer
total:
type: integer
required:
- end
- limit
- results
- start
- total
type: object
response_tunnel_search_results:
items:
$ref: '#/components/schemas/response_tunnel_search_item'
type: array
stats_wan_tunnel:
additionalProperties: false
properties:
auth_algo:
description: Authentication algorithm
type: string
encrypt_algo:
description: Encryption algorithm
type: string
ike_version:
description: IKE version
type: string
ip:
description: IP Address
type: string
last_event:
description: Reason of why the tunnel is down
type: string
mac:
description: Router mac address
type: string
node:
description: Node0/node1
type: string
org_id:
$ref: '#/components/schemas/org_id'
peer_host:
description: Peer host
type: string
peer_ip:
description: Peer ip address
type: string
priority:
$ref: '#/components/schemas/tunnel_priority'
protocol:
$ref: '#/components/schemas/wan_tunnel_protocol'
rx_bytes:
$ref: '#/components/schemas/rx_bytes'
rx_pkts:
$ref: '#/components/schemas/rx_pkts'
site_id:
$ref: '#/components/schemas/site_id'
tunnel_name:
description: Mist Tunnel Name
type: string
tx_bytes:
$ref: '#/components/schemas/tx_bytes'
tx_pkts:
$ref: '#/components/schemas/tx_pkts'
up:
type: boolean
uptime:
description: Duration from first (or last) SA was established
type: integer
wan_name:
description: WAN interface name
examples:
- wan
type: string
required:
- peer_ip
type: object
rx_bytes:
description: Amount of traffic received since connection
examples:
- 8515104416
format: int64
readOnly: true
type:
- integer
- 'null'
tunnel_priority:
description: 'enum: `primary`, `secondary`'
enum:
- primary
- secondary
type: string
stats_mxtunnel_sessions:
description: List of sessions
items:
$ref: '#/components/schemas/stats_mxtunnel_session'
readOnly: true
type: array
uniqueItems: true
org_tunnel_type_count:
default: wxtunnel
description: 'enum: `wan`, `wxtunnel`'
enum:
- wan
- wxtunnel
type: string
parameters:
start:
description: Start time (epoch timestamp in seconds, or relative string like "-1d", "-1w")
in: query
name: start
schema:
type: string
duration_5m:
description: Duration like 7d, 2w
in: query
name: duration
schema:
default: 5m
examples:
- 10m
type: string
end:
description: End time (epoch timestamp in seconds, or relative string like "-1d", "-2h", "now")
in: query
name: end
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
org_id:
in: path
name: org_id
required: true
schema:
examples:
- 000000ab-00ab-00ab-00ab-0000000000ab
format: uuid
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
limit:
in: query
name: limit
schema:
default: 100
minimum: 0
type: integer
examples:
TunnelsSearchTypeWxtunnel:
value:
end: 1531862583
limit: 10
results:
- ap: 5c5b35000010
last_seen: 1547437078
mxcluster_id: 572586b7-f97b-a22b-526c-8b97a3f609c4
mxedge_id: 387804a7-3474-85ce-15a2-f9a9684c9c90
mxtunnel_id: 7dae216d-7c98-a51b-e068-dd7d477b7216
org_id: 2818e386-8dec-2562-9ede-5b8a0fbbdc71
peer_mxedge_id: 09320a5c-bc23-441e-80a0-b96c632d45f5
remote_ip: 172.16.1.2
remote_port: 13535
rx_control_pkts: 7571
sessions:
- local_sid: 31
remote_id: mxtunnel
remote_sid: 13
state: established
site_id: 4ac1dcf4-9d8b-7211-65c4-057819f0862b
state: established_with_sessions
tx_control_pkts: 14862
uptime: 135
start: 1531776183
total: 1
HTTP400Example:
value:
detail: 'JSON parse error - Expecting value: line 5 column 8 (char 56)'
HTTP429Example:
value:
detail: Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold
TunnelsSearchTypeWan:
value:
end: 1531862583
limit: 10
results:
- auth_algo: hmac-md5-96
encrypt_algo: aes-256-cbc
ike_version: '2'
ip: 192.168.233.0
last_event: down reason
mac: 020001ae9dd5
node: node0
org_id: 78c11da8-f984-4425-bedb-a7ddd7d0f6da
peer_host: sunnyvale1-vpn.zscalerbeta.net
peer_ip: 10.224.8.16
protocol: ipsec
rx_bytes: 150
rx_pkts: 75
site_id: e83e7928-eda1-4e93-82db-df3dd42ab726
tunnel_name: Device-ipsec-1
tx_bytes: 100
tx_pkts: 50
up: true
uptime: 10
wan_name: wan
start: 1531776183
total: 1
HTTP403Example:
value:
detail: You do not have permission to perform this action.
HTTP401Example:
value:
detail: Authentication credentials were not provided.
CountExample:
value:
distinct: string
end: 0
limit: 0
results:
- count: 0
property: string
start: 0
total: 0
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