Skip to content

Commit 9055536

Browse files
2 parents 0554042 + e810e88 commit 9055536

25 files changed

Lines changed: 3229 additions & 62 deletions

meraki/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
)
4444
from meraki.rest_session import *
4545

46-
__version__ = '1.54.0'
46+
__version__ = '1.56.0'
4747

4848

4949
class DashboardAPI(object):

meraki/aio/api/appliance.py

Lines changed: 547 additions & 1 deletion
Large diffs are not rendered by default.

meraki/aio/api/camera.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,15 @@ def updateDeviceCameraQualityAndRetention(self, serial: str, **kwargs):
243243
- motionBasedRetentionEnabled (boolean): Boolean indicating if motion-based retention is enabled(true) or disabled(false) on the camera.
244244
- audioRecordingEnabled (boolean): Boolean indicating if audio recording is enabled(true) or disabled(false) on the camera
245245
- restrictedBandwidthModeEnabled (boolean): Boolean indicating if restricted bandwidth is enabled(true) or disabled(false) on the camera. This setting does not apply to MV2 cameras.
246-
- quality (string): Quality of the camera. Can be one of 'Standard', 'High' or 'Enhanced'. Not all qualities are supported by every camera model.
246+
- quality (string): Quality of the camera. Can be one of 'Standard', 'High', 'Enhanced' or 'Ultra'. Not all qualities are supported by every camera model.
247247
- resolution (string): Resolution of the camera. Can be one of '1280x720', '1920x1080', '1080x1080', '2112x2112', '2880x2880', '2688x1512' or '3840x2160'.Not all resolutions are supported by every camera model.
248248
- motionDetectorVersion (integer): The version of the motion detector that will be used by the camera. Only applies to Gen 2 cameras. Defaults to v2.
249249
"""
250250

251251
kwargs.update(locals())
252252

253253
if 'quality' in kwargs:
254-
options = ['Enhanced', 'High', 'Standard']
254+
options = ['Enhanced', 'High', 'Standard', 'Ultra']
255255
assert kwargs['quality'] in options, f'''"quality" cannot be "{kwargs['quality']}", & must be set to one of: {options}'''
256256
if 'resolution' in kwargs:
257257
options = ['1080x1080', '1280x720', '1920x1080', '2112x2112', '2688x1512', '2880x2880', '3840x2160']

meraki/aio/api/licensing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ def getAdministeredLicensingSubscriptionEntitlements(self, **kwargs):
3737

3838

3939

40-
def getAdministeredLicensingSubscriptionSubscriptions(self, total_pages=1, direction='next', **kwargs):
40+
def getAdministeredLicensingSubscriptionSubscriptions(self, organizationIds: list, total_pages=1, direction='next', **kwargs):
4141
"""
4242
**List available subscriptions**
4343
https://developer.cisco.com/meraki/api-v1/#!get-administered-licensing-subscription-subscriptions
4444
45+
- organizationIds (array): Organizations to get associated subscriptions for
4546
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
4647
- direction (string): direction to paginate, either "next" (default) or "prev" page
4748
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
4849
- startingAfter (string): 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.
4950
- endingBefore (string): 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.
5051
- subscriptionIds (array): List of subscription ids to fetch
51-
- organizationIds (array): Organizations to get associated subscriptions for
5252
- startDate (string): Filter subscriptions by start date, ISO 8601 format. To filter with a range of dates, use 'startDate[<option>]=?' in the request. Accepted options include lt, gt, lte, gte.
5353
- endDate (string): Filter subscriptions by end date, ISO 8601 format. To filter with a range of dates, use 'endDate[<option>]=?' in the request. Accepted options include lt, gt, lte, gte.
5454
- statuses (array): List of statuses that returned subscriptions can have

meraki/aio/api/networks.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,7 @@ def createNetworkFloorPlan(self, networkId: str, name: str, imageContents: str,
11831183
- bottomRightCorner (object): The longitude and latitude of the bottom right corner of your floor plan.
11841184
- topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan.
11851185
- topRightCorner (object): The longitude and latitude of the top right corner of your floor plan.
1186+
- floorNumber (integer): The floor number of the floors within the building
11861187
"""
11871188

11881189
kwargs.update(locals())
@@ -1194,7 +1195,7 @@ def createNetworkFloorPlan(self, networkId: str, name: str, imageContents: str,
11941195
networkId = urllib.parse.quote(str(networkId), safe='')
11951196
resource = f'/networks/{networkId}/floorPlans'
11961197

1197-
body_params = ['name', 'center', 'bottomLeftCorner', 'bottomRightCorner', 'topLeftCorner', 'topRightCorner', 'imageContents', ]
1198+
body_params = ['name', 'center', 'bottomLeftCorner', 'bottomRightCorner', 'topLeftCorner', 'topRightCorner', 'floorNumber', 'imageContents', ]
11981199
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
11991200

12001201
return self._session.post(metadata, resource, payload)
@@ -1360,6 +1361,7 @@ def updateNetworkFloorPlan(self, networkId: str, floorPlanId: str, **kwargs):
13601361
- bottomRightCorner (object): The longitude and latitude of the bottom right corner of your floor plan.
13611362
- topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan.
13621363
- topRightCorner (object): The longitude and latitude of the top right corner of your floor plan.
1364+
- floorNumber (integer): The floor number of the floors within the building
13631365
- imageContents (string): The file contents (a base 64 encoded string) of your new image. Supported formats are PNG, GIF, and JPG. Note that all images are saved as PNG files, regardless of the format they are uploaded in. If you upload a new image, and you do NOT specify any new geolocation fields ('center, 'topLeftCorner', etc), the floor plan will be recentered with no rotation in order to maintain the aspect ratio of your new image.
13641366
"""
13651367

@@ -1373,7 +1375,7 @@ def updateNetworkFloorPlan(self, networkId: str, floorPlanId: str, **kwargs):
13731375
floorPlanId = urllib.parse.quote(str(floorPlanId), safe='')
13741376
resource = f'/networks/{networkId}/floorPlans/{floorPlanId}'
13751377

1376-
body_params = ['name', 'center', 'bottomLeftCorner', 'bottomRightCorner', 'topLeftCorner', 'topRightCorner', 'imageContents', ]
1378+
body_params = ['name', 'center', 'bottomLeftCorner', 'bottomRightCorner', 'topLeftCorner', 'topRightCorner', 'floorNumber', 'imageContents', ]
13771379
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
13781380

13791381
return self._session.put(metadata, resource, payload)
@@ -1541,7 +1543,10 @@ def deleteNetworkGroupPolicy(self, networkId: str, groupPolicyId: str, **kwargs)
15411543
groupPolicyId = urllib.parse.quote(str(groupPolicyId), safe='')
15421544
resource = f'/networks/{networkId}/groupPolicies/{groupPolicyId}'
15431545

1544-
return self._session.delete(metadata, resource)
1546+
query_params = ['force', ]
1547+
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}
1548+
1549+
return self._session.delete(metadata, resource, params)
15451550

15461551

15471552

@@ -1659,7 +1664,10 @@ def deleteNetworkMerakiAuthUser(self, networkId: str, merakiAuthUserId: str, **k
16591664
merakiAuthUserId = urllib.parse.quote(str(merakiAuthUserId), safe='')
16601665
resource = f'/networks/{networkId}/merakiAuthUsers/{merakiAuthUserId}'
16611666

1662-
return self._session.delete(metadata, resource)
1667+
query_params = ['delete', ]
1668+
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}
1669+
1670+
return self._session.delete(metadata, resource, params)
16631671

16641672

16651673

meraki/aio/api/organizations.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,6 +2284,48 @@ def getOrganizationDevicesStatusesOverview(self, organizationId: str, **kwargs):
22842284

22852285

22862286

2287+
def getOrganizationDevicesSystemMemoryUsageHistoryByInterval(self, organizationId: str, total_pages=1, direction='next', **kwargs):
2288+
"""
2289+
**Return the memory utilization history in kB for devices in the organization.**
2290+
https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-system-memory-usage-history-by-interval
2291+
2292+
- organizationId (string): Organization ID
2293+
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
2294+
- direction (string): direction to paginate, either "next" (default) or "prev" page
2295+
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10.
2296+
- startingAfter (string): 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.
2297+
- endingBefore (string): 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.
2298+
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today.
2299+
- t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
2300+
- 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 31 days. The default is 2 hours. If interval is provided, the timespan will be autocalculated.
2301+
- interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 1200, 3600, 14400. The default is 300. Interval is calculated if time params are provided.
2302+
- networkIds (array): Optional parameter to filter the result set by the included set of network IDs
2303+
- serials (array): Optional parameter to filter device availabilities history by device serial numbers
2304+
- productTypes (array): Optional parameter to filter device statuses by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, and secureConnect.
2305+
"""
2306+
2307+
kwargs.update(locals())
2308+
2309+
metadata = {
2310+
'tags': ['organizations', 'monitor', 'devices', 'system', 'memory', 'usage', 'history', 'byInterval'],
2311+
'operation': 'getOrganizationDevicesSystemMemoryUsageHistoryByInterval'
2312+
}
2313+
organizationId = urllib.parse.quote(str(organizationId), safe='')
2314+
resource = f'/organizations/{organizationId}/devices/system/memory/usage/history/byInterval'
2315+
2316+
query_params = ['perPage', 'startingAfter', 'endingBefore', 't0', 't1', 'timespan', 'interval', 'networkIds', 'serials', 'productTypes', ]
2317+
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}
2318+
2319+
array_params = ['networkIds', 'serials', 'productTypes', ]
2320+
for k, v in kwargs.items():
2321+
if k.strip() in array_params:
2322+
params[f'{k.strip()}[]'] = kwargs[f'{k}']
2323+
params.pop(k.strip())
2324+
2325+
return self._session.get_pages(metadata, resource, params, total_pages, direction)
2326+
2327+
2328+
22872329
def getOrganizationDevicesUplinksAddressesByDevice(self, organizationId: str, total_pages=1, direction='next', **kwargs):
22882330
"""
22892331
**List the current uplink addresses for devices in an organization.**

meraki/aio/api/sensor.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ def createNetworkSensorAlertsProfile(self, networkId: str, name: str, conditions
219219
- schedule (object): The sensor schedule to use with the alert profile.
220220
- recipients (object): List of recipients that will receive the alert.
221221
- serials (array): List of device serials assigned to this sensor alert profile.
222+
- includeSensorUrl (boolean): Include dashboard link to sensor in messages (default: true).
223+
- message (string): A custom message that will appear in email and text message alerts.
222224
"""
223225

224226
kwargs.update(locals())
@@ -230,7 +232,7 @@ def createNetworkSensorAlertsProfile(self, networkId: str, name: str, conditions
230232
networkId = urllib.parse.quote(str(networkId), safe='')
231233
resource = f'/networks/{networkId}/sensor/alerts/profiles'
232234

233-
body_params = ['name', 'schedule', 'conditions', 'recipients', 'serials', ]
235+
body_params = ['name', 'schedule', 'conditions', 'recipients', 'serials', 'includeSensorUrl', 'message', ]
234236
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
235237

236238
return self._session.post(metadata, resource, payload)
@@ -270,6 +272,8 @@ def updateNetworkSensorAlertsProfile(self, networkId: str, id: str, **kwargs):
270272
- conditions (array): List of conditions that will cause the profile to send an alert.
271273
- recipients (object): List of recipients that will receive the alert.
272274
- serials (array): List of device serials assigned to this sensor alert profile.
275+
- includeSensorUrl (boolean): Include dashboard link to sensor in messages (default: true).
276+
- message (string): A custom message that will appear in email and text message alerts.
273277
"""
274278

275279
kwargs.update(locals())
@@ -282,7 +286,7 @@ def updateNetworkSensorAlertsProfile(self, networkId: str, id: str, **kwargs):
282286
id = urllib.parse.quote(str(id), safe='')
283287
resource = f'/networks/{networkId}/sensor/alerts/profiles/{id}'
284288

285-
body_params = ['name', 'schedule', 'conditions', 'recipients', 'serials', ]
289+
body_params = ['name', 'schedule', 'conditions', 'recipients', 'serials', 'includeSensorUrl', 'message', ]
286290
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
287291

288292
return self._session.put(metadata, resource, payload)
@@ -412,7 +416,7 @@ def getOrganizationSensorReadingsHistory(self, organizationId: str, total_pages=
412416
- 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 7 days. The default is 2 hours.
413417
- networkIds (array): Optional parameter to filter readings by network.
414418
- serials (array): Optional parameter to filter readings by sensor.
415-
- metrics (array): Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved. Allowed values are apparentPower, battery, button, co2, current, door, downstreamPower, frequency, humidity, indoorAirQuality, noise, pm25, powerFactor, realPower, remoteLockoutSwitch, temperature, tvoc, voltage, and water.
419+
- metrics (array): Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved.
416420
"""
417421

418422
kwargs.update(locals())
@@ -450,7 +454,7 @@ def getOrganizationSensorReadingsLatest(self, organizationId: str, total_pages=1
450454
- endingBefore (string): 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.
451455
- networkIds (array): Optional parameter to filter readings by network.
452456
- serials (array): Optional parameter to filter readings by sensor.
453-
- metrics (array): Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved. Allowed values are apparentPower, battery, button, co2, current, door, downstreamPower, frequency, humidity, indoorAirQuality, noise, pm25, powerFactor, realPower, remoteLockoutSwitch, temperature, tvoc, voltage, and water.
457+
- metrics (array): Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved.
454458
"""
455459

456460
kwargs.update(locals())

0 commit comments

Comments
 (0)