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__ = '2.0.1'
__version__ = '2.0.2'
__api_version__ = '1.57.0'


Expand Down
2 changes: 1 addition & 1 deletion meraki/aio/api/appliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -3086,7 +3086,7 @@ def getOrganizationApplianceUplinksUsageByNetwork(self, organizationId: str, **k
https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-uplinks-usage-by-network

- organizationId (string): Organization ID
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 365 days from today.
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 30 days from today.
- t1 (string): The end of the timespan for the data. t1 can be a maximum of 14 days after t0.
- timespan (number): 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 14 days. The default is 1 day.
"""
Expand Down
46 changes: 46 additions & 0 deletions meraki/aio/api/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,52 @@ def getDeviceLiveToolsLedsBlink(self, serial: str, ledsBlinkId: str):



def createDeviceLiveToolsMacTable(self, serial: str, **kwargs):
"""
**Enqueue a job to request the MAC table from the device**
https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-mac-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', 'macTable'],
'operation': 'createDeviceLiveToolsMacTable'
}
serial = urllib.parse.quote(str(serial), safe='')
resource = f'/devices/{serial}/liveTools/macTable'

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 getDeviceLiveToolsMacTable(self, serial: str, macTableId: str):
"""
**Return a MAC table live tool job.**
https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-mac-table

- serial (string): Serial
- macTableId (string): Mac table ID
"""

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

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
321 changes: 321 additions & 0 deletions meraki/aio/api/organizations.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion meraki/api/appliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -3086,7 +3086,7 @@ def getOrganizationApplianceUplinksUsageByNetwork(self, organizationId: str, **k
https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-uplinks-usage-by-network

- organizationId (string): Organization ID
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 365 days from today.
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 30 days from today.
- t1 (string): The end of the timespan for the data. t1 can be a maximum of 14 days after t0.
- timespan (number): 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 14 days. The default is 1 day.
"""
Expand Down
189 changes: 189 additions & 0 deletions meraki/api/batch/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,195 @@ def bulkUpdateOrganizationDevicesDetails(self, organizationId: str, serials: lis



def bulkOrganizationDevicesPacketCaptureCapturesDelete(self, organizationId: str, captureIds: list):
"""
**BulkDelete packet captures from cloud**
https://developer.cisco.com/meraki/api-v1/#!bulk-organization-devices-packet-capture-captures-delete

- organizationId (string): Organization ID
- captureIds (array): Delete the packet captures of the specified capture ids
"""

kwargs = locals()

metadata = {
'tags': ['organizations', 'configure', 'devices', 'packetCapture', 'captures'],
'operation': 'bulkOrganizationDevicesPacketCaptureCapturesDelete'
}
resource = f'/organizations/{organizationId}/devices/packetCapture/captures/bulkDelete'

body_params = ['captureIds', ]
action = {
"resource": resource,
"operation": "destroy",
}
return action






def deleteOrganizationDevicesPacketCaptureCapture(self, organizationId: str, captureId: str):
"""
**Delete a single packet capture from cloud using captureId**
https://developer.cisco.com/meraki/api-v1/#!delete-organization-devices-packet-capture-capture

- organizationId (string): Organization ID
- captureId (string): Capture ID
"""

metadata = {
'tags': ['organizations', 'configure', 'devices', 'packetCapture', 'captures'],
'operation': 'deleteOrganizationDevicesPacketCaptureCapture'
}
resource = f'/organizations/{organizationId}/devices/packetCapture/captures/{captureId}'

action = {
"resource": resource,
"operation": "destroy",
}
return action






def createOrganizationDevicesPacketCaptureSchedule(self, organizationId: str, devices: list, **kwargs):
"""
**Create a schedule for packet capture**
https://developer.cisco.com/meraki/api-v1/#!create-organization-devices-packet-capture-schedule

- organizationId (string): Organization ID
- devices (array): device details
- name (string): Name of the packet capture file
- notes (string): Reason for capture
- duration (integer): Duration of the capture in seconds
- filterExpression (string): Filter expression for the capture
- enabled (boolean): Enable or disable the schedule
- schedule (object): Schedule details
"""

kwargs.update(locals())

metadata = {
'tags': ['organizations', 'configure', 'devices', 'packetCapture', 'schedules'],
'operation': 'createOrganizationDevicesPacketCaptureSchedule'
}
resource = f'/organizations/{organizationId}/devices/packetCapture/schedules'

body_params = ['devices', 'name', 'notes', 'duration', 'filterExpression', 'enabled', 'schedule', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "create",
"body": payload
}
return action






def reorderOrganizationDevicesPacketCaptureSchedules(self, organizationId: str, order: list):
"""
**Bulk update priorities of pcap schedules**
https://developer.cisco.com/meraki/api-v1/#!reorder-organization-devices-packet-capture-schedules

- organizationId (string): Organization ID
- order (array): Array of schedule IDs and their priorities to reorder.
"""

kwargs = locals()

metadata = {
'tags': ['organizations', 'configure', 'devices', 'packetCapture', 'schedules'],
'operation': 'reorderOrganizationDevicesPacketCaptureSchedules'
}
resource = f'/organizations/{organizationId}/devices/packetCapture/schedules/reorder'

body_params = ['order', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "reorder",
"body": payload
}
return action






def updateOrganizationDevicesPacketCaptureSchedule(self, organizationId: str, scheduleId: str, devices: list, **kwargs):
"""
**Update a schedule for packet capture**
https://developer.cisco.com/meraki/api-v1/#!update-organization-devices-packet-capture-schedule

- organizationId (string): Organization ID
- scheduleId (string): Schedule ID
- devices (array): device details
- name (string): Name of the packet capture file
- notes (string): Reason for capture
- duration (integer): Duration of the capture in seconds
- filterExpression (string): Filter expression for the capture
- enabled (boolean): Enable or disable the schedule
- schedule (object): Schedule details
"""

kwargs.update(locals())

metadata = {
'tags': ['organizations', 'configure', 'devices', 'packetCapture', 'schedules'],
'operation': 'updateOrganizationDevicesPacketCaptureSchedule'
}
resource = f'/organizations/{organizationId}/devices/packetCapture/schedules/{scheduleId}'

body_params = ['devices', 'name', 'notes', 'duration', 'filterExpression', 'enabled', 'schedule', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action






def deleteOrganizationDevicesPacketCaptureSchedule(self, organizationId: str, scheduleId: str):
"""
**Delete schedule from cloud**
https://developer.cisco.com/meraki/api-v1/#!delete-organization-devices-packet-capture-schedule

- organizationId (string): Organization ID
- scheduleId (string): Delete the capture schedules of the specified capture schedule id
"""

kwargs = locals()

metadata = {
'tags': ['organizations', 'configure', 'devices', 'packetCapture', 'schedules'],
'operation': 'deleteOrganizationDevicesPacketCaptureSchedule'
}
resource = f'/organizations/{organizationId}/devices/packetCapture/schedules/{scheduleId}'

action = {
"resource": resource,
"operation": "destroy",
}
return action






def updateOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str, **kwargs):
"""
**Update an early access feature opt-in for an organization**
Expand Down
46 changes: 46 additions & 0 deletions meraki/api/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,52 @@ def getDeviceLiveToolsLedsBlink(self, serial: str, ledsBlinkId: str):



def createDeviceLiveToolsMacTable(self, serial: str, **kwargs):
"""
**Enqueue a job to request the MAC table from the device**
https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-mac-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', 'macTable'],
'operation': 'createDeviceLiveToolsMacTable'
}
serial = urllib.parse.quote(str(serial), safe='')
resource = f'/devices/{serial}/liveTools/macTable'

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 getDeviceLiveToolsMacTable(self, serial: str, macTableId: str):
"""
**Return a MAC table live tool job.**
https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-mac-table

- serial (string): Serial
- macTableId (string): Mac table ID
"""

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

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
Loading