Cisco Meraki Switch API
The switch API from Cisco Meraki — 56 operation(s) for switch.
The switch API from Cisco Meraki — 56 operation(s) for switch.
openapi: 3.0.1
info:
title: Meraki Dashboard API — switch
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
- configure
- ports
/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
- liveTools
- ports
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
- monitor
- ports
- statuses
/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
lo
# --- truncated at 32 KB (615 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cisco-meraki/refs/heads/main/openapi/cisco-meraki-switch-api-openapi.yml