searchOrgTunnelsStats
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 IDsite_id- the site IDwxtunnel_id- the WX tunnel IDap- the AP MAC address
If type==wan, the following parameters are supported:
mac- the MAC address of the WAN devicenode- the node IDpeer_ip- the peer IP addresspeer_host- the peer host nameip- the IP address of the WAN devicetunnel_name- the name of the tunnelprotocol- the protocol used for the tunnelauth_algo- the authentication algorithm used for the tunnelencrypt_algo- the encryption algorithm used for the tunnelike_version- the IKE version used for the tunnelup- the status of the tunnel (up or down)
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
uuidQuery Parameters
Filter results by mxcluster id when type==wxtunnel
Filter results by site identifier
Filter results by wxtunnel id when type==wxtunnel
Filter results by AP MAC address when type==wxtunnel
Filter results by MAC address when type==wan
Filter results by node when type==wan
Filter results by peer ip when type==wan
Filter results by peer host when type==wan
Filter results by IP address when type==wan
Filter results by tunnel name when type==wan
Filter results by protocol when type==wan
Filter results by auth algo when type==wan
Filter results by encrypt algo when type==wan
Filter results by ike version when type==wan
Filter results by up when type==wan
Filter results by type. enum: wan, wxtunnel
"wxtunnel"Value in
- "wan"
- "wxtunnel"
Maximum number of results to return per page
0 <= value100Lower bound of the time range, as an epoch timestamp in seconds or a relative value such as -1d or -1w
Upper bound of the time range, as an epoch timestamp in seconds or a relative value such as -1d, -2h, or now
Time range duration for the query, using relative units such as 10m, 7d, or 2w
"5m"On which field the list should be sorted, -prefix represents DESC order
"timestamp"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.
Response Body
curl -X GET "https://example.com/api/v1/orgs/000000ab-00ab-00ab-00ab-0000000000ab/stats/tunnels/search"{ "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}