Skip to content

Commit 4e32708

Browse files
Updated with API release 1.20.0
1 parent c1ac6c5 commit 4e32708

16 files changed

Lines changed: 365 additions & 20 deletions

meraki/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
USE_ITERATOR_FOR_GET_PAGES,
4444
)
4545

46-
__version__ = '1.19.0'
46+
__version__ = '1.20.0'
4747

4848

4949
class DashboardAPI(object):

meraki/aio/api/appliance.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,24 @@ def getDeviceAppliancePerformance(self, serial: str):
4141

4242

4343

44+
def createDeviceApplianceVmxAuthenticationToken(self, serial: str):
45+
"""
46+
**Generate a new vMX authentication token**
47+
https://developer.cisco.com/meraki/api-v1/#!create-device-appliance-vmx-authentication-token
48+
49+
- serial (string): (required)
50+
"""
51+
52+
metadata = {
53+
'tags': ['appliance', 'configure', 'vmx', 'authenticationToken'],
54+
'operation': 'createDeviceApplianceVmxAuthenticationToken'
55+
}
56+
resource = f'/devices/{serial}/appliance/vmx/authenticationToken'
57+
58+
return self._session.post(metadata, resource)
59+
60+
61+
4462
def getNetworkApplianceClientSecurityEvents(self, networkId: str, clientId: str, total_pages=1, direction='next', **kwargs):
4563
"""
4664
**List the security events for a client**

meraki/aio/api/camera.py

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,50 @@ def getDeviceCameraAnalyticsZoneHistory(self, serial: str, zoneId: str, **kwargs
133133

134134

135135

136+
def getDeviceCameraCustomAnalytics(self, serial: str):
137+
"""
138+
**Return custom analytics settings for a camera**
139+
https://developer.cisco.com/meraki/api-v1/#!get-device-camera-custom-analytics
140+
141+
- serial (string): (required)
142+
"""
143+
144+
metadata = {
145+
'tags': ['camera', 'configure', 'customAnalytics'],
146+
'operation': 'getDeviceCameraCustomAnalytics'
147+
}
148+
resource = f'/devices/{serial}/camera/customAnalytics'
149+
150+
return self._session.get(metadata, resource)
151+
152+
153+
154+
def updateDeviceCameraCustomAnalytics(self, serial: str, **kwargs):
155+
"""
156+
**Update custom analytics settings for a camera**
157+
https://developer.cisco.com/meraki/api-v1/#!update-device-camera-custom-analytics
158+
159+
- serial (string): (required)
160+
- enabled (boolean): Enable custom analytics
161+
- artifactId (string): The ID of the custom analytics artifact
162+
- parameters (array): Parameters for the custom analytics workload
163+
"""
164+
165+
kwargs.update(locals())
166+
167+
metadata = {
168+
'tags': ['camera', 'configure', 'customAnalytics'],
169+
'operation': 'updateDeviceCameraCustomAnalytics'
170+
}
171+
resource = f'/devices/{serial}/camera/customAnalytics'
172+
173+
body_params = ['enabled', 'artifactId', 'parameters', ]
174+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
175+
176+
return self._session.put(metadata, resource, payload)
177+
178+
179+
136180
def generateDeviceCameraSnapshot(self, serial: str, **kwargs):
137181
"""
138182
**Generate a snapshot of what the camera sees at the specified time and return a link to that image.**
@@ -635,6 +679,86 @@ def deleteNetworkCameraWirelessProfile(self, networkId: str, wirelessProfileId:
635679

636680

637681

682+
def getOrganizationCameraCustomAnalyticsArtifacts(self, organizationId: str):
683+
"""
684+
**List Custom Analytics Artifacts**
685+
https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-custom-analytics-artifacts
686+
687+
- organizationId (string): (required)
688+
"""
689+
690+
metadata = {
691+
'tags': ['camera', 'configure', 'customAnalytics', 'artifacts'],
692+
'operation': 'getOrganizationCameraCustomAnalyticsArtifacts'
693+
}
694+
resource = f'/organizations/{organizationId}/camera/customAnalytics/artifacts'
695+
696+
return self._session.get(metadata, resource)
697+
698+
699+
700+
def createOrganizationCameraCustomAnalyticsArtifact(self, organizationId: str, **kwargs):
701+
"""
702+
**Create custom analytics artifact**
703+
https://developer.cisco.com/meraki/api-v1/#!create-organization-camera-custom-analytics-artifact
704+
705+
- organizationId (string): (required)
706+
- name (string): Unique name of the artifact
707+
"""
708+
709+
kwargs.update(locals())
710+
711+
metadata = {
712+
'tags': ['camera', 'configure', 'customAnalytics', 'artifacts'],
713+
'operation': 'createOrganizationCameraCustomAnalyticsArtifact'
714+
}
715+
resource = f'/organizations/{organizationId}/camera/customAnalytics/artifacts'
716+
717+
body_params = ['name', ]
718+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
719+
720+
return self._session.post(metadata, resource, payload)
721+
722+
723+
724+
def getOrganizationCameraCustomAnalyticsArtifact(self, organizationId: str, artifactId: str):
725+
"""
726+
**Get Custom Analytics Artifact**
727+
https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-custom-analytics-artifact
728+
729+
- organizationId (string): (required)
730+
- artifactId (string): (required)
731+
"""
732+
733+
metadata = {
734+
'tags': ['camera', 'configure', 'customAnalytics', 'artifacts'],
735+
'operation': 'getOrganizationCameraCustomAnalyticsArtifact'
736+
}
737+
resource = f'/organizations/{organizationId}/camera/customAnalytics/artifacts/{artifactId}'
738+
739+
return self._session.get(metadata, resource)
740+
741+
742+
743+
def deleteOrganizationCameraCustomAnalyticsArtifact(self, organizationId: str, artifactId: str):
744+
"""
745+
**Delete Custom Analytics Artifact**
746+
https://developer.cisco.com/meraki/api-v1/#!delete-organization-camera-custom-analytics-artifact
747+
748+
- organizationId (string): (required)
749+
- artifactId (string): (required)
750+
"""
751+
752+
metadata = {
753+
'tags': ['camera', 'configure', 'customAnalytics', 'artifacts'],
754+
'operation': 'deleteOrganizationCameraCustomAnalyticsArtifact'
755+
}
756+
resource = f'/organizations/{organizationId}/camera/customAnalytics/artifacts/{artifactId}'
757+
758+
return self._session.delete(metadata, resource)
759+
760+
761+
638762
def getOrganizationCameraOnboardingStatuses(self, organizationId: str, **kwargs):
639763
"""
640764
**Fetch onboarding status of cameras**

meraki/aio/api/organizations.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,6 @@ def getOrganizationConfigurationChanges(self, organizationId: str, total_pages=1
13441344

13451345

13461346

1347-
13481347
def getOrganizationDevices(self, organizationId: str, total_pages=1, direction='next', **kwargs):
13491348
"""
13501349
**List the devices in an organization**

meraki/aio/api/sensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def getOrganizationSensorReadingsHistory(self, organizationId: str, total_pages=
2121
- 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.
2222
- networkIds (array): Optional parameter to filter readings by network.
2323
- serials (array): Optional parameter to filter readings by sensor.
24-
- metrics (array): Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved. Allowed values are temperature, humidity, water, door, and battery.
24+
- metrics (array): Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved. Allowed values are temperature, humidity, water, door, tvoc, pm25, noise, indoorAirQuality, button, and battery.
2525
"""
2626

2727
kwargs.update(locals())
@@ -58,7 +58,7 @@ def getOrganizationSensorReadingsLatest(self, organizationId: str, total_pages=1
5858
- 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.
5959
- networkIds (array): Optional parameter to filter readings by network.
6060
- serials (array): Optional parameter to filter readings by sensor.
61-
- metrics (array): Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved. Allowed values are temperature, humidity, water, door, and battery.
61+
- metrics (array): Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved. Allowed values are temperature, humidity, water, door, tvoc, pm25, noise, indoorAirQuality, button, and battery.
6262
"""
6363

6464
kwargs.update(locals())

meraki/aio/api/switch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ def updateNetworkSwitchAlternateManagementInterface(self, networkId: str, **kwar
761761

762762
def getNetworkSwitchDhcpServerPolicy(self, networkId: str):
763763
"""
764-
**Return the DHCP server policy**
764+
**Return the DHCP server settings**
765765
https://developer.cisco.com/meraki/api-v1/#!get-network-switch-dhcp-server-policy
766766
767767
- networkId (string): (required)
@@ -779,13 +779,13 @@ def getNetworkSwitchDhcpServerPolicy(self, networkId: str):
779779

780780
def updateNetworkSwitchDhcpServerPolicy(self, networkId: str, **kwargs):
781781
"""
782-
**Update the DHCP server policy**
782+
**Update the DHCP server settings**
783783
https://developer.cisco.com/meraki/api-v1/#!update-network-switch-dhcp-server-policy
784784
785785
- networkId (string): (required)
786786
- defaultPolicy (string): 'allow' or 'block' new DHCP servers. Default value is 'allow'.
787-
- allowedServers (array): List the MAC addresses of DHCP servers to permit on the network. Applicable only if defaultPolicy is set to block. An empty array will clear the entries.
788-
- blockedServers (array): List the MAC addresses of DHCP servers to block on the network. Applicable only if defaultPolicy is set to allow. An empty array will clear the entries.
787+
- allowedServers (array): 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.
788+
- blockedServers (array): 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.
789789
"""
790790

791791
kwargs.update(locals())

meraki/aio/api/wireless.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1863,6 +1863,7 @@ def updateNetworkWirelessSsidVpn(self, networkId: str, number: str, **kwargs):
18631863
18641864
- networkId (string): (required)
18651865
- number (string): (required)
1866+
- concentrator (object): The VPN concentrator settings for this SSID.
18661867
- splitTunnel (object): The VPN split tunnel settings for this SSID.
18671868
- failover (object): Secondary VPN concentrator settings. This is only used when two VPN concentrators are configured on the SSID.
18681869
"""
@@ -1875,7 +1876,7 @@ def updateNetworkWirelessSsidVpn(self, networkId: str, number: str, **kwargs):
18751876
}
18761877
resource = f'/networks/{networkId}/wireless/ssids/{number}/vpn'
18771878

1878-
body_params = ['splitTunnel', 'failover', ]
1879+
body_params = ['concentrator', 'splitTunnel', 'failover', ]
18791880
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
18801881

18811882
return self._session.put(metadata, resource, payload)

meraki/api/appliance.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,24 @@ def getDeviceAppliancePerformance(self, serial: str):
4141

4242

4343

44+
def createDeviceApplianceVmxAuthenticationToken(self, serial: str):
45+
"""
46+
**Generate a new vMX authentication token**
47+
https://developer.cisco.com/meraki/api-v1/#!create-device-appliance-vmx-authentication-token
48+
49+
- serial (string): (required)
50+
"""
51+
52+
metadata = {
53+
'tags': ['appliance', 'configure', 'vmx', 'authenticationToken'],
54+
'operation': 'createDeviceApplianceVmxAuthenticationToken'
55+
}
56+
resource = f'/devices/{serial}/appliance/vmx/authenticationToken'
57+
58+
return self._session.post(metadata, resource)
59+
60+
61+
4462
def getNetworkApplianceClientSecurityEvents(self, networkId: str, clientId: str, total_pages=1, direction='next', **kwargs):
4563
"""
4664
**List the security events for a client**

meraki/api/batch/appliance.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,32 @@ def __init__(self):
44

55

66

7+
def createDeviceApplianceVmxAuthenticationToken(self, serial: str):
8+
"""
9+
**Generate a new vMX authentication token**
10+
https://developer.cisco.com/meraki/api-v1/#!create-device-appliance-vmx-authentication-token
11+
12+
- serial (string): (required)
13+
"""
14+
15+
metadata = {
16+
'tags': ['appliance', 'configure', 'vmx', 'authenticationToken'],
17+
'operation': 'createDeviceApplianceVmxAuthenticationToken'
18+
}
19+
resource = f'/devices/{serial}/appliance/vmx/authenticationToken'
20+
21+
action = {
22+
"resource": resource,
23+
"operation": "create",
24+
"body": payload
25+
}
26+
return action
27+
28+
29+
30+
31+
32+
733
def updateNetworkApplianceConnectivityMonitoringDestinations(self, networkId: str, **kwargs):
834
"""
935
**Update the connectivity testing destinations for an MX network**

meraki/api/batch/camera.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,39 @@ def __init__(self):
44

55

66

7+
def updateDeviceCameraCustomAnalytics(self, serial: str, **kwargs):
8+
"""
9+
**Update custom analytics settings for a camera**
10+
https://developer.cisco.com/meraki/api-v1/#!update-device-camera-custom-analytics
11+
12+
- serial (string): (required)
13+
- enabled (boolean): Enable custom analytics
14+
- artifactId (string): The ID of the custom analytics artifact
15+
- parameters (array): Parameters for the custom analytics workload
16+
"""
17+
18+
kwargs.update(locals())
19+
20+
metadata = {
21+
'tags': ['camera', 'configure', 'customAnalytics'],
22+
'operation': 'updateDeviceCameraCustomAnalytics'
23+
}
24+
resource = f'/devices/{serial}/camera/customAnalytics'
25+
26+
body_params = ['enabled', 'artifactId', 'parameters', ]
27+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
28+
action = {
29+
"resource": resource,
30+
"operation": "update",
31+
"body": payload
32+
}
33+
return action
34+
35+
36+
37+
38+
39+
740
def updateDeviceCameraQualityAndRetention(self, serial: str, **kwargs):
841
"""
942
**Update quality and retention settings for the given camera**

0 commit comments

Comments
 (0)