Switch
Switch
Switch class.
add_network_switch_stack
Add a switch to a stack.
API documentation: addNetworkSwitchStack
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
serial(str) –The serial of the switch to be added.
Returns:
-
NetworkSwitchStackResponse–Successful operation.
Example API response
{
"id": "8473",
"name": "A cool stack",
"serials": [
"QBZY-XWVU-TSRQ",
"QBAB-CDEF-GHIJ"
],
"isMonitorOnly": false,
"virtualMac": "00:18:0a:4f:21:19",
"members": [
{
"serial": "QBZY-XWVU-TSRQ",
"name": "switch 1",
"model": "MS350-24-HW",
"mac": "00:18:0a:00:00:09",
"role": "active"
}
]
}
clone_organization_switch_devices
Clone port-level and some switch-level configuration settings from a source switch to one or more target switches.
API documentation: cloneOrganizationSwitchDevices
Parameters:
-
organization_id(str) –Organization ID.
-
source_serial(str) –Serial number of the source switch (must be on a network not bound to a template).
-
target_serials(list[str]) –Array of serial numbers of one or more target switches (must be on a network not bound to a template).
Returns:
-
CloneOrganizationSwitchDevicesResponse–Successful operation.
Example API response
{
"sourceSerial": "Q234-ABCD-5678",
"targetSerials": [
"Q234-ABCD-0001",
"Q234-ABCD-0002",
"Q234-ABCD-0003"
]
}
create_device_switch_routing_interface
Create a layer 3 interface for a switch.
API documentation: createDeviceSwitchRoutingInterface
Parameters:
-
serial(str) –Serial.
-
name(str) –A friendly name or description for the interface or VLAN (max length 128 characters).
-
mode(CreateDeviceSwitchRoutingInterfaceMode | None, default:None) –L3 Interface mode, can be one of 'vlan', 'routed', 'loopback'. Default is 'vlan'. CS 17.18 or higher is required for 'routed' mode.
-
subnet(str | None, default:None) –The network that this L3 interface is on, in CIDR notation (ex. 10.1.1.0/24).
-
switch_port_id(str | None, default:None) –Switch Port ID when in Routed mode (CS 17.18 or higher required).
-
interface_ip(str | None, default:None) –The IP address that will be used for Layer 3 routing on this VLAN or subnet. This cannot be the same as the device management IP.
-
mtu(int | None, default:None) –The interface MTU. Applies to native switch layer 3 interfaces, including VLAN and routed modes.
-
multicast_routing(CreateDeviceSwitchRoutingInterfaceMulticastRouting | None, default:None) –Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'.
-
vlan_id(int | None, default:None) –The VLAN this L3 interface is on. VLAN must be between 1 and 4094.
-
default_gateway(str | None, default:None) –The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface.
-
ospf_settings(CreateDeviceSwitchRoutingInterfaceOspfSettings | None, default:None) –The OSPF routing settings of the interface.
-
ipv6(CreateDeviceSwitchRoutingInterfaceIpv6 | None, default:None) –The IPv6 settings of the interface.
-
vrf(CreateDeviceSwitchRoutingInterfaceVrf | None, default:None) –The VRF settings of the interface. Requires IOS XE 17.18 or higher.
-
loopback(dict[str, Any] | None, default:None) –The loopback settings of the interface.
Returns:
-
CreateDeviceSwitchRoutingInterfaceResponse–Successful operation.
Example API response
{
"interfaceId": "1234",
"name": "L3 interface",
"mode": "vlan",
"subnet": "192.168.1.0/24",
"interfaceIp": "192.168.1.2",
"mtu": 1500,
"serial": "Q234-ABCD-5678",
"switchPortId": "1",
"multicastRouting": "disabled",
"vlanId": 100,
"uplinkV4": false,
"uplinkV6": false,
"ospfSettings": {
"area": "0",
"cost": 1,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ospfV3": {
"area": "1",
"cost": 2,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ipv6": {
"assignmentMode": "static",
"address": "2001:db8::1",
"prefix": "2001:db8::/32",
"gateway": "2001:db8::2"
},
"vrf": {
"name": "Blue"
},
"defaultGateway": "192.168.1.1"
}
create_device_switch_routing_static_route
Create a layer 3 static route for a switch.
API documentation: createDeviceSwitchRoutingStaticRoute
Parameters:
-
serial(str) –Serial.
-
name(str | None, default:None) –Name or description for layer 3 static route.
-
subnet(str) –The subnet which is routed via this static route and should be specified in CIDR notation (ex. 1.2.3.0/24).
-
next_hop_ip(str) –IP address of the next hop device to which the device sends its traffic for the subnet.
-
advertise_via_ospf_enabled(bool | None, default:None) –Option to advertise static route via OSPF.
-
prefer_over_ospf_routes_enabled(bool | None, default:None) –Option to prefer static route over OSPF routes.
-
vrf(CreateDeviceSwitchRoutingStaticRouteVrf | None, default:None) –The VRF settings of the interface. Requires IOS XE 17.18 or higher.
Returns:
-
CreateDeviceSwitchRoutingStaticRouteResponse–Successful operation.
Example API response
{
"staticRouteId": "1234",
"name": "My route",
"subnet": "192.168.1.0/24",
"nextHopIp": "1.2.3.4",
"managementNextHop": "1.2.3.5",
"vrf": {
"name": "Blue",
"leakRouteToDefaultVrf": false
},
"advertiseViaOspfEnabled": false,
"preferOverOspfRoutesEnabled": false
}
create_network_switch_access_policy
Create an access policy for a switch network.
API documentation: createNetworkSwitchAccessPolicy
Parameters:
-
network_id(str) –Network ID.
-
name(str) –Name of the access policy(max length 255).
-
radius_servers(list[CreateNetworkSwitchAccessPolicyRadiusServersItem]) –List of RADIUS servers to require connecting devices to authenticate against before granting network access.
-
radius(CreateNetworkSwitchAccessPolicyRadius | None, default:None) –Object for RADIUS Settings.
-
guest_port_bouncing(bool | None, default:None) –If enabled, Meraki devices will periodically send access-request messages to these RADIUS servers.
-
radius_testing_enabled(bool | None, default:None) –If enabled, Meraki devices will periodically send access-request messages to these RADIUS servers.
-
radius_coa_support_enabled(bool | None, default:None) –Change of authentication for RADIUS re-authentication and disconnection.
-
radius_accounting_enabled(bool) –Enable to send start, interim-update and stop messages to a configured RADIUS accounting server for tracking connected clients.
-
radius_accounting_servers(list[CreateNetworkSwitchAccessPolicyRadiusAccountingServersItem] | None, default:None) –List of RADIUS accounting servers to require connecting devices to authenticate against before granting network access.
-
radius_group_attribute(str | None, default:None) –Acceptable values are
""for None, or"11"for Group Policies ACL. -
host_mode(CreateNetworkSwitchAccessPolicyHostMode | None, default:None) –Choose the Host Mode for the access policy.
-
access_policy_type(CreateNetworkSwitchAccessPolicyAccessPolicyType | None, default:None) –Access Type of the policy. Automatically 'Hybrid authentication' when hostMode is 'Multi-Domain'.
-
increase_access_speed(bool | None, default:None) –Enabling this option will make switches execute 802.1X and MAC- bypass authentication simultaneously so that clients authenticate faster. Only required when accessPolicyType is 'Hybrid Authentication.
-
guest_vlan_id(int | None, default:None) –ID for the guest VLAN allow unauthorized devices access to limited network resources.
-
dot1x(CreateNetworkSwitchAccessPolicyDot1x | None, default:None) –802.1x Settings.
-
voice_vlan_clients(bool | None, default:None) –CDP/LLDP capable voice clients will be able to use this VLAN. Automatically true when hostMode is 'Multi-Domain'.
-
url_redirect_walled_garden_enabled(bool | None, default:None) –Enable to restrict access for clients to a specific set of IP addresses or hostnames prior to authentication.
-
url_redirect_walled_garden_ranges(list[str] | None, default:None) –IP address ranges, in CIDR notation, to restrict access for clients to a specific set of IP addresses or hostnames prior to authentication.
-
guest_group_policy_id(str | None, default:None) –Group policy Number for guest group policy.
-
guest_sgt_id(int | None, default:None) –Security Group Tag ID for guest group policy.
Returns:
-
NetworkSwitchAccessPolicyResponse–Successful operation.
Example API response
{
"accessPolicyNumber": "1234",
"name": "Access policy #1",
"radiusServers": [
{
"serverId": "1",
"organizationRadiusServerId": "42",
"host": "1.2.3.4",
"port": 22
}
],
"radius": {
"criticalAuth": {
"dataVlanId": 100,
"voiceVlanId": 100,
"suspendPortBounce": true,
"dataGroupPolicyId": "1234",
"voiceGroupPolicyId": "1234",
"dataSgtId": 1234,
"voiceSgtId": 1234
},
"failedAuthVlanId": 100,
"failedAuthGroupPolicyId": "1234",
"failedAuthSgtId": 1284392014819,
"reAuthenticationInterval": 120,
"cache": {
"enabled": false,
"timeout": 24
},
"authentication": {
"mode": "Open"
},
"preAuthenticationGroupPolicyId": "1234"
},
"enforceRadiusMonitoring": false,
"guestPortBouncing": false,
"radiusTestingEnabled": false,
"radiusCoaSupportEnabled": false,
"radiusAccountingEnabled": true,
"radiusAccountingServers": [
{
"serverId": "2",
"organizationRadiusServerId": "42",
"host": "1.2.3.4",
"port": 22
}
],
"radiusGroupAttribute": "11",
"hostMode": "Single-Host",
"accessPolicyType": "Hybrid authentication",
"increaseAccessSpeed": false,
"guestVlanId": 100,
"dot1x": {
"controlDirection": "inbound"
},
"voiceVlanClients": true,
"urlRedirectWalledGardenEnabled": true,
"urlRedirectWalledGardenRanges": [
"192.168.1.0/24"
],
"counts": {
"ports": {
"withThisPolicy": 12
}
},
"guestGroupPolicyId": "1234",
"guestSgtId": 1284392014819
}
create_network_switch_dhcp_server_policy_arp_inspection_trusted_server
Add a server to be trusted by Dynamic ARP Inspection on this network.
API documentation: createNetworkSwitchDhcpServerPolicyArpInspectionTrustedServer
Parameters:
-
network_id(str) –Network ID.
-
mac(str) –The mac address of the trusted server being added.
-
vlan(int) –The VLAN of the trusted server being added. It must be between 1 and 4094.
-
ipv4(CreateNetworkSwitchDhcpServerPolicyArpInspectionTrustedServerIpv4) –The IPv4 attributes of the trusted server being added.
Returns:
-
NetworkSwitchDhcpServerPolicyArpInspectionTrustedServerResponse–Successful operation.
Example API response
{
"trustedServerId": "123",
"mac": "00:11:22:33:44:55",
"vlan": 100,
"ipv4": {
"address": "1.2.3.4"
}
}
create_network_switch_link_aggregation
Create a link aggregation group.
API documentation: createNetworkSwitchLinkAggregation
Parameters:
-
network_id(str) –Network ID.
-
switch_ports(list[CreateNetworkSwitchLinkAggregationSwitchPortsItem] | None, default:None) –Array of switch or stack ports for creating aggregation group. Minimum 2 and maximum 8 ports are supported.
-
switch_profile_ports(list[CreateNetworkSwitchLinkAggregationSwitchProfilePortsItem] | None, default:None) –Array of switch profile ports for creating aggregation group. Minimum 2 and maximum 8 ports are supported.
Returns:
-
NetworkSwitchLinkAggregationResponse–Successful operation.
Example API response
{
"id": "NDU2N18yXzM=",
"switchPorts": [
{
"serial": "Q234-ABCD-0001",
"portId": "1"
}
]
}
create_network_switch_port_schedule
Add a switch port schedule.
API documentation: createNetworkSwitchPortSchedule
Parameters:
-
network_id(str) –Network ID.
-
name(str) –The name for your port schedule. Required.
-
port_schedule(CreateNetworkSwitchPortSchedulePortSchedule | None, default:None) –The schedule for switch port scheduling. Schedules are applied to days of the week. When it's empty, default schedule with all days of a week are configured. Any unspecified day in the schedule is added as a default schedule configuration of the day.
Returns:
-
NetworkSwitchPortScheduleResponse–Successful operation.
Example API response
{
"id": "1234",
"networkId": "N_24329156",
"name": "Weekdays schedule",
"portSchedule": {
"monday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"tuesday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"wednesday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"thursday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"friday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"saturday": {
"active": false,
"from": "0:00",
"to": "24:00"
},
"sunday": {
"active": false,
"from": "0:00",
"to": "24:00"
}
}
}
create_network_switch_qos_rule
Add a quality of service rule.
API documentation: createNetworkSwitchQosRule
Parameters:
-
network_id(str) –Network ID.
-
vlan(int) –The VLAN of the incoming packet. A null value will match any VLAN.
-
protocol(CreateNetworkSwitchQosRuleProtocol | None, default:None) –The protocol of the incoming packet. Default value is "ANY".
-
src_port(int | None, default:None) –The source port of the incoming packet. Applicable only if protocol is TCP or UDP.
-
src_port_range(str | None, default:None) –The source port range of the incoming packet. Applicable only if protocol is set to TCP or UDP.
-
dst_port(int | None, default:None) –The destination port of the incoming packet. Applicable only if protocol is TCP or UDP.
-
dst_port_range(str | None, default:None) –The destination port range of the incoming packet. Applicable only if protocol is set to TCP or UDP.
-
dscp(int | None, default:None) –DSCP tag for the incoming packet. Set this to -1 to trust incoming DSCP. Default value is 0.
Returns:
-
NetworkSwitchQosRuleResponse–Successful operation.
Example API response
{
"id": "1284392014819",
"vlan": 100,
"protocol": "TCP",
"srcPort": 2000,
"srcPortRange": "70-80",
"dstPort": 3000,
"dstPortRange": "3000-3100",
"dscp": 0
}
create_network_switch_routing_multicast_rendezvous_point
Create a multicast rendezvous point.
API documentation: createNetworkSwitchRoutingMulticastRendezvousPoint
Parameters:
-
network_id(str) –Network ID.
-
interface_ip(str) –The IP address of the interface where the RP needs to be created.
-
multicast_group(str) –'Any', or the IP address of a multicast group.
-
vrf(CreateNetworkSwitchRoutingMulticastRendezvousPointVrf | None, default:None) –The VRF with PIM enabled L3 interface.
Returns:
-
NetworkSwitchRoutingMulticastRendezvousPointResponse–Successful operation.
Example API response
{
"rendezvousPointId": "1234",
"serial": "Q234-ABCD-5678",
"interfaceName": "l3_interface_0",
"interfaceIp": "192.168.1.2",
"multicastGroup": "Any"
}
create_network_switch_stack
Create a switch stack.
API documentation: createNetworkSwitchStack
Parameters:
-
network_id(str) –Network ID.
-
name(str) –The name of the new stack.
-
serials(list[str]) –An array of switch serials to be added into the new stack.
Returns:
-
CreateNetworkSwitchStackResponse–Successful operation.
Example API response
{
"id": "8473",
"name": "A cool stack",
"serials": [
"QBZY-XWVU-TSRQ",
"QBAB-CDEF-GHIJ"
],
"workflowId": "8473"
}
create_network_switch_stack_routing_interface
Create a layer 3 interface for a switch stack.
API documentation: createNetworkSwitchStackRoutingInterface
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
name(str) –A friendly name or description for the interface or VLAN (max length 128 characters).
-
mode(CreateNetworkSwitchStackRoutingInterfaceMode | None, default:None) –L3 Interface mode, can be one of 'vlan', 'routed', 'loopback'. Default is 'vlan'. CS 17.18 or higher is required for 'routed' mode.
-
subnet(str | None, default:None) –The network that this L3 interface is on, in CIDR notation (ex. 10.1.1.0/24).
-
switch_port_id(str | None, default:None) –Switch Port ID when in Routed mode (CS 17.18 or higher required).
-
interface_ip(str | None, default:None) –The IP address that will be used for Layer 3 routing on this VLAN or subnet. This cannot be the same as the device management IP.
-
mtu(int | None, default:None) –The interface MTU. Applies to native switch layer 3 interfaces, including VLAN and routed modes.
-
multicast_routing(CreateNetworkSwitchStackRoutingInterfaceMulticastRouting | None, default:None) –Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'.
-
vlan_id(int | None, default:None) –The VLAN this L3 interface is on. VLAN must be between 1 and 4094.
-
default_gateway(str | None, default:None) –The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface.
-
ospf_settings(CreateNetworkSwitchStackRoutingInterfaceOspfSettings | None, default:None) –The OSPF routing settings of the interface.
-
ipv6(CreateNetworkSwitchStackRoutingInterfaceIpv6 | None, default:None) –The IPv6 settings of the interface.
-
vrf(CreateNetworkSwitchStackRoutingInterfaceVrf | None, default:None) –The VRF settings of the interface. Requires IOS XE 17.18 or higher.
-
loopback(dict[str, Any] | None, default:None) –The loopback settings of the interface.
Returns:
-
CreateDeviceSwitchRoutingInterfaceResponse–Successful operation.
Example API response
{
"interfaceId": "1234",
"name": "L3 interface",
"mode": "vlan",
"subnet": "192.168.1.0/24",
"interfaceIp": "192.168.1.2",
"mtu": 1500,
"serial": "Q234-ABCD-5678",
"switchPortId": "1",
"multicastRouting": "disabled",
"vlanId": 100,
"uplinkV4": false,
"uplinkV6": false,
"ospfSettings": {
"area": "0",
"cost": 1,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ospfV3": {
"area": "1",
"cost": 2,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ipv6": {
"assignmentMode": "static",
"address": "2001:db8::1",
"prefix": "2001:db8::/32",
"gateway": "2001:db8::2"
},
"vrf": {
"name": "Blue"
},
"defaultGateway": "192.168.1.1"
}
create_network_switch_stack_routing_static_route
Create a layer 3 static route for a switch stack.
API documentation: createNetworkSwitchStackRoutingStaticRoute
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
name(str | None, default:None) –Name or description for layer 3 static route.
-
subnet(str) –The subnet which is routed via this static route and should be specified in CIDR notation (ex. 1.2.3.0/24).
-
next_hop_ip(str) –IP address of the next hop device to which the device sends its traffic for the subnet.
-
advertise_via_ospf_enabled(bool | None, default:None) –Option to advertise static route via OSPF.
-
prefer_over_ospf_routes_enabled(bool | None, default:None) –Option to prefer static route over OSPF routes.
-
vrf(CreateNetworkSwitchStackRoutingStaticRouteVrf | None, default:None) –The VRF settings of the interface. Requires IOS XE 17.18 or higher.
Returns:
-
CreateDeviceSwitchRoutingStaticRouteResponse–Successful operation.
Example API response
{
"staticRouteId": "1234",
"name": "My route",
"subnet": "192.168.1.0/24",
"nextHopIp": "1.2.3.4",
"managementNextHop": "1.2.3.5",
"vrf": {
"name": "Blue",
"leakRouteToDefaultVrf": false
},
"advertiseViaOspfEnabled": false,
"preferOverOspfRoutesEnabled": false
}
cycle_device_switch_ports
Cycle a set of switch ports on non-Catalyst MS devices.
API documentation: cycleDeviceSwitchPorts
Parameters:
-
serial(str) –Serial.
-
ports(list[str]) –List of switch ports.
Returns:
-
CycleDeviceSwitchPortsResponse–Successful operation.
Example API response
{
"ports": [
"1",
"2-5",
"1_MA-MOD-8X10G_1",
"1_MA-MOD-8X10G_2-1_MA-MOD-8X10G_8"
]
}
delete_device_switch_routing_interface
Delete a layer 3 interface from the switch.
API documentation: deleteDeviceSwitchRoutingInterface
Parameters:
-
serial(str) –Serial.
-
interface_id(str) –Interface ID.
Returns:
-
None–Successful operation.
delete_device_switch_routing_static_route
Delete a layer 3 static route for a switch.
API documentation: deleteDeviceSwitchRoutingStaticRoute
Parameters:
-
serial(str) –Serial.
-
static_route_id(str) –Static route ID.
Returns:
-
None–Successful operation.
delete_network_switch_access_policy
Delete an access policy for a switch network.
API documentation: deleteNetworkSwitchAccessPolicy
Parameters:
-
network_id(str) –Network ID.
-
access_policy_number(str) –Access policy number.
Returns:
-
None–Successful operation.
delete_network_switch_dhcp_server_policy_arp_inspection_trusted_server
Remove a server from being trusted by Dynamic ARP Inspection on this network.
API documentation: deleteNetworkSwitchDhcpServerPolicyArpInspectionTrustedServer
Parameters:
-
network_id(str) –Network ID.
-
trusted_server_id(str) –Trusted server ID.
Returns:
-
None–Successful operation.
delete_network_switch_link_aggregation
Split a link aggregation group into separate ports.
API documentation: deleteNetworkSwitchLinkAggregation
Parameters:
-
network_id(str) –Network ID.
-
link_aggregation_id(str) –Link aggregation ID.
Returns:
-
None–Successful operation.
delete_network_switch_port_schedule
Delete a switch port schedule.
API documentation: deleteNetworkSwitchPortSchedule
Parameters:
-
network_id(str) –Network ID.
-
port_schedule_id(str) –Port schedule ID.
Returns:
-
None–Successful operation.
delete_network_switch_qos_rule
Delete a quality of service rule.
API documentation: deleteNetworkSwitchQosRule
Parameters:
-
network_id(str) –Network ID.
-
qos_rule_id(str) –Qos rule ID.
Returns:
-
None–Successful operation.
delete_network_switch_routing_multicast_rendezvous_point
Delete a multicast rendezvous point.
API documentation: deleteNetworkSwitchRoutingMulticastRendezvousPoint
Parameters:
-
network_id(str) –Network ID.
-
rendezvous_point_id(str) –Rendezvous point ID.
Returns:
-
None–Successful operation.
delete_network_switch_stack
Delete a stack.
API documentation: deleteNetworkSwitchStack
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
Returns:
-
None–Successful operation.
delete_network_switch_stack_routing_interface
Delete a layer 3 interface from a switch stack.
API documentation: deleteNetworkSwitchStackRoutingInterface
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
interface_id(str) –Interface ID.
Returns:
-
None–Successful operation.
delete_network_switch_stack_routing_static_route
Delete a layer 3 static route for a switch stack.
API documentation: deleteNetworkSwitchStackRoutingStaticRoute
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
static_route_id(str) –Static route ID.
Returns:
-
None–Successful operation.
get_device_switch_port
Return a switch port.
API documentation: getDeviceSwitchPort
Parameters:
-
serial(str) –Serial.
-
port_id(str) –Port ID.
Returns:
-
DeviceSwitchPortResponse–Successful operation.
Example API response
{
"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
}
}
get_device_switch_ports
List the switch ports for a switch.
API documentation: getDeviceSwitchPorts
Parameters:
-
serial(str) –Serial.
Returns:
-
PaginatedResponse[DeviceSwitchPortResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"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
}
}
]
get_device_switch_ports_statuses
Return the status for all the ports of a switch.
API documentation: getDeviceSwitchPortsStatuses
Parameters:
-
serial(str) –Serial.
-
t0(str | None, default:None) –The beginning of the timespan for the data. The maximum lookback period is 31 days from today.
-
timespan(float | None, default:None) –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.
Returns:
-
PaginatedResponse[GetDeviceSwitchPortsStatusesResponseItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"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"
}
}
}
]
get_device_switch_ports_statuses_packets
Return the packet counters for all the ports of a switch.
API documentation: getDeviceSwitchPortsStatusesPackets
Parameters:
-
serial(str) –Serial.
-
t0(str | None, default:None) –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).
-
timespan(float | None, default:None) –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.
Returns:
-
PaginatedResponse[GetDeviceSwitchPortsStatusesPacketsResponseItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"portId": "1",
"packets": [
{
"desc": "Total",
"total": 112081,
"sent": 104135,
"recv": 7946,
"ratePerSec": {
"total": 1,
"sent": 1,
"recv": 0
}
}
]
}
]
get_device_switch_routing_interface
Return a layer 3 interface for a switch.
API documentation: getDeviceSwitchRoutingInterface
Parameters:
-
serial(str) –Serial.
-
interface_id(str) –Interface ID.
Returns:
-
CreateDeviceSwitchRoutingInterfaceResponse–Successful operation.
Example API response
{
"interfaceId": "1234",
"name": "L3 interface",
"mode": "vlan",
"subnet": "192.168.1.0/24",
"interfaceIp": "192.168.1.2",
"mtu": 1500,
"serial": "Q234-ABCD-5678",
"switchPortId": "1",
"multicastRouting": "disabled",
"vlanId": 100,
"uplinkV4": false,
"uplinkV6": false,
"ospfSettings": {
"area": "0",
"cost": 1,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ospfV3": {
"area": "1",
"cost": 2,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ipv6": {
"assignmentMode": "static",
"address": "2001:db8::1",
"prefix": "2001:db8::/32",
"gateway": "2001:db8::2"
},
"vrf": {
"name": "Blue"
},
"defaultGateway": "192.168.1.1"
}
get_device_switch_routing_interface_dhcp
Return a layer 3 interface DHCP configuration for a switch.
API documentation: getDeviceSwitchRoutingInterfaceDhcp
Parameters:
-
serial(str) –Serial.
-
interface_id(str) –Interface ID.
Returns:
-
GetDeviceSwitchRoutingInterfaceDhcpResponse–Successful operation.
Example API response
{
"dhcpMode": "dhcpServer",
"dhcpRelayServerIps": [
"1.2.3.4"
],
"dhcpLeaseTime": "1 day",
"dnsNameserversOption": "custom",
"dnsCustomNameservers": [
"8.8.8.8, 8.8.4.4"
],
"bootOptionsEnabled": true,
"bootNextServer": "1.2.3.4",
"bootFileName": "home_boot_file",
"dhcpOptions": [
{
"code": "5",
"type": "text",
"value": "five"
}
],
"reservedIpRanges": [
{
"start": "192.168.1.1",
"end": "192.168.1.10",
"comment": "A reserved IP range"
}
],
"fixedIpAssignments": [
{
"name": "Cisco Meraki valued client",
"mac": "22:33:44:55:66:77",
"ip": "192.168.1.12"
}
]
}
get_device_switch_routing_interfaces
List layer 3 interfaces for a switch.
API documentation: getDeviceSwitchRoutingInterfaces
Parameters:
-
serial(str) –Serial.
-
mode(GetDeviceSwitchRoutingInterfacesMode | None, default:None) –Optional parameter to filter L3 interfaces by mode.
-
protocol(GetDeviceSwitchRoutingInterfacesProtocol | None, default:None) –Optional parameter to filter L3 interfaces by protocol.
Returns:
-
PaginatedResponse[CreateDeviceSwitchRoutingInterfaceResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"interfaceId": "1234",
"name": "L3 interface",
"mode": "vlan",
"subnet": "192.168.1.0/24",
"interfaceIp": "192.168.1.2",
"mtu": 1500,
"serial": "Q234-ABCD-5678",
"switchPortId": "1",
"multicastRouting": "disabled",
"vlanId": 100,
"uplinkV4": false,
"uplinkV6": false,
"ospfSettings": {
"area": "0",
"cost": 1,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ospfV3": {
"area": "1",
"cost": 2,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ipv6": {
"assignmentMode": "static",
"address": "2001:db8::1",
"prefix": "2001:db8::/32",
"gateway": "2001:db8::2"
},
"vrf": {
"name": "Blue"
},
"defaultGateway": "192.168.1.1"
}
]
get_device_switch_routing_static_route
Return a layer 3 static route for a switch.
API documentation: getDeviceSwitchRoutingStaticRoute
Parameters:
-
serial(str) –Serial.
-
static_route_id(str) –Static route ID.
Returns:
-
CreateDeviceSwitchRoutingStaticRouteResponse–Successful operation.
Example API response
{
"staticRouteId": "1234",
"name": "My route",
"subnet": "192.168.1.0/24",
"nextHopIp": "1.2.3.4",
"managementNextHop": "1.2.3.5",
"vrf": {
"name": "Blue",
"leakRouteToDefaultVrf": false
},
"advertiseViaOspfEnabled": false,
"preferOverOspfRoutesEnabled": false
}
get_device_switch_routing_static_routes
List layer 3 static routes for a switch.
API documentation: getDeviceSwitchRoutingStaticRoutes
Parameters:
-
serial(str) –Serial.
Returns:
-
PaginatedResponse[CreateDeviceSwitchRoutingStaticRouteResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"staticRouteId": "1234",
"name": "My route",
"subnet": "192.168.1.0/24",
"nextHopIp": "1.2.3.4",
"managementNextHop": "1.2.3.5",
"vrf": {
"name": "Blue",
"leakRouteToDefaultVrf": false
},
"advertiseViaOspfEnabled": false,
"preferOverOspfRoutesEnabled": false
}
]
get_device_switch_warm_spare
Return warm spare configuration for a switch.
API documentation: getDeviceSwitchWarmSpare
Parameters:
-
serial(str) –Serial.
Returns:
-
DeviceSwitchWarmSpareResponse–Successful operation.
Example API response
{
"enabled": true,
"primarySerial": "Q234-ABCD-0001",
"spareSerial": "Q234-ABCD-0002"
}
get_network_switch_access_control_lists
Return the access control lists for a MS network.
API documentation: getNetworkSwitchAccessControlLists
Parameters:
-
network_id(str) –Network ID.
Returns:
-
NetworkSwitchAccessControlListsResponse–Successful operation.
Example API response
{
"rules": [
{
"comment": "Deny SSH",
"policy": "deny",
"ipVersion": "ipv4",
"protocol": "tcp",
"srcCidr": "10.1.10.0/24",
"srcPort": "any",
"dstCidr": "172.16.30/24",
"dstPort": "22",
"vlan": "10"
}
]
}
get_network_switch_access_policies
List the access policies for a switch network.
API documentation: getNetworkSwitchAccessPolicies
Parameters:
-
network_id(str) –Network ID.
Returns:
-
PaginatedResponse[NetworkSwitchAccessPolicyResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"accessPolicyNumber": "1234",
"name": "Access policy #1",
"radiusServers": [
{
"serverId": "1",
"organizationRadiusServerId": "42",
"host": "1.2.3.4",
"port": 22
}
],
"radius": {
"criticalAuth": {
"dataVlanId": 100,
"voiceVlanId": 100,
"suspendPortBounce": true,
"dataGroupPolicyId": "1234",
"voiceGroupPolicyId": "1234",
"dataSgtId": 1234,
"voiceSgtId": 1234
},
"failedAuthVlanId": 100,
"failedAuthGroupPolicyId": "1234",
"failedAuthSgtId": 1284392014819,
"reAuthenticationInterval": 120,
"cache": {
"enabled": false,
"timeout": 24
},
"authentication": {
"mode": "Open"
},
"preAuthenticationGroupPolicyId": "1234"
},
"enforceRadiusMonitoring": false,
"guestPortBouncing": false,
"radiusTestingEnabled": false,
"radiusCoaSupportEnabled": false,
"radiusAccountingEnabled": true,
"radiusAccountingServers": [
{
"serverId": "2",
"organizationRadiusServerId": "42",
"host": "1.2.3.4",
"port": 22
}
],
"radiusGroupAttribute": "11",
"hostMode": "Single-Host",
"accessPolicyType": "Hybrid authentication",
"increaseAccessSpeed": false,
"guestVlanId": 100,
"dot1x": {
"controlDirection": "inbound"
},
"voiceVlanClients": true,
"urlRedirectWalledGardenEnabled": true,
"urlRedirectWalledGardenRanges": [
"192.168.1.0/24"
],
"counts": {
"ports": {
"withThisPolicy": 12
}
},
"guestGroupPolicyId": "1234",
"guestSgtId": 1284392014819
}
]
get_network_switch_access_policy
Return a specific access policy for a switch network.
API documentation: getNetworkSwitchAccessPolicy
Parameters:
-
network_id(str) –Network ID.
-
access_policy_number(str) –Access policy number.
Returns:
-
NetworkSwitchAccessPolicyResponse–Successful operation.
Example API response
{
"accessPolicyNumber": "1234",
"name": "Access policy #1",
"radiusServers": [
{
"serverId": "1",
"organizationRadiusServerId": "42",
"host": "1.2.3.4",
"port": 22
}
],
"radius": {
"criticalAuth": {
"dataVlanId": 100,
"voiceVlanId": 100,
"suspendPortBounce": true,
"dataGroupPolicyId": "1234",
"voiceGroupPolicyId": "1234",
"dataSgtId": 1234,
"voiceSgtId": 1234
},
"failedAuthVlanId": 100,
"failedAuthGroupPolicyId": "1234",
"failedAuthSgtId": 1284392014819,
"reAuthenticationInterval": 120,
"cache": {
"enabled": false,
"timeout": 24
},
"authentication": {
"mode": "Open"
},
"preAuthenticationGroupPolicyId": "1234"
},
"enforceRadiusMonitoring": false,
"guestPortBouncing": false,
"radiusTestingEnabled": false,
"radiusCoaSupportEnabled": false,
"radiusAccountingEnabled": true,
"radiusAccountingServers": [
{
"serverId": "2",
"organizationRadiusServerId": "42",
"host": "1.2.3.4",
"port": 22
}
],
"radiusGroupAttribute": "11",
"hostMode": "Single-Host",
"accessPolicyType": "Hybrid authentication",
"increaseAccessSpeed": false,
"guestVlanId": 100,
"dot1x": {
"controlDirection": "inbound"
},
"voiceVlanClients": true,
"urlRedirectWalledGardenEnabled": true,
"urlRedirectWalledGardenRanges": [
"192.168.1.0/24"
],
"counts": {
"ports": {
"withThisPolicy": 12
}
},
"guestGroupPolicyId": "1234",
"guestSgtId": 1284392014819
}
get_network_switch_alternate_management_interface
Return the switch alternate management interface for the network.
API documentation: getNetworkSwitchAlternateManagementInterface
Parameters:
-
network_id(str) –Network ID.
Returns:
-
NetworkSwitchAlternateManagementInterfaceResponse–Successful operation.
Example API response
{
"enabled": true,
"useOobMgmt": false,
"vlanId": 100,
"protocols": [
"radius",
"snmp",
"syslog"
],
"switches": [
{
"serial": "Q234-ABCD-5678",
"alternateManagementIp": "1.2.3.4",
"subnetMask": "255.255.255.0",
"gateway": "1.2.3.5"
}
]
}
get_network_switch_dhcp_server_policy
Return the DHCP server settings.
API documentation: getNetworkSwitchDhcpServerPolicy
Parameters:
-
network_id(str) –Network ID.
Returns:
-
NetworkSwitchDhcpServerPolicyResponse–Successful operation.
Example API response
{
"alerts": {
"email": {
"enabled": true
}
},
"defaultPolicy": "block",
"blockedServers": [
"00:50:56:00:00:03",
"00:50:56:00:00:04"
],
"allowedServers": [
"00:50:56:00:00:01",
"00:50:56:00:00:02"
],
"alwaysAllowedServers": [
"00:50:56:00:00:05",
"00:50:56:00:00:06"
],
"arpInspection": {
"enabled": true,
"unsupportedModels": [
"MS120-8",
"MS125-24"
]
}
}
get_network_switch_dhcp_server_policy_arp_inspection_trusted_servers
Return the list of servers trusted by Dynamic ARP Inspection on this network.
API documentation: getNetworkSwitchDhcpServerPolicyArpInspectionTrustedServers
Parameters:
-
network_id(str) –Network ID.
-
per_page(int | None, default:None) –The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
-
starting_after(str | None, default:None) –A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
ending_before(str | None, default:None) –A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
total_pages(int | Literal['all'], default:'all') –use with per_page to get total results up to total_pages * per_page; -1 or "all" for all pages.
-
direction(Literal['prev', 'next'], default:'next') –direction to paginate, either "next" (default) or "prev" page.
Returns:
-
PaginatedResponse[NetworkSwitchDhcpServerPolicyArpInspectionTrustedServerResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"trustedServerId": "123",
"mac": "00:11:22:33:44:55",
"vlan": 100,
"ipv4": {
"address": "1.2.3.4"
}
}
]
get_network_switch_dhcp_server_policy_arp_inspection_warnings_by_device
Return the devices that have a Dynamic ARP Inspection warning and their warnings.
API documentation: getNetworkSwitchDhcpServerPolicyArpInspectionWarningsByDevice
Parameters:
-
network_id(str) –Network ID.
-
per_page(int | None, default:None) –The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
-
starting_after(str | None, default:None) –A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
ending_before(str | None, default:None) –A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
total_pages(int | Literal['all'], default:'all') –use with per_page to get total results up to total_pages * per_page; -1 or "all" for all pages.
-
direction(Literal['prev', 'next'], default:'next') –direction to paginate, either "next" (default) or "prev" page.
Returns:
-
PaginatedResponse[GetNetworkSwitchDhcpServerPolicyArpInspectionWarningsByDeviceResponseItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"serial": "Q234-ABCD-0001",
"name": "My switch",
"url": "https://n1.meraki.com//n//manage/nodes/new_list/000000000000",
"supportsInspection": false,
"hasTrustedPort": false
}
]
get_network_switch_dhcp_v4_servers_seen
Return the network's DHCPv4 servers seen within the selected timeframe (default 1 day).
API documentation: getNetworkSwitchDhcpV4ServersSeen
Parameters:
-
network_id(str) –Network ID.
-
t0(str | None, default:None) –The beginning of the timespan for the data. The maximum lookback period is 31 days from today.
-
timespan(float | None, default:None) –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.
-
per_page(int | None, default:None) –The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
-
starting_after(str | None, default:None) –A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
ending_before(str | None, default:None) –A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
total_pages(int | Literal['all'], default:'all') –use with per_page to get total results up to total_pages * per_page; -1 or "all" for all pages.
-
direction(Literal['prev', 'next'], default:'next') –direction to paginate, either "next" (default) or "prev" page.
Returns:
-
PaginatedResponse[GetNetworkSwitchDhcpV4ServersSeenResponseItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"mac": "00:11:22:33:44:55",
"vlan": 100,
"clientId": "k74272e",
"isAllowed": true,
"lastSeenAt": "2018-02-11T00:00:00.090210Z",
"seenBy": [
{
"serial": "Q234-ABCD-0001",
"name": "My switch2",
"url": "https://n1.meraki.com//n//manage/nodes/new_list/0000000000001"
}
],
"type": "device",
"device": {
"serial": "Q234-ABCD-0002",
"name": "My AP",
"url": "https://n1.meraki.com//n//manage/nodes/new_list/000000000000",
"interface": {
"name": "My L3 Interface",
"url": "https://n1.meraki.com//n//manage/configure/switch_l3/l3_interface/00000"
}
},
"ipv4": {
"address": "10.0.0.0/24",
"subnet": "192.168.1.0/24",
"gateway": "1.2.3.5"
},
"isConfigured": true,
"lastAck": {
"ts": "2018-02-11T00:00:00.090210Z",
"ipv4": {
"address": "123.123.123.1"
}
},
"lastPacket": {
"source": {
"mac": "00:11:22:33:44:55",
"ipv4": {
"address": "1.2.3.4"
},
"port": 443
},
"destination": {
"mac": "22:33:44:55:66:77",
"ipv4": {
"address": "123.123.123.1"
},
"port": 444
},
"type": "ACK",
"ethernet": {
"type": "0x1212"
},
"ip": {
"id": "0x1313",
"version": 4,
"length": 24929,
"headerLength": 1,
"protocol": 1,
"ttl": 50,
"dscp": {
"tag": 24,
"ecn": 1
}
},
"udp": {
"length": 24929,
"checksum": "0x1414"
},
"fields": {
"op": 1,
"htype": 1,
"hlen": 6,
"hops": 0,
"xid": "0x11111111",
"secs": 1526087474,
"flags": "0x0000",
"ciaddr": "1.2.3.4",
"yiaddr": "123.123.123.1",
"siaddr": "1.2.3.4",
"giaddr": "1.2.3.5",
"chaddr": "abcdefghijkl",
"sname": "1.2.3.4",
"magicCookie": "0x22222222",
"options": [
{
"name": "Lease time",
"value": "86400 seconds"
}
]
}
}
}
]
get_network_switch_dscp_to_cos_mappings
Return the DSCP to CoS mappings.
API documentation: getNetworkSwitchDscpToCosMappings
Parameters:
-
network_id(str) –Network ID.
Returns:
-
NetworkSwitchDscpToCosMappingsResponse–Successful operation.
Example API response
{
"mappings": [
{
"dscp": 1,
"cos": 1,
"title": "Video"
}
]
}
get_network_switch_link_aggregations
List link aggregation groups.
API documentation: getNetworkSwitchLinkAggregations
Parameters:
-
network_id(str) –Network ID.
Returns:
-
PaginatedResponse[NetworkSwitchLinkAggregationResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"id": "NDU2N18yXzM=",
"switchPorts": [
{
"serial": "Q234-ABCD-0001",
"portId": "1"
}
]
}
]
get_network_switch_mtu
Return the MTU configuration.
API documentation: getNetworkSwitchMtu
Parameters:
-
network_id(str) –Network ID.
Returns:
-
NetworkSwitchMtuResponse–Successful operation.
Example API response
{
"defaultMtuSize": 9578,
"overrides": [
{
"switches": [
"Q234-ABCD-0001",
"Q234-ABCD-0002",
"Q234-ABCD-0003"
],
"switchProfiles": [
"1284392014819",
"2983092129865"
],
"mtuSize": 1500
}
]
}
get_network_switch_port_schedules
List switch port schedules.
API documentation: getNetworkSwitchPortSchedules
Parameters:
-
network_id(str) –Network ID.
Returns:
-
PaginatedResponse[NetworkSwitchPortScheduleResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"id": "1234",
"networkId": "N_24329156",
"name": "Weekdays schedule",
"portSchedule": {
"monday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"tuesday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"wednesday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"thursday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"friday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"saturday": {
"active": false,
"from": "0:00",
"to": "24:00"
},
"sunday": {
"active": false,
"from": "0:00",
"to": "24:00"
}
}
}
]
get_network_switch_qos_rule
Return a quality of service rule.
API documentation: getNetworkSwitchQosRule
Parameters:
-
network_id(str) –Network ID.
-
qos_rule_id(str) –Qos rule ID.
Returns:
-
NetworkSwitchQosRuleResponse–Successful operation.
Example API response
{
"id": "1284392014819",
"vlan": 100,
"protocol": "TCP",
"srcPort": 2000,
"srcPortRange": "70-80",
"dstPort": 3000,
"dstPortRange": "3000-3100",
"dscp": 0
}
get_network_switch_qos_rules
List quality of service rules.
API documentation: getNetworkSwitchQosRules
Parameters:
-
network_id(str) –Network ID.
Returns:
-
PaginatedResponse[NetworkSwitchQosRuleResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"id": "1284392014819",
"vlan": 100,
"protocol": "TCP",
"srcPort": 2000,
"srcPortRange": "70-80",
"dstPort": 3000,
"dstPortRange": "3000-3100",
"dscp": 0
}
]
get_network_switch_qos_rules_order
Return the quality of service rule IDs by order in which they will be processed by the switch.
API documentation: getNetworkSwitchQosRulesOrder
Parameters:
-
network_id(str) –Network ID.
Returns:
-
NetworkSwitchQosRulesOrderResponse–Successful operation.
Example API response
{
"ruleIds": [
"1284392014819",
"2983092129865"
]
}
get_network_switch_routing_multicast
Return multicast settings for a network.
API documentation: getNetworkSwitchRoutingMulticast
Parameters:
-
network_id(str) –Network ID.
Returns:
-
NetworkSwitchRoutingMulticastResponse–Successful operation.
Example API response
{
"defaultSettings": {
"igmpSnoopingEnabled": true,
"floodUnknownMulticastTrafficEnabled": true
},
"overrides": [
{
"switches": [
"Q234-ABCD-0001",
"Q234-ABCD-0002",
"Q234-ABCD-0003"
],
"stacks": [
"789102",
"123456",
"129102"
],
"switchProfiles": [
"1234",
"4567"
],
"igmpSnoopingEnabled": true,
"floodUnknownMulticastTrafficEnabled": true
}
]
}
get_network_switch_routing_multicast_rendezvous_point
Return a multicast rendezvous point.
API documentation: getNetworkSwitchRoutingMulticastRendezvousPoint
Parameters:
-
network_id(str) –Network ID.
-
rendezvous_point_id(str) –Rendezvous point ID.
Returns:
-
NetworkSwitchRoutingMulticastRendezvousPointResponse–Successful operation.
Example API response
{
"rendezvousPointId": "1234",
"serial": "Q234-ABCD-5678",
"interfaceName": "l3_interface_0",
"interfaceIp": "192.168.1.2",
"multicastGroup": "Any"
}
get_network_switch_routing_multicast_rendezvous_points
List multicast rendezvous points.
API documentation: getNetworkSwitchRoutingMulticastRendezvousPoints
Parameters:
-
network_id(str) –Network ID.
Returns:
-
PaginatedResponse[NetworkSwitchRoutingMulticastRendezvousPointResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"rendezvousPointId": "1234",
"serial": "Q234-ABCD-5678",
"interfaceName": "l3_interface_0",
"interfaceIp": "192.168.1.2",
"multicastGroup": "Any"
}
]
get_network_switch_routing_ospf
Return layer 3 OSPF routing configuration.
API documentation: getNetworkSwitchRoutingOspf
Parameters:
-
network_id(str) –Network ID.
-
vrf(str | None, default:None) –The VRF to return the OSPF routing configuration for. When not provided, the default VRF is used. Included on networks with IOS XE 17.18 or higher.
Returns:
-
NetworkSwitchRoutingOspfResponse–Successful operation.
Example API response
{
"enabled": true,
"helloTimerInSeconds": 10,
"deadTimerInSeconds": 40,
"areas": [
{
"areaId": "1284392014819",
"areaName": "Backbone",
"areaType": "normal"
}
],
"v3": {
"enabled": true,
"helloTimerInSeconds": 10,
"deadTimerInSeconds": 40,
"areas": [
{
"areaId": "1284392014819",
"areaName": "V3 Backbone",
"areaType": "normal"
}
]
},
"md5AuthenticationEnabled": true,
"md5AuthenticationKey": {
"id": 1234,
"passphrase": "abc1234"
},
"vrf": {
"name": "Blue"
}
}
get_network_switch_settings
Returns the switch network settings.
API documentation: getNetworkSwitchSettings
Parameters:
-
network_id(str) –Network ID.
Returns:
-
NetworkSwitchSettingsResponse–Successful operation.
Example API response
{
"vlan": 100,
"useCombinedPower": false,
"powerExceptions": [
{
"serial": "Q234-ABCD-0001",
"powerType": "redundant"
}
],
"uplinkClientSampling": {
"enabled": true
},
"macBlocklist": {
"enabled": true
},
"portChannelFallback": true,
"uplinkSelection": {
"failback": {
"enabled": true
},
"candidates": "all"
}
}
get_network_switch_stack
Show a switch stack.
API documentation: getNetworkSwitchStack
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
Returns:
-
NetworkSwitchStackResponse–Successful operation.
Example API response
{
"id": "8473",
"name": "A cool stack",
"serials": [
"QBZY-XWVU-TSRQ",
"QBAB-CDEF-GHIJ"
],
"isMonitorOnly": false,
"virtualMac": "00:18:0a:4f:21:19",
"members": [
{
"serial": "QBZY-XWVU-TSRQ",
"name": "switch 1",
"model": "MS350-24-HW",
"mac": "00:18:0a:00:00:09",
"role": "active"
}
]
}
get_network_switch_stack_routing_interface
Return a layer 3 interface from a switch stack.
API documentation: getNetworkSwitchStackRoutingInterface
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
interface_id(str) –Interface ID.
Returns:
-
CreateDeviceSwitchRoutingInterfaceResponse–Successful operation.
Example API response
{
"interfaceId": "1234",
"name": "L3 interface",
"mode": "vlan",
"subnet": "192.168.1.0/24",
"interfaceIp": "192.168.1.2",
"mtu": 1500,
"serial": "Q234-ABCD-5678",
"switchPortId": "1",
"multicastRouting": "disabled",
"vlanId": 100,
"uplinkV4": false,
"uplinkV6": false,
"ospfSettings": {
"area": "0",
"cost": 1,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ospfV3": {
"area": "1",
"cost": 2,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ipv6": {
"assignmentMode": "static",
"address": "2001:db8::1",
"prefix": "2001:db8::/32",
"gateway": "2001:db8::2"
},
"vrf": {
"name": "Blue"
},
"defaultGateway": "192.168.1.1"
}
get_network_switch_stack_routing_interface_dhcp
Return a layer 3 interface DHCP configuration for a switch stack.
API documentation: getNetworkSwitchStackRoutingInterfaceDhcp
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
interface_id(str) –Interface ID.
Returns:
-
GetDeviceSwitchRoutingInterfaceDhcpResponse–Successful operation.
Example API response
{
"dhcpMode": "dhcpServer",
"dhcpRelayServerIps": [
"1.2.3.4"
],
"dhcpLeaseTime": "1 day",
"dnsNameserversOption": "custom",
"dnsCustomNameservers": [
"8.8.8.8, 8.8.4.4"
],
"bootOptionsEnabled": true,
"bootNextServer": "1.2.3.4",
"bootFileName": "home_boot_file",
"dhcpOptions": [
{
"code": "5",
"type": "text",
"value": "five"
}
],
"reservedIpRanges": [
{
"start": "192.168.1.1",
"end": "192.168.1.10",
"comment": "A reserved IP range"
}
],
"fixedIpAssignments": [
{
"name": "Cisco Meraki valued client",
"mac": "22:33:44:55:66:77",
"ip": "192.168.1.12"
}
]
}
get_network_switch_stack_routing_interfaces
List layer 3 interfaces for a switch stack.
API documentation: getNetworkSwitchStackRoutingInterfaces
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
mode(GetNetworkSwitchStackRoutingInterfacesMode | None, default:None) –Optional parameter to filter L3 interfaces by mode.
-
protocol(GetNetworkSwitchStackRoutingInterfacesProtocol | None, default:None) –Optional parameter to filter L3 interfaces by protocol.
Returns:
-
PaginatedResponse[CreateDeviceSwitchRoutingInterfaceResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"interfaceId": "1234",
"name": "L3 interface",
"mode": "vlan",
"subnet": "192.168.1.0/24",
"interfaceIp": "192.168.1.2",
"mtu": 1500,
"serial": "Q234-ABCD-5678",
"switchPortId": "1",
"multicastRouting": "disabled",
"vlanId": 100,
"uplinkV4": false,
"uplinkV6": false,
"ospfSettings": {
"area": "0",
"cost": 1,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ospfV3": {
"area": "1",
"cost": 2,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ipv6": {
"assignmentMode": "static",
"address": "2001:db8::1",
"prefix": "2001:db8::/32",
"gateway": "2001:db8::2"
},
"vrf": {
"name": "Blue"
},
"defaultGateway": "192.168.1.1"
}
]
get_network_switch_stack_routing_static_route
Return a layer 3 static route for a switch stack.
API documentation: getNetworkSwitchStackRoutingStaticRoute
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
static_route_id(str) –Static route ID.
Returns:
-
CreateDeviceSwitchRoutingStaticRouteResponse–Successful operation.
Example API response
{
"staticRouteId": "1234",
"name": "My route",
"subnet": "192.168.1.0/24",
"nextHopIp": "1.2.3.4",
"managementNextHop": "1.2.3.5",
"vrf": {
"name": "Blue",
"leakRouteToDefaultVrf": false
},
"advertiseViaOspfEnabled": false,
"preferOverOspfRoutesEnabled": false
}
get_network_switch_stack_routing_static_routes
List layer 3 static routes for a switch stack.
API documentation: getNetworkSwitchStackRoutingStaticRoutes
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
Returns:
-
PaginatedResponse[CreateDeviceSwitchRoutingStaticRouteResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"staticRouteId": "1234",
"name": "My route",
"subnet": "192.168.1.0/24",
"nextHopIp": "1.2.3.4",
"managementNextHop": "1.2.3.5",
"vrf": {
"name": "Blue",
"leakRouteToDefaultVrf": false
},
"advertiseViaOspfEnabled": false,
"preferOverOspfRoutesEnabled": false
}
]
get_network_switch_stacks
List the switch stacks in a network.
API documentation: getNetworkSwitchStacks
Parameters:
-
network_id(str) –Network ID.
Returns:
-
PaginatedResponse[NetworkSwitchStackResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"id": "8473",
"name": "A cool stack",
"serials": [
"QBZY-XWVU-TSRQ",
"QBAB-CDEF-GHIJ"
],
"isMonitorOnly": false,
"virtualMac": "00:18:0a:4f:21:19",
"members": [
{
"serial": "QBZY-XWVU-TSRQ",
"name": "switch 1",
"model": "MS350-24-HW",
"mac": "00:18:0a:00:00:09",
"role": "active"
}
]
}
]
get_network_switch_storm_control
Return the storm control configuration for a switch network.
API documentation: getNetworkSwitchStormControl
Parameters:
-
network_id(str) –Network ID.
Returns:
-
NetworkSwitchStormControlResponse–Successful operation.
Example API response
{
"broadcastThreshold": 30,
"multicastThreshold": 30,
"unknownUnicastThreshold": 30,
"treatTheseTrafficTypesAsOneThreshold": [
"broadcast",
"multicast"
]
}
get_network_switch_stp
Returns STP settings.
API documentation: getNetworkSwitchStp
Parameters:
-
network_id(str) –Network ID.
Returns:
-
NetworkSwitchStpResponse–Successful operation.
Example API response
{
"rstpEnabled": true,
"stpBridgePriority": [
{
"switches": [
"Q234-ABCD-0001",
"Q234-ABCD-0002",
"Q234-ABCD-0003"
],
"stacks": [
"789102",
"123456",
"129102"
],
"switchProfiles": [
"1098",
"1099",
"1100"
],
"stpPriority": 4096
}
]
}
get_organization_config_template_switch_profile_port
Return a switch template port.
API documentation: getOrganizationConfigTemplateSwitchProfilePort
Parameters:
-
organization_id(str) –Organization ID.
-
config_template_id(str) –Config template ID.
-
profile_id(str) –Profile ID.
-
port_id(str) –Port ID.
Returns:
-
OrganizationConfigTemplateSwitchProfilePortResponse–Successful operation.
Example API response
{
"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,
"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
}
}
get_organization_config_template_switch_profile_ports
Return all the ports of a switch template.
API documentation: getOrganizationConfigTemplateSwitchProfilePorts
Parameters:
-
organization_id(str) –Organization ID.
-
config_template_id(str) –Config template ID.
-
profile_id(str) –Profile ID.
Returns:
-
PaginatedResponse[OrganizationConfigTemplateSwitchProfilePortResponse]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"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,
"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
}
}
]
get_organization_config_template_switch_profiles
List the switch templates for your switch template configuration.
API documentation: getOrganizationConfigTemplateSwitchProfiles
Parameters:
-
organization_id(str) –Organization ID.
-
config_template_id(str) –Config template ID.
Returns:
-
PaginatedResponse[GetOrganizationConfigTemplateSwitchProfilesResponseItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"switchProfileId": "1234",
"name": "A Simple Switch Template",
"model": "MS450-24"
}
]
get_organization_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).
API documentation: getOrganizationSummarySwitchPowerHistory
Parameters:
-
organization_id(str) –Organization ID.
-
t0(str | None, default:None) –The beginning of the timespan for the data.
-
t1(str | None, default:None) –The end of the timespan for the data. t1 can be a maximum of 186 days after t0.
-
timespan(float | None, default:None) –The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 186 days. The default is 1 day.
Returns:
-
PaginatedResponse[GetOrganizationSummarySwitchPowerHistoryResponseItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
[
{
"ts": "2021-06-20T01:00:00.000Z",
"draw": 5.4321
}
]
get_organization_switch_ports_by_switch
List the switchports in an organization by switch.
API documentation: getOrganizationSwitchPortsBySwitch
Parameters:
-
organization_id(str) –Organization ID.
-
per_page(int | None, default:None) –The number of entries per page returned. Acceptable range is 3 - 50. Default is 50.
-
starting_after(str | None, default:None) –A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
ending_before(str | None, default:None) –A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
configuration_updated_after(str | None, default:None) –Optional parameter to filter items to switches where the configuration has been updated after the given timestamp.
-
mac(str | None, default:None) –Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match.
-
macs(list[str] | None, default:None) –Optional parameter to filter items to switches that have one of the provided MAC addresses.
-
name(str | None, default:None) –Optional parameter to filter items to switches with names that contain the search term or are an exact match.
-
network_ids(list[str] | None, default:None) –Optional parameter to filter items to switches in one of the provided networks.
-
port_profile_ids(list[str] | None, default:None) –Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles.
-
serial(str | None, default:None) –Optional parameter to filter items to switches with serial number that contains the search term or are an exact match.
-
serials(list[str] | None, default:None) –Optional parameter to filter items to switches that have one of the provided serials.
-
total_pages(int | Literal['all'], default:'all') –use with per_page to get total results up to total_pages * per_page; -1 or "all" for all pages.
-
direction(Literal['prev', 'next'], default:'next') –direction to paginate, either "next" (default) or "prev" page.
Returns:
-
PaginatedResponse[GetOrganizationSwitchPortsBySwitchResponsePortsItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
{
"name": "Example Switch",
"serial": "Q555-5555-5555",
"mac": "01:23:45:67:ab:cd",
"network": {
"name": "Example Network",
"id": "L_12345"
},
"model": "MS120-8",
"ports": [
{
"portId": "1",
"name": "My switch port",
"tags": [
"tag1",
"tag2"
],
"enabled": true,
"poeEnabled": true,
"type": "access",
"vlan": 10,
"voiceVlan": 20,
"allowedVlans": "1,3,5-10",
"rstpEnabled": true,
"stpGuard": "disabled",
"linkNegotiation": "Auto negotiate",
"accessPolicyType": "Sticky MAC allow list",
"stickyMacAllowList": [
"34:56:fe:ce:8e:b0",
"34:56:fe:ce:8e:b1"
],
"stickyMacAllowListLimit": 5
}
]
}
get_organization_switch_ports_clients_overview_by_device
List the number of clients for all switchports with at least one online client in an organization.
API documentation: getOrganizationSwitchPortsClientsOverviewByDevice
Parameters:
-
organization_id(str) –Organization ID.
-
t0(str | None, default:None) –The beginning of the timespan for the data. The maximum lookback period is 31 days from today.
-
timespan(float | None, default:None) –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.
-
per_page(int | None, default:None) –The number of entries per page returned. Acceptable range is 3 - 20. Default is 20.
-
starting_after(str | None, default:None) –A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
ending_before(str | None, default:None) –A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
configuration_updated_after(str | None, default:None) –Optional parameter to filter items to switches where the configuration has been updated after the given timestamp.
-
mac(str | None, default:None) –Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match.
-
macs(list[str] | None, default:None) –Optional parameter to filter items to switches that have one of the provided MAC addresses.
-
name(str | None, default:None) –Optional parameter to filter items to switches with names that contain the search term or are an exact match.
-
network_ids(list[str] | None, default:None) –Optional parameter to filter items to switches in one of the provided networks.
-
port_profile_ids(list[str] | None, default:None) –Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles.
-
serial(str | None, default:None) –Optional parameter to filter items to switches with serial number that contains the search term or are an exact match.
-
serials(list[str] | None, default:None) –Optional parameter to filter items to switches that have one of the provided serials.
-
total_pages(int | Literal['all'], default:'all') –use with per_page to get total results up to total_pages * per_page; -1 or "all" for all pages.
-
direction(Literal['prev', 'next'], default:'next') –direction to paginate, either "next" (default) or "prev" page.
Returns:
-
PaginatedResponse[GetOrganizationSwitchPortsClientsOverviewByDeviceResponseItemsItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
{
"items": [
{
"name": "Example Switch",
"serial": "Q555-5555-5555",
"mac": "01:23:45:67:ab:cd",
"network": {
"name": "Example Network",
"id": "L_12345"
},
"model": "MS120-8",
"ports": [
{
"portId": "1",
"counts": {
"byStatus": {
"online": 0
}
}
}
]
}
],
"meta": {
"counts": {
"items": {
"total": 1,
"remaining": 0
}
}
}
}
get_organization_switch_ports_overview
Returns the counts of all active ports for the requested timespan, grouped by speed.
API documentation: getOrganizationSwitchPortsOverview
Parameters:
-
organization_id(str) –Organization ID.
-
t0(str | None, default:None) –The beginning of the timespan for the data.
-
t1(str | None, default:None) –The end of the timespan for the data. t1 can be a maximum of 186 days after t0.
-
timespan(float | None, default:None) –The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be greater than or equal to 12 hours and be less than or equal to 186 days. The default is 1 day.
Returns:
-
GetOrganizationSwitchPortsOverviewResponse–Successful operation.
Example API response
{
"counts": {
"total": 120,
"byStatus": {
"active": {
"total": 87,
"byMediaAndLinkSpeed": {
"rj45": {
"total": 24,
"10": 0,
"100": 0,
"1000": 24,
"2500": 0,
"5000": 0,
"10000": 0
},
"sfp": {
"total": 63,
"100": 8,
"1000": 40,
"10000": 10,
"20000": 0,
"25000": 0,
"40000": 1,
"50000": 0,
"100000": 0
}
}
},
"inactive": {
"total": 33,
"byMedia": {
"rj45": {
"total": 16
},
"sfp": {
"total": 17
}
}
}
}
}
}
get_organization_switch_ports_statuses_by_switch
List the switchports in an organization.
API documentation: getOrganizationSwitchPortsStatusesBySwitch
Parameters:
-
organization_id(str) –Organization ID.
-
per_page(int | None, default:None) –The number of entries per page returned. Acceptable range is 3 - 20. Default is 10.
-
starting_after(str | None, default:None) –A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
ending_before(str | None, default:None) –A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
configuration_updated_after(str | None, default:None) –Optional parameter to filter items to switches where the configuration has been updated after the given timestamp.
-
mac(str | None, default:None) –Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match.
-
macs(list[str] | None, default:None) –Optional parameter to filter items to switches that have one of the provided MAC addresses.
-
name(str | None, default:None) –Optional parameter to filter items to switches with names that contain the search term or are an exact match.
-
network_ids(list[str] | None, default:None) –Optional parameter to filter items to switches in one of the provided networks.
-
port_profile_ids(list[str] | None, default:None) –Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles.
-
serial(str | None, default:None) –Optional parameter to filter items to switches with serial number that contains the search term or are an exact match.
-
serials(list[str] | None, default:None) –Optional parameter to filter items to switches that have one of the provided serials.
-
total_pages(int | Literal['all'], default:'all') –use with per_page to get total results up to total_pages * per_page; -1 or "all" for all pages.
-
direction(Literal['prev', 'next'], default:'next') –direction to paginate, either "next" (default) or "prev" page.
Returns:
-
PaginatedResponse[GetOrganizationSwitchPortsStatusesBySwitchResponseItemsItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
{
"items": [
{
"name": "Example Switch",
"serial": "Q555-5555-5555",
"mac": "01:23:45:67:ab:cd",
"network": {
"name": "Example Network",
"id": "L_12345"
},
"model": "MS120-8",
"ports": [
{
"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
},
"securePort": {
"active": true,
"authenticationStatus": "Authentication in progress"
}
}
]
}
],
"meta": {
"counts": {
"items": {
"total": 1,
"remaining": 0
}
}
}
}
get_organization_switch_ports_topology_discovery_by_device
List most recently seen LLDP/CDP discovery and topology information per switch port in an organization.
API documentation: getOrganizationSwitchPortsTopologyDiscoveryByDevice
Parameters:
-
organization_id(str) –Organization ID.
-
t0(str | None, default:None) –The beginning of the timespan for the data. The maximum lookback period is 31 days from today.
-
timespan(float | None, default:None) –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.
-
per_page(int | None, default:None) –The number of entries per page returned. Acceptable range is 3 - 20. Default is 10.
-
starting_after(str | None, default:None) –A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
ending_before(str | None, default:None) –A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
configuration_updated_after(str | None, default:None) –Optional parameter to filter items to switches where the configuration has been updated after the given timestamp.
-
mac(str | None, default:None) –Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match.
-
macs(list[str] | None, default:None) –Optional parameter to filter items to switches that have one of the provided MAC addresses.
-
name(str | None, default:None) –Optional parameter to filter items to switches with names that contain the search term or are an exact match.
-
network_ids(list[str] | None, default:None) –Optional parameter to filter items to switches in one of the provided networks.
-
port_profile_ids(list[str] | None, default:None) –Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles.
-
serial(str | None, default:None) –Optional parameter to filter items to switches with serial number that contains the search term or are an exact match.
-
serials(list[str] | None, default:None) –Optional parameter to filter items to switches that have one of the provided serials.
-
total_pages(int | Literal['all'], default:'all') –use with per_page to get total results up to total_pages * per_page; -1 or "all" for all pages.
-
direction(Literal['prev', 'next'], default:'next') –direction to paginate, either "next" (default) or "prev" page.
Returns:
-
PaginatedResponse[GetOrganizationSwitchPortsTopologyDiscoveryByDeviceResponseItemsItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
{
"items": [
{
"name": "Example Switch",
"serial": "Q555-5555-5555",
"mac": "01:23:45:67:ab:cd",
"network": {
"name": "Example Network",
"id": "L_12345"
},
"model": "MS120-8",
"ports": [
{
"portId": "1",
"lastUpdatedAt": "ISO8061Z",
"cdp": [
{
"name": "System name",
"value": "MS350-24X - Test"
}
],
"lldp": [
{
"name": "System name",
"value": "MS350-24X - Test"
}
]
}
]
}
],
"meta": {
"counts": {
"items": {
"total": 1,
"remaining": 0
}
}
}
}
get_organization_switch_ports_usage_history_by_device_by_interval
List the historical usage and traffic data of switchports in an organization.
API documentation: getOrganizationSwitchPortsUsageHistoryByDeviceByInterval
Parameters:
-
organization_id(str) –Organization ID.
-
t0(str | None, default:None) –The beginning of the timespan for the data. The maximum lookback period is 31 days from today.
-
t1(str | None, default:None) –The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
-
timespan(float | None, default:None) –The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. If interval is provided, the timespan will be autocalculated.
-
interval(int | None, default:None) –The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided.
-
per_page(int | None, default:None) –The number of entries per page returned. Acceptable range is 3 - 50. Default is 10.
-
starting_after(str | None, default:None) –A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
ending_before(str | None, default:None) –A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
configuration_updated_after(str | None, default:None) –Optional parameter to filter items to switches where the configuration has been updated after the given timestamp.
-
mac(str | None, default:None) –Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match.
-
macs(list[str] | None, default:None) –Optional parameter to filter items to switches that have one of the provided MAC addresses.
-
name(str | None, default:None) –Optional parameter to filter items to switches with names that contain the search term or are an exact match.
-
network_ids(list[str] | None, default:None) –Optional parameter to filter items to switches in one of the provided networks.
-
port_profile_ids(list[str] | None, default:None) –Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles.
-
serial(str | None, default:None) –Optional parameter to filter items to switches with serial number that contains the search term or are an exact match.
-
serials(list[str] | None, default:None) –Optional parameter to filter items to switches that have one of the provided serials.
-
total_pages(int | Literal['all'], default:'all') –use with per_page to get total results up to total_pages * per_page; -1 or "all" for all pages.
-
direction(Literal['prev', 'next'], default:'next') –direction to paginate, either "next" (default) or "prev" page.
Returns:
-
PaginatedResponse[GetOrganizationSwitchPortsUsageHistoryByDeviceByIntervalResponseItemsItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
{
"items": [
{
"name": "Example Switch",
"serial": "Q555-5555-5555",
"mac": "01:23:45:67:ab:cd",
"network": {
"name": "Example Network",
"id": "L_12345"
},
"model": "MS120-8",
"ports": [
{
"portId": "1",
"intervals": [
{
"startTs": "2024-02-11T00:00:00.090210Z",
"endTs": "2024-02-11T00:20:00.090210Z",
"data": {
"usage": {
"total": 40867,
"upstream": 23008,
"downstream": 17859
}
},
"bandwidth": {
"usage": {
"total": 2.2,
"upstream": 1.2,
"downstream": 1.0
}
},
"energy": {
"usage": {
"total": 2.2
}
}
}
]
}
]
}
],
"meta": {
"counts": {
"items": {
"total": 1,
"remaining": 0
}
}
}
}
remove_network_switch_stack
Remove a switch from a stack.
API documentation: removeNetworkSwitchStack
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
serial(str) –The serial of the switch to be removed.
Returns:
-
NetworkSwitchStackResponse–Successful operation.
Example API response
{
"id": "8473",
"name": "A cool stack",
"serials": [
"QBZY-XWVU-TSRQ",
"QBAB-CDEF-GHIJ"
],
"isMonitorOnly": false,
"virtualMac": "00:18:0a:4f:21:19",
"members": [
{
"serial": "QBZY-XWVU-TSRQ",
"name": "switch 1",
"model": "MS350-24-HW",
"mac": "00:18:0a:00:00:09",
"role": "active"
}
]
}
update_device_switch_port
Update a switch port.
API documentation: updateDeviceSwitchPort
Parameters:
-
serial(str) –Serial.
-
port_id(str) –Port ID.
-
name(str | None, default:None) –The name of the switch port.
-
tags(list[str] | None, default:None) –The list of tags of the switch port.
-
enabled(bool | None, default:None) –The status of the switch port.
-
poe_enabled(bool | None, default:None) –The PoE status of the switch port.
-
type_(UpdateDeviceSwitchPortType | None, default:None) –The type of the switch port ('access', 'trunk', 'stack', 'routed', 'svl' or 'dad').
-
vlan(int | None, default:None) –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.
-
voice_vlan(int | None, default:None) –The voice VLAN of the switch port. Only applicable to access ports.
-
allowed_vlans(str | None, default:None) –The VLANs allowed on the switch port. Only applicable to trunk ports.
-
isolation_enabled(bool | None, default:None) –The isolation status of the switch port.
-
rstp_enabled(bool | None, default:None) –The rapid spanning tree protocol status.
-
stp_guard(UpdateDeviceSwitchPortStpGuard | None, default:None) –The state of the STP guard ('disabled', 'root guard', 'bpdu guard' or 'loop guard').
-
stp_port_fast_trunk(bool | None, default:None) –The state of STP PortFast Trunk on the switch port.
-
link_negotiation(str | None, default:None) –The link speed for the switch port.
-
port_schedule_id(str | None, default:None) –The ID of the port schedule. A value of null will clear the port schedule.
-
udld(UpdateDeviceSwitchPortUdld | None, default:None) –The action to take when Unidirectional Link is detected (Alert only, Enforce). Default configuration is Alert only.
-
access_policy_type(UpdateDeviceSwitchPortAccessPolicyType | None, default:None) –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'.
-
access_policy_number(int | None, default:None) –The number of a custom access policy to configure on the switch port. Only applicable when 'accessPolicyType' is 'Custom access policy'.
-
mac_allow_list(list[str] | None, default:None) –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'.
-
mac_whitelist_limit(int | None, default:None) –The maximum number of MAC addresses for regular MAC allow list. Only applicable when 'accessPolicyType' is 'MAC allow list'. Note: Config only supported on verions greater than ms18 only for classic switches.
-
sticky_mac_allow_list(list[str] | None, default:None) –The initial list of MAC addresses for sticky Mac allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'.
-
sticky_mac_allow_list_limit(int | None, default:None) –The maximum number of MAC addresses for sticky MAC allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'.
-
storm_control_enabled(bool | None, default:None) –The storm control status of the switch port.
-
adaptive_policy_group_id(str | None, default:None) –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.
-
peer_sgt_capable(bool | None, default:None) –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.
-
flexible_stacking_enabled(bool | None, default:None) –For supported switches (e.g. MS420/MS425), whether or not the port has flexible stacking enabled.
-
dai_trusted(bool | None, default:None) –If true, ARP packets for this port will be considered trusted, and Dynamic ARP Inspection will allow the traffic.
-
profile(UpdateDeviceSwitchPortProfile | None, default:None) –Profile attributes.
-
dot3az(UpdateDeviceSwitchPortDot3az | None, default:None) –dot3az settings for the port.
-
high_speed(UpdateDeviceSwitchPortHighSpeed | None, default:None) –High speed port enablement settings for C9500-32QC.
Returns:
-
DeviceSwitchPortResponse–Successful operation.
Example API response
{
"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
}
}
update_device_switch_routing_interface
Update a layer 3 interface for a switch.
API documentation: updateDeviceSwitchRoutingInterface
Parameters:
-
serial(str) –Serial.
-
interface_id(str) –Interface ID.
-
name(str | None, default:None) –A friendly name or description for the interface or VLAN (max length 128 characters).
-
subnet(str | None, default:None) –The network that this L3 interface is on, in CIDR notation (ex. 10.1.1.0/24).
-
switch_port_id(str | None, default:None) –Switch Port ID when in Routed mode (CS 17.18 or higher required).
-
interface_ip(str | None, default:None) –The IP address that will be used for Layer 3 routing on this VLAN or subnet. This cannot be the same as the device management IP.
-
mtu(int | None, default:None) –The interface MTU. Applies to native switch layer 3 interfaces, including VLAN and routed modes.
-
multicast_routing(UpdateDeviceSwitchRoutingInterfaceMulticastRouting | None, default:None) –Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'.
-
vlan_id(int | None, default:None) –The VLAN this L3 interface is on. VLAN must be between 1 and 4094.
-
default_gateway(str | None, default:None) –The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface.
-
ospf_settings(UpdateDeviceSwitchRoutingInterfaceOspfSettings | None, default:None) –The OSPF routing settings of the interface.
-
ipv6(UpdateDeviceSwitchRoutingInterfaceIpv6 | None, default:None) –The IPv6 settings of the interface.
-
vrf(UpdateDeviceSwitchRoutingInterfaceVrf | None, default:None) –The VRF settings of the interface. Requires IOS XE 17.18 or higher.
-
loopback(dict[str, Any] | None, default:None) –The loopback settings of the interface.
Returns:
-
CreateDeviceSwitchRoutingInterfaceResponse–Successful operation.
Example API response
{
"interfaceId": "1234",
"name": "L3 interface",
"mode": "vlan",
"subnet": "192.168.1.0/24",
"interfaceIp": "192.168.1.2",
"mtu": 1500,
"serial": "Q234-ABCD-5678",
"switchPortId": "1",
"multicastRouting": "disabled",
"vlanId": 100,
"uplinkV4": false,
"uplinkV6": false,
"ospfSettings": {
"area": "0",
"cost": 1,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ospfV3": {
"area": "1",
"cost": 2,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ipv6": {
"assignmentMode": "static",
"address": "2001:db8::1",
"prefix": "2001:db8::/32",
"gateway": "2001:db8::2"
},
"vrf": {
"name": "Blue"
},
"defaultGateway": "192.168.1.1"
}
update_device_switch_routing_interface_dhcp
Update a layer 3 interface DHCP configuration for a switch.
API documentation: updateDeviceSwitchRoutingInterfaceDhcp
Parameters:
-
serial(str) –Serial.
-
interface_id(str) –Interface ID.
-
dhcp_mode(UpdateDeviceSwitchRoutingInterfaceDhcpDhcpMode | None, default:None) –The DHCP mode options for the switch interface ('dhcpDisabled', 'dhcpRelay' or 'dhcpServer').
-
dhcp_relay_server_ips(list[str] | None, default:None) –The DHCP relay server IPs to which DHCP packets would get relayed for the switch interface.
-
dhcp_lease_time(UpdateDeviceSwitchRoutingInterfaceDhcpDhcpLeaseTime | None, default:None) –The DHCP lease time config for the dhcp server running on switch interface ('30 minutes', '1 hour', '4 hours', '12 hours', '1 day' or '1 week').
-
dns_nameservers_option(UpdateDeviceSwitchRoutingInterfaceDhcpDnsNameserversOption | None, default:None) –The DHCP name server option for the dhcp server running on the switch interface ('googlePublicDns', 'openDns' or 'custom').
-
dns_custom_nameservers(list[str] | None, default:None) –The DHCP name server IPs when DHCP name server option is 'custom'.
-
boot_options_enabled(bool | None, default:None) –Enable DHCP boot options to provide PXE boot options configs for the dhcp server running on the switch interface.
-
boot_next_server(str | None, default:None) –The PXE boot server IP for the DHCP server running on the switch interface.
-
boot_file_name(str | None, default:None) –The PXE boot server filename for the DHCP server running on the switch interface.
-
dhcp_options(list[UpdateDeviceSwitchRoutingInterfaceDhcpDhcpOptionsItem] | None, default:None) –Array of DHCP options consisting of code, type and value for the DHCP server running on the switch interface.
-
reserved_ip_ranges(list[UpdateDeviceSwitchRoutingInterfaceDhcpReservedIpRangesItem] | None, default:None) –Array of DHCP reserved IP assignments for the DHCP server running on the switch interface.
-
fixed_ip_assignments(list[UpdateDeviceSwitchRoutingInterfaceDhcpFixedIpAssignmentsItem] | None, default:None) –Array of DHCP fixed IP assignments for the DHCP server running on the switch interface.
Returns:
-
GetDeviceSwitchRoutingInterfaceDhcpResponse–Successful operation.
Example API response
{
"dhcpMode": "dhcpServer",
"dhcpRelayServerIps": [
"1.2.3.4"
],
"dhcpLeaseTime": "1 day",
"dnsNameserversOption": "custom",
"dnsCustomNameservers": [
"8.8.8.8, 8.8.4.4"
],
"bootOptionsEnabled": true,
"bootNextServer": "1.2.3.4",
"bootFileName": "home_boot_file",
"dhcpOptions": [
{
"code": "5",
"type": "text",
"value": "five"
}
],
"reservedIpRanges": [
{
"start": "192.168.1.1",
"end": "192.168.1.10",
"comment": "A reserved IP range"
}
],
"fixedIpAssignments": [
{
"name": "Cisco Meraki valued client",
"mac": "22:33:44:55:66:77",
"ip": "192.168.1.12"
}
]
}
update_device_switch_routing_static_route
Update a layer 3 static route for a switch.
API documentation: updateDeviceSwitchRoutingStaticRoute
Parameters:
-
serial(str) –Serial.
-
static_route_id(str) –Static route ID.
-
name(str | None, default:None) –Name or description for layer 3 static route.
-
subnet(str | None, default:None) –The subnet which is routed via this static route and should be specified in CIDR notation (ex. 1.2.3.0/24).
-
next_hop_ip(str | None, default:None) –IP address of the next hop device to which the device sends its traffic for the subnet.
-
management_next_hop(str | None, default:None) –Optional fallback IP address for management traffic.
-
advertise_via_ospf_enabled(bool | None, default:None) –Option to advertise static route via OSPF.
-
prefer_over_ospf_routes_enabled(bool | None, default:None) –Option to prefer static route over OSPF routes.
-
vrf(UpdateDeviceSwitchRoutingStaticRouteVrf | None, default:None) –The VRF settings of the interface. Requires IOS XE 17.18 or higher.
Returns:
-
CreateDeviceSwitchRoutingStaticRouteResponse–Successful operation.
Example API response
{
"staticRouteId": "1234",
"name": "My route",
"subnet": "192.168.1.0/24",
"nextHopIp": "1.2.3.4",
"managementNextHop": "1.2.3.5",
"vrf": {
"name": "Blue",
"leakRouteToDefaultVrf": false
},
"advertiseViaOspfEnabled": false,
"preferOverOspfRoutesEnabled": false
}
update_device_switch_warm_spare
Update warm spare configuration for a switch.
API documentation: updateDeviceSwitchWarmSpare
Parameters:
-
serial(str) –Serial.
-
enabled(bool) –Enable or disable warm spare for a switch.
-
spare_serial(str | None, default:None) –Serial number of the warm spare switch.
Returns:
-
DeviceSwitchWarmSpareResponse–Successful operation.
Example API response
{
"enabled": true,
"primarySerial": "Q234-ABCD-0001",
"spareSerial": "Q234-ABCD-0002"
}
update_network_switch_access_control_lists
Update the access control lists for a MS network.
API documentation: updateNetworkSwitchAccessControlLists
Parameters:
-
network_id(str) –Network ID.
-
rules(list[UpdateNetworkSwitchAccessControlListsRulesItem]) –An ordered array of the access control list rules (not including the default rule). An empty array will clear the rules.
Returns:
-
NetworkSwitchAccessControlListsResponse–Successful operation.
Example API response
{
"rules": [
{
"comment": "Deny SSH",
"policy": "deny",
"ipVersion": "ipv4",
"protocol": "tcp",
"srcCidr": "10.1.10.0/24",
"srcPort": "any",
"dstCidr": "172.16.30/24",
"dstPort": "22",
"vlan": "10"
}
]
}
update_network_switch_access_policy
Update an access policy for a switch network.
API documentation: updateNetworkSwitchAccessPolicy
Parameters:
-
network_id(str) –Network ID.
-
access_policy_number(str) –Access policy number.
-
name(str | None, default:None) –Name of the access policy(max length 255).
-
radius_servers(list[UpdateNetworkSwitchAccessPolicyRadiusServersItem] | None, default:None) –List of RADIUS servers to require connecting devices to authenticate against before granting network access.
-
radius(UpdateNetworkSwitchAccessPolicyRadius | None, default:None) –Object for RADIUS Settings.
-
guest_port_bouncing(bool | None, default:None) –If enabled, Meraki devices will periodically send access-request messages to these RADIUS servers.
-
radius_testing_enabled(bool | None, default:None) –If enabled, Meraki devices will periodically send access-request messages to these RADIUS servers.
-
radius_coa_support_enabled(bool | None, default:None) –Change of authentication for RADIUS re-authentication and disconnection.
-
radius_accounting_enabled(bool | None, default:None) –Enable to send start, interim-update and stop messages to a configured RADIUS accounting server for tracking connected clients.
-
radius_accounting_servers(list[UpdateNetworkSwitchAccessPolicyRadiusAccountingServersItem] | None, default:None) –List of RADIUS accounting servers to require connecting devices to authenticate against before granting network access.
-
radius_group_attribute(str | None, default:None) –Acceptable values are
""for None, or"11"for Group Policies ACL. -
host_mode(UpdateNetworkSwitchAccessPolicyHostMode | None, default:None) –Choose the Host Mode for the access policy.
-
access_policy_type(UpdateNetworkSwitchAccessPolicyAccessPolicyType | None, default:None) –Access Type of the policy. Automatically 'Hybrid authentication' when hostMode is 'Multi-Domain'.
-
increase_access_speed(bool | None, default:None) –Enabling this option will make switches execute 802.1X and MAC- bypass authentication simultaneously so that clients authenticate faster. Only required when accessPolicyType is 'Hybrid Authentication.
-
guest_vlan_id(int | None, default:None) –ID for the guest VLAN allow unauthorized devices access to limited network resources.
-
dot1x(UpdateNetworkSwitchAccessPolicyDot1x | None, default:None) –802.1x Settings.
-
voice_vlan_clients(bool | None, default:None) –CDP/LLDP capable voice clients will be able to use this VLAN. Automatically true when hostMode is 'Multi-Domain'.
-
url_redirect_walled_garden_enabled(bool | None, default:None) –Enable to restrict access for clients to a specific set of IP addresses or hostnames prior to authentication.
-
url_redirect_walled_garden_ranges(list[str] | None, default:None) –IP address ranges, in CIDR notation, to restrict access for clients to a specific set of IP addresses or hostnames prior to authentication.
-
guest_group_policy_id(str | None, default:None) –Group policy Number for guest group policy.
-
guest_sgt_id(int | None, default:None) –Security Group Tag ID for guest group policy.
Returns:
-
NetworkSwitchAccessPolicyResponse–Successful operation.
Example API response
{
"accessPolicyNumber": "1234",
"name": "Access policy #1",
"radiusServers": [
{
"serverId": "1",
"organizationRadiusServerId": "42",
"host": "1.2.3.4",
"port": 22
}
],
"radius": {
"criticalAuth": {
"dataVlanId": 100,
"voiceVlanId": 100,
"suspendPortBounce": true,
"dataGroupPolicyId": "1234",
"voiceGroupPolicyId": "1234",
"dataSgtId": 1234,
"voiceSgtId": 1234
},
"failedAuthVlanId": 100,
"failedAuthGroupPolicyId": "1234",
"failedAuthSgtId": 1284392014819,
"reAuthenticationInterval": 120,
"cache": {
"enabled": false,
"timeout": 24
},
"authentication": {
"mode": "Open"
},
"preAuthenticationGroupPolicyId": "1234"
},
"enforceRadiusMonitoring": false,
"guestPortBouncing": false,
"radiusTestingEnabled": false,
"radiusCoaSupportEnabled": false,
"radiusAccountingEnabled": true,
"radiusAccountingServers": [
{
"serverId": "2",
"organizationRadiusServerId": "42",
"host": "1.2.3.4",
"port": 22
}
],
"radiusGroupAttribute": "11",
"hostMode": "Single-Host",
"accessPolicyType": "Hybrid authentication",
"increaseAccessSpeed": false,
"guestVlanId": 100,
"dot1x": {
"controlDirection": "inbound"
},
"voiceVlanClients": true,
"urlRedirectWalledGardenEnabled": true,
"urlRedirectWalledGardenRanges": [
"192.168.1.0/24"
],
"counts": {
"ports": {
"withThisPolicy": 12
}
},
"guestGroupPolicyId": "1234",
"guestSgtId": 1284392014819
}
update_network_switch_alternate_management_interface
Update the switch alternate management interface for the network.
API documentation: updateNetworkSwitchAlternateManagementInterface
Parameters:
-
network_id(str) –Network ID.
-
enabled(bool | None, default:None) –Boolean value to enable or disable AMI configuration. If enabled, VLAN and protocols must be set.
-
vlan_id(int | None, default:None) –Alternate management VLAN, must be between 1 and 4094.
-
protocols(UpdateNetworkSwitchAlternateManagementInterfaceProtocols | None, default:None) –Can be one or more of the following values: 'radius', 'snmp' or 'syslog'.
-
switches(list[UpdateNetworkSwitchAlternateManagementInterfaceSwitchesItem] | None, default:None) –Array of switch serial number and IP assignment. If parameter is present, it cannot have empty body. Note: switches parameter is not applicable for template networks, in other words, do not put 'switches' in the body when updating template networks. Also, an empty 'switches' array will remove all previous assignments.
Returns:
-
NetworkSwitchAlternateManagementInterfaceResponse–Successful operation.
Example API response
{
"enabled": true,
"useOobMgmt": false,
"vlanId": 100,
"protocols": [
"radius",
"snmp",
"syslog"
],
"switches": [
{
"serial": "Q234-ABCD-5678",
"alternateManagementIp": "1.2.3.4",
"subnetMask": "255.255.255.0",
"gateway": "1.2.3.5"
}
]
}
update_network_switch_dhcp_server_policy
Update the DHCP server settings.
API documentation: updateNetworkSwitchDhcpServerPolicy
Parameters:
-
network_id(str) –Network ID.
-
alerts(UpdateNetworkSwitchDhcpServerPolicyAlerts | None, default:None) –Alert settings for DHCP servers.
-
default_policy(UpdateNetworkSwitchDhcpServerPolicyDefaultPolicy | None, default:None) –'allow' or 'block' new DHCP servers. Default value is 'allow'.
-
allowed_servers(list[str] | None, default:None) –List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block. An empty array will clear the entries.
-
blocked_servers(list[str] | None, default:None) –List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow. An empty array will clear the entries.
-
arp_inspection(UpdateNetworkSwitchDhcpServerPolicyArpInspection | None, default:None) –Dynamic ARP Inspection settings.
Returns:
-
NetworkSwitchDhcpServerPolicyResponse–Successful operation.
Example API response
{
"alerts": {
"email": {
"enabled": true
}
},
"defaultPolicy": "block",
"blockedServers": [
"00:50:56:00:00:03",
"00:50:56:00:00:04"
],
"allowedServers": [
"00:50:56:00:00:01",
"00:50:56:00:00:02"
],
"alwaysAllowedServers": [
"00:50:56:00:00:05",
"00:50:56:00:00:06"
],
"arpInspection": {
"enabled": true,
"unsupportedModels": [
"MS120-8",
"MS125-24"
]
}
}
update_network_switch_dhcp_server_policy_arp_inspection_trusted_server
Update a server that is trusted by Dynamic ARP Inspection on this network.
API documentation: updateNetworkSwitchDhcpServerPolicyArpInspectionTrustedServer
Parameters:
-
network_id(str) –Network ID.
-
trusted_server_id(str) –Trusted server ID.
-
mac(str | None, default:None) –The updated mac address of the trusted server.
-
vlan(int | None, default:None) –The updated VLAN of the trusted server. It must be between 1 and 4094.
-
ipv4(UpdateNetworkSwitchDhcpServerPolicyArpInspectionTrustedServerIpv4 | None, default:None) –The updated IPv4 attributes of the trusted server.
Returns:
-
NetworkSwitchDhcpServerPolicyArpInspectionTrustedServerResponse–Successful operation.
Example API response
{
"trustedServerId": "123",
"mac": "00:11:22:33:44:55",
"vlan": 100,
"ipv4": {
"address": "1.2.3.4"
}
}
update_network_switch_dscp_to_cos_mappings
Update the DSCP to CoS mappings.
API documentation: updateNetworkSwitchDscpToCosMappings
Parameters:
-
network_id(str) –Network ID.
-
mappings(list[UpdateNetworkSwitchDscpToCosMappingsMappingsItem]) –An array of DSCP to CoS mappings. An empty array will reset the mappings to default.
Returns:
-
NetworkSwitchDscpToCosMappingsResponse–Successful operation.
Example API response
{
"mappings": [
{
"dscp": 1,
"cos": 1,
"title": "Video"
}
]
}
update_network_switch_link_aggregation
Update a link aggregation group.
API documentation: updateNetworkSwitchLinkAggregation
Parameters:
-
network_id(str) –Network ID.
-
link_aggregation_id(str) –Link aggregation ID.
-
switch_ports(list[UpdateNetworkSwitchLinkAggregationSwitchPortsItem] | None, default:None) –Array of switch or stack ports for updating aggregation group. Minimum 2 and maximum 8 ports are supported.
-
switch_profile_ports(list[UpdateNetworkSwitchLinkAggregationSwitchProfilePortsItem] | None, default:None) –Array of switch profile ports for updating aggregation group. Minimum 2 and maximum 8 ports are supported.
Returns:
-
NetworkSwitchLinkAggregationResponse–Successful operation.
Example API response
{
"id": "NDU2N18yXzM=",
"switchPorts": [
{
"serial": "Q234-ABCD-0001",
"portId": "1"
}
]
}
update_network_switch_mtu
Update the MTU configuration.
API documentation: updateNetworkSwitchMtu
Parameters:
-
network_id(str) –Network ID.
-
default_mtu_size(int | None, default:None) –MTU size for the entire network. Default value is 9578.
-
overrides(list[UpdateNetworkSwitchMtuOverridesItem] | None, default:None) –Override MTU size for individual switches or switch templates. An empty array will clear overrides.
Returns:
-
NetworkSwitchMtuResponse–Successful operation.
Example API response
{
"defaultMtuSize": 9578,
"overrides": [
{
"switches": [
"Q234-ABCD-0001",
"Q234-ABCD-0002",
"Q234-ABCD-0003"
],
"switchProfiles": [
"1284392014819",
"2983092129865"
],
"mtuSize": 1500
}
]
}
update_network_switch_port_schedule
Update a switch port schedule.
API documentation: updateNetworkSwitchPortSchedule
Parameters:
-
network_id(str) –Network ID.
-
port_schedule_id(str) –Port schedule ID.
-
name(str | None, default:None) –The name for your port schedule.
-
port_schedule(UpdateNetworkSwitchPortSchedulePortSchedule | None, default:None) –The schedule for switch port scheduling. Schedules are applied to days of the week. When it's empty, default schedule with all days of a week are configured. Any unspecified day in the schedule is added as a default schedule configuration of the day.
Returns:
-
NetworkSwitchPortScheduleResponse–Successful operation.
Example API response
{
"id": "1234",
"networkId": "N_24329156",
"name": "Weekdays schedule",
"portSchedule": {
"monday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"tuesday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"wednesday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"thursday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"friday": {
"active": true,
"from": "9:00",
"to": "17:00"
},
"saturday": {
"active": false,
"from": "0:00",
"to": "24:00"
},
"sunday": {
"active": false,
"from": "0:00",
"to": "24:00"
}
}
}
update_network_switch_qos_rule
Update a quality of service rule.
API documentation: updateNetworkSwitchQosRule
Parameters:
-
network_id(str) –Network ID.
-
qos_rule_id(str) –Qos rule ID.
-
vlan(int | None, default:None) –The VLAN of the incoming packet. A null value will match any VLAN.
-
protocol(UpdateNetworkSwitchQosRuleProtocol | None, default:None) –The protocol of the incoming packet. Default value is "ANY".
-
src_port(int | None, default:None) –The source port of the incoming packet. Applicable only if protocol is TCP or UDP.
-
src_port_range(str | None, default:None) –The source port range of the incoming packet. Applicable only if protocol is set to TCP or UDP.
-
dst_port(int | None, default:None) –The destination port of the incoming packet. Applicable only if protocol is TCP or UDP.
-
dst_port_range(str | None, default:None) –The destination port range of the incoming packet. Applicable only if protocol is set to TCP or UDP.
-
dscp(int | None, default:None) –DSCP tag that should be assigned to incoming packet. Set this to -1 to trust incoming DSCP. Default value is 0.
Returns:
-
NetworkSwitchQosRuleResponse–Successful operation.
Example API response
{
"id": "1284392014819",
"vlan": 100,
"protocol": "TCP",
"srcPort": 2000,
"srcPortRange": "70-80",
"dstPort": 3000,
"dstPortRange": "3000-3100",
"dscp": 0
}
update_network_switch_qos_rules_order
Update the order in which the rules should be processed by the switch.
API documentation: updateNetworkSwitchQosRulesOrder
Parameters:
-
network_id(str) –Network ID.
-
rule_ids(list[str]) –A list of quality of service rule IDs arranged in order in which they should be processed by the switch.
Returns:
-
NetworkSwitchQosRulesOrderResponse–Successful operation.
Example API response
{
"ruleIds": [
"1284392014819",
"2983092129865"
]
}
update_network_switch_routing_multicast
Update multicast settings for a network.
API documentation: updateNetworkSwitchRoutingMulticast
Parameters:
-
network_id(str) –Network ID.
-
default_settings(UpdateNetworkSwitchRoutingMulticastDefaultSettings | None, default:None) –Default multicast setting for entire network. IGMP snooping and Flood unknown multicast traffic settings are enabled by default.
-
overrides(list[UpdateNetworkSwitchRoutingMulticastOverridesItem] | None, default:None) –Array of paired switches/stacks/profiles and corresponding multicast settings. An empty array will clear the multicast settings.
Returns:
-
NetworkSwitchRoutingMulticastResponse–Successful operation.
Example API response
{
"defaultSettings": {
"igmpSnoopingEnabled": true,
"floodUnknownMulticastTrafficEnabled": true
},
"overrides": [
{
"switches": [
"Q234-ABCD-0001",
"Q234-ABCD-0002",
"Q234-ABCD-0003"
],
"stacks": [
"789102",
"123456",
"129102"
],
"switchProfiles": [
"1234",
"4567"
],
"igmpSnoopingEnabled": true,
"floodUnknownMulticastTrafficEnabled": true
}
]
}
update_network_switch_routing_multicast_rendezvous_point
Update a multicast rendezvous point.
API documentation: updateNetworkSwitchRoutingMulticastRendezvousPoint
Parameters:
-
network_id(str) –Network ID.
-
rendezvous_point_id(str) –Rendezvous point ID.
-
interface_ip(str) –The IP address of the interface where the RP needs to be created.
-
multicast_group(str) –'Any', or the IP address of a multicast group.
-
vrf(UpdateNetworkSwitchRoutingMulticastRendezvousPointVrf | None, default:None) –The VRF with PIM enabled L3 interface.
Returns:
-
NetworkSwitchRoutingMulticastRendezvousPointResponse–Successful operation.
Example API response
{
"rendezvousPointId": "1234",
"serial": "Q234-ABCD-5678",
"interfaceName": "l3_interface_0",
"interfaceIp": "192.168.1.2",
"multicastGroup": "Any"
}
update_network_switch_routing_ospf
Update layer 3 OSPF routing configuration.
API documentation: updateNetworkSwitchRoutingOspf
Parameters:
-
network_id(str) –Network ID.
-
vrf(str | None, default:None) –The VRF to return the OSPF routing configuration for. When not provided, the default VRF is used. Requires IOS XE 17.18 or higher.
-
enabled(bool | None, default:None) –Boolean value to enable or disable OSPF routing. OSPF routing is disabled by default.
-
hello_timer_in_seconds(int | None, default:None) –Time interval in seconds at which hello packet will be sent to OSPF neighbors to maintain connectivity. Value must be between 1 and 255. Default is 10 seconds.
-
dead_timer_in_seconds(int | None, default:None) –Time interval to determine when the peer will be declared inactive/dead. Value must be between 1 and 65535.
-
areas(list[UpdateNetworkSwitchRoutingOspfAreasItem] | None, default:None) –OSPF areas.
-
v3(UpdateNetworkSwitchRoutingOspfV3 | None, default:None) –OSPF v3 configuration.
-
md5_authentication_enabled(bool | None, default:None) –Boolean value to enable or disable MD5 authentication. MD5 authentication is disabled by default.
-
md5_authentication_key(UpdateNetworkSwitchRoutingOspfMd5AuthenticationKey | None, default:None) –MD5 authentication credentials. This param is only relevant if md5AuthenticationEnabled is true.
Returns:
-
NetworkSwitchRoutingOspfResponse–Successful operation.
Example API response
{
"enabled": true,
"helloTimerInSeconds": 10,
"deadTimerInSeconds": 40,
"areas": [
{
"areaId": "1284392014819",
"areaName": "Backbone",
"areaType": "normal"
}
],
"v3": {
"enabled": true,
"helloTimerInSeconds": 10,
"deadTimerInSeconds": 40,
"areas": [
{
"areaId": "1284392014819",
"areaName": "V3 Backbone",
"areaType": "normal"
}
]
},
"md5AuthenticationEnabled": true,
"md5AuthenticationKey": {
"id": 1234,
"passphrase": "abc1234"
},
"vrf": {
"name": "Blue"
}
}
update_network_switch_settings
Update switch network settings.
API documentation: updateNetworkSwitchSettings
Parameters:
-
network_id(str) –Network ID.
-
vlan(int | None, default:None) –Management VLAN.
-
use_combined_power(bool | None, default:None) –The use Combined Power as the default behavior of secondary power supplies on supported devices.
-
power_exceptions(list[UpdateNetworkSwitchSettingsPowerExceptionsItem] | None, default:None) –Exceptions on a per switch basis to "useCombinedPower".
-
uplink_client_sampling(UpdateNetworkSwitchSettingsUplinkClientSampling | None, default:None) –Uplink client sampling.
-
mac_blocklist(UpdateNetworkSwitchSettingsMacBlocklist | None, default:None) –MAC blocklist.
-
port_channel_fallback(bool | None, default:None) –Port channel fallback.
-
uplink_selection(UpdateNetworkSwitchSettingsUplinkSelection | None, default:None) –Settings related to uplink selection on IOS-XE switches.
Returns:
-
NetworkSwitchSettingsResponse–Successful operation.
Example API response
{
"vlan": 100,
"useCombinedPower": false,
"powerExceptions": [
{
"serial": "Q234-ABCD-0001",
"powerType": "redundant"
}
],
"uplinkClientSampling": {
"enabled": true
},
"macBlocklist": {
"enabled": true
},
"portChannelFallback": true,
"uplinkSelection": {
"failback": {
"enabled": true
},
"candidates": "all"
}
}
update_network_switch_stack_routing_interface
Update a layer 3 interface for a switch stack.
API documentation: updateNetworkSwitchStackRoutingInterface
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
interface_id(str) –Interface ID.
-
name(str | None, default:None) –A friendly name or description for the interface or VLAN (max length 128 characters).
-
subnet(str | None, default:None) –The network that this L3 interface is on, in CIDR notation (ex. 10.1.1.0/24).
-
switch_port_id(str | None, default:None) –Switch Port ID when in Routed mode (CS 17.18 or higher required).
-
interface_ip(str | None, default:None) –The IP address that will be used for Layer 3 routing on this VLAN or subnet. This cannot be the same as the device management IP.
-
mtu(int | None, default:None) –The interface MTU. Applies to native switch layer 3 interfaces, including VLAN and routed modes.
-
multicast_routing(UpdateNetworkSwitchStackRoutingInterfaceMulticastRouting | None, default:None) –Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'.
-
vlan_id(int | None, default:None) –The VLAN this L3 interface is on. VLAN must be between 1 and 4094.
-
default_gateway(str | None, default:None) –The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface.
-
ospf_settings(UpdateNetworkSwitchStackRoutingInterfaceOspfSettings | None, default:None) –The OSPF routing settings of the interface.
-
ipv6(UpdateNetworkSwitchStackRoutingInterfaceIpv6 | None, default:None) –The IPv6 settings of the interface.
-
vrf(UpdateNetworkSwitchStackRoutingInterfaceVrf | None, default:None) –The VRF settings of the interface. Requires IOS XE 17.18 or higher.
-
loopback(dict[str, Any] | None, default:None) –The loopback settings of the interface.
Returns:
-
UpdateNetworkSwitchStackRoutingInterfaceResponse–Successful operation.
Example API response
{
"interfaceId": "1234",
"name": "L3 interface",
"mode": "vlan",
"subnet": "192.168.1.0/24",
"interfaceIp": "192.168.1.2",
"mtu": 1500,
"serial": "Q234-ABCD-5678",
"switchPortId": "1",
"multicastRouting": "disabled",
"vlanId": 100,
"uplinkV4": false,
"uplinkV6": false,
"ospfSettings": {
"area": "0",
"cost": 1,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ospfV3": {
"area": "1",
"cost": 2,
"isPassiveEnabled": true,
"networkType": "broadcast"
},
"ipv6": {
"assignmentMode": "static",
"address": "2001:db8::1",
"prefix": "2001:db8::/32",
"gateway": "2001:db8::2"
},
"vrf": {
"name": "Blue"
}
}
update_network_switch_stack_routing_interface_dhcp
Update a layer 3 interface DHCP configuration for a switch stack.
API documentation: updateNetworkSwitchStackRoutingInterfaceDhcp
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
interface_id(str) –Interface ID.
-
dhcp_mode(UpdateNetworkSwitchStackRoutingInterfaceDhcpDhcpMode | None, default:None) –The DHCP mode options for the switch stack interface ('dhcpDisabled', 'dhcpRelay' or 'dhcpServer').
-
dhcp_relay_server_ips(list[str] | None, default:None) –The DHCP relay server IPs to which DHCP packets would get relayed for the switch stack interface.
-
dhcp_lease_time(UpdateNetworkSwitchStackRoutingInterfaceDhcpDhcpLeaseTime | None, default:None) –The DHCP lease time config for the dhcp server running on switch stack interface ('30 minutes', '1 hour', '4 hours', '12 hours', '1 day' or '1 week').
-
dns_nameservers_option(UpdateNetworkSwitchStackRoutingInterfaceDhcpDnsNameserversOption | None, default:None) –The DHCP name server option for the dhcp server running on the switch stack interface ('googlePublicDns', 'openDns' or 'custom').
-
dns_custom_nameservers(list[str] | None, default:None) –The DHCP name server IPs when DHCP name server option is ' custom'.
-
boot_options_enabled(bool | None, default:None) –Enable DHCP boot options to provide PXE boot options configs for the dhcp server running on the switch stack interface.
-
boot_next_server(str | None, default:None) –The PXE boot server IP for the DHCP server running on the switch stack interface.
-
boot_file_name(str | None, default:None) –The PXE boot server file name for the DHCP server running on the switch stack interface.
-
dhcp_options(list[UpdateNetworkSwitchStackRoutingInterfaceDhcpDhcpOptionsItem] | None, default:None) –Array of DHCP options consisting of code, type and value for the DHCP server running on the switch stack interface.
-
reserved_ip_ranges(list[UpdateNetworkSwitchStackRoutingInterfaceDhcpReservedIpRangesItem] | None, default:None) –Array of DHCP reserved IP assignments for the DHCP server running on the switch stack interface.
-
fixed_ip_assignments(list[UpdateNetworkSwitchStackRoutingInterfaceDhcpFixedIpAssignmentsItem] | None, default:None) –Array of DHCP fixed IP assignments for the DHCP server running on the switch stack interface.
Returns:
-
GetDeviceSwitchRoutingInterfaceDhcpResponse–Successful operation.
Example API response
{
"dhcpMode": "dhcpServer",
"dhcpRelayServerIps": [
"1.2.3.4"
],
"dhcpLeaseTime": "1 day",
"dnsNameserversOption": "custom",
"dnsCustomNameservers": [
"8.8.8.8, 8.8.4.4"
],
"bootOptionsEnabled": true,
"bootNextServer": "1.2.3.4",
"bootFileName": "home_boot_file",
"dhcpOptions": [
{
"code": "5",
"type": "text",
"value": "five"
}
],
"reservedIpRanges": [
{
"start": "192.168.1.1",
"end": "192.168.1.10",
"comment": "A reserved IP range"
}
],
"fixedIpAssignments": [
{
"name": "Cisco Meraki valued client",
"mac": "22:33:44:55:66:77",
"ip": "192.168.1.12"
}
]
}
update_network_switch_stack_routing_static_route
Update a layer 3 static route for a switch stack.
API documentation: updateNetworkSwitchStackRoutingStaticRoute
Parameters:
-
network_id(str) –Network ID.
-
switch_stack_id(str) –Switch stack ID.
-
static_route_id(str) –Static route ID.
-
name(str | None, default:None) –Name or description for layer 3 static route.
-
subnet(str | None, default:None) –The subnet which is routed via this static route and should be specified in CIDR notation (ex. 1.2.3.0/24).
-
next_hop_ip(str | None, default:None) –IP address of the next hop device to which the device sends its traffic for the subnet.
-
management_next_hop(str | None, default:None) –Optional fallback IP address for management traffic.
-
advertise_via_ospf_enabled(bool | None, default:None) –Option to advertise static route via OSPF.
-
prefer_over_ospf_routes_enabled(bool | None, default:None) –Option to prefer static route over OSPF routes.
-
vrf(UpdateNetworkSwitchStackRoutingStaticRouteVrf | None, default:None) –The VRF settings of the interface. Requires IOS XE 17.18 or higher.
Returns:
-
CreateDeviceSwitchRoutingStaticRouteResponse–Successful operation.
Example API response
{
"staticRouteId": "1234",
"name": "My route",
"subnet": "192.168.1.0/24",
"nextHopIp": "1.2.3.4",
"managementNextHop": "1.2.3.5",
"vrf": {
"name": "Blue",
"leakRouteToDefaultVrf": false
},
"advertiseViaOspfEnabled": false,
"preferOverOspfRoutesEnabled": false
}
update_network_switch_storm_control
Update the storm control configuration for a switch network.
API documentation: updateNetworkSwitchStormControl
Parameters:
-
network_id(str) –Network ID.
-
broadcast_threshold(int | None, default:None) –Percentage (1 to 99) of total available port bandwidth for broadcast traffic type. Default value 100 percent rate is to clear the configuration.
-
multicast_threshold(int | None, default:None) –Percentage (1 to 99) of total available port bandwidth for multicast traffic type. Default value 100 percent rate is to clear the configuration.
-
unknown_unicast_threshold(int | None, default:None) –Percentage (1 to 99) of total available port bandwidth for unknown unicast (dlf-destination lookup failure) traffic type. Default value 100 percent rate is to clear the configuration.
-
treat_these_traffic_types_as_one_threshold(list[str] | None, default:None) –Grouped traffic types.
Returns:
-
NetworkSwitchStormControlResponse–Successful operation.
Example API response
{
"broadcastThreshold": 30,
"multicastThreshold": 30,
"unknownUnicastThreshold": 30,
"treatTheseTrafficTypesAsOneThreshold": [
"broadcast",
"multicast"
]
}
update_network_switch_stp
Updates STP settings.
API documentation: updateNetworkSwitchStp
Parameters:
-
network_id(str) –Network ID.
-
rstp_enabled(bool | None, default:None) –The spanning tree protocol status in network.
-
stp_bridge_priority(list[UpdateNetworkSwitchStpStpBridgePriorityItem] | None, default:None) –STP bridge priority for switches/stacks or switch templates. An empty array will clear the STP bridge priority settings.
Returns:
-
NetworkSwitchStpResponse–Successful operation.
Example API response
{
"rstpEnabled": true,
"stpBridgePriority": [
{
"switches": [
"Q234-ABCD-0001",
"Q234-ABCD-0002",
"Q234-ABCD-0003"
],
"stacks": [
"789102",
"123456",
"129102"
],
"switchProfiles": [
"1098",
"1099",
"1100"
],
"stpPriority": 4096
}
]
}
update_organization_config_template_switch_profile_port
Update a switch template port.
API documentation: updateOrganizationConfigTemplateSwitchProfilePort
Parameters:
-
organization_id(str) –Organization ID.
-
config_template_id(str) –Config template ID.
-
profile_id(str) –Profile ID.
-
port_id(str) –Port ID.
-
name(str | None, default:None) –The name of the switch template port.
-
tags(list[str] | None, default:None) –The list of tags of the switch template port.
-
enabled(bool | None, default:None) –The status of the switch template port.
-
poe_enabled(bool | None, default:None) –The PoE status of the switch template port.
-
type_(UpdateOrganizationConfigTemplateSwitchProfilePortType | None, default:None) –The type of the switch template port ('access', 'trunk', 'stack', 'routed', 'svl' or 'dad').
-
vlan(int | None, default:None) –The VLAN of the switch template port. For a trunk port, this is the native VLAN. A null value will clear the value set for trunk ports.
-
voice_vlan(int | None, default:None) –The voice VLAN of the switch template port. Only applicable to access ports.
-
allowed_vlans(str | None, default:None) –The VLANs allowed on the switch template port. Only applicable to trunk ports.
-
isolation_enabled(bool | None, default:None) –The isolation status of the switch template port.
-
rstp_enabled(bool | None, default:None) –The rapid spanning tree protocol status.
-
stp_guard(UpdateOrganizationConfigTemplateSwitchProfilePortStpGuard | None, default:None) –The state of the STP guard ('disabled', 'root guard', 'bpdu guard' or 'loop guard').
-
stp_port_fast_trunk(bool | None, default:None) –The state of STP PortFast Trunk on the switch template port.
-
link_negotiation(str | None, default:None) –The link speed for the switch template port.
-
port_schedule_id(str | None, default:None) –The ID of the port schedule. A value of null will clear the port schedule.
-
udld(UpdateOrganizationConfigTemplateSwitchProfilePortUdld | None, default:None) –The action to take when Unidirectional Link is detected (Alert only, Enforce). Default configuration is Alert only.
-
access_policy_type(UpdateOrganizationConfigTemplateSwitchProfilePortAccessPolicyType | None, default:None) –The type of the access policy of the switch template port. Only applicable to access ports. Can be one of 'Open', 'Custom access policy', 'MAC allow list' or 'Sticky MAC allow list'.
-
access_policy_number(int | None, default:None) –The number of a custom access policy to configure on the switch template port. Only applicable when 'accessPolicyType' is 'Custom access policy'.
-
mac_allow_list(list[str] | None, default:None) –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'.
-
mac_whitelist_limit(int | None, default:None) –The maximum number of MAC addresses for regular MAC allow list. Only applicable when 'accessPolicyType' is 'MAC allow list'. Note: Config only supported on verions greater than ms18 only for classic switches.
-
sticky_mac_allow_list(list[str] | None, default:None) –The initial list of MAC addresses for sticky Mac allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'.
-
sticky_mac_allow_list_limit(int | None, default:None) –The maximum number of MAC addresses for sticky MAC allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'.
-
storm_control_enabled(bool | None, default:None) –The storm control status of the switch template port.
-
flexible_stacking_enabled(bool | None, default:None) –For supported switches (e.g. MS420/MS425), whether or not the port has flexible stacking enabled.
-
dai_trusted(bool | None, default:None) –If true, ARP packets for this port will be considered trusted, and Dynamic ARP Inspection will allow the traffic.
-
profile(UpdateOrganizationConfigTemplateSwitchProfilePortProfile | None, default:None) –Profile attributes.
-
dot3az(UpdateOrganizationConfigTemplateSwitchProfilePortDot3az | None, default:None) –dot3az settings for the port.
-
high_speed(UpdateOrganizationConfigTemplateSwitchProfilePortHighSpeed | None, default:None) –High speed port enablement settings for C9500-32QC.
Returns:
-
OrganizationConfigTemplateSwitchProfilePortResponse–Successful operation.
Example API response
{
"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,
"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
}
}