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
3 changes: 2 additions & 1 deletion generator/generate_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ def generate_library(spec: dict, version_number: str, api_version_number: str, i
"secureConnect",
"wirelessController",
"campusGateway",
"spaces"
"spaces",
"nac"
]
# legacy scopes = ['organizations', 'networks', 'devices', 'appliance', 'camera', 'cellularGateway', 'insight',
# 'sm', 'switch', 'wireless']
Expand Down
3 changes: 2 additions & 1 deletion generator/generate_library_oasv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ def parse_params(operation, parameters, param_filters=None):
def generate_library(spec, version_number, is_github_action):
# Supported scopes list will include organizations, networks, devices, and all product types.
supported_scopes = ['organizations', 'networks', 'devices', 'appliance', 'camera', 'cellularGateway', 'insight',
'sm', 'switch', 'wireless', 'sensor', 'administered', 'licensing', 'secureConnect']
'sm', 'switch', 'wireless', 'sensor', 'administered', 'licensing', 'secureConnect', 'campusGateway',
'nac', 'spaces', 'wirelessController']
# legacy scopes = ['organizations', 'networks', 'devices', 'appliance', 'camera', 'cellularGateway', 'insight',
# 'sm', 'switch', 'wireless']
tags = spec['tags']
Expand Down
677 changes: 677 additions & 0 deletions generator/generate_library_oasv3.py

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion generator/generate_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ def main():
"secureConnect",
"wirelessController",
"campusGateway",
"spaces"
"spaces",
"nac"
]
# legacy scopes = ['organizations', 'networks', 'devices',
# 'appliance', 'camera', 'cellularGateway', 'insight', 'sm', 'switch', 'wireless']
Expand Down
4 changes: 2 additions & 2 deletions meraki/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
)
from meraki.rest_session import *

__version__ = '2.0.3'
__api_version__ = '1.58.0'
__version__ = '2.1.0'
__api_version__ = '1.65.0'


class DashboardAPI(object):
Expand Down
68 changes: 62 additions & 6 deletions meraki/aio/api/appliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def updateNetworkApplianceFirewallFirewalledService(self, networkId: str, servic
- networkId (string): Network ID
- service (string): Service
- access (string): A string indicating the rule for which IPs are allowed to use the specified service. Acceptable values are "blocked" (no remote IPs can access the service), "restricted" (only allowed IPs can access the service), and "unrestriced" (any remote IP can access the service). This field is required
- allowedIps (array): An array of allowed IPs that can access the service. This field is required if "access" is set to "restricted". Otherwise this field is ignored
- allowedIps (array): An array of allowed CIDRs that can access the service. This field is required if "access" is set to "restricted". Otherwise this field is ignored
"""

kwargs.update(locals())
Expand Down Expand Up @@ -1931,7 +1931,7 @@ def updateNetworkApplianceTrafficShapingUplinkSelection(self, networkId: str, **

- networkId (string): Network ID
- activeActiveAutoVpnEnabled (boolean): Toggle for enabling or disabling active-active AutoVPN
- defaultUplink (string): The default uplink. Must be one of: 'wan1' or 'wan2'
- defaultUplink (string): The default uplink. Must be a WAN interface 'wanX'
- loadBalancingEnabled (boolean): Toggle for enabling or disabling load balancing
- failoverAndFailback (object): WAN failover and failback behavior
- wanTrafficUplinkPreferences (array): Array of uplink preference rules for WAN traffic
Expand Down Expand Up @@ -2014,7 +2014,7 @@ def getNetworkApplianceUplinksUsageHistory(self, networkId: str, **kwargs):

def getNetworkApplianceVlans(self, networkId: str):
"""
**List the VLANs for an MX network**
**List the VLANs for a Cisco Secure Router network**
https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-vlans

- networkId (string): Network ID
Expand Down Expand Up @@ -2157,7 +2157,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs):
- groupPolicyId (string): The id of the desired group policy to apply to the VLAN
- vpnNatSubnet (string): The translated VPN subnet if VPN and VPN subnet translation are enabled on the VLAN
- dhcpHandling (string): The appliance's handling of DHCP requests on this VLAN. One of: 'Run a DHCP server', 'Relay DHCP to another server' or 'Do not respond to DHCP requests'
- dhcpRelayServerIps (array): The IPs of the DHCP servers that DHCP requests should be relayed to
- dhcpRelayServerIps (array): The IPs (IPv4) of the DHCP servers that DHCP requests should be relayed to. CIDR/subnet notation and hostnames are not supported.
- dhcpLeaseTime (string): The term of DHCP leases if the appliance is running a DHCP server on this VLAN. One of: '30 minutes', '1 hour', '4 hours', '12 hours', '1 day' or '1 week'
- dhcpBootOptionsEnabled (boolean): Use DHCP boot options specified in other properties
- dhcpBootNextServer (string): DHCP boot option to direct boot clients to the server to load the boot file from
Expand Down Expand Up @@ -3061,22 +3061,34 @@ def getOrganizationApplianceUplinkStatuses(self, organizationId: str, total_page



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

- organizationId (string): Organization ID
- networkIds (array): A list of network IDs. The returned devices will be filtered to only include these networks.
"""

kwargs.update(locals())

metadata = {
'tags': ['appliance', 'monitor', '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)
query_params = ['networkIds', ]
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}

array_params = ['networkIds', ]
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)



Expand Down Expand Up @@ -3107,6 +3119,50 @@ def getOrganizationApplianceUplinksUsageByNetwork(self, organizationId: str, **k



def getOrganizationApplianceVpnSiteToSiteIpsecPeersSlas(self, organizationId: str):
"""
**Get the list of available IPsec SLA policies for an organization**
https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-site-to-site-ipsec-peers-slas

- organizationId (string): Organization ID
"""

metadata = {
'tags': ['appliance', 'configure', 'vpn', 'siteToSite', 'ipsec', 'peers', 'slas'],
'operation': 'getOrganizationApplianceVpnSiteToSiteIpsecPeersSlas'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/appliance/vpn/siteToSite/ipsec/peers/slas'

return self._session.get(metadata, resource)



def updateOrganizationApplianceVpnSiteToSiteIpsecPeersSlas(self, organizationId: str, **kwargs):
"""
**Update the IPsec SLA policies for an organization**
https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-vpn-site-to-site-ipsec-peers-slas

- organizationId (string): Organization ID
- items (array): List of IPsec SLA policies
"""

kwargs.update(locals())

metadata = {
'tags': ['appliance', 'configure', 'vpn', 'siteToSite', 'ipsec', 'peers', 'slas'],
'operation': 'updateOrganizationApplianceVpnSiteToSiteIpsecPeersSlas'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/appliance/vpn/siteToSite/ipsec/peers/slas'

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

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



def getOrganizationApplianceVpnStats(self, organizationId: str, total_pages=1, direction='next', **kwargs):
"""
**Show VPN history stat for networks in an organization**
Expand Down
7 changes: 4 additions & 3 deletions meraki/aio/api/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,13 +868,14 @@ def deleteOrganizationCameraCustomAnalyticsArtifact(self, organizationId: str, a



def getOrganizationCameraDetectionsHistoryByBoundaryByInterval(self, organizationId: str, boundaryIds: list, total_pages=1, direction='next', **kwargs):
def getOrganizationCameraDetectionsHistoryByBoundaryByInterval(self, organizationId: str, boundaryIds: list, ranges: 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.
- ranges (array): A list of time ranges with intervals
- 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.
Expand All @@ -891,10 +892,10 @@ def getOrganizationCameraDetectionsHistoryByBoundaryByInterval(self, organizatio
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/camera/detections/history/byBoundary/byInterval'

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

array_params = ['boundaryIds', 'boundaryTypes', ]
array_params = ['boundaryIds', 'ranges', 'boundaryTypes', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
Expand Down
36 changes: 36 additions & 0 deletions meraki/aio/api/campusGateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,42 @@ def updateNetworkCampusGatewayCluster(self, networkId: str, clusterId: str, **kw



def getOrganizationCampusGatewayClusters(self, organizationId: str, total_pages=1, direction='next', **kwargs):
"""
**Get the details of campus gateway clusters**
https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters

- organizationId (string): Organization ID
- 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
- networkIds (array): Networks for which information should be gathered.
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 50.
- 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.
- 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.
"""

kwargs.update(locals())

metadata = {
'tags': ['campusGateway', 'configure', 'clusters'],
'operation': 'getOrganizationCampusGatewayClusters'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/campusGateway/clusters'

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

array_params = ['networkIds', ]
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 getOrganizationCampusGatewayDevicesUplinksLocalOverridesByDevice(self, organizationId: str, total_pages=1, direction='next', **kwargs):
"""
**Uplink overrides configured locally on Campus Gateway devices in an organization.**
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 @@ -345,6 +345,52 @@ def getDeviceLiveToolsMacTable(self, serial: str, macTableId: str):



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

- 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', 'multicastRouting'],
'operation': 'createDeviceLiveToolsMulticastRouting'
}
serial = urllib.parse.quote(str(serial), safe='')
resource = f'/devices/{serial}/liveTools/multicastRouting'

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 getDeviceLiveToolsMulticastRouting(self, serial: str, multicastRoutingId: str):
"""
**Return a Multicast routing live tool job.**
https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-multicast-routing

- serial (string): Serial
- multicastRoutingId (string): Multicast routing ID
"""

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

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
6 changes: 3 additions & 3 deletions meraki/aio/api/licensing.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ def getAdministeredLicensingSubscriptionSubscriptions(self, organizationIds: lis
- 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.
- 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.
- subscriptionIds (array): List of subscription ids to fetch
- 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.
- 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.
- statuses (array): List of statuses that returned subscriptions can have
- productTypes (array): List of product types that returned subscriptions need to have entitlements for.
- skus (array): List of SKUs that returned subscriptions need to have entitlements for.
- name (string): Search for subscription name
- 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.
- 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.
"""

kwargs.update(locals())
Expand All @@ -65,7 +65,7 @@ def getAdministeredLicensingSubscriptionSubscriptions(self, organizationIds: lis
}
resource = f'/administered/licensing/subscription/subscriptions'

query_params = ['perPage', 'startingAfter', 'endingBefore', 'subscriptionIds', 'organizationIds', 'startDate', 'endDate', 'statuses', 'productTypes', 'skus', 'name', ]
query_params = ['perPage', 'startingAfter', 'endingBefore', 'subscriptionIds', 'organizationIds', 'statuses', 'productTypes', 'skus', 'name', 'startDate', 'endDate', ]
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}

array_params = ['subscriptionIds', 'organizationIds', 'statuses', 'productTypes', 'skus', ]
Expand Down
35 changes: 35 additions & 0 deletions meraki/aio/api/nac.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import urllib


class AsyncNac:
def __init__(self, session):
super().__init__()
self._session = session



def createOrganizationNacCertificatesAuthoritiesCrl(self, organizationId: str, caId: str, content: str, isDelta: bool):
"""
**Create a new CRL (either base or delta) for an existing CA**
https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-certificates-authorities-crl

- organizationId (string): Organization ID
- caId (string): ID of the CRL issuer
- content (string): CRL content in PEM format
- isDelta (boolean): Whether it's a delta CRL or not
"""

kwargs = locals()

metadata = {
'tags': ['nac', 'configure', 'certificates', 'authorities', 'crls'],
'operation': 'createOrganizationNacCertificatesAuthoritiesCrl'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/nac/certificates/authorities/crls'

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

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

Loading