OrgsStatsPorts

searchOrgSwOrGwPorts

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

Search Switch / Gateway Ports Stats. Returns a list of switch/gateway ports stats that match the search criteria.

The response provide current/last port status and statistics within the hour. Traffic information (Tx/Rx) are cumulative counters since the last device reboot.

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

device_type?string

Type of device. enum: switch, gateway, all. Accepts multiple comma-separated values.

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. Accepts multiple comma-separated values.

neighbor_mac?string

Chassis identifier of the chassis type listed. Accepts multiple comma-separated values.

neighbor_port_desc?string

Description supplied by the system on the interface E.g. "GigabitEthernet2/0/39". Accepts multiple comma-separated values.

neighbor_system_name?string

Name supplied by the system on the interface E.g. neighbor system name E.g. "Kumar-Acc-SW.mist.local". Accepts multiple comma-separated values.

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. Accepts multiple comma-separated values.

port_mac?string

Filter results by port MAC address. Accepts multiple comma-separated values.

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/orgs/000000ab-00ab-00ab-00ab-0000000000ab/stats/ports/search?device_type=gateway%2Cswitch"
{  "end": 0,  "limit": 0,  "next": "string",  "results": [    {      "active": true,      "auth_state": "",      "disabled": true,      "for_site": true,      "full_duplex": true,      "jitter": 0,      "last_flapped": 0.1,      "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": "a97c1b22-a4e9-411e-9bfd-d8695a0f9e61",      "poe_disabled": true,      "poe_mode": "802.3af",      "poe_on": true,      "poe_priority": "low",      "port_id": "ge-0/0/0",      "port_mac": "5c4527a96580",      "port_usage": "lan",      "power_draw": 0,      "rx_bcast_pkts": 0,      "rx_bps": 60003,      "rx_bytes": 8515104416,      "rx_errors": 0,      "rx_mcast_pkts": 0,      "rx_pkts": 57770567,      "site_id": "441a1214-6928-442a-8e92-e1d34b8ec6a6",      "speed": 1000,      "stp_role": "",      "stp_state": "",      "tx_bcast_pkts": 0,      "tx_bps": 634301,      "tx_bytes": 211217389682,      "tx_errors": 0,      "tx_mcast_pkts": 0,      "tx_pkts": 812204062,      "type": "gateway",      "unconfigured": true,      "up": true,      "uplink": true,      "xcvr_model": "SFP+-10G-SR",      "xcvr_part_number": "740-021487",      "xcvr_serial": "N6AA9HT"    }  ],  "start": 0,  "total": 0}