Cisco Meraki Switch API

The switch API from Cisco Meraki — 56 operation(s) for switch.

Operations 102

GET /devices/{serial}/switch/ports List the switch ports for a switch #
POST /devices/{serial}/switch/ports/cycle Cycle a set of switch ports on non-Catalyst MS devices #
GET /devices/{serial}/switch/ports/statuses Return the status for all the ports of a switch #
GET /devices/{serial}/switch/ports/statuses/packets Return the packet counters for all the ports of a switch #
GET /devices/{serial}/switch/ports/{portId} Return a switch port #
PUT /devices/{serial}/switch/ports/{portId} Update a switch port #
GET /devices/{serial}/switch/routing/interfaces List layer 3 interfaces for a switch #
POST /devices/{serial}/switch/routing/interfaces Create a layer 3 interface for a switch #
GET /devices/{serial}/switch/routing/interfaces/{interfaceId} Return a layer 3 interface for a switch #
PUT /devices/{serial}/switch/routing/interfaces/{interfaceId} Update a layer 3 interface for a switch #
DELETE /devices/{serial}/switch/routing/interfaces/{interfaceId} Delete a layer 3 interface from the switch #
GET /devices/{serial}/switch/routing/interfaces/{interfaceId}/dhcp Return a layer 3 interface DHCP configuration for a switch #
PUT /devices/{serial}/switch/routing/interfaces/{interfaceId}/dhcp Update a layer 3 interface DHCP configuration for a switch #
GET /devices/{serial}/switch/routing/staticRoutes List layer 3 static routes for a switch #
POST /devices/{serial}/switch/routing/staticRoutes Create a layer 3 static route for a switch #
GET /devices/{serial}/switch/routing/staticRoutes/{staticRouteId} Return a layer 3 static route for a switch #
PUT /devices/{serial}/switch/routing/staticRoutes/{staticRouteId} Update a layer 3 static route for a switch #
DELETE /devices/{serial}/switch/routing/staticRoutes/{staticRouteId} Delete a layer 3 static route for a switch #
GET /devices/{serial}/switch/warmSpare Return warm spare configuration for a switch #
PUT /devices/{serial}/switch/warmSpare Update warm spare configuration for a switch #
GET /networks/{networkId}/switch/accessControlLists Return the access control lists for a MS network #
PUT /networks/{networkId}/switch/accessControlLists Update the access control lists for a MS network #
GET /networks/{networkId}/switch/accessPolicies List the access policies for a switch network #
POST /networks/{networkId}/switch/accessPolicies Create an access policy for a switch network #
GET /networks/{networkId}/switch/accessPolicies/{accessPolicyNumber} Return a specific access policy for a switch network #
PUT /networks/{networkId}/switch/accessPolicies/{accessPolicyNumber} Update an access policy for a switch network #
DELETE /networks/{networkId}/switch/accessPolicies/{accessPolicyNumber} Delete an access policy for a switch network #
GET /networks/{networkId}/switch/alternateManagementInterface Return the switch alternate management interface for the network #
PUT /networks/{networkId}/switch/alternateManagementInterface Update the switch alternate management interface for the network #
GET /networks/{networkId}/switch/dhcp/v4/servers/seen Return the network's DHCPv4 servers seen within the selected timeframe (default 1 day) #
GET /networks/{networkId}/switch/dhcpServerPolicy Return the DHCP server settings #
PUT /networks/{networkId}/switch/dhcpServerPolicy Update the DHCP server settings #
GET /networks/{networkId}/switch/dhcpServerPolicy/arpInspection/trustedServers Return the list of servers trusted by Dynamic ARP Inspection on this network #
POST /networks/{networkId}/switch/dhcpServerPolicy/arpInspection/trustedServers Add a server to be trusted by Dynamic ARP Inspection on this network #
PUT /networks/{networkId}/switch/dhcpServerPolicy/arpInspection/trustedServers/{trustedServerId} Update a server that is trusted by Dynamic ARP Inspection on this network #
DELETE /networks/{networkId}/switch/dhcpServerPolicy/arpInspection/trustedServers/{trustedServerId} Remove a server from being trusted by Dynamic ARP Inspection on this network #
GET /networks/{networkId}/switch/dhcpServerPolicy/arpInspection/warnings/byDevice Return the devices that have a Dynamic ARP Inspection warning and their warnings #
GET /networks/{networkId}/switch/dscpToCosMappings Return the DSCP to CoS mappings #
PUT /networks/{networkId}/switch/dscpToCosMappings Update the DSCP to CoS mappings #
GET /networks/{networkId}/switch/linkAggregations List link aggregation groups #
POST /networks/{networkId}/switch/linkAggregations Create a link aggregation group #
PUT /networks/{networkId}/switch/linkAggregations/{linkAggregationId} Update a link aggregation group #
DELETE /networks/{networkId}/switch/linkAggregations/{linkAggregationId} Split a link aggregation group into separate ports #
GET /networks/{networkId}/switch/mtu Return the MTU configuration #
PUT /networks/{networkId}/switch/mtu Update the MTU configuration #
GET /networks/{networkId}/switch/portSchedules List switch port schedules #
POST /networks/{networkId}/switch/portSchedules Add a switch port schedule #
DELETE /networks/{networkId}/switch/portSchedules/{portScheduleId} Delete a switch port schedule #
PUT /networks/{networkId}/switch/portSchedules/{portScheduleId} Update a switch port schedule #
GET /networks/{networkId}/switch/qosRules List quality of service rules #
POST /networks/{networkId}/switch/qosRules Add a quality of service rule #
GET /networks/{networkId}/switch/qosRules/order Return the quality of service rule IDs by order in which they will be processed by the switch #
PUT /networks/{networkId}/switch/qosRules/order Update the order in which the rules should be processed by the switch #
GET /networks/{networkId}/switch/qosRules/{qosRuleId} Return a quality of service rule #
DELETE /networks/{networkId}/switch/qosRules/{qosRuleId} Delete a quality of service rule #
PUT /networks/{networkId}/switch/qosRules/{qosRuleId} Update a quality of service rule #
GET /networks/{networkId}/switch/routing/multicast Return multicast settings for a network #
PUT /networks/{networkId}/switch/routing/multicast Update multicast settings for a network #
GET /networks/{networkId}/switch/routing/multicast/rendezvousPoints List multicast rendezvous points #
POST /networks/{networkId}/switch/routing/multicast/rendezvousPoints Create a multicast rendezvous point #
GET /networks/{networkId}/switch/routing/multicast/rendezvousPoints/{rendezvousPointId} Return a multicast rendezvous point #
DELETE /networks/{networkId}/switch/routing/multicast/rendezvousPoints/{rendezvousPointId} Delete a multicast rendezvous point #
PUT /networks/{networkId}/switch/routing/multicast/rendezvousPoints/{rendezvousPointId} Update a multicast rendezvous point #
GET /networks/{networkId}/switch/routing/ospf Return layer 3 OSPF routing configuration #
PUT /networks/{networkId}/switch/routing/ospf Update layer 3 OSPF routing configuration #
GET /networks/{networkId}/switch/settings Returns the switch network settings #
PUT /networks/{networkId}/switch/settings Update switch network settings #
GET /networks/{networkId}/switch/stacks List the switch stacks in a network #
POST /networks/{networkId}/switch/stacks Create a switch stack #
PUT /networks/{networkId}/switch/stacks/{switchStackId} Update a switch stack #
GET /networks/{networkId}/switch/stacks/{switchStackId} Show a switch stack #
DELETE /networks/{networkId}/switch/stacks/{switchStackId} Delete a stack #
POST /networks/{networkId}/switch/stacks/{switchStackId}/add Add a switch to a stack #
POST /networks/{networkId}/switch/stacks/{switchStackId}/remove Remove a switch from a stack #
GET /networks/{networkId}/switch/stacks/{switchStackId}/routing/interfaces List layer 3 interfaces for a switch stack #
POST /networks/{networkId}/switch/stacks/{switchStackId}/routing/interfaces Create a layer 3 interface for a switch stack #
GET /networks/{networkId}/switch/stacks/{switchStackId}/routing/interfaces/{interfaceId} Return a layer 3 interface from a switch stack #
PUT /networks/{networkId}/switch/stacks/{switchStackId}/routing/interfaces/{interfaceId} Update a layer 3 interface for a switch stack #
DELETE /networks/{networkId}/switch/stacks/{switchStackId}/routing/interfaces/{interfaceId} Delete a layer 3 interface from a switch stack #
GET /networks/{networkId}/switch/stacks/{switchStackId}/routing/interfaces/{interfaceId}/dhcp Return a layer 3 interface DHCP configuration for a switch stack #
PUT /networks/{networkId}/switch/stacks/{switchStackId}/routing/interfaces/{interfaceId}/dhcp Update a layer 3 interface DHCP configuration for a switch stack #
GET /networks/{networkId}/switch/stacks/{switchStackId}/routing/staticRoutes List layer 3 static routes for a switch stack #
POST /networks/{networkId}/switch/stacks/{switchStackId}/routing/staticRoutes Create a layer 3 static route for a switch stack #
GET /networks/{networkId}/switch/stacks/{switchStackId}/routing/staticRoutes/{staticRouteId} Return a layer 3 static route for a switch stack #
PUT /networks/{networkId}/switch/stacks/{switchStackId}/routing/staticRoutes/{staticRouteId} Update a layer 3 static route for a switch stack #
DELETE /networks/{networkId}/switch/stacks/{switchStackId}/routing/staticRoutes/{staticRouteId} Delete a layer 3 static route for a switch stack #
GET /networks/{networkId}/switch/stormControl Return the storm control configuration for a switch network #
PUT /networks/{networkId}/switch/stormControl Update the storm control configuration for a switch network #
GET /networks/{networkId}/switch/stp Returns STP settings #
PUT /networks/{networkId}/switch/stp Updates STP settings #
GET /organizations/{organizationId}/configTemplates/{configTemplateId}/switch/profiles List the switch templates for your switch template configuration #
GET /organizations/{organizationId}/configTemplates/{configTemplateId}/switch/profiles/{profileId}/ports Return all the ports of a switch template #
GET /organizations/{organizationId}/configTemplates/{configTemplateId}/switch/profiles/{profileId}/ports/{portId} Return a switch template port #
PUT /organizations/{organizationId}/configTemplates/{configTemplateId}/switch/profiles/{profileId}/ports/{portId} Update a switch template port #
GET /organizations/{organizationId}/summary/switch/power/history Returns the total PoE power draw for all switch ports in the organization over the requested timespan (by default the last 24 hours) #
POST /organizations/{organizationId}/switch/devices/clone Clone port-level and some switch-level configuration settings from a source switch to one or more target switches #
GET /organizations/{organizationId}/switch/ports/bySwitch List the switchports in an organization by switch #
GET /organizations/{organizationId}/switch/ports/clients/overview/byDevice List the number of clients for all switchports with at least one online client in an organization. #
GET /organizations/{organizationId}/switch/ports/overview Returns the counts of all active ports for the requested timespan, grouped by speed #
GET /organizations/{organizationId}/switch/ports/statuses/bySwitch List the switchports in an organization #
GET /organizations/{organizationId}/switch/ports/topology/discovery/byDevice List most recently seen LLDP/CDP discovery and topology information per switch port in an organization. #
GET /organizations/{organizationId}/switch/ports/usage/history/byDevice/byInterval List the historical usage and traffic data of switchports in an organization. #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cisco-meraki-switch-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cisco-meraki-switch-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Meraki Dashboard Switch API
  description: 'A RESTful API to programmatically manage and monitor Cisco Meraki networks at scale.


    > Date: 05 August, 2026

    >

    > [Recent Updates](https://meraki.io/whats-new/)


    ---


    [API Documentation](https://meraki.io/api)


    [Community Support](https://meraki.io/community)


    [Meraki Homepage](https://www.meraki.com)

    '
  contact:
    name: Meraki Developer Community
    url: https://meraki.io/community
  version: 1.73.0
  x-provenance:
    method: harvested
    authored_by: Cisco Meraki
    harvested_by: API Evangelist
    harvested_on: '2026-08-19'
    first_party: true
    note: Published by Cisco. Retrieved unmodified except for this x-provenance block.
    provider_published: true
    derived_view: Per-first-tag view of the source document, tag 'switch'. Operations and schemas are the provider's, unmodified.
  x-evidence:
  - type: source
    url: https://github.com/meraki/openapi/blob/master/openapi/spec3.json
  - type: raw
    url: https://raw.githubusercontent.com/meraki/openapi/master/openapi/spec3.json
  - type: alternate
    url: https://api.meraki.com/api/v1/openapiSpec
servers:
- url: https://api.meraki.com/{basePath}
  variables:
    basePath:
      default: api/v1
security:
- meraki_api_key: []
- bearerAuth: []
tags:
- name: switch
paths:
  /devices/{serial}/switch/ports:
    get:
      description: List the switch ports for a switch
      operationId: getDeviceSwitchPorts
      parameters:
      - name: serial
        in: path
        description: Serial
        schema:
          type: string
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    portId:
                      type: string
                      description: The identifier of the switch port.
                    name:
                      type: string
                      description: The name of the switch port.
                    tags:
                      type: array
                      items:
                        type: string
                      description: The list of tags of the switch port.
                    enabled:
                      type: boolean
                      description: The status of the switch port.
                    poeEnabled:
                      type: boolean
                      description: The PoE status of the switch port.
                    type:
                      type: string
                      enum:
                      - access
                      - dad
                      - routed
                      - stack
                      - svl
                      - trunk
                      description: The type of the switch port ('access', 'trunk', 'stack', 'routed', 'svl' or 'dad').
                    vlan:
                      type: integer
                      description: The VLAN of the switch port. For a trunk port, this is the native VLAN. A null value will clear the value set for trunk ports.
                    voiceVlan:
                      type: integer
                      description: The voice VLAN of the switch port. Only applicable to access ports.
                    allowedVlans:
                      type: string
                      description: The VLANs allowed on the switch port. Only applicable to trunk ports.
                    isolationEnabled:
                      type: boolean
                      description: The isolation status of the switch port.
                    rstpEnabled:
                      type: boolean
                      description: The rapid spanning tree protocol status.
                    stpGuard:
                      type: string
                      enum:
                      - bpdu guard
                      - disabled
                      - loop guard
                      - root guard
                      description: The state of the STP guard ('disabled', 'root guard', 'bpdu guard' or 'loop guard').
                    stpPortFastTrunk:
                      type: boolean
                      description: The state of STP PortFast Trunk on the switch port.
                    linkNegotiation:
                      type: string
                      description: The link speed for the switch port.
                    linkNegotiationCapabilities:
                      type: array
                      items:
                        type: string
                      description: Available link speeds for the switch port.
                    portScheduleId:
                      type: string
                      description: The ID of the port schedule. A value of null will clear the port schedule.
                    schedule:
                      type: object
                      properties:
                        id:
                          type: string
                          description: The ID of the port schedule.
                        name:
                          type: string
                          description: The name of the port schedule.
                      description: The port schedule data.
                    udld:
                      type: string
                      enum:
                      - Alert only
                      - Disabled
                      - Enforce
                      - N/A
                      description: The action to take when Unidirectional Link is detected. For monitor-only Catalyst ports, N/A indicates UDLD is not configured and Disabled indicates UDLD is explicitly disabled. Default configuration is Alert only.
                    accessPolicyType:
                      type: string
                      enum:
                      - Custom access policy
                      - MAC allow list
                      - Open
                      - Sticky MAC allow list
                      description: The type of the access policy of the switch port. Only applicable to access ports. Can be one of 'Open', 'Custom access policy', 'MAC allow list' or 'Sticky MAC allow list'.
                    accessPolicyNumber:
                      type: integer
                      description: The number of a custom access policy to configure on the switch port. Only applicable when 'accessPolicyType' is 'Custom access policy'.
                    macAllowList:
                      type: array
                      items:
                        type: string
                      description: Only devices with MAC addresses specified in this list will have access to this port. Up to 20 MAC addresses can be defined. Only applicable when 'accessPolicyType' is 'MAC allow list'.
                    macWhitelistLimit:
                      type: integer
                      description: "The maximum number of MAC addresses for regular MAC allow list. Only applicable when 'accessPolicyType' is 'MAC allow list'.\n          Note: Config only supported on verions greater than ms18 only for classic switches."
                    stickyMacAllowList:
                      type: array
                      items:
                        type: string
                      description: The initial list of MAC addresses for sticky Mac allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'.
                    stickyMacAllowListLimit:
                      type: integer
                      description: The maximum number of MAC addresses for sticky MAC allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'.
                    stormControlEnabled:
                      type: boolean
                      description: The storm control status of the switch port.
                    adaptivePolicyGroupId:
                      type: string
                      description: The adaptive policy group ID that will be used to tag traffic through this switch port. This ID must pre-exist during the configuration, else needs to be created using adaptivePolicy/groups API. Cannot be applied to a port on a switch bound to profile.
                    adaptivePolicyGroup:
                      type: object
                      properties:
                        id:
                          type: string
                          description: The ID of the adaptive policy group.
                        name:
                          type: string
                          description: The name of the adaptive policy group.
                      description: The adaptive policy group data of the port.
                    peerSgtCapable:
                      type: boolean
                      description: If true, Peer SGT is enabled for traffic through this switch port. Applicable to trunk port only, not access port. Cannot be applied to a port on a switch bound to profile.
                    flexibleStackingEnabled:
                      type: boolean
                      description: For supported switches (e.g. MS420/MS425), whether or not the port has flexible stacking enabled.
                    daiTrusted:
                      type: boolean
                      description: If true, ARP packets for this port will be considered trusted, and Dynamic ARP Inspection will allow the traffic.
                    profile:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: When enabled, override this port's configuration with a port profile.
                        id:
                          type: string
                          description: When enabled, the ID of the port profile used to override the port's configuration.
                        iname:
                          type: string
                          description: When enabled, the IName of the profile.
                      description: Profile attributes
                    module:
                      type: object
                      properties:
                        model:
                          type: string
                          description: The model of the expansion module.
                        serial:
                          type: string
                          description: The serial of the module.
                        slot:
                          type: integer
                          description: The slot number of the module.
                      description: Expansion module
                    mirror:
                      type: object
                      properties:
                        mode:
                          type: string
                          enum:
                          - Destination port
                          - Not mirroring traffic
                          - Source port
                          description: The port mirror mode. Can be one of ('Destination port', 'Source port' or 'Not mirroring traffic').
                      description: Port mirror
                    dot3az:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: The Energy Efficient Ethernet status of the switch port.
                      description: dot3az settings for the port
                    highSpeed:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Whether the high-speed logical port is enabled.
                      description: High speed port enablement settings for a high-speed logical port.
              example:
              - portId: '1'
                name: My switch port
                tags:
                - tag1
                - tag2
                enabled: true
                poeEnabled: true
                type: access
                vlan: 10
                voiceVlan: 20
                allowedVlans: 1,3,5-10
                isolationEnabled: false
                rstpEnabled: true
                stpGuard: disabled
                stpPortFastTrunk: false
                linkNegotiation: Auto negotiate
                linkNegotiationCapabilities:
                - Auto negotiate
                - 1 Gigabit full duplex (auto)
                portScheduleId: '1234'
                schedule:
                  id: '1234'
                  name: Port Schedule
                udld: Alert only
                accessPolicyType: Sticky MAC allow list
                accessPolicyNumber: 2
                macAllowList:
                - 34:56:fe:ce:8e:a0
                - 34:56:fe:ce:8e:a1
                macWhitelistLimit: 10
                stickyMacAllowList:
                - 34:56:fe:ce:8e:b0
                - 34:56:fe:ce:8e:b1
                stickyMacAllowListLimit: 5
                stormControlEnabled: true
                adaptivePolicyGroupId: '123'
                adaptivePolicyGroup:
                  id: '123'
                  name: Adaptive Policy Group
                peerSgtCapable: false
                flexibleStackingEnabled: true
                daiTrusted: false
                profile:
                  enabled: false
                  id: '1284392014819'
                  iname: iname
                module:
                  model: MA-MOD-4X10G
                  serial: 3_MA-MOD-4X10G
                  slot: 1
                mirror:
                  mode: Not mirroring traffic
                dot3az:
                  enabled: false
                highSpeed:
                  enabled: false
      security:
      - oauth2:
        - switch:config:read
      summary: List the switch ports for a switch
      tags:
      - switch
  /devices/{serial}/switch/ports/cycle:
    post:
      deprecated: true
      description: Cycle a set of switch ports on non-Catalyst MS devices. For Catalyst support, use /devices/{serial}/liveTools/ports/cycle, which supports all switch product families.
      operationId: cycleDeviceSwitchPorts
      parameters:
      - name: serial
        in: path
        description: Serial
        schema:
          type: string
        required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ports:
                  type: array
                  items:
                    type: string
                  description: List of switch ports
              example:
                ports:
                - '1'
                - 2-5
                - 1_MA-MOD-8X10G_1
                - 1_MA-MOD-8X10G_2-1_MA-MOD-8X10G_8
              required:
              - ports
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  ports:
                    type: array
                    items:
                      type: string
                    description: List of switch ports
              example:
                ports:
                - '1'
                - 2-5
                - 1_MA-MOD-8X10G_1
                - 1_MA-MOD-8X10G_2-1_MA-MOD-8X10G_8
      security:
      - oauth2:
        - switch:config:write
      summary: Cycle a set of switch ports on non-Catalyst MS devices
      tags:
      - switch
      x-deprecation-notice: 'Deprecated: This operation has been marked as deprecated. For more information, visit the <a href=''https://developer.cisco.com/meraki/api-v1/deprecated-operations/''>deprecated operations page</a>'
  /devices/{serial}/switch/ports/statuses:
    get:
      description: Return the status for all the ports of a switch
      operationId: getDeviceSwitchPortsStatuses
      parameters:
      - name: serial
        in: path
        description: Serial
        schema:
          type: string
        required: true
      - name: t0
        in: query
        description: The beginning of the timespan for the data. The maximum lookback period is 31 days from today.
        schema:
          type: string
      - name: timespan
        in: query
        description: The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day.
        schema:
          type: number
          format: float
          maximum: 2678400
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    portId:
                      type: string
                      description: The string identifier of this port on the switch. This is commonly just the port number but may contain additional identifying information such as the slot and module-type if the port is located on a port module.
                    enabled:
                      type: boolean
                      description: Whether the port is configured to be enabled.
                    status:
                      type: string
                      enum:
                      - Connected
                      - Disabled
                      - Disconnected
                      description: The current connection status of the port.
                    isUplink:
                      type: boolean
                      description: Whether the port is the switch's uplink.
                    errors:
                      type: array
                      items:
                        type: string
                      description: All errors present on the port.
                    warnings:
                      type: array
                      items:
                        type: string
                      description: All warnings present on the port.
                    speed:
                      type: string
                      enum:
                      - ''
                      - 1 Gbps
                      - 10 Gbps
                      - 10 Mbps
                      - 100 Gbps
                      - 100 Mbps
                      - 2.5 Gbps
                      - 20 Gbps
                      - 25 Gbps
                      - 40 Gbps
                      - 400 Gbps
                      - 5 Gbps
                      - 50 Gbps
                      description: The current data transfer rate which the port is operating at.
                    duplex:
                      type: string
                      enum:
                      - ''
                      - full
                      - half
                      description: The current duplex of a connected port.
                    spanningTree:
                      type: object
                      properties:
                        statuses:
                          type: array
                          items:
                            type: string
                          description: The current Spanning Tree Protocol statuses of the port.
                      description: The Spanning Tree Protocol (STP) information of the connected device.
                    poe:
                      type: object
                      properties:
                        isAllocated:
                          type: boolean
                          description: Whether the port is drawing power
                      description: PoE status of the port.
                    usageInKb:
                      type: object
                      properties:
                        total:
                          type: integer
                          description: The total amount of data sent and received (in kilobytes).
                        sent:
                          type: integer
                          description: The amount of data sent (in kilobytes).
                        recv:
                          type: integer
                          description: The amount of data received (in kilobytes).
                      description: A breakdown of how many kilobytes have passed through this port during the timespan. Note that this data is collected periodically from the switch. Any data from the past five minutes may be incomplete.
                    cdp:
                      type: object
                      properties:
                        systemName:
                          type: string
                          description: The system name.
                        platform:
                          type: string
                          description: Identifies the hardware platform of the device.
                        deviceId:
                          type: string
                          description: Identifies the device name.
                        portId:
                          type: string
                          description: Identifies the port from which the CDP packet was sent.
                        nativeVlan:
                          type: integer
                          description: Indicates, per interface, the assumed VLAN for untagged packets on the interface.
                        address:
                          type: string
                          description: Contains network addresses of both receiving and sending devices.
                        managementAddress:
                          type: string
                          description: The device's management IP.
                        version:
                          type: string
                          description: Contains the device software release information.
                        vtpManagementDomain:
                          type: string
                          description: Advertises the configured VLAN Trunking Protocl (VTP)-management-domain name of the system.
                        capabilities:
                          type: string
                          description: Identifies the device type, which indicates the functional capabilities of the device.
                      description: The Cisco Discovery Protocol (CDP) information of the connected device.
                    lldp:
                      type: object
                      properties:
                        systemName:
                          type: string
                          description: The device's system name.
                        systemDescription:
                          type: string
                          description: The device's system description.
                        chassisId:
                          type: string
                          description: The device's chassis ID.
                        portId:
                          type: string
                          description: Identifies the port from which the LLDP packet was sent
                        managementVlan:
                          type: integer
                          description: The device's management VLAN.
                        portVlan:
                          type: integer
                          description: The port's VLAN.
                        managementAddress:
                          type: string
                          description: The device's management IP.
                        portDescription:
                          type: string
                          description: Description of the port from which the LLDP packet was sent.
                        systemCapabilities:
                          type: string
                          description: Identifies the device type, which indicates the functional capabilities of the device.
                      description: The Link Layer Discovery Protocol (LLDP) information of the connected device.
                    clientCount:
                      type: integer
                      description: The number of clients connected through this port.
                    powerUsageInWh:
                      type: number
                      format: float
                      description: How much power (in watt-hours) has been delivered by this port during the timespan. Note that this data is collected periodically from the switch. Any data from the past five minutes may be incomplete.
                    trafficInKbps:
                      type: object
                      properties:
                        total:
                          type: number
                          format: float
                          description: The average speed of the data sent and received (in kilobits-per-second).
                        sent:
                          type: number
                          format: float
                          description: The average speed of the data sent (in kilobits-per-second).
                        recv:
                          type: number
                          format: float
                          description: The average speed of the data received (in kilobits-per-second).
                      description: A breakdown of the average speed of data that has passed through this port during the timespan. Note that this data is collected periodically from the switch. Any data from the past five minutes may be incomplete.
                    securePort:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Whether Secure Port is turned on for this port.
                        active:
                          type: boolean
                          description: Whether Secure Port is currently active for this port.
                        authenticationStatus:
                          type: string
                          enum:
                          - Authentication failure
                          - Authentication in progress
                          - Authentication successful
                          - Authentication timed out
                          - Disabled
                          - Enabled
                          description: The current Secure Port status.
                        configOverrides:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                              - access
                              - dad
                              - routed
                              - stack
                              - svl
                              - trunk
                              description: The type of the  ('access', 'trunk', 'stack', 'routed', 'svl' or 'dad').
                            vlan:
                              type: integer
                              description: The VLAN of the . For a trunk port, this is the native VLAN. A null value will clear the value set for trunk ports.
                            voiceVlan:
                              type: integer
                              description: The voice VLAN of the . Only applicable to access ports.
                            allowedVlans:
                              type: string
                              description: The VLANs allowed on the . Only applicable to trunk ports.
                          description: The configuration overrides applied to this port when Secure Port is active.
                      description: The Secure Port status of the port.
              example:
              - portId: '1'
                enabled: true
                status: Connected
                isUplink: false
                errors:
                - PoE overload
                - Very high proportion of CRC errors
                warnings:
                - SecurePort authentication in progress
                - PoE port was denied power
                - High proportion of CRC errors
                speed: 10 Gbps
                duplex: full
                spanningTree:
                  statuses:
                  - Learning
                poe:
                  isAllocated: false
                usageInKb:
                  total: 40867
                  sent: 23008
                  recv: 17859
                cdp:
                  systemName: ''
                  platform: MS350-24X
                  deviceId: 0c8ddbddee:ff
                  portId: Port 20
                  nativeVlan: 1
                  address: 10.0,0.1
                  managementAddress: 10.0.0.100
                  version: '1'
                  vtpManagementDomain: ''
                  capabilities: Switch
                lldp:
                  systemName: MS350-24X - Test
                  systemDescription: MS350-24X Cloud Managed PoE Switch
                  chassisId: 0c:8d:db:dd:ee:ff
                  portId: '20'
                  managementVlan: 1
                  portVlan: 1
                  managementAddress: 10.0.0.100
                  portDescription: Port 20
                  systemCapabilities: switch
                clientCount: 10
                powerUsageInWh: 55.9
                trafficInKbps:
                  total: 2.2
                  sent: 1.2
                  recv: 1.0
                securePort:
                  enabled: true
                  active: true
                  authenticationStatus: Authentication in progress
                  configOverrides:
                    type: trunk
                    vlan: 12
                    voiceVlan: 34
                    allowedVlans: all
      security:
      - oauth2:
        - switch:telemetry:read
      summary: Return the status for all the ports of a switch
      tags:
      - switch
  /devices/{serial}/switch/ports/statuses/packets:
    get:
      description: Return the packet counters for all the ports of a switch
      operationId: getDeviceSwitchPortsStatusesPackets
      parameters:
      - name: serial
        in: path
        description: Serial
        schema:
          type: string
        required: true
      - name: t0
        in: query
        description: The beginning of the timespan for the data. The value is used only to determine the elapsed duration between t0 and the time of the request; the API snaps that duration to the nearest preset window (5 minutes, 15 minutes, 1 hour, or 1 day).
        schema:
          type: string
      - name: timespan
        in: query
        description: The timespan for which the information will be fetched. If specifying timespan, do not specify t0. The value must be in seconds and be less than or equal to 86400 seconds (1 day). The default is 1 day.
        schema:
          type: number
          format: float
          maximum: 86400.0
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    portId:
                      type: string
                      description: The string identifier of this port on the switch. This is commonly just the port number but may contain additional identifying information such as the slot and module-type if the port is located on a port module.
                    packets:
                      type: array
                      items:
                        type: object
                        properties:
                          desc:
                            type: string
                            description: The type of packets being counted.
                          total:
                            type: integer
                            description: The total count of sent and received packets.
                          sent:
                            type: integer
                            description: The total count of packets sent by the switch during the timespan.
                          recv:
                            type: integer
                            description: The total count of packets received by the switch during the timespa

# --- truncated at 32 KB (600 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cisco-meraki/refs/heads/main/openapi/cisco-meraki-switch-api-openapi.yml