Devices
Devices
Devices class.
blink_device_leds
Blink the LEDs on a device.
API documentation: blinkDeviceLeds
Parameters:
-
serial(str) –Serial.
-
duration(int | None, default:None) –The duration in seconds. Must be between 5 and 120. Default is 20 seconds.
-
period(int | None, default:None) –The period in milliseconds. Must be between 100 and 1000. Default is 160 milliseconds.
-
duty(int | None, default:None) –The duty cycle as the percent active. Must be between 10 and 90. Default is 50.
Returns:
-
BlinkDeviceLedsResponse–Successful operation.
Example API response
{
"duration": 20,
"period": 160,
"duty": 50
}
create_device_cellular_uplinks_bands_masks_update
Update the cellular band masks for a device.
API documentation: createDeviceCellularUplinksBandsMasksUpdate
Parameters:
-
serial(str) –Serial.
-
slot(CreateDeviceCellularUplinksBandsMasksUpdateSlot) –Required parameter for the SIM slot to update the cellular band mask for.
-
type_(CreateDeviceCellularUplinksBandsMasksUpdateType) –Required parameter for the signal type to update the cellular band mask for.
-
masked(list[str]) –Required parameter for the band identifiers to mask for the given SIM slot and signal type. For LTE use bands identifiers like '30' and for 5G use band identifiers like 'n30'. Maximum 256 bands.
Returns:
-
CreateDeviceCellularUplinksBandsMasksUpdateResponse–Successful operation.
Example API response
{
"bySlot": [
{
"slot": "sim1",
"bySignalType": [
{
"type": "LTE",
"masked": [
"2",
"12",
"30"
],
"enabled": [
"8",
"10"
],
"supported": [
"2",
"4",
"8",
"10",
"12"
]
}
]
}
]
}
create_device_live_tools_arp_table
Enqueue a job to perform a ARP table request for the device.
API documentation: createDeviceLiveToolsArpTable
Parameters:
-
serial(str) –Serial.
-
callback(CreateDeviceLiveToolsArpTableCallback | None, default:None) –Details for the callback. Please include either an httpServerId OR url and sharedSecret.
Returns:
-
CreateDeviceLiveToolsArpTableResponse–Successful operation.
Example API response
{
"arpTableId": "1284392014819",
"url": "/devices/Q234-ABCD-5678/liveTools/arpTable/1284392014819",
"request": {
"serial": "Q234-ABCD-5678"
},
"status": "complete",
"callback": {
"id": "1284392014819",
"url": "https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031",
"status": "new"
}
}
create_device_live_tools_cable_test
Enqueue a job to perform a cable test for the device on the specified ports.
API documentation: createDeviceLiveToolsCableTest
Parameters:
-
serial(str) –Serial.
-
ports(list[str]) –A list of ports for which to perform the cable test. For Catalyst switches, IOS interface names are also supported, such as "GigabitEthernet1/0/8", "Gi1/0/8", or even "1/0/8".
-
callback(CreateDeviceLiveToolsCableTestCallback | None, default:None) –Details for the callback. Please include either an httpServerId OR url and sharedSecret.
Returns:
-
CreateDeviceLiveToolsCableTestResponse–Successful operation.
Example API response
{
"cableTestId": "1284392014819",
"url": "/devices/Q234-ABCD-5678/liveTools/cableTest/1284392014819",
"request": {
"serial": "Q234-ABCD-5678",
"ports": [
"2",
"8"
]
},
"status": "complete",
"callback": {
"id": "1284392014819",
"url": "https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031",
"status": "new"
}
}
create_device_live_tools_leds_blink
Enqueue a job to blink LEDs on a device.
API documentation: createDeviceLiveToolsLedsBlink
Parameters:
-
serial(str) –Serial.
-
duration(int) –The duration in seconds to blink LEDs.
-
callback(CreateDeviceLiveToolsLedsBlinkCallback | None, default:None) –Details for the callback. Please include either an httpServerId OR url and sharedSecret.
Returns:
-
CreateDeviceLiveToolsLedsBlinkResponse–Successful operation.
Example API response
{
"ledsBlinkId": "123",
"url": "/devices/QXXX-YYYY-ZZZZ/liveTools/leds/blink/1738",
"status": "complete",
"request": {
"serial": "Q234-ABCD-5678",
"duration": 30
},
"error": "error description",
"callback": {
"id": "1284392014819",
"url": "https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031",
"status": "new"
}
}
create_device_live_tools_mac_table
Enqueue a job to request the MAC table from the device.
API documentation: createDeviceLiveToolsMacTable
Parameters:
-
serial(str) –Serial.
-
callback(CreateDeviceLiveToolsMacTableCallback | None, default:None) –Details for the callback. Please include either an httpServerId OR url and sharedSecret.
Returns:
-
CreateDeviceLiveToolsMacTableResponse–Successful operation.
Example API response
{
"macTableId": "1284392014819",
"url": "/devices/Q234-ABCD-5678/liveTools/macTable/1284392014819",
"request": {
"serial": "Q234-ABCD-5678"
},
"status": "complete",
"callback": {
"id": "1284392014819",
"url": "https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031",
"status": "new"
}
}
create_device_live_tools_multicast_routing
Enqueue a job to perform a Multicast routing request for the device.
API documentation: createDeviceLiveToolsMulticastRouting
Parameters:
-
serial(str) –Serial.
-
callback(CreateDeviceLiveToolsMulticastRoutingCallback | None, default:None) –Details for the callback. Please include either an httpServerId OR url and sharedSecret.
Returns:
-
CreateDeviceLiveToolsMulticastRoutingResponse–Successful operation.
Example API response
{
"multicastRoutingId": "1284392014819",
"url": "/devices/Q234-ABCD-5678/liveTools/multicastRouting/1284392014819",
"request": {
"serial": "Q234-ABCD-5678"
},
"status": "complete",
"callback": {
"id": "1284392014819",
"url": "https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031",
"status": "new"
}
}
create_device_live_tools_ping
Enqueue a job to ping a target host from the device.
API documentation: createDeviceLiveToolsPing
Parameters:
-
serial(str) –Serial.
-
target(str) –FQDN, IPv4 or IPv6 address.
-
count(int | None, default:None) –Count parameter to pass to ping. [1..5], default 5.
-
callback(CreateDeviceLiveToolsPingCallback | None, default:None) –Details for the callback. Please include either an httpServerId OR url and sharedSecret.
Returns:
-
CreateDeviceLiveToolsPingResponse–Successful operation.
Example API response
{
"pingId": "1284392014819",
"url": "/devices/SERIAL/liveTools/ping/1284392014819",
"request": {
"serial": "Q234-ABCD-5678",
"target": "75.75.75.75",
"count": 2
},
"status": "complete",
"callback": {
"id": "1284392014819",
"url": "https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031",
"status": "new"
}
}
create_device_live_tools_ping_device
Enqueue a job to check connectivity status to the device.
API documentation: createDeviceLiveToolsPingDevice
Parameters:
-
serial(str) –Serial.
-
count(int | None, default:None) –Count parameter to pass to ping. [1..5], default 5.
-
callback(CreateDeviceLiveToolsPingDeviceCallback | None, default:None) –Details for the callback. Please include either an httpServerId OR url and sharedSecret.
Returns:
-
CreateDeviceLiveToolsPingDeviceResponse–Successful operation.
Example API response
{
"pingId": "1284392014819",
"url": "/devices/SERIAL/liveTools/pingDevice/1284392014819",
"request": {
"serial": "Q234-ABCD-5678",
"count": 2
},
"status": "complete",
"callback": {
"id": "1284392014819",
"url": "https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031",
"status": "new"
}
}
create_device_live_tools_ports_cycle
Enqueue a job to perform a cycle port for the device on the specified ports.
API documentation: createDeviceLiveToolsPortsCycle
Parameters:
-
serial(str) –Serial.
-
ports(list[str]) –A list of ports to cycle. For Catalyst switches, IOS interface names are also supported, such as "GigabitEthernet1/0/8", "Gi1/0/8", or even "1/0/8".
-
callback(CreateDeviceLiveToolsPortsCycleCallback | None, default:None) –Details for the callback. Please include either an httpServerId OR url and sharedSecret.
Returns:
-
CreateDeviceLiveToolsPortsCycleResponse–Successful operation.
Example API response
{
"cyclePortId": "1284392014819",
"url": "/devices/Q234-ABCD-5678/liveTools/ports/cycle/1284392014819",
"request": {
"serial": "Q234-ABCD-5678",
"ports": [
"2",
"8"
]
},
"status": "complete",
"callback": {
"id": "1284392014819",
"url": "https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031",
"status": "new"
}
}
create_device_live_tools_throughput_test
Enqueue a job to test a device throughput, the test will run for 10 secs to test throughput.
API documentation: createDeviceLiveToolsThroughputTest
Parameters:
-
serial(str) –Serial.
-
callback(CreateDeviceLiveToolsThroughputTestCallback | None, default:None) –Details for the callback. Please include either an httpServerId OR url and sharedSecret.
Returns:
-
CreateDeviceLiveToolsThroughputTestResponse–Successful operation.
Example API response
{
"throughputTestId": "123",
"url": "/devices/QXXX-YYYY-ZZZZ/liveTools/throughputTest/123",
"status": "complete",
"result": {
"speeds": {
"downstream": 123.456789
}
},
"request": {
"serial": "Q234-ABCD-5678"
},
"error": "error description",
"callback": {
"id": "1284392014819",
"url": "https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031",
"status": "new"
}
}
create_device_live_tools_wake_on_lan
Enqueue a job to send a Wake-on-LAN packet from the device.
API documentation: createDeviceLiveToolsWakeOnLan
Parameters:
-
serial(str) –Serial.
-
vlan_id(int) –The target's VLAN (1 to 4094).
-
mac(str) –The target's MAC address.
-
callback(CreateDeviceLiveToolsWakeOnLanCallback | None, default:None) –Details for the callback. Please include either an httpServerId OR url and sharedSecret.
Returns:
-
CreateDeviceLiveToolsWakeOnLanResponse–Successful operation.
Example API response
{
"wakeOnLanId": "123",
"url": "/devices/QXXX-YYYY-ZZZZ/liveTools/wakeOnLan/1738",
"status": "complete",
"request": {
"serial": "Q234-ABCD-5678",
"vlanId": 12,
"mac": "00:11:22:33:44:55"
},
"error": "The device is unreachable.",
"callback": {
"id": "1284392014819",
"url": "https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031",
"status": "new"
}
}
get_device
Return a single device.
Parameters:
-
serial(str) –Serial.
Returns:
-
DeviceResponse–Successful operation.
Example API response
{
"name": "My AP",
"lat": 37.4180951010362,
"lng": -122.098531723022,
"address": "1600 Pennsylvania Ave",
"notes": "My AP's note",
"tags": [
" recently-added "
],
"networkId": "N_24329156",
"serial": "Q234-ABCD-5678",
"model": "MR34",
"mac": "00:11:22:33:44:55",
"lanIp": "1.2.3.4",
"firmware": "wireless-25-14",
"floorPlanId": "g_2176982374",
"details": [
{
"name": "Catalyst serial",
"value": "123ABC"
}
],
"beaconIdParams": {
"uuid": "00000000-0000-0000-0000-000000000000",
"major": 5,
"minor": 3
}
}
get_device_cellular_sims
Return the SIM and APN configurations for a cellular device.
API documentation: getDeviceCellularSims
Parameters:
-
serial(str) –Serial.
Returns:
-
DeviceCellularSimsResponse–Successful operation.
Example API response
{
"sims": [
{
"slot": "sim1",
"iccid": "123456789",
"imsi": "123456789012345",
"msisdn": "123456789012345",
"isPrimary": false,
"status": "inserted",
"apns": [
{
"name": "internet",
"allowedIpTypes": [
"ipv4",
"ipv6"
],
"authentication": {
"type": "pap",
"username": "milesmeraki",
"password": "secret"
}
}
]
}
],
"simOrdering": [
"sim1",
"sim2",
"sim3"
],
"simFailover": {
"enabled": true,
"timeout": 300
}
}
get_device_clients
List the clients of a device, up to a maximum of a month ago.
API documentation: getDeviceClients
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[GetDeviceClientsResponseItem]–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": "k74272e",
"mac": "22:33:44:55:66:77",
"description": "Miles's phone",
"mdnsName": "Miles's phone",
"dhcpHostname": "MilesPhone",
"user": "milesmeraki",
"ip": "1.2.3.4",
"vlan": "100",
"namedVlan": "My VLAN",
"switchport": "My switch port",
"adaptivePolicyGroup": "101",
"usage": {
"sent": 138.0,
"recv": 61.0
}
}
]
get_device_live_tools_arp_table
Return an ARP table live tool job.
API documentation: getDeviceLiveToolsArpTable
Parameters:
-
serial(str) –Serial.
-
arp_table_id(str) –Arp table ID.
Returns:
-
GetDeviceLiveToolsArpTableResponse–Successful operation.
Example API response
{
"arpTableId": "1284392014819",
"url": "/devices/Q234-ABCD-5678/liveTools/arpTable/1284392014819",
"request": {
"serial": "Q234-ABCD-5678"
},
"status": "complete",
"entries": [
{
"ip": "10.0.0.0/24",
"mac": "00:11:22:33:44:55",
"vlanId": 100,
"interface": "Vlan100",
"lastUpdatedAt": "2018-02-11T00:00:00.090210Z"
}
],
"error": "The device is unreachable."
}
get_device_live_tools_cable_test
Return a cable test live tool job.
API documentation: getDeviceLiveToolsCableTest
Parameters:
-
serial(str) –Serial.
-
id(str) –ID.
Returns:
-
GetDeviceLiveToolsCableTestResponse–Successful operation.
Example API response
{
"cableTestId": "1284392014819",
"url": "/devices/Q234-ABCD-5678/liveTools/cableTest/1284392014819",
"request": {
"serial": "Q234-ABCD-5678",
"ports": [
"2",
"8"
]
},
"status": "complete",
"results": [
{
"port": "2",
"status": "up",
"speedMbps": 10000,
"error": "An unexpected error occurred during the execution of the cable test.",
"pairs": [
{
"index": 0,
"status": "ok",
"lengthMeters": 1
}
]
}
],
"error": "The device is unreachable."
}
get_device_live_tools_leds_blink
Return a blink LEDs job.
API documentation: getDeviceLiveToolsLedsBlink
Parameters:
-
serial(str) –Serial.
-
leds_blink_id(str) –Leds blink ID.
Returns:
-
GetDeviceLiveToolsLedsBlinkResponse–Successful operation.
Example API response
{
"ledsBlinkId": "123",
"url": "/devices/QXXX-YYYY-ZZZZ/liveTools/leds/blink/1738",
"status": "complete",
"request": {
"serial": "Q234-ABCD-5678",
"duration": 30
},
"error": "error description"
}
get_device_live_tools_mac_table
Return a MAC table live tool job.
API documentation: getDeviceLiveToolsMacTable
Parameters:
-
serial(str) –Serial.
-
mac_table_id(str) –Mac table ID.
Returns:
-
GetDeviceLiveToolsMacTableResponse–Successful operation.
Example API response
{
"macTableId": "1284392014819",
"url": "/devices/Q234-ABCD-5678/liveTools/macTable/1284392014819",
"request": {
"serial": "Q234-ABCD-5678"
},
"status": "complete",
"entries": [
{
"mac": "00:11:22:33:44:55",
"port": "Tw1/0/9",
"vlanId": 100
}
],
"error": "The device is unreachable."
}
get_device_live_tools_multicast_routing
Return a Multicast routing live tool job.
API documentation: getDeviceLiveToolsMulticastRouting
Parameters:
-
serial(str) –Serial.
-
multicast_routing_id(str) –Multicast routing ID.
Returns:
-
GetDeviceLiveToolsMulticastRoutingResponse–Successful operation.
Example API response
{
"multicastRoutingId": "1284392014819",
"url": "/devices/Q234-ABCD-5678/liveTools/multicastRouting/1284392014819",
"request": {
"serial": "Q234-ABCD-5678"
},
"status": "complete",
"interfaces": [
{
"ip": "1.2.3.4",
"name": "Vlan20",
"vrf": "IPv4 default",
"vrfType": "vrf",
"ipVersion": "ipv4",
"subnet": "192.168.1.0/24",
"flags": [
"PIM"
],
"neighbors": [
"123.123.123.1"
]
}
],
"routes": [
{
"source": "1.2.3.4",
"group": "1.2.3.5",
"vrf": "IPv4 default",
"ipVersion": "ipv4",
"rendezvousPoint": "10.0.0.0/24",
"incomingInterfaceName": "Vlan100",
"outgoingInterfaceNames": [
"Vlan20",
"Vlan50"
],
"flags": [
"SPT"
]
}
],
"error": "The device is unreachable."
}
get_device_live_tools_ping
Return a ping job.
API documentation: getDeviceLiveToolsPing
Parameters:
-
serial(str) –Serial.
-
id(str) –ID.
Returns:
-
GetDeviceLiveToolsPingResponse–Successful operation.
Example API response
{
"pingId": "1284392014819",
"url": "/devices/SERIAL/liveTools/ping/1284392014819",
"request": {
"serial": "Q234-ABCD-5678",
"target": "75.75.75.75",
"count": 2
},
"status": "complete",
"results": {
"sent": 5,
"received": 5,
"loss": {
"percentage": 0.0
},
"latencies": {
"minimum": 15.8,
"average": 15.8,
"maximum": 15.9
},
"replies": [
{
"sequenceId": 1,
"size": 84,
"latency": 15.7
}
]
}
}
get_device_live_tools_ping_device
Return a ping device job.
API documentation: getDeviceLiveToolsPingDevice
Parameters:
-
serial(str) –Serial.
-
id(str) –ID.
Returns:
-
GetDeviceLiveToolsPingDeviceResponse–Successful operation.
Example API response
{
"pingId": "1284392014819",
"url": "/devices/SERIAL/liveTools/pingDevice/1284392014819",
"request": {
"serial": "Q234-ABCD-5678",
"count": 2
},
"status": "complete",
"results": {
"sent": 5,
"received": 5,
"loss": {
"percentage": 0.0
},
"latencies": {
"minimum": 15.8,
"average": 15.8,
"maximum": 15.9
},
"replies": [
{
"sequenceId": 1,
"size": 84,
"latency": 15.7
}
]
},
"callback": {
"id": "1284392014819",
"url": "https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031",
"status": "new"
}
}
get_device_live_tools_ports_cycle
Return a cycle port live tool job.
API documentation: getDeviceLiveToolsPortsCycle
Parameters:
-
serial(str) –Serial.
-
id(str) –ID.
Returns:
-
GetDeviceLiveToolsPortsCycleResponse–Successful operation.
Example API response
{
"cyclePortId": "1284392014819",
"url": "/devices/Q234-ABCD-5678/liveTools/ports/cycle/1284392014819",
"request": {
"serial": "Q234-ABCD-5678",
"ports": [
"2",
"8"
]
},
"status": "complete",
"error": "The device is unreachable."
}
get_device_live_tools_throughput_test
Return a throughput test job.
API documentation: getDeviceLiveToolsThroughputTest
Parameters:
-
serial(str) –Serial.
-
throughput_test_id(str) –Throughput test ID.
Returns:
-
GetDeviceLiveToolsThroughputTestResponse–Successful operation.
Example API response
{
"throughputTestId": "123",
"url": "/devices/QXXX-YYYY-ZZZZ/liveTools/throughputTest/123",
"status": "complete",
"result": {
"speeds": {
"downstream": 123.456789
}
},
"request": {
"serial": "Q234-ABCD-5678"
},
"error": "error description"
}
get_device_live_tools_wake_on_lan
Return a Wake-on-LAN job.
API documentation: getDeviceLiveToolsWakeOnLan
Parameters:
-
serial(str) –Serial.
-
wake_on_lan_id(str) –Wake on lan ID.
Returns:
-
GetDeviceLiveToolsWakeOnLanResponse–Successful operation.
Example API response
{
"wakeOnLanId": "123",
"url": "/devices/QXXX-YYYY-ZZZZ/liveTools/wakeOnLan/1738",
"status": "complete",
"request": {
"serial": "Q234-ABCD-5678",
"vlanId": 12,
"mac": "00:11:22:33:44:55"
},
"error": "The device is unreachable."
}
get_device_lldp_cdp
List LLDP and CDP information for a device.
API documentation: getDeviceLldpCdp
Parameters:
-
serial(str) –Serial.
Returns:
-
GetDeviceLldpCdpResponse–Successful operation.
Example API response
{
"sourceMac": "00:11:22:33:44:55",
"ports": {
"22": {
"lldp": {
"systemName": "Meraki MS350-24X - Phineas",
"systemDescription": "Meraki MX64 Cloud Managed Router",
"portId": "11",
"chassisId": "88:15:44:c8:5d:58",
"managementVlan": 60,
"portVlan": 500,
"managementAddress": "192.168.1.128",
"portDescription": "12",
"systemCapabilities": "S-VLAN Component of a VLAN Bridge",
"sourcePort": "12"
},
"cdp": {
"platform": "MS350-24X",
"deviceId": "e0553d8cdf53",
"model": "cisco C9300-24P",
"version": "Catalyst L3 Switch Software (CAT9K_IOSXE), Experimental Version 17.6.20210422:140402",
"portId": "Port 10",
"nativeVlan": 1,
"vtpManagementDomain": "cisco",
"capabilities": "Switch",
"address": "192.168.1.128",
"sourcePort": "9"
},
"deviceMac": "00:11:22:33:44:55",
"device": {
"url": "https://dashboard.meraki.com/Wireless-Testing/n/scPLfd/manage/nodes/new_list/194114551275232"
}
}
}
}
get_device_loss_and_latency_history
Get the uplink loss percentage and latency in milliseconds, and goodput in kilobits per second for MX, MG and Z devices.
API documentation: getDeviceLossAndLatencyHistory
Parameters:
-
serial(str) –Serial.
-
t0(str | None, default:None) –The beginning of the timespan for the data. The maximum lookback period is 60 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.
-
resolution(int | None, default:None) –The time resolution in seconds for returned data. The valid resolutions are: 60, 600, 3600, 86400. The default is 60.
-
uplink(GetDeviceLossAndLatencyHistoryUplink | None, default:None) –The WAN uplink used to obtain the requested stats. Valid uplinks are wan1, wan2, wan3, cellular, wan4. The default is wan1.
-
ip(str) –The destination IP used to obtain the requested stats. This is required.
Returns:
-
PaginatedResponse[GetDeviceLossAndLatencyHistoryResponseItem]–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
[
{
"startTime": "2018-10-09T22:18:27Z",
"endTime": "2018-10-09T22:19:27Z",
"lossPercent": 5.23,
"latencyMs": 324.12,
"goodput": 1493,
"jitter": 11.2
}
]
get_device_management_interface
Return the management interface settings for a device.
API documentation: getDeviceManagementInterface
Parameters:
-
serial(str) –Serial.
Returns:
-
DeviceManagementInterfaceResponse–Successful operation.
Example API response
{
"ddnsHostnames": {
"activeDdnsHostname": "mx1-sample.dynamic-m.com",
"ddnsHostnameWan1": "mx1-sample-1.dynamic-m.com",
"ddnsHostnameWan2": "mx1-sample-2.dynamic-m.com"
},
"wan1": {
"wanEnabled": "not configured",
"usingStaticIp": true,
"staticIp": "1.2.3.4",
"staticSubnetMask": "255.255.255.0",
"staticGatewayIp": "1.2.3.1",
"staticDns": [
"1.2.3.2",
"1.2.3.3"
],
"vlan": 7,
"vrf": {
"name": "Mgmt-vrf"
}
},
"wan2": {
"wanEnabled": "enabled",
"usingStaticIp": false,
"staticIp": "1.2.3.4",
"staticSubnetMask": "255.255.255.0",
"staticGatewayIp": "1.2.3.1",
"staticDns": [
"1.2.3.2",
"1.2.3.3"
],
"vlan": 2,
"vrf": {
"name": "Mgmt-vrf"
}
}
}
reboot_device
Reboot a device.
API documentation: rebootDevice
Parameters:
-
serial(str) –Serial.
Returns:
-
RebootDeviceResponse–Successful operation.
Example API response
{
"success": true
}
update_device
Update the attributes of a device.
API documentation: updateDevice
Parameters:
-
serial(str) –Serial.
-
name(str | None, default:None) –The name of a device.
-
tags(list[str] | None, default:None) –The list of tags of a device.
-
lat(float | None, default:None) –The latitude of a device.
-
lng(float | None, default:None) –The longitude of a device.
-
address(str | None, default:None) –The address of a device.
-
notes(str | None, default:None) –The notes for the device. String. Limited to 255 characters.
-
move_map_marker(bool | None, default:None) –Whether or not to set the latitude and longitude of a device based on the new address. Only applies when lat and lng are not specified.
-
switch_profile_id(str | None, default:None) –The ID of a switch template to bind to the device (for available switch templates, see the 'Switch Templates' endpoint). Use null to unbind the switch device from the current profile. For a device to be bindable to a switch template, it must (1) be a switch, and (2) belong to a network that is bound to a configuration template.
-
floor_plan_id(str | None, default:None) –The floor plan to associate to this device. null disassociates the device from the floorplan.
Returns:
-
DeviceResponse–Successful operation.
Example API response
{
"name": "My AP",
"lat": 37.4180951010362,
"lng": -122.098531723022,
"address": "1600 Pennsylvania Ave",
"notes": "My AP's note",
"tags": [
" recently-added "
],
"networkId": "N_24329156",
"serial": "Q234-ABCD-5678",
"model": "MR34",
"mac": "00:11:22:33:44:55",
"lanIp": "1.2.3.4",
"firmware": "wireless-25-14",
"floorPlanId": "g_2176982374",
"details": [
{
"name": "Catalyst serial",
"value": "123ABC"
}
],
"beaconIdParams": {
"uuid": "00000000-0000-0000-0000-000000000000",
"major": 5,
"minor": 3
}
}
update_device_cellular_geolocations
Update the enablement of the geolocation feature for a device.
API documentation: updateDeviceCellularGeolocations
Parameters:
-
serial(str) –Serial.
-
enabled(bool) –Required parameter for the state to update the geolocation settings to (true to enable, false to disable).
Returns:
-
UpdateDeviceCellularGeolocationsResponse–Successful operation.
Example API response
{
"enabled": true
}
update_device_cellular_sims
Updates the SIM and APN configurations for a cellular device.
API documentation: updateDeviceCellularSims
Parameters:
-
serial(str) –Serial.
-
sims(list[UpdateDeviceCellularSimsSimsItem] | None, default:None) –List of SIMs. If a SIM was previously configured and not specified in this request, it will remain unchanged.
-
sim_ordering(list[str] | None, default:None) –Specifies the ordering of all SIMs for an MG: primary, secondary, and not- in-use (when applicable). It's required for devices with 3 or more SIMs and can be used in place of 'isPrimary' for dual-SIM devices. To indicate eSIM, use 'sim3'. Sim failover will occur only between primary and secondary sim slots.
-
sim_failover(UpdateDeviceCellularSimsSimFailover | None, default:None) –SIM Failover settings.
Returns:
-
DeviceCellularSimsResponse–Successful operation.
Example API response
{
"sims": [
{
"slot": "sim1",
"iccid": "123456789",
"imsi": "123456789012345",
"msisdn": "123456789012345",
"isPrimary": false,
"status": "inserted",
"apns": [
{
"name": "internet",
"allowedIpTypes": [
"ipv4",
"ipv6"
],
"authentication": {
"type": "pap",
"username": "milesmeraki",
"password": "secret"
}
}
]
}
],
"simOrdering": [
"sim1",
"sim2",
"sim3"
],
"simFailover": {
"enabled": true,
"timeout": 300
}
}
update_device_management_interface
Update the management interface settings for a device.
API documentation: updateDeviceManagementInterface
Parameters:
-
serial(str) –Serial.
-
wan1(UpdateDeviceManagementInterfaceWan1 | None, default:None) –WAN 1 settings.
-
wan2(UpdateDeviceManagementInterfaceWan2 | None, default:None) –WAN 2 settings (only for MX devices).
Returns:
-
DeviceManagementInterfaceResponse–Successful operation.
Example API response
{
"ddnsHostnames": {
"activeDdnsHostname": "mx1-sample.dynamic-m.com",
"ddnsHostnameWan1": "mx1-sample-1.dynamic-m.com",
"ddnsHostnameWan2": "mx1-sample-2.dynamic-m.com"
},
"wan1": {
"wanEnabled": "not configured",
"usingStaticIp": true,
"staticIp": "1.2.3.4",
"staticSubnetMask": "255.255.255.0",
"staticGatewayIp": "1.2.3.1",
"staticDns": [
"1.2.3.2",
"1.2.3.3"
],
"vlan": 7,
"vrf": {
"name": "Mgmt-vrf"
}
},
"wan2": {
"wanEnabled": "enabled",
"usingStaticIp": false,
"staticIp": "1.2.3.4",
"staticSubnetMask": "255.255.255.0",
"staticGatewayIp": "1.2.3.1",
"staticDns": [
"1.2.3.2",
"1.2.3.3"
],
"vlan": 2,
"vrf": {
"name": "Mgmt-vrf"
}
}
}