OrgsStatsTunnels

searchOrgTunnelsStats

GET
/api/v1/orgs/{org_id}/stats/tunnels/search

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)

Authorization

Authorization<token>

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

org_id*string
Formatuuid

Query Parameters

mxcluster_id?string

Filter results by mxcluster id when type==wxtunnel

site_id?string

Filter results by site identifier

wxtunnel_id?string

Filter results by wxtunnel id when type==wxtunnel

ap?string

Filter results by AP MAC address when type==wxtunnel

mac?string

Filter results by MAC address when type==wan

node?string

Filter results by node when type==wan

peer_ip?string

Filter results by peer ip when type==wan

peer_host?string

Filter results by peer host when type==wan

ip?string

Filter results by IP address when type==wan

tunnel_name?string

Filter results by tunnel name when type==wan

protocol?string

Filter results by protocol when type==wan

auth_algo?string

Filter results by auth algo when type==wan

encrypt_algo?string

Filter results by encrypt algo when type==wan

ike_version?string

Filter results by ike version when type==wan

up?string

Filter results by up when type==wan

type?string

Filter results by type. enum: wan, wxtunnel

Default"wxtunnel"

Value in

  • "wan"
  • "wxtunnel"
limit?integer

Maximum number of results to return per page

Range0 <= value
Default100
start?string

Lower bound of the time range, as an epoch timestamp in seconds or a relative value such as -1d or -1w

end?string

Upper bound of the time range, as an epoch timestamp in seconds or a relative value such as -1d, -2h, or now

duration?string

Time range duration for the query, using relative units such as 10m, 7d, or 2w

Default"5m"
sort?string

On which field the list should be sorted, -prefix represents DESC order

Default"timestamp"
search_after?string

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}