countSiteSwOrGwPorts
Count switch and gateway port statistics for a site, optionally grouped by the distinct field and filtered by port, neighbor, PoE, STP, traffic, and time attributes. Use Count Org Switch/Gateway Ports to count switch and gateway port statistics across the organization.
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
Field used to group this count response. enum: full_duplex, mac, neighbor_mac, neighbor_port_desc, neighbor_system_name, poe_disabled, poe_mode, poe_on, port_id, port_mac, speed, up
"mac"Value in
- "full_duplex"
- "mac"
- "neighbor_mac"
- "neighbor_port_desc"
- "neighbor_system_name"
- "poe_disabled"
- "poe_mode"
- "poe_on"
- "port_id"
- "port_mac"
- "speed"
- "up"
Indicates full or half duplex
Filter results by MAC address
Chassis identifier of the chassis type listed
Description supplied by the system on the interface E.g. "GigabitEthernet2/0/39"
Name supplied by the system on the interface E.g. neighbor system name E.g. "Kumar-Acc-SW.mist.local"
Is the POE configured not be disabled.
POE mode depending on class E.g. "802.3at"
Is the device attached to POE
Filter results by port identifier
Filter results by port MAC address
Amount of power being used by the interface at the time the command is executed. Unit in watts.
Filter results by transmitted packet count
Filter results by received packet count
Filter results by received byte count
Filter results by transmit rate
Filter results by receive rate
Filter results by transmitted multicast packet count
Filter results by transmitted broadcast packet count
Filter results by received multicast packet count
Filter results by received broadcast packet count
Filter results by port speed
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 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"
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"
Indicates if interface is up
Lower 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
"1d"Maximum number of results to return per page
0 <= value100Response Body
curl -X GET "https://example.com/api/v1/sites/000000ab-00ab-00ab-00ab-0000000000ab/stats/ports/count"{ "distinct": "string", "end": 0, "limit": 0, "results": [ { "count": 0, "property": "string" } ], "start": 0, "total": 0}searchSiteOspfStats GET
Search OSPF peer statistics for a site with filters for device, VRF, peer IP, and time range. Use [Search Org OSPF Stats](/api/mist/orgs/orgs-stats/orgs-stats---ospf/searchOrgOspfStats) to search OSPF peer statistics across the organization.
searchSiteSwOrGwPorts GET
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](/api/mist/orgs/orgs-stats/orgs-stats---ports/searchOrgSwOrGwPorts) to search switch and gateway port statistics across the organization.