Mist Sites Stats - Ports API

API Calls to retrieve statistics about the Wired Ports at the Site level

OpenAPI Specification

mist-sites-stats-ports-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  contact:
    email: tmunzer@juniper.net
    name: Thomas Munzer
  description: '> Version: **2606.1.1**

    >

    > Date: **July 10, 2026**

    <div class="notification"> NOTE:<br>Some important API changes will be introduced. Please make sure to read the <a href="https://www.juniper.net/documentation/us/en/software/mist/api/http/guides/important-api-changes">announcements</a> </div>


    ---

    ## Additional Documentation

    * [Mist Automation Guide](https://www.juniper.net/documentation/us/en/software/mist/automation-integration/index.html)

    * [Mist Location SDK](https://www.juniper.net/documentation/us/en/software/mist/location-services/topics/concept/mist-how-get-mist-sdk.html)

    * [Mist Product Updates](https://www.juniper.net/documentation/us/en/software/mist/product-updates/)


    ## Helpful Resources

    * [API Sandbox and Exercises](https://api-class.mist.com/)

    * [Postman Collection, Runners and Webhook Samples](https://www.postman.com/juniper-mist/workspace/mist-systems-s-public-workspace)

    * [Python Script Examples](https://github.com/tmunzer/mist_library)

    * [API Demo Apps](https://apps.mist-lab.fr/)

    * [Juniper Blog](https://blogs.juniper.net/)


    ## Mist Web Browser Extension:

    * Google Chrome, Microsoft Edge and other Chromium-based browser: [Chrome Web Store](https://chromewebstore.google.com/detail/mist-extension/ejhpdcljeamillfhdihkkmoakanpbplh)

    * Firefox: [Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/addon/mist-extension/)


    ---'
  license:
    name: MIT
    url: https://raw.githubusercontent.com/tmunzer/Mist-OAS3.0/main/LICENSE
  title: Mist Admins Sites Stats - Ports API
  version: 2606.1.1
  x-logo:
    altText: Juniper-MistAI
    backgroundColor: '#FFFFFF'
    url: https://www.mist.com/wp-content/uploads/logo.png
servers:
- description: Mist Global 01
  url: https://api.mist.com
- description: Mist Global 02
  url: https://api.gc1.mist.com
- description: Mist Global 03
  url: https://api.ac2.mist.com
- description: Mist Global 04
  url: https://api.gc2.mist.com
- description: Mist Global 05
  url: https://api.gc4.mist.com
- description: Mist EMEA 01
  url: https://api.eu.mist.com
- description: Mist EMEA 02
  url: https://api.gc3.mist.com
- description: Mist EMEA 03
  url: https://api.ac6.mist.com
- description: Mist EMEA 04
  url: https://api.gc6.mist.com
- description: Mist APAC 01
  url: https://api.ac5.mist.com
- description: Mist APAC 02
  url: https://api.gc5.mist.com
- description: Mist APAC 03
  url: https://api.gc7.mist.com
security:
- apiToken: []
- csrfToken: []
tags:
- description: API Calls to retrieve statistics about the Wired Ports at the Site level
  name: Sites Stats - Ports
paths:
  /api/v1/sites/{site_id}/stats/ports/count:
    parameters:
    - $ref: '#/components/parameters/site_id'
    get:
      description: 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](/#operations/countOrgSwOrGwPorts) to count switch and gateway port statistics across the organization.
      operationId: countSiteSwOrGwPorts
      parameters:
      - description: '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`'
        in: query
        name: distinct
        schema:
          $ref: '#/components/schemas/site_ports_count_distinct'
      - description: Indicates full or half duplex
        in: query
        name: full_duplex
        schema:
          examples:
          - true
          type: boolean
      - description: Filter results by MAC address
        in: query
        name: mac
        schema:
          examples:
          - 5c5b350e0410
          type: string
      - description: Chassis identifier of the chassis type listed
        in: query
        name: neighbor_mac
        schema:
          examples:
          - 5c5b350e0410
          type: string
      - description: Description supplied by the system on the interface E.g. "GigabitEthernet2/0/39"
        in: query
        name: neighbor_port_desc
        schema:
          examples:
          - ge-2/0/39
          type: string
      - description: Name supplied by the system on the interface E.g. neighbor system name E.g. "Kumar-Acc-SW.mist.local"
        in: query
        name: neighbor_system_name
        schema:
          examples:
          - Kumar-Acc-SW.mist.local
          type: string
      - description: Is the POE configured not be disabled.
        in: query
        name: poe_disabled
        schema:
          examples:
          - false
          type: boolean
      - description: POE mode depending on class E.g. "802.3at"
        in: query
        name: poe_mode
        schema:
          examples:
          - 802.3at
          type: string
      - description: Is the device attached to POE
        in: query
        name: poe_on
        schema:
          examples:
          - true
          type: boolean
      - description: Filter results by port identifier
        in: query
        name: port_id
        schema:
          examples:
          - ge-2/0/39
          type: string
      - description: Filter results by port MAC address
        in: query
        name: port_mac
        schema:
          examples:
          - 5c5b350e0410
          type: string
      - description: Amount of power being used by the interface at the time the command is executed. Unit in watts.
        in: query
        name: power_draw
        schema:
          examples:
          - 15.4
          type: number
      - description: Filter results by transmitted packet count
        in: query
        name: tx_pkts
        schema:
          examples:
          - 1000000
          type: integer
      - description: Filter results by received packet count
        in: query
        name: rx_pkts
        schema:
          examples:
          - 1000000
          type: integer
      - description: Filter results by received byte count
        in: query
        name: rx_bytes
        schema:
          examples:
          - 1000000
          type: integer
      - description: Filter results by transmit rate
        in: query
        name: tx_bps
        schema:
          examples:
          - 1000000
          type: integer
      - description: Filter results by receive rate
        in: query
        name: rx_bps
        schema:
          examples:
          - 1000000
          type: integer
      - description: Filter results by transmitted multicast packet count
        in: query
        name: tx_mcast_pkts
        schema:
          examples:
          - 1000000
          type: integer
      - description: Filter results by transmitted broadcast packet count
        in: query
        name: tx_bcast_pkts
        schema:
          examples:
          - 1000000
          type: integer
      - description: Filter results by received multicast packet count
        in: query
        name: rx_mcast_pkts
        schema:
          examples:
          - 1000000
          type: integer
      - description: Filter results by received broadcast packet count
        in: query
        name: rx_bcast_pkts
        schema:
          examples:
          - 1000000
          type: integer
      - description: Filter results by port speed
        in: query
        name: speed
        schema:
          examples:
          - 1000000000
          type: integer
      - description: 'STP state used to filter port results when `up`==`true`. enum: `""`, `blocking`, `disabled`, `forwarding`, `learning`, `listening`'
        in: query
        name: stp_state
        schema:
          $ref: '#/components/schemas/port_stp_state'
      - description: 'STP role used to filter port results when `up`==`true`. enum: `""`, `alternate`, `backup`, `designated`, `disabled`, `root`, `root-prevented`'
        in: query
        name: stp_role
        schema:
          $ref: '#/components/schemas/port_stp_role'
      - description: 'Authentication state used to filter port results when `up`==`true` and the port has an authenticator role. enum: `""`, `authenticated`, `authenticating`, `held`, `init`'
        in: query
        name: auth_state
        schema:
          $ref: '#/components/schemas/port_auth_state'
      - description: Indicates if interface is up
        in: query
        name: up
        schema:
          examples:
          - true
          type: boolean
      - $ref: '#/components/parameters/start'
      - $ref: '#/components/parameters/end'
      - $ref: '#/components/parameters/duration'
      - $ref: '#/components/parameters/limit'
      responses:
        '200':
          $ref: '#/components/responses/Count'
        '400':
          $ref: '#/components/responses/HTTP400'
        '401':
          $ref: '#/components/responses/HTTP401'
        '403':
          $ref: '#/components/responses/HTTP403'
        '404':
          $ref: '#/components/responses/HTTP404'
        '429':
          $ref: '#/components/responses/HTTP429'
      summary: countSiteSwOrGwPorts
      tags:
      - Sites Stats - Ports
  /api/v1/sites/{site_id}/stats/ports/search:
    parameters:
    - $ref: '#/components/parameters/site_id'
    get:
      description: '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](/#operations/searchOrgSwOrGwPorts) to search switch and gateway port statistics across the organization.'
      operationId: searchSiteSwOrGwPorts
      parameters:
      - description: 'Type of device. enum: `switch`, `gateway`, `all`'
        in: query
        name: device_type
        schema:
          $ref: '#/components/schemas/search_org_sw_or_gw_ports_type'
      - description: 'Authentication state used to filter port results when `up`==`true` and the port has an authenticator role. enum: `""`, `authenticated`, `authenticating`, `held`, `init`'
        in: query
        name: auth_state
        schema:
          $ref: '#/components/schemas/port_auth_state'
      - description: Indicates full or half duplex
        in: query
        name: full_duplex
        schema:
          type: boolean
      - description: LTE IMSI value, Check for null/empty
        in: query
        name: lte_imsi
        schema:
          examples:
          - '310260000000001'
          type: string
      - description: LTE ICCID value, Check for null/empty
        in: query
        name: lte_iccid
        schema:
          examples:
          - '89014103211118510720'
          type: string
      - description: LTE IMEI value, Check for null/empty
        in: query
        name: lte_imei
        schema:
          examples:
          - '123456789012345'
          type: string
      - description: Filter results by MAC address
        in: query
        name: mac
        schema:
          type: string
      - description: Chassis identifier of the chassis type listed
        in: query
        name: neighbor_mac
        schema:
          type: string
      - description: Description supplied by the system on the interface E.g. "GigabitEthernet2/0/39"
        in: query
        name: neighbor_port_desc
        schema:
          type: string
      - description: Name supplied by the system on the interface E.g. neighbor system name E.g. "Kumar-Acc-SW.mist.local"
        in: query
        name: neighbor_system_name
        schema:
          type: string
      - description: Is the POE configured not be disabled.
        in: query
        name: poe_disabled
        schema:
          type: boolean
      - description: POE mode depending on class E.g. "802.3at"
        in: query
        name: poe_mode
        schema:
          type: string
      - description: Is the device attached to POE
        in: query
        name: poe_on
        schema:
          type: boolean
      - description: 'PoE priority used to filter switch port results. enum: `low`, `high`'
        in: query
        name: poe_priority
        schema:
          $ref: '#/components/schemas/poe_priority'
      - description: Filter results by port identifier
        in: query
        name: port_id
        schema:
          type: string
      - description: Filter results by port MAC address
        in: query
        name: port_mac
        schema:
          type: string
      - description: Filter results by port speed
        in: query
        name: speed
        schema:
          type: integer
      - description: 'STP state used to filter port results when `up`==`true`. enum: `""`, `blocking`, `disabled`, `forwarding`, `learning`, `listening`'
        in: query
        name: stp_state
        schema:
          $ref: '#/components/schemas/port_stp_state'
      - description: 'STP role used to filter port results when `up`==`true`. enum: `""`, `alternate`, `backup`, `designated`, `disabled`, `root`, `root-prevented`'
        in: query
        name: stp_role
        schema:
          $ref: '#/components/schemas/port_stp_role'
      - description: Indicates if interface is up
        in: query
        name: up
        schema:
          type: boolean
      - description: Optic Slot Partnumber, Check for null/empty
        in: query
        name: xcvr_part_number
        schema:
          examples:
          - SFP-10G-SR
          type: string
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/sort'
      - $ref: '#/components/parameters/search_after'
      responses:
        '200':
          $ref: '#/components/responses/SwitchPortsSearch'
        '400':
          $ref: '#/components/responses/HTTP400'
        '401':
          $ref: '#/components/responses/HTTP401'
        '403':
          $ref: '#/components/responses/HTTP403'
        '404':
          $ref: '#/components/responses/HTTP404'
        '429':
          $ref: '#/components/responses/HTTP429'
      summary: searchSiteSwOrGwPorts
      tags:
      - Sites Stats - Ports
components:
  schemas:
    stats_switch_port_type:
      description: 'device type. enum: `ap`, `ble`, `gateway`, `mxedge`, `nac`, `switch`'
      enum:
      - ap
      - ble
      - gateway
      - mxedge
      - nac
      - switch
      examples:
      - gateway
      type: string
    poe_priority:
      description: 'PoE priority. enum: `low`, `high`'
      enum:
      - low
      - high
      type: string
    port_stp_role:
      description: 'Spanning Tree Protocol role for the port. enum: `""`, `alternate`, `backup`, `designated`, `disabled`, `root`, `root-prevented`'
      enum:
      - ''
      - alternate
      - backup
      - designated
      - disabled
      - root
      - root-prevented
      type: string
    site_ports_count_distinct:
      default: mac
      description: 'enum: `full_duplex`, `mac`, `neighbor_mac`, `neighbor_port_desc`, `neighbor_system_name`, `poe_disabled`, `poe_mode`, `poe_on`, `port_id`, `port_mac`, `speed`, `up`'
      enum:
      - full_duplex
      - mac
      - neighbor_mac
      - neighbor_port_desc
      - neighbor_system_name
      - poe_disabled
      - poe_mode
      - poe_on
      - port_id
      - port_mac
      - speed
      - up
      type: string
    search_org_sw_or_gw_ports_type:
      default: all
      description: 'enum: `switch`, `gateway`, `all`'
      enum:
      - switch
      - gateway
      - all
      type: string
    stats_switch_port:
      additionalProperties: false
      description: Switch port statistics record returned by stats APIs
      properties:
        active:
          description: Indicates if interface is active/inactive
          readOnly: true
          type: boolean
        auth_state:
          $ref: '#/components/schemas/port_auth_state'
          description: Authentication state of the port
        disabled:
          description: Indicates if interface is disabled
          readOnly: true
          type: boolean
        for_site:
          description: Whether the reporting device is scoped to a specific site
          readOnly: true
          type: boolean
        full_duplex:
          description: Indicates full or half duplex
          examples:
          - true
          type: boolean
        jitter:
          description: Last sampled jitter of the interface
          readOnly: true
          type: number
        last_flapped:
          description: Indicates when the port was last flapped
          format: double
          readOnly: true
          type: number
        latency:
          description: Last sampled latency of the interface
          readOnly: true
          type: number
        loss:
          description: Last sampled loss of the interface
          readOnly: true
          type: number
        lte_iccid:
          description: LTE ICCID value, Check for null/empty
          type:
          - string
          - 'null'
        lte_imei:
          description: LTE IMEI value, Check for null/empty
          type:
          - string
          - 'null'
        lte_imsi:
          description: LTE IMSI value, Check for null/empty
          type:
          - string
          - 'null'
        mac:
          description: Switch MAC address that reported these port statistics
          examples:
          - 5c4527a96580
          readOnly: true
          type: string
        mac_count:
          description: Number of MAC addresses in the forwarding table
          readOnly: true
          type: integer
        mac_limit:
          description: Limit on number of dynamically learned macs
          minimum: 0
          readOnly: true
          type: integer
        neighbor_mac:
          description: chassis identifier of the chassis type listed
          examples:
          - 64d814353400
          readOnly: true
          type: string
        neighbor_port_desc:
          description: Description supplied by the system on the interface E.g. "GigabitEthernet2/0/39"
          examples:
          - GigabitEthernet1/0/21
          readOnly: true
          type: string
        neighbor_system_name:
          description: Name supplied by the system on the interface E.g. neighbor system name E.g. "Kumar-Acc-SW.mist.local"
          examples:
          - CORP-D-SW-2
          readOnly: true
          type: string
        org_id:
          $ref: '#/components/schemas/org_id'
          description: Organization identifier of the reporting switch
        poe_disabled:
          description: Is the POE disabled
          readOnly: true
          type: boolean
        poe_mode:
          $ref: '#/components/schemas/stats_switch_port_poe_mode'
          description: PoE mode reported for the port
        poe_on:
          description: Is the device attached to POE
          readOnly: true
          type: boolean
        poe_priority:
          $ref: '#/components/schemas/poe_priority'
          description: PoE priority configured for the port
        port_id:
          description: Identifier of the port reporting these statistics
          examples:
          - ge-0/0/0
          readOnly: true
          type: string
        port_mac:
          description: MAC address assigned to the interface
          examples:
          - 5c4527a96580
          readOnly: true
          type: string
        port_usage:
          description: Logical usage assigned to the port
          examples:
          - lan
          type: string
        power_draw:
          description: Amount of power being used by the interface at the time the command is executed. Unit in watts.
          readOnly: true
          type: number
        rx_bcast_pkts:
          description: Number of broadcast packets received on the interface
          readOnly: true
          type: integer
        rx_bps:
          $ref: '#/components/schemas/rx_bps'
          description: Receive throughput of the port, in bits per second
        rx_bytes:
          $ref: '#/components/schemas/rx_bytes'
          description: Total bytes received on the port
        rx_errors:
          description: Number of receive errors observed on the interface
          readOnly: true
          type: integer
        rx_mcast_pkts:
          description: Number of multicast packets received on the interface
          readOnly: true
          type: integer
        rx_pkts:
          $ref: '#/components/schemas/rx_pkts'
          description: Total packets received on the port
        site_id:
          $ref: '#/components/schemas/site_id'
          description: Site identifier of the reporting switch
        speed:
          description: Current link speed of the port, in Mbps
          examples:
          - 1000
          readOnly: true
          type: integer
        stp_role:
          $ref: '#/components/schemas/port_stp_role'
          description: Current spanning tree role of the port
        stp_state:
          $ref: '#/components/schemas/port_stp_state'
          description: Current spanning tree state of the port
        tx_bcast_pkts:
          description: Number of broadcast packets transmitted on the interface
          readOnly: true
          type: integer
        tx_bps:
          $ref: '#/components/schemas/tx_bps'
          description: Transmit throughput of the port, in bits per second
        tx_bytes:
          $ref: '#/components/schemas/tx_bytes'
          description: Total bytes transmitted on the port
        tx_errors:
          description: Number of transmit errors observed on the interface
          readOnly: true
          type: integer
        tx_mcast_pkts:
          description: Number of multicast packets transmitted on the interface
          readOnly: true
          type: integer
        tx_pkts:
          $ref: '#/components/schemas/tx_pkts'
          description: Total packets transmitted on the port
        type:
          $ref: '#/components/schemas/stats_switch_port_type'
          description: Detected device category connected to the port, when available
        unconfigured:
          description: Indicates if interface is unconfigured
          readOnly: true
          type: boolean
        up:
          description: Indicates if interface is up
          readOnly: true
          type: boolean
        uplink:
          description: Indicates if interface is an uplink port
          readOnly: true
          type: boolean
        xcvr_model:
          description: Optic Slot ModelName, Check for null/empty
          examples:
          - SFP+-10G-SR
          readOnly: true
          type: string
        xcvr_part_number:
          description: Optic Slot Partnumber, Check for null/empty
          examples:
          - 740-021487
          readOnly: true
          type: string
        xcvr_serial:
          description: Optic Slot SerialNumber, Check for null/empty
          examples:
          - N6AA9HT
          readOnly: true
          type: string
      required:
      - mac
      - org_id
      - port_id
      - site_id
      type: object
    port_auth_state:
      description: 'Port authentication state. enum: `""`, `authenticated`, `authenticating`, `held`, `init`'
      enum:
      - ''
      - authenticated
      - authenticating
      - held
      - init
      type: string
    response_http429:
      additionalProperties: false
      description: Standard HTTP 429 rate limit error response
      properties:
        detail:
          description: Human-readable explanation of the rate limit error
          examples:
          - Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold
          type: string
      type: object
    org_id:
      description: Unique identifier of a Mist organization
      examples:
      - a97c1b22-a4e9-411e-9bfd-d8695a0f9e61
      format: uuid
      readOnly: true
      type: string
    response_http401:
      additionalProperties: false
      description: Standard HTTP 401 authentication error response
      properties:
        detail:
          description: Human-readable explanation of the authentication error
          examples:
          - Authentication credentials were not provided.
          type: string
      type: object
    tx_bps:
      description: Rate of transmitting traffic, bits/seconds, last known
      examples:
      - 634301
      format: int64
      readOnly: true
      type:
      - integer
      - 'null'
    response_http403:
      additionalProperties: false
      description: Standard HTTP 403 permission error response
      properties:
        detail:
          description: Human-readable explanation of the permission error
          examples:
          - You do not have permission to perform this action.
          type: string
      type: object
    stats_switch_port_poe_mode:
      description: 'enum: `802.3af`, `802.3at`, `802.3bt`'
      enum:
      - 802.3af
      - 802.3at
      - 802.3bt
      type: string
    response_switch_port_search:
      additionalProperties: false
      description: Paginated response for switch and gateway port statistics search results
      properties:
        end:
          description: Epoch timestamp, in seconds, for the end of the port statistics reporting window
          examples:
          - 1513177200
          type: integer
        limit:
          description: Maximum number of port statistics records returned in this page
          examples:
          - 10
          type: integer
        next:
          description: URL for retrieving the next page of switch and gateway port statistics results
          type: string
        results:
          $ref: '#/components/schemas/response_switch_port_search_results'
          description: Switch and gateway port statistics records matching the search filters
        start:
          description: Epoch timestamp, in seconds, for the start of the port statistics reporting window
          examples:
          - 1511967600
          type: integer
        total:
          description: Number of port statistics records matching the search filters across all pages
          examples:
          - 100
          type: integer
      required:
      - limit
      - total
      - results
      type: object
    count_results:
      description: List of count result rows
      items:
        $ref: '#/components/schemas/count_result'
      type: array
      uniqueItems: true
    response_http400:
      additionalProperties: false
      description: Standard HTTP 400 bad request error response
      properties:
        detail:
          description: Human-readable explanation of the bad request error
          examples:
          - 'JSON parse error - Expecting value: line 5 column 8 (char 56)'
          type: string
      type: object
    response_switch_port_search_results:
      description: Switch and gateway port statistics records returned by search
      items:
        $ref: '#/components/schemas/stats_switch_port'
      type: array
    tx_pkts:
      description: Amount of packets sent since connection
      examples:
      - 812204062
      format: int64
      readOnly: true
      type:
      - integer
      - 'null'
    count_result:
      additionalProperties:
        type: string
      description: Count result row with the matching distinct field values
      properties:
        count:
          description: Number of matching items for the distinct value or values in this result
          type: integer
      required:
      - count
      type: object
    response_count:
      additionalProperties: false
      description: Distinct count response for time-bounded search results
      properties:
        distinct:
          description: Field used to group the count results
          type: string
        end:
          description: Search window end timestamp for the count request, in epoch seconds
          type: integer
        limit:
          description: Maximum number of distinct count results requested
          type: integer
        results:
          $ref: '#/components/schemas/count_results'
          description: Count results grouped by the distinct field
        start:
          description: Search window start timestamp for the count request, in epoch seconds
          type: integer
        total:
          description: Number of distinct result buckets returned
          type: integer
      required:
      - distinct
      - end
      - limit
      - results
      - start
      - total
      type: object
    rx_bps:
      description: Rate of receiving traffic, bits/seconds, last known
      examples:
      - 60003
      format: int64
      readOnly: true
      type:
      - integer
      - 'null'
    site_id:
      description: Unique identifier of a Mist site
      examples:
      - 441a1214-6928-442a-8e92-e1d34b8ec6a6
      format: uuid
      readOnly: true
      type: string
    rx_pkts:
      description: Amount of packets received since connection
      examples:
      - 57770567
      format: int64
      readOnly: true
      type:
      - integer
      - 'null'
    rx_bytes:
      description: Amount of traffic received since connection
      examples:
      - 8515104416
      format: int64
      readOnly: true
      type:
      - integer
      - 'null'
    response_http404:
      additionalProperties: false
      description: Standard HTTP 404 not found error response
      properties:
        id:
          description: Missing resource identifier, when the API includes one
          type: string
      type: object
    tx_bytes:
      description: Amount of traffic sent since connection
      examples:
      - 211217389682
      format: int64
      readOnly: true
      type:
      - integer
      - 'null'
    port_stp_state:
      description: 'Spanning Tree Protocol state for the port. enum: `""`, `blocking`, `disabled`, `forwarding`, `learning`, `listening`'
      enum:
      - ''
      - blocking
      - disabled
      - forwarding
      - learning
      - listening
      type: string
  examples:
    SwitchPortsSearchExample:
      value:
        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
    CountExample:
      value:
        distinct: string
        end: 0
        limit: 0
        results:
        - count: 0
          property: string
        start: 0
        total: 0
    HTTP403Example:
      value:
        detail: You do not have permission to perform this action.
    HTTP400Example:
      value:
        detail: 'JSON parse error - Expecting value: line 5 column 8 (char 56)'
    HTTP429Example:
      value:
        detail: Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold
    HTTP401Example:
      value:
        detail: Authentication credentials were not provided.
  responses:
    Count:
      content:
        application/json:
          examples:
            Example:
              $ref: '#/components/examples/CountExample'
          schema:
            $ref: '#/components/schemas/response_count'
        application/vnd.api+json:
          examples:
            Example:
              $ref: '#/components/examples/CountExample'
          schema:
            $ref: '#/components/schemas/res

# --- truncated at 32 KB (37 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/mist/refs/heads/main/openapi/mist-sites-stats-ports-api-openapi.yml