Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meraki/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
)
from meraki.rest_session import *

__version__ = '1.42.0'
__version__ = '1.43.0'


class DashboardAPI(object):
Expand Down
19 changes: 19 additions & 0 deletions meraki/aio/api/appliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2472,6 +2472,25 @@ def getOrganizationApplianceUplinkStatuses(self, organizationId: str, total_page



def getOrganizationApplianceUplinksStatusesOverview(self, organizationId: str):
"""
**Returns an overview of uplink statuses**
https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-uplinks-statuses-overview

- organizationId (string): Organization ID
"""

metadata = {
'tags': ['appliance', 'configure', 'uplinks', 'statuses', 'overview'],
'operation': 'getOrganizationApplianceUplinksStatusesOverview'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/appliance/uplinks/statuses/overview'

return self._session.get(metadata, resource)



def getOrganizationApplianceUplinksUsageByNetwork(self, organizationId: str, **kwargs):
"""
**Get the sent and received bytes for each uplink of all MX and Z networks within an organization**
Expand Down
98 changes: 98 additions & 0 deletions meraki/aio/api/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,68 @@ def deleteNetworkCameraWirelessProfile(self, networkId: str, wirelessProfileId:



def getOrganizationCameraBoundariesAreasByDevice(self, organizationId: str, **kwargs):
"""
**Returns all configured area boundaries of cameras**
https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-boundaries-areas-by-device

- organizationId (string): Organization ID
- serials (array): A list of serial numbers. The returned cameras will be filtered to only include these serials.
"""

kwargs.update(locals())

metadata = {
'tags': ['camera', 'configure', 'boundaries', 'areas', 'byDevice'],
'operation': 'getOrganizationCameraBoundariesAreasByDevice'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/camera/boundaries/areas/byDevice'

query_params = ['serials', ]
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}

array_params = ['serials', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
params.pop(k.strip())

return self._session.get(metadata, resource, params)



def getOrganizationCameraBoundariesLinesByDevice(self, organizationId: str, **kwargs):
"""
**Returns all configured crossingline boundaries of cameras**
https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-boundaries-lines-by-device

- organizationId (string): Organization ID
- serials (array): A list of serial numbers. The returned cameras will be filtered to only include these serials.
"""

kwargs.update(locals())

metadata = {
'tags': ['camera', 'configure', 'boundaries', 'lines', 'byDevice'],
'operation': 'getOrganizationCameraBoundariesLinesByDevice'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/camera/boundaries/lines/byDevice'

query_params = ['serials', ]
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}

array_params = ['serials', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
params.pop(k.strip())

return self._session.get(metadata, resource, params)



def getOrganizationCameraCustomAnalyticsArtifacts(self, organizationId: str):
"""
**List Custom Analytics Artifacts**
Expand Down Expand Up @@ -804,6 +866,42 @@ def deleteOrganizationCameraCustomAnalyticsArtifact(self, organizationId: str, a



def getOrganizationCameraDetectionsHistoryByBoundaryByInterval(self, organizationId: str, boundaryIds: list, total_pages=1, direction='next', **kwargs):
"""
**Returns analytics data for timespans**
https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-detections-history-by-boundary-by-interval

- organizationId (string): Organization ID
- boundaryIds (array): A list of boundary ids. The returned cameras will be filtered to only include these ids.
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
- direction (string): direction to paginate, either "next" (default) or "prev" page
- duration (integer): The minimum time, in seconds, that the person or car remains in the area to be counted. Defaults to boundary configuration or 60.
- perPage (integer): The number of entries per page returned. Acceptable range is 1 - 1000. Defaults to 1000.
- boundaryTypes (array): The detection types. Defaults to 'person'.
"""

kwargs.update(locals())

metadata = {
'tags': ['camera', 'configure', 'detections', 'history', 'byBoundary', 'byInterval'],
'operation': 'getOrganizationCameraDetectionsHistoryByBoundaryByInterval'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/camera/detections/history/byBoundary/byInterval'

query_params = ['boundaryIds', 'duration', 'perPage', 'boundaryTypes', ]
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}

array_params = ['boundaryIds', 'boundaryTypes', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
params.pop(k.strip())

return self._session.get_pages(metadata, resource, params, total_pages, direction)



def getOrganizationCameraOnboardingStatuses(self, organizationId: str, **kwargs):
"""
**Fetch onboarding status of cameras**
Expand Down
187 changes: 187 additions & 0 deletions meraki/aio/api/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,99 @@ def getDeviceClients(self, serial: str, **kwargs):



def createDeviceLiveToolsArpTable(self, serial: str, **kwargs):
"""
**Enqueue a job to perform a ARP table request for the device**
https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-arp-table

- serial (string): Serial
- callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret
"""

kwargs.update(locals())

metadata = {
'tags': ['devices', 'liveTools', 'arpTable'],
'operation': 'createDeviceLiveToolsArpTable'
}
serial = urllib.parse.quote(str(serial), safe='')
resource = f'/devices/{serial}/liveTools/arpTable'

body_params = ['callback', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

return self._session.post(metadata, resource, payload)



def getDeviceLiveToolsArpTable(self, serial: str, arpTableId: str):
"""
**Return an ARP table live tool job.**
https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-arp-table

- serial (string): Serial
- arpTableId (string): Arp table ID
"""

metadata = {
'tags': ['devices', 'liveTools', 'arpTable'],
'operation': 'getDeviceLiveToolsArpTable'
}
serial = urllib.parse.quote(str(serial), safe='')
arpTableId = urllib.parse.quote(str(arpTableId), safe='')
resource = f'/devices/{serial}/liveTools/arpTable/{arpTableId}'

return self._session.get(metadata, resource)



def createDeviceLiveToolsCableTest(self, serial: str, ports: list, **kwargs):
"""
**Enqueue a job to perform a cable test for the device on the specified ports.**
https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-cable-test

- serial (string): Serial
- ports (array): A list of ports for which to perform the cable test.
- callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret
"""

kwargs.update(locals())

metadata = {
'tags': ['devices', 'liveTools', 'cableTest'],
'operation': 'createDeviceLiveToolsCableTest'
}
serial = urllib.parse.quote(str(serial), safe='')
resource = f'/devices/{serial}/liveTools/cableTest'

body_params = ['ports', 'callback', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

return self._session.post(metadata, resource, payload)



def getDeviceLiveToolsCableTest(self, serial: str, id: str):
"""
**Return a cable test live tool job.**
https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-cable-test

- serial (string): Serial
- id (string): ID
"""

metadata = {
'tags': ['devices', 'liveTools', 'cableTest'],
'operation': 'getDeviceLiveToolsCableTest'
}
serial = urllib.parse.quote(str(serial), safe='')
id = urllib.parse.quote(str(id), safe='')
resource = f'/devices/{serial}/liveTools/cableTest/{id}'

return self._session.get(metadata, resource)



def createDeviceLiveToolsPing(self, serial: str, target: str, **kwargs):
"""
**Enqueue a job to ping a target host from the device**
Expand Down Expand Up @@ -253,6 +346,100 @@ def getDeviceLiveToolsPingDevice(self, serial: str, id: str):



def createDeviceLiveToolsThroughputTest(self, serial: str, **kwargs):
"""
**Enqueue a job to test a device throughput, the test will run for 10 secs to test throughput**
https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-throughput-test

- serial (string): Serial
- callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret
"""

kwargs.update(locals())

metadata = {
'tags': ['devices', 'liveTools', 'throughputTest'],
'operation': 'createDeviceLiveToolsThroughputTest'
}
serial = urllib.parse.quote(str(serial), safe='')
resource = f'/devices/{serial}/liveTools/throughputTest'

body_params = ['callback', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

return self._session.post(metadata, resource, payload)



def getDeviceLiveToolsThroughputTest(self, serial: str, throughputTestId: str):
"""
**Return a throughput test job**
https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-throughput-test

- serial (string): Serial
- throughputTestId (string): Throughput test ID
"""

metadata = {
'tags': ['devices', 'liveTools', 'throughputTest'],
'operation': 'getDeviceLiveToolsThroughputTest'
}
serial = urllib.parse.quote(str(serial), safe='')
throughputTestId = urllib.parse.quote(str(throughputTestId), safe='')
resource = f'/devices/{serial}/liveTools/throughputTest/{throughputTestId}'

return self._session.get(metadata, resource)



def createDeviceLiveToolsWakeOnLan(self, serial: str, vlanId: int, mac: str, **kwargs):
"""
**Enqueue a job to send a Wake-on-LAN packet from the device**
https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-wake-on-lan

- serial (string): Serial
- vlanId (integer): The target's VLAN (1 to 4094)
- mac (string): The target's MAC address
- callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret
"""

kwargs.update(locals())

metadata = {
'tags': ['devices', 'liveTools', 'wakeOnLan'],
'operation': 'createDeviceLiveToolsWakeOnLan'
}
serial = urllib.parse.quote(str(serial), safe='')
resource = f'/devices/{serial}/liveTools/wakeOnLan'

body_params = ['vlanId', 'mac', 'callback', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

return self._session.post(metadata, resource, payload)



def getDeviceLiveToolsWakeOnLan(self, serial: str, wakeOnLanId: str):
"""
**Return a Wake-on-LAN job**
https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-wake-on-lan

- serial (string): Serial
- wakeOnLanId (string): Wake on lan ID
"""

metadata = {
'tags': ['devices', 'liveTools', 'wakeOnLan'],
'operation': 'getDeviceLiveToolsWakeOnLan'
}
serial = urllib.parse.quote(str(serial), safe='')
wakeOnLanId = urllib.parse.quote(str(wakeOnLanId), safe='')
resource = f'/devices/{serial}/liveTools/wakeOnLan/{wakeOnLanId}'

return self._session.get(metadata, resource)



def getDeviceLldpCdp(self, serial: str):
"""
**List LLDP and CDP information for a device**
Expand Down
Loading