countOrgSwOrGwPorts
GET https://{{host}}/api/v1/orgs/:org_id/stats/ports/count
Request
In addition to the filters
Name | Type | Description |
---|---|---|
distinct | string | portid, portmac, fullduplex, mac, neighbormac, neighborportdesc, neighborsystemname, poedisabled, poemode, poe_on, speed, up |
Supported FiltersName
Name | Type | Description |
---|---|---|
full_duplex | boolean | indicates full or half duplex |
mac | string | device identifier |
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 |
port_id | string | interface name |
port_mac | string | interface mac address |
power_draw | float | Amount of power being used by the interface at the time the command is executed. Unit in watts. |
tx_pkts | int | Output packets |
rx_pkts | int | Input packets |
tx_bytes | int | Output bytes |
rx_bytes | int | Input bytes |
tx_bps | int | Output rate |
rx_bps | int | Input rate |
tx_errors | int | Output errors |
rx_errors | int | Input errors |
tx_mcast_pkts | int | Multicast output packets |
tx_bcast_pkts | int | Broadcast output packets |
rx_mcast_pkts | int | Multicast input packets |
rx_bcast_pkts | int | Broadcast input packets |
speed | int | port speed |
mac_limit | int | Limit on number of dynamically learned macs |
mac_count | int | Number of mac addresses in the forwarding table |
up | boolean | indicates if interface is up |
stp_state | string | if up == true, forwarding / blocking / learning / listening / disabled |
stp_role | string | if up == true, designated / backup / alternate / root / root-prevented |
auth_state | string | if up == true && has Authenticator role, init / authenticated / authenticating / held |
E.g. /api/v1/sites/:siteid/stats/switchports/search?mac=001122334455
RESPONSES
status: OK
{"start":1511967600,"end":1513177200,"limit":100,"distinct":"mac","total":20,"results":[{"count":217,"mac":"112233445566"},{"count":35,"mac":"001122334455"}]}