SitesStatsPorts

searchSiteSwOrGwPorts

GET
/api/v1/sites/{site_id}/stats/ports/search

Search switch and gateway port statistics for a site. Returns ports that match the search criteria, including current or most recent port status and statistics within the hour.

Traffic information (Tx/Rx) is reported as cumulative counters since the last device reboot. Use Search Org Switch/Gateway Ports to search switch and gateway port statistics across the organization.

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

site_id*string
Formatuuid

Query Parameters

device_type?string

Type of device. enum: switch, gateway, all

Default"all"

Value in

  • "switch"
  • "gateway"
  • "all"
auth_state?string

Authentication state used to filter port results when up==true and the port has an authenticator role. enum: "", authenticated, authenticating, held, init

Value in

  • ""
  • "authenticated"
  • "authenticating"
  • "held"
  • "init"
full_duplex?boolean

Indicates full or half duplex

lte_imsi?string

LTE IMSI value, Check for null/empty

lte_iccid?string

LTE ICCID value, Check for null/empty

lte_imei?string

LTE IMEI value, Check for null/empty

mac?string

Filter results by MAC address

neighbor_mac?string

Chassis identifier of the chassis type listed

neighbor_port_desc?string

Description supplied by the system on the interface E.g. "GigabitEthernet2/0/39"

neighbor_system_name?string

Name supplied by the system on the interface E.g. neighbor system name E.g. "Kumar-Acc-SW.mist.local"

poe_disabled?boolean

Is the POE configured not be disabled.

poe_mode?string

POE mode depending on class E.g. "802.3at"

poe_on?boolean

Is the device attached to POE

poe_priority?string

PoE priority used to filter switch port results. enum: low, high

Value in

  • "low"
  • "high"
port_id?string

Filter results by port identifier

port_mac?string

Filter results by port MAC address

speed?integer

Filter results by port speed

stp_state?string

STP state used to filter port results when up==true. enum: "", blocking, disabled, forwarding, learning, listening

Value in

  • ""
  • "blocking"
  • "disabled"
  • "forwarding"
  • "learning"
  • "listening"
stp_role?string

STP role used to filter port results when up==true. enum: "", alternate, backup, designated, disabled, root, root-prevented

Value in

  • ""
  • "alternate"
  • "backup"
  • "designated"
  • "disabled"
  • "root"
  • "root-prevented"
up?boolean

Indicates if interface is up

xcvr_part_number?string

Optic Slot Partnumber, Check for null/empty

limit?integer

Maximum number of results to return per page

Range0 <= value
Default100
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/sites/000000ab-00ab-00ab-00ab-0000000000ab/stats/ports/search"
{  "end": 1513177200,  "limit": 10,  "results": [    {      "active": true,      "auth_state": "init",      "for_site": true,      "full_duplex": true,      "jitter": 0,      "latency": 0,      "loss": 0,      "lte_iccid": "string",      "lte_imei": "string",      "lte_imsi": "string",      "mac": "5c4527a96580",      "mac_count": 0,      "mac_limit": 0,      "neighbor_mac": "64d814353400",      "neighbor_port_desc": "GigabitEthernet1/0/21",      "neighbor_system_name": "CORP-D-SW-2",      "org_id": "c168ddee-c14c-11e5-8e81-1258369c38a9",      "poe_disabled": true,      "poe_mode": "802.3af",      "poe_on": true,      "port_id": "ge-0/0/0",      "port_mac": "5c4527a96580",      "port_usage": "lan",      "power_draw": 0,      "rx_bcast_pkts": 0,      "rx_bps": 0,      "rx_bytes": 4563443626,      "rx_errors": 0,      "rx_mcast_pkts": 0,      "rx_pkts": 0,      "site_id": "c1698122-c14c-11e5-8e81-1258369c38a9",      "speed": 1000,      "stp_role": "designated",      "stp_state": "forwarding",      "tx_bcast_pkts": 0,      "tx_bps": 0,      "tx_bytes": 11299516780,      "tx_errors": 0,      "tx_mcast_pkts": 0,      "tx_pkts": 492176,      "type": "gateway",      "up": true,      "xcvr_part_number": "string"    }  ],  "start": 1511967600,  "total": 100}