From f2bda21e617da9adf70d31f47bcc10ec572fe9b7 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Wed, 6 May 2026 15:04:58 -0700 Subject: [PATCH 01/60] Trigger release From 354b331844c822bb4c398ca0ba526c63a5924a27 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Wed, 6 May 2026 15:29:03 -0700 Subject: [PATCH 02/60] Correct version strings on beta branch. --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1e2592ce..a340392f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "3.1.0" +version = "3.1.0b0" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index e815c0ca..04ba9e4c 100644 --- a/uv.lock +++ b/uv.lock @@ -521,7 +521,7 @@ wheels = [ [[package]] name = "meraki" -version = "3.1.0" +version = "3.1.0b0" source = { editable = "." } dependencies = [ { name = "aiohttp" }, From 2828696a2ed88f7e05e6cbbec7184ab0aef947d8 Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 23:30:09 +0000 Subject: [PATCH 03/60] Auto-generated library v3.1.0b0 for API v1.70.0-beta.0. (#345) Co-authored-by: GitHub Action --- docs/generation-report.md | 16 + meraki/__init__.py | 2 +- meraki/_version.py | 2 +- meraki/aio/api/administered.py | 33 + meraki/aio/api/appliance.py | 888 +++- meraki/aio/api/camera.py | 231 + meraki/aio/api/campusGateway.py | 548 ++ meraki/aio/api/devices.py | 677 +++ meraki/aio/api/insight.py | 240 + meraki/aio/api/licensing.py | 33 + meraki/aio/api/nac.py | 1151 +++++ meraki/aio/api/networks.py | 277 +- meraki/aio/api/organizations.py | 3970 +++++++++++++- meraki/aio/api/secureConnect.py | 1082 ++++ meraki/aio/api/sensor.py | 167 +- meraki/aio/api/sm.py | 181 + meraki/aio/api/support.py | 24 + meraki/aio/api/switch.py | 4024 +++++++++++++- meraki/aio/api/users.py | 838 +++ meraki/aio/api/wireless.py | 7190 +++++++++++++++++++++++--- meraki/aio/api/wirelessController.py | 86 + meraki/api/administered.py | 33 + meraki/api/appliance.py | 888 +++- meraki/api/batch/appliance.py | 335 ++ meraki/api/batch/camera.py | 79 + meraki/api/batch/campusGateway.py | 73 + meraki/api/batch/devices.py | 182 + meraki/api/batch/insight.py | 152 + meraki/api/batch/nac.py | 316 ++ meraki/api/batch/networks.py | 195 +- meraki/api/batch/organizations.py | 657 +++ meraki/api/batch/secureConnect.py | 224 + meraki/api/batch/sensor.py | 4 +- meraki/api/batch/sm.py | 102 + meraki/api/batch/support.py | 3 + meraki/api/batch/switch.py | 1103 ++++ meraki/api/batch/users.py | 359 ++ meraki/api/batch/wireless.py | 436 ++ meraki/api/camera.py | 231 + meraki/api/campusGateway.py | 548 ++ meraki/api/devices.py | 677 +++ meraki/api/insight.py | 240 + meraki/api/licensing.py | 33 + meraki/api/nac.py | 1151 +++++ meraki/api/networks.py | 277 +- meraki/api/organizations.py | 3970 +++++++++++++- meraki/api/secureConnect.py | 1082 ++++ meraki/api/sensor.py | 167 +- meraki/api/sm.py | 181 + meraki/api/support.py | 24 + meraki/api/switch.py | 4024 +++++++++++++- meraki/api/users.py | 838 +++ meraki/api/wireless.py | 7190 +++++++++++++++++++++++--- meraki/api/wirelessController.py | 86 + 54 files changed, 45406 insertions(+), 2114 deletions(-) create mode 100644 meraki/aio/api/nac.py create mode 100644 meraki/aio/api/secureConnect.py create mode 100644 meraki/aio/api/support.py create mode 100644 meraki/aio/api/users.py create mode 100644 meraki/api/batch/nac.py create mode 100644 meraki/api/batch/secureConnect.py create mode 100644 meraki/api/batch/support.py create mode 100644 meraki/api/batch/users.py create mode 100644 meraki/api/nac.py create mode 100644 meraki/api/secureConnect.py create mode 100644 meraki/api/support.py create mode 100644 meraki/api/users.py diff --git a/docs/generation-report.md b/docs/generation-report.md index bd02f142..884d7544 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1 +1,17 @@ # Generation Report + +## 2026-05-06 | Library v3.1.0b0 | API 1.70.0-beta.0 + + +### Python keyword parameter conflicts + + +The following operations have parameters whose names are Python reserved keywords. +The generator renames them with a trailing underscore (e.g., `from` -> `from_`). +These should be reported to the owning teams for resolution in the API spec. + + +| Scope | Operation | Location | Param | +| --- | --- | --- | --- | +| secureConnect | `createOrganizationSecureConnectRemoteAccessLogsExport` | body | `from` | + diff --git a/meraki/__init__.py b/meraki/__init__.py index 04eb7940..aafca112 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -52,7 +52,7 @@ from meraki._version import __version__ # noqa: F401 from datetime import datetime -__api_version__ = "1.70.0" +__api_version__ = "1.70.0-beta.0" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index f5f41e56..af79d361 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "3.1.0" +__version__ = "3.1.0b0" diff --git a/meraki/aio/api/administered.py b/meraki/aio/api/administered.py index 86a44296..05b1663a 100644 --- a/meraki/aio/api/administered.py +++ b/meraki/aio/api/administered.py @@ -67,3 +67,36 @@ def revokeAdministeredIdentitiesMeApiKeys(self, suffix: str): resource = f"/administered/identities/me/api/keys/{suffix}/revoke" return self._session.post(metadata, resource) + + def getAdministeredSearchLive(self, query: str, organizationId: str, networkId: str, **kwargs): + """ + **List the appropriate results for a given global search utilizing live_search_react** + https://developer.cisco.com/meraki/api-v1/#!get-administered-search-live + + - query (string): Search keywords + - organizationId (string): Id of Organization you want to search with + - networkId (string): Id of NodeGroup you want to seach with + """ + + kwargs = locals() + + metadata = { + "tags": ["administered", "configure", "search", "live"], + "operation": "getAdministeredSearchLive", + } + resource = "/administered/search/live" + + query_params = [ + "query", + "organizationId", + "networkId", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getAdministeredSearchLive: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) diff --git a/meraki/aio/api/appliance.py b/meraki/aio/api/appliance.py index db28a668..b4634abd 100644 --- a/meraki/aio/api/appliance.py +++ b/meraki/aio/api/appliance.py @@ -23,6 +23,112 @@ def getDeviceApplianceDhcpSubnets(self, serial: str): return self._session.get(metadata, resource) + def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): + """ + **Update configurations for an appliance's specified port** + https://developer.cisco.com/meraki/api-v1/#!create-device-appliance-interfaces-ports-update + + - serial (string): Serial + - interface (object): The interface tuple used to identify the port + - enabled (boolean): Indicates whether the port is enabled + - personality (object): Describes the port's configurability + - uplink (object): The port's settings when in WAN mode + - downlink (object): The port's VLAN settings when in LAN mode + - speed (string): Link speed for the port, in Mbps + - duplex (string): Duplex configuration for the port + """ + + kwargs.update(locals()) + + if "speed" in kwargs: + options = ["10", "100", "1000", "10000", "2500", "25000", "5000", "auto"] + assert kwargs["speed"] in options, f'''"speed" cannot be "{kwargs["speed"]}", & must be set to one of: {options}''' + if "duplex" in kwargs: + options = ["auto", "full", "half"] + assert kwargs["duplex"] in options, ( + f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["appliance", "configure", "interfaces", "ports", "update"], + "operation": "createDeviceApplianceInterfacesPortsUpdate", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/appliance/interfaces/ports/update" + + body_params = [ + "interface", + "enabled", + "personality", + "uplink", + "downlink", + "speed", + "duplex", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createDeviceApplianceInterfacesPortsUpdate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs): + """ + **Update configurations for an appliance's specified port** + https://developer.cisco.com/meraki/api-v1/#!update-device-appliance-interfaces-port + + - serial (string): Serial + - number (string): Number + - enabled (boolean): Indicates whether the port is enabled + - personality (object): Describes the port's configurability + - uplink (object): The port's settings when in WAN mode + - downlink (object): The port's VLAN settings when in LAN mode + - speed (string): Link speed for the port, in Mbps + - duplex (string): Duplex configuration for the port + """ + + kwargs.update(locals()) + + if "speed" in kwargs: + options = ["10", "100", "1000", "10000", "2500", "25000", "5000", "auto"] + assert kwargs["speed"] in options, f'''"speed" cannot be "{kwargs["speed"]}", & must be set to one of: {options}''' + if "duplex" in kwargs: + options = ["auto", "full", "half"] + assert kwargs["duplex"] in options, ( + f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["appliance", "configure", "interfaces", "ports"], + "operation": "updateDeviceApplianceInterfacesPort", + } + serial = urllib.parse.quote(str(serial), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/devices/{serial}/appliance/interfaces/ports/{number}" + + body_params = [ + "enabled", + "personality", + "uplink", + "downlink", + "speed", + "duplex", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateDeviceApplianceInterfacesPort: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getDeviceAppliancePerformance(self, serial: str, **kwargs): """ **Return the performance score for a single MX** @@ -1038,6 +1144,93 @@ def updateNetworkApplianceFirewallSettings(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) + def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwargs): + """ + **Create wired L3 interface configuration** + https://developer.cisco.com/meraki/api-v1/#!create-network-appliance-interfaces-l-3 + + - networkId (string): Network ID + - ipv4 (object): IPv4 configuration + - port (object): Port configuration + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "interfaces", "l3"], + "operation": "createNetworkApplianceInterfacesL3", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/interfaces/l3" + + body_params = [ + "port", + "ipv4", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkApplianceInterfacesL3: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, **kwargs): + """ + **Update wired L3 interface configuration** + https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-interfaces-l-3 + + - networkId (string): Network ID + - interfaceId (string): Interface ID + - port (object): Port configuration + - ipv4 (object): IPv4 configuration + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "interfaces", "l3"], + "operation": "updateNetworkApplianceInterfacesL3", + } + networkId = urllib.parse.quote(str(networkId), safe="") + interfaceId = urllib.parse.quote(str(interfaceId), safe="") + resource = f"/networks/{networkId}/appliance/interfaces/l3/{interfaceId}" + + body_params = [ + "port", + "ipv4", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkApplianceInterfacesL3: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str): + """ + **Delete wired L3 interface configuration** + https://developer.cisco.com/meraki/api-v1/#!delete-network-appliance-interfaces-l-3 + + - networkId (string): Network ID + - interfaceId (string): Interface ID + """ + + metadata = { + "tags": ["appliance", "configure", "interfaces", "l3"], + "operation": "deleteNetworkApplianceInterfacesL3", + } + networkId = urllib.parse.quote(str(networkId), safe="") + interfaceId = urllib.parse.quote(str(interfaceId), safe="") + resource = f"/networks/{networkId}/appliance/interfaces/l3/{interfaceId}" + + return self._session.delete(metadata, resource) + def getNetworkAppliancePorts(self, networkId: str): """ **List per-port VLAN settings for all ports of a secure router or security appliance.** @@ -1087,6 +1280,8 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): - vlan (integer): Native VLAN when the port is in Trunk mode. Access VLAN when the port is in Access mode. - allowedVlans (string): Comma-delimited list of VLAN IDs (e.g. '2,15') for all devices. Secure Routers also support VLAN ranges (e.g. '2-10,15'). Use 'all' to permit all VLANs on the port. - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybris-radius' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. + - peerSgtCapable (boolean): If true, Peer SGT is enabled for traffic through this port. Applicable to trunk port only, not access port. + - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this port is assigned to. """ kwargs.update(locals()) @@ -1106,6 +1301,8 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): "vlan", "allowedVlans", "accessPolicy", + "peerSgtCapable", + "adaptivePolicyGroupId", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1674,6 +1871,7 @@ def updateNetworkApplianceSingleLan(self, networkId: str, **kwargs): - applianceIp (string): The appliance IP address of the single LAN - ipv6 (object): IPv6 configuration on the VLAN - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this LAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above + - vrf (object): VRF configuration on the Single LAN """ kwargs.update(locals()) @@ -1690,6 +1888,7 @@ def updateNetworkApplianceSingleLan(self, networkId: str, **kwargs): "applianceIp", "ipv6", "mandatoryDhcp", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2301,6 +2500,7 @@ def updateNetworkApplianceTrafficShapingVpnExclusions(self, networkId: str, **kw - networkId (string): Network ID - custom (array): Custom VPN exclusion rules. Pass an empty array to clear existing rules. - majorApplications (array): Major Application based VPN exclusion rules. Pass an empty array to clear existing rules. + - applications (array): NBAR Application based VPN exclusion rules. Available for networks on >=19.2 firmware """ kwargs.update(locals()) @@ -2315,6 +2515,7 @@ def updateNetworkApplianceTrafficShapingVpnExclusions(self, networkId: str, **kw body_params = [ "custom", "majorApplications", + "applications", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2378,6 +2579,186 @@ def disconnectNetworkApplianceUmbrellaAccount(self, networkId: str): return self._session.post(metadata, resource) + def disableNetworkApplianceUmbrellaProtection(self, networkId: str): + """ + **Disable umbrella protection for an MX network** + https://developer.cisco.com/meraki/api-v1/#!disable-network-appliance-umbrella-protection + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["appliance", "configure", "umbrella"], + "operation": "disableNetworkApplianceUmbrellaProtection", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/disableProtection" + + return self._session.delete(metadata, resource) + + def enableNetworkApplianceUmbrellaProtection(self, networkId: str): + """ + **Enable umbrella protection for an MX network** + https://developer.cisco.com/meraki/api-v1/#!enable-network-appliance-umbrella-protection + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["appliance", "configure", "umbrella"], + "operation": "enableNetworkApplianceUmbrellaProtection", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/enableProtection" + + return self._session.post(metadata, resource) + + def excludeNetworkApplianceUmbrellaDomains(self, networkId: str, domains: list, **kwargs): + """ + **Specify one or more domain names to be excluded from being routed to Cisco Umbrella.** + https://developer.cisco.com/meraki/api-v1/#!exclude-network-appliance-umbrella-domains + + - networkId (string): Network ID + - domains (array): Array of domain names + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "umbrella"], + "operation": "excludeNetworkApplianceUmbrellaDomains", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/excludeDomains" + + body_params = [ + "domains", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"excludeNetworkApplianceUmbrellaDomains: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def policiesNetworkApplianceUmbrella(self, networkId: str, policyIds: list, **kwargs): + """ + **Update umbrella policies applied to MX network.** + https://developer.cisco.com/meraki/api-v1/#!policies-network-appliance-umbrella + + - networkId (string): Network ID + - policyIds (array): Array of umbrella policy IDs + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "umbrella"], + "operation": "policiesNetworkApplianceUmbrella", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/policies" + + body_params = [ + "policyIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"policiesNetworkApplianceUmbrella: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str, **kwargs): + """ + **Add one umbrella policy to your network.** + https://developer.cisco.com/meraki/api-v1/#!add-network-appliance-umbrella-policies + + - networkId (string): Network ID + - policyId (string): Umbrella policy ID + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "umbrella", "policies"], + "operation": "addNetworkApplianceUmbrellaPolicies", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/policies/add" + + body_params = [ + "policyId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"addNetworkApplianceUmbrellaPolicies: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str): + """ + **Remove one umbrella policy from your network.** + https://developer.cisco.com/meraki/api-v1/#!remove-network-appliance-umbrella-policies + + - networkId (string): Network ID + - policyId (string): Umbrella policy ID + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "umbrella", "policies"], + "operation": "removeNetworkApplianceUmbrellaPolicies", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/policies/remove" + + return self._session.delete(metadata, resource) + + def protectionNetworkApplianceUmbrella(self, networkId: str, enable: bool, **kwargs): + """ + **Enable or disable umbrella protection for an MX network** + https://developer.cisco.com/meraki/api-v1/#!protection-network-appliance-umbrella + + - networkId (string): Network ID + - enable (boolean): Enable or disable umbrella protection + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "umbrella"], + "operation": "protectionNetworkApplianceUmbrella", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/protection" + + body_params = [ + "enable", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"protectionNetworkApplianceUmbrella: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def updateNetworkApplianceUplinksNat(self, networkId: str, uplinks: list, **kwargs): """ **Update uplink NAT settings of the specified network** @@ -2488,6 +2869,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg - dhcpBootNextServer (string): DHCP boot option to direct boot clients to the server to load the boot file from - dhcpBootFilename (string): DHCP boot option for boot filename - dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties. + - adaptivePolicyGroupId (string): Adaptive policy group ID this VLAN is assigned to. - vrf (object): VRF configuration on the VLAN - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -2535,6 +2917,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg "dhcpBootNextServer", "dhcpBootFilename", "dhcpOptions", + "adaptivePolicyGroupId", "vrf", "uplinks", ] @@ -2642,6 +3025,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): - mask (integer): Mask used for the subnet of all bound to the template networks. Applicable only for template network. - ipv6 (object): IPv6 configuration on the VLAN - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above + - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this VLAN is assigned to. - vrf (object): VRF configuration on the VLAN - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -2693,6 +3077,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): "mask", "ipv6", "mandatoryDhcp", + "adaptivePolicyGroupId", "vrf", "uplinks", ] @@ -2807,6 +3192,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw - mode (string): The site-to-site VPN mode. Can be one of 'none', 'spoke' or 'hub' - hubs (array): The list of VPN hubs, in order of preference. In spoke mode, at least 1 hub is required. - subnets (array): The list of subnets and their VPN presence. + - peerSgtCapable (boolean): Whether or not Peer SGT is enabled for traffic to this VPN peer. - subnet (object): Configuration of subnet features - hostTranslations (array): The list of VPN host translations. Host translations are supported starting from MX firmware version 26.1.2 """ @@ -2828,6 +3214,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw "mode", "hubs", "subnets", + "peerSgtCapable", "subnet", "hostTranslations", ] @@ -2916,17 +3303,18 @@ def swapNetworkApplianceWarmSpare(self, networkId: str): return self._session.post(metadata, resource) - def getOrganizationApplianceDevicesRedundancyByNetwork( + def getOrganizationApplianceDevicesInterfacesL3ByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Return MX warm spare settings** - https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-redundancy-by-network + **Listing of L3 Interface Configurations across networks for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-interfaces-l-3-by-network - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 5 - 1000. Default is 50. + - networkIds (array): Optional Network IDs to filter results + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. - 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. """ @@ -2934,21 +3322,115 @@ def getOrganizationApplianceDevicesRedundancyByNetwork( kwargs.update(locals()) metadata = { - "tags": ["appliance", "configure", "devices", "redundancy", "byNetwork"], - "operation": "getOrganizationApplianceDevicesRedundancyByNetwork", + "tags": ["appliance", "configure", "devices", "interfaces", "l3", "byNetwork"], + "operation": "getOrganizationApplianceDevicesInterfacesL3ByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/appliance/devices/redundancy/byNetwork" + resource = f"/organizations/{organizationId}/appliance/devices/interfaces/l3/byNetwork" 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()) + if self._session._validate_kwargs: - all_params = query_params + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceDevicesInterfacesL3ByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationApplianceDevicesInterfacesPortsByDevice(self, organizationId: str, **kwargs): + """ + **Returns port configurations for appliances in a given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-interfaces-ports-by-device + + - organizationId (string): Organization ID + - serials (array): Parameter to filter the results by device serials + - numbers (array): Parameter to filter the results by specific ports + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "devices", "interfaces", "ports", "byDevice"], + "operation": "getOrganizationApplianceDevicesInterfacesPortsByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/devices/interfaces/ports/byDevice" + + query_params = [ + "serials", + "numbers", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "serials", + "numbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceDevicesInterfacesPortsByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApplianceDevicesRedundancyByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Return MX warm spare settings** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-redundancy-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 5 - 1000. 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": ["appliance", "configure", "devices", "redundancy", "byNetwork"], + "operation": "getOrganizationApplianceDevicesRedundancyByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/devices/redundancy/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( @@ -2957,6 +3439,68 @@ def getOrganizationApplianceDevicesRedundancyByNetwork( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceDevicesSystemUtilizationByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Return the appliance utilization history for devices in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-system-utilization-by-interval + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 2 hours. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 1200. The default is 1200. + - networkIds (array): Optional parameter to filter the result set by the included set of network IDs + - serials (array): Optional parameter to filter device utilization history by device serial numbers + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "devices", "system", "utilization", "byInterval"], + "operation": "getOrganizationApplianceDevicesSystemUtilizationByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/devices/system/utilization/byInterval" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceDevicesSystemUtilizationByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceDnsLocalProfiles(self, organizationId: str, **kwargs): """ **Fetch the local DNS profiles used in the organization** @@ -3682,6 +4226,55 @@ def updateOrganizationApplianceRoutingVrfsSettings(self, organizationId: str, en return self._session.put(metadata, resource, payload) + def getOrganizationApplianceSdwanInternetPolicies(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get the SDWAN internet traffic preferences for an MX network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-sdwan-internet-policies + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 200. 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. + - wanTrafficUplinkPreferences (array): policies with respective traffic filters for an MX network + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "sdwan", "internetPolicies"], + "operation": "getOrganizationApplianceSdwanInternetPolicies", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/sdwan/internetPolicies" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "wanTrafficUplinkPreferences", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "wanTrafficUplinkPreferences", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSdwanInternetPolicies: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceSecurityEvents(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the security events for an organization** @@ -3836,6 +4429,58 @@ def getOrganizationApplianceTrafficShapingVpnExclusionsByNetwork( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceUmbrellaPoliciesByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List Umbrella policy IDs applied to MX networks in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-umbrella-policies-by-network + + - 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 + - organizationId (string): Organization identifier + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - networkIds (array): Filter results to only the given network IDs + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "umbrella", "policies", "byNetwork"], + "operation": "getOrganizationApplianceUmbrellaPoliciesByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/umbrella/policies/byNetwork" + + query_params = [ + "organizationId", + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceUmbrellaPoliciesByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceUplinkStatuses(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the uplink status of every Meraki MX and Z series appliances in the organization** @@ -4021,6 +4666,233 @@ def getOrganizationApplianceUplinksUsageByNetwork(self, organizationId: str, **k return self._session.get(metadata, resource, params) + def getOrganizationApplianceVlans(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the VLANs for an Organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vlans + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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": ["appliance", "configure", "vlans"], + "operation": "getOrganizationApplianceVlans", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/vlans" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationApplianceVlans: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationApplianceVpnConnectivityVpnPeersByNetwork(self, organizationId: str, **kwargs): + """ + **Summarizes by-device vpn peers for the organization in the given interval.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-connectivity-vpn-peers-by-network + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 3600, 14400, 86400. The default is 3600. Interval is calculated if time params are provided. + - networkIds (array): Filter results by network. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "vpn", "connectivity", "vpnPeers", "byNetwork"], + "operation": "getOrganizationApplianceVpnConnectivityVpnPeersByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/vpn/connectivity/vpnPeers/byNetwork" + + query_params = [ + "t0", + "t1", + "timespan", + "interval", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceVpnConnectivityVpnPeersByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApplianceVpnRemoteAccessSecureClientAuthenticationByClient(self, organizationId: str, **kwargs): + """ + **Get authentication for all clients in organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-remote-access-secure-client-authentication-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "vpn", "remoteAccess", "secureClient", "authentication", "byClient"], + "operation": "getOrganizationApplianceVpnRemoteAccessSecureClientAuthenticationByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/vpn/remoteAccess/secureClient/authentication/byClient" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceVpnRemoteAccessSecureClientAuthenticationByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApplianceVpnRemoteAccessSecureClientIpAssignmentByClient(self, organizationId: str, **kwargs): + """ + **Get IP assignment for all clients in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-remote-access-secure-client-ip-assignment-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "vpn", "remoteAccess", "secureClient", "ipAssignment", "byClient"], + "operation": "getOrganizationApplianceVpnRemoteAccessSecureClientIpAssignmentByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/vpn/remoteAccess/secureClient/ipAssignment/byClient" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceVpnRemoteAccessSecureClientIpAssignmentByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApplianceVpnRemoteAccessSecureClientTunnelCreationByClient(self, organizationId: str, **kwargs): + """ + **Get tunnel creation events for all clients in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-remote-access-secure-client-tunnel-creation-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "vpn", "remoteAccess", "secureClient", "tunnelCreation", "byClient"], + "operation": "getOrganizationApplianceVpnRemoteAccessSecureClientTunnelCreationByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/vpn/remoteAccess/secureClient/tunnelCreation/byClient" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceVpnRemoteAccessSecureClientTunnelCreationByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationApplianceVpnSiteToSiteIpsecPeersSlas(self, organizationId: str): """ **Get the list of available IPsec SLA policies for an organization** diff --git a/meraki/aio/api/camera.py b/meraki/aio/api/camera.py index 98e5c8ac..8d29b25b 100644 --- a/meraki/aio/api/camera.py +++ b/meraki/aio/api/camera.py @@ -739,6 +739,97 @@ def getNetworkCameraSchedules(self, networkId: str): return self._session.get(metadata, resource) + def createNetworkCameraVideoWall(self, networkId: str, name: str, tiles: list, **kwargs): + """ + **Create a new video wall.** + https://developer.cisco.com/meraki/api-v1/#!create-network-camera-video-wall + + - networkId (string): Network ID + - name (string): The name of the video wall. + - tiles (array): The tiles that should appear on the video wall. + - index (integer): The order that this wall should appear on the video wall list. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["camera", "configure", "videoWalls"], + "operation": "createNetworkCameraVideoWall", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/camera/videoWalls" + + body_params = [ + "name", + "index", + "tiles", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkCameraVideoWall: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateNetworkCameraVideoWall(self, networkId: str, id: str, name: str, tiles: list, **kwargs): + """ + **Update the specified video wall.** + https://developer.cisco.com/meraki/api-v1/#!update-network-camera-video-wall + + - networkId (string): Network ID + - id (string): ID + - name (string): The name of the video wall. + - tiles (array): The tiles that should appear on the video wall. + - index (integer): The order that this wall should appear on the video wall list. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["camera", "configure", "videoWalls"], + "operation": "updateNetworkCameraVideoWall", + } + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/networks/{networkId}/camera/videoWalls/{id}" + + body_params = [ + "name", + "index", + "tiles", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkCameraVideoWall: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteNetworkCameraVideoWall(self, networkId: str, id: str): + """ + **Delete the specified video wall.** + https://developer.cisco.com/meraki/api-v1/#!delete-network-camera-video-wall + + - networkId (string): Network ID + - id (string): ID + """ + + metadata = { + "tags": ["camera", "configure", "videoWalls"], + "operation": "deleteNetworkCameraVideoWall", + } + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/networks/{networkId}/camera/videoWalls/{id}" + + return self._session.delete(metadata, resource) + def createNetworkCameraWirelessProfile(self, networkId: str, name: str, ssid: dict, **kwargs): """ **Creates a new camera wireless profile for this network.** @@ -1091,6 +1182,45 @@ def getOrganizationCameraDetectionsHistoryByBoundaryByInterval( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCameraDevicesConfigurations(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Lists all the capabilities of cameras in this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-devices-configurations + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 20. + - 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": ["camera", "configure", "devices", "configurations"], + "operation": "getOrganizationCameraDevicesConfigurations", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/camera/devices/configurations" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCameraDevicesConfigurations: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCameraOnboardingStatuses(self, organizationId: str, **kwargs): """ **Fetch onboarding status of cameras** @@ -1336,3 +1466,104 @@ def updateOrganizationCameraRole(self, organizationId: str, roleId: str, **kwarg self._session._logger.warning(f"updateOrganizationCameraRole: ignoring unrecognized kwargs: {invalid}") return self._session.put(metadata, resource, payload) + + def getOrganizationCameraVideoWalls(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return a list of video walls.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-video-walls + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 10 - 250. 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. + - networkIds (array): A list of network ids to filter video walls on + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["camera", "configure", "videoWalls"], + "operation": "getOrganizationCameraVideoWalls", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/camera/videoWalls" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationCameraVideoWalls: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationCameraVideoWall(self, organizationId: str, id: str): + """ + **Return the specified video wall.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-video-wall + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["camera", "configure", "videoWalls"], + "operation": "getOrganizationCameraVideoWall", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/camera/videoWalls/{id}" + + return self._session.get(metadata, resource) + + def getOrganizationCameraVideoWallVideoLink(self, organizationId: str, id: str, **kwargs): + """ + **Returns video wall link to the specified video wall id** + https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-video-wall-video-link + + - organizationId (string): Organization ID + - id (string): ID + - timestamp (string): [optional] The video link will start at this time. The timestamp should be a string in ISO8601 format. If no timestamp is specified, we will assume current time. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["camera", "configure", "videoWalls", "videoLink"], + "operation": "getOrganizationCameraVideoWallVideoLink", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/camera/videoWalls/{id}/videoLink" + + query_params = [ + "timestamp", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCameraVideoWallVideoLink: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) diff --git a/meraki/aio/api/campusGateway.py b/meraki/aio/api/campusGateway.py index ed7cee55..cfe63c52 100644 --- a/meraki/aio/api/campusGateway.py +++ b/meraki/aio/api/campusGateway.py @@ -96,6 +96,96 @@ def updateNetworkCampusGatewayCluster(self, networkId: str, clusterId: str, **kw return self._session.put(metadata, resource, payload) + def deleteNetworkCampusGatewayCluster(self, networkId: str, clusterId: str): + """ + **Delete a cluster** + https://developer.cisco.com/meraki/api-v1/#!delete-network-campus-gateway-cluster + + - networkId (string): Network ID + - clusterId (string): Cluster ID + """ + + metadata = { + "tags": ["campusGateway", "configure", "clusters"], + "operation": "deleteNetworkCampusGatewayCluster", + } + networkId = urllib.parse.quote(str(networkId), safe="") + clusterId = urllib.parse.quote(str(clusterId), safe="") + resource = f"/networks/{networkId}/campusGateway/clusters/{clusterId}" + + return self._session.delete(metadata, resource) + + def getOrganizationCampusGatewayClientsUsageByNetworkByCluster( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns client usage details for campus gateway clusters within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clients-usage-by-network-by-cluster + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 1 hour and be less than or equal to 7 days. The default is 2 hours. + - networkIds (array): Filter results by a list of network IDs. + - networkGroupIds (array): Limit the results to clients that belong to one of the provided network groups. + - clusterIds (array): Filter results by a list of cluster IDs. + - usageUnits (string): Usage units to use in the response. + """ + + kwargs.update(locals()) + + if "usageUnits" in kwargs: + options = ["GB", "KB", "MB", "TB"] + assert kwargs["usageUnits"] in options, ( + f'''"usageUnits" cannot be "{kwargs["usageUnits"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["campusGateway", "monitor", "clients", "usage", "byNetwork", "byCluster"], + "operation": "getOrganizationCampusGatewayClientsUsageByNetworkByCluster", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clients/usage/byNetwork/byCluster" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "networkGroupIds", + "clusterIds", + "usageUnits", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "networkGroupIds", + "clusterIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClientsUsageByNetworkByCluster: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCampusGatewayClusters(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **Get the details of campus gateway clusters** @@ -143,6 +233,464 @@ def getOrganizationCampusGatewayClusters(self, organizationId: str, total_pages= return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCampusGatewayClustersFailoverTargets( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the details of a Failover Targets for a Campus Gateway cluster** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters-failover-targets + + - 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): Optional parameter to filter networks. This filter uses multiple exact matches. + - clusterIds (array): Optional parameter to filter clusters. This filter uses multiple exact matches. + - 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", "failover", "targets"], + "operation": "getOrganizationCampusGatewayClustersFailoverTargets", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/failover/targets" + + query_params = [ + "networkIds", + "clusterIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "clusterIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClustersFailoverTargets: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationCampusGatewayClustersFailoverTargetsByCluster( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get available backup cluster targets for campus gateway failover configuration** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters-failover-targets-by-cluster + + - 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 backup cluster targets should be gathered. + - clusterIds (array): Cluster IDs to filter backup cluster targets. + - 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", "failover", "targets", "byCluster"], + "operation": "getOrganizationCampusGatewayClustersFailoverTargetsByCluster", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/failover/targets/byCluster" + + query_params = [ + "networkIds", + "clusterIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "clusterIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClustersFailoverTargetsByCluster: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationCampusGatewayClustersNetworksOverviews( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List networks tunneling through Campus Gateway clusters with their AP, ssids and client counts** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters-networks-overviews + + - 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 + - clusterIds (array): Optional parameter to filter by MCG cluster IDs. This filter uses multiple exact matches. + - siteIds (array): Optional parameter to filter by site IDs. This filter uses multiple exact matches. + - networkIds (array): Optional parameter to filter networks. This filter uses multiple exact matches. + - search (string): Optional parameter to filter networks by wireless network name. This filter uses case-insensitive substring matching. + - sortBy (string): Optional parameter to sort results. Default is 'name'. Use 'siteName' to sort by site name. + - sortOrder (string): Optional parameter to specify sort direction. Default is 'asc'. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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()) + + if "sortBy" in kwargs: + options = ["clients", "clusterId", "connections", "name", "networkId", "siteName", "ssids"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["campusGateway", "configure", "clusters", "networks", "overviews"], + "operation": "getOrganizationCampusGatewayClustersNetworksOverviews", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/networks/overviews" + + query_params = [ + "clusterIds", + "siteIds", + "networkIds", + "search", + "sortBy", + "sortOrder", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "clusterIds", + "siteIds", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClustersNetworksOverviews: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def provisionOrganizationCampusGatewayClusters( + self, + organizationId: str, + clusterId: str, + network: dict, + name: str, + uplinks: list, + tunnels: list, + nameservers: dict, + portChannels: list, + **kwargs, + ): + """ + **Provisions a cluster,adds campus gateways to it and associate/dissociate failover targets.** + https://developer.cisco.com/meraki/api-v1/#!provision-organization-campus-gateway-clusters + + - organizationId (string): Organization ID + - clusterId (string): ID of the cluster to be provisioned + - network (object): Network to be provisioned + - name (string): Name of the new cluster + - uplinks (array): Uplink interface settings of the cluster + - tunnels (array): Tunnel interface settings of the cluster: Reuse uplink or specify tunnel interface + - nameservers (object): Nameservers of the cluster + - portChannels (array): Port channel settings of the cluster + - devices (array): Devices to be added to the cluster + - failover (object): Failover targets for the cluster + - notes (string): Notes about cluster with max size of 511 characters allowed + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["campusGateway", "configure", "clusters"], + "operation": "provisionOrganizationCampusGatewayClusters", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/provision" + + body_params = [ + "clusterId", + "network", + "name", + "uplinks", + "tunnels", + "nameservers", + "portChannels", + "devices", + "failover", + "notes", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"provisionOrganizationCampusGatewayClusters: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationCampusGatewayClustersSsids(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List SSIDs tunneling through Campus Gateway clusters** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters-ssids + + - 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 + - clusterIds (array): Optional parameter to filter by MCG cluster IDs. This filter uses multiple exact matches. + - networkIds (array): Optional parameter to filter networks. This filter uses multiple exact matches. + - search (string): Optional parameter to filter SSIDs by name. This filter uses case-insensitive starts with string matching. + - sortBy (string): Optional parameter to sort results. Default is 'networkId'. + - sortOrder (string): Optional parameter to specify sort direction. Default is 'asc'. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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()) + + if "sortBy" in kwargs: + options = ["clusterId", "name", "networkId", "ssidId"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["campusGateway", "configure", "clusters", "ssids"], + "operation": "getOrganizationCampusGatewayClustersSsids", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/ssids" + + query_params = [ + "clusterIds", + "networkIds", + "search", + "sortBy", + "sortOrder", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "clusterIds", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClustersSsids: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationCampusGatewayConnections(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the details of APs tunneling through the Campus Gateway clusters** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-connections + + - 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): Optional parameter to filter networks. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter connections(APs) by its own serials. This filter uses multiple exact matches. + - campusGatewaySerials (array): Optional parameter to filter connections(APs) by MCG serials. This filter uses multiple exact matches. + - campusGatewayClusterIds (array): Optional parameter to filter connections(APs) by MCG cluster IDs. This filter uses multiple exact matches. + - campusGatewayTunnelStatuses (array): Optional parameter to filter connections(APs) by tunnel statuses. This filter uses multiple exact matches. + - search (string): Optional parameter to filter connections(APs) on AP name, serial, MAC address, network name, or interface IP address. This filter uses partial string matching (ILIKE). + - models (array): Optional parameter to filter connections(APs) by device model names. This filter uses multiple exact matches. + - dataEncryptionStatuses (array): Optional parameter to filter connections(APs) by data encryption status. This filter uses multiple exact matches. + - sortBy (string): Optional parameter to sort results. Available options: name, serial, status, interfaces, clients, dataEncryption, networkName. Default is 'serial'. + - sortOrder (string): Optional parameter to specify sort direction. Default is 'asc'. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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()) + + if "sortBy" in kwargs: + options = ["clients", "dataEncryption", "interfaces", "name", "networkName", "serial", "status"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["campusGateway", "configure", "connections"], + "operation": "getOrganizationCampusGatewayConnections", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/connections" + + query_params = [ + "networkIds", + "serials", + "campusGatewaySerials", + "campusGatewayClusterIds", + "campusGatewayTunnelStatuses", + "search", + "models", + "dataEncryptionStatuses", + "sortBy", + "sortOrder", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "campusGatewaySerials", + "campusGatewayClusterIds", + "campusGatewayTunnelStatuses", + "models", + "dataEncryptionStatuses", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayConnections: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationCampusGatewayConnectionsOverview(self, organizationId: str, **kwargs): + """ + **List the count of connections(APs) with tunneling status up and down through the Campus Gateway clusters** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-connections-overview + + - organizationId (string): Organization ID + - networkIds (array): Optional parameter to filter networks. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter connections(APs) by its own serials. This filter uses multiple exact matches. + - campusGatewaySerials (array): Optional parameter to filter connections(APs) by Campus Gateway serials. This filter uses multiple exact matches. + - campusGatewayClusterIds (array): Optional parameter to filter connections(APs) by Campus Gateway cluster IDs. This filter uses multiple exact matches. + - campusGatewayTunnelStatuses (array): Optional parameter to filter connections(APs) by tunnel statuses. This filter uses multiple exact matches. + - search (string): Optional setting that lets you filter access points (APs) by name, serial number, MAC address, network name, or interface IP address. The filter matches partial text, not just exact values (uses ILIKE matching). + - models (array): Optional parameter to filter connections(APs) by device model names. This filter uses multiple exact matches. + - dataEncryptionStatuses (array): Optional parameter to filter connections(APs) by data encryption status. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["campusGateway", "configure", "connections", "overview"], + "operation": "getOrganizationCampusGatewayConnectionsOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/connections/overview" + + query_params = [ + "networkIds", + "serials", + "campusGatewaySerials", + "campusGatewayClusterIds", + "campusGatewayTunnelStatuses", + "search", + "models", + "dataEncryptionStatuses", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "campusGatewaySerials", + "campusGatewayClusterIds", + "campusGatewayTunnelStatuses", + "models", + "dataEncryptionStatuses", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayConnectionsOverview: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationCampusGatewayDevicesUplinksLocalOverridesByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): diff --git a/meraki/aio/api/devices.py b/meraki/aio/api/devices.py index 0b12c407..3d4f22ab 100644 --- a/meraki/aio/api/devices.py +++ b/meraki/aio/api/devices.py @@ -232,6 +232,72 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty return self._session.post(metadata, resource, payload) + def updateDeviceCliConfigFavorite(self, serial: str, configId: str, favorite: bool, **kwargs): + """ + **Favorite or unfavorite a configuration for an IOS-XE device** + https://developer.cisco.com/meraki/api-v1/#!update-device-cli-config-favorite + + - serial (string): Serial + - configId (string): Config ID + - favorite (boolean): Whether the config should be favorited + """ + + kwargs = locals() + + metadata = { + "tags": ["devices", "configure", "cli", "configs"], + "operation": "updateDeviceCliConfigFavorite", + } + serial = urllib.parse.quote(str(serial), safe="") + configId = urllib.parse.quote(str(configId), safe="") + resource = f"/devices/{serial}/cli/configs/{configId}" + + body_params = [ + "favorite", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateDeviceCliConfigFavorite: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def createDeviceConfigRestore(self, serial: str, configId: str, **kwargs): + """ + **Create a restore request for a specific config history record** + https://developer.cisco.com/meraki/api-v1/#!create-device-config-restore + + - serial (string): Serial + - configId (string): Config ID + - scheduledFor (string): Requested ISO 8601 UTC timestamp for when the restore should be scheduled + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["devices", "configure", "cli", "configs"], + "operation": "createDeviceConfigRestore", + } + serial = urllib.parse.quote(str(serial), safe="") + configId = urllib.parse.quote(str(configId), safe="") + resource = f"/devices/{serial}/cli/configs/{configId}/restores" + + body_params = [ + "scheduledFor", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceConfigRestore: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + def getDeviceClients(self, serial: str, **kwargs): """ **List the clients of a device, up to a maximum of a month ago** @@ -265,6 +331,56 @@ def getDeviceClients(self, serial: str, **kwargs): return self._session.get(metadata, resource, params) + def createDeviceLiveToolsAclHitCount(self, serial: str, **kwargs): + """ + **Enqueue a job to perform an ACL hit count for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-acl-hit-count + + - 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", "aclHitCount"], + "operation": "createDeviceLiveToolsAclHitCount", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/aclHitCount" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsAclHitCount: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsAclHitCount(self, serial: str, id: str): + """ + **Return an ACL hit count live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-acl-hit-count + + - serial (string): Serial + - id (string): ID + """ + + metadata = { + "tags": ["devices", "liveTools", "aclHitCount"], + "operation": "getDeviceLiveToolsAclHitCount", + } + serial = urllib.parse.quote(str(serial), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/aclHitCount/{id}" + + return self._session.get(metadata, resource) + def createDeviceLiveToolsArpTable(self, serial: str, **kwargs): """ **Enqueue a job to perform a ARP table request for the device** @@ -367,6 +483,75 @@ def getDeviceLiveToolsCableTest(self, serial: str, id: str): return self._session.get(metadata, resource) + def getDeviceLiveToolsClientsDisconnect(self, serial: str, id: str): + """ + **Return a client disconnect job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-clients-disconnect + + - serial (string): Serial + - id (string): ID + """ + + metadata = { + "tags": ["devices", "liveTools", "clients", "disconnect"], + "operation": "getDeviceLiveToolsClientsDisconnect", + } + serial = urllib.parse.quote(str(serial), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/clients/disconnect/{id}" + + return self._session.get(metadata, resource) + + def createDeviceLiveToolsDhcpLease(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a DHCP leases request for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-dhcp-lease + + - 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", "dhcpLeases"], + "operation": "createDeviceLiveToolsDhcpLease", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/dhcpLeases" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsDhcpLease: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsDhcpLease(self, serial: str, dhcpLeasesId: str): + """ + **Return a DHCP leases live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-dhcp-lease + + - serial (string): Serial + - dhcpLeasesId (string): Dhcp leases ID + """ + + metadata = { + "tags": ["devices", "liveTools", "dhcpLeases"], + "operation": "getDeviceLiveToolsDhcpLease", + } + serial = urllib.parse.quote(str(serial), safe="") + dhcpLeasesId = urllib.parse.quote(str(dhcpLeasesId), safe="") + resource = f"/devices/{serial}/liveTools/dhcpLeases/{dhcpLeasesId}" + + return self._session.get(metadata, resource) + def createDeviceLiveToolsLedsBlink(self, serial: str, duration: int, **kwargs): """ **Enqueue a job to blink LEDs on a device** @@ -521,6 +706,56 @@ def getDeviceLiveToolsMulticastRouting(self, serial: str, multicastRoutingId: st return self._session.get(metadata, resource) + def createDeviceLiveToolsOspfNeighbor(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a OSPF neighbors request for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-ospf-neighbor + + - 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", "ospfNeighbors"], + "operation": "createDeviceLiveToolsOspfNeighbor", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/ospfNeighbors" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsOspfNeighbor: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsOspfNeighbor(self, serial: str, ospfNeighborsId: str): + """ + **Return an OSPF neighbors live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-ospf-neighbor + + - serial (string): Serial + - ospfNeighborsId (string): Ospf neighbors ID + """ + + metadata = { + "tags": ["devices", "liveTools", "ospfNeighbors"], + "operation": "getDeviceLiveToolsOspfNeighbor", + } + serial = urllib.parse.quote(str(serial), safe="") + ospfNeighborsId = urllib.parse.quote(str(ospfNeighborsId), safe="") + resource = f"/devices/{serial}/liveTools/ospfNeighbors/{ospfNeighborsId}" + + 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** @@ -627,6 +862,56 @@ def getDeviceLiveToolsPingDevice(self, serial: str, id: str): return self._session.get(metadata, resource) + def createDeviceLiveToolsPortStatus(self, serial: str, **kwargs): + """ + **Enqueue a job to retrieve port status for a device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-port-status + + - 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", "portStatus"], + "operation": "createDeviceLiveToolsPortStatus", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/portStatus" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsPortStatus: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsPortStatus(self, serial: str, portStatusId: str): + """ + **Return a port status live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-port-status + + - serial (string): Serial + - portStatusId (string): Port status ID + """ + + metadata = { + "tags": ["devices", "liveTools", "portStatus"], + "operation": "getDeviceLiveToolsPortStatus", + } + serial = urllib.parse.quote(str(serial), safe="") + portStatusId = urllib.parse.quote(str(portStatusId), safe="") + resource = f"/devices/{serial}/liveTools/portStatus/{portStatusId}" + + return self._session.get(metadata, resource) + def createDeviceLiveToolsPortsCycle(self, serial: str, ports: list, **kwargs): """ **Enqueue a job to perform a cycle port for the device on the specified ports** @@ -679,6 +964,294 @@ def getDeviceLiveToolsPortsCycle(self, serial: str, id: str): return self._session.get(metadata, resource) + def createDeviceLiveToolsReboot(self, serial: str, **kwargs): + """ + **Enqueue a job to reboot a device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-reboot + + - 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", "reboot"], + "operation": "createDeviceLiveToolsReboot", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/reboot" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsReboot: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsReboot(self, serial: str, rebootId: str): + """ + **Return a reboot job** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-reboot + + - serial (string): Serial + - rebootId (string): Reboot ID + """ + + metadata = { + "tags": ["devices", "liveTools", "reboot"], + "operation": "getDeviceLiveToolsReboot", + } + serial = urllib.parse.quote(str(serial), safe="") + rebootId = urllib.parse.quote(str(rebootId), safe="") + resource = f"/devices/{serial}/liveTools/reboot/{rebootId}" + + return self._session.get(metadata, resource) + + def createDeviceLiveToolsRoutingTable(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a routing table request for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-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", "routingTable"], + "operation": "createDeviceLiveToolsRoutingTable", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/routingTable" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsRoutingTable: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a routing table lookup request for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table-lookup + + - serial (string): Serial + - type (string): The type of route defined + - destination (object): The destination IP or subnet to lookup + - nextHop (object): The next hop to lookup + - vpn (object): VPN related search criteria + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = [ + "BGP", + "EIGRP", + "HSRP", + "IGRP", + "ISIS", + "LISP", + "NAT", + "ND", + "NHRP", + "OMP", + "OSPF", + "RIP", + "default WAN", + "direct", + "static", + ] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["devices", "liveTools", "routingTable", "lookups"], + "operation": "createDeviceLiveToolsRoutingTableLookup", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/routingTable/lookups" + + body_params = [ + "type", + "destination", + "nextHop", + "vpn", + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createDeviceLiveToolsRoutingTableLookup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsRoutingTableLookup(self, serial: str, id: str): + """ + **Return a routing table live tool lookup job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-routing-table-lookup + + - serial (string): Serial + - id (string): ID + """ + + metadata = { + "tags": ["devices", "liveTools", "routingTable", "lookups"], + "operation": "getDeviceLiveToolsRoutingTableLookup", + } + serial = urllib.parse.quote(str(serial), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/routingTable/lookups/{id}" + + return self._session.get(metadata, resource) + + def createDeviceLiveToolsRoutingTableSummary(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a routing table summary request for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table-summary + + - 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", "routingTable", "summaries"], + "operation": "createDeviceLiveToolsRoutingTableSummary", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/routingTable/summaries" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createDeviceLiveToolsRoutingTableSummary: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsRoutingTableSummary(self, serial: str, id: str): + """ + **Return a routing table live tool summary job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-routing-table-summary + + - serial (string): Serial + - id (string): ID + """ + + metadata = { + "tags": ["devices", "liveTools", "routingTable", "summaries"], + "operation": "getDeviceLiveToolsRoutingTableSummary", + } + serial = urllib.parse.quote(str(serial), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/routingTable/summaries/{id}" + + return self._session.get(metadata, resource) + + def getDeviceLiveToolsRoutingTable(self, serial: str, id: str): + """ + **Return an routing table live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-routing-table + + - serial (string): Serial + - id (string): ID + """ + + metadata = { + "tags": ["devices", "liveTools", "routingTable"], + "operation": "getDeviceLiveToolsRoutingTable", + } + serial = urllib.parse.quote(str(serial), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/routingTable/{id}" + + return self._session.get(metadata, resource) + + def createDeviceLiveToolsSpeedTest(self, serial: str, **kwargs): + """ + **Enqueue a job to execute a speed test from a device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-speed-test + + - serial (string): Serial + - interface (string): Optional filter for a specific WAN interface. Valid interfaces are wan1, wan2, wan3, wan4. Default will return wan1. + """ + + kwargs.update(locals()) + + if "interface" in kwargs: + options = ["wan1", "wan2", "wan3", "wan4"] + assert kwargs["interface"] in options, ( + f'''"interface" cannot be "{kwargs["interface"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["devices", "liveTools", "speedTest"], + "operation": "createDeviceLiveToolsSpeedTest", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/speedTest" + + body_params = [ + "interface", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsSpeedTest: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsSpeedTest(self, serial: str, id: str): + """ + **Returns a speed test result in megabits per second** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-speed-test + + - serial (string): Serial + - id (string): ID + """ + + metadata = { + "tags": ["devices", "liveTools", "speedTest"], + "operation": "getDeviceLiveToolsSpeedTest", + } + serial = urllib.parse.quote(str(serial), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/speedTest/{id}" + + return self._session.get(metadata, resource) + def createDeviceLiveToolsThroughputTest(self, serial: str, **kwargs): """ **Enqueue a job to test a device throughput, the test will run for 10 secs to test throughput** @@ -729,6 +1302,110 @@ def getDeviceLiveToolsThroughputTest(self, serial: str, throughputTestId: str): return self._session.get(metadata, resource) + def createDeviceLiveToolsTraceRoute(self, serial: str, target: str, sourceInterface: str, **kwargs): + """ + **Enqueue a job to run trace route in the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-trace-route + + - serial (string): Serial + - target (string): Destination Host name or address + - sourceInterface (string): Source Interface IP address + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["devices", "liveTools", "traceRoute"], + "operation": "createDeviceLiveToolsTraceRoute", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/traceRoute" + + body_params = [ + "target", + "sourceInterface", + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsTraceRoute: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsTraceRoute(self, serial: str, traceRouteId: str): + """ + **Return a trace route job** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-trace-route + + - serial (string): Serial + - traceRouteId (string): Trace route ID + """ + + metadata = { + "tags": ["devices", "liveTools", "traceRoute"], + "operation": "getDeviceLiveToolsTraceRoute", + } + serial = urllib.parse.quote(str(serial), safe="") + traceRouteId = urllib.parse.quote(str(traceRouteId), safe="") + resource = f"/devices/{serial}/liveTools/traceRoute/{traceRouteId}" + + return self._session.get(metadata, resource) + + def createDeviceLiveToolsVrrpTable(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a VRRP table request for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-vrrp-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", "vrrpTable"], + "operation": "createDeviceLiveToolsVrrpTable", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/vrrpTable" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsVrrpTable: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsVrrpTable(self, serial: str, vrrpTableId: str): + """ + **Return an VRRP table live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-vrrp-table + + - serial (string): Serial + - vrrpTableId (string): Vrrp table ID + """ + + metadata = { + "tags": ["devices", "liveTools", "vrrpTable"], + "operation": "getDeviceLiveToolsVrrpTable", + } + serial = urllib.parse.quote(str(serial), safe="") + vrrpTableId = urllib.parse.quote(str(vrrpTableId), safe="") + resource = f"/devices/{serial}/liveTools/vrrpTable/{vrrpTableId}" + + 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** diff --git a/meraki/aio/api/insight.py b/meraki/aio/api/insight.py index 98345d24..eab3e2a9 100644 --- a/meraki/aio/api/insight.py +++ b/meraki/aio/api/insight.py @@ -64,6 +64,95 @@ def getOrganizationInsightApplications(self, organizationId: str): return self._session.get(metadata, resource) + def createOrganizationInsightApplication(self, organizationId: str, counterSetRuleId: int, **kwargs): + """ + **Add an Insight tracked application** + https://developer.cisco.com/meraki/api-v1/#!create-organization-insight-application + + - organizationId (string): Organization ID + - counterSetRuleId (integer): The id of the counter set rule + - enableSmartThresholds (boolean): Enable Smart Thresholds + - thresholds (object): Thresholds defined by a user for each application + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["insight", "configure", "applications"], + "operation": "createOrganizationInsightApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/insight/applications" + + body_params = [ + "counterSetRuleId", + "enableSmartThresholds", + "thresholds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationInsightApplication: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateOrganizationInsightApplication(self, organizationId: str, applicationId: str, **kwargs): + """ + **Update an Insight tracked application** + https://developer.cisco.com/meraki/api-v1/#!update-organization-insight-application + + - organizationId (string): Organization ID + - applicationId (string): Application ID + - enableSmartThresholds (boolean): Enable Smart Thresholds + - thresholds (object): Thresholds defined by a user for each application + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["insight", "configure", "applications"], + "operation": "updateOrganizationInsightApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + applicationId = urllib.parse.quote(str(applicationId), safe="") + resource = f"/organizations/{organizationId}/insight/applications/{applicationId}" + + body_params = [ + "enableSmartThresholds", + "thresholds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationInsightApplication: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationInsightApplication(self, organizationId: str, applicationId: str): + """ + **Delete an Insight tracked application** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-insight-application + + - organizationId (string): Organization ID + - applicationId (string): Application ID + """ + + metadata = { + "tags": ["insight", "configure", "applications"], + "operation": "deleteOrganizationInsightApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + applicationId = urllib.parse.quote(str(applicationId), safe="") + resource = f"/organizations/{organizationId}/insight/applications/{applicationId}" + + return self._session.delete(metadata, resource) + def getOrganizationInsightMonitoredMediaServers(self, organizationId: str): """ **List the monitored media servers for this organization** @@ -194,3 +283,154 @@ def deleteOrganizationInsightMonitoredMediaServer(self, organizationId: str, mon resource = f"/organizations/{organizationId}/insight/monitoredMediaServers/{monitoredMediaServerId}" return self._session.delete(metadata, resource) + + def getOrganizationInsightSpeedTestResults(self, organizationId: str, serials: list, **kwargs): + """ + **List the speed tests for the given devices under this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-insight-speed-test-results + + - organizationId (string): Organization ID + - serials (array): A list of serial numbers. The returned results will be filtered to only include these serials. + - timespan (integer): Amount of seconds ago to query for results. Only include timespan OR both t0 & t1. + - t0 (integer): Start time to query for results in epoch seconds. Only include timespan OR both t0 & t1. + - t1 (integer): End time to query for results in epoch seconds. Only include timespan OR both t0 & t1. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["insight", "configure", "speedTestResults"], + "operation": "getOrganizationInsightSpeedTestResults", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/insight/speedTestResults" + + query_params = [ + "serials", + "timespan", + "t0", + "t1", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationInsightSpeedTestResults: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationInsightWebApps(self, organizationId: str): + """ + **Lists all default web applications rules with counter set rule ids** + https://developer.cisco.com/meraki/api-v1/#!get-organization-insight-web-apps + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["insight", "configure", "webApps"], + "operation": "getOrganizationInsightWebApps", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/insight/webApps" + + return self._session.get(metadata, resource) + + def createOrganizationInsightWebApp(self, organizationId: str, name: str, hostname: str, **kwargs): + """ + **Add a custom web application for Insight to be able to track** + https://developer.cisco.com/meraki/api-v1/#!create-organization-insight-web-app + + - organizationId (string): Organization ID + - name (string): The name of the Web Application + - hostname (string): The hostname of Web Application + """ + + kwargs = locals() + + metadata = { + "tags": ["insight", "configure", "webApps"], + "operation": "createOrganizationInsightWebApp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/insight/webApps" + + body_params = [ + "name", + "hostname", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationInsightWebApp: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateOrganizationInsightWebApp(self, organizationId: str, customCounterSetRuleId: str, **kwargs): + """ + **Update a custom web application for Insight to be able to track** + https://developer.cisco.com/meraki/api-v1/#!update-organization-insight-web-app + + - organizationId (string): Organization ID + - customCounterSetRuleId (string): Custom counter set rule ID + - name (string): The name of the Web Application + - hostname (string): The hostname of Web Application + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["insight", "configure", "webApps"], + "operation": "updateOrganizationInsightWebApp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + customCounterSetRuleId = urllib.parse.quote(str(customCounterSetRuleId), safe="") + resource = f"/organizations/{organizationId}/insight/webApps/{customCounterSetRuleId}" + + body_params = [ + "name", + "hostname", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationInsightWebApp: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationInsightWebApp(self, organizationId: str, customCounterSetRuleId: str): + """ + **Delete a custom web application by counter set rule id.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-insight-web-app + + - organizationId (string): Organization ID + - customCounterSetRuleId (string): Custom counter set rule ID + """ + + metadata = { + "tags": ["insight", "configure", "webApps"], + "operation": "deleteOrganizationInsightWebApp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + customCounterSetRuleId = urllib.parse.quote(str(customCounterSetRuleId), safe="") + resource = f"/organizations/{organizationId}/insight/webApps/{customCounterSetRuleId}" + + return self._session.delete(metadata, resource) diff --git a/meraki/aio/api/licensing.py b/meraki/aio/api/licensing.py index 962e7654..c8ba0f9f 100644 --- a/meraki/aio/api/licensing.py +++ b/meraki/aio/api/licensing.py @@ -45,6 +45,39 @@ def getAdministeredLicensingSubscriptionEntitlements(self, **kwargs): return self._session.get(metadata, resource, params) + def batchAdministeredLicensingSubscriptionNetworksFeatureTiersUpdate(self, **kwargs): + """ + **Batch change networks to their desired feature tier for specified product types** + https://developer.cisco.com/meraki/api-v1/#!batch-administered-licensing-subscription-networks-feature-tiers-update + + - items (array): List of networks and corresponding product types to update. Maximum 500 networks + - isAtomic (boolean): Flag to determine if the operation should act atomically + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["licensing", "configure", "subscription", "featureTiers"], + "operation": "batchAdministeredLicensingSubscriptionNetworksFeatureTiersUpdate", + } + resource = "/administered/licensing/subscription/networks/featureTiers/batchUpdate" + + body_params = [ + "items", + "isAtomic", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"batchAdministeredLicensingSubscriptionNetworksFeatureTiersUpdate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def getAdministeredLicensingSubscriptionSubscriptions( self, organizationIds: list, total_pages=1, direction="next", **kwargs ): diff --git a/meraki/aio/api/nac.py b/meraki/aio/api/nac.py new file mode 100644 index 00000000..0dcad5ca --- /dev/null +++ b/meraki/aio/api/nac.py @@ -0,0 +1,1151 @@ +import urllib + + +class AsyncNac: + def __init__(self, session): + super().__init__() + self._session = session + + def getOrganizationNacAuthorizationPolicies(self, organizationId: str, **kwargs): + """ + **Get all nac authorization policies for this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-authorization-policies + + - organizationId (string): Organization ID + - policyIds (array): List of ids for specific authorization policies retrieval + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "authorization", "policies"], + "operation": "getOrganizationNacAuthorizationPolicies", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/authorization/policies" + + query_params = [ + "policyIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationNacAuthorizationPolicies: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def createOrganizationNacAuthorizationPolicyRule( + self, organizationId: str, policyId: str, name: str, rank: int, authorizationProfile: dict, **kwargs + ): + """ + **Create a rule in an authorization policy set of an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-authorization-policy-rule + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - name (string): Name of Authorization rule + - rank (integer): Rank of Authorization rule + - authorizationProfile (object): Authorization profile associated with the rule + - enabled (boolean): Enabled status of authorization rule. Default is False. + - sourcePolicyVersion (string): Source policy version of the policy set containing this rule + - condition (object): Condition of Authorization rule. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "authorization", "policies", "rules"], + "operation": "createOrganizationNacAuthorizationPolicyRule", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + resource = f"/organizations/{organizationId}/nac/authorization/policies/{policyId}/rules" + + body_params = [ + "name", + "rank", + "enabled", + "sourcePolicyVersion", + "authorizationProfile", + "condition", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationNacAuthorizationPolicyRule: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationNacAuthorizationPolicyRule( + self, organizationId: str, policyId: str, ruleId: str, name: str, rank: int, authorizationProfile: dict, **kwargs + ): + """ + **Update an existing rule of an authorization policy set within an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-nac-authorization-policy-rule + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleId (string): Rule ID + - name (string): Name of Authorization rule + - rank (integer): Rank of Authorization rule + - authorizationProfile (object): Authorization profile associated with the rule + - enabled (boolean): Enabled status of authorization rule. Default is False. + - sourcePolicyVersion (string): Source policy version of the policy set containing this rule + - condition (object): Condition of Authorization rule. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "authorization", "policies", "rules"], + "operation": "updateOrganizationNacAuthorizationPolicyRule", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + ruleId = urllib.parse.quote(str(ruleId), safe="") + resource = f"/organizations/{organizationId}/nac/authorization/policies/{policyId}/rules/{ruleId}" + + body_params = [ + "name", + "rank", + "enabled", + "sourcePolicyVersion", + "authorizationProfile", + "condition", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationNacAuthorizationPolicyRule: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationNacAuthorizationPolicyRule(self, organizationId: str, policyId: str, ruleId: str, **kwargs): + """ + **Delete a rule in an authorization policy set of an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-nac-authorization-policy-rule + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleId (string): Rule ID + - sourcePolicyVersion (string): Source policy version of the policy set containing this rule + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "authorization", "policies", "rules"], + "operation": "deleteOrganizationNacAuthorizationPolicyRule", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + ruleId = urllib.parse.quote(str(ruleId), safe="") + resource = f"/organizations/{organizationId}/nac/authorization/policies/{policyId}/rules/{ruleId}" + + return self._session.delete(metadata, resource) + + def getOrganizationNacCertificates(self, organizationId: str, **kwargs): + """ + **Gets all certificates for an organization and can filter by certificate status, expiry date and last used date** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-certificates + + - organizationId (string): Organization ID + - status (string): Status Parameter for GetAll request + - expiry (boolean): Boolean indicating whether to filter by expiry in one month + - lastUsed (boolean): Boolean indicating whether to filter by last used in over one month + """ + + kwargs.update(locals()) + + if "status" in kwargs: + options = ["Disabled", "Enabled"] + assert kwargs["status"] in options, ( + f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["nac", "configure", "certificates"], + "operation": "getOrganizationNacCertificates", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates" + + query_params = [ + "status", + "expiry", + "lastUsed", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationNacCertificates: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def getOrganizationNacCertificatesAuthoritiesCrls(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get all the organization's CRL.It's possible to filter results by CRL issuers (CA) or CRL's ID - see caIds and crlIds query parameters.This endpoint could be used for 'show' action when you specify a single CRL ID in crlIds parameter** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-certificates-authorities-crls + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 5. + - 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. + - sortBy (string): Optional parameter to specify the field used to sort results. (default: caId) + - sortOrder (string): Optional parameter to specify the sort order. (default: asc) + - crlIds (array): A list of CRL ids. The returned CRLs will be filtered to only include these ids + - caIds (array): When ca Ids are provided, only CRLs associated to the given CA will be returned. Otherwise, all the CRLs created for an organization will be returned. + """ + + kwargs.update(locals()) + + if "sortBy" in kwargs: + options = ["caId", "createdAt", "lastUpdatedAt"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["nac", "configure", "certificates", "authorities", "crls"], + "operation": "getOrganizationNacCertificatesAuthoritiesCrls", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates/authorities/crls" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "sortBy", + "sortOrder", + "crlIds", + "caIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "crlIds", + "caIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationNacCertificatesAuthoritiesCrls: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationNacCertificatesAuthoritiesCrl( + self, organizationId: str, caId: str, content: str, isDelta: bool, **kwargs + ): + """ + **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} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationNacCertificatesAuthoritiesCrl: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationNacCertificatesAuthoritiesCrlsDescriptors( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get all the organization's CRL descriptors (metadata only - revocation list data is excluded)** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-certificates-authorities-crls-descriptors + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 20. + - 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. + - sortBy (string): Optional parameter to specify the field used to sort results. (default: caId) + - sortOrder (string): Optional parameter to specify the sort order. (default: asc) + - caIds (array): When ca Ids are provided, only CRLs associated to the given CA will be returned. Otherwise, all the CRLs created for an organization will be returned. + """ + + kwargs.update(locals()) + + if "sortBy" in kwargs: + options = ["caId", "createdAt", "lastUpdatedAt"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["nac", "configure", "certificates", "authorities", "crls", "descriptors"], + "operation": "getOrganizationNacCertificatesAuthoritiesCrlsDescriptors", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates/authorities/crls/descriptors" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "sortBy", + "sortOrder", + "caIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "caIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationNacCertificatesAuthoritiesCrlsDescriptors: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationNacCertificatesAuthoritiesCrl(self, organizationId: str, crlId: str): + """ + **Deletes a whole CRL, including all its deltas (in case of base CRL removal)** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-nac-certificates-authorities-crl + + - organizationId (string): Organization ID + - crlId (string): Crl ID + """ + + metadata = { + "tags": ["nac", "configure", "certificates", "authorities", "crls"], + "operation": "deleteOrganizationNacCertificatesAuthoritiesCrl", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + crlId = urllib.parse.quote(str(crlId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates/authorities/crls/{crlId}" + + return self._session.delete(metadata, resource) + + def createOrganizationNacCertificatesImport(self, organizationId: str, contents: str, **kwargs): + """ + **Import certificate for this organization or validate without persisting** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-certificates-import + + - organizationId (string): Organization ID + - contents (string): Certificate content in valid PEM format + - dryRun (boolean): If true, validates the certificate without persisting it + - profile (object): Profile object containing certificate config fields + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "certificates", "import"], + "operation": "createOrganizationNacCertificatesImport", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates/import" + + body_params = [ + "contents", + "dryRun", + "profile", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationNacCertificatesImport: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationNacCertificatesOverview(self, organizationId: str): + """ + **Get counts of Enabled, Disabled, Expired and Last Used certificates for this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-certificates-overview + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["nac", "configure", "certificates", "overview"], + "operation": "getOrganizationNacCertificatesOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates/overview" + + return self._session.get(metadata, resource) + + def updateOrganizationNacCertificate(self, organizationId: str, certificateId: str, profile: dict, **kwargs): + """ + **Update certificate configuration by certificateId for this organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-nac-certificate + + - organizationId (string): Organization ID + - certificateId (string): Certificate ID + - profile (object): Profile object containing certificate config fields + """ + + kwargs = locals() + + metadata = { + "tags": ["nac", "configure", "certificates"], + "operation": "updateOrganizationNacCertificate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + certificateId = urllib.parse.quote(str(certificateId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates/{certificateId}" + + body_params = [ + "profile", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationNacCertificate: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getOrganizationNacClients(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get all known clients for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-clients + + - 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 + - sortOrder (string): Query parameter for specifying the direction of sorting to use for the given sortKey. + - sortKey (string): Query parameter to sort the clients by the value of the specified key. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - search (string): Optional parameter to fuzzy search on clients. + - clientIds (array): List of ids for specific client retrieval + - groupIds (array): List of group ids for client retrieval by group + - lastNetworkName (array): List of network names for client retrieval by last login network name + - ssid (array): List of SSID's to filter + - classification (object): Classification filters for client retrieval + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ASC", "DESC"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + if "sortKey" in kwargs: + options = ["mac"] + assert kwargs["sortKey"] in options, ( + f'''"sortKey" cannot be "{kwargs["sortKey"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["nac", "configure", "clients"], + "operation": "getOrganizationNacClients", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients" + + query_params = [ + "sortOrder", + "sortKey", + "perPage", + "startingAfter", + "endingBefore", + "search", + "clientIds", + "groupIds", + "lastNetworkName", + "ssid", + "classification", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "clientIds", + "groupIds", + "lastNetworkName", + "ssid", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationNacClients: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationNacClient(self, organizationId: str, mac: str, **kwargs): + """ + **Create a client for the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-client + + - organizationId (string): Organization ID + - mac (string): The MAC address of the client + - type (string): Type describes if the network client belongs to an individual user or corporate + - owner (string): The username of the owner of the client + - description (string): User provided description for the client + - uuid (string): Universally unique identifier of the client + - userDetails (array): List of users of this network client + - oui (object): Organizationally unique identifier assigned to a vendor of the client + - groups (array): List of group members associated with the client + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = ["BYOD", "corporate"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["nac", "configure", "clients"], + "operation": "createOrganizationNacClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients" + + body_params = [ + "type", + "owner", + "mac", + "description", + "uuid", + "userDetails", + "oui", + "groups", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationNacClient: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def bulkOrganizationNacClientsDelete(self, organizationId: str, clientIds: list, **kwargs): + """ + **Delete existing client(s) for the organization** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-nac-clients-delete + + - organizationId (string): Organization ID + - clientIds (array): List of ids for specific client retrieval + """ + + kwargs = locals() + + metadata = { + "tags": ["nac", "configure", "clients"], + "operation": "bulkOrganizationNacClientsDelete", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/bulkDelete" + + body_params = [ + "clientIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"bulkOrganizationNacClientsDelete: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def createOrganizationNacClientsBulkEdit(self, organizationId: str, clientIds: list, **kwargs): + """ + **Bulk Update of existing clients for the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-clients-bulk-edit + + - organizationId (string): Organization ID + - clientIds (array): List of clients ids to apply the bulk edit operation on. + - description (string): User provided description to be applied on the list of clients provided + - groups (object): Client group information to be applied on the list of clients provided + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "clients", "bulkEdit"], + "operation": "createOrganizationNacClientsBulkEdit", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/bulkEdit" + + body_params = [ + "clientIds", + "description", + "groups", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationNacClientsBulkEdit: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def createOrganizationNacClientsBulkUpload( + self, organizationId: str, contents: str, updateClients: bool, createClientGroups: bool, **kwargs + ): + """ + **Bulk upload of clients, client groups and their associations for the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-clients-bulk-upload + + - organizationId (string): Organization ID + - contents (string): CSV file content in Base64 encoded string format + - updateClients (boolean): The updateClients indicates whether existing clients must be updated with new data from the CSV + - createClientGroups (boolean): The createClientGroups indicates whether new client groups must be created or not + """ + + kwargs = locals() + + metadata = { + "tags": ["nac", "configure", "clients", "bulkUpload"], + "operation": "createOrganizationNacClientsBulkUpload", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/bulkUpload" + + body_params = [ + "contents", + "updateClients", + "createClientGroups", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationNacClientsBulkUpload: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationNacClientsGroups(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get all known client groups for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-clients-groups + + - 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 + - sortOrder (string): Query parameter for specifying the direction of sorting to use for the given sortKey. + - sortKey (string): Query parameter to sort the client groups by the value of the specified key. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - search (string): Optional parameter to fuzzy search on client groups. + - groupIds (array): List of ids for specific group retrieval + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ASC", "DESC"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + if "sortKey" in kwargs: + options = ["name"] + assert kwargs["sortKey"] in options, ( + f'''"sortKey" cannot be "{kwargs["sortKey"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["nac", "configure", "clients", "groups"], + "operation": "getOrganizationNacClientsGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/groups" + + query_params = [ + "sortOrder", + "sortKey", + "perPage", + "startingAfter", + "endingBefore", + "search", + "groupIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "groupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationNacClientsGroups: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationNacClientsGroup(self, organizationId: str, name: str, **kwargs): + """ + **Create a client group for the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-clients-group + + - organizationId (string): Organization ID + - name (string): The name of the group for access control model + - description (string): User provided description of the group + - members (array): List of client members associated with the group + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "clients", "groups"], + "operation": "createOrganizationNacClientsGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/groups" + + body_params = [ + "name", + "description", + "members", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationNacClientsGroup: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateOrganizationNacClientsGroup(self, organizationId: str, groupId: str, **kwargs): + """ + **Update an existing client group for the organization with bulk member operations** + https://developer.cisco.com/meraki/api-v1/#!update-organization-nac-clients-group + + - organizationId (string): Organization ID + - groupId (string): Group ID + - name (string): The name of the group for access control model + - description (string): User provided description of the group + - members (object): Bulk member operations with addList/removeList arrays + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "clients", "groups"], + "operation": "updateOrganizationNacClientsGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/groups/{groupId}" + + body_params = [ + "name", + "description", + "members", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationNacClientsGroup: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationNacClientsGroup(self, organizationId: str, groupId: str): + """ + **Delete an existing client group for the organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-nac-clients-group + + - organizationId (string): Organization ID + - groupId (string): Group ID + """ + + metadata = { + "tags": ["nac", "configure", "clients", "groups"], + "operation": "deleteOrganizationNacClientsGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/groups/{groupId}" + + return self._session.delete(metadata, resource) + + def getOrganizationNacClientsOverview(self, organizationId: str): + """ + **Get overview data for all known clients for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-clients-overview + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["nac", "configure", "clients", "overview"], + "operation": "getOrganizationNacClientsOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/overview" + + return self._session.get(metadata, resource) + + def updateOrganizationNacClient(self, organizationId: str, clientId: str, mac: str, **kwargs): + """ + **Update an existing client for the organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-nac-client + + - organizationId (string): Organization ID + - clientId (string): Client ID + - mac (string): The MAC address of the client + - type (string): Type describes if the network client belongs to an individual user or corporate + - owner (string): The username of the owner of the client + - description (string): User provided description for the client + - uuid (string): Universally unique identifier of the client + - userDetails (array): List of users of this network client + - oui (object): Organizationally unique identifier assigned to a vendor of the client + - groups (object): Client group membership changes + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = ["BYOD", "corporate"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["nac", "configure", "clients"], + "operation": "updateOrganizationNacClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + clientId = urllib.parse.quote(str(clientId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/{clientId}" + + body_params = [ + "type", + "owner", + "mac", + "description", + "uuid", + "userDetails", + "oui", + "groups", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationNacClient: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getOrganizationNacDictionaries(self, organizationId: str): + """ + **Get all NAC dictionaries** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-dictionaries + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["nac", "configure", "dictionaries"], + "operation": "getOrganizationNacDictionaries", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/dictionaries" + + return self._session.get(metadata, resource) + + def getOrganizationNacDictionaryAttributes(self, organizationId: str, dictionaryId: str, **kwargs): + """ + **Get all attributes by dictionary ID** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-dictionary-attributes + + - organizationId (string): Organization ID + - dictionaryId (string): Dictionary ID + - networkIds (array): An optional list of network IDs to filter the 'enum' field. Only enum values applicable to the specified networks will be returned. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "dictionaries", "attributes"], + "operation": "getOrganizationNacDictionaryAttributes", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + dictionaryId = urllib.parse.quote(str(dictionaryId), safe="") + resource = f"/organizations/{organizationId}/nac/dictionaries/{dictionaryId}/attributes" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationNacDictionaryAttributes: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationNacDictionaryAttributeValues( + self, organizationId: str, dictionaryId: str, attributeName: str, **kwargs + ): + """ + **Search allowed values for a dictionary attribute** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-dictionary-attribute-values + + - organizationId (string): Organization ID + - dictionaryId (string): Dictionary ID + - attributeName (string): Attribute name + - search (string): Optional search string for contains-match filtering of allowed values + - networkIds (array): An optional list of network IDs to filter the allowed values. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "dictionaries", "attributes", "values"], + "operation": "getOrganizationNacDictionaryAttributeValues", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + dictionaryId = urllib.parse.quote(str(dictionaryId), safe="") + attributeName = urllib.parse.quote(str(attributeName), safe="") + resource = f"/organizations/{organizationId}/nac/dictionaries/{dictionaryId}/attributes/{attributeName}/values" + + query_params = [ + "search", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationNacDictionaryAttributeValues: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationNacLicenseUsage(self, organizationId: str, startDate: str, **kwargs): + """ + **Returns license usage data for a specific organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-license-usage + + - organizationId (string): Organization ID + - startDate (string): Start date for the usage data in UTC timezone + - endDate (string): End date for the usage data in UTC timezone + - networkIds (array): List of locale and node group ids + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "license", "usage"], + "operation": "getOrganizationNacLicenseUsage", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/license/usage" + + query_params = [ + "startDate", + "endDate", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationNacLicenseUsage: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def getOrganizationNacSessionsHistory(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the NAC Sessions for this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-sessions-history + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 hour. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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": ["nac", "configure", "sessions", "history"], + "operation": "getOrganizationNacSessionsHistory", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/sessions/history" + + query_params = [ + "t0", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationNacSessionsHistory: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationNacSessionDetails(self, organizationId: str, sessionId: str): + """ + **Return the details of selected NAC Sessions** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-session-details + + - organizationId (string): Organization ID + - sessionId (string): Session ID + """ + + metadata = { + "tags": ["nac", "configure", "sessions", "details"], + "operation": "getOrganizationNacSessionDetails", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + sessionId = urllib.parse.quote(str(sessionId), safe="") + resource = f"/organizations/{organizationId}/nac/sessions/{sessionId}/details" + + return self._session.get(metadata, resource) diff --git a/meraki/aio/api/networks.py b/meraki/aio/api/networks.py index ffa0e04e..63de7305 100644 --- a/meraki/aio/api/networks.py +++ b/meraki/aio/api/networks.py @@ -886,6 +886,37 @@ def removeNetworkDevices(self, networkId: str, serial: str, **kwargs): return self._session.post(metadata, resource, payload) + def updateNetworkDevicesSyslogServers(self, networkId: str, servers: list, **kwargs): + """ + **Updates the syslog servers configuration for a network.** + https://developer.cisco.com/meraki/api-v1/#!update-network-devices-syslog-servers + + - networkId (string): Network ID + - servers (array): A list of the syslog servers for this network; suggested maximum array size is 10 + """ + + kwargs = locals() + + metadata = { + "tags": ["networks", "configure", "devices", "syslog", "servers"], + "operation": "updateNetworkDevicesSyslogServers", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/devices/syslog/servers" + + body_params = [ + "servers", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkDevicesSyslogServers: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkEvents(self, networkId: str, total_pages=1, direction="prev", event_log_end_time=None, **kwargs): """ **List the events for the network** @@ -1455,6 +1486,7 @@ def createNetworkFloorPlan(self, networkId: str, name: str, imageContents: str, - topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan. - topRightCorner (object): The longitude and latitude of the top right corner of your floor plan. - floorNumber (number): The floor number of the floors within the building + - buildingId (string): The ID of the building that this floor belongs to. """ kwargs.update(locals()) @@ -1474,6 +1506,7 @@ def createNetworkFloorPlan(self, networkId: str, name: str, imageContents: str, "topLeftCorner", "topRightCorner", "floorNumber", + "buildingId", "imageContents", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1670,6 +1703,7 @@ def updateNetworkFloorPlan(self, networkId: str, floorPlanId: str, **kwargs): - topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan. - topRightCorner (object): The longitude and latitude of the top right corner of your floor plan. - floorNumber (number): The floor number of the floors within the building + - buildingId (string): The ID of the building that this floor belongs to. - 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. """ @@ -1691,6 +1725,7 @@ def updateNetworkFloorPlan(self, networkId: str, floorPlanId: str, **kwargs): "topLeftCorner", "topRightCorner", "floorNumber", + "buildingId", "imageContents", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1918,6 +1953,106 @@ def getNetworkHealthAlerts(self, networkId: str): return self._session.get(metadata, resource) + def getNetworkLocationScanning(self, networkId: str): + """ + **Return scanning API settings** + https://developer.cisco.com/meraki/api-v1/#!get-network-location-scanning + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["networks", "configure", "locationScanning"], + "operation": "getNetworkLocationScanning", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/locationScanning" + + return self._session.get(metadata, resource) + + def updateNetworkLocationScanning(self, networkId: str, **kwargs): + """ + **Change scanning API settings** + https://developer.cisco.com/meraki/api-v1/#!update-network-location-scanning + + - networkId (string): Network ID + - analyticsEnabled (boolean): Collect location and scanning analytics + - scanningApiEnabled (boolean): Enable push API for scanning events, analytics must be enabled + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["networks", "configure", "locationScanning"], + "operation": "updateNetworkLocationScanning", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/locationScanning" + + body_params = [ + "analyticsEnabled", + "scanningApiEnabled", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkLocationScanning: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getNetworkLocationScanningHttpServers(self, networkId: str): + """ + **Return list of scanning API receivers** + https://developer.cisco.com/meraki/api-v1/#!get-network-location-scanning-http-servers + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["networks", "configure", "locationScanning", "httpServers"], + "operation": "getNetworkLocationScanningHttpServers", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/locationScanning/httpServers" + + return self._session.get(metadata, resource) + + def updateNetworkLocationScanningHttpServers(self, networkId: str, endpoints: list, **kwargs): + """ + **Set the list of scanning API receivers** + https://developer.cisco.com/meraki/api-v1/#!update-network-location-scanning-http-servers + + - networkId (string): Network ID + - endpoints (array): A set of http server configurations + """ + + kwargs = locals() + + metadata = { + "tags": ["networks", "configure", "locationScanning", "httpServers"], + "operation": "updateNetworkLocationScanningHttpServers", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/locationScanning/httpServers" + + body_params = [ + "endpoints", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateNetworkLocationScanningHttpServers: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + def getNetworkMerakiAuthUsers(self, networkId: str): """ **List the authorized users configured under Meraki Authentication for a network (splash guest or RADIUS users for a wireless network, or client VPN users for a MX network)** @@ -2606,6 +2741,7 @@ def updateNetworkSettings(self, networkId: str, **kwargs): - remoteStatusPageEnabled (boolean): Enables / disables access to the device status page (http://[device's LAN IP]). Optional. Can only be set if localStatusPageEnabled is set to true - localStatusPage (object): A hash of Local Status page(s)' authentication options applied to the Network. - securePort (object): A hash of SecureConnect options applied to the Network. + - fips (object): A hash of FIPS options applied to the Network - namedVlans (object): A hash of Named VLANs options applied to the Network. """ @@ -2623,6 +2759,7 @@ def updateNetworkSettings(self, networkId: str, **kwargs): "remoteStatusPageEnabled", "localStatusPage", "securePort", + "fips", "namedVlans", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2635,6 +2772,93 @@ def updateNetworkSettings(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) + def createNetworkSitesBuilding(self, networkId: str, name: str, **kwargs): + """ + **Create a new building** + https://developer.cisco.com/meraki/api-v1/#!create-network-sites-building + + - networkId (string): Network ID + - name (string): The name of the building + - floors (array): The floors of the building + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["networks", "configure", "sites", "buildings"], + "operation": "createNetworkSitesBuilding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sites/buildings" + + body_params = [ + "name", + "floors", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkSitesBuilding: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def deleteNetworkSitesBuilding(self, networkId: str, buildingId: str): + """ + **Delete a building** + https://developer.cisco.com/meraki/api-v1/#!delete-network-sites-building + + - networkId (string): Network ID + - buildingId (string): Building ID + """ + + metadata = { + "tags": ["networks", "configure", "sites", "buildings"], + "operation": "deleteNetworkSitesBuilding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + buildingId = urllib.parse.quote(str(buildingId), safe="") + resource = f"/networks/{networkId}/sites/buildings/{buildingId}" + + return self._session.delete(metadata, resource) + + def updateNetworkSitesBuilding(self, networkId: str, buildingId: str, **kwargs): + """ + **Update a building** + https://developer.cisco.com/meraki/api-v1/#!update-network-sites-building + + - networkId (string): Network ID + - buildingId (string): Building ID + - name (string): The name of the building + - floors (array): The floors of the building + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["networks", "configure", "sites", "buildings"], + "operation": "updateNetworkSitesBuilding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + buildingId = urllib.parse.quote(str(buildingId), safe="") + resource = f"/networks/{networkId}/sites/buildings/{buildingId}" + + body_params = [ + "name", + "floors", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSitesBuilding: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkSnmp(self, networkId: str): """ **Return the SNMP settings for a network** @@ -2661,6 +2885,8 @@ def updateNetworkSnmp(self, networkId: str, **kwargs): - access (string): The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3). - communityString (string): The SNMP community string. Only relevant if 'access' is set to 'community'. - users (array): The list of SNMP users. Only relevant if 'access' is set to 'users'. + - authentication (object): SNMPv3 authentication settings. Only relevant if 'access' is set to 'users'. + - privacy (object): SNMPv3 privacy settings. Only relevant if 'access' is set to 'users'. """ kwargs.update(locals()) @@ -2682,6 +2908,8 @@ def updateNetworkSnmp(self, networkId: str, **kwargs): "access", "communityString", "users", + "authentication", + "privacy", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2693,6 +2921,47 @@ def updateNetworkSnmp(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) + def updateNetworkSnmpTraps(self, networkId: str, **kwargs): + """ + **Update the SNMP trap configuration for the specified network** + https://developer.cisco.com/meraki/api-v1/#!update-network-snmp-traps + + - networkId (string): Network ID + - mode (string): SNMP trap protocol version + - receiver (object): Stores the port and address + - v2 (object): V2 mode + - v3 (object): V3 mode + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["disabled", "v1/v2c", "v3"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["networks", "configure", "snmp", "traps"], + "operation": "updateNetworkSnmpTraps", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/snmp/traps" + + body_params = [ + "mode", + "receiver", + "v2", + "v3", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSnmpTraps: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkSplashLoginAttempts(self, networkId: str, **kwargs): """ **List the splash login attempts for a network** @@ -3005,9 +3274,10 @@ def createNetworkVlanProfile(self, networkId: str, name: str, vlanNames: list, v - vlanNames (array): An array of named VLANs - vlanGroups (array): An array of VLAN groups - iname (string): IName of the profile + - allowedVlans (string): The VLANs allowed on the VLAN profile. Only applicable to trunk ports. The given range must be inclusive of all named VLANs. """ - kwargs = locals() + kwargs.update(locals()) metadata = { "tags": ["networks", "configure", "vlanProfiles"], @@ -3018,6 +3288,7 @@ def createNetworkVlanProfile(self, networkId: str, name: str, vlanNames: list, v body_params = [ "name", + "allowedVlans", "vlanNames", "vlanGroups", "iname", @@ -3153,9 +3424,10 @@ def updateNetworkVlanProfile(self, networkId: str, iname: str, name: str, vlanNa - name (string): Name of the profile, string length must be from 1 to 255 characters - vlanNames (array): An array of named VLANs - vlanGroups (array): An array of VLAN groups + - allowedVlans (string): The VLANs allowed on the VLAN profile. Only applicable to trunk ports. The given range must be inclusive of all named VLANs. """ - kwargs = locals() + kwargs.update(locals()) metadata = { "tags": ["networks", "configure", "vlanProfiles"], @@ -3167,6 +3439,7 @@ def updateNetworkVlanProfile(self, networkId: str, iname: str, name: str, vlanNa body_params = [ "name", + "allowedVlans", "vlanNames", "vlanGroups", ] diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 57076563..30a71f71 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -1081,6 +1081,52 @@ def deleteOrganizationAlertsProfile(self, organizationId: str, alertConfigId: st return self._session.delete(metadata, resource) + def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwargs): + """ + **List pipeline IDs for the organization, with optional status and timespan filtering** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-rest-provisioning-pipelines + + - organizationId (string): Organization ID + - status (string): If provided, filters pipelines by status. If omitted, pipelines of all statuses are returned. + - timespan (string): Created-at lookback for matching pipelines. Defaults to -2hours. + """ + + kwargs.update(locals()) + + if "status" in kwargs: + options = ["active", "error", "pending", "success"] + assert kwargs["status"] in options, ( + f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' + ) + if "timespan" in kwargs: + options = ["-1days", "-2hours", "-30days", "-7days"] + assert kwargs["timespan"] in options, ( + f'''"timespan" cannot be "{kwargs["timespan"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "api", "rest", "provisioning", "pipelines"], + "operation": "getOrganizationApiRestProvisioningPipelines", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/api/rest/provisioning/pipelines" + + query_params = [ + "status", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApiRestProvisioningPipelines: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationApiRestProvisioningPipelinesJobs(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List pipeline jobs, with optional status filtering** @@ -1367,6 +1413,154 @@ def getOrganizationApiRequestsOverviewResponseCodesByInterval(self, organization return self._session.get(metadata, resource, params) + def getOrganizationApiRequestsResponseCodesHistoryByAdmin(self, organizationId: str, **kwargs): + """ + **Lists API request response codes and their counts aggregated by admin** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-requests-response-codes-history-by-admin + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "apiRequests", "responseCodes", "history", "byAdmin"], + "operation": "getOrganizationApiRequestsResponseCodesHistoryByAdmin", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/apiRequests/responseCodes/history/byAdmin" + + query_params = [ + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApiRequestsResponseCodesHistoryByAdmin: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApiRequestsResponseCodesHistoryByApplication(self, organizationId: str, **kwargs): + """ + **Lists API request response codes and their counts aggregated by application** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-requests-response-codes-history-by-application + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "apiRequests", "responseCodes", "history", "byApplication"], + "operation": "getOrganizationApiRequestsResponseCodesHistoryByApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/apiRequests/responseCodes/history/byApplication" + + query_params = [ + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApiRequestsResponseCodesHistoryByApplication: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApiRequestsResponseCodesHistoryByOperation(self, organizationId: str, **kwargs): + """ + **Aggregates API usage data by operationId** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-requests-response-codes-history-by-operation + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "apiRequests", "responseCodes", "history", "byOperation"], + "operation": "getOrganizationApiRequestsResponseCodesHistoryByOperation", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/apiRequests/responseCodes/history/byOperation" + + query_params = [ + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApiRequestsResponseCodesHistoryByOperation: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApiRequestsResponseCodesHistoryBySourceIp(self, organizationId: str, **kwargs): + """ + **Aggregates API usage by source ip** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-requests-response-codes-history-by-source-ip + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "apiRequests", "responseCodes", "history", "bySourceIp"], + "operation": "getOrganizationApiRequestsResponseCodesHistoryBySourceIp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/apiRequests/responseCodes/history/bySourceIp" + + query_params = [ + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApiRequestsResponseCodesHistoryBySourceIp: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationAssuranceAlerts(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **Return all health alerts for an organization** @@ -1906,124 +2100,1335 @@ def getOrganizationAssuranceAlert(self, organizationId: str, id: str): return self._session.get(metadata, resource) - def getOrganizationBrandingPolicies(self, organizationId: str): + def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: str, networkId: str, **kwargs): """ - **List the branding policies of an organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-branding-policies + **Return combined wireless and wired connected client counts over time for a network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-clients-connected-count-history - organizationId (string): Organization ID - """ - - metadata = { - "tags": ["organizations", "configure", "brandingPolicies"], - "operation": "getOrganizationBrandingPolicies", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/brandingPolicies" - - return self._session.get(metadata, resource) - - def createOrganizationBrandingPolicy(self, organizationId: str, name: str, **kwargs): - """ - **Add a new branding policy to an organization** - https://developer.cisco.com/meraki/api-v1/#!create-organization-branding-policy - - - organizationId (string): Organization ID - - name (string): Name of the Dashboard branding policy. - - enabled (boolean): Boolean indicating whether this policy is enabled. - - adminSettings (object): Settings for describing which kinds of admins this policy applies to. - - helpSettings (object): Settings for describing the modifications to various Help page features. Each property in this object accepts one of - 'default or inherit' (do not modify functionality), 'hide' (remove the section from Dashboard), or 'show' (always show - the section on Dashboard). Some properties in this object also accept custom HTML used to replace the section on - Dashboard; see the documentation for each property to see the allowed values. - Each property defaults to 'default or inherit' when not provided. - - customLogo (object): Properties describing the custom logo attached to the branding policy. + - networkId (string): Network ID to query. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 8 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600. The default is 600. Interval is calculated if time params are provided. """ kwargs.update(locals()) metadata = { - "tags": ["organizations", "configure", "brandingPolicies"], - "operation": "createOrganizationBrandingPolicy", + "tags": ["organizations", "monitor", "clients", "connectedCountHistory"], + "operation": "getOrganizationAssuranceClientsConnectedCountHistory", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/brandingPolicies" + resource = f"/organizations/{organizationId}/assurance/clients/connectedCountHistory" - body_params = [ - "name", - "enabled", - "adminSettings", - "helpSettings", - "customLogo", + query_params = [ + "networkId", + "t0", + "t1", + "timespan", + "interval", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"createOrganizationBrandingPolicy: ignoring unrecognized kwargs: {invalid}") - - return self._session.post(metadata, resource, payload) - - def getOrganizationBrandingPoliciesPriorities(self, organizationId: str): - """ - **Return the branding policy IDs of an organization in priority order** - https://developer.cisco.com/meraki/api-v1/#!get-organization-branding-policies-priorities - - - organizationId (string): Organization ID - """ - - metadata = { - "tags": ["organizations", "configure", "brandingPolicies", "priorities"], - "operation": "getOrganizationBrandingPoliciesPriorities", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/brandingPolicies/priorities" + self._session._logger.warning( + f"getOrganizationAssuranceClientsConnectedCountHistory: ignoring unrecognized kwargs: {invalid}" + ) - return self._session.get(metadata, resource) + return self._session.get(metadata, resource, params) - def updateOrganizationBrandingPoliciesPriorities(self, organizationId: str, **kwargs): + def getOrganizationAssuranceClientsEvents(self, organizationId: str, clientId: str, networkId: str, **kwargs): """ - **Update the priority ordering of an organization's branding policies.** - https://developer.cisco.com/meraki/api-v1/#!update-organization-branding-policies-priorities + **Given a client, get all alerts and events for a given timespan** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-clients-events - organizationId (string): Organization ID - - brandingPolicyIds (array): An ordered list of branding policy IDs that determines the priority order of how to apply the policies - + - clientId (string): ID of client to query + - networkId (string): Network ID where client is connected + - filter (array): Optional parameter to filter by issue + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. """ kwargs.update(locals()) metadata = { - "tags": ["organizations", "configure", "brandingPolicies", "priorities"], - "operation": "updateOrganizationBrandingPoliciesPriorities", + "tags": ["organizations", "configure", "clients", "events"], + "operation": "getOrganizationAssuranceClientsEvents", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/brandingPolicies/priorities" + resource = f"/organizations/{organizationId}/assurance/clients/events" - body_params = [ - "brandingPolicyIds", + query_params = [ + "filter", + "clientId", + "networkId", + "t0", + "t1", + "timespan", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "filter", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"updateOrganizationBrandingPoliciesPriorities: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceClientsEvents: ignoring unrecognized kwargs: {invalid}" ) - return self._session.put(metadata, resource, payload) + return self._session.get(metadata, resource, params) - def getOrganizationBrandingPolicy(self, organizationId: str, brandingPolicyId: str): + def getOrganizationAssuranceClientsEventsCorrelated( + self, organizationId: str, clientId: str, category: str, networkId: str, timestamp: str, **kwargs + ): """ - **Return a branding policy** - https://developer.cisco.com/meraki/api-v1/#!get-organization-branding-policy + **Given a client, category, and timespan, return events that have a close connection to each other.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-clients-events-correlated - organizationId (string): Organization ID - - brandingPolicyId (string): Branding policy ID + - clientId (string): Client ID + - category (string): Category of events + - networkId (string): Network used by the client + - timestamp (string): Timestamp for the event + - lookback (integer): Amount of time in minutes to look back + - lookforward (integer): Amount of time in minutes to look forwards + """ + + kwargs.update(locals()) + + if "category" in kwargs: + options = ["application", "association", "authentication", "dhcp", "dns"] + assert kwargs["category"] in options, ( + f'''"category" cannot be "{kwargs["category"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "clients", "events", "correlated"], + "operation": "getOrganizationAssuranceClientsEventsCorrelated", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/clients/events/correlated" + + query_params = [ + "clientId", + "category", + "networkId", + "timestamp", + "lookback", + "lookforward", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceClientsEventsCorrelated: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceClientsTopologyCurrent(self, organizationId: str, clientId: str, networkId: str, **kwargs): + """ + **Given a client, return current topology** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-clients-topology-current + + - organizationId (string): Organization ID + - clientId (string): ID of client to query + - networkId (string): Network ID where client is connected + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "clients", "topology", "current"], + "operation": "getOrganizationAssuranceClientsTopologyCurrent", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/clients/topology/current" + + query_params = [ + "clientId", + "networkId", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceClientsTopologyCurrent: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceClientsTopologyNew(self, organizationId: str, clientIds: list, networkId: str, **kwargs): + """ + **Given a client, return current topology** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-clients-topology-new + + - organizationId (string): Organization ID + - clientIds (array): List of IDs for client retrieval for a given network. Limited to 1 client for now + - networkId (string): Network ID where client is connected + - timestamp (string): Timestamp for client topology path + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "clients", "topology", "new"], + "operation": "getOrganizationAssuranceClientsTopologyNew", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/clients/topology/new" + + query_params = [ + "clientIds", + "networkId", + "timestamp", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "clientIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceClientsTopologyNew: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceDevicesStatusesOverview(self, organizationId: str, **kwargs): + """ + **Returns counts of online, offline, and recovered devices by product type, along with offline intervals for impacted devices in the organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-devices-statuses-overview + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "devices", "statuses", "overview"], + "operation": "getOrganizationAssuranceDevicesStatusesOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/devices/statuses/overview" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceDevicesStatusesOverview: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceFetchTableQuery(self, organizationId: str, tableName: str, **kwargs): + """ + **Returns the table data for a given timespan** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-fetch-table-query + + - organizationId (string): Organization ID + - tableName (string): The table from which we want to get data + - t0 (string): The beginning of the timespan for the data. + - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 365 days, 5 hours, 49 minutes, and 12 seconds. The default is 30 days, 10 hours, 29 minutes, and 6 seconds. + - userEmail (string): The user email for whom we want to calculate lookback + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "fetchTableQuery"], + "operation": "getOrganizationAssuranceFetchTableQuery", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/fetchTableQuery" + + query_params = [ + "t0", + "timespan", + "tableName", + "userEmail", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceFetchTableQuery: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceNetworkServicesServerHealthByServer(self, organizationId: str, **kwargs): + """ + **Returns network server health in organization by server.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-network-services-server-health-by-server + + - organizationId (string): Organization ID + - networkIds (array): Filter results for these networks. + - serverTypes (array): Filter results for these server types. + - serverIps (array): Filter results for these server IP addresses. + - ssidNumbers (array): Filter results for these SSID Numbers. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "networkServices", "serverHealth", "byServer"], + "operation": "getOrganizationAssuranceNetworkServicesServerHealthByServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/networkServices/serverHealth/byServer" + + query_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceNetworkServicesServerHealthByServer: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceNetworkServicesServerHealthByServerByInterval(self, organizationId: str, **kwargs): + """ + **Returns network server health in organization by server and by interval.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-network-services-server-health-by-server-by-interval + + - organizationId (string): Organization ID + - networkIds (array): Filter results for these networks. + - serverTypes (array): Filter results for these server types. + - serverIps (array): Filter results for these server IP addresses. + - ssidNumbers (array): Filter results for these SSID Numbers. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "networkServices", "serverHealth", "byServer", "byInterval"], + "operation": "getOrganizationAssuranceNetworkServicesServerHealthByServerByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/networkServices/serverHealth/byServer/byInterval" + + query_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceNetworkServicesServerHealthByServerByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceNetworkServicesServerHealthByServerType(self, organizationId: str, **kwargs): + """ + **Returns network server health in organization by server type.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-network-services-server-health-by-server-type + + - organizationId (string): Organization ID + - networkIds (array): Filter results for these networks. + - serverTypes (array): Filter results for these server types. + - serverIps (array): Filter results for these server IP addresses. + - ssidNumbers (array): Filter results for these SSID Numbers. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "networkServices", "serverHealth", "byServerType"], + "operation": "getOrganizationAssuranceNetworkServicesServerHealthByServerType", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/networkServices/serverHealth/byServerType" + + query_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceNetworkServicesServerHealthByServerType: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceNetworkServicesServerHealthByServerTypeByInterval(self, organizationId: str, **kwargs): + """ + **Returns network server health in organization by server type and by interval.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-network-services-server-health-by-server-type-by-interval + + - organizationId (string): Organization ID + - networkIds (array): Filter results for these networks. + - serverTypes (array): Filter results for these server types. + - serverIps (array): Filter results for these server IP addresses. + - ssidNumbers (array): Filter results for these SSID Numbers. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "networkServices", "serverHealth", "byServerType", "byInterval"], + "operation": "getOrganizationAssuranceNetworkServicesServerHealthByServerTypeByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/networkServices/serverHealth/byServerType/byInterval" + + query_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceNetworkServicesServerHealthByServerTypeByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def checkupOrganizationAssuranceOptimization(self, organizationId: str, **kwargs): + """ + **Returns an array of checkup results for the organization** + https://developer.cisco.com/meraki/api-v1/#!checkup-organization-assurance-optimization + + - organizationId (string): Organization ID + - forceRefresh (boolean): Optional parameter to reassess best practices + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "optimization"], + "operation": "checkupOrganizationAssuranceOptimization", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/optimization/checkup" + + query_params = [ + "forceRefresh", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"checkupOrganizationAssuranceOptimization: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceOptimizationCheckupByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns an array of checkup results for the networks** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-optimization-checkup-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 7. + - 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. + - networkIds (array): Optional parameter to filter checkups by Network Id + - forceRefresh (boolean): Optional parameter to reassess best practices + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "optimization", "checkup", "byNetwork"], + "operation": "getOrganizationAssuranceOptimizationCheckupByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/optimization/checkup/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "forceRefresh", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceOptimizationCheckupByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceProductAnnouncements(self, organizationId: str, **kwargs): + """ + **Gets relevant product announcements for a user** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-product-announcements + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. + - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 365 days, 5 hours, 49 minutes, and 12 seconds. The default is 91 days, 7 hours, 27 minutes, and 18 seconds. + - onlyRelevant (boolean): Limits product announcements that are considered relevant to this user when true + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "productAnnouncements"], + "operation": "getOrganizationAssuranceProductAnnouncements", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/productAnnouncements" + + query_params = [ + "t0", + "timespan", + "onlyRelevant", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceProductAnnouncements: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceScores(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get network health scores for a list of networks.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-scores + + - 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): Filter results by network. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 2 hours and be less than or equal to 14 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "scores"], + "operation": "getOrganizationAssuranceScores", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/scores" + + query_params = [ + "networkIds", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationAssuranceScores: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceThousandEyesApplications(self, organizationId: str, networkIds: list, **kwargs): + """ + **Get a list of Thousand Eyes applications with their alerts.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-thousand-eyes-applications + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - clientId (string): Filter results by client. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "thousandEyes", "applications"], + "operation": "getOrganizationAssuranceThousandEyesApplications", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/thousandEyes/applications" + + query_params = [ + "networkIds", + "clientId", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceThousandEyesApplications: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wired connection successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["organizations", "configure", "wired", "experience", "successfulConnections", "byNetwork"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClient(self, organizationId: str, **kwargs): + """ + **Summarizes wired connection successes and failures by client.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "wired", "experience", "successfulConnections", "byNetwork", "byClient"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork/byClient" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wired connection successes and failures by device.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["organizations", "configure", "wired", "experience", "successfulConnections", "byNetwork", "byDevice"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork/byDevice" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByInterval(self, organizationId: str, **kwargs): + """ + **Time-series of wired connection successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network-by-interval + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 60, 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "wired", "experience", "successfulConnections", "byNetwork", "byInterval"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork/byInterval" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceWorkflows(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return workflows filtered by organization ID, network ID, type, and category** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-workflows + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 30. + - 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. + - sortOrder (string): Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'ascending'. + - networkIds (array): Optional parameter to filter by network ID + - types (array): Optional parameter to filter workflows by types + - categories (array): Optional parameter to filter workflows by categories + - scopeTypes (array): Optional parameter to filter workflows by scope types + - networkTags (array): Optional parameter to filter workflows by network tags + - clientTags (array): Optional parameter to filter workflows by client tags + - nodeTags (array): Optional parameter to filter workflows by node tags + - state (string): Optional parameter to filter workflows by state + - tsStart (string): Start time to filter workflows + - tsEnd (string): End time to filter workflows + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "workflows"], + "operation": "getOrganizationAssuranceWorkflows", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/workflows" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "sortOrder", + "networkIds", + "types", + "categories", + "scopeTypes", + "networkTags", + "clientTags", + "nodeTags", + "state", + "tsStart", + "tsEnd", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "types", + "categories", + "scopeTypes", + "networkTags", + "clientTags", + "nodeTags", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationAssuranceWorkflows: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAuthRadiusServers(self, organizationId: str): + """ + **List the organization-wide RADIUS servers in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-auth-radius-servers + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "auth", "radius", "servers"], + "operation": "getOrganizationAuthRadiusServers", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers" + + return self._session.get(metadata, resource) + + def createOrganizationAuthRadiusServer(self, organizationId: str, address: str, secret: str, **kwargs): + """ + **Add an organization-wide RADIUS server** + https://developer.cisco.com/meraki/api-v1/#!create-organization-auth-radius-server + + - organizationId (string): Organization ID + - address (string): The IP address or FQDN of the RADIUS server + - secret (string): Shared secret of the RADIUS server + - name (string): The name of the RADIUS server + - modes (array): Available server modes + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "auth", "radius", "servers"], + "operation": "createOrganizationAuthRadiusServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers" + + body_params = [ + "name", + "address", + "modes", + "secret", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationAuthRadiusServer: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationAuthRadiusServersAssignments(self, organizationId: str): + """ + **Return list of network and policies that organization-wide RADIUS servers are bing used** + https://developer.cisco.com/meraki/api-v1/#!get-organization-auth-radius-servers-assignments + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "auth", "radius", "servers", "assignments"], + "operation": "getOrganizationAuthRadiusServersAssignments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers/assignments" + + return self._session.get(metadata, resource) + + def getOrganizationAuthRadiusServer(self, organizationId: str, serverId: str): + """ + **Return an organization-wide RADIUS server** + https://developer.cisco.com/meraki/api-v1/#!get-organization-auth-radius-server + + - organizationId (string): Organization ID + - serverId (string): Server ID + """ + + metadata = { + "tags": ["organizations", "configure", "auth", "radius", "servers"], + "operation": "getOrganizationAuthRadiusServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + serverId = urllib.parse.quote(str(serverId), safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers/{serverId}" + + return self._session.get(metadata, resource) + + def updateOrganizationAuthRadiusServer(self, organizationId: str, serverId: str, **kwargs): + """ + **Update an organization-wide RADIUS server** + https://developer.cisco.com/meraki/api-v1/#!update-organization-auth-radius-server + + - organizationId (string): Organization ID + - serverId (string): Server ID + - name (string): The name of the RADIUS server + - address (string): The IP address or FQDN of the RADIUS server + - modes (array): Available server modes + - secret (string): Shared secret of the RADIUS server + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "auth", "radius", "servers"], + "operation": "updateOrganizationAuthRadiusServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + serverId = urllib.parse.quote(str(serverId), safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers/{serverId}" + + body_params = [ + "name", + "address", + "modes", + "secret", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationAuthRadiusServer: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationAuthRadiusServer(self, organizationId: str, serverId: str): + """ + **Delete an organization-wide RADIUS server from a organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-auth-radius-server + + - organizationId (string): Organization ID + - serverId (string): Server ID + """ + + metadata = { + "tags": ["organizations", "configure", "auth", "radius", "servers"], + "operation": "deleteOrganizationAuthRadiusServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + serverId = urllib.parse.quote(str(serverId), safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers/{serverId}" + + return self._session.delete(metadata, resource) + + def getOrganizationBrandingPolicies(self, organizationId: str): + """ + **List the branding policies of an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-branding-policies + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "brandingPolicies"], + "operation": "getOrganizationBrandingPolicies", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/brandingPolicies" + + return self._session.get(metadata, resource) + + def createOrganizationBrandingPolicy(self, organizationId: str, name: str, **kwargs): + """ + **Add a new branding policy to an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-branding-policy + + - organizationId (string): Organization ID + - name (string): Name of the Dashboard branding policy. + - enabled (boolean): Boolean indicating whether this policy is enabled. + - adminSettings (object): Settings for describing which kinds of admins this policy applies to. + - helpSettings (object): Settings for describing the modifications to various Help page features. Each property in this object accepts one of + 'default or inherit' (do not modify functionality), 'hide' (remove the section from Dashboard), or 'show' (always show + the section on Dashboard). Some properties in this object also accept custom HTML used to replace the section on + Dashboard; see the documentation for each property to see the allowed values. + Each property defaults to 'default or inherit' when not provided. + - customLogo (object): Properties describing the custom logo attached to the branding policy. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "brandingPolicies"], + "operation": "createOrganizationBrandingPolicy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/brandingPolicies" + + body_params = [ + "name", + "enabled", + "adminSettings", + "helpSettings", + "customLogo", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationBrandingPolicy: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationBrandingPoliciesPriorities(self, organizationId: str): + """ + **Return the branding policy IDs of an organization in priority order** + https://developer.cisco.com/meraki/api-v1/#!get-organization-branding-policies-priorities + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "brandingPolicies", "priorities"], + "operation": "getOrganizationBrandingPoliciesPriorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/brandingPolicies/priorities" + + return self._session.get(metadata, resource) + + def updateOrganizationBrandingPoliciesPriorities(self, organizationId: str, **kwargs): + """ + **Update the priority ordering of an organization's branding policies.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-branding-policies-priorities + + - organizationId (string): Organization ID + - brandingPolicyIds (array): An ordered list of branding policy IDs that determines the priority order of how to apply the policies + + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "brandingPolicies", "priorities"], + "operation": "updateOrganizationBrandingPoliciesPriorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/brandingPolicies/priorities" + + body_params = [ + "brandingPolicyIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationBrandingPoliciesPriorities: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def getOrganizationBrandingPolicy(self, organizationId: str, brandingPolicyId: str): + """ + **Return a branding policy** + https://developer.cisco.com/meraki/api-v1/#!get-organization-branding-policy + + - organizationId (string): Organization ID + - brandingPolicyId (string): Branding policy ID """ metadata = { @@ -2100,6 +3505,191 @@ def deleteOrganizationBrandingPolicy(self, organizationId: str, brandingPolicyId return self._session.delete(metadata, resource) + def getOrganizationCertificates(self, organizationId: str, **kwargs): + """ + **Gets all or specific certificates for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-certificates + + - organizationId (string): Organization ID + - certificateIds (array): List of ids for specific certificate retrieval + - certManagedBy (array): List of cert managed by types + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "certificates"], + "operation": "getOrganizationCertificates", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates" + + query_params = [ + "certificateIds", + "certManagedBy", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "certificateIds", + "certManagedBy", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationCertificates: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def importOrganizationCertificates(self, organizationId: str, managedBy: str, contents: str, description: str, **kwargs): + """ + **Import certificate for this organization** + https://developer.cisco.com/meraki/api-v1/#!import-organization-certificates + + - organizationId (string): Organization ID + - managedBy (string): Certificate managed by type [system_manager, mr, encrypted_syslog] + - contents (string): Certificate content in valid PEM format + - description (string): Certificate description + """ + + kwargs = locals() + + if "managedBy" in kwargs: + options = ["encrypted_syslog", "mr", "system_manager"] + assert kwargs["managedBy"] in options, ( + f'''"managedBy" cannot be "{kwargs["managedBy"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "certificates"], + "operation": "importOrganizationCertificates", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/import" + + body_params = [ + "managedBy", + "contents", + "description", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"importOrganizationCertificates: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationCertificatesMerakiAuthContents(self, organizationId: str): + """ + **Download the public RADIUS certificate.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-certificates-meraki-auth-contents + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "monitor", "certificates", "merakiAuth", "contents"], + "operation": "getOrganizationCertificatesMerakiAuthContents", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/merakiAuth/contents" + + return self._session.get(metadata, resource) + + def deleteOrganizationCertificate(self, organizationId: str, certificateId: str): + """ + **Delete a certificate for an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-certificate + + - organizationId (string): Organization ID + - certificateId (string): Certificate ID + """ + + metadata = { + "tags": ["organizations", "configure", "certificates"], + "operation": "deleteOrganizationCertificate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + certificateId = urllib.parse.quote(str(certificateId), safe="") + resource = f"/organizations/{organizationId}/certificates/{certificateId}" + + return self._session.delete(metadata, resource) + + def updateOrganizationCertificate(self, organizationId: str, certificateId: str, **kwargs): + """ + **Update a certificate's description for an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-certificate + + - organizationId (string): Organization ID + - certificateId (string): Certificate ID + - description (string): Description of a certificate that already exist in your org + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "certificates"], + "operation": "updateOrganizationCertificate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + certificateId = urllib.parse.quote(str(certificateId), safe="") + resource = f"/organizations/{organizationId}/certificates/{certificateId}" + + body_params = [ + "description", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationCertificate: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getOrganizationCertificateContents(self, organizationId: str, certificateId: str, **kwargs): + """ + **Download the trusted certificate by certificate id.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-certificate-contents + + - organizationId (string): Organization ID + - certificateId (string): Certificate ID + - chainId (string): chainId that represent which certificate chain is being requested + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "certificates", "contents"], + "operation": "getOrganizationCertificateContents", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + certificateId = urllib.parse.quote(str(certificateId), safe="") + resource = f"/organizations/{organizationId}/certificates/{certificateId}/contents" + + query_params = [ + "chainId", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationCertificateContents: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + def claimIntoOrganization(self, organizationId: str, **kwargs): """ **Claim a list of devices, licenses, and/or orders into an organization inventory** @@ -2143,6 +3733,7 @@ def getOrganizationClientsBandwidthUsageHistory(self, organizationId: str, **kwa - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink - t0 (string): The beginning of the timespan for the data. @@ -2162,6 +3753,7 @@ def getOrganizationClientsBandwidthUsageHistory(self, organizationId: str, **kwa query_params = [ "networkTag", "deviceTag", + "networkId", "ssidName", "usageUplink", "t0", @@ -2285,6 +3877,23 @@ def cloneOrganization(self, organizationId: str, name: str, **kwargs): return self._session.post(metadata, resource, payload) + def getOrganizationCloudConnectivityRequirements(self, organizationId: str): + """ + **List of source/destination traffic rules** + https://developer.cisco.com/meraki/api-v1/#!get-organization-cloud-connectivity-requirements + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "monitor", "cloud", "connectivity", "requirements"], + "operation": "getOrganizationCloudConnectivityRequirements", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/cloud/connectivity/requirements" + + return self._session.get(metadata, resource) + def getOrganizationConfigTemplates(self, organizationId: str): """ **List the configuration templates for this organization** @@ -2630,10 +4239,26 @@ def getOrganizationDevicesAvailabilitiesChangeHistory( - productTypes (array): Optional parameter to filter device availabilities history by device product types - networkIds (array): Optional parameter to filter device availabilities history by network IDs - statuses (array): Optional parameter to filter device availabilities history by device statuses + - categories (array): Optional parameter to filter device availabilities history by categories of status, reboot, or upgrade + - networkTags (array): Optional parameter to filter device availabilities history by network tags. The filtering is case-sensitive. If tags are included, 'networkTagsFilterType' should also be included (see below). + - networkTagsFilterType (string): An optional parameter of value 'withAnyTags' or 'withAllTags' to indicate whether to return networks which contain ANY or ALL of the included tags. If no type is included, 'withAnyTags' will be selected. + - deviceTags (array): Optional parameter to filter device availabilities history by device tags. The filtering is case-sensitive. If tags are included, 'deviceTagsFilterType' should also be included (see below). + - deviceTagsFilterType (string): An optional parameter of value 'withAnyTags' or 'withAllTags' to indicate whether to return devices which contain ANY or ALL of the included tags. If no type is included, 'withAnyTags' will be selected. """ kwargs.update(locals()) + if "networkTagsFilterType" in kwargs: + options = ["withAllTags", "withAnyTags"] + assert kwargs["networkTagsFilterType"] in options, ( + f'''"networkTagsFilterType" cannot be "{kwargs["networkTagsFilterType"]}", & must be set to one of: {options}''' + ) + if "deviceTagsFilterType" in kwargs: + options = ["withAllTags", "withAnyTags"] + assert kwargs["deviceTagsFilterType"] in options, ( + f'''"deviceTagsFilterType" cannot be "{kwargs["deviceTagsFilterType"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["organizations", "monitor", "devices", "availabilities", "changeHistory"], "operation": "getOrganizationDevicesAvailabilitiesChangeHistory", @@ -2648,18 +4273,142 @@ def getOrganizationDevicesAvailabilitiesChangeHistory( "t0", "t1", "timespan", - "serials", - "productTypes", - "networkIds", - "statuses", + "serials", + "productTypes", + "networkIds", + "statuses", + "categories", + "networkTags", + "networkTagsFilterType", + "deviceTags", + "deviceTagsFilterType", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "serials", + "productTypes", + "networkIds", + "statuses", + "categories", + "networkTags", + "deviceTags", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesAvailabilitiesChangeHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationDevicesBootsHistory(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns the history of device boots in reverse chronological order (most recent first)** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-boots-history + + - 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 + - t0 (string): The beginning of the timespan for the data. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 730 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 730 days. + - serials (array): Optional parameter to filter device by device serial numbers. This filter uses multiple exact matches. + - productTypes (array): Optional parameter to filter devices by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect. + - mostRecentPerDevice (boolean): If true, only the most recent boot for each device is returned. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - sortOrder (string): Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'descending'. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "devices", "boots", "history"], + "operation": "getOrganizationDevicesBootsHistory", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/boots/history" + + query_params = [ + "t0", + "t1", + "timespan", + "serials", + "productTypes", + "mostRecentPerDevice", + "perPage", + "startingAfter", + "endingBefore", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "serials", + "productTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationDevicesBootsHistory: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationDevicesBootsOverviewByDevice(self, organizationId: str, **kwargs): + """ + **Summarizes device reboots across an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-boots-overview-by-device + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - productTypes (array): An optional parameter to filter device statuses by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "devices", "boots", "overview", "byDevice"], + "operation": "getOrganizationDevicesBootsOverviewByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/boots/overview/byDevice" + + query_params = [ + "networkIds", + "productTypes", + "t0", + "t1", + "timespan", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "serials", - "productTypes", "networkIds", - "statuses", + "productTypes", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -2671,10 +4420,10 @@ def getOrganizationDevicesAvailabilitiesChangeHistory( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationDevicesAvailabilitiesChangeHistory: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationDevicesBootsOverviewByDevice: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) def getOrganizationDevicesCellularDataDevices(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ @@ -3274,6 +5023,147 @@ def getOrganizationDevicesCellularUplinksTowersByDevice( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesCliConfigs(self, organizationId: str, serials: list, total_pages=1, direction="next", **kwargs): + """ + **Retrieve the history of running configurations for IOS-XE devices** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-cli-configs + + - organizationId (string): Organization ID + - serials (array): Device serials to include in the response + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 20. + - 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. + - isFavorite (boolean): Whether to return only favorited configs + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "devices", "cli", "configs"], + "operation": "getOrganizationDevicesCliConfigs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/cli/configs" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "serials", + "isFavorite", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationDevicesCliConfigs: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationDevicesCliConfigsDetails( + self, organizationId: str, configId: str, serials: list, total_pages=1, direction="next", **kwargs + ): + """ + **Retrieve the full contents for a given IOS-XE device configuration** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-cli-configs-details + + - organizationId (string): Organization ID + - configId (string): Config ID + - serials (array): Device serials to use when locating the config record + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5. Default is 5. + - 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": ["organizations", "configure", "devices", "cli", "configs", "details"], + "operation": "getOrganizationDevicesCliConfigsDetails", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/cli/configs/details" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "configId", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesCliConfigsDetails: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getDeviceConfigRestores(self, organizationId: str, serials: list, **kwargs): + """ + **Return restore status entries for IOS-XE device configurations** + https://developer.cisco.com/meraki/api-v1/#!get-device-config-restores + + - organizationId (string): Organization ID + - serials (array): Device serial numbers + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "devices", "cli", "configs", "restores"], + "operation": "getDeviceConfigRestores", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/cli/configs/restores" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getDeviceConfigRestores: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + def createOrganizationDevicesControllerMigration(self, organizationId: str, serials: list, target: str, **kwargs): """ **Migrate devices to another controller or management mode** @@ -3408,6 +5298,56 @@ def bulkUpdateOrganizationDevicesDetails(self, organizationId: str, serials: lis return self._session.post(metadata, resource, payload) + def getOrganizationDevicesMemoryByDevice(self, organizationId: str, networkIds: list, productTypes: list, **kwargs): + """ + **Summarizes memory status across devices of a given network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-memory-by-device + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - productTypes (array): Parameter to filter device availabilities by device product types. This filter uses multiple exact matches. + - usageThreshold (number): Threshold of device memory utilization expressed as a percent. Filters out all devices below this value. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 1 hour and be less than or equal to 7 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "devices", "memory", "byDevice"], + "operation": "getOrganizationDevicesMemoryByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/memory/byDevice" + + query_params = [ + "networkIds", + "productTypes", + "usageThreshold", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "productTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationDevicesMemoryByDevice: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + def getOrganizationDevicesOverviewByModel(self, organizationId: str, **kwargs): """ **Lists the count for each device model** @@ -3742,6 +5682,65 @@ def stopOrganizationDevicesPacketCaptureCapture(self, organizationId: str, captu return self._session.post(metadata, resource, payload) + def getOrganizationDevicesPacketCaptureOpportunisticByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the Opportunistic Pcap settings of an organization by network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-packet-capture-opportunistic-by-network + + - 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): Optional parameter to filter results by network. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - sortOrder (string): Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'descending'. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "devices", "packetCapture", "opportunistic", "byNetwork"], + "operation": "getOrganizationDevicesPacketCaptureOpportunisticByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/packetCapture/opportunistic/byNetwork" + + query_params = [ + "networkIds", + "perPage", + "startingAfter", + "endingBefore", + "sortOrder", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesPacketCaptureOpportunisticByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesPacketCaptureSchedules(self, organizationId: str, **kwargs): """ **List the Packet Capture Schedules** @@ -3791,36 +5790,69 @@ def getOrganizationDevicesPacketCaptureSchedules(self, organizationId: str, **kw 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 + **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", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + 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} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationDevicesPacketCaptureSchedule: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def bulkOrganizationDevicesPacketCaptureSchedulesDelete(self, organizationId: str, scheduleIds: list, **kwargs): + """ + **Delete packet capture schedules** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-devices-packet-capture-schedules-delete - 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 + - scheduleIds (array): Delete the packet capture schedules of the specified schedule ids """ - kwargs.update(locals()) + kwargs = locals() metadata = { "tags": ["organizations", "configure", "devices", "packetCapture", "schedules"], - "operation": "createOrganizationDevicesPacketCaptureSchedule", + "operation": "bulkOrganizationDevicesPacketCaptureSchedulesDelete", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/devices/packetCapture/schedules" + resource = f"/organizations/{organizationId}/devices/packetCapture/schedules/bulkDelete" body_params = [ - "devices", - "name", - "notes", - "duration", - "filterExpression", - "enabled", - "schedule", + "scheduleIds", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -3829,7 +5861,7 @@ def createOrganizationDevicesPacketCaptureSchedule(self, organizationId: str, de invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"createOrganizationDevicesPacketCaptureSchedule: ignoring unrecognized kwargs: {invalid}" + f"bulkOrganizationDevicesPacketCaptureSchedulesDelete: ignoring unrecognized kwargs: {invalid}" ) return self._session.post(metadata, resource, payload) @@ -3935,6 +5967,119 @@ def deleteOrganizationDevicesPacketCaptureSchedule(self, organizationId: str, sc return self._session.delete(metadata, resource) + def tasksOrganizationDevicesPacketCapture(self, organizationId: str, packetId: str, task: str, **kwargs): + """ + **Enqueues a task for a specific packet capture** + https://developer.cisco.com/meraki/api-v1/#!tasks-organization-devices-packet-capture + + - organizationId (string): Organization ID + - packetId (string): Packet ID + - task (string): Type of task to enqueue. It can be one of: ["analysis", "reasoning", "summary", "highlights", "title", "flow"] + - networkId (string): Parameter to validate authorization by network access + """ + + kwargs.update(locals()) + + if "task" in kwargs: + options = ["analysis", "flow", "highlights", "reasoning", "summary", "title"] + assert kwargs["task"] in options, f'''"task" cannot be "{kwargs["task"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["organizations", "configure", "devices", "packetCaptures"], + "operation": "tasksOrganizationDevicesPacketCapture", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + packetId = urllib.parse.quote(str(packetId), safe="") + resource = f"/organizations/{organizationId}/devices/packetCaptures/{packetId}/tasks" + + body_params = [ + "networkId", + "task", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"tasksOrganizationDevicesPacketCapture: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationDevicesPacketCaptureTask(self, organizationId: str, packetId: str, id: str, **kwargs): + """ + **Retrieves packet capture analysis result for a specific packet capture task.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-packet-capture-task + + - organizationId (string): Organization ID + - packetId (string): Packet ID + - id (string): ID + - networkId (string): Optional parameter to validate authorization by network access + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "devices", "packetCaptures", "tasks"], + "operation": "getOrganizationDevicesPacketCaptureTask", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + packetId = urllib.parse.quote(str(packetId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/devices/packetCaptures/{packetId}/tasks/{id}" + + query_params = [ + "networkId", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesPacketCaptureTask: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def bulkOrganizationDevicesPlacementPositionsUpdate(self, organizationId: str, serials: list, **kwargs): + """ + **Bulk update the attributes related to positions for provided devices** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-devices-placement-positions-update + + - organizationId (string): Organization ID + - serials (array): List of device serials on a floor plan to update + - height (object): Height of the devices on the floor plan + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "devices", "placement", "positions"], + "operation": "bulkOrganizationDevicesPlacementPositionsUpdate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/placement/positions/bulkUpdate" + + body_params = [ + "serials", + "height", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"bulkOrganizationDevicesPlacementPositionsUpdate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def getOrganizationDevicesPowerModulesStatusesByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -4076,6 +6221,128 @@ def getOrganizationDevicesProvisioningStatuses(self, organizationId: str, total_ return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns details about software updates for networks within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-software-updates-overviews-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 30. + - 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. + - sortOrder (string): Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'ascending'. + - sortKey (string): Specify key to order the list of networks. + - configSource (string): Limit the list of networks to those that contain devices with the specified config source + - networkIds (array): Limit the list of networks to those that match the provided network IDs + - networkGroupIds (array): Limit the list of networks to those that belong to one of the provided network group IDs. + - productTypes (array): Limit the list of product types included for each network + - networkName (string): Limit the list of networks to those whose name contains the given search string. + - versionIds (array): Limit the list of networks to those that are currently on one of the provided version IDs. + - firmwareStatus (string): Limit the list of networks to those whose current firmware version has the specified end-of-support status. + - firmwareType (string): Limit the list of networks to those whose current firmware version has the specified release type. + - upgradeDependencyIds (array): Limit the list of networks to those that belong to one of the provided upgrade dependencies. + - upgradeAvailable (boolean): Limit the list of networks by upgrade availability. + - templateRole (string): Limit the list of networks by config template role: non-template only, templates only, or templates and bound networks. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + if "sortKey" in kwargs: + options = [ + "availability", + "currentVersion", + "firmwareStatus", + "firmwareType", + "lastUpgrade", + "networkGroup", + "networkName", + "networkType", + "scheduledTime", + "scheduledUpgradeVersion", + "upgradeDependency", + ] + assert kwargs["sortKey"] in options, ( + f'''"sortKey" cannot be "{kwargs["sortKey"]}", & must be set to one of: {options}''' + ) + if "configSource" in kwargs: + options = ["cloud", "local"] + assert kwargs["configSource"] in options, ( + f'''"configSource" cannot be "{kwargs["configSource"]}", & must be set to one of: {options}''' + ) + if "firmwareStatus" in kwargs: + options = ["critical", "good", "warning"] + assert kwargs["firmwareStatus"] in options, ( + f'''"firmwareStatus" cannot be "{kwargs["firmwareStatus"]}", & must be set to one of: {options}''' + ) + if "firmwareType" in kwargs: + options = ["beta", "candidate", "stable"] + assert kwargs["firmwareType"] in options, ( + f'''"firmwareType" cannot be "{kwargs["firmwareType"]}", & must be set to one of: {options}''' + ) + if "templateRole" in kwargs: + options = ["bound-templates", "non-template", "templates"] + assert kwargs["templateRole"] in options, ( + f'''"templateRole" cannot be "{kwargs["templateRole"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "devices", "software", "updates", "overviews", "byNetwork"], + "operation": "getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/software/updates/overviews/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "sortOrder", + "sortKey", + "configSource", + "networkIds", + "networkGroupIds", + "productTypes", + "networkName", + "versionIds", + "firmwareStatus", + "firmwareType", + "upgradeDependencyIds", + "upgradeAvailable", + "templateRole", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "networkGroupIds", + "productTypes", + "versionIds", + "upgradeDependencyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesStatuses(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the status of every Meraki device in the organization** @@ -4094,6 +6361,7 @@ def getOrganizationDevicesStatuses(self, organizationId: str, total_pages=1, dir - models (array): Optional parameter to filter devices by models. - tags (array): An optional parameter to filter devices by tags. The filtering is case-sensitive. If tags are included, 'tagsFilterType' should also be included (see below). - tagsFilterType (string): An optional parameter of value 'withAnyTags' or 'withAllTags' to indicate whether to return devices which contain ANY or ALL of the included tags. If no type is included, 'withAnyTags' will be selected. + - configurationUpdatedAfter (string): Optional parameter to filter results by whether or not the device's configuration has been updated after the given timestamp """ kwargs.update(locals()) @@ -4105,33 +6373,125 @@ def getOrganizationDevicesStatuses(self, organizationId: str, total_pages=1, dir ) metadata = { - "tags": ["organizations", "monitor", "devices", "statuses"], - "operation": "getOrganizationDevicesStatuses", + "tags": ["organizations", "monitor", "devices", "statuses"], + "operation": "getOrganizationDevicesStatuses", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/statuses" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + "statuses", + "productTypes", + "models", + "tags", + "tagsFilterType", + "configurationUpdatedAfter", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "statuses", + "productTypes", + "models", + "tags", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationDevicesStatuses: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationDevicesStatusesOverview(self, organizationId: str, **kwargs): + """ + **Return an overview of current device statuses** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-statuses-overview + + - organizationId (string): Organization ID + - productTypes (array): An optional parameter to filter device statuses by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect. + - networkIds (array): An optional parameter to filter device statuses by network. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "devices", "statuses", "overview"], + "operation": "getOrganizationDevicesStatusesOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/statuses/overview" + + query_params = [ + "productTypes", + "networkIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "productTypes", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesStatusesOverview: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationDevicesSyslogServersByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns syslog servers configured for the networks within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-syslog-servers-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - networkIds (array): IDs of the networks for which to fetch syslog servers; suggested maximum array size is 100 + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "devices", "syslog", "servers", "byNetwork"], + "operation": "getOrganizationDevicesSyslogServersByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/devices/statuses" + resource = f"/organizations/{organizationId}/devices/syslog/servers/byNetwork" query_params = [ "perPage", "startingAfter", "endingBefore", "networkIds", - "serials", - "statuses", - "productTypes", - "models", - "tags", - "tagsFilterType", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", - "serials", - "statuses", - "productTypes", - "models", - "tags", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4142,37 +6502,46 @@ def getOrganizationDevicesStatuses(self, organizationId: str, total_pages=1, dir all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationDevicesStatuses: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"getOrganizationDevicesSyslogServersByNetwork: ignoring unrecognized kwargs: {invalid}" + ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationDevicesStatusesOverview(self, organizationId: str, **kwargs): + def getOrganizationDevicesSyslogServersRolesByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Return an overview of current device statuses** - https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-statuses-overview + **Returns roles that can be assigned to a syslog server for a given network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-syslog-servers-roles-by-network - organizationId (string): Organization ID - - productTypes (array): An optional parameter to filter device statuses by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect. - - networkIds (array): An optional parameter to filter device statuses by network. + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - networkIds (array): IDs of the networks for which to fetch valid syslog server roles; suggested maximum array size is 100 """ kwargs.update(locals()) metadata = { - "tags": ["organizations", "monitor", "devices", "statuses", "overview"], - "operation": "getOrganizationDevicesStatusesOverview", + "tags": ["organizations", "configure", "devices", "syslog", "servers", "roles", "byNetwork"], + "operation": "getOrganizationDevicesSyslogServersRolesByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/devices/statuses/overview" + resource = f"/organizations/{organizationId}/devices/syslog/servers/roles/byNetwork" query_params = [ - "productTypes", + "perPage", + "startingAfter", + "endingBefore", "networkIds", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "productTypes", "networkIds", ] for k, v in kwargs.items(): @@ -4185,10 +6554,10 @@ def getOrganizationDevicesStatusesOverview(self, organizationId: str, **kwargs): invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationDevicesStatusesOverview: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationDevicesSyslogServersRolesByNetwork: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get(metadata, resource, params) + return self._session.get_pages(metadata, resource, params, total_pages, direction) def getOrganizationDevicesSystemMemoryUsageHistoryByInterval( self, organizationId: str, total_pages=1, direction="next", **kwargs @@ -4408,22 +6777,285 @@ def createOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, shortN https://developer.cisco.com/meraki/api-v1/#!create-organization-early-access-features-opt-in - organizationId (string): Organization ID - - shortName (string): Short name of the early access feature - - limitScopeToNetworks (array): A list of network IDs to apply the opt-in to + - shortName (string): Short name of the early access feature + - limitScopeToNetworks (array): A list of network IDs to apply the opt-in to + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], + "operation": "createOrganizationEarlyAccessFeaturesOptIn", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/earlyAccess/features/optIns" + + body_params = [ + "shortName", + "limitScopeToNetworks", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationEarlyAccessFeaturesOptIn: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str): + """ + **Show an early access feature opt-in for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-early-access-features-opt-in + + - organizationId (string): Organization ID + - optInId (string): Opt in ID + """ + + metadata = { + "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], + "operation": "getOrganizationEarlyAccessFeaturesOptIn", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + optInId = urllib.parse.quote(str(optInId), safe="") + resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" + + return self._session.get(metadata, resource) + + def updateOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str, **kwargs): + """ + **Update an early access feature opt-in for an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-early-access-features-opt-in + + - organizationId (string): Organization ID + - optInId (string): Opt in ID + - limitScopeToNetworks (array): A list of network IDs to apply the opt-in to + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], + "operation": "updateOrganizationEarlyAccessFeaturesOptIn", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + optInId = urllib.parse.quote(str(optInId), safe="") + resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" + + body_params = [ + "limitScopeToNetworks", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationEarlyAccessFeaturesOptIn: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str): + """ + **Delete an early access feature opt-in** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-early-access-features-opt-in + + - organizationId (string): Organization ID + - optInId (string): Opt in ID + """ + + metadata = { + "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], + "operation": "deleteOrganizationEarlyAccessFeaturesOptIn", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + optInId = urllib.parse.quote(str(optInId), safe="") + resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" + + return self._session.delete(metadata, resource) + + def updateOrganizationExtensionsSdwanmanagerInterconnect( + self, organizationId: str, interconnectId: str, name: str, status: str, **kwargs + ): + """ + **Update name and status of an Interconnect** + https://developer.cisco.com/meraki/api-v1/#!update-organization-extensions-sdwanmanager-interconnect + + - organizationId (string): Organization ID + - interconnectId (string): Interconnect ID + - name (string): Interconnect name + - status (string): Interconnect status + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "extensions", "sdwanmanager", "interconnects"], + "operation": "updateOrganizationExtensionsSdwanmanagerInterconnect", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + interconnectId = urllib.parse.quote(str(interconnectId), safe="") + resource = f"/organizations/{organizationId}/extensions/sdwanmanager/interconnects/{interconnectId}" + + body_params = [ + "name", + "status", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationExtensionsSdwanmanagerInterconnect: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def getOrganizationExtensionsThousandEyesNetworks(self, organizationId: str): + """ + **List the ThousandEyes agent configurations under this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-extensions-thousand-eyes-networks + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "extensions", "thousandEyes", "networks"], + "operation": "getOrganizationExtensionsThousandEyesNetworks", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks" + + return self._session.get(metadata, resource) + + def createOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, enabled: bool, networkId: str, **kwargs): + """ + **Add a ThousandEyes agent for this network** + https://developer.cisco.com/meraki/api-v1/#!create-organization-extensions-thousand-eyes-network + + - organizationId (string): Organization ID + - enabled (boolean): Whether or not the ThousandEyes agent is enabled for the network. + - networkId (string): Network that will have the ThousandEyes agent installed on. + - tests (array): An array of tests to be created + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "extensions", "thousandEyes", "networks"], + "operation": "createOrganizationExtensionsThousandEyesNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks" + + body_params = [ + "enabled", + "networkId", + "tests", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationExtensionsThousandEyesNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationExtensionsThousandEyesNetworksSupported( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List all the networks eligible for ThousandEyes agent activation under this organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-extensions-thousand-eyes-networks-supported + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - agentInstalled (boolean): Set to true to get only networks with installed ThousandEyes agent; set to false to get networks without agents. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "extensions", "thousandEyes", "networks", "supported"], + "operation": "getOrganizationExtensionsThousandEyesNetworksSupported", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks/supported" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "agentInstalled", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationExtensionsThousandEyesNetworksSupported: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, networkId: str): + """ + **List the ThousandEyes agent configuration under this network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-extensions-thousand-eyes-network + + - organizationId (string): Organization ID + - networkId (string): Network ID + """ + + metadata = { + "tags": ["organizations", "configure", "extensions", "thousandEyes", "networks"], + "operation": "getOrganizationExtensionsThousandEyesNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks/{networkId}" + + return self._session.get(metadata, resource) + + def updateOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, networkId: str, enabled: bool, **kwargs): + """ + **Update a ThousandEyes agent from this network** + https://developer.cisco.com/meraki/api-v1/#!update-organization-extensions-thousand-eyes-network + + - organizationId (string): Organization ID + - networkId (string): Network ID + - enabled (boolean): Whether or not the ThousandEyes agent is enabled for the network. """ - kwargs.update(locals()) + kwargs = locals() metadata = { - "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], - "operation": "createOrganizationEarlyAccessFeaturesOptIn", + "tags": ["organizations", "configure", "extensions", "thousandEyes", "networks"], + "operation": "updateOrganizationExtensionsThousandEyesNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/earlyAccess/features/optIns" + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks/{networkId}" body_params = [ - "shortName", - "limitScopeToNetworks", + "enabled", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -4432,52 +7064,50 @@ def createOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, shortN invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"createOrganizationEarlyAccessFeaturesOptIn: ignoring unrecognized kwargs: {invalid}" + f"updateOrganizationExtensionsThousandEyesNetwork: ignoring unrecognized kwargs: {invalid}" ) - return self._session.post(metadata, resource, payload) + return self._session.put(metadata, resource, payload) - def getOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str): + def deleteOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, networkId: str): """ - **Show an early access feature opt-in for an organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-early-access-features-opt-in + **Delete a ThousandEyes agent from this network** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-extensions-thousand-eyes-network - organizationId (string): Organization ID - - optInId (string): Opt in ID + - networkId (string): Network ID """ metadata = { - "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], - "operation": "getOrganizationEarlyAccessFeaturesOptIn", + "tags": ["organizations", "configure", "extensions", "thousandEyes", "networks"], + "operation": "deleteOrganizationExtensionsThousandEyesNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - optInId = urllib.parse.quote(str(optInId), safe="") - resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks/{networkId}" - return self._session.get(metadata, resource) + return self._session.delete(metadata, resource) - def updateOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str, **kwargs): + def createOrganizationExtensionsThousandEyesTest(self, organizationId: str, **kwargs): """ - **Update an early access feature opt-in for an organization** - https://developer.cisco.com/meraki/api-v1/#!update-organization-early-access-features-opt-in + **Create a ThousandEyes test based on a provided test template** + https://developer.cisco.com/meraki/api-v1/#!create-organization-extensions-thousand-eyes-test - organizationId (string): Organization ID - - optInId (string): Opt in ID - - limitScopeToNetworks (array): A list of network IDs to apply the opt-in to + - tests (array): An array of tests to be created """ kwargs.update(locals()) metadata = { - "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], - "operation": "updateOrganizationEarlyAccessFeaturesOptIn", + "tags": ["organizations", "configure", "extensions", "thousandEyes", "tests"], + "operation": "createOrganizationExtensionsThousandEyesTest", } organizationId = urllib.parse.quote(str(organizationId), safe="") - optInId = urllib.parse.quote(str(optInId), safe="") - resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" + resource = f"/organizations/{organizationId}/extensions/thousandEyes/tests" body_params = [ - "limitScopeToNetworks", + "tests", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -4486,29 +7116,10 @@ def updateOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInI invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"updateOrganizationEarlyAccessFeaturesOptIn: ignoring unrecognized kwargs: {invalid}" + f"createOrganizationExtensionsThousandEyesTest: ignoring unrecognized kwargs: {invalid}" ) - return self._session.put(metadata, resource, payload) - - def deleteOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str): - """ - **Delete an early access feature opt-in** - https://developer.cisco.com/meraki/api-v1/#!delete-organization-early-access-features-opt-in - - - organizationId (string): Organization ID - - optInId (string): Opt in ID - """ - - metadata = { - "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], - "operation": "deleteOrganizationEarlyAccessFeaturesOptIn", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - optInId = urllib.parse.quote(str(optInId), safe="") - resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" - - return self._session.delete(metadata, resource) + return self._session.post(metadata, resource, payload) def getOrganizationFirmwareUpgrades(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ @@ -5567,40 +8178,287 @@ def getOrganizationNetworks(self, organizationId: str, total_pages=1, direction= all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationNetworks: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning(f"getOrganizationNetworks: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationNetwork(self, organizationId: str, name: str, productTypes: list, **kwargs): + """ + **Create a network** + https://developer.cisco.com/meraki/api-v1/#!create-organization-network + + - organizationId (string): Organization ID + - name (string): The name of the new network + - productTypes (array): The product type(s) of the new network. If more than one type is included, the network will be a combined network. + - tags (array): A list of tags to be applied to the network + - timeZone (string): The timezone of the network. For a list of allowed timezones, please see the 'TZ' column in the table in this article. + - copyFromNetworkId (string): The ID of the network to copy configuration from. Other provided parameters will override the copied configuration, except type which must match this network's type exactly. + - notes (string): Add any notes or additional information about this network here. + - details (array): An array of details + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "networks"], + "operation": "createOrganizationNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/networks" + + body_params = [ + "name", + "productTypes", + "tags", + "timeZone", + "copyFromNetworkId", + "notes", + "details", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationNetwork: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def combineOrganizationNetworks(self, organizationId: str, name: str, networkIds: list, **kwargs): + """ + **Combine multiple networks into a single network** + https://developer.cisco.com/meraki/api-v1/#!combine-organization-networks + + - organizationId (string): Organization ID + - name (string): The name of the combined network + - networkIds (array): A list of the network IDs that will be combined. If an ID of a combined network is included in this list, the other networks in the list will be grouped into that network + - enrollmentString (string): A unique identifier which can be used for device enrollment or easy access through the Meraki SM Registration page or the Self Service Portal. Please note that changing this field may cause existing bookmarks to break. All networks that are part of this combined network will have their enrollment string appended by '-network_type'. If left empty, all exisitng enrollment strings will be deleted. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "networks"], + "operation": "combineOrganizationNetworks", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/networks/combine" + + body_params = [ + "name", + "networkIds", + "enrollmentString", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"combineOrganizationNetworks: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationNetworksGroups(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the network groups in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-networks-groups + + - 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 + - groupIds (array): Optional parameter to filter network groups by ID + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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": ["organizations", "configure", "networks", "groups"], + "operation": "getOrganizationNetworksGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/networks/groups" + + query_params = [ + "groupIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "groupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationNetworksGroups: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationNetworksGroup(self, organizationId: str, name: str, **kwargs): + """ + **Create a network group** + https://developer.cisco.com/meraki/api-v1/#!create-organization-networks-group + + - organizationId (string): Organization ID + - name (string): The name of the network group + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "networks", "groups"], + "operation": "createOrganizationNetworksGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/networks/groups" + + body_params = [ + "name", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationNetworksGroup: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationNetworksGroupsOverviewByGroup(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the client and status overview information for the network groups in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-networks-groups-overview-by-group + + - 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 + - sortBy (string): Field by which to sort the results + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5000. + - 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()) + + if "sortBy" in kwargs: + options = ["status"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "monitor", "networks", "groups", "overview", "byGroup"], + "operation": "getOrganizationNetworksGroupsOverviewByGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/networks/groups/overview/byGroup" + + query_params = [ + "sortBy", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationNetworksGroupsOverviewByGroup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def updateOrganizationNetworksGroup(self, organizationId: str, groupId: str, name: str, **kwargs): + """ + **Update a network group** + https://developer.cisco.com/meraki/api-v1/#!update-organization-networks-group + + - organizationId (string): Organization ID + - groupId (string): Group ID + - name (string): The new name of the network group + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "networks", "groups"], + "operation": "updateOrganizationNetworksGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") + resource = f"/organizations/{organizationId}/networks/groups/{groupId}" + + body_params = [ + "name", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationNetworksGroup: ignoring unrecognized kwargs: {invalid}") - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.put(metadata, resource, payload) - def createOrganizationNetwork(self, organizationId: str, name: str, productTypes: list, **kwargs): + def deleteOrganizationNetworksGroup(self, organizationId: str, groupId: str): """ - **Create a network** - https://developer.cisco.com/meraki/api-v1/#!create-organization-network + **Delete a network group** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-networks-group - organizationId (string): Organization ID - - name (string): The name of the new network - - productTypes (array): The product type(s) of the new network. If more than one type is included, the network will be a combined network. - - tags (array): A list of tags to be applied to the network - - timeZone (string): The timezone of the network. For a list of allowed timezones, please see the 'TZ' column in the table in this article. - - copyFromNetworkId (string): The ID of the network to copy configuration from. Other provided parameters will override the copied configuration, except type which must match this network's type exactly. - - notes (string): Add any notes or additional information about this network here. + - groupId (string): Group ID """ - kwargs.update(locals()) + metadata = { + "tags": ["organizations", "configure", "networks", "groups"], + "operation": "deleteOrganizationNetworksGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") + resource = f"/organizations/{organizationId}/networks/groups/{groupId}" + + return self._session.delete(metadata, resource) + + def bulkOrganizationNetworksGroupAssign(self, organizationId: str, groupId: str, networkIds: list, **kwargs): + """ + **Add networks to a network group** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-networks-group-assign + + - organizationId (string): Organization ID + - groupId (string): Group ID + - networkIds (array): A list of network IDs to add to the network group + """ + + kwargs = locals() metadata = { - "tags": ["organizations", "configure", "networks"], - "operation": "createOrganizationNetwork", + "tags": ["organizations", "configure", "networks", "groups"], + "operation": "bulkOrganizationNetworksGroupAssign", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/networks" + groupId = urllib.parse.quote(str(groupId), safe="") + resource = f"/organizations/{organizationId}/networks/groups/{groupId}/bulkAssign" body_params = [ - "name", - "productTypes", - "tags", - "timeZone", - "copyFromNetworkId", - "notes", + "networkIds", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -5608,34 +8466,32 @@ def createOrganizationNetwork(self, organizationId: str, name: str, productTypes all_params = [] + body_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"createOrganizationNetwork: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning(f"bulkOrganizationNetworksGroupAssign: ignoring unrecognized kwargs: {invalid}") return self._session.post(metadata, resource, payload) - def combineOrganizationNetworks(self, organizationId: str, name: str, networkIds: list, **kwargs): + def bulkOrganizationNetworksGroupUnassign(self, organizationId: str, groupId: str, networkIds: list, **kwargs): """ - **Combine multiple networks into a single network** - https://developer.cisco.com/meraki/api-v1/#!combine-organization-networks + **Remove networks from a network group** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-networks-group-unassign - organizationId (string): Organization ID - - name (string): The name of the combined network - - networkIds (array): A list of the network IDs that will be combined. If an ID of a combined network is included in this list, the other networks in the list will be grouped into that network - - enrollmentString (string): A unique identifier which can be used for device enrollment or easy access through the Meraki SM Registration page or the Self Service Portal. Please note that changing this field may cause existing bookmarks to break. All networks that are part of this combined network will have their enrollment string appended by '-network_type'. If left empty, all exisitng enrollment strings will be deleted. + - groupId (string): Group ID + - networkIds (array): A list of network IDs to remove from the network group """ - kwargs.update(locals()) + kwargs = locals() metadata = { - "tags": ["organizations", "configure", "networks"], - "operation": "combineOrganizationNetworks", + "tags": ["organizations", "configure", "networks", "groups"], + "operation": "bulkOrganizationNetworksGroupUnassign", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/networks/combine" + groupId = urllib.parse.quote(str(groupId), safe="") + resource = f"/organizations/{organizationId}/networks/groups/{groupId}/bulkUnassign" body_params = [ - "name", "networkIds", - "enrollmentString", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -5643,7 +8499,9 @@ def combineOrganizationNetworks(self, organizationId: str, name: str, networkIds all_params = [] + body_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"combineOrganizationNetworks: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"bulkOrganizationNetworksGroupUnassign: ignoring unrecognized kwargs: {invalid}" + ) return self._session.post(metadata, resource, payload) @@ -6906,6 +9764,140 @@ def deleteOrganizationPolicyObject(self, organizationId: str, policyObjectId: st return self._session.delete(metadata, resource) + def getOrganizationRoutingVrfs(self, organizationId: str, **kwargs): + """ + **List existing organization-wide VRFs (Virtual Routing and Forwarding).** + https://developer.cisco.com/meraki/api-v1/#!get-organization-routing-vrfs + + - organizationId (string): Organization ID + - vrfIds (array): IDs of the desired VRFs. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "routing", "vrfs"], + "operation": "getOrganizationRoutingVrfs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/routing/vrfs" + + query_params = [ + "vrfIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "vrfIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationRoutingVrfs: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def createOrganizationRoutingVrf(self, organizationId: str, name: str, **kwargs): + """ + **Add an organization-wide VRF (Virtual Routing and Forwarding)** + https://developer.cisco.com/meraki/api-v1/#!create-organization-routing-vrf + + - organizationId (string): Organization ID + - name (string): The name of the VRF (Virtual Routing and Forwarding) + - description (string): Description of the VRF (Virtual Routing and Forwarding) + - routeDistinguisher (string): RD (Route Distinguisher) for the VRF (Virtual Routing and Forwarding) + - routeTarget (string): Route target are used to control the import and export of routes between VRFs + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "routing", "vrfs"], + "operation": "createOrganizationRoutingVrf", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/routing/vrfs" + + body_params = [ + "name", + "description", + "routeDistinguisher", + "routeTarget", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationRoutingVrf: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateOrganizationRoutingVrf(self, organizationId: str, vrfId: str, **kwargs): + """ + **Update an organization-wide VRF (Virtual Routing and Forwarding)** + https://developer.cisco.com/meraki/api-v1/#!update-organization-routing-vrf + + - organizationId (string): Organization ID + - vrfId (string): Vrf ID + - name (string): The name of the VRF (Virtual Routing and Forwarding) + - description (string): Description of the VRF (Virtual Routing and Forwarding) + - routeDistinguisher (string): RD (Route Distinguisher) for the VRF (Virtual Routing and Forwarding) + - routeTarget (string): Route target are used to control the import and export of routes between VRFs + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "routing", "vrfs"], + "operation": "updateOrganizationRoutingVrf", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + vrfId = urllib.parse.quote(str(vrfId), safe="") + resource = f"/organizations/{organizationId}/routing/vrfs/{vrfId}" + + body_params = [ + "name", + "description", + "routeDistinguisher", + "routeTarget", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationRoutingVrf: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationRoutingVrf(self, organizationId: str, vrfId: str): + """ + **Delete a VRF (Virtual Routing and Forwarding) from a organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-routing-vrf + + - organizationId (string): Organization ID + - vrfId (string): Vrf ID + """ + + metadata = { + "tags": ["organizations", "configure", "routing", "vrfs"], + "operation": "deleteOrganizationRoutingVrf", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + vrfId = urllib.parse.quote(str(vrfId), safe="") + resource = f"/organizations/{organizationId}/routing/vrfs/{vrfId}" + + return self._session.delete(metadata, resource) + def getOrganizationSaml(self, organizationId: str): """ **Returns the SAML SSO enabled settings for an organization.** @@ -7214,6 +10206,72 @@ def deleteOrganizationSamlRole(self, organizationId: str, samlRoleId: str): return self._session.delete(metadata, resource) + def getOrganizationSaseBatch(self, organizationId: str, batchId: str): + """ + **Retrieves a batch summary with aggregated job status counts** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sase-batch + + - organizationId (string): Organization ID + - batchId (string): Batch ID + """ + + metadata = { + "tags": ["organizations", "configure", "sase", "batches"], + "operation": "getOrganizationSaseBatch", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + batchId = urllib.parse.quote(str(batchId), safe="") + resource = f"/organizations/{organizationId}/sase/batches/{batchId}" + + return self._session.get(metadata, resource) + + def getOrganizationSaseBatchJobs(self, organizationId: str, batchId: str, total_pages=1, direction="next", **kwargs): + """ + **List jobs within a batch, with optional status filtering** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sase-batch-jobs + + - organizationId (string): Organization ID + - batchId (string): Batch 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - status (string): If provided, filters jobs by status + """ + + kwargs.update(locals()) + + if "status" in kwargs: + options = ["complete", "deferred", "failed", "new", "ready", "running", "scheduled"] + assert kwargs["status"] in options, ( + f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "sase", "batches", "jobs"], + "operation": "getOrganizationSaseBatchJobs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + batchId = urllib.parse.quote(str(batchId), safe="") + resource = f"/organizations/{organizationId}/sase/batches/{batchId}/jobs" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "status", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSaseBatchJobs: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationSaseConnectors(self, organizationId: str): """ **List SSE Connectors for an organization** @@ -7552,6 +10610,39 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): return self._session.delete(metadata, resource) + def enrollOrganizationSaseSites(self, organizationId: str, **kwargs): + """ + **Enroll sites in this organization to Secure Access** + https://developer.cisco.com/meraki/api-v1/#!enroll-organization-sase-sites + + - organizationId (string): Organization ID + - items (array): List of Meraki SD-WAN sites with the associated regions to be enrolled. + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "sase", "sites"], + "operation": "enrollOrganizationSaseSites", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sase/sites/enroll" + + body_params = [ + "items", + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"enrollOrganizationSaseSites: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + def updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs): """ **Update the configuration for a site** @@ -7582,9 +10673,59 @@ def updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs) all_params = [] + body_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"updateOrganizationSaseSite: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning(f"updateOrganizationSaseSite: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getOrganizationSitesBuildings(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the buildings belonging to the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sites-buildings + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter buildings by one or more network IDs + - buildingIds (array): Optional parameter to filter buildings by one or more building IDs + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "sites", "buildings"], + "operation": "getOrganizationSitesBuildings", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sites/buildings" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "buildingIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "buildingIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSitesBuildings: ignoring unrecognized kwargs: {invalid}") - return self._session.put(metadata, resource, payload) + return self._session.get_pages(metadata, resource, params, total_pages, direction) def getOrganizationSnmp(self, organizationId: str): """ @@ -7657,6 +10798,45 @@ def updateOrganizationSnmp(self, organizationId: str, **kwargs): return self._session.put(metadata, resource, payload) + def getOrganizationSnmpTrapsByNetwork(self, organizationId: str, **kwargs): + """ + **Retrieve the SNMP trap configuration for the networks in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-snmp-traps-by-network + + - organizationId (string): Organization ID + - networkIds (array): An optional parameter to filter SNMP trap configs by network IDs + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "snmp", "traps", "byNetwork"], + "operation": "getOrganizationSnmpTrapsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/snmp/traps/byNetwork" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSnmpTrapsByNetwork: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + def getOrganizationSplashAsset(self, organizationId: str, id: str): """ **Get a Splash Theme Asset** @@ -7807,6 +10987,7 @@ def getOrganizationSummaryTopAppliancesByUtilization(self, organizationId: str, - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -7827,6 +11008,7 @@ def getOrganizationSummaryTopAppliancesByUtilization(self, organizationId: str, query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -7952,6 +11134,7 @@ def getOrganizationSummaryTopClientsByUsage(self, organizationId: str, **kwargs) - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -7972,6 +11155,7 @@ def getOrganizationSummaryTopClientsByUsage(self, organizationId: str, **kwargs) query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -7999,6 +11183,7 @@ def getOrganizationSummaryTopClientsManufacturersByUsage(self, organizationId: s - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -8019,6 +11204,7 @@ def getOrganizationSummaryTopClientsManufacturersByUsage(self, organizationId: s query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -8046,6 +11232,7 @@ def getOrganizationSummaryTopDevicesByUsage(self, organizationId: str, **kwargs) - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -8066,6 +11253,7 @@ def getOrganizationSummaryTopDevicesByUsage(self, organizationId: str, **kwargs) query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -8093,6 +11281,7 @@ def getOrganizationSummaryTopDevicesModelsByUsage(self, organizationId: str, **k - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -8113,6 +11302,7 @@ def getOrganizationSummaryTopDevicesModelsByUsage(self, organizationId: str, **k query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -8142,6 +11332,7 @@ def getOrganizationSummaryTopNetworksByStatus(self, organizationId: str, total_p - direction (string): direction to paginate, either "next" (default) or "prev" page - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -8162,6 +11353,7 @@ def getOrganizationSummaryTopNetworksByStatus(self, organizationId: str, total_p query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -8189,6 +11381,7 @@ def getOrganizationSummaryTopSsidsByUsage(self, organizationId: str, **kwargs): - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -8209,6 +11402,7 @@ def getOrganizationSummaryTopSsidsByUsage(self, organizationId: str, **kwargs): query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -8236,6 +11430,7 @@ def getOrganizationSummaryTopSwitchesByEnergyUsage(self, organizationId: str, ** - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -8256,6 +11451,7 @@ def getOrganizationSummaryTopSwitchesByEnergyUsage(self, organizationId: str, ** query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -8384,6 +11580,137 @@ def getOrganizationWebhooksCallbacksStatus(self, organizationId: str, callbackId return self._session.get(metadata, resource) + def getOrganizationWebhooksHttpServers(self, organizationId: str): + """ + **List the HTTP servers for this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-webhooks-http-servers + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "httpServers"], + "operation": "getOrganizationWebhooksHttpServers", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/webhooks/httpServers" + + return self._session.get(metadata, resource) + + def createOrganizationWebhooksHttpServer(self, organizationId: str, name: str, url: str, **kwargs): + """ + **Add an HTTP server to an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-webhooks-http-server + + - organizationId (string): Organization ID + - name (string): A name for easy reference to the HTTP server + - url (string): The URL of the HTTP server + - sharedSecret (string): A shared secret that will be included in POSTs sent to the HTTP server. This secret can be used to verify that the request was sent by Meraki. + - payloadTemplate (object): The payload template to use when posting data to the HTTP server. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "webhooks", "httpServers"], + "operation": "createOrganizationWebhooksHttpServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/webhooks/httpServers" + + body_params = [ + "name", + "url", + "sharedSecret", + "payloadTemplate", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationWebhooksHttpServer: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationWebhooksHttpServer(self, organizationId: str, id: str): + """ + **Return an HTTP server for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-webhooks-http-server + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "httpServers"], + "operation": "getOrganizationWebhooksHttpServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/webhooks/httpServers/{id}" + + return self._session.get(metadata, resource) + + def updateOrganizationWebhooksHttpServer(self, organizationId: str, id: str, **kwargs): + """ + **Update an HTTP server for an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-webhooks-http-server + + - organizationId (string): Organization ID + - id (string): ID + - name (string): A name for easy reference to the HTTP server + - url (string): The URL of the HTTP server + - sharedSecret (string): A shared secret that will be included in POSTs sent to the HTTP server. This secret can be used to verify that the request was sent by Meraki. + - payloadTemplate (object): The payload template to use when posting data to the HTTP server. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "webhooks", "httpServers"], + "operation": "updateOrganizationWebhooksHttpServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/webhooks/httpServers/{id}" + + body_params = [ + "name", + "url", + "sharedSecret", + "payloadTemplate", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationWebhooksHttpServer: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationWebhooksHttpServer(self, organizationId: str, id: str): + """ + **Delete an HTTP server from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-webhooks-http-server + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "httpServers"], + "operation": "deleteOrganizationWebhooksHttpServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/webhooks/httpServers/{id}" + + return self._session.delete(metadata, resource) + def getOrganizationWebhooksLogs(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **Return the log of webhook POSTs sent** @@ -8428,3 +11755,206 @@ def getOrganizationWebhooksLogs(self, organizationId: str, total_pages=1, direct self._session._logger.warning(f"getOrganizationWebhooksLogs: ignoring unrecognized kwargs: {invalid}") return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWebhooksPayloadTemplates(self, organizationId: str): + """ + **List the webhook payload templates for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-webhooks-payload-templates + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "payloadTemplates"], + "operation": "getOrganizationWebhooksPayloadTemplates", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates" + + return self._session.get(metadata, resource) + + def createOrganizationWebhooksPayloadTemplate(self, organizationId: str, name: str, **kwargs): + """ + **Create a webhook payload template for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-webhooks-payload-template + + - organizationId (string): Organization ID + - name (string): The name of the new template + - body (string): The liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. + - headers (array): The liquid template used with the webhook headers. + - bodyFile (string): A file containing liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. + - headersFile (string): A file containing the liquid template used with the webhook headers. + - sharing (object): Information on which entities have access to the template + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "webhooks", "payloadTemplates"], + "operation": "createOrganizationWebhooksPayloadTemplate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates" + + body_params = [ + "name", + "body", + "headers", + "bodyFile", + "headersFile", + "sharing", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationWebhooksPayloadTemplate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationWebhooksPayloadTemplate(self, organizationId: str, payloadTemplateId: str): + """ + **Get the webhook payload template for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-webhooks-payload-template + + - organizationId (string): Organization ID + - payloadTemplateId (string): Payload template ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "payloadTemplates"], + "operation": "getOrganizationWebhooksPayloadTemplate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + payloadTemplateId = urllib.parse.quote(str(payloadTemplateId), safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates/{payloadTemplateId}" + + return self._session.get(metadata, resource) + + def deleteOrganizationWebhooksPayloadTemplate(self, organizationId: str, payloadTemplateId: str): + """ + **Destroy a webhook payload template for an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-webhooks-payload-template + + - organizationId (string): Organization ID + - payloadTemplateId (string): Payload template ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "payloadTemplates"], + "operation": "deleteOrganizationWebhooksPayloadTemplate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + payloadTemplateId = urllib.parse.quote(str(payloadTemplateId), safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates/{payloadTemplateId}" + + return self._session.delete(metadata, resource) + + def updateOrganizationWebhooksPayloadTemplate(self, organizationId: str, payloadTemplateId: str, **kwargs): + """ + **Update a webhook payload template for an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-webhooks-payload-template + + - organizationId (string): Organization ID + - payloadTemplateId (string): Payload template ID + - name (string): The name of the template + - body (string): The liquid template used for the body of the webhook message. + - headers (array): The liquid template used with the webhook headers. + - bodyFile (string): A file containing liquid template used for the body of the webhook message. + - headersFile (string): A file containing the liquid template used with the webhook headers. + - sharing (object): Information on which entities have access to the template + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "webhooks", "payloadTemplates"], + "operation": "updateOrganizationWebhooksPayloadTemplate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + payloadTemplateId = urllib.parse.quote(str(payloadTemplateId), safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates/{payloadTemplateId}" + + body_params = [ + "name", + "body", + "headers", + "bodyFile", + "headersFile", + "sharing", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationWebhooksPayloadTemplate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def createOrganizationWebhooksWebhookTest(self, organizationId: str, url: str, **kwargs): + """ + **Send a test webhook for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-webhooks-webhook-test + + - organizationId (string): Organization ID + - url (string): The URL where the test webhook will be sent + - sharedSecret (string): The shared secret the test webhook will send. Optional. Defaults to HTTP server's shared secret. Otherwise, defaults to an empty string. + - payloadTemplateId (string): The ID of the payload template of the test webhook. Defaults to the HTTP server's template ID if one exists for the given URL, or Generic template ID otherwise + - payloadTemplateName (string): The name of the payload template. + - alertTypeId (string): The type of alert which the test webhook will send. Optional. Defaults to insight_app_outage_start. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "webhooks", "webhookTests"], + "operation": "createOrganizationWebhooksWebhookTest", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/webhooks/webhookTests" + + body_params = [ + "url", + "sharedSecret", + "payloadTemplateId", + "payloadTemplateName", + "alertTypeId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationWebhooksWebhookTest: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationWebhooksWebhookTest(self, organizationId: str, webhookTestId: str): + """ + **Return the status of a webhook test for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-webhooks-webhook-test + + - organizationId (string): Organization ID + - webhookTestId (string): Webhook test ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "webhookTests"], + "operation": "getOrganizationWebhooksWebhookTest", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + webhookTestId = urllib.parse.quote(str(webhookTestId), safe="") + resource = f"/organizations/{organizationId}/webhooks/webhookTests/{webhookTestId}" + + return self._session.get(metadata, resource) diff --git a/meraki/aio/api/secureConnect.py b/meraki/aio/api/secureConnect.py new file mode 100644 index 00000000..dfec273c --- /dev/null +++ b/meraki/aio/api/secureConnect.py @@ -0,0 +1,1082 @@ +import urllib + + +class AsyncSecureConnect: + def __init__(self, session): + super().__init__() + self._session = session + + def getOrganizationSecureConnectPrivateApplicationGroups( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Provides a list of private application groups for an Organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-private-application-groups + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - nameIncludes (string): Optional parameter to search the application group list by group name, case is ignored + - applicationGroupIds (array): List of application group ids attached to fetch + - sortBy (string): Optional parameter to specify the field used to sort objects. + - sortOrder (string): Optional parameter to specify the sort order. Default value is asc. + """ + + kwargs.update(locals()) + + if "sortBy" in kwargs: + options = ["applicationGroupId", "modifiedAt", "name"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplicationGroups"], + "operation": "getOrganizationSecureConnectPrivateApplicationGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplicationGroups" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "nameIncludes", + "applicationGroupIds", + "sortBy", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "applicationGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectPrivateApplicationGroups: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSecureConnectPrivateApplicationGroup(self, organizationId: str, name: str, **kwargs): + """ + **Creates a group of private applications to apply to policy** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-private-application-group + + - organizationId (string): Organization ID + - name (string): Application Group Name. This is required and cannot have any special characters other than spaces and hyphens + - description (string): Optional short description for application group + - applicationIds (array): List of application ids attached to this Private Application Group + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplicationGroups"], + "operation": "createOrganizationSecureConnectPrivateApplicationGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplicationGroups" + + body_params = [ + "name", + "description", + "applicationIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSecureConnectPrivateApplicationGroup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationSecureConnectPrivateApplicationGroup(self, organizationId: str, id: str, name: str, **kwargs): + """ + **Update an application group in an Organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-secure-connect-private-application-group + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Application Group Name. This is required and cannot have any special characters other than spaces and hyphens + - description (string): Optional short description for application group + - applicationIds (array): List of application ids attached to this Private Application Group + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplicationGroups"], + "operation": "updateOrganizationSecureConnectPrivateApplicationGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplicationGroups/{id}" + + body_params = [ + "name", + "description", + "applicationIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSecureConnectPrivateApplicationGroup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSecureConnectPrivateApplicationGroup(self, organizationId: str, id: str, **kwargs): + """ + **Deletes private application group from an Organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-private-application-group + + - organizationId (string): Organization ID + - id (string): ID + - force (boolean): Boolean flag to force delete application group, even if application group is in use by one or more rules. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplicationGroups"], + "operation": "deleteOrganizationSecureConnectPrivateApplicationGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplicationGroups/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSecureConnectPrivateApplicationGroup(self, organizationId: str, id: str): + """ + **Return the details of a specific private application group** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-private-application-group + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["secureConnect", "configure", "privateApplicationGroups"], + "operation": "getOrganizationSecureConnectPrivateApplicationGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplicationGroups/{id}" + + return self._session.get(metadata, resource) + + def getOrganizationSecureConnectPrivateApplications(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Provides a list of private applications for an Organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-private-applications + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - nameIncludes (string): Optional parameter to filter the private applications list by application and associated application group names, case is ignored + - applicationGroupIds (array): Optional parameter for filtering the list of private applications belonging to the application group identified by the given IDs. + - appTypes (array): Optional parameter for filtering the list of private applications by applications that contain at least one destination with the specified accessType value. + - sortBy (string): Optional parameter to specify the field used to sort objects. + - sortOrder (string): Optional parameter to specify the sort order. Default value is asc. + """ + + kwargs.update(locals()) + + if "sortBy" in kwargs: + options = ["modifiedAt", "name"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplications"], + "operation": "getOrganizationSecureConnectPrivateApplications", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplications" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "nameIncludes", + "applicationGroupIds", + "appTypes", + "sortBy", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "applicationGroupIds", + "appTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectPrivateApplications: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSecureConnectPrivateApplication(self, organizationId: str, name: str, destinations: list, **kwargs): + """ + **Adds a new private application to the Organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-private-application + + - organizationId (string): Organization ID + - name (string): Name of Application. This is required and should be unique across all applications for a given organization. Name cannot have any special characters other than spaces and hyphens. + - destinations (array): List of IP address destinations. + - description (string): Optional Text description for Application + - appProtocol (string): Protocol for communication between proxy to private application. Applicable for Browser Based Access only. + - sni (string): Optional SNI. Applicable for Browser Based Access only. SNI should be a valid domain. + - externalFQDN (string): Cisco or Customer Managed URL for Application. Applicable for Browser Based Access only. This field is system generated based on the application name and organization ID and overrides user input in payload. This value must be unique across all applications for a given organization. + - sslVerificationEnabled (boolean): Enable Upstream SSL verification for the internally hosted URL by the customer. Applicable for Browser Based Access only. Default is true. + - applicationGroupIds (array): List of application group ids attached to this Private Application + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplications"], + "operation": "createOrganizationSecureConnectPrivateApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplications" + + body_params = [ + "name", + "description", + "destinations", + "appProtocol", + "sni", + "externalFQDN", + "sslVerificationEnabled", + "applicationGroupIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSecureConnectPrivateApplication: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationSecureConnectPrivateApplication( + self, organizationId: str, id: str, name: str, destinations: list, **kwargs + ): + """ + **Updates a specific private application** + https://developer.cisco.com/meraki/api-v1/#!update-organization-secure-connect-private-application + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of Application. This is required and should be unique across all applications for a given organization. Name cannot have any special characters other than spaces and hyphens. + - destinations (array): List of IP address destinations. + - description (string): Optional Text description for Application + - appProtocol (string): Protocol for communication between proxy to private application. Applicable for Browser Based Access only. + - sni (string): Optional SNI. Applicable for Browser Based Access only. SNI should be a valid domain. + - externalFQDN (string): Cisco or Customer Managed URL for Application. Applicable for Browser Based Access only. This field is system generated based on the application name and organization ID and overrides user input in payload. This value must be unique across all applications for a given organization. + - sslVerificationEnabled (boolean): Enable Upstream SSL verification for the internally hosted URL by the customer. Applicable for Browser Based Access only. Default is true. + - applicationGroupIds (array): List of application group ids attached to this Private Application + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplications"], + "operation": "updateOrganizationSecureConnectPrivateApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplications/{id}" + + body_params = [ + "name", + "description", + "destinations", + "appProtocol", + "sni", + "externalFQDN", + "sslVerificationEnabled", + "applicationGroupIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSecureConnectPrivateApplication: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSecureConnectPrivateApplication(self, organizationId: str, id: str, **kwargs): + """ + **Deletes a specific private application** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-private-application + + - organizationId (string): Organization ID + - id (string): ID + - force (boolean): Boolean flag to force delete application, even if application is in use by one or more rules. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplications"], + "operation": "deleteOrganizationSecureConnectPrivateApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplications/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSecureConnectPrivateApplication(self, organizationId: str, id: str): + """ + **Return the details of a specific private application** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-private-application + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["secureConnect", "configure", "privateApplications"], + "operation": "getOrganizationSecureConnectPrivateApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplications/{id}" + + return self._session.get(metadata, resource) + + def getOrganizationSecureConnectPrivateResourceGroups(self, organizationId: str): + """ + **Provides a list of the private resource groups in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-private-resource-groups + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["secureConnect", "configure", "privateResourceGroups"], + "operation": "getOrganizationSecureConnectPrivateResourceGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups" + + return self._session.get(metadata, resource) + + def createOrganizationSecureConnectPrivateResourceGroup(self, organizationId: str, name: str, **kwargs): + """ + **Adds a new private resource group to an organization.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-private-resource-group + + - organizationId (string): Organization ID + - name (string): Name of group. This is required and should be unique across all groups for a given organization. Name cannot have any special characters other than spaces and hyphens. + - description (string): Optional text description for a group. + - resourceIds (array): List of resource ids assigned to this group. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateResourceGroups"], + "operation": "createOrganizationSecureConnectPrivateResourceGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups" + + body_params = [ + "name", + "description", + "resourceIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSecureConnectPrivateResourceGroup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationSecureConnectPrivateResourceGroup(self, organizationId: str, id: str, name: str, **kwargs): + """ + **Updates a specific private resource group.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-secure-connect-private-resource-group + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of group. This is required and should be unique across all groups for a given organization. Name cannot have any special characters other than spaces and hyphens. + - description (string): Optional text description for a group. + - resourceIds (array): List of resource ids assigned to this group. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateResourceGroups"], + "operation": "updateOrganizationSecureConnectPrivateResourceGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups/{id}" + + body_params = [ + "name", + "description", + "resourceIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSecureConnectPrivateResourceGroup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSecureConnectPrivateResourceGroup(self, organizationId: str, id: str): + """ + **Deletes a specific private resource group.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-private-resource-group + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["secureConnect", "configure", "privateResourceGroups"], + "operation": "deleteOrganizationSecureConnectPrivateResourceGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSecureConnectPrivateResources(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Provides a list of private resources for an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-private-resources + + - 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 + - perPage (string): Number of resources to return for a paginated response. + - startingAfter (string): The name of the resource to start after for a paginated response. Use '' for the first page. + - endingBefore (string): The name of the resource to end before for a paginated response. Use '' for the final page. + - sortBy (string): Parameter to specify the field used to sort objects, by default, resources are returned by name asc. + - sortOrder (string): Parameter to specify the direction used to sort objects, by default, resources are returned by name asc. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateResources"], + "operation": "getOrganizationSecureConnectPrivateResources", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResources" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "sortBy", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectPrivateResources: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSecureConnectPrivateResource( + self, organizationId: str, name: str, accessTypes: list, resourceAddresses: list, **kwargs + ): + """ + **Adds a new private resource to the organization.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-private-resource + + - organizationId (string): Organization ID + - name (string): Name of resource. This is required and should be unique across all resources for a given organization. Name cannot have any special characters other than spaces and hyphens. + - accessTypes (array): List of access types. + - resourceAddresses (array): List of resource addresses Protocols must be unique in this list. + - description (string): Optional text description for a resource. + - resourceGroupIds (array): List of resource group ids attached to this resource. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateResources"], + "operation": "createOrganizationSecureConnectPrivateResource", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResources" + + body_params = [ + "name", + "description", + "accessTypes", + "resourceAddresses", + "resourceGroupIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSecureConnectPrivateResource: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationSecureConnectPrivateResource( + self, organizationId: str, id: str, name: str, accessTypes: list, resourceAddresses: list, **kwargs + ): + """ + **Updates a specific private resource.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-secure-connect-private-resource + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of resource. This is required and should be unique across all resources for a given organization.Name cannot have any special characters other than spaces and hyphens. + - accessTypes (array): List of access types. + - resourceAddresses (array): List of resource addresses Protocols must be unique in this list. + - description (string): Optional text description for resource. + - resourceGroupIds (array): List of resource group ids attached to this resource. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateResources"], + "operation": "updateOrganizationSecureConnectPrivateResource", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResources/{id}" + + body_params = [ + "name", + "description", + "accessTypes", + "resourceAddresses", + "resourceGroupIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSecureConnectPrivateResource: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSecureConnectPrivateResource(self, organizationId: str, id: str): + """ + **Deletes a specific private resource** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-private-resource + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["secureConnect", "configure", "privateResources"], + "operation": "deleteOrganizationSecureConnectPrivateResource", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResources/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSecureConnectPublicApplications(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Provides a list of public applications for an Organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-public-applications + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - nameIncludes (string): Optional parameter to filter the public applications list by application name, case is ignored + - risks (array): List of risk levels to filter by + - categories (array): List of categories to filter by + - appTypes (array): List of app types to filter by + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. + - sortBy (string): Optional parameter to specify the field used to sort objects, by default, applications are returned by lastDetected desc + - sortOrder (string): Optional parameter to specify the sort order. Default value is desc. + """ + + kwargs.update(locals()) + + if "sortBy" in kwargs: + options = ["appType", "category", "lastDetected", "name", "risk"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "configure", "publicApplications"], + "operation": "getOrganizationSecureConnectPublicApplications", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/publicApplications" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "nameIncludes", + "risks", + "categories", + "appTypes", + "t0", + "t1", + "timespan", + "sortBy", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "risks", + "categories", + "appTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectPublicApplications: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSecureConnectRegions(self, organizationId: str, **kwargs): + """ + **List deployed cloud hubs and regions in this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-regions + + - organizationId (string): Organization ID + - regionType (string): Filter results by region type + """ + + kwargs.update(locals()) + + if "regionType" in kwargs: + options = ["CNHE", "CloudHub", "Region", "ThirdParty"] + assert kwargs["regionType"] in options, ( + f'''"regionType" cannot be "{kwargs["regionType"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "configure", "regions"], + "operation": "getOrganizationSecureConnectRegions", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/regions" + + query_params = [ + "regionType", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSecureConnectRegions: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def getOrganizationSecureConnectRemoteAccessLog(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the latest 5000 events logged by remote access.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-remote-access-log + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5000. 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. + - identityids (string): An identity ID or comma-delimited list of identity ID. + - identitytypes (string): An identity type or comma-delimited list of identity type. + - connectionevent (string): Specify the type of connection event. + - anyconnectversions (string): Specify a comma-separated list of AnyConnect Roaming Security module + versions to filter the data. + - osversions (string): Specify a comma-separated list of OS versions to filter the data. + """ + + kwargs.update(locals()) + + if "connectionevent" in kwargs: + options = ["connected", "disconnected", "failed"] + assert kwargs["connectionevent"] in options, ( + f'''"connectionevent" cannot be "{kwargs["connectionevent"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "monitor", "remoteAccessLog"], + "operation": "getOrganizationSecureConnectRemoteAccessLog", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/remoteAccessLog" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "identityids", + "identitytypes", + "connectionevent", + "anyconnectversions", + "osversions", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectRemoteAccessLog: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSecureConnectRemoteAccessLogsExports( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Provides a list of remote access logs exports for an Organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-remote-access-logs-exports + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - status (string): Filter exports by status. + """ + + kwargs.update(locals()) + + if "status" in kwargs: + options = ["complete", "continue", "error", "in_progress", "new", "zip"] + assert kwargs["status"] in options, ( + f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "configure", "remoteAccessLogsExports"], + "operation": "getOrganizationSecureConnectRemoteAccessLogsExports", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/remoteAccessLogsExports" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "status", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectRemoteAccessLogsExports: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSecureConnectRemoteAccessLogsExport(self, organizationId: str, from_: int, to: int, **kwargs): + """ + **Creates a export for a provided timestamp interval.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-remote-access-logs-export + + - organizationId (string): Organization ID + - from (integer): The start of the interval, must be within the past 30 days. + - to (integer): The end of the interval, must not exceed the current date. + """ + + kwargs = locals() + if "from_" in kwargs: + kwargs["from"] = kwargs.pop("from_") + + metadata = { + "tags": ["secureConnect", "configure", "remoteAccessLogsExports"], + "operation": "createOrganizationSecureConnectRemoteAccessLogsExport", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/remoteAccessLogsExports" + + body_params = [ + "from", + "to", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSecureConnectRemoteAccessLogsExport: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSecureConnectRemoteAccessLogsExportsDownload( + self, organizationId: str, id: str, fileType: str, **kwargs + ): + """ + **Redirects to the download link of the completed export.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-remote-access-logs-exports-download + + - organizationId (string): Organization ID + - id (string): Export ID. + - fileType (string): Export download file type. + """ + + kwargs = locals() + + metadata = { + "tags": ["secureConnect", "configure", "remoteAccessLogsExports", "download"], + "operation": "getOrganizationSecureConnectRemoteAccessLogsExportsDownload", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/remoteAccessLogsExports/download" + + query_params = [ + "id", + "fileType", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectRemoteAccessLogsExportsDownload: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationSecureConnectRemoteAccessLogsExport(self, organizationId: str, id: str): + """ + **Return the details of a specific remote access logs export** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-remote-access-logs-export + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["secureConnect", "configure", "remoteAccessLogsExports"], + "operation": "getOrganizationSecureConnectRemoteAccessLogsExport", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/remoteAccessLogsExports/{id}" + + return self._session.get(metadata, resource) + + def getOrganizationSecureConnectSites(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List sites in this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-sites + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - search (string): If provided, filters results by search string + - enrolledState (string): Filter results by sites that have already been enrolled or can be enrolled. Acceptable values are 'enrolled' or 'enrollable + """ + + kwargs.update(locals()) + + if "enrolledState" in kwargs: + options = ["enrollable", "enrolled"] + assert kwargs["enrolledState"] in options, ( + f'''"enrolledState" cannot be "{kwargs["enrolledState"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "configure", "sites"], + "operation": "getOrganizationSecureConnectSites", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/sites" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "search", + "enrolledState", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSecureConnectSites: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSecureConnectSite(self, organizationId: str, **kwargs): + """ + **Enroll sites in this organization to Secure Connect** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-site + + - organizationId (string): Organization ID + - enrollments (array): List of Meraki SD-WAN sites with the associated regions to be enrolled. + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "sites"], + "operation": "createOrganizationSecureConnectSite", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/sites" + + body_params = [ + "enrollments", + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationSecureConnectSite: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def deleteOrganizationSecureConnectSites(self, organizationId: str, **kwargs): + """ + **Detach given sites from Secure Connect** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-sites + + - organizationId (string): Organization ID + - sites (array): List of site IDs to detach + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "sites"], + "operation": "deleteOrganizationSecureConnectSites", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/sites" + + return self._session.delete(metadata, resource) diff --git a/meraki/aio/api/sensor.py b/meraki/aio/api/sensor.py index 115465f4..9e18e0da 100644 --- a/meraki/aio/api/sensor.py +++ b/meraki/aio/api/sensor.py @@ -74,9 +74,10 @@ def createDeviceSensorCommand(self, serial: str, operation: str, **kwargs): - serial (string): Serial - operation (string): Operation to run on the sensor. 'enableDownstreamPower', 'disableDownstreamPower', and 'cycleDownstreamPower' turn power on/off to the device that is connected downstream of an MT40 power monitor. 'refreshData' causes an MT15 or MT40 device to upload its latest readings so that they are immediately available in the Dashboard API. + - arguments (array): Additional options to provide to commands run on the sensor, each with a corresponding 'name' and 'value'. """ - kwargs = locals() + kwargs.update(locals()) if "operation" in kwargs: options = ["cycleDownstreamPower", "disableDownstreamPower", "enableDownstreamPower", "refreshData"] @@ -92,6 +93,7 @@ def createDeviceSensorCommand(self, serial: str, operation: str, **kwargs): resource = f"/devices/{serial}/sensor/commands" body_params = [ + "arguments", "operation", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -456,6 +458,103 @@ def getNetworkSensorRelationships(self, networkId: str): return self._session.get(metadata, resource) + def getNetworkSensorSchedules(self, networkId: str): + """ + **Returns a list of all sensor schedules.** + https://developer.cisco.com/meraki/api-v1/#!get-network-sensor-schedules + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["sensor", "configure", "schedules"], + "operation": "getNetworkSensorSchedules", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sensor/schedules" + + return self._session.get(metadata, resource) + + def getOrganizationSensorAlerts(self, organizationId: str, networkIds: list, total_pages=1, direction="next", **kwargs): + """ + **Return a list of sensor alert events** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sensor-alerts + + - organizationId (string): Organization ID + - networkIds (array): Filters alerts by network. For now, this must be a single network 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 365 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 365 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 365 days. The default is 365 days. + - sensorSerial (string): Filters alerts to those triggered by this sensor. + - triggerMetric (string): Filters alerts to those triggered by this metric. + """ + + kwargs.update(locals()) + + if "triggerMetric" in kwargs: + options = [ + "apparentPower", + "co2", + "current", + "door", + "frequency", + "humidity", + "indoorAirQuality", + "noise", + "pm25", + "powerFactor", + "realPower", + "temperature", + "tvoc", + "upstreamPower", + "voltage", + "water", + ] + assert kwargs["triggerMetric"] in options, ( + f'''"triggerMetric" cannot be "{kwargs["triggerMetric"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["sensor", "monitor", "alerts"], + "operation": "getOrganizationSensorAlerts", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sensor/alerts" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "sensorSerial", + "networkIds", + "triggerMetric", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSensorAlerts: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationSensorGatewaysConnectionsLatest(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **Returns latest sensor-gateway connectivity data.** @@ -564,6 +663,72 @@ def getOrganizationSensorReadingsHistory(self, organizationId: str, total_pages= return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationSensorReadingsHistoryByInterval(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return all reported readings from sensors in a given timespan, summarized as a series of intervals, sorted by interval start time in descending order** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sensor-readings-history-by-interval + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 730 days, 11 hours, 38 minutes, and 24 seconds from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 730 days, 11 hours, 38 minutes, and 24 seconds 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 730 days, 11 hours, 38 minutes, and 24 seconds. The default is 7 days. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 15, 120, 300, 900, 3600, 14400, 86400, 604800. The default is 86400. Interval is calculated if time params are provided. + - networkIds (array): Optional parameter to filter readings by network. + - serials (array): Optional parameter to filter readings by sensor. + - metrics (array): Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved. + - models (array): Optional parameter to filter readings by one or more models. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["sensor", "monitor", "readings", "history", "byInterval"], + "operation": "getOrganizationSensorReadingsHistoryByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sensor/readings/history/byInterval" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + "networkIds", + "serials", + "metrics", + "models", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "metrics", + "models", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSensorReadingsHistoryByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationSensorReadingsLatest(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **Return the latest available reading for each metric from each sensor, sorted by sensor serial** diff --git a/meraki/aio/api/sm.py b/meraki/aio/api/sm.py index 26075e3d..1ac166f1 100644 --- a/meraki/aio/api/sm.py +++ b/meraki/aio/api/sm.py @@ -1396,6 +1396,187 @@ def getOrganizationSmApnsCert(self, organizationId: str): return self._session.get(metadata, resource) + def createOrganizationSmAppleCloudEnrollmentSyncJob(self, organizationId: str, **kwargs): + """ + **Enqueue a sync job for an ADE account** + https://developer.cisco.com/meraki/api-v1/#!create-organization-sm-apple-cloud-enrollment-sync-job + + - organizationId (string): Organization ID + - adeAccountId (string): ADE Account ID + - fullSync (boolean): Whether or not job is full sync (defaults to full sync) + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["sm", "configure", "apple", "cloudEnrollment", "syncJobs"], + "operation": "createOrganizationSmAppleCloudEnrollmentSyncJob", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sm/apple/cloudEnrollment/syncJobs" + + body_params = [ + "adeAccountId", + "fullSync", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSmAppleCloudEnrollmentSyncJob: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSmAppleCloudEnrollmentSyncJob(self, organizationId: str, syncJobId: str): + """ + **Retrieve the status of an ADE sync job** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sm-apple-cloud-enrollment-sync-job + + - organizationId (string): Organization ID + - syncJobId (string): Sync job ID + """ + + metadata = { + "tags": ["sm", "configure", "apple", "cloudEnrollment", "syncJobs"], + "operation": "getOrganizationSmAppleCloudEnrollmentSyncJob", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + syncJobId = urllib.parse.quote(str(syncJobId), safe="") + resource = f"/organizations/{organizationId}/sm/apple/cloudEnrollment/syncJobs/{syncJobId}" + + return self._session.get(metadata, resource) + + def createOrganizationSmBulkEnrollmentToken(self, organizationId: str, networkId: str, expiresAt: str, **kwargs): + """ + **Create a PccBulkEnrollmentToken** + https://developer.cisco.com/meraki/api-v1/#!create-organization-sm-bulk-enrollment-token + + - organizationId (string): Organization ID + - networkId (string): The id of the associated node_group. + - expiresAt (string): The expiration date. + """ + + kwargs = locals() + + metadata = { + "tags": ["sm", "configure", "bulkEnrollment", "token"], + "operation": "createOrganizationSmBulkEnrollmentToken", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token" + + body_params = [ + "networkId", + "expiresAt", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSmBulkEnrollmentToken: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSmBulkEnrollmentToken(self, organizationId: str, tokenId: str): + """ + **Return a BulkEnrollmentToken** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sm-bulk-enrollment-token + + - organizationId (string): Organization ID + - tokenId (string): Token ID + """ + + metadata = { + "tags": ["sm", "configure", "bulkEnrollment", "token"], + "operation": "getOrganizationSmBulkEnrollmentToken", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + tokenId = urllib.parse.quote(str(tokenId), safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token/{tokenId}" + + return self._session.get(metadata, resource) + + def updateOrganizationSmBulkEnrollmentToken(self, organizationId: str, tokenId: str, **kwargs): + """ + **Update a PccBulkEnrollmentToken** + https://developer.cisco.com/meraki/api-v1/#!update-organization-sm-bulk-enrollment-token + + - organizationId (string): Organization ID + - tokenId (string): Token ID + - networkId (string): The id of the associated node_group. + - expiresAt (string): The expiration date. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["sm", "configure", "bulkEnrollment", "token"], + "operation": "updateOrganizationSmBulkEnrollmentToken", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + tokenId = urllib.parse.quote(str(tokenId), safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token/{tokenId}" + + body_params = [ + "networkId", + "expiresAt", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSmBulkEnrollmentToken: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSmBulkEnrollmentToken(self, organizationId: str, tokenId: str): + """ + **Delete a PccBulkEnrollmentToken** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-sm-bulk-enrollment-token + + - organizationId (string): Organization ID + - tokenId (string): Token ID + """ + + metadata = { + "tags": ["sm", "configure", "bulkEnrollment", "token"], + "operation": "deleteOrganizationSmBulkEnrollmentToken", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + tokenId = urllib.parse.quote(str(tokenId), safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token/{tokenId}" + + return self._session.delete(metadata, resource) + + def getOrganizationSmBulkEnrollmentTokens(self, organizationId: str): + """ + **List all BulkEnrollmentTokens for an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sm-bulk-enrollment-tokens + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["sm", "configure", "bulkEnrollment", "tokens"], + "operation": "getOrganizationSmBulkEnrollmentTokens", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/tokens" + + return self._session.get(metadata, resource) + def updateOrganizationSmSentryPoliciesAssignments(self, organizationId: str, items: list, **kwargs): """ **Update an Organizations Sentry Policies using the provided list** diff --git a/meraki/aio/api/support.py b/meraki/aio/api/support.py new file mode 100644 index 00000000..721ee809 --- /dev/null +++ b/meraki/aio/api/support.py @@ -0,0 +1,24 @@ +import urllib + + +class AsyncSupport: + def __init__(self, session): + super().__init__() + self._session = session + + def getOrganizationSupportSalesRepresentatives(self, organizationId: str): + """ + **Returns the organization's sales representatives** + https://developer.cisco.com/meraki/api-v1/#!get-organization-support-sales-representatives + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["support", "monitor", "salesRepresentatives"], + "operation": "getOrganizationSupportSalesRepresentatives", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/support/salesRepresentatives" + + return self._session.get(metadata, resource) diff --git a/meraki/aio/api/switch.py b/meraki/aio/api/switch.py index b164485f..d3ddf5fc 100644 --- a/meraki/aio/api/switch.py +++ b/meraki/aio/api/switch.py @@ -6,14 +6,17 @@ def __init__(self, session): super().__init__() self._session = session - def getDeviceSwitchPorts(self, serial: str): + def getDeviceSwitchPorts(self, serial: str, **kwargs): """ **List the switch ports for a switch** https://developer.cisco.com/meraki/api-v1/#!get-device-switch-ports - serial (string): Serial + - hideDefaultPorts (boolean): Optional flag that, when true, will hide modular switchports that may not be connected to the device at the moment """ + kwargs.update(locals()) + metadata = { "tags": ["switch", "configure", "ports"], "operation": "getDeviceSwitchPorts", @@ -21,7 +24,18 @@ def getDeviceSwitchPorts(self, serial: str): serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/switch/ports" - return self._session.get(metadata, resource) + query_params = [ + "hideDefaultPorts", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getDeviceSwitchPorts: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) def cycleDeviceSwitchPorts(self, serial: str, ports: list, **kwargs): """ @@ -54,6 +68,46 @@ def cycleDeviceSwitchPorts(self, serial: str, ports: list, **kwargs): return self._session.post(metadata, resource, payload) + def updateDeviceSwitchPortsMirror(self, serial: str, source: dict, destination: dict, **kwargs): + """ + **Update a port mirror** + https://developer.cisco.com/meraki/api-v1/#!update-device-switch-ports-mirror + + - serial (string): The switch identifier + - source (object): Source ports mirror configuration + - destination (object): Destination port mirror configuration + - tags (array): Port mirror tags + - role (string): Switch role can be source or destination + - comment (string): My pretty comment + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "mirror"], + "operation": "updateDeviceSwitchPortsMirror", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/switch/ports/mirror" + + body_params = [ + "serial", + "source", + "destination", + "tags", + "role", + "comment", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateDeviceSwitchPortsMirror: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getDeviceSwitchPortsStatuses(self, serial: str, **kwargs): """ **Return the status for all the ports of a switch** @@ -154,6 +208,7 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): - vlan (integer): The VLAN of the switch port. For a trunk port, this is the native VLAN. A null value will clear the value set for trunk ports. - voiceVlan (integer): The voice VLAN of the switch port. Only applicable to access ports. - allowedVlans (string): The VLANs allowed on the switch port. Only applicable to trunk ports. + - activeVlans (string): The VLANs that are active on the switch port. Only applicable to trunk ports. - isolationEnabled (boolean): The isolation status of the switch port. - rstpEnabled (boolean): The rapid spanning tree protocol status. - stpGuard (string): The state of the STP guard ('disabled', 'root guard', 'bpdu guard' or 'loop guard'). @@ -214,6 +269,7 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): "vlan", "voiceVlan", "allowedVlans", + "activeVlans", "isolationEnabled", "rstpEnabled", "stpGuard", @@ -303,6 +359,12 @@ def createDeviceSwitchRoutingInterface(self, serial: str, name: str, **kwargs): - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. + - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. + - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. + - staticV4Dns1 (string): Primary IPv4 DNS server address + - staticV4Dns2 (string): Secondary IPv4 DNS server address - ospfSettings (object): The OSPF routing settings of the interface. - ipv6 (object): The IPv6 settings of the interface. - vrf (object): The VRF settings of the interface. Requires IOS XE 17.18 or higher @@ -337,6 +399,12 @@ def createDeviceSwitchRoutingInterface(self, serial: str, name: str, **kwargs): "multicastRouting", "vlanId", "defaultGateway", + "isSwitchDefaultGateway", + "uplinkV4", + "candidateUplinkV4", + "uplinkV6", + "staticV4Dns1", + "staticV4Dns2", "ospfSettings", "ipv6", "vrf", @@ -386,6 +454,12 @@ def updateDeviceSwitchRoutingInterface(self, serial: str, interfaceId: str, **kw - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. + - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. + - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. + - staticV4Dns1 (string): Primary IPv4 DNS server address + - staticV4Dns2 (string): Secondary IPv4 DNS server address - ospfSettings (object): The OSPF routing settings of the interface. - ipv6 (object): The IPv6 settings of the interface. - vrf (object): The VRF settings of the interface. Requires IOS XE 17.18 or higher @@ -417,6 +491,12 @@ def updateDeviceSwitchRoutingInterface(self, serial: str, interfaceId: str, **kw "multicastRouting", "vlanId", "defaultGateway", + "isSwitchDefaultGateway", + "uplinkV4", + "candidateUplinkV4", + "uplinkV6", + "staticV4Dns1", + "staticV4Dns2", "ospfSettings", "ipv6", "vrf", @@ -1388,14 +1468,17 @@ def updateNetworkSwitchDscpToCosMappings(self, networkId: str, mappings: list, * return self._session.put(metadata, resource, payload) - def getNetworkSwitchLinkAggregations(self, networkId: str): + def getNetworkSwitchLinkAggregations(self, networkId: str, **kwargs): """ **List link aggregation groups** https://developer.cisco.com/meraki/api-v1/#!get-network-switch-link-aggregations - networkId (string): Network ID + - serials (array): Optional parameter to filter by device serial numbers. Matches multiple exact serials. """ + kwargs.update(locals()) + metadata = { "tags": ["switch", "configure", "linkAggregations"], "operation": "getNetworkSwitchLinkAggregations", @@ -1403,7 +1486,26 @@ def getNetworkSwitchLinkAggregations(self, networkId: str): networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/linkAggregations" - return self._session.get(metadata, resource) + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getNetworkSwitchLinkAggregations: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) def createNetworkSwitchLinkAggregation(self, networkId: str, **kwargs): """ @@ -1652,6 +1754,126 @@ def updateNetworkSwitchPortSchedule(self, networkId: str, portScheduleId: str, * return self._session.put(metadata, resource, payload) + def getNetworkSwitchPortsProfiles(self, networkId: str): + """ + **List the port profiles in a network** + https://developer.cisco.com/meraki/api-v1/#!get-network-switch-ports-profiles + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "getNetworkSwitchPortsProfiles", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/ports/profiles" + + return self._session.get(metadata, resource) + + def createNetworkSwitchPortsProfile(self, networkId: str, **kwargs): + """ + **Create a port profile in a network** + https://developer.cisco.com/meraki/api-v1/#!create-network-switch-ports-profile + + - networkId (string): Network ID + - name (string): The name of the profile. + - description (string): Text describing the profile. + - tags (array): Space-seperated list of tags + - defaultRadiusProfileName (string): When present, the default RADIUS attribute value for RADIUS-based port profile application + - authentication (object): Authentication settings for RADIUS-based port profile application. + - port (object): Configuration settings for port profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "createNetworkSwitchPortsProfile", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/ports/profiles" + + body_params = [ + "name", + "description", + "tags", + "defaultRadiusProfileName", + "authentication", + "port", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkSwitchPortsProfile: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateNetworkSwitchPortsProfile(self, networkId: str, id: str, **kwargs): + """ + **Update a port profile in a network** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-ports-profile + + - networkId (string): Network ID + - id (string): ID + - name (string): The name of the profile. + - description (string): Text describing the profile. + - tags (array): Space-seperated list of tags + - defaultRadiusProfileName (string): When present, the default RADIUS attribute value for RADIUS-based port profile application + - authentication (object): Authentication settings for RADIUS-based port profile application. + - port (object): Configuration settings for port profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "updateNetworkSwitchPortsProfile", + } + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/networks/{networkId}/switch/ports/profiles/{id}" + + body_params = [ + "name", + "description", + "tags", + "defaultRadiusProfileName", + "authentication", + "port", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSwitchPortsProfile: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteNetworkSwitchPortsProfile(self, networkId: str, id: str): + """ + **Delete a port profile from a network** + https://developer.cisco.com/meraki/api-v1/#!delete-network-switch-ports-profile + + - networkId (string): Network ID + - id (string): ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "deleteNetworkSwitchPortsProfile", + } + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/networks/{networkId}/switch/ports/profiles/{id}" + + return self._session.delete(metadata, resource) + def getNetworkSwitchQosRules(self, networkId: str): """ **List quality of service rules** @@ -1855,6 +2077,64 @@ def updateNetworkSwitchQosRule(self, networkId: str, qosRuleId: str, **kwargs): return self._session.put(metadata, resource, payload) + def getNetworkSwitchRaGuardPolicy(self, networkId: str): + """ + **Return RA Guard settings** + https://developer.cisco.com/meraki/api-v1/#!get-network-switch-ra-guard-policy + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["switch", "configure", "raGuardPolicy"], + "operation": "getNetworkSwitchRaGuardPolicy", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/raGuardPolicy" + + return self._session.get(metadata, resource) + + def updateNetworkSwitchRaGuardPolicy(self, networkId: str, **kwargs): + """ + **Update RA Guard settings** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-ra-guard-policy + + - networkId (string): Network ID + - defaultPolicy (string): New Router Advertisers are 'allowed' or 'blocked'. Default value is 'allowed'. + - allowedServers (array): List the MAC addresses of Router Advertisers to permit on the network when defaultPolicy is set to blocked. + - blockedServers (array): List the MAC addresses of Router Advertisers to block on the network when defaultPolicy is set to allowed. + """ + + kwargs.update(locals()) + + if "defaultPolicy" in kwargs: + options = ["allowed", "blocked"] + assert kwargs["defaultPolicy"] in options, ( + f'''"defaultPolicy" cannot be "{kwargs["defaultPolicy"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["switch", "configure", "raGuardPolicy"], + "operation": "updateNetworkSwitchRaGuardPolicy", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/raGuardPolicy" + + body_params = [ + "defaultPolicy", + "allowedServers", + "blockedServers", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSwitchRaGuardPolicy: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkSwitchRoutingMulticast(self, networkId: str): """ **Return multicast settings for a network** @@ -2175,6 +2455,45 @@ def updateNetworkSwitchSettings(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) + def updateNetworkSwitchSpanningTree(self, networkId: str, **kwargs): + """ + **Updates Spanning Tree configuration** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-spanning-tree + + - networkId (string): Network ID + - enabled (boolean): Network-level spanning Tree enable + - mode (string): Catalyst Spanning Tree Protocol mode (mst, rpvst+) + - priorities (array): Spanning tree priority for switches/stacks or switch templates. An empty array will clear the priority settings. + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["mst", "rpvst+"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["switch", "configure", "spanningTree"], + "operation": "updateNetworkSwitchSpanningTree", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/spanningTree" + + body_params = [ + "enabled", + "mode", + "priorities", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSwitchSpanningTree: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkSwitchStacks(self, networkId: str): """ **List the switch stacks in a network** @@ -2225,6 +2544,41 @@ def createNetworkSwitchStack(self, networkId: str, name: str, serials: list, **k return self._session.post(metadata, resource, payload) + def updateNetworkSwitchStack(self, networkId: str, switchStackId: str, **kwargs): + """ + **Update a switch stack** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-stack + + - networkId (string): Network ID + - switchStackId (string): Switch stack ID + - name (string): The name of the stack + - members (array): The list of switches that should be in the stack + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "stacks"], + "operation": "updateNetworkSwitchStack", + } + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") + resource = f"/networks/{networkId}/switch/stacks/{switchStackId}" + + body_params = [ + "name", + "members", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSwitchStack: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkSwitchStack(self, networkId: str, switchStackId: str): """ **Show a switch stack** @@ -2296,6 +2650,49 @@ def addNetworkSwitchStack(self, networkId: str, switchStackId: str, serial: str, return self._session.post(metadata, resource, payload) + def updateNetworkSwitchStackPortsMirror( + self, networkId: str, switchStackId: str, source: dict, destination: dict, **kwargs + ): + """ + **Update switch port mirrors for switch stacks** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-stack-ports-mirror + + - networkId (string): Network ID + - switchStackId (string): Switch stack ID + - source (object): Source port details + - destination (object): Destination port Details + - tags (array): Port mirror tags + - role (string): Switch role can be source or destination + - comment (string): My pretty comment + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "stacks", "ports", "mirror"], + "operation": "updateNetworkSwitchStackPortsMirror", + } + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") + resource = f"/networks/{networkId}/switch/stacks/{switchStackId}/ports/mirror" + + body_params = [ + "source", + "destination", + "tags", + "role", + "comment", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSwitchStackPortsMirror: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def removeNetworkSwitchStack(self, networkId: str, switchStackId: str, serial: str, **kwargs): """ **Remove a switch from a stack** @@ -2391,6 +2788,12 @@ def createNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. + - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. + - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. + - staticV4Dns1 (string): Primary IPv4 DNS server address + - staticV4Dns2 (string): Secondary IPv4 DNS server address - ospfSettings (object): The OSPF routing settings of the interface. - ipv6 (object): The IPv6 settings of the interface. - vrf (object): The VRF settings of the interface. Requires IOS XE 17.18 or higher @@ -2426,6 +2829,12 @@ def createNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId "multicastRouting", "vlanId", "defaultGateway", + "isSwitchDefaultGateway", + "uplinkV4", + "candidateUplinkV4", + "uplinkV6", + "staticV4Dns1", + "staticV4Dns2", "ospfSettings", "ipv6", "vrf", @@ -2480,6 +2889,12 @@ def updateNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. + - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. + - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. + - staticV4Dns1 (string): Primary IPv4 DNS server address + - staticV4Dns2 (string): Secondary IPv4 DNS server address - ospfSettings (object): The OSPF routing settings of the interface. - ipv6 (object): The IPv6 settings of the interface. - vrf (object): The VRF settings of the interface. Requires IOS XE 17.18 or higher @@ -2512,6 +2927,12 @@ def updateNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId "multicastRouting", "vlanId", "defaultGateway", + "isSwitchDefaultGateway", + "uplinkV4", + "candidateUplinkV4", + "uplinkV6", + "staticV4Dns1", + "staticV4Dns2", "ospfSettings", "ipv6", "vrf", @@ -2911,14 +3332,68 @@ def updateNetworkSwitchStp(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) - def getOrganizationConfigTemplateSwitchProfiles(self, organizationId: str, configTemplateId: str): + def getOrganizationConfigTemplatesSwitchProfilesPortsMirrorsBySwitchProfile( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **List the switch templates for your switch template configuration** - https://developer.cisco.com/meraki/api-v1/#!get-organization-config-template-switch-profiles + **list the port mirror configurations in an organization by switch profile** + https://developer.cisco.com/meraki/api-v1/#!get-organization-config-templates-switch-profiles-ports-mirrors-by-switch-profile - organizationId (string): Organization ID - - configTemplateId (string): Config template 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 + - configTemplateIds (array): Optional parameter to filter the result set by the included set of config template IDs + - ids (array): A list of switch profile ids. The returned profiles will be filtered to only include these ids. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. + - 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": ["switch", "configure", "configTemplates", "profiles", "ports", "mirrors", "bySwitchProfile"], + "operation": "getOrganizationConfigTemplatesSwitchProfilesPortsMirrorsBySwitchProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/configTemplates/switch/profiles/ports/mirrors/bySwitchProfile" + + query_params = [ + "configTemplateIds", + "ids", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "configTemplateIds", + "ids", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationConfigTemplatesSwitchProfilesPortsMirrorsBySwitchProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationConfigTemplateSwitchProfiles(self, organizationId: str, configTemplateId: str): + """ + **List the switch templates for your switch template configuration** + https://developer.cisco.com/meraki/api-v1/#!get-organization-config-template-switch-profiles + + - organizationId (string): Organization ID + - configTemplateId (string): Config template ID + """ metadata = { "tags": ["switch", "configure", "configTemplates", "profiles"], @@ -2951,6 +3426,55 @@ def getOrganizationConfigTemplateSwitchProfilePorts(self, organizationId: str, c return self._session.get(metadata, resource) + def updateOrganizationConfigTemplateSwitchProfilePortsMirror( + self, organizationId: str, configTemplateId: str, profileId: str, source: dict, destination: dict, **kwargs + ): + """ + **Update a port mirror** + https://developer.cisco.com/meraki/api-v1/#!update-organization-config-template-switch-profile-ports-mirror + + - organizationId (string): Organization ID + - configTemplateId (string): Config template ID + - profileId (string): Profile ID + - source (object): Source ports mirror configuration + - destination (object): Destination port mirror configuration + - tags (array): Port mirror tags + - role (string): Switch role can be source or destination + - comment (string): My pretty comment + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "configTemplates", "profiles", "ports", "mirror"], + "operation": "updateOrganizationConfigTemplateSwitchProfilePortsMirror", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + configTemplateId = urllib.parse.quote(str(configTemplateId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") + resource = ( + f"/organizations/{organizationId}/configTemplates/{configTemplateId}/switch/profiles/{profileId}/ports/mirror" + ) + + body_params = [ + "source", + "destination", + "tags", + "role", + "comment", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationConfigTemplateSwitchProfilePortsMirror: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + def getOrganizationConfigTemplateSwitchProfilePort( self, organizationId: str, configTemplateId: str, profileId: str, portId: str ): @@ -2997,6 +3521,7 @@ def updateOrganizationConfigTemplateSwitchProfilePort( - vlan (integer): The VLAN of the switch template port. For a trunk port, this is the native VLAN. A null value will clear the value set for trunk ports. - voiceVlan (integer): The voice VLAN of the switch template port. Only applicable to access ports. - allowedVlans (string): The VLANs allowed on the switch template port. Only applicable to trunk ports. + - activeVlans (string): The VLANs that are active on the switch template port. Only applicable to trunk ports. - isolationEnabled (boolean): The isolation status of the switch template port. - rstpEnabled (boolean): The rapid spanning tree protocol status. - stpGuard (string): The state of the STP guard ('disabled', 'root guard', 'bpdu guard' or 'loop guard'). @@ -3059,6 +3584,7 @@ def updateOrganizationConfigTemplateSwitchProfilePort( "vlan", "voiceVlan", "allowedVlans", + "activeVlans", "isolationEnabled", "rstpEnabled", "stpGuard", @@ -3128,89 +3654,101 @@ def getOrganizationSummarySwitchPowerHistory(self, organizationId: str, **kwargs return self._session.get(metadata, resource, params) - def cloneOrganizationSwitchDevices(self, organizationId: str, sourceSerial: str, targetSerials: list, **kwargs): + def getOrganizationSwitchAlertsPoeByDevice(self, organizationId: str, networkIds: list, **kwargs): """ - **Clone port-level and some switch-level configuration settings from a source switch to one or more target switches** - https://developer.cisco.com/meraki/api-v1/#!clone-organization-switch-devices + **Gets all poe related alerts over a given network and returns information by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-alerts-poe-by-device - organizationId (string): Organization ID - - sourceSerial (string): Serial number of the source switch (must be on a network not bound to a template) - - targetSerials (array): Array of serial numbers of one or more target switches (must be on a network not bound to a template) + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. """ - kwargs = locals() + kwargs.update(locals()) metadata = { - "tags": ["switch", "configure", "devices"], - "operation": "cloneOrganizationSwitchDevices", + "tags": ["switch", "monitor", "alerts", "poe", "byDevice"], + "operation": "getOrganizationSwitchAlertsPoeByDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/devices/clone" + resource = f"/organizations/{organizationId}/switch/alerts/poe/byDevice" - body_params = [ - "sourceSerial", - "targetSerials", + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + 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()) if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"cloneOrganizationSwitchDevices: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"getOrganizationSwitchAlertsPoeByDevice: ignoring unrecognized kwargs: {invalid}" + ) - return self._session.post(metadata, resource, payload) + return self._session.get(metadata, resource, params) - def getOrganizationSwitchPortsBySwitch(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def aurora2OrganizationSwitchSwitchTemplates(self, organizationId: str): """ - **List the switchports in an organization by switch** - https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-by-switch + **List switch templates running IOS XE Catalyst firmware.** + https://developer.cisco.com/meraki/api-v1/#!aurora-2-organization-switch-switch-templates - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. 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. - - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. - - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. - - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. - - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. - - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. - - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. - - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. - - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + """ + + metadata = { + "tags": ["switch", "configure"], + "operation": "aurora2OrganizationSwitchSwitchTemplates", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/aurora2SwitchTemplates" + + return self._session.get(metadata, resource) + + def getOrganizationSwitchClientsConnectionsAuthenticationByClient(self, organizationId: str, **kwargs): + """ + **Summarizes authentication outcomes per switch client across an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-clients-connections-authentication-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. """ kwargs.update(locals()) metadata = { - "tags": ["switch", "configure", "ports", "bySwitch"], - "operation": "getOrganizationSwitchPortsBySwitch", + "tags": ["switch", "monitor", "clients", "connections", "authentication", "byClient"], + "operation": "getOrganizationSwitchClientsConnectionsAuthenticationByClient", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/ports/bySwitch" + resource = f"/organizations/{organizationId}/switch/clients/connections/authentication/byClient" query_params = [ - "perPage", - "startingAfter", - "endingBefore", - "configurationUpdatedAfter", - "mac", - "macs", - "name", "networkIds", - "portProfileIds", - "serial", - "serials", + "t0", + "t1", + "timespan", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "macs", "networkIds", - "portProfileIds", - "serials", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3221,66 +3759,43 @@ def getOrganizationSwitchPortsBySwitch(self, organizationId: str, total_pages=1, all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationSwitchPortsBySwitch: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"getOrganizationSwitchClientsConnectionsAuthenticationByClient: ignoring unrecognized kwargs: {invalid}" + ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) - def getOrganizationSwitchPortsClientsOverviewByDevice( - self, organizationId: str, total_pages=1, direction="next", **kwargs - ): + def getOrganizationSwitchClientsConnectionsDhcpByClient(self, organizationId: str, **kwargs): """ - **List the number of clients for all switchports with at least one online client in an organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-clients-overview-by-device + **Get IP assignment for all clients in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-clients-connections-dhcp-by-client - 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 - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 20. - - 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. - - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. - - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. - - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. - - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. - - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. - - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. - - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. - - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 2 hours. """ kwargs.update(locals()) metadata = { - "tags": ["switch", "monitor", "ports", "clients", "overview", "byDevice"], - "operation": "getOrganizationSwitchPortsClientsOverviewByDevice", + "tags": ["switch", "monitor", "clients", "connections", "dhcp", "byClient"], + "operation": "getOrganizationSwitchClientsConnectionsDhcpByClient", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/ports/clients/overview/byDevice" + resource = f"/organizations/{organizationId}/switch/clients/connections/dhcp/byClient" query_params = [ + "networkIds", "t0", + "t1", "timespan", - "perPage", - "startingAfter", - "endingBefore", - "configurationUpdatedAfter", - "mac", - "macs", - "name", - "networkIds", - "portProfileIds", - "serial", - "serials", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "macs", "networkIds", - "portProfileIds", - "serials", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3292,96 +3807,124 @@ def getOrganizationSwitchPortsClientsOverviewByDevice( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationSwitchPortsClientsOverviewByDevice: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationSwitchClientsConnectionsDhcpByClient: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) - def getOrganizationSwitchPortsOverview(self, organizationId: str, **kwargs): + def getOrganizationSwitchClientsConnectionsSwitchPortStatusByClient(self, organizationId: str, **kwargs): """ - **Returns the counts of all active ports for the requested timespan, grouped by speed** - https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-overview + **Switch port status by client.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-clients-connections-switch-port-status-by-client - organizationId (string): Organization ID - - t0 (string): The beginning of the timespan for the data. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 186 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 greater than or equal to 12 hours and be less than or equal to 186 days. The default is 1 day. + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. """ kwargs.update(locals()) metadata = { - "tags": ["switch", "monitor", "ports", "overview"], - "operation": "getOrganizationSwitchPortsOverview", + "tags": ["switch", "monitor", "clients", "connections", "switchPortStatus", "byClient"], + "operation": "getOrganizationSwitchClientsConnectionsSwitchPortStatusByClient", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/ports/overview" + resource = f"/organizations/{organizationId}/switch/clients/connections/switchPortStatus/byClient" query_params = [ + "networkIds", "t0", "t1", "timespan", ] 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()) + if self._session._validate_kwargs: - all_params = query_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationSwitchPortsOverview: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"getOrganizationSwitchClientsConnectionsSwitchPortStatusByClient: ignoring unrecognized kwargs: {invalid}" + ) return self._session.get(metadata, resource, params) - def getOrganizationSwitchPortsStatusesBySwitch(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def cloneOrganizationSwitchProfilesToTemplateNetwork(self, organizationId: str, **kwargs): """ - **List the switchports in an organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-statuses-by-switch + **Clone existing switch templates into a destination template network.** + https://developer.cisco.com/meraki/api-v1/#!clone-organization-switch-profiles-to-template-network - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. - - 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. - - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. - - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. - - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. - - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. - - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. - - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. - - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. - - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + - profileIds (array): Switch profile IDs to clone + - templateNodeGroupId (string): Destination template network ID """ kwargs.update(locals()) metadata = { - "tags": ["switch", "monitor", "ports", "statuses", "bySwitch"], - "operation": "getOrganizationSwitchPortsStatusesBySwitch", + "tags": ["switch", "configure"], + "operation": "cloneOrganizationSwitchProfilesToTemplateNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/ports/statuses/bySwitch" + resource = f"/organizations/{organizationId}/switch/cloneProfilesToTemplateNetwork" - query_params = [ - "perPage", - "startingAfter", - "endingBefore", - "configurationUpdatedAfter", - "mac", - "macs", - "name", - "networkIds", - "portProfileIds", - "serial", - "serials", + body_params = [ + "profileIds", + "templateNodeGroupId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"cloneOrganizationSwitchProfilesToTemplateNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchConnectivityLanLinkErrorsByDeviceByPort(self, organizationId: str, networkIds: list, **kwargs): + """ + **Lan link errors by device and port.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-connectivity-lan-link-errors-by-device-by-port + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "connectivity", "lanLink", "errors", "byDevice", "byPort"], + "operation": "getOrganizationSwitchConnectivityLanLinkErrorsByDeviceByPort", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/connectivity/lanLink/errors/byDevice/byPort" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "macs", "networkIds", - "portProfileIds", - "serials", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3393,26 +3936,214 @@ def getOrganizationSwitchPortsStatusesBySwitch(self, organizationId: str, total_ invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationSwitchPortsStatusesBySwitch: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationSwitchConnectivityLanLinkErrorsByDeviceByPort: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) - def getOrganizationSwitchPortsTopologyDiscoveryByDevice( + def getOrganizationSwitchConnectivityLanStpErrorsByDeviceByPort(self, organizationId: str, networkIds: list, **kwargs): + """ + **Lan STP errors by device and port.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-connectivity-lan-stp-errors-by-device-by-port + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "connectivity", "lanStp", "errors", "byDevice", "byPort"], + "operation": "getOrganizationSwitchConnectivityLanStpErrorsByDeviceByPort", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/connectivity/lanStp/errors/byDevice/byPort" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchConnectivityLanStpErrorsByDeviceByPort: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationSwitchConnectivityVrrpFailuresByDevice(self, organizationId: str, networkIds: list, **kwargs): + """ + **Gets all vrrp related alerts over a given network and returns information by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-connectivity-vrrp-failures-by-device + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "connectivity", "vrrp", "failures", "byDevice"], + "operation": "getOrganizationSwitchConnectivityVrrpFailuresByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/connectivity/vrrp/failures/byDevice" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchConnectivityVrrpFailuresByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def cloneOrganizationSwitchDevices(self, organizationId: str, sourceSerial: str, targetSerials: list, **kwargs): + """ + **Clone port-level and some switch-level configuration settings from a source switch to one or more target switches** + https://developer.cisco.com/meraki/api-v1/#!clone-organization-switch-devices + + - organizationId (string): Organization ID + - sourceSerial (string): Serial number of the source switch (must be on a network not bound to a template) + - targetSerials (array): Array of serial numbers of one or more target switches (must be on a network not bound to a template) + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "devices"], + "operation": "cloneOrganizationSwitchDevices", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/devices/clone" + + body_params = [ + "sourceSerial", + "targetSerials", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"cloneOrganizationSwitchDevices: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchDevicesSystemQueuesHistoryBySwitchByInterval( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **List most recently seen LLDP/CDP discovery and topology information per switch port in an organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-topology-discovery-by-device + **Return a historical record of packet transmission and loss, broken down by protocol, for insight into switch device health.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-devices-system-queues-history-by-switch-by-interval - 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 + - 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. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided. + - networkIds (array): Optional parameter to filter connectivity history by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter connectivity history by switch. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "devices", "system", "queues", "history", "bySwitch", "byInterval"], + "operation": "getOrganizationSwitchDevicesSystemQueuesHistoryBySwitchByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/devices/system/queues/history/bySwitch/byInterval" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchDevicesSystemQueuesHistoryBySwitchByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsBySwitch(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the switchports in an organization by switch** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-by-switch + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. 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. + - extendedParams (boolean): Optional flag to return all of the switchport data vs smaller dataset + - hideDefaultPorts (boolean): Optional flag that, when true, will hide modular switchports that may not be connected to the device at the moment + - type (array): Optional parameter to filter switchports by type ('access', 'trunk', 'stack', 'routed', 'svl' or 'dad'). All types are selected if not supplied. - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. @@ -3426,18 +4157,19 @@ def getOrganizationSwitchPortsTopologyDiscoveryByDevice( kwargs.update(locals()) metadata = { - "tags": ["switch", "monitor", "ports", "topology", "discovery", "byDevice"], - "operation": "getOrganizationSwitchPortsTopologyDiscoveryByDevice", + "tags": ["switch", "configure", "ports", "bySwitch"], + "operation": "getOrganizationSwitchPortsBySwitch", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/ports/topology/discovery/byDevice" + resource = f"/organizations/{organizationId}/switch/ports/bySwitch" query_params = [ - "t0", - "timespan", "perPage", "startingAfter", "endingBefore", + "extendedParams", + "hideDefaultPorts", + "type", "configurationUpdatedAfter", "mac", "macs", @@ -3450,6 +4182,7 @@ def getOrganizationSwitchPortsTopologyDiscoveryByDevice( params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ + "type", "macs", "networkIds", "portProfileIds", @@ -3464,27 +4197,23 @@ def getOrganizationSwitchPortsTopologyDiscoveryByDevice( all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning( - f"getOrganizationSwitchPortsTopologyDiscoveryByDevice: ignoring unrecognized kwargs: {invalid}" - ) + self._session._logger.warning(f"getOrganizationSwitchPortsBySwitch: ignoring unrecognized kwargs: {invalid}") return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationSwitchPortsUsageHistoryByDeviceByInterval( + def getOrganizationSwitchPortsClientsOverviewByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **List the historical usage and traffic data of switchports in an organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-usage-history-by-device-by-interval + **List the number of clients for all switchports with at least one online client in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-clients-overview-by-device - 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 - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. - - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 10. + - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 20. - 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. - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. @@ -3500,17 +4229,15 @@ def getOrganizationSwitchPortsUsageHistoryByDeviceByInterval( kwargs.update(locals()) metadata = { - "tags": ["switch", "monitor", "ports", "usage", "history", "byDevice", "byInterval"], - "operation": "getOrganizationSwitchPortsUsageHistoryByDeviceByInterval", + "tags": ["switch", "monitor", "ports", "clients", "overview", "byDevice"], + "operation": "getOrganizationSwitchPortsClientsOverviewByDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/ports/usage/history/byDevice/byInterval" + resource = f"/organizations/{organizationId}/switch/ports/clients/overview/byDevice" query_params = [ "t0", - "t1", "timespan", - "interval", "perPage", "startingAfter", "endingBefore", @@ -3541,7 +4268,2962 @@ def getOrganizationSwitchPortsUsageHistoryByDeviceByInterval( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationSwitchPortsUsageHistoryByDeviceByInterval: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationSwitchPortsClientsOverviewByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsMirrorsBySwitch(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **list the port mirror configurations in an organization by switch** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-mirrors-by-switch + + - 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): Optional parameter to filter the result set by the included set of network IDs + - serials (array): A list of serial numbers. The returned devices will be filtered to only include these serials. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. + - 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": ["switch", "configure", "ports", "mirrors", "bySwitch"], + "operation": "getOrganizationSwitchPortsMirrorsBySwitch", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/mirrors/bySwitch" + + query_params = [ + "networkIds", + "serials", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsMirrorsBySwitch: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsOverview(self, organizationId: str, **kwargs): + """ + **Returns the counts of all active ports for the requested timespan, grouped by speed** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-overview + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 186 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 greater than or equal to 12 hours and be less than or equal to 186 days. The default is 1 day. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "ports", "overview"], + "operation": "getOrganizationSwitchPortsOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/overview" + + query_params = [ + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSwitchPortsOverview: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def getOrganizationSwitchPortsProfiles(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the port profiles in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles + + - 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): Return the port profiles for the specified network(s) + - formattedStaticAssignments (boolean): Returns the list of static switchports that are assigned to the switchport profile + - searchQuery (string): Optional parameter to filter the result set by the search query + - radiusProfileEnabled (boolean): Optional parameter. If true, only return port profiles with a radius profile enabled + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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": ["switch", "configure", "ports", "profiles"], + "operation": "getOrganizationSwitchPortsProfiles", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles" + + query_params = [ + "networkIds", + "formattedStaticAssignments", + "searchQuery", + "radiusProfileEnabled", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSwitchPortsProfiles: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchPortsProfile(self, organizationId: str, **kwargs): + """ + **Create a port profile in an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-ports-profile + + - organizationId (string): Organization ID + - name (string): The name of the profile. + - description (string): Text describing the profile. + - isOrganizationWide (boolean): The scope of the profile whether it is organization level or network level + - networks (object): The networks which are included/excluded in the profile + - networkId (string): The network identifier + - tags (array): Space-seperated list of tags + - defaultRadiusProfileName (string): When present, the default RADIUS attribute value for RADIUS-based port profile application + - authentication (object): Authentication settings for RADIUS-based port profile application. + - port (object): Configuration settings for port profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "createOrganizationSwitchPortsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles" + + body_params = [ + "name", + "description", + "isOrganizationWide", + "networks", + "networkId", + "tags", + "defaultRadiusProfileName", + "authentication", + "port", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationSwitchPortsProfile: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def batchOrganizationSwitchPortsProfilesAssignmentsAssign(self, organizationId: str, items: list, **kwargs): + """ + **Batch assign or unassign port profiles to switch ports** + https://developer.cisco.com/meraki/api-v1/#!batch-organization-switch-ports-profiles-assignments-assign + + - organizationId (string): Organization ID + - items (array): Array of assignment operations (max 100) + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "assignments"], + "operation": "batchOrganizationSwitchPortsProfilesAssignmentsAssign", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/assignments/batchAssign" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"batchOrganizationSwitchPortsProfilesAssignmentsAssign: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchPortsProfilesAssignmentsByPort( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the port profile assignments in an organization, grouped by port** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-assignments-by-port + + - 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 + - profileIds (array): Filter by specific profile IDs + - serials (array): Filter by switch serials + - networkIds (array): Filter by network IDs + - templateIds (array): Filter by template (node_profile) IDs + - types (array): Filter by port type: switch, template + - assignmentTypes (array): Filter by assignment type: direct, template, exception + - isActive (boolean): Filter by assignment status. true: only ports with active assignments, showing only active assignments per port. false: only ports with inactive assignments, showing only inactive assignments per port. Omit: all ports with all assignment layers. + - 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": ["switch", "configure", "ports", "profiles", "assignments", "byPort"], + "operation": "getOrganizationSwitchPortsProfilesAssignmentsByPort", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/assignments/byPort" + + query_params = [ + "profileIds", + "serials", + "networkIds", + "templateIds", + "types", + "assignmentTypes", + "isActive", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "profileIds", + "serials", + "networkIds", + "templateIds", + "types", + "assignmentTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsProfilesAssignmentsByPort: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsProfilesAssignmentsBySwitch( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the port profile assignments in an organization, grouped by switch** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-assignments-by-switch + + - 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 + - profileIds (array): Filter by specific profile IDs + - serials (array): Filter by switch serials + - networkIds (array): Filter by network IDs + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. 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": ["switch", "configure", "ports", "profiles", "assignments", "bySwitch"], + "operation": "getOrganizationSwitchPortsProfilesAssignmentsBySwitch", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/assignments/bySwitch" + + query_params = [ + "profileIds", + "serials", + "networkIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "profileIds", + "serials", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsProfilesAssignmentsBySwitch: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsProfilesAutomations(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **list the automation port profiles in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-automations + + - 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 + - ids (array): Optional parameter to filter the result set by the included set of automation IDs + - networkIds (array): Optional parameter to filter the result set by the associated networks. + - isOrganizationWide (string): Optional parameter to filter the result set by automations org-wide flag. + - searchQuery (string): Optional parameter to filter the result set by the search query + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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": ["switch", "configure", "ports", "profiles", "automations"], + "operation": "getOrganizationSwitchPortsProfilesAutomations", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/automations" + + query_params = [ + "ids", + "networkIds", + "isOrganizationWide", + "searchQuery", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "ids", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsProfilesAutomations: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchPortsProfilesAutomation(self, organizationId: str, **kwargs): + """ + **Create a port profile automation for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-ports-profiles-automation + + - organizationId (string): Organization ID + - name (string): Name of the port profile automation. + - description (string): Text describing the port profile automation. + - fallbackProfile (object): Configuration settings for port profile + - rules (array): Configuration settings for port profile automation rules + - assignedSwitchPorts (array): assigned switch ports + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "automations"], + "operation": "createOrganizationSwitchPortsProfilesAutomation", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/automations" + + body_params = [ + "name", + "description", + "fallbackProfile", + "rules", + "assignedSwitchPorts", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchPortsProfilesAutomation: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationSwitchPortsProfilesAutomation(self, organizationId: str, id: str, **kwargs): + """ + **Update a port profile automation in an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-switch-ports-profiles-automation + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of the port profile automation. + - description (string): Text describing the port profile automation. + - fallbackProfile (object): Configuration settings for port profile + - rules (array): Configuration settings for port profile automation rules + - assignedSwitchPorts (array): assigned switch ports + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "automations"], + "operation": "updateOrganizationSwitchPortsProfilesAutomation", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/automations/{id}" + + body_params = [ + "name", + "description", + "fallbackProfile", + "rules", + "assignedSwitchPorts", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSwitchPortsProfilesAutomation: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSwitchPortsProfilesAutomation(self, organizationId: str, id: str): + """ + **Delete an automation port profile from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-ports-profiles-automation + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "automations"], + "operation": "deleteOrganizationSwitchPortsProfilesAutomation", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/automations/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchPortsProfilesNetworksAssignments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Fetch all Network - Smart Port Profile associations for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-networks-assignments + + - 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 + - perPage (integer): Number of records per page + - page (integer): Page number + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "networks", "assignments"], + "operation": "getOrganizationSwitchPortsProfilesNetworksAssignments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments" + + query_params = [ + "perPage", + "page", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsProfilesNetworksAssignments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchPortsProfilesNetworksAssignment( + self, organizationId: str, type: str, profile: dict, network: dict, **kwargs + ): + """ + **Create Network and Smart Ports Profile association for a specific profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-ports-profiles-networks-assignment + + - organizationId (string): Organization ID + - type (string): Type of association + - profile (object): Smart Port Profile object + - network (object): Network object + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "networks", "assignments"], + "operation": "createOrganizationSwitchPortsProfilesNetworksAssignment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments" + + body_params = [ + "type", + "profile", + "network", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchPortsProfilesNetworksAssignment: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def batchOrganizationSwitchPortsProfilesNetworksAssignmentsCreate(self, organizationId: str, items: list, **kwargs): + """ + **Batch Create Network and Smart Ports Profile associations for a specific profile** + https://developer.cisco.com/meraki/api-v1/#!batch-organization-switch-ports-profiles-networks-assignments-create + + - organizationId (string): Organization ID + - items (array): Array of network and profile associations + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "networks", "assignments"], + "operation": "batchOrganizationSwitchPortsProfilesNetworksAssignmentsCreate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments/batchCreate" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"batchOrganizationSwitchPortsProfilesNetworksAssignmentsCreate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def bulkOrganizationSwitchPortsProfilesNetworksAssignmentsDelete(self, organizationId: str, items: list, **kwargs): + """ + **Bulk delete Network and Smart Port Profile associations** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-switch-ports-profiles-networks-assignments-delete + + - organizationId (string): Organization ID + - items (array): Array of assignments to delete + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "networks", "assignments"], + "operation": "bulkOrganizationSwitchPortsProfilesNetworksAssignmentsDelete", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments/bulkDelete" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"bulkOrganizationSwitchPortsProfilesNetworksAssignmentsDelete: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def deleteOrganizationSwitchPortsProfilesNetworksAssignment(self, organizationId: str, assignmentId: str): + """ + **Delete Network and Smart Port profile association for a specific profile** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-ports-profiles-networks-assignment + + - organizationId (string): Organization ID + - assignmentId (string): Assignment ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "networks", "assignments"], + "operation": "deleteOrganizationSwitchPortsProfilesNetworksAssignment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + assignmentId = urllib.parse.quote(str(assignmentId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments/{assignmentId}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchPortsProfilesOverviewByProfile( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the port profiles in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-overview-by-profile + + - 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): Return the port profiles for the specified network(s) + - formattedStaticAssignments (boolean): Returns the list of static switchports that are assgined to the switchport profile + - searchQuery (string): Optional parameter to filter the result set by the search query + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. + - 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": ["switch", "configure", "ports", "profiles", "overview", "byProfile"], + "operation": "getOrganizationSwitchPortsProfilesOverviewByProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/overview/byProfile" + + query_params = [ + "networkIds", + "formattedStaticAssignments", + "searchQuery", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsProfilesOverviewByProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsProfilesRadiusAssignments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the port profile RADIUS assignments** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-radius-assignments + + - 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): If present, the networks to limit the assignments to + - portProfileIds (array): If present, the port profiles to limit the assignments to + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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": ["switch", "configure", "ports", "profiles", "radius", "assignments"], + "operation": "getOrganizationSwitchPortsProfilesRadiusAssignments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments" + + query_params = [ + "networkIds", + "portProfileIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "portProfileIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsProfilesRadiusAssignments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: str, network: dict, **kwargs): + """ + **Create a port profile RADIUS assignment** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-ports-profiles-radius-assignment + + - organizationId (string): Organization ID + - network (object): The network where the RADIUS name is assigned + - portProfile (object): The assigned port profile + - radius (object): The RADIUS options for this assignment + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "radius", "assignments"], + "operation": "createOrganizationSwitchPortsProfilesRadiusAssignment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments" + + body_params = [ + "network", + "portProfile", + "radius", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchPortsProfilesRadiusAssignment: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: str, id: str): + """ + **Return a port profile RADIUS assignment** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-radius-assignment + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "radius", "assignments"], + "operation": "getOrganizationSwitchPortsProfilesRadiusAssignment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments/{id}" + + return self._session.get(metadata, resource) + + def updateOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: str, id: str, **kwargs): + """ + **Update a port profile RADIUS assignment** + https://developer.cisco.com/meraki/api-v1/#!update-organization-switch-ports-profiles-radius-assignment + + - organizationId (string): Organization ID + - id (string): ID + - network (object): The network where the RADIUS name is assigned + - portProfile (object): The assigned port profile + - radius (object): The RADIUS options for this assignment + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "radius", "assignments"], + "operation": "updateOrganizationSwitchPortsProfilesRadiusAssignment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments/{id}" + + body_params = [ + "network", + "portProfile", + "radius", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSwitchPortsProfilesRadiusAssignment: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: str, id: str): + """ + **Deletes a port profile RADIUS assignment** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-ports-profiles-radius-assignment + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "radius", "assignments"], + "operation": "deleteOrganizationSwitchPortsProfilesRadiusAssignment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchPortsProfile(self, organizationId: str, id: str): + """ + **Get detailed information about a port profile** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profile + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "getOrganizationSwitchPortsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/{id}" + + return self._session.get(metadata, resource) + + def updateOrganizationSwitchPortsProfile(self, organizationId: str, id: str, **kwargs): + """ + **Update a port profile in an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-switch-ports-profile + + - organizationId (string): Organization ID + - id (string): ID + - name (string): The name of the profile. + - description (string): Text describing the profile. + - isOrganizationWide (boolean): The scope of the profile whether it is organization level or network level + - networks (object): The networks which are included/excluded in the profile + - networkId (string): The network identifier + - tags (array): Space-seperated list of tags + - defaultRadiusProfileName (string): When present, the default RADIUS attribute value for RADIUS-based port profile application + - authentication (object): Authentication settings for RADIUS-based port profile application. + - port (object): Configuration settings for port profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "updateOrganizationSwitchPortsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/{id}" + + body_params = [ + "name", + "description", + "isOrganizationWide", + "networks", + "networkId", + "tags", + "defaultRadiusProfileName", + "authentication", + "port", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationSwitchPortsProfile: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSwitchPortsProfile(self, organizationId: str, id: str): + """ + **Delete a port profile from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-ports-profile + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "deleteOrganizationSwitchPortsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchPortsStatusesBySwitch(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the switchports in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-statuses-by-switch + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. + - 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. + - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. + - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. + - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. + - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. + - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. + - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. + - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. + - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "ports", "statuses", "bySwitch"], + "operation": "getOrganizationSwitchPortsStatusesBySwitch", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/statuses/bySwitch" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "configurationUpdatedAfter", + "mac", + "macs", + "name", + "networkIds", + "portProfileIds", + "serial", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "macs", + "networkIds", + "portProfileIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsStatusesBySwitch: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsStatusesPacketsByDeviceByPort(self, organizationId: str, networkIds: list, **kwargs): + """ + **Switch port packets by device and port.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-statuses-packets-by-device-by-port + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 1200, 14400, 86400. The default is 14400. Interval is calculated if time params are provided. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "ports", "statuses", "packets", "byDevice", "byPort"], + "operation": "getOrganizationSwitchPortsStatusesPacketsByDeviceByPort", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/statuses/packets/byDevice/byPort" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + "interval", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsStatusesPacketsByDeviceByPort: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationSwitchPortsTopologyDiscoveryByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List most recently seen LLDP/CDP discovery and topology information per switch port in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-topology-discovery-by-device + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. + - 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. + - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. + - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. + - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. + - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. + - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. + - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. + - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. + - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "ports", "topology", "discovery", "byDevice"], + "operation": "getOrganizationSwitchPortsTopologyDiscoveryByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/topology/discovery/byDevice" + + query_params = [ + "t0", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + "configurationUpdatedAfter", + "mac", + "macs", + "name", + "networkIds", + "portProfileIds", + "serial", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "macs", + "networkIds", + "portProfileIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsTopologyDiscoveryByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsTransceiversReadingsHistoryBySwitch( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Return time-series digital optical monitoring (DOM) readings for ports on each DOM-enabled switch in an organization, in addition to thresholds for each relevant Small Form Factor Pluggable (SFP) module.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-transceivers-readings-history-by-switch + + - 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 + - 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. + - 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 30 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 30 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided. + - networkIds (array): Networks for which information should be gathered. + - serials (array): Optional parameter to filter usage by switch. + - portIds (array): Optional parameter to filter usage by port ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "ports", "transceivers", "readings", "history", "bySwitch"], + "operation": "getOrganizationSwitchPortsTransceiversReadingsHistoryBySwitch", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/transceivers/readings/history/bySwitch" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + "networkIds", + "serials", + "portIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "portIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsTransceiversReadingsHistoryBySwitch: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsUsageHistoryByDeviceByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the historical usage and traffic data of switchports in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-usage-history-by-device-by-interval + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 10. + - 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. + - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. + - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. + - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. + - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. + - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. + - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. + - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. + - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "ports", "usage", "history", "byDevice", "byInterval"], + "operation": "getOrganizationSwitchPortsUsageHistoryByDeviceByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/usage/history/byDevice/byInterval" + + query_params = [ + "t0", + "t1", + "timespan", + "interval", + "perPage", + "startingAfter", + "endingBefore", + "configurationUpdatedAfter", + "mac", + "macs", + "name", + "networkIds", + "portProfileIds", + "serial", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "macs", + "networkIds", + "portProfileIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsUsageHistoryByDeviceByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpAutonomousSystems(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the autonomous systems configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-autonomous-systems + + - 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 + - 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. + - numbers (array): Optional parameter to filter autonomous systems by number. This filter uses multiple exact matches. + - autonomousSystemIds (array): Optional parameter to filter autonomous systems by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "autonomousSystems"], + "operation": "getOrganizationSwitchRoutingBgpAutonomousSystems", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "numbers", + "autonomousSystemIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "numbers", + "autonomousSystemIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpAutonomousSystems: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpAutonomousSystem(self, organizationId: str, number: int, **kwargs): + """ + **Create an autonomous system** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-autonomous-system + + - organizationId (string): Organization ID + - number (integer): The autonomous system number (CLI: 'router bgp ') + - description (string): A description for the autonomous system + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "autonomousSystems"], + "operation": "createOrganizationSwitchRoutingBgpAutonomousSystem", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems" + + body_params = [ + "number", + "description", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpAutonomousSystem: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchRoutingBgpAutonomousSystemsOverviewByAutonomousSystem( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the overview of the autonomous systems configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-autonomous-systems-overview-by-autonomous-system + + - 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 + - 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. + - numbers (array): Optional parameter to filter autonomous systems by number. This filter uses multiple exact matches. + - autonomousSystemIds (array): Optional parameter to filter autonomous systems by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "autonomousSystems", "overview", "byAutonomousSystem"], + "operation": "getOrganizationSwitchRoutingBgpAutonomousSystemsOverviewByAutonomousSystem", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems/overview/byAutonomousSystem" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "numbers", + "autonomousSystemIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "numbers", + "autonomousSystemIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpAutonomousSystemsOverviewByAutonomousSystem: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def updateOrganizationSwitchRoutingBgpAutonomousSystem(self, organizationId: str, autonomousSystemId: str, **kwargs): + """ + **Update an autonomous system** + https://developer.cisco.com/meraki/api-v1/#!update-organization-switch-routing-bgp-autonomous-system + + - organizationId (string): Organization ID + - autonomousSystemId (string): Autonomous system ID + - number (integer): The autonomous system number (CLI: 'router bgp ') + - description (string): A description for the autonomous system + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "autonomousSystems"], + "operation": "updateOrganizationSwitchRoutingBgpAutonomousSystem", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + autonomousSystemId = urllib.parse.quote(str(autonomousSystemId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems/{autonomousSystemId}" + + body_params = [ + "number", + "description", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSwitchRoutingBgpAutonomousSystem: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSwitchRoutingBgpAutonomousSystem(self, organizationId: str, autonomousSystemId: str): + """ + **Delete an autonomous system from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-routing-bgp-autonomous-system + + - organizationId (string): Organization ID + - autonomousSystemId (string): Autonomous system ID + """ + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "autonomousSystems"], + "operation": "deleteOrganizationSwitchRoutingBgpAutonomousSystem", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + autonomousSystemId = urllib.parse.quote(str(autonomousSystemId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems/{autonomousSystemId}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchRoutingBgpFiltersFilterLists( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the filter lists configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-filters-filter-lists + + - 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 + - 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. + - networkIds (array): Optional parameter to filter 'filter lists' by network ID. This filter uses multiple exact matches. + - listIds (array): Optional parameter to filter 'filter lists' by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "filterLists"], + "operation": "getOrganizationSwitchRoutingBgpFiltersFilterLists", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "listIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "listIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpFiltersFilterLists: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpFiltersFilterListsDeploy( + self, organizationId: str, filterList: dict, network: dict, rules: list, **kwargs + ): + """ + **Create or update a filter list, in addition to its associated rules** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-filters-filter-lists-deploy + + - organizationId (string): Organization ID + - filterList (object): Information regarding the filter list + - network (object): Information regarding the network the filter list belongs to + - rules (array): Information regarding the filter list rules + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "filterLists", "deploy"], + "operation": "createOrganizationSwitchRoutingBgpFiltersFilterListsDeploy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists/deploy" + + body_params = [ + "filterList", + "network", + "rules", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpFiltersFilterListsDeploy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchRoutingBgpFiltersFilterListsOverviewByFilterList( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the overview of the filter lists configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-filters-filter-lists-overview-by-filter-list + + - 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 + - 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. + - networkIds (array): Optional parameter to filter 'filter list' overviews by network ID. This filter uses multiple exact matches. + - listIds (array): Optional parameter to filter 'filter list' overviews by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "routing", "bgp", "filters", "filterLists", "overview", "byFilterList"], + "operation": "getOrganizationSwitchRoutingBgpFiltersFilterListsOverviewByFilterList", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists/overview/byFilterList" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "listIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "listIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpFiltersFilterListsOverviewByFilterList: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpFiltersFilterListsRules( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the filter list rules configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-filters-filter-lists-rules + + - 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 + - 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. + - networkIds (array): Optional parameter to filter 'filter list' rules by network ID. This filter uses multiple exact matches. + - ruleIds (array): Optional parameter to filter 'filter list' rules by ID. This filter uses multiple exact matches. + - filterListIds (array): Optional parameter to filter 'filter lists' by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "filterLists", "rules"], + "operation": "getOrganizationSwitchRoutingBgpFiltersFilterListsRules", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists/rules" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "ruleIds", + "filterListIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "ruleIds", + "filterListIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpFiltersFilterListsRules: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationSwitchRoutingBgpFiltersFilterList(self, organizationId: str, listId: str): + """ + **Delete a filter list** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-routing-bgp-filters-filter-list + + - organizationId (string): Organization ID + - listId (string): List ID + """ + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "filterLists"], + "operation": "deleteOrganizationSwitchRoutingBgpFiltersFilterList", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + listId = urllib.parse.quote(str(listId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists/{listId}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchRoutingBgpFiltersPrefixLists( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the prefix lists configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-filters-prefix-lists + + - 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 + - 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. + - networkIds (array): Optional parameter to filter prefix lists by network ID. This filter uses multiple exact matches. + - listIds (array): Optional parameter to filter prefix lists by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "prefixLists"], + "operation": "getOrganizationSwitchRoutingBgpFiltersPrefixLists", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "listIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "listIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpFiltersPrefixLists: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpFiltersPrefixListsDeploy( + self, organizationId: str, network: dict, prefixList: dict, rules: list, **kwargs + ): + """ + **Create or update a prefix list, in addition to its associated rules** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-filters-prefix-lists-deploy + + - organizationId (string): Organization ID + - network (object): Information regarding the network the prefix list belongs to + - prefixList (object): Information regarding the prefix list + - rules (array): Information regarding the prefix list rules + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "prefixLists", "deploy"], + "operation": "createOrganizationSwitchRoutingBgpFiltersPrefixListsDeploy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists/deploy" + + body_params = [ + "network", + "prefixList", + "rules", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpFiltersPrefixListsDeploy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchRoutingBgpFiltersPrefixListsOverviewByPrefixList( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the overview of the prefix lists configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-filters-prefix-lists-overview-by-prefix-list + + - 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 + - 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. + - networkIds (array): Optional parameter to filter prefix list overviews by network ID. This filter uses multiple exact matches. + - listIds (array): Optional parameter to filter prefix list overviews by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "routing", "bgp", "filters", "prefixLists", "overview", "byPrefixList"], + "operation": "getOrganizationSwitchRoutingBgpFiltersPrefixListsOverviewByPrefixList", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists/overview/byPrefixList" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "listIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "listIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpFiltersPrefixListsOverviewByPrefixList: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpFiltersPrefixListsRules( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the prefix list rules configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-filters-prefix-lists-rules + + - 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 + - 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. + - networkIds (array): Optional parameter to filter prefix list rules by network ID. This filter uses multiple exact matches. + - prefixListIds (array): Optional parameter to filter prefix list rules by prefix list ID. This filter uses multiple exact matches. + - ruleIds (array): Optional parameter to filter prefix list rules by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "prefixLists", "rules"], + "operation": "getOrganizationSwitchRoutingBgpFiltersPrefixListsRules", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists/rules" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "prefixListIds", + "ruleIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "prefixListIds", + "ruleIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpFiltersPrefixListsRules: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationSwitchRoutingBgpFiltersPrefixList(self, organizationId: str, listId: str): + """ + **Delete a prefix list** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-routing-bgp-filters-prefix-list + + - organizationId (string): Organization ID + - listId (string): List ID + """ + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "prefixLists"], + "operation": "deleteOrganizationSwitchRoutingBgpFiltersPrefixList", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + listId = urllib.parse.quote(str(listId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists/{listId}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchRoutingBgpPeersGroups(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the BGP peer groups configured in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-groups + + - 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 + - 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. + - networkIds (array): Optional parameter to filter peer groups by network ID. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter peer groups by router ID. This filter uses multiple exact matches. + - profileIds (array): Optional parameter to filter peer groups by profile ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter peer groups by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "groups"], + "operation": "getOrganizationSwitchRoutingBgpPeersGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/groups" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "routerIds", + "profileIds", + "peerGroupIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "routerIds", + "profileIds", + "peerGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersGroups: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpPeersGroupsAddressFamiliesDeployments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List all BGP deployment information for multiple peer groups or address families configured in the given organization, including profile information, peer group address family information, neighbors, and listen ranges** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-groups-address-families-deployments + + - 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 + - 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. + - networkIds (array): Optional parameter to filter peer group address family deployments by network ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter peer group address family deployments by peer group + - addressFamilyIds (array): Optional parameter to filter peer group address family deployments by address family + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "groups", "addressFamilies", "deployments"], + "operation": "getOrganizationSwitchRoutingBgpPeersGroupsAddressFamiliesDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/groups/addressFamilies/deployments" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "peerGroupIds", + "addressFamilyIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "peerGroupIds", + "addressFamilyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersGroupsAddressFamiliesDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpPeersGroupsDeploy( + self, + organizationId: str, + addressFamily: dict, + network: dict, + peerGroup: dict, + peerGroupAddressFamilyBindingProfile: dict, + peerGroupProfile: dict, + policies: list, + router: dict, + **kwargs, + ): + """ + **Create or update a peer group, in addition to an associated peer group profile, peer group address family binding, peer group address family binding profile and routing policies associated with the peer group** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-peers-groups-deploy + + - organizationId (string): Organization ID + - addressFamily (object): Information regarding the address family the peer group address family binding belongs to + - network (object): Information regarding the network the peer group profile belongs to + - peerGroup (object): Information regarding the peer group + - peerGroupAddressFamilyBindingProfile (object): Information regarding the peer group address family binding profile + - peerGroupProfile (object): Information regarding the peer group profile + - policies (array): Information regarding the routing policies + - router (object): Information regarding the router this peer group belongs to + - peerGroupAddressFamilyBinding (object): Information regarding the peer group address family binding. Only required when updating. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "groups", "deploy"], + "operation": "createOrganizationSwitchRoutingBgpPeersGroupsDeploy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/groups/deploy" + + body_params = [ + "addressFamily", + "network", + "peerGroup", + "peerGroupAddressFamilyBinding", + "peerGroupAddressFamilyBindingProfile", + "peerGroupProfile", + "policies", + "router", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpPeersGroupsDeploy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchRoutingBgpPeersGroupsDeployments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List all BGP deployment information for peer groups configured in the given organization, including peer group address family information, as well as routing policies** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-groups-deployments + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 20. + - 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. + - networkIds (array): Optional parameter to filter peer group deployments by network ID. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter peer group deployments by router ID. This filter uses multiple exact matches. + - profileIds (array): Optional parameter to filter peer group deployments by profile ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter peer group deployments by peer group ID. This filter uses multiple exact matches. + - afi (string): Optional parameter to filter deployments on each peer group by address family identifier (AFI). + - safi (string): Optional parameter to filter deployments on each peer group by subsequent address family identifier (SAFI). + """ + + kwargs.update(locals()) + + if "afi" in kwargs: + options = ["ipv4"] + assert kwargs["afi"] in options, f'''"afi" cannot be "{kwargs["afi"]}", & must be set to one of: {options}''' + if "safi" in kwargs: + options = ["unicast"] + assert kwargs["safi"] in options, f'''"safi" cannot be "{kwargs["safi"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "groups", "deployments"], + "operation": "getOrganizationSwitchRoutingBgpPeersGroupsDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/groups/deployments" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "routerIds", + "profileIds", + "peerGroupIds", + "afi", + "safi", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "routerIds", + "profileIds", + "peerGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersGroupsDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpPeersGroupsOverviewByPeerGroup( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the overview of the BGP peer groups configured in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-groups-overview-by-peer-group + + - 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 + - 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. + - networkIds (array): Optional parameter to filter peer group overviews by network ID. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter peer group overviews by router ID. This filter uses multiple exact matches. + - profileIds (array): Optional parameter to filter peer group overviews by profile ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter peer group overviews by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "routing", "bgp", "peers", "groups", "overview", "byPeerGroup"], + "operation": "getOrganizationSwitchRoutingBgpPeersGroupsOverviewByPeerGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/groups/overview/byPeerGroup" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "routerIds", + "profileIds", + "peerGroupIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "routerIds", + "profileIds", + "peerGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersGroupsOverviewByPeerGroup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpPeersListenRanges(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the listen ranges configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-listen-ranges + + - 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 + - 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. + - networkIds (array): Optional parameter to filter listen ranges by network ID. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter listen ranges by router ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter listen ranges by peer group ID. This filter uses multiple exact matches. + - listenRangeIds (array): Optional parameter to filter listen ranges by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "listenRanges"], + "operation": "getOrganizationSwitchRoutingBgpPeersListenRanges", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/listenRanges" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "routerIds", + "peerGroupIds", + "listenRangeIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "routerIds", + "peerGroupIds", + "listenRangeIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersListenRanges: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpPeersNeighbors(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the neighbors configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-neighbors + + - 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 + - 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. + - networkIds (array): Optional parameter to filter neighbors by network ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter neighbors by peer group ID. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter neighbors by router ID. This filter uses multiple exact matches. + - neighborIds (array): Optional parameter to filter neighbors by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "neighbors"], + "operation": "getOrganizationSwitchRoutingBgpPeersNeighbors", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/neighbors" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "peerGroupIds", + "routerIds", + "neighborIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "peerGroupIds", + "routerIds", + "neighborIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersNeighbors: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpPeersNeighborsDeploy( + self, + organizationId: str, + addressFamily: dict, + neighbor: dict, + neighborAddressFamilyBinding: dict, + peerGroup: dict, + policies: list, + router: dict, + **kwargs, + ): + """ + **Create or update a neighor, in addition to an associated neighbor address family binding and routing policies associated with the neighbor** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-peers-neighbors-deploy + + - organizationId (string): Organization ID + - addressFamily (object): Information regarding the address family this binding is bound to + - neighbor (object): Information regarding the BPG neighbor + - neighborAddressFamilyBinding (object): Information regarding the neighbor address family binding + - peerGroup (object): Information regarding the peer group this neighbor belongs to + - policies (array): Information regarding the routing policies related to the neighbor + - router (object): Information regarding the router this neighbor peers with + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "neighbors", "deploy"], + "operation": "createOrganizationSwitchRoutingBgpPeersNeighborsDeploy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/neighbors/deploy" + + body_params = [ + "addressFamily", + "neighbor", + "neighborAddressFamilyBinding", + "peerGroup", + "policies", + "router", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpPeersNeighborsDeploy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchRoutingBgpPeersNeighborsDeployments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List all BGP deployment information for neighbors configured in the given organization, including address family information, as well as routing policies** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-neighbors-deployments + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 20. + - 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. + - networkIds (array): Optional parameter to filter neighbor deployments by network ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter neighbor deployments by peer group ID. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter neighbor deployments by router ID. This filter uses multiple exact matches. + - neighborIds (array): Optional parameter to filter neighbor deployments by neighbor ID. This filter uses multiple exact matches. + - afi (string): Optional parameter to filter deployments on each neighbor by address family identifier (AFI). + - safi (string): Optional parameter to filter deployments on each neighbor by subsequent address family identifier (SAFI). + """ + + kwargs.update(locals()) + + if "afi" in kwargs: + options = ["ipv4"] + assert kwargs["afi"] in options, f'''"afi" cannot be "{kwargs["afi"]}", & must be set to one of: {options}''' + if "safi" in kwargs: + options = ["unicast"] + assert kwargs["safi"] in options, f'''"safi" cannot be "{kwargs["safi"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "neighbors", "deployments"], + "operation": "getOrganizationSwitchRoutingBgpPeersNeighborsDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/neighbors/deployments" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "peerGroupIds", + "routerIds", + "neighborIds", + "afi", + "safi", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "peerGroupIds", + "routerIds", + "neighborIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersNeighborsDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpRouters(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the routers configured in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-routers + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. 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. + - networkIds (array): Optional parameter to filter routers by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter routers by serial. This filter uses multiple exact matches. + - switchNames (array): Optional parameter to filter routers by switch name. The filter uses multiple exact matches. + - asNumbers (array): Optional parameter to filter routers by autonomous system number. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter routers by ID. This filter uses multiple exact matches. + - switchStackIds (array): Optional parameter to filter routers by switch stack id. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "routers"], + "operation": "getOrganizationSwitchRoutingBgpRouters", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + "switchNames", + "asNumbers", + "routerIds", + "switchStackIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "switchNames", + "asNumbers", + "routerIds", + "switchStackIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpRouters: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpRoutersDeploy( + self, + organizationId: str, + addressFamily: dict, + addressFamilyPrefixes: list, + addressFamilyProfile: dict, + autonomousSystem: dict, + router: dict, + switch: dict, + **kwargs, + ): + """ + **Create a BGP router, in addition to an associated address family, address family prefixes, and address family profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-routers-deploy + + - organizationId (string): Organization ID + - addressFamily (object): Information regarding the address family + - addressFamilyPrefixes (array): The list of network prefixes to which the address family applies + - addressFamilyProfile (object): Information regarding the profile applied to the address family + - autonomousSystem (object): Information regarding the router's autonomous system + - router (object): Information regarding the BPG router + - switch (object): The router's switch node. When the router is part of a switch stack, this is the switch stack's active node + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "routers", "deploy"], + "operation": "createOrganizationSwitchRoutingBgpRoutersDeploy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/deploy" + + body_params = [ + "addressFamily", + "addressFamilyPrefixes", + "addressFamilyProfile", + "autonomousSystem", + "router", + "switch", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpRoutersDeploy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchRoutingBgpRoutersDeployments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List all BGP deployment information for routers configured in a given organization, including all address families** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-routers-deployments + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 20. + - 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. + - networkIds (array): Optional parameter to filter router deployments by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter router deployments by serial. This filter uses multiple exact matches. + - switchNames (array): Optional parameter to filter router deployments by switch name. The filter uses multiple exact matches. + - asNumbers (array): Optional parameter to filter router deployments by autonomous system number. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter router deployments by router ID. This filter uses multiple exact matches. + - switchStackIds (array): Optional parameter to filter router deployments by switch stack id. This filter uses multiple exact matches. + - afi (string): Optional parameter to filter deployments on each router by address family identifier (AFI). + - safi (string): Optional parameter to filter deployments on each router by subsequent address family identifier (SAFI). + """ + + kwargs.update(locals()) + + if "afi" in kwargs: + options = ["ipv4"] + assert kwargs["afi"] in options, f'''"afi" cannot be "{kwargs["afi"]}", & must be set to one of: {options}''' + if "safi" in kwargs: + options = ["unicast"] + assert kwargs["safi"] in options, f'''"safi" cannot be "{kwargs["safi"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "routers", "deployments"], + "operation": "getOrganizationSwitchRoutingBgpRoutersDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/deployments" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + "switchNames", + "asNumbers", + "routerIds", + "switchStackIds", + "afi", + "safi", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "switchNames", + "asNumbers", + "routerIds", + "switchStackIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpRoutersDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpRoutersOverviewByRouter( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the overview of the routers configured in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-routers-overview-by-router + + - 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 + - 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. + - networkIds (array): Optional parameter to filter router overviews by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter router overviews by serial. This filter uses multiple exact matches. + - switchNames (array): Optional parameter to filter router overviews by switch name. This filter uses multiple exact matches. + - asNumbers (array): Optional parameter to filter router overviews by autonomous system number. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter router overviews by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "routing", "bgp", "routers", "overview", "byRouter"], + "operation": "getOrganizationSwitchRoutingBgpRoutersOverviewByRouter", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/overview/byRouter" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + "switchNames", + "asNumbers", + "routerIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "switchNames", + "asNumbers", + "routerIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpRoutersOverviewByRouter: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpRoutersPeersDeploy( + self, organizationId: str, addressFamily: dict, peerGroups: list, router: dict, **kwargs + ): + """ + **Create and update listen ranges, update peers' enabled flag, and delete peer groups for a BGP router** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-routers-peers-deploy + + - organizationId (string): Organization ID + - addressFamily (object): Information regarding the address family + - peerGroups (array): Information regarding the peer group peers for a router's peer group + - router (object): Information regarding the BPG router + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "routers", "peers", "deploy"], + "operation": "createOrganizationSwitchRoutingBgpRoutersPeersDeploy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/peers/deploy" + + body_params = [ + "addressFamily", + "peerGroups", + "router", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpRoutersPeersDeploy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def deleteOrganizationSwitchRoutingBgpRouter(self, organizationId: str, routerId: str): + """ + **Delete a router from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-routing-bgp-router + + - organizationId (string): Organization ID + - routerId (string): Router ID + """ + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "routers"], + "operation": "deleteOrganizationSwitchRoutingBgpRouter", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + routerId = urllib.parse.quote(str(routerId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/{routerId}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchRoutingStaticRoutes(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List layer 3 static routes for switches within an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-static-routes + + - 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): Optional parameter to filter the result set by the included set of network IDs + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 20. + - 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": ["switch", "monitor", "routing", "staticRoutes"], + "operation": "getOrganizationSwitchRoutingStaticRoutes", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/staticRoutes" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingStaticRoutes: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchSpanningTree(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns Spanning Tree configuration settings** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-spanning-tree + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter by network ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "spanningTree"], + "operation": "getOrganizationSwitchSpanningTree", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/spanningTree" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSwitchSpanningTree: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchStacksPortsMirrorsByStack(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the port mirror configurations in an organization by switch** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-stacks-ports-mirrors-by-stack + + - 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 + - ids (array): Return the port mirror configuration for the specified stack(s) + - networkIds (array): Return the port mirror configurations for the specified network(s) + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. + - 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": ["switch", "configure", "stacks", "ports", "mirrors", "byStack"], + "operation": "getOrganizationSwitchStacksPortsMirrorsByStack", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/stacks/ports/mirrors/byStack" + + query_params = [ + "ids", + "networkIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "ids", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchStacksPortsMirrorsByStack: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) diff --git a/meraki/aio/api/users.py b/meraki/aio/api/users.py new file mode 100644 index 00000000..c75cffd1 --- /dev/null +++ b/meraki/aio/api/users.py @@ -0,0 +1,838 @@ +import urllib + + +class AsyncUsers: + def __init__(self, session): + super().__init__() + self._session = session + + def getOrganizationIamUsersAuthorizations( + self, organizationId: str, userIds: list, total_pages=1, direction="next", **kwargs + ): + """ + **List specific authorizations for the list of Meraki end users.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-authorizations + + - organizationId (string): Organization ID + - userIds (array): Meraki end user 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 10. + - 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": ["users", "configure", "iam", "authorizations"], + "operation": "getOrganizationIamUsersAuthorizations", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "userIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "userIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationIamUsersAuthorizations: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationIamUsersAuthorization(self, organizationId: str, authZone: dict, **kwargs): + """ + **Authorize a Meraki end user for an auth zone.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-authorization + + - organizationId (string): Organization ID + - authZone (object): Auth zone + - email (string): Meraki end user's email + - idpUserId (string): Meraki end user's ID + - startsAt (string): Start time of the desired access for the authorization. Defaults to now. + - expiresAt (string): Expiration time of the desired access for the authorization + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "authorizations"], + "operation": "createOrganizationIamUsersAuthorization", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations" + + body_params = [ + "email", + "idpUserId", + "authZone", + "startsAt", + "expiresAt", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationIamUsersAuthorization: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationIamUsersAuthorizations(self, organizationId: str, **kwargs): + """ + **Update a Meraki end user's access to an auth zone.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-iam-users-authorizations + + - organizationId (string): Organization ID + - authorizationId (string): Authorization ID + - email (string): Meraki end user's email + - authZone (object): Auth zone + - startsAt (string): Start time of the desired access for the authorization + - expiresAt (string): Expiration time of the desired access for the authorization + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "authorizations"], + "operation": "updateOrganizationIamUsersAuthorizations", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations" + + body_params = [ + "authorizationId", + "email", + "authZone", + "startsAt", + "expiresAt", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationIamUsersAuthorizations: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def revokeOrganizationIamUsersAuthorizationsAuthorization(self, organizationId: str, authZone: dict, **kwargs): + """ + **Revoke a Meraki end user's access to an auth zone.** + https://developer.cisco.com/meraki/api-v1/#!revoke-organization-iam-users-authorizations-authorization + + - organizationId (string): Organization ID + - authZone (object): Auth zone + - email (string): Meraki end user's email + - authorizationId (string): Authorization ID + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "authorizations", "authorization"], + "operation": "revokeOrganizationIamUsersAuthorizationsAuthorization", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations/authorization/revoke" + + body_params = [ + "email", + "authorizationId", + "authZone", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"revokeOrganizationIamUsersAuthorizationsAuthorization: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationIamUsersAuthorizationsZones(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List all of the available auth zones for an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-authorizations-zones + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 10 - 1000. Default is 100. + - 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": ["users", "configure", "iam", "authorizations", "zones"], + "operation": "getOrganizationIamUsersAuthorizationsZones", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations/zones" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationIamUsersAuthorizationsZones: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationIamUsersAuthorization(self, organizationId: str, authorizationId: str): + """ + **Delete an authorization for a Meraki end user.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-iam-users-authorization + + - organizationId (string): Organization ID + - authorizationId (string): Authorization ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "authorizations"], + "operation": "deleteOrganizationIamUsersAuthorization", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + authorizationId = urllib.parse.quote(str(authorizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations/{authorizationId}" + + return self._session.delete(metadata, resource) + + def createOrganizationIamUsersIdp(self, organizationId: str, name: str, type: str, idpConfig: dict, **kwargs): + """ + **Create an identity provider for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idp + + - organizationId (string): Organization ID + - name (string): Name of the identity provider + - type (string): Type of the identity provider + - idpConfig (object): Identity provider configuration. Required for external identity providers. + - description (string): Optional. Description of the identity provider + - syncType (string): The synchronization method for the identity provider. Set to 'proactive' to sync all users and groups from your identity provider. + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = ["Azure AD"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + if "syncType" in kwargs: + options = ["proactive"] + assert kwargs["syncType"] in options, ( + f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["users", "configure", "iam", "idps"], + "operation": "createOrganizationIamUsersIdp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps" + + body_params = [ + "name", + "type", + "description", + "idpConfig", + "syncType", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationIamUsersIdp: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def searchOrganizationIdpGroups(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Search all IdP groups for an organization** + https://developer.cisco.com/meraki/api-v1/#!search-organization-idp-groups + + - 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 + - idpIds (array): Filter IdP groups by IdP ID(s). Multiple IdP IDs can be passed as a comma separated list. + - authZone (object): Auth zone + - searchQuery (string): Fuzzy filter by group name + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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": ["users", "configure", "iam", "idps", "groups", "search"], + "operation": "searchOrganizationIdpGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/groups/search" + + body_params = [ + "idpIds", + "authZone", + "searchQuery", + "perPage", + "startingAfter", + "endingBefore", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"searchOrganizationIdpGroups: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationIamUsersIdpsProductIntegrations(self, organizationId: str): + """ + **List all available IdP Product Integration urls for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-idps-product-integrations + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "idps", "productIntegrations"], + "operation": "getOrganizationIamUsersIdpsProductIntegrations", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/productIntegrations" + + return self._session.get(metadata, resource) + + def createOrganizationIamUsersIdpsSearch(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Search all IdPs for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idps-search + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - idpIds (array): Filter identity providers by id(s). Multiple ids can be passed as a comma separated list. + - type (string): Filter identity providers by idp type. + - authZone (object): Filter by auth zone + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = ["Azure AD"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["users", "configure", "iam", "idps", "search"], + "operation": "createOrganizationIamUsersIdpsSearch", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/search" + + body_params = [ + "perPage", + "startingAfter", + "endingBefore", + "idpIds", + "type", + "authZone", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationIamUsersIdpsSearch: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationIamUsersIdpsSyncHistory(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get the IdP sync status records for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-idps-sync-history + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - idpId (string): Identity provider ID. Optional. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "idps", "sync", "history"], + "operation": "getOrganizationIamUsersIdpsSyncHistory", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/sync/history" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "idpId", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationIamUsersIdpsSyncHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationIamUsersIdpsSyncLatest(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get the latest IdP sync status records for all IdPs in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-idps-sync-latest + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - idpIds (array): Identity provider IDs. Optional. + - authZoneId (string): Auth Zone ID + - authZoneType (string): Auth Zone type + """ + + kwargs.update(locals()) + + if "authZoneType" in kwargs: + options = ["access_policy", "node_group", "product", "ssid"] + assert kwargs["authZoneType"] in options, ( + f'''"authZoneType" cannot be "{kwargs["authZoneType"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["users", "configure", "iam", "idps", "sync", "latest"], + "operation": "getOrganizationIamUsersIdpsSyncLatest", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/sync/latest" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "idpIds", + "authZoneId", + "authZoneType", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "idpIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationIamUsersIdpsSyncLatest: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationIamUsersIdpsTestConnectivity(self, organizationId: str, **kwargs): + """ + **Test connectivity to an Entra ID identity provider.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idps-test-connectivity + + - organizationId (string): Organization ID + - idpId (string): Id of the identity provider + - idpConfig (object): Identity provider configuration. Required for external identity providers. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "idps", "testConnectivity"], + "operation": "createOrganizationIamUsersIdpsTestConnectivity", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/testConnectivity" + + body_params = [ + "idpId", + "idpConfig", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationIamUsersIdpsTestConnectivity: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def createOrganizationIamUsersIdpsUser(self, organizationId: str, **kwargs): + """ + **Create a Meraki user** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idps-user + + - organizationId (string): Organization ID + - displayName (string): A human-readable identifier for the created user. + - email (string): An email address identified with the user. + - password (string): The password for the user account. + - sendPassword (boolean): If true, sends an email with the password to the user. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "idps"], + "operation": "createOrganizationIamUsersIdpsUser", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/users" + + body_params = [ + "displayName", + "email", + "password", + "sendPassword", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationIamUsersIdpsUser: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateOrganizationIamUsersIdpsUser(self, organizationId: str, id: str, **kwargs): + """ + **Update a Meraki user** + https://developer.cisco.com/meraki/api-v1/#!update-organization-iam-users-idps-user + + - organizationId (string): Organization ID + - id (string): ID + - displayName (string): A human-readable identifier for the created user. + - email (string): An email address identified with the user. + - password (string): The password for the user account. + - sendPassword (boolean): If true, sends an email with the password to the user. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "idps"], + "operation": "updateOrganizationIamUsersIdpsUser", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/users/{id}" + + body_params = [ + "displayName", + "email", + "password", + "sendPassword", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationIamUsersIdpsUser: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationIamUsersIdpsUser(self, organizationId: str, id: str): + """ + **Delete a Meraki end user** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-iam-users-idps-user + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "idps"], + "operation": "deleteOrganizationIamUsersIdpsUser", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/users/{id}" + + return self._session.delete(metadata, resource) + + def createOrganizationIamUsersIdpSync(self, organizationId: str, idpId: str, **kwargs): + """ + **Trigger an IdP sync for an identity provider** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idp-sync + + - organizationId (string): Organization ID + - idpId (string): Idp ID + - emails (array): List of emails to sync + - force (boolean): Force a complete sync of all users and groups + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "idps", "sync"], + "operation": "createOrganizationIamUsersIdpSync", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + idpId = urllib.parse.quote(str(idpId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{idpId}/sync" + + body_params = [ + "emails", + "force", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationIamUsersIdpSync: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationIamUsersIdpSyncLatest(self, organizationId: str, idpId: str): + """ + **Get the latest IdP sync status for an identity provider** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-idp-sync-latest + + - organizationId (string): Organization ID + - idpId (string): Idp ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "idps", "sync", "latest"], + "operation": "getOrganizationIamUsersIdpSyncLatest", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + idpId = urllib.parse.quote(str(idpId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{idpId}/sync/latest" + + return self._session.get(metadata, resource) + + def updateOrganizationIamUsersIdp(self, organizationId: str, id: str, **kwargs): + """ + **Update an identity provider** + https://developer.cisco.com/meraki/api-v1/#!update-organization-iam-users-idp + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of the identity provider + - description (string): Description of the identity provider + - idpConfig (object): Identity provider configuration. You can update individual attributes + - syncType (string): The synchronization method for the identity provider. Set to 'proactive' to sync all users and groups from your identity provider. Set to 'null' for on-demand user and group provisioning. + """ + + kwargs.update(locals()) + + if "syncType" in kwargs: + options = ["proactive"] + assert kwargs["syncType"] in options, ( + f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["users", "configure", "iam", "idps"], + "operation": "updateOrganizationIamUsersIdp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{id}" + + body_params = [ + "name", + "description", + "idpConfig", + "syncType", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationIamUsersIdp: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationIamUsersIdp(self, organizationId: str, id: str): + """ + **Delete a identity provider from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-iam-users-idp + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "idps"], + "operation": "deleteOrganizationIamUsersIdp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationIamUsersIdpAuthZones(self, organizationId: str, id: str): + """ + **List all auth zones for an identity provider** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-idp-auth-zones + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "idps", "authZones"], + "operation": "getOrganizationIamUsersIdpAuthZones", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{id}/authZones" + + return self._session.get(metadata, resource) + + def searchOrganizationUsers(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the end users and their associated identity providers for an organization.** + https://developer.cisco.com/meraki/api-v1/#!search-organization-users + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 10. + - 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. + - userIds (array): Filter end users by id(s). + - idpIds (array): Filter by identity provider id(s). + - groupIds (array): Filter by identity provider group id(s). + - accessTypes (array): Filter by access type(s). + - searchQuery (string): Fuzzy filter by display name, user name and email. + - statuses (array): Filter by user status(es). + - sortKey (string): Optional parameter to specify the field used to sort results. (default: username) + - sortOrder (string): Optional parameter to specify the sort order. (default: asc) + """ + + kwargs.update(locals()) + + if "sortKey" in kwargs: + options = ["created_at", "updated_at", "username"] + assert kwargs["sortKey"] in options, ( + f'''"sortKey" cannot be "{kwargs["sortKey"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["users", "configure", "iam", "search"], + "operation": "searchOrganizationUsers", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/search" + + body_params = [ + "perPage", + "startingAfter", + "endingBefore", + "userIds", + "idpIds", + "groupIds", + "accessTypes", + "searchQuery", + "statuses", + "sortKey", + "sortOrder", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"searchOrganizationUsers: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationIamUsersSummaryPanel(self, organizationId: str): + """ + **Get the count of users and user groups for an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-summary-panel + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "summaryPanel"], + "operation": "getOrganizationIamUsersSummaryPanel", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/summaryPanel" + + return self._session.get(metadata, resource) diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index 380d1dcc..87306a97 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -68,6 +68,7 @@ def updateDeviceWirelessBluetoothSettings(self, serial: str, **kwargs): Dashboard's automatically generated value. - minor (integer): Desired minor value of the beacon. If the value is set to null it will reset to Dashboard's automatically generated value. + - transmit (object): Transmit settings including power, interval, and advertised power. """ kwargs.update(locals()) @@ -83,6 +84,7 @@ def updateDeviceWirelessBluetoothSettings(self, serial: str, **kwargs): "uuid", "major", "minor", + "transmit", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -196,6 +198,23 @@ def updateDeviceWirelessElectronicShelfLabel(self, serial: str, **kwargs): return self._session.put(metadata, resource, payload) + def getDeviceWirelessHealthScores(self, serial: str): + """ + **Fetch the health scores for a given AP on this network** + https://developer.cisco.com/meraki/api-v1/#!get-device-wireless-health-scores + + - serial (string): Serial + """ + + metadata = { + "tags": ["wireless", "monitor", "healthScores"], + "operation": "getDeviceWirelessHealthScores", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/healthScores" + + return self._session.get(metadata, resource) + def getDeviceWirelessLatencyStats(self, serial: str, **kwargs): """ **Aggregated latency info for a given AP on this network** @@ -248,6 +267,123 @@ def getDeviceWirelessLatencyStats(self, serial: str, **kwargs): return self._session.get(metadata, resource, params) + def getDeviceWirelessRadioAfcPosition(self, serial: str): + """ + **Return the position for a wireless device** + https://developer.cisco.com/meraki/api-v1/#!get-device-wireless-radio-afc-position + + - serial (string): Serial + """ + + metadata = { + "tags": ["wireless", "configure", "radio", "afc", "position"], + "operation": "getDeviceWirelessRadioAfcPosition", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/radio/afc/position" + + return self._session.get(metadata, resource) + + def updateDeviceWirelessRadioAfcPosition(self, serial: str, **kwargs): + """ + **Update the position attributes for this device** + https://developer.cisco.com/meraki/api-v1/#!update-device-wireless-radio-afc-position + + - serial (string): Serial + - height (object): Height attributes + - gps (object): GPS attributes + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "afc", "position"], + "operation": "updateDeviceWirelessRadioAfcPosition", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/radio/afc/position" + + body_params = [ + "height", + "gps", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateDeviceWirelessRadioAfcPosition: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getDeviceWirelessRadioAfcPowerLimits(self, serial: str): + """ + **Return the AFC power limits for a wireless device** + https://developer.cisco.com/meraki/api-v1/#!get-device-wireless-radio-afc-power-limits + + - serial (string): Serial + """ + + metadata = { + "tags": ["wireless", "configure", "radio", "afc", "powerLimits"], + "operation": "getDeviceWirelessRadioAfcPowerLimits", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/radio/afc/powerLimits" + + return self._session.get(metadata, resource) + + def getDeviceWirelessRadioOverrides(self, serial: str): + """ + **Return the radio overrides of a device** + https://developer.cisco.com/meraki/api-v1/#!get-device-wireless-radio-overrides + + - serial (string): Serial + """ + + metadata = { + "tags": ["wireless", "configure", "radio", "overrides"], + "operation": "getDeviceWirelessRadioOverrides", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/radio/overrides" + + return self._session.get(metadata, resource) + + def updateDeviceWirelessRadioOverrides(self, serial: str, **kwargs): + """ + **Update 2.4 GHz, 5 GHz, and 6 GHz radio settings (channel, channel width, power, and enable/disable) that override RF profiles.** + https://developer.cisco.com/meraki/api-v1/#!update-device-wireless-radio-overrides + + - serial (string): Serial + - rfProfile (object): This device's RF profile + - radios (array): Radio overrides. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "overrides"], + "operation": "updateDeviceWirelessRadioOverrides", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/radio/overrides" + + body_params = [ + "rfProfile", + "radios", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateDeviceWirelessRadioOverrides: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getDeviceWirelessRadioSettings(self, serial: str): """ **Return the manually configured radio settings overrides of a device, which take precedence over RF profiles.** @@ -300,6 +436,23 @@ def updateDeviceWirelessRadioSettings(self, serial: str, **kwargs): return self._session.put(metadata, resource, payload) + def getDeviceWirelessRadioStatus(self, serial: str): + """ + **Show the status of this device's radios** + https://developer.cisco.com/meraki/api-v1/#!get-device-wireless-radio-status + + - serial (string): Serial + """ + + metadata = { + "tags": ["wireless", "configure", "radio", "status"], + "operation": "getDeviceWirelessRadioStatus", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/radio/status" + + return self._session.get(metadata, resource) + def getDeviceWirelessStatus(self, serial: str): """ **Return the SSID statuses of an access point** @@ -655,6 +808,7 @@ def updateNetworkWirelessBluetoothSettings(self, networkId: str, **kwargs): - majorMinorAssignmentMode (string): The way major and minor number should be assigned to nodes in the network. ('Unique', 'Non-unique') - major (integer): The major number to be used in the beacon identifier. Only valid in 'Non-unique' mode. - minor (integer): The minor number to be used in the beacon identifier. Only valid in 'Non-unique' mode. + - transmit (object): Transmit settings including power, interval, and advertised power. """ kwargs.update(locals()) @@ -679,6 +833,7 @@ def updateNetworkWirelessBluetoothSettings(self, networkId: str, **kwargs): "majorMinorAssignmentMode", "major", "minor", + "transmit", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -848,6 +1003,23 @@ def getNetworkWirelessClientsConnectionStats(self, networkId: str, **kwargs): return self._session.get(metadata, resource, params) + def getNetworkWirelessClientsHealthScores(self, networkId: str): + """ + **Fetch the health scores for all clients on this network** + https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-clients-health-scores + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["wireless", "monitor", "clients", "healthScores"], + "operation": "getNetworkWirelessClientsHealthScores", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/clients/healthScores" + + return self._session.get(metadata, resource) + def getNetworkWirelessClientsLatencyStats(self, networkId: str, **kwargs): """ **Aggregated latency info for this network, grouped by clients** @@ -902,6 +1074,53 @@ def getNetworkWirelessClientsLatencyStats(self, networkId: str, **kwargs): return self._session.get(metadata, resource, params) + def getNetworkWirelessClientsOnboardingHistory(self, networkId: str, **kwargs): + """ + **Return counts of distinct wireless clients connecting to a network over time** + https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-clients-onboarding-history + + - networkId (string): Network ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 7 days. + - resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 300. The default is 300. + - band (string): Filter results by band (either '2.4', '5' or '6'); this cannot be combined with the SSID filter. + - ssid (integer): Filter results by SSID number; this cannot be combined with the band filter. + """ + + kwargs.update(locals()) + + if "band" in kwargs: + options = ["2.4", "5", "6"] + assert kwargs["band"] in options, f'''"band" cannot be "{kwargs["band"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["wireless", "monitor", "clients", "onboardingHistory"], + "operation": "getNetworkWirelessClientsOnboardingHistory", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/clients/onboardingHistory" + + query_params = [ + "t0", + "t1", + "timespan", + "resolution", + "band", + "ssid", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getNetworkWirelessClientsOnboardingHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getNetworkWirelessClientConnectionStats(self, networkId: str, clientId: str, **kwargs): """ **Aggregated connectivity info for a given client on this network** @@ -1038,6 +1257,25 @@ def getNetworkWirelessClientConnectivityEvents( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getNetworkWirelessClientHealthScores(self, networkId: str, clientId: str): + """ + **Fetch the health scores for a given client on this network** + https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-client-health-scores + + - networkId (string): Network ID + - clientId (string): Client ID + """ + + metadata = { + "tags": ["wireless", "monitor", "clients", "healthScores"], + "operation": "getNetworkWirelessClientHealthScores", + } + networkId = urllib.parse.quote(str(networkId), safe="") + clientId = urllib.parse.quote(str(clientId), safe="") + resource = f"/networks/{networkId}/wireless/clients/{clientId}/healthScores" + + return self._session.get(metadata, resource) + def getNetworkWirelessClientLatencyHistory(self, networkId: str, clientId: str, **kwargs): """ **Return the latency history for a client** @@ -1133,6 +1371,53 @@ def getNetworkWirelessClientLatencyStats(self, networkId: str, clientId: str, ** return self._session.get(metadata, resource, params) + def getNetworkWirelessClientRoamingHistory(self, networkId: str, clientId: str, total_pages=1, direction="next", **kwargs): + """ + **Get client roam events within the specified timespan.** + https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-client-roaming-history + + - networkId (string): Network ID + - clientId (string): Client 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - 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 30 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 30 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "clients", "roaming", "history"], + "operation": "getNetworkWirelessClientRoamingHistory", + } + networkId = urllib.parse.quote(str(networkId), safe="") + clientId = urllib.parse.quote(str(clientId), safe="") + resource = f"/networks/{networkId}/wireless/clients/{clientId}/roaming/history" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getNetworkWirelessClientRoamingHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getNetworkWirelessConnectionStats(self, networkId: str, **kwargs): """ **Aggregated connectivity info for this network** @@ -1284,6 +1569,23 @@ def getNetworkWirelessDevicesConnectionStats(self, networkId: str, **kwargs): return self._session.get(metadata, resource, params) + def getNetworkWirelessDevicesHealthScores(self, networkId: str): + """ + **Fetch the health scores of all APs on this network** + https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-devices-health-scores + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["wireless", "monitor", "devices", "healthScores"], + "operation": "getNetworkWirelessDevicesHealthScores", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/devices/healthScores" + + return self._session.get(metadata, resource) + def getNetworkWirelessDevicesLatencyStats(self, networkId: str, **kwargs): """ **Aggregated latency info for this network, grouped by node** @@ -1811,6 +2113,41 @@ def updateNetworkWirelessLocationScanning(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) + def updateNetworkWirelessLocationWayfinding(self, networkId: str, **kwargs): + """ + **Change client wayfinding settings** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-location-wayfinding + + - networkId (string): Network ID + - enabled (boolean): Whether to enable client wayfinding on that network (only supported on Wireless networks). + - maintenanceWindow (object): Maintenance window during which optimization might take place to improve location accuracy. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "location", "wayfinding"], + "operation": "updateNetworkWirelessLocationWayfinding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/location/wayfinding" + + body_params = [ + "enabled", + "maintenanceWindow", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateNetworkWirelessLocationWayfinding: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + def getNetworkWirelessMeshStatuses(self, networkId: str, total_pages=1, direction="next", **kwargs): """ **List wireless mesh statuses for repeaters** @@ -1848,32 +2185,26 @@ def getNetworkWirelessMeshStatuses(self, networkId: str, total_pages=1, directio return self._session.get_pages(metadata, resource, params, total_pages, direction) - def updateNetworkWirelessRadioRrm(self, networkId: str, **kwargs): + def updateNetworkWirelessOpportunisticPcap(self, networkId: str, **kwargs): """ - **Update the AutoRF settings for a wireless network** - https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-radio-rrm + **Update the Opportunistic Pcap settings for a wireless network** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-opportunistic-pcap - networkId (string): Network ID - - busyHour (object): Busy Hour settings - - channel (object): Channel settings - - fra (object): FRA settings - - ai (object): AI settings + - enablement (object): Enablement settings """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "radio", "rrm"], - "operation": "updateNetworkWirelessRadioRrm", + "tags": ["wireless", "configure", "opportunisticPcap"], + "operation": "updateNetworkWirelessOpportunisticPcap", } networkId = urllib.parse.quote(str(networkId), safe="") - resource = f"/networks/{networkId}/wireless/radio/rrm" + resource = f"/networks/{networkId}/wireless/opportunisticPcap" body_params = [ - "busyHour", - "channel", - "fra", - "ai", + "enablement", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1881,18 +2212,94 @@ def updateNetworkWirelessRadioRrm(self, networkId: str, **kwargs): all_params = [] + body_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"updateNetworkWirelessRadioRrm: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"updateNetworkWirelessOpportunisticPcap: ignoring unrecognized kwargs: {invalid}" + ) return self._session.put(metadata, resource, payload) - def getNetworkWirelessRfProfiles(self, networkId: str, **kwargs): + def updateNetworkWirelessRadioAutoRf(self, networkId: str, **kwargs): """ - **List RF profiles for this network** - https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-rf-profiles + **Update the AutoRF settings for a wireless network** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-radio-auto-rf - networkId (string): Network ID - - includeTemplateProfiles (boolean): If the network is bound to a template, this parameter controls whether or not the non-basic RF profiles defined on the template should be included in the response alongside the non-basic profiles defined on the bound network. Defaults to false. - """ + - busyHour (object): Busy Hour settings + - channel (object): Channel settings + - fra (object): FRA settings + - aiRrm (object): AI-RRM settings + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "autoRf"], + "operation": "updateNetworkWirelessRadioAutoRf", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/radio/autoRf" + + body_params = [ + "busyHour", + "channel", + "fra", + "aiRrm", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkWirelessRadioAutoRf: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def updateNetworkWirelessRadioRrm(self, networkId: str, **kwargs): + """ + **Update the AutoRF settings for a wireless network** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-radio-rrm + + - networkId (string): Network ID + - busyHour (object): Busy Hour settings + - channel (object): Channel settings + - fra (object): FRA settings + - ai (object): AI settings + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "rrm"], + "operation": "updateNetworkWirelessRadioRrm", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/radio/rrm" + + body_params = [ + "busyHour", + "channel", + "fra", + "ai", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkWirelessRadioRrm: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getNetworkWirelessRfProfiles(self, networkId: str, **kwargs): + """ + **List RF profiles for this network** + https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-rf-profiles + + - networkId (string): Network ID + - includeTemplateProfiles (boolean): If the network is bound to a template, this parameter controls whether or not the non-basic RF profiles defined on the template should be included in the response alongside the non-basic profiles defined on the bound network. Defaults to false. + """ kwargs.update(locals()) @@ -2252,6 +2659,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - number (string): Number - name (string): The name of the SSID - enabled (boolean): Whether or not the SSID is enabled + - localAuth (boolean): Extended local auth flag for Enterprise NAC - authMode (string): The association control method for the SSID ('open', 'open-enhanced', 'psk', 'open-with-radius', 'open-enhanced-with-radius', 'open-with-nac', '8021x-meraki', '8021x-nac', '8021x-radius', '8021x-google', '8021x-entra', '8021x-localradius', 'ipsk-with-radius', 'ipsk-without-radius', 'ipsk-with-nac' or 'ipsk-with-radius-easy-psk') - enterpriseAdminAccess (string): Whether or not an SSID is accessible by 'enterprise' administrators ('access disabled' or 'access enabled') - ssidAdminAccessible (boolean): SSID Administrator access status @@ -2283,6 +2691,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - radiusAccountingInterimInterval (integer): The interval (in seconds) in which accounting information is updated and sent to the RADIUS accounting server. - radiusAttributeForGroupPolicies (string): Specify the RADIUS attribute used to look up group policies ('Filter-Id', 'Reply-Message', 'Airespace-ACL-Name' or 'Aruba-User-Role'). Access points must receive this attribute in the RADIUS Access-Accept message - ipAssignmentMode (string): The client IP assignment mode ('NAT mode', 'Bridge mode', 'Layer 3 roaming', 'Ethernet over GRE', 'Layer 3 roaming with a concentrator', 'VPN' or 'Campus Gateway') + - campusGateway (object): Campus gateway settings - useVlanTagging (boolean): Whether or not traffic should be directed to use specific VLANs. This param is only valid if the ipAssignmentMode is 'Bridge mode' or 'Layer 3 roaming' - concentratorNetworkId (string): The concentrator to use when the ipAssignmentMode is 'Layer 3 roaming with a concentrator' or 'VPN'. - secondaryConcentratorNetworkId (string): The secondary concentrator to use when the ipAssignmentMode is 'VPN'. If configured, the APs will switch to using this concentrator if the primary concentrator is unreachable. This param is optional. ('disabled' represents no secondary concentrator.) @@ -2403,6 +2812,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): body_params = [ "name", "enabled", + "localAuth", "authMode", "enterpriseAdminAccess", "ssidAdminAccessible", @@ -2434,6 +2844,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): "radiusAccountingInterimInterval", "radiusAttributeForGroupPolicies", "ipAssignmentMode", + "campusGateway", "useVlanTagging", "concentratorNetworkId", "secondaryConcentratorNetworkId", @@ -3015,6 +3426,152 @@ def updateNetworkWirelessSsidOpenRoaming(self, networkId: str, number: str, **kw return self._session.put(metadata, resource, payload) + def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, number: str, static: dict, **kwargs): + """ + **Update the client exclusion status configuration for a given SSID** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-policies-client-exclusion + + - networkId (string): Network ID + - number (string): Number + - static (object): Static client exclusion status + """ + + kwargs = locals() + + metadata = { + "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion"], + "operation": "updateNetworkWirelessSsidPoliciesClientExclusion", + } + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion" + + body_params = [ + "static", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateNetworkWirelessSsidPoliciesClientExclusion: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def updateNetworkWirelessSsidPoliciesClientExclusionStaticExclusions( + self, networkId: str, number: str, macs: list, **kwargs + ): + """ + **Set the static client exclusion list for the given SSID** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-policies-client-exclusion-static-exclusions + + - networkId (string): Network ID + - number (string): Number + - macs (array): MAC addresses to set as static exclusion list + """ + + kwargs = locals() + + metadata = { + "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion", "static", "exclusions"], + "operation": "updateNetworkWirelessSsidPoliciesClientExclusionStaticExclusions", + } + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion/static/exclusions" + + body_params = [ + "macs", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateNetworkWirelessSsidPoliciesClientExclusionStaticExclusions: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkAdd( + self, networkId: str, number: str, macs: list, **kwargs + ): + """ + **Add a list of MAC addresses to the static client exclusion list for the given SSID** + https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ssid-policies-client-exclusion-static-exclusions-bulk-add + + - networkId (string): Network ID + - number (string): Number + - macs (array): MAC addresses to add to static exclusion + """ + + kwargs = locals() + + metadata = { + "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion", "static", "exclusions", "bulkAdd"], + "operation": "createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkAdd", + } + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion/static/exclusions/bulkAdd" + + body_params = [ + "macs", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkAdd: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkRemove( + self, networkId: str, number: str, macs: list, **kwargs + ): + """ + **Delete a list of MAC addresses from the static client exclusion list for the given SSID** + https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ssid-policies-client-exclusion-static-exclusions-bulk-remove + + - networkId (string): Network ID + - number (string): Number + - macs (array): MAC addresses to remove from static exclusion + """ + + kwargs = locals() + + metadata = { + "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion", "static", "exclusions", "bulkRemove"], + "operation": "createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkRemove", + } + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion/static/exclusions/bulkRemove" + + body_params = [ + "macs", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkRemove: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def getNetworkWirelessSsidSchedules(self, networkId: str, number: str): """ **List the outage schedule for the SSID** @@ -3103,6 +3660,8 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * - redirectUrl (string): The custom redirect URL where the users will go after the splash page. - useRedirectUrl (boolean): The Boolean indicating whether the the user will be redirected to the custom redirect URL after the splash page. A custom redirect URL must be set if this is true. - welcomeMessage (string): The welcome message for the users on the splash page. + - language (string): Language of splash page. + - userConsent (object): User consent settings. - themeId (string): The id of the selected splash theme. - splashLogo (object): The logo used in the splash page. - splashImage (object): The image used in the splash page. @@ -3123,6 +3682,32 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * assert kwargs["splashTimeout"] in options, ( f'''"splashTimeout" cannot be "{kwargs["splashTimeout"]}", & must be set to one of: {options}''' ) + if "language" in kwargs: + options = [ + "DA", + "DE", + "EL", + "EN", + "ES", + "FI", + "FR", + "GL", + "IT", + "JA", + "KO", + "NL", + "NO", + "PL", + "PT", + "RU", + "SK", + "SV", + "UK", + "ZH", + ] + assert kwargs["language"] in options, ( + f'''"language" cannot be "{kwargs["language"]}", & must be set to one of: {options}''' + ) if "controllerDisconnectionBehavior" in kwargs: options = ["default", "open", "restricted"] assert kwargs["controllerDisconnectionBehavior"] in options, ( @@ -3144,6 +3729,8 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * "redirectUrl", "useRedirectUrl", "welcomeMessage", + "language", + "userConsent", "themeId", "splashLogo", "splashImage", @@ -3375,34 +3962,38 @@ def updateNetworkWirelessZigbee(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) - def getOrganizationWirelessAirMarshalRules(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationAssuranceConnectivityWirelessRfHealthByBand(self, organizationId: str, networkIds: list, **kwargs): """ - **Returns the current Air Marshal rules for this organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-air-marshal-rules + **Show the by-device RF Health score overview information for the organization in the given interval** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-connectivity-wireless-rf-health-by-band - 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): (optional) The set of network IDs to include. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - - 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. + - networkIds (array): Networks for which information should be gathered. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 3600, 14400, 86400. The default is 3600. Interval is calculated if time params are provided. + - minimumRfHealthScore (integer): Minimum RF Health score for an AP to be retrieved. + - maximumRfHealthScore (integer): Maximum RF Health score for an AP to be retrieved. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "airMarshal", "rules"], - "operation": "getOrganizationWirelessAirMarshalRules", + "tags": ["wireless", "configure", "connectivity", "rfHealth", "byBand"], + "operation": "getOrganizationAssuranceConnectivityWirelessRfHealthByBand", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/airMarshal/rules" + resource = f"/organizations/{organizationId}/assurance/connectivity/wireless/rfHealth/byBand" query_params = [ + "t0", + "t1", + "timespan", + "interval", "networkIds", - "perPage", - "startingAfter", - "endingBefore", + "minimumRfHealthScore", + "maximumRfHealthScore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} @@ -3419,23 +4010,26 @@ def getOrganizationWirelessAirMarshalRules(self, organizationId: str, total_page invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessAirMarshalRules: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceConnectivityWirelessRfHealthByBand: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) - def getOrganizationWirelessAirMarshalSettingsByNetwork( + def getOrganizationAssuranceImpactedDeviceWirelessByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Returns the current Air Marshal settings for this network** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-air-marshal-settings-by-network + **Returns count of impacted wireless devices per network on a given organization and time range.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-impacted-device-wireless-by-network - 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): The network IDs to include in the result set. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - networkGroupIds (array): Filter results by a list of network group IDs. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 2 hours and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5000. Default is 1000. - 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. """ @@ -3443,14 +4037,17 @@ def getOrganizationWirelessAirMarshalSettingsByNetwork( kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "airMarshal", "settings", "byNetwork"], - "operation": "getOrganizationWirelessAirMarshalSettingsByNetwork", + "tags": ["wireless", "monitor", "impactedDevice", "byNetwork"], + "operation": "getOrganizationAssuranceImpactedDeviceWirelessByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/airMarshal/settings/byNetwork" + resource = f"/organizations/{organizationId}/assurance/impactedDevice/wireless/byNetwork" query_params = [ - "networkIds", + "networkGroupIds", + "t0", + "t1", + "timespan", "perPage", "startingAfter", "endingBefore", @@ -3458,7 +4055,7 @@ def getOrganizationWirelessAirMarshalSettingsByNetwork( params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "networkIds", + "networkGroupIds", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3470,23 +4067,29 @@ def getOrganizationWirelessAirMarshalSettingsByNetwork( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessAirMarshalSettingsByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceImpactedDeviceWirelessByNetwork: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessClientsOverviewByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **List access point client count at the moment in an organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-overview-by-device + **Summarizes wireless post connection capacity successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network - 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): Optional parameter to filter access points client counts by network ID. This filter uses multiple exact matches. - - serials (array): Optional parameter to filter access points client counts by its serial numbers. This filter uses multiple exact matches. - - campusGatewayClusterIds (array): Optional parameter to filter access points client counts by MCG cluster IDs. This filter uses multiple exact matches. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. """ @@ -3494,16 +4097,20 @@ def getOrganizationWirelessClientsOverviewByDevice(self, organizationId: str, to kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "clients", "overview", "byDevice"], - "operation": "getOrganizationWirelessClientsOverviewByDevice", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/clients/overview/byDevice" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork" query_params = [ "networkIds", "serials", - "campusGatewayClusterIds", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", "perPage", "startingAfter", "endingBefore", @@ -3513,7 +4120,8 @@ def getOrganizationWirelessClientsOverviewByDevice(self, organizationId: str, to array_params = [ "networkIds", "serials", - "campusGatewayClusterIds", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3525,57 +4133,61 @@ def getOrganizationWirelessClientsOverviewByDevice(self, organizationId: str, to invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessClientsOverviewByDevice: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetwork: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesChannelUtilizationByDevice( + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByBand( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Get average channel utilization for all bands in a network, split by AP** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-by-device + **Summarizes wireless post connection capacity successes and failures by band.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-band - 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): Filter results by network. - - serials (array): Filter results by device. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. - - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "channelUtilization", "byDevice"], - "operation": "getOrganizationWirelessDevicesChannelUtilizationByDevice", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork", "byBand"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByBand", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/byDevice" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/byBand" query_params = [ "networkIds", "serials", - "perPage", - "startingAfter", - "endingBefore", + "ssidNumbers", + "bands", "t0", "t1", "timespan", - "interval", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3587,57 +4199,61 @@ def getOrganizationWirelessDevicesChannelUtilizationByDevice( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesChannelUtilizationByDevice: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByBand: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesChannelUtilizationByNetwork( + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClient( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Get average channel utilization across all bands for all networks in the organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-by-network + **Summarizes wireless post connection capacity successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-client - 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): Filter results by network. - - serials (array): Filter results by device. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. - - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "channelUtilization", "byNetwork"], - "operation": "getOrganizationWirelessDevicesChannelUtilizationByNetwork", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork", "byClient"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClient", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/byNetwork" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/byClient" query_params = [ "networkIds", "serials", - "perPage", - "startingAfter", - "endingBefore", + "ssidNumbers", + "bands", "t0", "t1", "timespan", - "interval", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3649,57 +4265,61 @@ def getOrganizationWirelessDevicesChannelUtilizationByNetwork( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesChannelUtilizationByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClient: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval( + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClientOs( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Get a time-series of average channel utilization for all bands, segmented by device.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-history-by-device-by-interval + **Summarizes wireless post connection capacity successes and failures by client OS.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-client-os - 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): Filter results by network. - - serials (array): Filter results by device. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 7 days. - - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "channelUtilization", "history", "byDevice", "byInterval"], - "operation": "getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork", "byClientOs"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClientOs", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/history/byDevice/byInterval" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/byClientOs" query_params = [ "networkIds", "serials", - "perPage", - "startingAfter", - "endingBefore", + "ssidNumbers", + "bands", "t0", "t1", "timespan", - "interval", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3711,57 +4331,61 @@ def getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClientOs: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval( + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClientType( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Get a time-series of average channel utilization for all bands** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-history-by-network-by-interval + **Summarizes wireless post connection capacity successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-client-type - 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): Filter results by network. - - serials (array): Filter results by device. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 7 days. - - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "channelUtilization", "history", "byNetwork", "byInterval"], - "operation": "getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork", "byClientType"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClientType", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/history/byNetwork/byInterval" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/byClientType" query_params = [ "networkIds", "serials", - "perPage", - "startingAfter", - "endingBefore", + "ssidNumbers", + "bands", "t0", "t1", "timespan", - "interval", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3773,44 +4397,61 @@ def getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClientType: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesEthernetStatuses(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **List the most recent Ethernet link speed, duplex, aggregation and power mode and status information for wireless devices.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-ethernet-statuses + **Summarizes wireless post connection capacity successes and failures by device.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-device - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - networkIds (array): A list of Meraki network IDs to filter results to contain only specified networks. E.g.: networkIds[]=N_12345678&networkIds[]=L_3456 """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "ethernet", "statuses"], - "operation": "getOrganizationWirelessDevicesEthernetStatuses", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork", "byDevice"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/ethernet/statuses" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/byDevice" query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", "perPage", "startingAfter", "endingBefore", - "networkIds", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", + "serials", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3822,59 +4463,63 @@ def getOrganizationWirelessDevicesEthernetStatuses(self, organizationId: str, to invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesEthernetStatuses: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByDevice: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesPacketLossByClient(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Get average packet loss for the given timespan for all clients in the organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-client + **Time-series of wireless post connection capacity successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-interval - 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): Filter results by network. - - ssids (array): Filter results by SSID number. - - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. - - macs (array): Filter results by client mac address(es). - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "packetLoss", "byClient"], - "operation": "getOrganizationWirelessDevicesPacketLossByClient", + "tags": ["wireless", "monitor", "experience", "channelAvailability", "byNetwork", "byInterval"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByInterval", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/packetLoss/byClient" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/byInterval" query_params = [ "networkIds", - "ssids", + "serials", + "ssidNumbers", "bands", - "macs", - "perPage", - "startingAfter", - "endingBefore", "t0", "t1", "timespan", + "interval", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", - "ssids", + "serials", + "ssidNumbers", "bands", - "macs", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3886,58 +4531,60 @@ def getOrganizationWirelessDevicesPacketLossByClient(self, organizationId: str, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesPacketLossByClient: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesPacketLossByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Get average packet loss for the given timespan for all devices in the organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-device + **Summarizes wireless post connection capacity successes and failures by ssid.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-ssid - 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): Filter results by network. - - serials (array): Filter results by device. - - ssids (array): Filter results by SSID number. - - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "packetLoss", "byDevice"], - "operation": "getOrganizationWirelessDevicesPacketLossByDevice", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork", "bySsid"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkBySsid", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/packetLoss/byDevice" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/bySsid" query_params = [ "networkIds", "serials", - "ssids", + "ssidNumbers", "bands", - "perPage", - "startingAfter", - "endingBefore", "t0", "t1", "timespan", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", - "ssids", + "ssidNumbers", "bands", ] for k, v in kwargs.items(): @@ -3950,60 +4597,70 @@ def getOrganizationWirelessDevicesPacketLossByDevice(self, organizationId: str, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesPacketLossByDevice: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkBySsid: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesPacketLossByNetwork( + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Get average packet loss for the given timespan for all networks in the organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-network + **Provides insights into wireless capacity experience by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-insights-by-network - 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): Filter results by network. - - serials (array): Filter results by device. - - ssids (array): Filter results by SSID number. - - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. + - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days. """ kwargs.update(locals()) + if "contributor" in kwargs: + options = ["Co-channel interference", "High traffic", "Non-wifi interference"] + assert kwargs["contributor"] in options, ( + f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' + ) + metadata = { - "tags": ["wireless", "monitor", "devices", "packetLoss", "byNetwork"], - "operation": "getOrganizationWirelessDevicesPacketLossByNetwork", + "tags": ["wireless", "configure", "experience", "channelAvailability", "insights", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/packetLoss/byNetwork" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/insights/byNetwork" query_params = [ "networkIds", "serials", - "ssids", + "ssidNumbers", "bands", - "perPage", - "startingAfter", - "endingBefore", + "contributor", + "subContributor", "t0", "t1", "timespan", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", - "ssids", + "ssidNumbers", "bands", ] for k, v in kwargs.items(): @@ -4016,53 +4673,143 @@ def getOrganizationWirelessDevicesPacketLossByNetwork( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesPacketLossByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwork: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesPowerModeHistory(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationAssuranceWirelessExperienceClientsInsights(self, organizationId: str, **kwargs): """ - **Return a record of power mode changes for wireless devices in the organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-power-mode-history + **Returns the top wireless service-level insights for the specified time window, including each network and the impacted client count per metric.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-clients-insights + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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. + - limit (integer): Number of top networks to return. Default is 5. Maximum is 10. + """ + + kwargs.update(locals()) + + if "limit" in kwargs: + options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + assert kwargs["limit"] in options, f'''"limit" cannot be "{kwargs["limit"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["wireless", "configure", "experience", "clients", "insights"], + "operation": "getOrganizationAssuranceWirelessExperienceClientsInsights", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/clients/insights" + + query_params = [ + "t0", + "t1", + "timespan", + "limit", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceClientsInsights: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceWirelessExperienceClientsOverviewHistoryByInterval(self, organizationId: str, **kwargs): + """ + **Returns time series data for impacted and active clients for organization wireless experience metrics.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-clients-overview-history-by-interval + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 300, 600, 900, 1800, 3600, 86400. The default is 300. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "experience", "clients", "overview", "history", "byInterval"], + "operation": "getOrganizationAssuranceWirelessExperienceClientsOverviewHistoryByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/clients/overview/history/byInterval" + + query_params = [ + "t0", + "t1", + "timespan", + "resolution", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceClientsOverviewHistoryByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless coverage successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network - 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 - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 1 day from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 1 day 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 1 day. The default is 1 day. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - networkIds (array): Optional parameter to filter the result set by the included set of network IDs - - serials (array): Optional parameter to filter device availabilities history by device serial numbers """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "power", "mode", "history"], - "operation": "getOrganizationWirelessDevicesPowerModeHistory", + "tags": ["wireless", "configure", "experience", "coverage", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/power/mode/history" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork" query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", "t0", "t1", "timespan", "perPage", "startingAfter", "endingBefore", - "networkIds", - "serials", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4074,133 +4821,5090 @@ def getOrganizationWirelessDevicesPowerModeHistory(self, organizationId: str, to invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesPowerModeHistory: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceCoverageByNetwork: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesProvisioningDeployments( + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkByBand( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **List the zero touch deployments for wireless access points in an organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-provisioning-deployments + **Summarizes wireless coverage successes and failures by band.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-band - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 20. + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - search (string): Filter by MAC address, serial number, new device name, old device name, or model. - - sortBy (string): Field used to sort results. Default is 'status'. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "experience", "coverage", "byNetwork", "byBand"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkByBand", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/byBand" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkByBand: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClient( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless coverage successes and failures by client.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-client + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "coverage", "byNetwork", "byClient"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/byClient" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClientOs( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless coverage successes and failures by client OS.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-client-os + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "coverage", "byNetwork", "byClientOs"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClientOs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/byClientOs" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClientOs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClientType( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless coverage successes and failures by client type.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-client-type + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "coverage", "byNetwork", "byClientType"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClientType", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/byClientType" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClientType: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless coverage successes and failures by device.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "coverage", "byNetwork", "byDevice"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/byDevice" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Time-series of wireless coverage successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-interval + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 60, 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "monitor", "experience", "coverage", "byNetwork", "byInterval"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/byInterval" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "interval", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless coverage successes and failures by SSID.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-ssid + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "coverage", "byNetwork", "bySsid"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkBySsid", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/bySsid" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkBySsid: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Provides insights into wireless coverage experience by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-insights-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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()) + + if "contributor" in kwargs: + options = ["Admin power restriction", "Insufficient AP density", "Sticky client", "Weak client signal"] + assert kwargs["contributor"] in options, ( + f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "experience", "coverage", "insights", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/insights/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "contributor", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceMetricsOverviewHistoryByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns organization wireless experience metrics overview grouped by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-metrics-overview-history-by-network + + - 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): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5000. Default is 1000. + - 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": ["wireless", "configure", "experience", "metrics", "overview", "history", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceMetricsOverviewHistoryByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/metrics/overview/history/byNetwork" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceMetricsOverviewHistoryByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by band.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-band + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byBand"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byBand" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClient( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by client.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-client + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 10000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byClient"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byClient" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientOs( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by client OS.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-client-os + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byClientOs"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientOs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byClientOs" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientOs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientType( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by client type.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-client-type + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byClientType"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientType", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byClientType" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientType: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by device.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byDevice"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byDevice" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Time-series of wireless connection successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-interval + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 60, 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "monitor", "experience", "successfulConnects", "byNetwork", "byInterval"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byInterval" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "interval", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServer( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by server.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-server + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byServer"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byServer" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServer: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by ssid.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-ssid + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "bySsid"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/bySsid" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Provides insights into wireless successful connects experience by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-insights-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. + - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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()) + + if "contributor" in kwargs: + options = ["assoc", "auth", "dhcp", "dns"] + assert kwargs["contributor"] in options, ( + f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "experience", "successfulConnects", "insights", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/insights/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "contributor", + "subContributor", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless time to connect metrics by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by band.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-band + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byBand"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byBand" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless time to connect metrics by client.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-client + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 10000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byClient"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byClient" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by client OS.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-client-os + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byClientOs"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byClientOs" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by client type.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-client-type + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byClientType"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byClientType" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection time to connect metrics by device.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byDevice"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byDevice" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Time-series of wireless time to connect by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-interval + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 60, 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "monitor", "experience", "timeToConnect", "byNetwork", "byInterval"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byInterval" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "interval", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection time to connect metrics by server.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-server + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byServer"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byServer" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection time to connect metrics by ssid.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-ssid + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "bySsid"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/bySsid" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Provides insights into wireless time to connect experience by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-insights-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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()) + + if "contributor" in kwargs: + options = ["assoc", "auth", "dhcp", "dns"] + assert kwargs["contributor"] in options, ( + f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "experience", "timeToConnect", "insights", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/insights/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "contributor", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessAirMarshalRules(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns the current Air Marshal rules for this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-air-marshal-rules + + - 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): (optional) The set of network IDs to include. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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": ["wireless", "configure", "airMarshal", "rules"], + "operation": "getOrganizationWirelessAirMarshalRules", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/airMarshal/rules" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessAirMarshalRules: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessAirMarshalSettingsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns the current Air Marshal settings for this network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-air-marshal-settings-by-network + + - 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): The network IDs to include in the result set. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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": ["wireless", "configure", "airMarshal", "settings", "byNetwork"], + "operation": "getOrganizationWirelessAirMarshalSettingsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/airMarshal/settings/byNetwork" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessAirMarshalSettingsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessAlertsLowPowerByDevice(self, organizationId: str, networkIds: list, **kwargs): + """ + **Gets all low power related alerts over a given network and returns information by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-alerts-low-power-by-device + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "alerts", "lowPower", "byDevice"], + "operation": "getOrganizationWirelessAlertsLowPowerByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/alerts/lowPower/byDevice" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessAlertsLowPowerByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessCertificatesOpenRoamingCertificateAuthority(self, organizationId: str): + """ + **Query for details on the organization's OpenRoaming Certificate Authority certificate (CAs).** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-certificates-open-roaming-certificate-authority + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["wireless", "configure", "certificates", "openRoaming", "certificateAuthority"], + "operation": "getOrganizationWirelessCertificatesOpenRoamingCertificateAuthority", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/certificates/openRoaming/certificateAuthority" + + return self._session.get(metadata, resource) + + def getOrganizationWirelessClientsConnectionsAssociationByClient(self, organizationId: str, **kwargs): + """ + **Summarize association outcomes per wireless client across an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-connections-association-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "clients", "connections", "association", "byClient"], + "operation": "getOrganizationWirelessClientsConnectionsAssociationByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/connections/association/byClient" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsConnectionsAssociationByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessClientsConnectionsAuthenticationByClient(self, organizationId: str, **kwargs): + """ + **Summarize authentication outcomes per wireless client across an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-connections-authentication-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "clients", "connections", "authentication", "byClient"], + "operation": "getOrganizationWirelessClientsConnectionsAuthenticationByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/connections/authentication/byClient" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsConnectionsAuthenticationByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessClientsConnectionsDhcpByClient(self, organizationId: str, **kwargs): + """ + **Get IP assignment for all clients in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-connections-dhcp-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "clients", "connections", "dhcp", "byClient"], + "operation": "getOrganizationWirelessClientsConnectionsDhcpByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/connections/dhcp/byClient" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsConnectionsDhcpByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessClientsConnectionsFailuresHistoryByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns failed wireless client connections for this organization by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-connections-failures-history-by-device + + - 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 + - connectionTimeSortOrder (string): (optional) Sort order of events by connection start time. (default desc) + - failureSteps (array): (optional) The step in the connection process that failed + - clientMac (string): (optional) The MAC address of the client with which the list of events will be filtered. + - serials (array): (optional) Filter devices by serial number + - timespan (integer): (optional) The timespan, in seconds, for the failed connections. The period will be from [timespan] seconds ago until now. The maximum allowed timespan is 1 month. Default: 86400 (24 hours) + - ssidNumber (integer): (optional) The SSID number to include + - networkIds (array): (optional) The set of network IDs to include. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. 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()) + + if "connectionTimeSortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["connectionTimeSortOrder"] in options, ( + f'''"connectionTimeSortOrder" cannot be "{kwargs["connectionTimeSortOrder"]}", & must be set to one of: {options}''' + ) + if "ssidNumber" in kwargs: + options = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] + assert kwargs["ssidNumber"] in options, ( + f'''"ssidNumber" cannot be "{kwargs["ssidNumber"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "clients", "connections", "failures", "history", "byDevice"], + "operation": "getOrganizationWirelessClientsConnectionsFailuresHistoryByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/connections/failures/history/byDevice" + + query_params = [ + "connectionTimeSortOrder", + "failureSteps", + "clientMac", + "serials", + "timespan", + "ssidNumber", + "networkIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "failureSteps", + "serials", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsConnectionsFailuresHistoryByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessClientsConnectionsImpactedByNetworkBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarize the number of wireless clients impacted by connection failures on network SSIDs, across an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-connections-impacted-by-network-by-ssid + + - 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): Filter results by network. + - networkGroupIds (array): Filter results by a list of network group IDs. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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": ["wireless", "monitor", "clients", "connections", "impacted", "byNetwork", "bySsid"], + "operation": "getOrganizationWirelessClientsConnectionsImpactedByNetworkBySsid", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/connections/impacted/byNetwork/bySsid" + + query_params = [ + "networkIds", + "networkGroupIds", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "networkGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsConnectionsImpactedByNetworkBySsid: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessClientsOverviewByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List access point client count at the moment in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-overview-by-device + + - 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): Optional parameter to filter access points client counts by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter access points client counts by its serial numbers. This filter uses multiple exact matches. + - campusGatewayClusterIds (array): Optional parameter to filter access points client counts by MCG cluster IDs. This filter uses multiple exact matches. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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": ["wireless", "monitor", "clients", "overview", "byDevice"], + "operation": "getOrganizationWirelessClientsOverviewByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/overview/byDevice" + + query_params = [ + "networkIds", + "serials", + "campusGatewayClusterIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "campusGatewayClusterIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsOverviewByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def byOrganizationWirelessClientsRfHealthOverviewNetwork(self, organizationId: str, **kwargs): + """ + **Show the by-network client information for the organization in the given interval** + https://developer.cisco.com/meraki/api-v1/#!by-organization-wireless-clients-rf-health-overview-network + + - organizationId (string): Organization ID + - networkIds (array): Networks for which information should be gathered. + - bands (array): Bands for which information should be gathered. Valid bands are 2.4, 5, and 6. + - channels (array): Channel for which information should be gathered. + - serials (array): Serial number of the devices for which information should be gathered. + - gFloorplanId (string): Geoaligned floorplan ID nodes for which information is gathered belong to. + - tags (array): Access Point tags for which information should be gathered. + - models (array): Access Point models for which information should be gathered. + - rfProfiles (array): Rf Profiles for which information should be gathered. + - minimumRfHealthScore (integer): Minimum RF Health score for an AP to be retrieved. + - maximumRfHealthScore (integer): Maximum RF Health score for an AP to be retrieved. + - retryOnEmpty (boolean): If true, the query will be retried with a longer timeframe if the results are empty. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "clients", "rfHealth", "overview"], + "operation": "byOrganizationWirelessClientsRfHealthOverviewNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/rfHealth/overview/byNetwork" + + query_params = [ + "networkIds", + "bands", + "channels", + "serials", + "gFloorplanId", + "tags", + "models", + "rfProfiles", + "minimumRfHealthScore", + "maximumRfHealthScore", + "retryOnEmpty", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "bands", + "channels", + "serials", + "tags", + "models", + "rfProfiles", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"byOrganizationWirelessClientsRfHealthOverviewNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessClientsStickyEvents(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get sticky client events within the specified timespan.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-sticky-events + + - 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): Filter results by network. + - clientIds (array): Filter results by client id. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - 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 30 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 30 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "clients", "stickyEvents"], + "operation": "getOrganizationWirelessClientsStickyEvents", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/stickyEvents" + + query_params = [ + "networkIds", + "clientIds", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "clientIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsStickyEvents: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessClientsUsageByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns client usage details for wireless networks within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-usage-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 1 hour and be less than or equal to 7 days. The default is 2 hours. + - networkIds (array): Filter results by a list of network IDs. + - networkGroupIds (array): Filter results by a list of network group IDs. + - gatewayNetworkIds (array): Limit the results to clients tunneled to campus gateways in the provided networks. + - usageUnits (string): Usage units to use in the response. + """ + + kwargs.update(locals()) + + if "usageUnits" in kwargs: + options = ["GB", "KB", "MB", "TB"] + assert kwargs["usageUnits"] in options, ( + f'''"usageUnits" cannot be "{kwargs["usageUnits"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "monitor", "clients", "usage", "byNetwork"], + "operation": "getOrganizationWirelessClientsUsageByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/usage/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "networkGroupIds", + "gatewayNetworkIds", + "usageUnits", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "networkGroupIds", + "gatewayNetworkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsUsageByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessClientsUsageByNetworkBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns client usage details for wireless network SSIDs within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-usage-by-network-by-ssid + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 1 hour and be less than or equal to 7 days. The default is 2 hours. + - networkIds (array): Filter results by a list of network IDs. + - networkGroupIds (array): Filter results by a list of network group IDs. + - ssidIds (array): Filter results by a list of SSID IDs. + - ssidNames (array): Filter results by a list of SSID names. + - gatewayNetworkIds (array): Limit the results to clients tunneled to campus gateways in the provided networks. + - usageUnits (string): Usage units to use in the response. + """ + + kwargs.update(locals()) + + if "usageUnits" in kwargs: + options = ["GB", "KB", "MB", "TB"] + assert kwargs["usageUnits"] in options, ( + f'''"usageUnits" cannot be "{kwargs["usageUnits"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "monitor", "clients", "usage", "byNetwork", "bySsid"], + "operation": "getOrganizationWirelessClientsUsageByNetworkBySsid", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/usage/byNetwork/bySsid" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "networkGroupIds", + "ssidIds", + "ssidNames", + "gatewayNetworkIds", + "usageUnits", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "networkGroupIds", + "ssidIds", + "ssidNames", + "gatewayNetworkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsUsageByNetworkBySsid: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessClientsUsageBySsid(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns client usage details for SSIDs within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-usage-by-ssid + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 1 hour and be less than or equal to 7 days. The default is 2 hours. + - ssidNames (array): Filter results by a list of SSID names. + - networkIds (array): Limit the results to clients that belong to one of the provided networks. + - networkGroupIds (array): Limit the results to clients that belong to one of the provided network groups. + - gatewayNetworkIds (array): Limit the results to clients tunneled to campus gateways in the provided networks. + - usageUnits (string): Usage units to use in the response. + """ + + kwargs.update(locals()) + + if "usageUnits" in kwargs: + options = ["GB", "KB", "MB", "TB"] + assert kwargs["usageUnits"] in options, ( + f'''"usageUnits" cannot be "{kwargs["usageUnits"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "monitor", "clients", "usage", "bySsid"], + "operation": "getOrganizationWirelessClientsUsageBySsid", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/usage/bySsid" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "ssidNames", + "networkIds", + "networkGroupIds", + "gatewayNetworkIds", + "usageUnits", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "ssidNames", + "networkIds", + "networkGroupIds", + "gatewayNetworkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsUsageBySsid: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesAccelerometerStatuses( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the most recent AP accelerometer status information for wireless devices that support it.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-accelerometer-statuses + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - networkIds (array): A list of Meraki network IDs to filter results to contain only specified networks. E.g.: networkIds[]=N_12345678&networkIds[]=L_3456 + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "accelerometer", "statuses"], + "operation": "getOrganizationWirelessDevicesAccelerometerStatuses", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/accelerometer/statuses" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesAccelerometerStatuses: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesChannelUtilizationByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get average channel utilization for all bands in a network, split by AP** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "channelUtilization", "byDevice"], + "operation": "getOrganizationWirelessDevicesChannelUtilizationByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/byDevice" + + query_params = [ + "networkIds", + "serials", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesChannelUtilizationByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesChannelUtilizationByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get average channel utilization across all bands for all networks in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "channelUtilization", "byNetwork"], + "operation": "getOrganizationWirelessDevicesChannelUtilizationByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/byNetwork" + + query_params = [ + "networkIds", + "serials", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesChannelUtilizationByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get a time-series of average channel utilization for all bands, segmented by device.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-history-by-device-by-interval + + - 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): Filter results by network. + - serials (array): Filter results by device. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 7 days. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "channelUtilization", "history", "byDevice", "byInterval"], + "operation": "getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/history/byDevice/byInterval" + + query_params = [ + "networkIds", + "serials", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get a time-series of average channel utilization for all bands** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-history-by-network-by-interval + + - 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): Filter results by network. + - serials (array): Filter results by device. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 7 days. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "channelUtilization", "history", "byNetwork", "byInterval"], + "operation": "getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/history/byNetwork/byInterval" + + query_params = [ + "networkIds", + "serials", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesDataRateByClient(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get average uplink and downlink datarates for all clients in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-data-rate-by-client + + - 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): Filter results by network. + - serials (array): Filter results by device serial number. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - macs (array): Filter results by client mac address(es). + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - 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 30 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 30 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "dataRate", "byClient"], + "operation": "getOrganizationWirelessDevicesDataRateByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/dataRate/byClient" + + query_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "macs", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "macs", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesDataRateByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesEthernetStatuses(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the most recent Ethernet link speed, duplex, aggregation and power mode and status information for wireless devices.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-ethernet-statuses + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - networkIds (array): A list of Meraki network IDs to filter results to contain only specified networks. E.g.: networkIds[]=N_12345678&networkIds[]=L_3456 + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "ethernet", "statuses"], + "operation": "getOrganizationWirelessDevicesEthernetStatuses", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/ethernet/statuses" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesEthernetStatuses: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesLatencyByClient(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get latency summaries for all wireless devices in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-latency-by-client + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. + - networkIds (array): Filter results by network. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - ssids (array): Filter results by SSID number. + - macs (array): Filter results by client mac address(es). + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "latency", "byClient"], + "operation": "getOrganizationWirelessDevicesLatencyByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/latency/byClient" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "bands", + "ssids", + "macs", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "bands", + "ssids", + "macs", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesLatencyByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesLatencyByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get latency summaries for all wireless devices in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-latency-by-device + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. + - networkIds (array): Filter results by network. + - serials (array): Filter results by device. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - ssids (array): Filter results by SSID number. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "latency", "byDevice"], + "operation": "getOrganizationWirelessDevicesLatencyByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/latency/byDevice" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "serials", + "bands", + "ssids", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "bands", + "ssids", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesLatencyByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesLatencyByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get per-network latency summaries for all wireless networks in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-latency-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. + - networkIds (array): Filter results by network. + - serials (array): Filter results by device. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - ssids (array): Filter results by SSID number. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "latency", "byNetwork"], + "operation": "getOrganizationWirelessDevicesLatencyByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/latency/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "serials", + "bands", + "ssids", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "bands", + "ssids", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesLatencyByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationWirelessDevicesLiveToolsClientDisconnect(self, organizationId: str, clientId: str, **kwargs): + """ + **Enqueue a job to disconnect a client from an AP** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-live-tools-client-disconnect + + - organizationId (string): Organization ID + - clientId (string): Client ID + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "liveTools", "devices", "clients", "disconnect"], + "operation": "createOrganizationWirelessDevicesLiveToolsClientDisconnect", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + clientId = urllib.parse.quote(str(clientId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/liveTools/clients/{clientId}/disconnect" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationWirelessDevicesLiveToolsClientDisconnect: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationWirelessDevicesPacketLossByClient(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get average packet loss for the given timespan for all clients in the organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-client + + - 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): Filter results by network. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - macs (array): Filter results by client mac address(es). + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "packetLoss", "byClient"], + "operation": "getOrganizationWirelessDevicesPacketLossByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/packetLoss/byClient" + + query_params = [ + "networkIds", + "ssids", + "bands", + "macs", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "ssids", + "bands", + "macs", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesPacketLossByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesPacketLossByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get average packet loss for the given timespan for all devices in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "packetLoss", "byDevice"], + "operation": "getOrganizationWirelessDevicesPacketLossByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/packetLoss/byDevice" + + query_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssids", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesPacketLossByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesPacketLossByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get average packet loss for the given timespan for all networks in the organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "packetLoss", "byNetwork"], + "operation": "getOrganizationWirelessDevicesPacketLossByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/packetLoss/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssids", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesPacketLossByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesPowerModeHistory(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return a record of power mode changes for wireless devices in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-power-mode-history + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 1 day from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 1 day 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 1 day. The default is 1 day. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. + - 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. + - networkIds (array): Optional parameter to filter the result set by the included set of network IDs + - serials (array): Optional parameter to filter device availabilities history by device serial numbers + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "power", "mode", "history"], + "operation": "getOrganizationWirelessDevicesPowerModeHistory", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/power/mode/history" + + query_params = [ + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesPowerModeHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesProvisioningDeployments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the zero touch deployments for wireless access points in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-provisioning-deployments + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 20. + - 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. + - search (string): Filter by MAC address, serial number, new device name, old device name, or model. + - sortBy (string): Field used to sort results. Default is 'status'. - sortOrder (string): Sort order. Default is 'asc'. - deploymentType (string): Filter deployments by type. """ kwargs.update(locals()) - if "sortBy" in kwargs: - options = ["afterAction", "createdAt", "deploymentId", "name", "status"] - assert kwargs["sortBy"] in options, ( - f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' - ) - if "sortOrder" in kwargs: - options = ["asc", "desc"] - assert kwargs["sortOrder"] in options, ( - f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' - ) - if "deploymentType" in kwargs: - options = ["deploy", "replace"] - assert kwargs["deploymentType"] in options, ( - f'''"deploymentType" cannot be "{kwargs["deploymentType"]}", & must be set to one of: {options}''' - ) + if "sortBy" in kwargs: + options = ["afterAction", "createdAt", "deploymentId", "name", "status"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + if "deploymentType" in kwargs: + options = ["deploy", "replace"] + assert kwargs["deploymentType"] in options, ( + f'''"deploymentType" cannot be "{kwargs["deploymentType"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], + "operation": "getOrganizationWirelessDevicesProvisioningDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "search", + "sortBy", + "sortOrder", + "deploymentType", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesProvisioningDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationWirelessDevicesProvisioningDeployment(self, organizationId: str, items: list, **kwargs): + """ + **Create a zero touch deployment for a wireless access point** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-provisioning-deployment + + - organizationId (string): Organization ID + - items (array): List of zero touch deployments to create + - meta (object): Metadata relevant to the paginated dataset + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], + "operation": "createOrganizationWirelessDevicesProvisioningDeployment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" + + body_params = [ + "items", + "meta", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationWirelessDevicesProvisioningDeployment: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationWirelessDevicesProvisioningDeployments(self, organizationId: str, items: list, **kwargs): + """ + **Update a zero touch deployment** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-devices-provisioning-deployments + + - organizationId (string): Organization ID + - items (array): List of zero touch deployments to create + - meta (object): Metadata relevant to the paginated dataset + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], + "operation": "updateOrganizationWirelessDevicesProvisioningDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" + + body_params = [ + "items", + "meta", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationWirelessDevicesProvisioningDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def getOrganizationWirelessDevicesProvisioningDeploymentsByNewDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns deployment IDs for the given new node serial numbers** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-provisioning-deployments-by-new-device + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 80. + - 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. + - serials (array): Array of new device serial numbers to query + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "provisioning", "deployments", "byNewDevice"], + "operation": "getOrganizationWirelessDevicesProvisioningDeploymentsByNewDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments/byNewDevice" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesProvisioningDeploymentsByNewDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationWirelessDevicesProvisioningDeployment(self, organizationId: str, deploymentId: str): + """ + **Delete a zero touch deployment** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-devices-provisioning-deployment + + - organizationId (string): Organization ID + - deploymentId (string): Deployment ID + """ + + metadata = { + "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], + "operation": "deleteOrganizationWirelessDevicesProvisioningDeployment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + deploymentId = urllib.parse.quote(str(deploymentId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments/{deploymentId}" + + return self._session.delete(metadata, resource) + + def getOrganizationWirelessDevicesProvisioningRecommendationsTags(self, organizationId: str, **kwargs): + """ + **List the recommended device tags for zero touch deployments available for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-provisioning-recommendations-tags + + - organizationId (string): Organization ID + - networkIds (array): The list of networks to use as hints for device tags recommendations. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "provisioning", "recommendations", "tags"], + "operation": "getOrganizationWirelessDevicesProvisioningRecommendationsTags", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/provisioning/recommendations/tags" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesProvisioningRecommendationsTags: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): + """ + **Query for details on the organization's RADSEC device Certificate Authority certificates (CAs)** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities + + - organizationId (string): Organization ID + - certificateAuthorityIds (array): Optional parameter to filter CAs by one or more CA IDs. All returned CAs will have an ID that is an exact match. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities"], + "operation": "getOrganizationWirelessDevicesRadsecCertificatesAuthorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities" + + query_params = [ + "certificateAuthorityIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "certificateAuthorityIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesRadsecCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def updateOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): + """ + **Update an organization's RADSEC device Certificate Authority (CA) state** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-devices-radsec-certificates-authorities + + - organizationId (string): Organization ID + - status (string): The "status" to update the Certificate Authority to. Only valid option is "trusted". + - certificateAuthorityId (string): The ID of the Certificate Authority to update. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities"], + "operation": "updateOrganizationWirelessDevicesRadsecCertificatesAuthorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities" + + body_params = [ + "status", + "certificateAuthorityId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationWirelessDevicesRadsecCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def createOrganizationWirelessDevicesRadsecCertificatesAuthority(self, organizationId: str): + """ + **Create an organization's RADSEC device Certificate Authority (CA)** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-radsec-certificates-authority + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities"], + "operation": "createOrganizationWirelessDevicesRadsecCertificatesAuthority", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities" + + return self._session.post(metadata, resource) + + def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organizationId: str, **kwargs): + """ + **Query for certificate revocation list (CRL) for the organization's RADSEC device Certificate Authorities (CAs).** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls + + - organizationId (string): Organization ID + - certificateAuthorityIds (array): Optional parameter to filter CAs by one or more CA IDs. All returned CAs will have an ID that is an exact match. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities", "crls"], + "operation": "getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities/crls" + + query_params = [ + "certificateAuthorityIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "certificateAuthorityIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas(self, organizationId: str, **kwargs): + """ + **Query for all delta certificate revocation list (CRL) for the organization's RADSEC device Certificate Authority (CA) with the given id.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls-deltas + + - organizationId (string): Organization ID + - certificateAuthorityIds (array): Parameter to filter CAs by one or more CA IDs. All returned CAs will have an ID that is an exact match. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities", "crls", "deltas"], + "operation": "getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities/crls/deltas" + + query_params = [ + "certificateAuthorityIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "certificateAuthorityIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessDevicesSignalQualityByClient( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get average signal quality for all clients in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-signal-quality-by-client + + - 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): Filter results by network. + - serials (array): Filter results by device serial number. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - macs (array): Filter results by client mac address(es). + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - 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 30 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 30 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "signalQuality", "byClient"], + "operation": "getOrganizationWirelessDevicesSignalQualityByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/signalQuality/byClient" + + query_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "macs", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "macs", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesSignalQualityByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesSignalQualityByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get average signal quality for all devices in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-signal-quality-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device serial number. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - 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 30 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 30 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "signalQuality", "byDevice"], + "operation": "getOrganizationWirelessDevicesSignalQualityByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/signalQuality/byDevice" + + query_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssids", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesSignalQualityByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesSignalQualityByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get average signal quality for all networks in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-signal-quality-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial number. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - 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 30 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 30 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "signalQuality", "byNetwork"], + "operation": "getOrganizationWirelessDevicesSignalQualityByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/signalQuality/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssids", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesSignalQualityByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesSystemCpuLoadHistory( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Return the CPU Load history for a list of wireless devices in the organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-system-cpu-load-history + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 1 day from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 1 day 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 1 day. The default is 1 day. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. + - 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. + - networkIds (array): Optional parameter to filter the result set by the included set of network IDs + - serials (array): Optional parameter to filter device availabilities history by device serial numbers + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "system", "cpu", "load", "history"], + "operation": "getOrganizationWirelessDevicesSystemCpuLoadHistory", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/system/cpu/load/history" + + query_params = [ + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesSystemCpuLoadHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesTelemetry(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the wireless device telemetry of an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-telemetry + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 200. Default is 100. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 3 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 30 minutes 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 greater than or equal to 5 minutes and be less than or equal to 30 minutes. The default is 30 minutes. + - networkIds (array): Optional parameter to filter results by network. + - serials (array): Optional parameter to filter results by device serial. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "telemetry"], + "operation": "getOrganizationWirelessDevicesTelemetry", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/telemetry" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesTelemetry: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesWirelessControllersByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List of Catalyst access points information** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-wireless-controllers-by-device + + - 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): Optional parameter to filter access points by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter access points by its cloud ID. This filter uses multiple exact matches. + - controllerSerials (array): Optional parameter to filter access points by its wireless LAN controller cloud ID. This filter uses multiple exact matches. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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": ["wireless", "monitor", "devices", "wirelessControllers", "byDevice"], + "operation": "getOrganizationWirelessDevicesWirelessControllersByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/wirelessControllers/byDevice" + + query_params = [ + "networkIds", + "serials", + "controllerSerials", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "controllerSerials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesWirelessControllersByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessLocationScanningByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return scanning API settings** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-location-scanning-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 250. 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. + - networkIds (array): Optional parameter to filter scanning settings by network ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "location", "scanning", "byNetwork"], + "operation": "getOrganizationWirelessLocationScanningByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/location/scanning/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessLocationScanningByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessLocationScanningReceivers(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return scanning API receivers** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-location-scanning-receivers + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 250. 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. + - networkIds (array): Optional parameter to filter scanning API receivers by network ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "location", "scanning", "receivers"], + "operation": "getOrganizationWirelessLocationScanningReceivers", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessLocationScanningReceivers: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationWirelessLocationScanningReceiver( + self, organizationId: str, network: dict, url: str, version: str, radio: dict, sharedSecret: str, **kwargs + ): + """ + **Add new receiver for scanning API** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-location-scanning-receiver + + - organizationId (string): Organization ID + - network (object): Add scanning API receiver for network + - url (string): Receiver Url + - version (string): Scanning API Version + - radio (object): Add scanning API Radio + - sharedSecret (string): Secret Value for Receiver + """ + + kwargs = locals() + + metadata = { + "tags": ["wireless", "configure", "location", "scanning", "receivers"], + "operation": "createOrganizationWirelessLocationScanningReceiver", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers" + + body_params = [ + "network", + "url", + "version", + "radio", + "sharedSecret", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationWirelessLocationScanningReceiver: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationWirelessLocationScanningReceiver(self, organizationId: str, receiverId: str, **kwargs): + """ + **Change scanning API receiver settings** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-location-scanning-receiver + + - organizationId (string): Organization ID + - receiverId (string): Receiver ID + - url (string): Receiver Url + - version (string): Scanning API Version + - radio (object): Add scanning API Radio + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "location", "scanning", "receivers"], + "operation": "updateOrganizationWirelessLocationScanningReceiver", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + receiverId = urllib.parse.quote(str(receiverId), safe="") + resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers/{receiverId}" + + body_params = [ + "url", + "version", + "radio", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationWirelessLocationScanningReceiver: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationWirelessLocationScanningReceiver(self, organizationId: str, receiverId: str): + """ + **Delete a scanning API receiver** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-location-scanning-receiver + + - organizationId (string): Organization ID + - receiverId (string): Receiver ID + """ + + metadata = { + "tags": ["wireless", "configure", "location", "scanning", "receivers"], + "operation": "deleteOrganizationWirelessLocationScanningReceiver", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + receiverId = urllib.parse.quote(str(receiverId), safe="") + resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers/{receiverId}" + + return self._session.delete(metadata, resource) + + def getOrganizationWirelessLocationWayfindingByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Return Client wayfinding settings** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-location-wayfinding-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter wayfinding settings by network ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "location", "wayfinding", "byNetwork"], + "operation": "getOrganizationWirelessLocationWayfindingByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/location/wayfinding/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessLocationWayfindingByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessMqttSettings(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return MQTT Settings for networks** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-mqtt-settings + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 250. 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. + - networkIds (array): Optional parameter to filter mqtt settings by network ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "mqtt", "settings"], + "operation": "getOrganizationWirelessMqttSettings", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/mqtt/settings" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationWirelessMqttSettings: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def updateOrganizationWirelessMqttSettings(self, organizationId: str, network: dict, mqtt: dict, **kwargs): + """ + **Add new broker config for wireless MQTT** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-mqtt-settings + + - organizationId (string): Organization ID + - network (object): Add MQTT Settings for network + - mqtt (object): MQTT Settings for network + - ble (object): MQTT BLE Settings for network + - wifi (object): MQTT Wi-Fi Settings for network + """ + + kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], - "operation": "getOrganizationWirelessDevicesProvisioningDeployments", + "tags": ["wireless", "configure", "mqtt", "settings"], + "operation": "updateOrganizationWirelessMqttSettings", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" + resource = f"/organizations/{organizationId}/wireless/mqtt/settings" + + body_params = [ + "network", + "mqtt", + "ble", + "wifi", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationWirelessMqttSettings: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def byOrganizationWirelessOpportunisticPcapLicenseNetwork(self, organizationId: str, **kwargs): + """ + **Check the Opportunistic Pcap license status of an organization by network** + https://developer.cisco.com/meraki/api-v1/#!by-organization-wireless-opportunistic-pcap-license-network + + - organizationId (string): Organization ID + - networkIds (array): Optional parameter to filter results by network. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "opportunisticPcap", "license"], + "operation": "byOrganizationWirelessOpportunisticPcapLicenseNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/opportunisticPcap/license/byNetwork" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"byOrganizationWirelessOpportunisticPcapLicenseNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessRadioAfcPositionByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the AFC power limits of an organization by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-afc-position-by-device + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter device's AFC position by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter device's AFC position by device serial numbers. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "afc", "position", "byDevice"], + "operation": "getOrganizationWirelessRadioAfcPositionByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/radio/afc/position/byDevice" query_params = [ "perPage", "startingAfter", "endingBefore", - "search", - "sortBy", - "sortOrder", - "deploymentType", + "networkIds", + "serials", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + if self._session._validate_kwargs: - all_params = query_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesProvisioningDeployments: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRadioAfcPositionByDevice: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def createOrganizationWirelessDevicesProvisioningDeployment(self, organizationId: str, items: list, **kwargs): + def getOrganizationWirelessRadioAfcPowerLimitsByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Create a zero touch deployment for a wireless access point** - https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-provisioning-deployment + **List the AFC power limits of an organization by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-afc-power-limits-by-device - organizationId (string): Organization ID - - items (array): List of zero touch deployments to create - - meta (object): Metadata relevant to the paginated dataset + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter device's AFC power limits by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter device's AFC power limits by device serial numbers. This filter uses multiple exact matches. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], - "operation": "createOrganizationWirelessDevicesProvisioningDeployment", + "tags": ["wireless", "configure", "radio", "afc", "powerLimits", "byDevice"], + "operation": "getOrganizationWirelessRadioAfcPowerLimitsByDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" + resource = f"/organizations/{organizationId}/wireless/radio/afc/powerLimits/byDevice" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessRadioAfcPowerLimitsByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessRadioAutoRfByNetwork(self, organizationId: str, **kwargs): + """ + **List the AutoRF settings of an organization by network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-auto-rf-by-network + + - organizationId (string): Organization ID + - networkIds (array): Optional parameter to filter results by network. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "autoRf", "byNetwork"], + "operation": "getOrganizationWirelessRadioAutoRfByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/radio/autoRf/byNetwork" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessRadioAutoRfByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessRadioAutoRfChannelsPlanningActivities(self, organizationId: str, **kwargs): + """ + **List the channel planning activities of an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-auto-rf-channels-planning-activities + + - organizationId (string): Organization ID + - networkIds (array): Optional parameter to filter results by network. + - deviceSerials (array): Optional parameter to filter results by device serial. + - bands (array): Optional parameter to filter results by bands. Valid bands are 2.4, 5, and 6. + - channels (array): Optional parameter to filter results by channels. + - serials (array): Serial number of the devices for which information should be gathered. + - gFloorplanId (string): Geoaligned floorplan ID nodes for which information is gathered belong to. + - tags (array): Optional parameter to filter results by node tags. + - models (array): Optional parameter to filter results by access point models. + - rfProfiles (array): Optional parameter to filter results by RF Profiles. + - minimumRfHealthScore (integer): Minimum RF Health score for an AP to be retrieved. + - maximumRfHealthScore (integer): Maximum RF Health score for an AP to be retrieved. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "autoRf", "channels", "planning", "activities"], + "operation": "getOrganizationWirelessRadioAutoRfChannelsPlanningActivities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/radio/autoRf/channels/planning/activities" + + query_params = [ + "networkIds", + "deviceSerials", + "bands", + "channels", + "serials", + "gFloorplanId", + "tags", + "models", + "rfProfiles", + "minimumRfHealthScore", + "maximumRfHealthScore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} - body_params = [ - "items", - "meta", + array_params = [ + "networkIds", + "deviceSerials", + "bands", + "channels", + "serials", + "tags", + "models", + "rfProfiles", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"createOrganizationWirelessDevicesProvisioningDeployment: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRadioAutoRfChannelsPlanningActivities: ignoring unrecognized kwargs: {invalid}" ) - return self._session.post(metadata, resource, payload) + return self._session.get(metadata, resource, params) - def updateOrganizationWirelessDevicesProvisioningDeployments(self, organizationId: str, items: list, **kwargs): + def recalculateOrganizationWirelessRadioAutoRfChannels(self, organizationId: str, networkIds: list, **kwargs): """ - **Update a zero touch deployment** - https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-devices-provisioning-deployments + **Recalculates automatically assigned channels for every AP within specified the specified network(s)** + https://developer.cisco.com/meraki/api-v1/#!recalculate-organization-wireless-radio-auto-rf-channels - organizationId (string): Organization ID - - items (array): List of zero touch deployments to create - - meta (object): Metadata relevant to the paginated dataset + - networkIds (array): A list of network ids (limit: 15). """ - kwargs.update(locals()) + kwargs = locals() metadata = { - "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], - "operation": "updateOrganizationWirelessDevicesProvisioningDeployments", + "tags": ["wireless", "configure", "radio", "autoRf", "channels"], + "operation": "recalculateOrganizationWirelessRadioAutoRfChannels", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" + resource = f"/organizations/{organizationId}/wireless/radio/autoRf/channels/recalculate" body_params = [ - "items", - "meta", + "networkIds", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -4209,55 +9913,47 @@ def updateOrganizationWirelessDevicesProvisioningDeployments(self, organizationI invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"updateOrganizationWirelessDevicesProvisioningDeployments: ignoring unrecognized kwargs: {invalid}" + f"recalculateOrganizationWirelessRadioAutoRfChannels: ignoring unrecognized kwargs: {invalid}" ) - return self._session.put(metadata, resource, payload) - - def deleteOrganizationWirelessDevicesProvisioningDeployment(self, organizationId: str, deploymentId: str): - """ - **Delete a zero touch deployment** - https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-devices-provisioning-deployment - - - organizationId (string): Organization ID - - deploymentId (string): Deployment ID - """ - - metadata = { - "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], - "operation": "deleteOrganizationWirelessDevicesProvisioningDeployment", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - deploymentId = urllib.parse.quote(str(deploymentId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments/{deploymentId}" - - return self._session.delete(metadata, resource) + return self._session.post(metadata, resource, payload) - def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): + def getOrganizationWirelessRadioOverridesByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **Query for details on the organization's RADSEC device Certificate Authority certificates (CAs)** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities + **Return a list of radio overrides** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-overrides-by-device - organizationId (string): Organization ID - - certificateAuthorityIds (array): Optional parameter to filter CAs by one or more CA IDs. All returned CAs will have an ID that is an exact match. + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 100. + - 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. + - networkIds (array): A list of network IDs. The returned radio overrides will be filtered to only include these networks. + - serials (array): A list of serial numbers. The returned radio overrides will be filtered to only include these serials. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities"], - "operation": "getOrganizationWirelessDevicesRadsecCertificatesAuthorities", + "tags": ["wireless", "configure", "radio", "overrides", "byDevice"], + "operation": "getOrganizationWirelessRadioOverridesByDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities" + resource = f"/organizations/{organizationId}/wireless/radio/overrides/byDevice" query_params = [ - "certificateAuthorityIds", + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "certificateAuthorityIds", + "networkIds", + "serials", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4269,88 +9965,132 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizati invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesRadsecCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRadioOverridesByDevice: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get(metadata, resource, params) + return self._session.get_pages(metadata, resource, params, total_pages, direction) - def updateOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): + def byOrganizationWirelessRadioRfHealthNeighborsRssiDevice(self, organizationId: str, **kwargs): """ - **Update an organization's RADSEC device Certificate Authority (CA) state** - https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-devices-radsec-certificates-authorities + **Show the by-device neighbor rssi information for the organization in the given interval** + https://developer.cisco.com/meraki/api-v1/#!by-organization-wireless-radio-rf-health-neighbors-rssi-device - organizationId (string): Organization ID - - status (string): The "status" to update the Certificate Authority to. Only valid option is "trusted". - - certificateAuthorityId (string): The ID of the Certificate Authority to update. + - networkIds (array): Networks for which information should be gathered. + - bands (array): Bands for which information should be gathered. Valid bands are 2.4, 5, and 6. + - channels (array): Channel for which information should be gathered. + - serials (array): Serial number of the devices for which information should be gathered. + - tags (array): Access Point tags for which information should be gathered. + - models (array): Access Point models for which information should be gathered. + - rfProfiles (array): Rf Profiles for which information should be gathered. + - gFloorplanId (string): Geoaligned floorplan ID nodes for which information is gathered belong to. + - minimumNeighborRssi (integer): Minimum Neighbor RSSI score for a neighbor entry to be retrieved. + - maximumNeighborRssi (integer): Maximum Neighbor RSSI score for a neighbor entry to be retrieved. + - minimumRfHealthScore (integer): Minimum RF Health score for an AP to be retrieved. + - maximumRfHealthScore (integer): Maximum RF Health score for an AP to be retrieved. + - rfScoreInterval (integer): Size of the rf score interval in seconds. + - rfScoreRetryOnEmpty (boolean): If true, the query will be retried further back if no data is present in the latest rf score interval. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities"], - "operation": "updateOrganizationWirelessDevicesRadsecCertificatesAuthorities", + "tags": ["wireless", "configure", "radio", "rfHealth", "neighbors", "rssi"], + "operation": "byOrganizationWirelessRadioRfHealthNeighborsRssiDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities" + resource = f"/organizations/{organizationId}/wireless/radio/rfHealth/neighbors/rssi/byDevice" - body_params = [ - "status", - "certificateAuthorityId", + query_params = [ + "networkIds", + "bands", + "channels", + "serials", + "tags", + "models", + "rfProfiles", + "gFloorplanId", + "minimumNeighborRssi", + "maximumNeighborRssi", + "minimumRfHealthScore", + "maximumRfHealthScore", + "rfScoreInterval", + "rfScoreRetryOnEmpty", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "bands", + "channels", + "serials", + "tags", + "models", + "rfProfiles", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"updateOrganizationWirelessDevicesRadsecCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + f"byOrganizationWirelessRadioRfHealthNeighborsRssiDevice: ignoring unrecognized kwargs: {invalid}" ) - return self._session.put(metadata, resource, payload) - - def createOrganizationWirelessDevicesRadsecCertificatesAuthority(self, organizationId: str): - """ - **Create an organization's RADSEC device Certificate Authority (CA)** - https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-radsec-certificates-authority - - - organizationId (string): Organization ID - """ - - metadata = { - "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities"], - "operation": "createOrganizationWirelessDevicesRadsecCertificatesAuthority", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities" - - return self._session.post(metadata, resource) + return self._session.get(metadata, resource, params) - def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organizationId: str, **kwargs): + def getOrganizationWirelessRadioRfHealthOverviewByNetworkByInterval(self, organizationId: str, **kwargs): """ - **Query for certificate revocation list (CRL) for the organization's RADSEC device Certificate Authorities (CAs).** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls + **Show the by-network RF Health score overview information for the organization in the given interval** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-rf-health-overview-by-network-by-interval - organizationId (string): Organization ID - - certificateAuthorityIds (array): Optional parameter to filter CAs by one or more CA IDs. All returned CAs will have an ID that is an exact match. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 182 days, 14 hours, 54 minutes, and 36 seconds from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 30 days, 10 hours, 29 minutes, and 6 seconds 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 30 days, 10 hours, 29 minutes, and 6 seconds. The default is 14 days. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 7200, 86400. The default is 7200. Interval is calculated if time params are provided. + - networkIds (array): Networks for which information should be gathered. + - bands (array): Bands for which information should be gathered. Valid bands are 2.4, 5, and 6. + - minimumRfHealthScore (integer): Minimum RF Health score for a network to be retrieved. + - maximumRfHealthScore (integer): Maximum RF Health score for a network to be retrieved. + - minimumHighCciPercentage (integer): Minimum percentage of radios with high CCI for a network to be retrieved. + - maximumHighCciPercentage (integer): Maximum percentage of radios with high CCI for a network to be retrieved. + - minimumChannelChanges (integer): Minimum number of channel changes for a network to be retrieved. + - maximumChannelChanges (integer): Maximum number of channel changes for a network to be retrieved. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities", "crls"], - "operation": "getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls", + "tags": ["wireless", "configure", "radio", "rfHealth", "overview", "byNetwork", "byInterval"], + "operation": "getOrganizationWirelessRadioRfHealthOverviewByNetworkByInterval", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities/crls" + resource = f"/organizations/{organizationId}/wireless/radio/rfHealth/overview/byNetwork/byInterval" query_params = [ - "certificateAuthorityIds", + "t0", + "t1", + "timespan", + "interval", + "networkIds", + "bands", + "minimumRfHealthScore", + "maximumRfHealthScore", + "minimumHighCciPercentage", + "maximumHighCciPercentage", + "minimumChannelChanges", + "maximumChannelChanges", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "certificateAuthorityIds", + "networkIds", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4362,36 +10102,52 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organi invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRadioRfHealthOverviewByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" ) return self._session.get(metadata, resource, params) - def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas(self, organizationId: str, **kwargs): + def getOrganizationWirelessRadioRrmByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **Query for all delta certificate revocation list (CRL) for the organization's RADSEC device Certificate Authority (CA) with the given id.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls-deltas + **List the AutoRF settings of an organization by network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-rrm-by-network - organizationId (string): Organization ID - - certificateAuthorityIds (array): Parameter to filter CAs by one or more CA IDs. All returned CAs will have an ID that is an exact match. + - 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): Optional parameter to filter results by network. + - startingAfter (string): Retrieving items after this network ID + - endingBefore (string): Retrieving items before this network ID + - perPage (integer): Number of items per page + - sortOrder (string): The sort order of items """ kwargs.update(locals()) + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + metadata = { - "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities", "crls", "deltas"], - "operation": "getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas", + "tags": ["wireless", "configure", "radio", "rrm", "byNetwork"], + "operation": "getOrganizationWirelessRadioRrmByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities/crls/deltas" + resource = f"/organizations/{organizationId}/wireless/radio/rrm/byNetwork" query_params = [ - "certificateAuthorityIds", + "networkIds", + "startingAfter", + "endingBefore", + "perPage", + "sortOrder", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "certificateAuthorityIds", + "networkIds", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4403,47 +10159,31 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas(self, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRadioRrmByNetwork: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get(metadata, resource, params) + return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesSystemCpuLoadHistory( - self, organizationId: str, total_pages=1, direction="next", **kwargs - ): + def getOrganizationWirelessRadioStatusByNetwork(self, organizationId: str, **kwargs): """ - **Return the CPU Load history for a list of wireless devices in the organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-system-cpu-load-history + **Show the status of this organization's radios, categorized by network and device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-status-by-network - 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 - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 1 day from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 1 day 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 1 day. The default is 1 day. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. - - 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. - - networkIds (array): Optional parameter to filter the result set by the included set of network IDs - - serials (array): Optional parameter to filter device availabilities history by device serial numbers + - networkIds (array): Networks for which radio status should be returned. + - serials (array): Serials for which radio status should be returned. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "system", "cpu", "load", "history"], - "operation": "getOrganizationWirelessDevicesSystemCpuLoadHistory", + "tags": ["wireless", "configure", "radio", "status", "byNetwork"], + "operation": "getOrganizationWirelessRadioStatusByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/system/cpu/load/history" + resource = f"/organizations/{organizationId}/wireless/radio/status/byNetwork" query_params = [ - "t0", - "t1", - "timespan", - "perPage", - "startingAfter", - "endingBefore", "networkIds", "serials", ] @@ -4463,52 +10203,66 @@ def getOrganizationWirelessDevicesSystemCpuLoadHistory( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesSystemCpuLoadHistory: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRadioStatusByNetwork: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) - def getOrganizationWirelessDevicesWirelessControllersByDevice( + def getOrganizationWirelessRfProfilesAssignmentsByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **List of Catalyst access points information** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-wireless-controllers-by-device + **List the RF profiles of an organization by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-rf-profiles-assignments-by-device - 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): Optional parameter to filter access points by network ID. This filter uses multiple exact matches. - - serials (array): Optional parameter to filter access points by its cloud ID. This filter uses multiple exact matches. - - controllerSerials (array): Optional parameter to filter access points by its wireless LAN controller cloud ID. This filter uses multiple exact matches. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. + - networkIds (array): Optional parameter to filter devices by network. + - productTypes (array): Optional parameter to filter devices by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect. + - name (string): Optional parameter to filter RF profiles by device name. All returned devices will have a name that contains the search term or is an exact match. + - mac (string): Optional parameter to filter RF profiles by device MAC address. All returned devices will have a MAC address that contains the search term or is an exact match. + - serial (string): Optional parameter to filter RF profiles by device serial number. All returned devices will have a serial number that contains the search term or is an exact match. + - model (string): Optional parameter to filter RF profiles by device model. All returned devices will have a model that contains the search term or is an exact match. + - macs (array): Optional parameter to filter RF profiles by one or more device MAC addresses. All returned devices will have a MAC address that is an exact match. + - serials (array): Optional parameter to filter RF profiles by one or more device serial numbers. All returned devices will have a serial number that is an exact match. + - models (array): Optional parameter to filter RF profiles by one or more device models. All returned devices will have a model that is an exact match. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "wirelessControllers", "byDevice"], - "operation": "getOrganizationWirelessDevicesWirelessControllersByDevice", + "tags": ["wireless", "configure", "rfProfiles", "assignments", "byDevice"], + "operation": "getOrganizationWirelessRfProfilesAssignmentsByDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/wirelessControllers/byDevice" + resource = f"/organizations/{organizationId}/wireless/rfProfiles/assignments/byDevice" query_params = [ + "perPage", + "startingAfter", + "endingBefore", "networkIds", + "productTypes", + "name", + "mac", + "serial", + "model", + "macs", "serials", - "controllerSerials", - "perPage", - "startingAfter", - "endingBefore", + "models", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", + "productTypes", + "macs", "serials", - "controllerSerials", + "models", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4520,39 +10274,39 @@ def getOrganizationWirelessDevicesWirelessControllersByDevice( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesWirelessControllersByDevice: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRfProfilesAssignmentsByDevice: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessLocationScanningByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationWirelessRoamingByNetworkByInterval(self, organizationId: str, networkIds: list, **kwargs): """ - **Return scanning API settings** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-location-scanning-by-network + **Get all wireless clients' roam events within the specified timespan grouped by network and time interval.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-roaming-by-network-by-interval - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 250. 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. - - networkIds (array): Optional parameter to filter scanning settings by network ID. + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 7 days. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 1800, 3600, 7200, 10800, 14400, 18000, 21600, 25200, 28800, 32400, 36000, 39600, 43200, 86400, 604800. The default is 7200. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "location", "scanning", "byNetwork"], - "operation": "getOrganizationWirelessLocationScanningByNetwork", + "tags": ["wireless", "monitor", "roaming", "byNetwork", "byInterval"], + "operation": "getOrganizationWirelessRoamingByNetworkByInterval", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/location/scanning/byNetwork" + resource = f"/organizations/{organizationId}/wireless/roaming/byNetwork/byInterval" query_params = [ - "perPage", - "startingAfter", - "endingBefore", "networkIds", + "t0", + "t1", + "timespan", + "interval", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} @@ -4569,44 +10323,49 @@ def getOrganizationWirelessLocationScanningByNetwork(self, organizationId: str, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessLocationScanningByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRoamingByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) - def getOrganizationWirelessLocationScanningReceivers(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Return scanning API receivers** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-location-scanning-receivers + **List the L2 isolation allow list MAC entry in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-firewall-isolation-allowlist-entries - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 250. Default is 50. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. - - networkIds (array): Optional parameter to filter scanning API receivers by network ID. + - networkIds (array): networkIds array to filter out results + - ssids (array): ssids number array to filter out results """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "location", "scanning", "receivers"], - "operation": "getOrganizationWirelessLocationScanningReceivers", + "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], + "operation": "getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers" + resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries" query_params = [ "perPage", "startingAfter", "endingBefore", "networkIds", + "ssids", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", + "ssids", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4618,41 +10377,39 @@ def getOrganizationWirelessLocationScanningReceivers(self, organizationId: str, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessLocationScanningReceivers: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def createOrganizationWirelessLocationScanningReceiver( - self, organizationId: str, network: dict, url: str, version: str, radio: dict, sharedSecret: str, **kwargs + def createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry( + self, organizationId: str, client: dict, ssid: dict, network: dict, **kwargs ): """ - **Add new receiver for scanning API** - https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-location-scanning-receiver + **Create isolation allow list MAC entry for this organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-ssids-firewall-isolation-allowlist-entry - organizationId (string): Organization ID - - network (object): Add scanning API receiver for network - - url (string): Receiver Url - - version (string): Scanning API Version - - radio (object): Add scanning API Radio - - sharedSecret (string): Secret Value for Receiver + - client (object): The client of allowlist + - ssid (object): The SSID that allowlist belongs to + - network (object): The Network that allowlist belongs to + - description (string): The description of mac address """ - kwargs = locals() + kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "location", "scanning", "receivers"], - "operation": "createOrganizationWirelessLocationScanningReceiver", + "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], + "operation": "createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers" + resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries" body_params = [ + "description", + "client", + "ssid", "network", - "url", - "version", - "radio", - "sharedSecret", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -4661,37 +10418,54 @@ def createOrganizationWirelessLocationScanningReceiver( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"createOrganizationWirelessLocationScanningReceiver: ignoring unrecognized kwargs: {invalid}" + f"createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry: ignoring unrecognized kwargs: {invalid}" ) return self._session.post(metadata, resource, payload) - def updateOrganizationWirelessLocationScanningReceiver(self, organizationId: str, receiverId: str, **kwargs): + def deleteOrganizationWirelessSsidsFirewallIsolationAllowlistEntry(self, organizationId: str, entryId: str): """ - **Change scanning API receiver settings** - https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-location-scanning-receiver + **Destroy isolation allow list MAC entry for this organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-ssids-firewall-isolation-allowlist-entry - organizationId (string): Organization ID - - receiverId (string): Receiver ID - - url (string): Receiver Url - - version (string): Scanning API Version - - radio (object): Add scanning API Radio + - entryId (string): Entry ID + """ + + metadata = { + "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], + "operation": "deleteOrganizationWirelessSsidsFirewallIsolationAllowlistEntry", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + entryId = urllib.parse.quote(str(entryId), safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries/{entryId}" + + return self._session.delete(metadata, resource) + + def updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry(self, organizationId: str, entryId: str, **kwargs): + """ + **Update isolation allow list MAC entry info** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-ssids-firewall-isolation-allowlist-entry + + - organizationId (string): Organization ID + - entryId (string): Entry ID + - description (string): The description of mac address + - client (object): The client of allowlist """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "location", "scanning", "receivers"], - "operation": "updateOrganizationWirelessLocationScanningReceiver", + "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], + "operation": "updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry", } organizationId = urllib.parse.quote(str(organizationId), safe="") - receiverId = urllib.parse.quote(str(receiverId), safe="") - resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers/{receiverId}" + entryId = urllib.parse.quote(str(entryId), safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries/{entryId}" body_params = [ - "url", - "version", - "radio", + "description", + "client", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -4700,58 +10474,41 @@ def updateOrganizationWirelessLocationScanningReceiver(self, organizationId: str invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"updateOrganizationWirelessLocationScanningReceiver: ignoring unrecognized kwargs: {invalid}" + f"updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry: ignoring unrecognized kwargs: {invalid}" ) return self._session.put(metadata, resource, payload) - def deleteOrganizationWirelessLocationScanningReceiver(self, organizationId: str, receiverId: str): - """ - **Delete a scanning API receiver** - https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-location-scanning-receiver - - - organizationId (string): Organization ID - - receiverId (string): Receiver ID - """ - - metadata = { - "tags": ["wireless", "configure", "location", "scanning", "receivers"], - "operation": "deleteOrganizationWirelessLocationScanningReceiver", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - receiverId = urllib.parse.quote(str(receiverId), safe="") - resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers/{receiverId}" - - return self._session.delete(metadata, resource) - - def getOrganizationWirelessMqttSettings(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationWirelessSsidsOpenRoamingByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **Return MQTT Settings for networks** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-mqtt-settings + **Returns an array of objects, each containing SSID OpenRoaming configs for the corresponding network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-open-roaming-by-network - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 250. Default is 50. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. - - networkIds (array): Optional parameter to filter mqtt settings by network ID. + - networkIds (array): Optional parameter to filter OpenRoaming configuration by Network Id. + - includeDisabledSsids (boolean): Optional parameter to include OpenRoaming configuration for disabled ssids. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "mqtt", "settings"], - "operation": "getOrganizationWirelessMqttSettings", + "tags": ["wireless", "configure", "ssids", "openRoaming", "byNetwork"], + "operation": "getOrganizationWirelessSsidsOpenRoamingByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/mqtt/settings" + resource = f"/organizations/{organizationId}/wireless/ssids/openRoaming/byNetwork" query_params = [ "perPage", "startingAfter", "endingBefore", "networkIds", + "includeDisabledSsids", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} @@ -4767,123 +10524,108 @@ def getOrganizationWirelessMqttSettings(self, organizationId: str, total_pages=1 all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationWirelessMqttSettings: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"getOrganizationWirelessSsidsOpenRoamingByNetwork: ignoring unrecognized kwargs: {invalid}" + ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def updateOrganizationWirelessMqttSettings(self, organizationId: str, network: dict, mqtt: dict, **kwargs): + def getOrganizationWirelessSsidsPoliciesClientExclusionBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Add new broker config for wireless MQTT** - https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-mqtt-settings + **Returns an array of objects, each containing client exclusion enablement statuses for one SSID** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-policies-client-exclusion-by-ssid - organizationId (string): Organization ID - - network (object): Add MQTT Settings for network - - mqtt (object): MQTT Settings for network - - ble (object): MQTT BLE Settings for network - - wifi (object): MQTT Wi-Fi Settings for network + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter by Network ID. + - includeDisabledSsids (boolean): Optional parameter to include disabled SSID's. + - ssidNumbers (array): Optional parameter to filter by SSID numbers. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "mqtt", "settings"], - "operation": "updateOrganizationWirelessMqttSettings", + "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion", "bySsid"], + "operation": "getOrganizationWirelessSsidsPoliciesClientExclusionBySsid", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/mqtt/settings" + resource = f"/organizations/{organizationId}/wireless/ssids/policies/clientExclusion/bySsid" - body_params = [ - "network", - "mqtt", - "ble", - "wifi", + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "includeDisabledSsids", + "ssidNumbers", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} - - if self._session._validate_kwargs: - all_params = [] + body_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning( - f"updateOrganizationWirelessMqttSettings: ignoring unrecognized kwargs: {invalid}" - ) - - return self._session.put(metadata, resource, payload) - - def recalculateOrganizationWirelessRadioAutoRfChannels(self, organizationId: str, networkIds: list, **kwargs): - """ - **Recalculates automatically assigned channels for every AP within specified the specified network(s)** - https://developer.cisco.com/meraki/api-v1/#!recalculate-organization-wireless-radio-auto-rf-channels - - - organizationId (string): Organization ID - - networkIds (array): A list of network ids (limit: 15). - """ - - kwargs = locals() - - metadata = { - "tags": ["wireless", "configure", "radio", "autoRf", "channels"], - "operation": "recalculateOrganizationWirelessRadioAutoRfChannels", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/radio/autoRf/channels/recalculate" + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} - body_params = [ + array_params = [ "networkIds", + "ssidNumbers", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"recalculateOrganizationWirelessRadioAutoRfChannels: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessSsidsPoliciesClientExclusionBySsid: ignoring unrecognized kwargs: {invalid}" ) - return self._session.post(metadata, resource, payload) + return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessRadioRrmByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): - """ - **List the AutoRF settings of an organization by network** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-rrm-by-network + def getOrganizationWirelessSsidsPoliciesClientExclusionStaticExclusionsBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns an array of objects, each containing a list of MAC's excluded from a given SSID** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-policies-client-exclusion-static-exclusions-by-ssid - 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): Optional parameter to filter results by network. - - startingAfter (string): Retrieving items after this network ID - - endingBefore (string): Retrieving items before this network ID - - perPage (integer): Number of items per page - - sortOrder (string): The sort order of items + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter Network ID. + - includeDisabledSsids (boolean): Optional parameter to include disabled SSID's. + - ssidNumbers (array): Optional parameter to filter by SSID numbers. """ kwargs.update(locals()) - if "sortOrder" in kwargs: - options = ["ascending", "descending"] - assert kwargs["sortOrder"] in options, ( - f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' - ) - metadata = { - "tags": ["wireless", "configure", "radio", "rrm", "byNetwork"], - "operation": "getOrganizationWirelessRadioRrmByNetwork", + "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion", "static", "exclusions", "bySsid"], + "operation": "getOrganizationWirelessSsidsPoliciesClientExclusionStaticExclusionsBySsid", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/radio/rrm/byNetwork" + resource = f"/organizations/{organizationId}/wireless/ssids/policies/clientExclusion/static/exclusions/bySsid" query_params = [ - "networkIds", + "perPage", "startingAfter", "endingBefore", - "perPage", - "sortOrder", + "networkIds", + "includeDisabledSsids", + "ssidNumbers", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", + "ssidNumbers", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4895,66 +10637,61 @@ def getOrganizationWirelessRadioRrmByNetwork(self, organizationId: str, total_pa invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessRadioRrmByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessSsidsPoliciesClientExclusionStaticExclusionsBySsid: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessRfProfilesAssignmentsByDevice( - self, organizationId: str, total_pages=1, direction="next", **kwargs - ): + def getOrganizationWirelessSsidsProfiles(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **List the RF profiles of an organization by device** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-rf-profiles-assignments-by-device + **Returns the SSID profiles for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-profiles - 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 + - name (string): (Optional) Filter results by name. Case insensitive substring match. + - sortBy (string): Column to sort results by. Default is `name`. + - sortOrder (string): Direction to sort results by. Default is `asc`. + - profileIds (array): (Optional) Filter results by a list of SSID profile IDs. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. - - networkIds (array): Optional parameter to filter devices by network. - - productTypes (array): Optional parameter to filter devices by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect. - - name (string): Optional parameter to filter RF profiles by device name. All returned devices will have a name that contains the search term or is an exact match. - - mac (string): Optional parameter to filter RF profiles by device MAC address. All returned devices will have a MAC address that contains the search term or is an exact match. - - serial (string): Optional parameter to filter RF profiles by device serial number. All returned devices will have a serial number that contains the search term or is an exact match. - - model (string): Optional parameter to filter RF profiles by device model. All returned devices will have a model that contains the search term or is an exact match. - - macs (array): Optional parameter to filter RF profiles by one or more device MAC addresses. All returned devices will have a MAC address that is an exact match. - - serials (array): Optional parameter to filter RF profiles by one or more device serial numbers. All returned devices will have a serial number that is an exact match. - - models (array): Optional parameter to filter RF profiles by one or more device models. All returned devices will have a model that is an exact match. """ kwargs.update(locals()) + if "sortBy" in kwargs: + options = ["name"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + metadata = { - "tags": ["wireless", "configure", "rfProfiles", "assignments", "byDevice"], - "operation": "getOrganizationWirelessRfProfilesAssignmentsByDevice", + "tags": ["wireless", "configure", "ssids", "profiles"], + "operation": "getOrganizationWirelessSsidsProfiles", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/rfProfiles/assignments/byDevice" + resource = f"/organizations/{organizationId}/wireless/ssids/profiles" query_params = [ + "name", + "sortBy", + "sortOrder", + "profileIds", "perPage", "startingAfter", "endingBefore", - "networkIds", - "productTypes", - "name", - "mac", - "serial", - "model", - "macs", - "serials", - "models", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "networkIds", - "productTypes", - "macs", - "serials", - "models", + "profileIds", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4964,51 +10701,87 @@ def getOrganizationWirelessRfProfilesAssignmentsByDevice( if self._session._validate_kwargs: all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationWirelessSsidsProfiles: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationWirelessSsidsProfile(self, organizationId: str, name: str, ssid: dict, **kwargs): + """ + **Create a new SSID profile in an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-ssids-profile + + - organizationId (string): Organization ID + - name (string): Name of the SSID profile + - ssid (object): SSID configuration for the profile + - precedence (object): Precedence configuration for the SSID profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "ssids", "profiles"], + "operation": "createOrganizationWirelessSsidsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/profiles" + + body_params = [ + "name", + "precedence", + "ssid", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessRfProfilesAssignmentsByDevice: ignoring unrecognized kwargs: {invalid}" + f"createOrganizationWirelessSsidsProfile: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.post(metadata, resource, payload) - def getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries( - self, organizationId: str, total_pages=1, direction="next", **kwargs - ): + def getOrganizationWirelessSsidsProfilesAssignments(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **List the L2 isolation allow list MAC entry in an organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-firewall-isolation-allowlist-entries + **List the SSID profile assignments in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-profiles-assignments - 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): The network IDs to include in the result set. + - ssidIds (array): The SSID IDs to include in the result set. + - profileIds (array): The SSID profile IDs to include in the result set. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. - - networkIds (array): networkIds array to filter out results - - ssids (array): ssids number array to filter out results """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], - "operation": "getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries", + "tags": ["wireless", "configure", "ssids", "profiles", "assignments"], + "operation": "getOrganizationWirelessSsidsProfilesAssignments", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries" + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/assignments" query_params = [ + "networkIds", + "ssidIds", + "profileIds", "perPage", "startingAfter", "endingBefore", - "networkIds", - "ssids", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", - "ssids", + "ssidIds", + "profileIds", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -5020,37 +10793,33 @@ def getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessSsidsProfilesAssignments: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry( - self, organizationId: str, client: dict, ssid: dict, network: dict, **kwargs - ): + def createOrganizationWirelessSsidsProfilesAssignment(self, organizationId: str, profile: dict, ssid: dict, **kwargs): """ - **Create isolation allow list MAC entry for this organization** - https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-ssids-firewall-isolation-allowlist-entry + **Assigns an SSID profile to an SSID in the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-ssids-profiles-assignment - organizationId (string): Organization ID - - client (object): The client of allowlist - - ssid (object): The SSID that allowlist belongs to - - network (object): The Network that allowlist belongs to - - description (string): The description of mac address + - profile (object): SSID profile to assign + - ssid (object): SSID to assign the SSID profile to + - network (object): Network containing the SSID (required if SSID number is used) """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], - "operation": "createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry", + "tags": ["wireless", "configure", "ssids", "profiles", "assignments"], + "operation": "createOrganizationWirelessSsidsProfilesAssignment", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries" + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/assignments" body_params = [ - "description", - "client", + "profile", "ssid", "network", ] @@ -5061,102 +10830,161 @@ def createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry: ignoring unrecognized kwargs: {invalid}" + f"createOrganizationWirelessSsidsProfilesAssignment: ignoring unrecognized kwargs: {invalid}" ) return self._session.post(metadata, resource, payload) - def deleteOrganizationWirelessSsidsFirewallIsolationAllowlistEntry(self, organizationId: str, entryId: str): + def deleteOrganizationWirelessSsidsProfilesAssignments(self, organizationId: str, ssid: dict, **kwargs): """ - **Destroy isolation allow list MAC entry for this organization** - https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-ssids-firewall-isolation-allowlist-entry + **Unassigns the SSID profile assigned to an SSID** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-ssids-profiles-assignments - organizationId (string): Organization ID - - entryId (string): Entry ID + - ssid (object): SSID to delete the SSID profile assignment of + - network (object): Network containing the SSID (required if SSID number is used) """ + kwargs.update(locals()) + metadata = { - "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], - "operation": "deleteOrganizationWirelessSsidsFirewallIsolationAllowlistEntry", + "tags": ["wireless", "configure", "ssids", "profiles", "assignments"], + "operation": "deleteOrganizationWirelessSsidsProfilesAssignments", } organizationId = urllib.parse.quote(str(organizationId), safe="") - entryId = urllib.parse.quote(str(entryId), safe="") - resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries/{entryId}" + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/assignments" return self._session.delete(metadata, resource) - def updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry(self, organizationId: str, entryId: str, **kwargs): + def getOrganizationWirelessSsidsProfilesAssignmentsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Update isolation allow list MAC entry info** - https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-ssids-firewall-isolation-allowlist-entry + **List the SSID profile assignments in an organization, grouped by network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-profiles-assignments-by-network - organizationId (string): Organization ID - - entryId (string): Entry ID - - description (string): The description of mac address - - client (object): The client of allowlist + - 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): The network IDs to include in the result set. + - profileIds (array): The SSID profile IDs to include in the result set. + - networkGroupIds (array): The network group IDs to include in the result set. + - includeAllNetworks (boolean): When set to true, include all networks in the organization, even those without any SSID profile assignments. Defaults to false. + - excludeProfileIds (array): The SSID profile IDs to exclude from the result set. + - sortBy (string): Optional parameter to specify the field used to sort results. (default: network) + - sortOrder (string): Optional parameter to specify the sort order. Default value is asc. + - search (string): Optional parameter to search on network name or network group name. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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()) + if "sortBy" in kwargs: + options = ["group", "network"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + metadata = { - "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], - "operation": "updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry", + "tags": ["wireless", "configure", "ssids", "profiles", "assignments", "byNetwork"], + "operation": "getOrganizationWirelessSsidsProfilesAssignmentsByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - entryId = urllib.parse.quote(str(entryId), safe="") - resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries/{entryId}" + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/assignments/byNetwork" - body_params = [ - "description", - "client", + query_params = [ + "networkIds", + "profileIds", + "networkGroupIds", + "includeAllNetworks", + "excludeProfileIds", + "sortBy", + "sortOrder", + "search", + "perPage", + "startingAfter", + "endingBefore", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "profileIds", + "networkGroupIds", + "excludeProfileIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessSsidsProfilesAssignmentsByNetwork: ignoring unrecognized kwargs: {invalid}" ) - return self._session.put(metadata, resource, payload) + return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessSsidsOpenRoamingByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationWirelessSsidsProfilesOverviews(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **Returns an array of objects, each containing SSID OpenRoaming configs for the corresponding network** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-open-roaming-by-network + **Returns the SSID profiles' overview information for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-profiles-overviews - 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 + - name (string): (Optional) Filter results by name. Case insensitive substring match. + - sortBy (string): Column to sort results by. Default is `name`. + - sortOrder (string): Direction to sort results by. Default is `asc`. + - profileIds (array): (Optional) Filter results by a list of SSID profile IDs. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. - - networkIds (array): Optional parameter to filter OpenRoaming configuration by Network Id. - - includeDisabledSsids (boolean): Optional parameter to include OpenRoaming configuration for disabled ssids. """ kwargs.update(locals()) + if "sortBy" in kwargs: + options = ["name"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + metadata = { - "tags": ["wireless", "configure", "ssids", "openRoaming", "byNetwork"], - "operation": "getOrganizationWirelessSsidsOpenRoamingByNetwork", + "tags": ["wireless", "configure", "ssids", "profiles", "overviews"], + "operation": "getOrganizationWirelessSsidsProfilesOverviews", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/ssids/openRoaming/byNetwork" + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/overviews" query_params = [ + "name", + "sortBy", + "sortOrder", + "profileIds", "perPage", "startingAfter", "endingBefore", - "networkIds", - "includeDisabledSsids", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "networkIds", + "profileIds", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -5168,11 +10996,67 @@ def getOrganizationWirelessSsidsOpenRoamingByNetwork(self, organizationId: str, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessSsidsOpenRoamingByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessSsidsProfilesOverviews: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) + def updateOrganizationWirelessSsidsProfile(self, organizationId: str, id: str, **kwargs): + """ + **Update this SSID profile** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-ssids-profile + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of the SSID profile + - ssid (object): SSID configuration for the profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "ssids", "profiles"], + "operation": "updateOrganizationWirelessSsidsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/{id}" + + body_params = [ + "name", + "ssid", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationWirelessSsidsProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationWirelessSsidsProfile(self, organizationId: str, id: str): + """ + **Delete an SSID profile** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-ssids-profile + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["wireless", "configure", "ssids", "profiles"], + "operation": "deleteOrganizationWirelessSsidsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/{id}" + + return self._session.delete(metadata, resource) + def getOrganizationWirelessSsidsStatusesByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List status information of all BSSIDs in your organization** diff --git a/meraki/aio/api/wirelessController.py b/meraki/aio/api/wirelessController.py index ee7a75b2..e4cb0e48 100644 --- a/meraki/aio/api/wirelessController.py +++ b/meraki/aio/api/wirelessController.py @@ -177,6 +177,59 @@ def getOrganizationWirelessControllerConnections(self, organizationId: str, tota return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationWirelessControllerConnectionsUnassigned( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List of unassigned Catalyst access points and summary information** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-connections-unassigned + + - 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 + - controllerSerials (array): Optional parameter to filter access points by wireless LAN controller cloud ID. This filter uses multiple exact matches. + - supported (boolean): Optional parameter to filter access points based on if they are supported for dashboard monitoring. Values can be true/false, if not provided then all unassigned APs will be returned + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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": ["wirelessController", "configure", "connections", "unassigned"], + "operation": "getOrganizationWirelessControllerConnectionsUnassigned", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wirelessController/connections/unassigned" + + query_params = [ + "controllerSerials", + "supported", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "controllerSerials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessControllerConnectionsUnassigned: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationWirelessControllerDevicesInterfacesL2ByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -861,3 +914,36 @@ def getOrganizationWirelessControllerOverviewByDevice( ) return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def generateOrganizationWirelessControllerRegulatoryDomainPackage(self, organizationId: str, **kwargs): + """ + **Generate the regulatory domain package** + https://developer.cisco.com/meraki/api-v1/#!generate-organization-wireless-controller-regulatory-domain-package + + - organizationId (string): Organization ID + - networkIds (array): A list of network IDs to filter by + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wirelessController", "configure", "regulatoryDomain", "package"], + "operation": "generateOrganizationWirelessControllerRegulatoryDomainPackage", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wirelessController/regulatoryDomain/package/generate" + + body_params = [ + "networkIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"generateOrganizationWirelessControllerRegulatoryDomainPackage: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) diff --git a/meraki/api/administered.py b/meraki/api/administered.py index 5f1be098..43620862 100644 --- a/meraki/api/administered.py +++ b/meraki/api/administered.py @@ -67,3 +67,36 @@ def revokeAdministeredIdentitiesMeApiKeys(self, suffix: str): resource = f"/administered/identities/me/api/keys/{suffix}/revoke" return self._session.post(metadata, resource) + + def getAdministeredSearchLive(self, query: str, organizationId: str, networkId: str, **kwargs): + """ + **List the appropriate results for a given global search utilizing live_search_react** + https://developer.cisco.com/meraki/api-v1/#!get-administered-search-live + + - query (string): Search keywords + - organizationId (string): Id of Organization you want to search with + - networkId (string): Id of NodeGroup you want to seach with + """ + + kwargs = locals() + + metadata = { + "tags": ["administered", "configure", "search", "live"], + "operation": "getAdministeredSearchLive", + } + resource = "/administered/search/live" + + query_params = [ + "query", + "organizationId", + "networkId", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getAdministeredSearchLive: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) diff --git a/meraki/api/appliance.py b/meraki/api/appliance.py index 88d35b2b..24b56d66 100644 --- a/meraki/api/appliance.py +++ b/meraki/api/appliance.py @@ -23,6 +23,112 @@ def getDeviceApplianceDhcpSubnets(self, serial: str): return self._session.get(metadata, resource) + def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): + """ + **Update configurations for an appliance's specified port** + https://developer.cisco.com/meraki/api-v1/#!create-device-appliance-interfaces-ports-update + + - serial (string): Serial + - interface (object): The interface tuple used to identify the port + - enabled (boolean): Indicates whether the port is enabled + - personality (object): Describes the port's configurability + - uplink (object): The port's settings when in WAN mode + - downlink (object): The port's VLAN settings when in LAN mode + - speed (string): Link speed for the port, in Mbps + - duplex (string): Duplex configuration for the port + """ + + kwargs.update(locals()) + + if "speed" in kwargs: + options = ["10", "100", "1000", "10000", "2500", "25000", "5000", "auto"] + assert kwargs["speed"] in options, f'''"speed" cannot be "{kwargs["speed"]}", & must be set to one of: {options}''' + if "duplex" in kwargs: + options = ["auto", "full", "half"] + assert kwargs["duplex"] in options, ( + f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["appliance", "configure", "interfaces", "ports", "update"], + "operation": "createDeviceApplianceInterfacesPortsUpdate", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/appliance/interfaces/ports/update" + + body_params = [ + "interface", + "enabled", + "personality", + "uplink", + "downlink", + "speed", + "duplex", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createDeviceApplianceInterfacesPortsUpdate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs): + """ + **Update configurations for an appliance's specified port** + https://developer.cisco.com/meraki/api-v1/#!update-device-appliance-interfaces-port + + - serial (string): Serial + - number (string): Number + - enabled (boolean): Indicates whether the port is enabled + - personality (object): Describes the port's configurability + - uplink (object): The port's settings when in WAN mode + - downlink (object): The port's VLAN settings when in LAN mode + - speed (string): Link speed for the port, in Mbps + - duplex (string): Duplex configuration for the port + """ + + kwargs.update(locals()) + + if "speed" in kwargs: + options = ["10", "100", "1000", "10000", "2500", "25000", "5000", "auto"] + assert kwargs["speed"] in options, f'''"speed" cannot be "{kwargs["speed"]}", & must be set to one of: {options}''' + if "duplex" in kwargs: + options = ["auto", "full", "half"] + assert kwargs["duplex"] in options, ( + f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["appliance", "configure", "interfaces", "ports"], + "operation": "updateDeviceApplianceInterfacesPort", + } + serial = urllib.parse.quote(str(serial), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/devices/{serial}/appliance/interfaces/ports/{number}" + + body_params = [ + "enabled", + "personality", + "uplink", + "downlink", + "speed", + "duplex", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateDeviceApplianceInterfacesPort: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getDeviceAppliancePerformance(self, serial: str, **kwargs): """ **Return the performance score for a single MX** @@ -1038,6 +1144,93 @@ def updateNetworkApplianceFirewallSettings(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) + def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwargs): + """ + **Create wired L3 interface configuration** + https://developer.cisco.com/meraki/api-v1/#!create-network-appliance-interfaces-l-3 + + - networkId (string): Network ID + - ipv4 (object): IPv4 configuration + - port (object): Port configuration + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "interfaces", "l3"], + "operation": "createNetworkApplianceInterfacesL3", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/interfaces/l3" + + body_params = [ + "port", + "ipv4", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkApplianceInterfacesL3: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, **kwargs): + """ + **Update wired L3 interface configuration** + https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-interfaces-l-3 + + - networkId (string): Network ID + - interfaceId (string): Interface ID + - port (object): Port configuration + - ipv4 (object): IPv4 configuration + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "interfaces", "l3"], + "operation": "updateNetworkApplianceInterfacesL3", + } + networkId = urllib.parse.quote(str(networkId), safe="") + interfaceId = urllib.parse.quote(str(interfaceId), safe="") + resource = f"/networks/{networkId}/appliance/interfaces/l3/{interfaceId}" + + body_params = [ + "port", + "ipv4", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkApplianceInterfacesL3: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str): + """ + **Delete wired L3 interface configuration** + https://developer.cisco.com/meraki/api-v1/#!delete-network-appliance-interfaces-l-3 + + - networkId (string): Network ID + - interfaceId (string): Interface ID + """ + + metadata = { + "tags": ["appliance", "configure", "interfaces", "l3"], + "operation": "deleteNetworkApplianceInterfacesL3", + } + networkId = urllib.parse.quote(str(networkId), safe="") + interfaceId = urllib.parse.quote(str(interfaceId), safe="") + resource = f"/networks/{networkId}/appliance/interfaces/l3/{interfaceId}" + + return self._session.delete(metadata, resource) + def getNetworkAppliancePorts(self, networkId: str): """ **List per-port VLAN settings for all ports of a secure router or security appliance.** @@ -1087,6 +1280,8 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): - vlan (integer): Native VLAN when the port is in Trunk mode. Access VLAN when the port is in Access mode. - allowedVlans (string): Comma-delimited list of VLAN IDs (e.g. '2,15') for all devices. Secure Routers also support VLAN ranges (e.g. '2-10,15'). Use 'all' to permit all VLANs on the port. - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybris-radius' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. + - peerSgtCapable (boolean): If true, Peer SGT is enabled for traffic through this port. Applicable to trunk port only, not access port. + - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this port is assigned to. """ kwargs.update(locals()) @@ -1106,6 +1301,8 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): "vlan", "allowedVlans", "accessPolicy", + "peerSgtCapable", + "adaptivePolicyGroupId", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1674,6 +1871,7 @@ def updateNetworkApplianceSingleLan(self, networkId: str, **kwargs): - applianceIp (string): The appliance IP address of the single LAN - ipv6 (object): IPv6 configuration on the VLAN - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this LAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above + - vrf (object): VRF configuration on the Single LAN """ kwargs.update(locals()) @@ -1690,6 +1888,7 @@ def updateNetworkApplianceSingleLan(self, networkId: str, **kwargs): "applianceIp", "ipv6", "mandatoryDhcp", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2301,6 +2500,7 @@ def updateNetworkApplianceTrafficShapingVpnExclusions(self, networkId: str, **kw - networkId (string): Network ID - custom (array): Custom VPN exclusion rules. Pass an empty array to clear existing rules. - majorApplications (array): Major Application based VPN exclusion rules. Pass an empty array to clear existing rules. + - applications (array): NBAR Application based VPN exclusion rules. Available for networks on >=19.2 firmware """ kwargs.update(locals()) @@ -2315,6 +2515,7 @@ def updateNetworkApplianceTrafficShapingVpnExclusions(self, networkId: str, **kw body_params = [ "custom", "majorApplications", + "applications", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2378,6 +2579,186 @@ def disconnectNetworkApplianceUmbrellaAccount(self, networkId: str): return self._session.post(metadata, resource) + def disableNetworkApplianceUmbrellaProtection(self, networkId: str): + """ + **Disable umbrella protection for an MX network** + https://developer.cisco.com/meraki/api-v1/#!disable-network-appliance-umbrella-protection + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["appliance", "configure", "umbrella"], + "operation": "disableNetworkApplianceUmbrellaProtection", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/disableProtection" + + return self._session.delete(metadata, resource) + + def enableNetworkApplianceUmbrellaProtection(self, networkId: str): + """ + **Enable umbrella protection for an MX network** + https://developer.cisco.com/meraki/api-v1/#!enable-network-appliance-umbrella-protection + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["appliance", "configure", "umbrella"], + "operation": "enableNetworkApplianceUmbrellaProtection", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/enableProtection" + + return self._session.post(metadata, resource) + + def excludeNetworkApplianceUmbrellaDomains(self, networkId: str, domains: list, **kwargs): + """ + **Specify one or more domain names to be excluded from being routed to Cisco Umbrella.** + https://developer.cisco.com/meraki/api-v1/#!exclude-network-appliance-umbrella-domains + + - networkId (string): Network ID + - domains (array): Array of domain names + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "umbrella"], + "operation": "excludeNetworkApplianceUmbrellaDomains", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/excludeDomains" + + body_params = [ + "domains", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"excludeNetworkApplianceUmbrellaDomains: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def policiesNetworkApplianceUmbrella(self, networkId: str, policyIds: list, **kwargs): + """ + **Update umbrella policies applied to MX network.** + https://developer.cisco.com/meraki/api-v1/#!policies-network-appliance-umbrella + + - networkId (string): Network ID + - policyIds (array): Array of umbrella policy IDs + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "umbrella"], + "operation": "policiesNetworkApplianceUmbrella", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/policies" + + body_params = [ + "policyIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"policiesNetworkApplianceUmbrella: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str, **kwargs): + """ + **Add one umbrella policy to your network.** + https://developer.cisco.com/meraki/api-v1/#!add-network-appliance-umbrella-policies + + - networkId (string): Network ID + - policyId (string): Umbrella policy ID + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "umbrella", "policies"], + "operation": "addNetworkApplianceUmbrellaPolicies", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/policies/add" + + body_params = [ + "policyId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"addNetworkApplianceUmbrellaPolicies: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str): + """ + **Remove one umbrella policy from your network.** + https://developer.cisco.com/meraki/api-v1/#!remove-network-appliance-umbrella-policies + + - networkId (string): Network ID + - policyId (string): Umbrella policy ID + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "umbrella", "policies"], + "operation": "removeNetworkApplianceUmbrellaPolicies", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/policies/remove" + + return self._session.delete(metadata, resource) + + def protectionNetworkApplianceUmbrella(self, networkId: str, enable: bool, **kwargs): + """ + **Enable or disable umbrella protection for an MX network** + https://developer.cisco.com/meraki/api-v1/#!protection-network-appliance-umbrella + + - networkId (string): Network ID + - enable (boolean): Enable or disable umbrella protection + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "umbrella"], + "operation": "protectionNetworkApplianceUmbrella", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/protection" + + body_params = [ + "enable", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"protectionNetworkApplianceUmbrella: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def updateNetworkApplianceUplinksNat(self, networkId: str, uplinks: list, **kwargs): """ **Update uplink NAT settings of the specified network** @@ -2488,6 +2869,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg - dhcpBootNextServer (string): DHCP boot option to direct boot clients to the server to load the boot file from - dhcpBootFilename (string): DHCP boot option for boot filename - dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties. + - adaptivePolicyGroupId (string): Adaptive policy group ID this VLAN is assigned to. - vrf (object): VRF configuration on the VLAN - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -2535,6 +2917,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg "dhcpBootNextServer", "dhcpBootFilename", "dhcpOptions", + "adaptivePolicyGroupId", "vrf", "uplinks", ] @@ -2642,6 +3025,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): - mask (integer): Mask used for the subnet of all bound to the template networks. Applicable only for template network. - ipv6 (object): IPv6 configuration on the VLAN - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above + - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this VLAN is assigned to. - vrf (object): VRF configuration on the VLAN - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -2693,6 +3077,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): "mask", "ipv6", "mandatoryDhcp", + "adaptivePolicyGroupId", "vrf", "uplinks", ] @@ -2807,6 +3192,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw - mode (string): The site-to-site VPN mode. Can be one of 'none', 'spoke' or 'hub' - hubs (array): The list of VPN hubs, in order of preference. In spoke mode, at least 1 hub is required. - subnets (array): The list of subnets and their VPN presence. + - peerSgtCapable (boolean): Whether or not Peer SGT is enabled for traffic to this VPN peer. - subnet (object): Configuration of subnet features - hostTranslations (array): The list of VPN host translations. Host translations are supported starting from MX firmware version 26.1.2 """ @@ -2828,6 +3214,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw "mode", "hubs", "subnets", + "peerSgtCapable", "subnet", "hostTranslations", ] @@ -2916,17 +3303,18 @@ def swapNetworkApplianceWarmSpare(self, networkId: str): return self._session.post(metadata, resource) - def getOrganizationApplianceDevicesRedundancyByNetwork( + def getOrganizationApplianceDevicesInterfacesL3ByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Return MX warm spare settings** - https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-redundancy-by-network + **Listing of L3 Interface Configurations across networks for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-interfaces-l-3-by-network - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 5 - 1000. Default is 50. + - networkIds (array): Optional Network IDs to filter results + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. - 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. """ @@ -2934,21 +3322,115 @@ def getOrganizationApplianceDevicesRedundancyByNetwork( kwargs.update(locals()) metadata = { - "tags": ["appliance", "configure", "devices", "redundancy", "byNetwork"], - "operation": "getOrganizationApplianceDevicesRedundancyByNetwork", + "tags": ["appliance", "configure", "devices", "interfaces", "l3", "byNetwork"], + "operation": "getOrganizationApplianceDevicesInterfacesL3ByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/appliance/devices/redundancy/byNetwork" + resource = f"/organizations/{organizationId}/appliance/devices/interfaces/l3/byNetwork" 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()) + if self._session._validate_kwargs: - all_params = query_params + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceDevicesInterfacesL3ByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationApplianceDevicesInterfacesPortsByDevice(self, organizationId: str, **kwargs): + """ + **Returns port configurations for appliances in a given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-interfaces-ports-by-device + + - organizationId (string): Organization ID + - serials (array): Parameter to filter the results by device serials + - numbers (array): Parameter to filter the results by specific ports + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "devices", "interfaces", "ports", "byDevice"], + "operation": "getOrganizationApplianceDevicesInterfacesPortsByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/devices/interfaces/ports/byDevice" + + query_params = [ + "serials", + "numbers", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "serials", + "numbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceDevicesInterfacesPortsByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApplianceDevicesRedundancyByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Return MX warm spare settings** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-redundancy-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 5 - 1000. 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": ["appliance", "configure", "devices", "redundancy", "byNetwork"], + "operation": "getOrganizationApplianceDevicesRedundancyByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/devices/redundancy/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( @@ -2957,6 +3439,68 @@ def getOrganizationApplianceDevicesRedundancyByNetwork( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceDevicesSystemUtilizationByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Return the appliance utilization history for devices in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-system-utilization-by-interval + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 2 hours. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 1200. The default is 1200. + - networkIds (array): Optional parameter to filter the result set by the included set of network IDs + - serials (array): Optional parameter to filter device utilization history by device serial numbers + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "devices", "system", "utilization", "byInterval"], + "operation": "getOrganizationApplianceDevicesSystemUtilizationByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/devices/system/utilization/byInterval" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceDevicesSystemUtilizationByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceDnsLocalProfiles(self, organizationId: str, **kwargs): """ **Fetch the local DNS profiles used in the organization** @@ -3682,6 +4226,55 @@ def updateOrganizationApplianceRoutingVrfsSettings(self, organizationId: str, en return self._session.put(metadata, resource, payload) + def getOrganizationApplianceSdwanInternetPolicies(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get the SDWAN internet traffic preferences for an MX network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-sdwan-internet-policies + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 200. 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. + - wanTrafficUplinkPreferences (array): policies with respective traffic filters for an MX network + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "sdwan", "internetPolicies"], + "operation": "getOrganizationApplianceSdwanInternetPolicies", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/sdwan/internetPolicies" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "wanTrafficUplinkPreferences", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "wanTrafficUplinkPreferences", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSdwanInternetPolicies: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceSecurityEvents(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the security events for an organization** @@ -3836,6 +4429,58 @@ def getOrganizationApplianceTrafficShapingVpnExclusionsByNetwork( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceUmbrellaPoliciesByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List Umbrella policy IDs applied to MX networks in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-umbrella-policies-by-network + + - 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 + - organizationId (string): Organization identifier + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - networkIds (array): Filter results to only the given network IDs + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "umbrella", "policies", "byNetwork"], + "operation": "getOrganizationApplianceUmbrellaPoliciesByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/umbrella/policies/byNetwork" + + query_params = [ + "organizationId", + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceUmbrellaPoliciesByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceUplinkStatuses(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the uplink status of every Meraki MX and Z series appliances in the organization** @@ -4021,6 +4666,233 @@ def getOrganizationApplianceUplinksUsageByNetwork(self, organizationId: str, **k return self._session.get(metadata, resource, params) + def getOrganizationApplianceVlans(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the VLANs for an Organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vlans + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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": ["appliance", "configure", "vlans"], + "operation": "getOrganizationApplianceVlans", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/vlans" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationApplianceVlans: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationApplianceVpnConnectivityVpnPeersByNetwork(self, organizationId: str, **kwargs): + """ + **Summarizes by-device vpn peers for the organization in the given interval.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-connectivity-vpn-peers-by-network + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 3600, 14400, 86400. The default is 3600. Interval is calculated if time params are provided. + - networkIds (array): Filter results by network. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "vpn", "connectivity", "vpnPeers", "byNetwork"], + "operation": "getOrganizationApplianceVpnConnectivityVpnPeersByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/vpn/connectivity/vpnPeers/byNetwork" + + query_params = [ + "t0", + "t1", + "timespan", + "interval", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceVpnConnectivityVpnPeersByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApplianceVpnRemoteAccessSecureClientAuthenticationByClient(self, organizationId: str, **kwargs): + """ + **Get authentication for all clients in organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-remote-access-secure-client-authentication-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "vpn", "remoteAccess", "secureClient", "authentication", "byClient"], + "operation": "getOrganizationApplianceVpnRemoteAccessSecureClientAuthenticationByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/vpn/remoteAccess/secureClient/authentication/byClient" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceVpnRemoteAccessSecureClientAuthenticationByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApplianceVpnRemoteAccessSecureClientIpAssignmentByClient(self, organizationId: str, **kwargs): + """ + **Get IP assignment for all clients in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-remote-access-secure-client-ip-assignment-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "vpn", "remoteAccess", "secureClient", "ipAssignment", "byClient"], + "operation": "getOrganizationApplianceVpnRemoteAccessSecureClientIpAssignmentByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/vpn/remoteAccess/secureClient/ipAssignment/byClient" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceVpnRemoteAccessSecureClientIpAssignmentByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApplianceVpnRemoteAccessSecureClientTunnelCreationByClient(self, organizationId: str, **kwargs): + """ + **Get tunnel creation events for all clients in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-remote-access-secure-client-tunnel-creation-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "vpn", "remoteAccess", "secureClient", "tunnelCreation", "byClient"], + "operation": "getOrganizationApplianceVpnRemoteAccessSecureClientTunnelCreationByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/vpn/remoteAccess/secureClient/tunnelCreation/byClient" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceVpnRemoteAccessSecureClientTunnelCreationByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationApplianceVpnSiteToSiteIpsecPeersSlas(self, organizationId: str): """ **Get the list of available IPsec SLA policies for an organization** diff --git a/meraki/api/batch/appliance.py b/meraki/api/batch/appliance.py index 3e5585e0..dc941fb8 100644 --- a/meraki/api/batch/appliance.py +++ b/meraki/api/batch/appliance.py @@ -5,6 +5,98 @@ class ActionBatchAppliance(object): def __init__(self): super(ActionBatchAppliance, self).__init__() + def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): + """ + **Update configurations for an appliance's specified port** + https://developer.cisco.com/meraki/api-v1/#!create-device-appliance-interfaces-ports-update + + - serial (string): Serial + - interface (object): The interface tuple used to identify the port + - enabled (boolean): Indicates whether the port is enabled + - personality (object): Describes the port's configurability + - uplink (object): The port's settings when in WAN mode + - downlink (object): The port's VLAN settings when in LAN mode + - speed (string): Link speed for the port, in Mbps + - duplex (string): Duplex configuration for the port + """ + + kwargs.update(locals()) + + if "speed" in kwargs: + options = ["10", "100", "1000", "10000", "2500", "25000", "5000", "auto"] + assert kwargs["speed"] in options, f'''"speed" cannot be "{kwargs["speed"]}", & must be set to one of: {options}''' + if "duplex" in kwargs: + options = ["auto", "full", "half"] + assert kwargs["duplex"] in options, ( + f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' + ) + + serial = urllib.parse.quote(serial, safe="") + resource = f"/devices/{serial}/appliance/interfaces/ports/update" + + body_params = [ + "interface", + "enabled", + "personality", + "uplink", + "downlink", + "speed", + "duplex", + ] + 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 updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs): + """ + **Update configurations for an appliance's specified port** + https://developer.cisco.com/meraki/api-v1/#!update-device-appliance-interfaces-port + + - serial (string): Serial + - number (string): Number + - enabled (boolean): Indicates whether the port is enabled + - personality (object): Describes the port's configurability + - uplink (object): The port's settings when in WAN mode + - downlink (object): The port's VLAN settings when in LAN mode + - speed (string): Link speed for the port, in Mbps + - duplex (string): Duplex configuration for the port + """ + + kwargs.update(locals()) + + if "speed" in kwargs: + options = ["10", "100", "1000", "10000", "2500", "25000", "5000", "auto"] + assert kwargs["speed"] in options, f'''"speed" cannot be "{kwargs["speed"]}", & must be set to one of: {options}''' + if "duplex" in kwargs: + options = ["auto", "full", "half"] + assert kwargs["duplex"] in options, ( + f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' + ) + + serial = urllib.parse.quote(serial, safe="") + number = urllib.parse.quote(number, safe="") + resource = f"/devices/{serial}/appliance/interfaces/ports/{number}" + + body_params = [ + "enabled", + "personality", + "uplink", + "downlink", + "speed", + "duplex", + ] + 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 updateDeviceApplianceRadioSettings(self, serial: str, **kwargs): """ **Update the radio settings of an appliance** @@ -203,6 +295,81 @@ def updateNetworkApplianceFirewallMulticastForwarding(self, networkId: str, rule } return action + def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwargs): + """ + **Create wired L3 interface configuration** + https://developer.cisco.com/meraki/api-v1/#!create-network-appliance-interfaces-l-3 + + - networkId (string): Network ID + - ipv4 (object): IPv4 configuration + - port (object): Port configuration + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/appliance/interfaces/l3" + + body_params = [ + "port", + "ipv4", + ] + 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 updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, **kwargs): + """ + **Update wired L3 interface configuration** + https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-interfaces-l-3 + + - networkId (string): Network ID + - interfaceId (string): Interface ID + - port (object): Port configuration + - ipv4 (object): IPv4 configuration + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + interfaceId = urllib.parse.quote(interfaceId, safe="") + resource = f"/networks/{networkId}/appliance/interfaces/l3/{interfaceId}" + + body_params = [ + "port", + "ipv4", + ] + 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 deleteNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str): + """ + **Delete wired L3 interface configuration** + https://developer.cisco.com/meraki/api-v1/#!delete-network-appliance-interfaces-l-3 + + - networkId (string): Network ID + - interfaceId (string): Interface ID + """ + + networkId = urllib.parse.quote(networkId, safe="") + interfaceId = urllib.parse.quote(interfaceId, safe="") + resource = f"/networks/{networkId}/appliance/interfaces/l3/{interfaceId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): """ **Update the per-port VLAN settings for a single secure router or security appliance port.** @@ -216,6 +383,8 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): - vlan (integer): Native VLAN when the port is in Trunk mode. Access VLAN when the port is in Access mode. - allowedVlans (string): Comma-delimited list of VLAN IDs (e.g. '2,15') for all devices. Secure Routers also support VLAN ranges (e.g. '2-10,15'). Use 'all' to permit all VLANs on the port. - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybris-radius' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. + - peerSgtCapable (boolean): If true, Peer SGT is enabled for traffic through this port. Applicable to trunk port only, not access port. + - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this port is assigned to. """ kwargs.update(locals()) @@ -231,6 +400,8 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): "vlan", "allowedVlans", "accessPolicy", + "peerSgtCapable", + "adaptivePolicyGroupId", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -477,6 +648,7 @@ def updateNetworkApplianceSingleLan(self, networkId: str, **kwargs): - applianceIp (string): The appliance IP address of the single LAN - ipv6 (object): IPv6 configuration on the VLAN - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this LAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above + - vrf (object): VRF configuration on the Single LAN """ kwargs.update(locals()) @@ -489,6 +661,7 @@ def updateNetworkApplianceSingleLan(self, networkId: str, **kwargs): "applianceIp", "ipv6", "mandatoryDhcp", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -744,6 +917,7 @@ def updateNetworkApplianceTrafficShapingVpnExclusions(self, networkId: str, **kw - networkId (string): Network ID - custom (array): Custom VPN exclusion rules. Pass an empty array to clear existing rules. - majorApplications (array): Major Application based VPN exclusion rules. Pass an empty array to clear existing rules. + - applications (array): NBAR Application based VPN exclusion rules. Available for networks on >=19.2 firmware """ kwargs.update(locals()) @@ -754,6 +928,7 @@ def updateNetworkApplianceTrafficShapingVpnExclusions(self, networkId: str, **kw body_params = [ "custom", "majorApplications", + "applications", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -805,6 +980,160 @@ def disconnectNetworkApplianceUmbrellaAccount(self, networkId: str): } return action + def disableNetworkApplianceUmbrellaProtection(self, networkId: str): + """ + **Disable umbrella protection for an MX network** + https://developer.cisco.com/meraki/api-v1/#!disable-network-appliance-umbrella-protection + + - networkId (string): Network ID + """ + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/appliance/umbrella/disableProtection" + + action = { + "resource": resource, + "operation": "action", + } + return action + + def enableNetworkApplianceUmbrellaProtection(self, networkId: str): + """ + **Enable umbrella protection for an MX network** + https://developer.cisco.com/meraki/api-v1/#!enable-network-appliance-umbrella-protection + + - networkId (string): Network ID + """ + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/appliance/umbrella/enableProtection" + + action = { + "resource": resource, + "operation": "action", + } + return action + + def excludeNetworkApplianceUmbrellaDomains(self, networkId: str, domains: list, **kwargs): + """ + **Specify one or more domain names to be excluded from being routed to Cisco Umbrella.** + https://developer.cisco.com/meraki/api-v1/#!exclude-network-appliance-umbrella-domains + + - networkId (string): Network ID + - domains (array): Array of domain names + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/appliance/umbrella/excludeDomains" + + body_params = [ + "domains", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "action", + "body": payload, + } + return action + + def policiesNetworkApplianceUmbrella(self, networkId: str, policyIds: list, **kwargs): + """ + **Update umbrella policies applied to MX network.** + https://developer.cisco.com/meraki/api-v1/#!policies-network-appliance-umbrella + + - networkId (string): Network ID + - policyIds (array): Array of umbrella policy IDs + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/appliance/umbrella/policies" + + body_params = [ + "policyIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "action", + "body": payload, + } + return action + + def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str, **kwargs): + """ + **Add one umbrella policy to your network.** + https://developer.cisco.com/meraki/api-v1/#!add-network-appliance-umbrella-policies + + - networkId (string): Network ID + - policyId (string): Umbrella policy ID + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/appliance/umbrella/policies/add" + + body_params = [ + "policyId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "policies_add", + "body": payload, + } + return action + + def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str): + """ + **Remove one umbrella policy from your network.** + https://developer.cisco.com/meraki/api-v1/#!remove-network-appliance-umbrella-policies + + - networkId (string): Network ID + - policyId (string): Umbrella policy ID + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/appliance/umbrella/policies/remove" + + action = { + "resource": resource, + "operation": "policies_remove", + } + return action + + def protectionNetworkApplianceUmbrella(self, networkId: str, enable: bool, **kwargs): + """ + **Enable or disable umbrella protection for an MX network. When disabling, the umbrella property will be omitted from the response.** + https://developer.cisco.com/meraki/api-v1/#!protection-network-appliance-umbrella + + - networkId (string): Network ID + - enable (boolean): Enable or disable umbrella protection + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/appliance/umbrella/protection" + + body_params = [ + "enable", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "action", + "body": payload, + } + return action + def updateNetworkApplianceUplinksNat(self, networkId: str, uplinks: list, **kwargs): """ **Update uplink NAT settings of the specified network** @@ -853,6 +1182,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg - dhcpBootNextServer (string): DHCP boot option to direct boot clients to the server to load the boot file from - dhcpBootFilename (string): DHCP boot option for boot filename - dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties. + - adaptivePolicyGroupId (string): Adaptive policy group ID this VLAN is assigned to. - vrf (object): VRF configuration on the VLAN - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -896,6 +1226,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg "dhcpBootNextServer", "dhcpBootFilename", "dhcpOptions", + "adaptivePolicyGroupId", "vrf", "uplinks", ] @@ -959,6 +1290,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): - mask (integer): Mask used for the subnet of all bound to the template networks. Applicable only for template network. - ipv6 (object): IPv6 configuration on the VLAN - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above + - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this VLAN is assigned to. - vrf (object): VRF configuration on the VLAN - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -1006,6 +1338,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): "mask", "ipv6", "mandatoryDhcp", + "adaptivePolicyGroupId", "vrf", "uplinks", ] @@ -1078,6 +1411,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw - mode (string): The site-to-site VPN mode. Can be one of 'none', 'spoke' or 'hub' - hubs (array): The list of VPN hubs, in order of preference. In spoke mode, at least 1 hub is required. - subnets (array): The list of subnets and their VPN presence. + - peerSgtCapable (boolean): Whether or not Peer SGT is enabled for traffic to this VPN peer. - subnet (object): Configuration of subnet features - hostTranslations (array): The list of VPN host translations. Host translations are supported starting from MX firmware version 26.1.2 """ @@ -1095,6 +1429,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw "mode", "hubs", "subnets", + "peerSgtCapable", "subnet", "hostTranslations", ] diff --git a/meraki/api/batch/camera.py b/meraki/api/batch/camera.py index 9a2e7b2d..6f2993c2 100644 --- a/meraki/api/batch/camera.py +++ b/meraki/api/batch/camera.py @@ -167,3 +167,82 @@ def updateDeviceCameraWirelessProfiles(self, serial: str, ids: dict, **kwargs): "body": payload, } return action + + def createNetworkCameraVideoWall(self, networkId: str, name: str, tiles: list, **kwargs): + """ + **Create a new video wall.** + https://developer.cisco.com/meraki/api-v1/#!create-network-camera-video-wall + + - networkId (string): Network ID + - name (string): The name of the video wall. + - tiles (array): The tiles that should appear on the video wall. + - index (integer): The order that this wall should appear on the video wall list. + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/camera/videoWalls" + + body_params = [ + "name", + "index", + "tiles", + ] + 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 updateNetworkCameraVideoWall(self, networkId: str, id: str, name: str, tiles: list, **kwargs): + """ + **Update the specified video wall.** + https://developer.cisco.com/meraki/api-v1/#!update-network-camera-video-wall + + - networkId (string): Network ID + - id (string): ID + - name (string): The name of the video wall. + - tiles (array): The tiles that should appear on the video wall. + - index (integer): The order that this wall should appear on the video wall list. + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/networks/{networkId}/camera/videoWalls/{id}" + + body_params = [ + "name", + "index", + "tiles", + ] + 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 deleteNetworkCameraVideoWall(self, networkId: str, id: str): + """ + **Delete the specified video wall.** + https://developer.cisco.com/meraki/api-v1/#!delete-network-camera-video-wall + + - networkId (string): Network ID + - id (string): ID + """ + + networkId = urllib.parse.quote(networkId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/networks/{networkId}/camera/videoWalls/{id}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action diff --git a/meraki/api/batch/campusGateway.py b/meraki/api/batch/campusGateway.py index c2a6b8e9..b1b54828 100644 --- a/meraki/api/batch/campusGateway.py +++ b/meraki/api/batch/campusGateway.py @@ -82,3 +82,76 @@ def updateNetworkCampusGatewayCluster(self, networkId: str, clusterId: str, **kw "body": payload, } return action + + def deleteNetworkCampusGatewayCluster(self, networkId: str, clusterId: str): + """ + **Delete a cluster** + https://developer.cisco.com/meraki/api-v1/#!delete-network-campus-gateway-cluster + + - networkId (string): Network ID + - clusterId (string): Cluster ID + """ + + networkId = urllib.parse.quote(networkId, safe="") + clusterId = urllib.parse.quote(clusterId, safe="") + resource = f"/networks/{networkId}/campusGateway/clusters/{clusterId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def provisionOrganizationCampusGatewayClusters( + self, + organizationId: str, + clusterId: str, + network: dict, + name: str, + uplinks: list, + tunnels: list, + nameservers: dict, + portChannels: list, + **kwargs, + ): + """ + **Provisions a cluster,adds campus gateways to it and associate/dissociate failover targets.** + https://developer.cisco.com/meraki/api-v1/#!provision-organization-campus-gateway-clusters + + - organizationId (string): Organization ID + - clusterId (string): ID of the cluster to be provisioned + - network (object): Network to be provisioned + - name (string): Name of the new cluster + - uplinks (array): Uplink interface settings of the cluster + - tunnels (array): Tunnel interface settings of the cluster: Reuse uplink or specify tunnel interface + - nameservers (object): Nameservers of the cluster + - portChannels (array): Port channel settings of the cluster + - devices (array): Devices to be added to the cluster + - failover (object): Failover targets for the cluster + - notes (string): Notes about cluster with max size of 511 characters allowed + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/provision" + + body_params = [ + "clusterId", + "network", + "name", + "uplinks", + "tunnels", + "nameservers", + "portChannels", + "devices", + "failover", + "notes", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "provision", + "body": payload, + } + return action diff --git a/meraki/api/batch/devices.py b/meraki/api/batch/devices.py index edc67a68..e444d87b 100644 --- a/meraki/api/batch/devices.py +++ b/meraki/api/batch/devices.py @@ -107,6 +107,60 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty } return action + def updateDeviceCliConfigFavorite(self, serial: str, configId: str, favorite: bool, **kwargs): + """ + **Favorite or unfavorite a configuration for an IOS-XE device** + https://developer.cisco.com/meraki/api-v1/#!update-device-cli-config-favorite + + - serial (string): Serial + - configId (string): Config ID + - favorite (boolean): Whether the config should be favorited + """ + + kwargs = locals() + + serial = urllib.parse.quote(serial, safe="") + configId = urllib.parse.quote(configId, safe="") + resource = f"/devices/{serial}/cli/configs/{configId}" + + body_params = [ + "favorite", + ] + 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 createDeviceConfigRestore(self, serial: str, configId: str, **kwargs): + """ + **Create a restore request for a specific config history record** + https://developer.cisco.com/meraki/api-v1/#!create-device-config-restore + + - serial (string): Serial + - configId (string): Config ID + - scheduledFor (string): Requested ISO 8601 UTC timestamp for when the restore should be scheduled + """ + + kwargs.update(locals()) + + serial = urllib.parse.quote(serial, safe="") + configId = urllib.parse.quote(configId, safe="") + resource = f"/devices/{serial}/cli/configs/{configId}/restores" + + body_params = [ + "scheduledFor", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "restore", + "body": payload, + } + return action + def createDeviceLiveToolsLedsBlink(self, serial: str, duration: int, **kwargs): """ **Enqueue a job to blink LEDs on a device. This endpoint has a rate limit of one request every 10 seconds.** @@ -134,6 +188,134 @@ def createDeviceLiveToolsLedsBlink(self, serial: str, duration: int, **kwargs): } return action + def createDeviceLiveToolsPortStatus(self, serial: str, **kwargs): + """ + **Enqueue a job to retrieve port status for a device. This endpoint has a sustained rate limit of one request every five seconds per device, with an allowed burst of five requests.** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-port-status + + - serial (string): Serial + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + serial = urllib.parse.quote(serial, safe="") + resource = f"/devices/{serial}/liveTools/portStatus" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "status", + "body": payload, + } + return action + + def createDeviceLiveToolsReboot(self, serial: str, **kwargs): + """ + **Enqueue a job to reboot a device. This endpoint has a rate limit of one request every 60 seconds.** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-reboot + + - serial (string): Serial + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + serial = urllib.parse.quote(serial, safe="") + resource = f"/devices/{serial}/liveTools/reboot" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "device", + "body": payload, + } + return action + + def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a routing table lookup request for the device. Only Cisco routers are supported. Any combination of search filters can be applied.** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table-lookup + + - serial (string): Serial + - type (string): The type of route defined + - destination (object): The destination IP or subnet to lookup + - nextHop (object): The next hop to lookup + - vpn (object): VPN related search criteria + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = [ + "BGP", + "EIGRP", + "HSRP", + "IGRP", + "ISIS", + "LISP", + "NAT", + "ND", + "NHRP", + "OMP", + "OSPF", + "RIP", + "default WAN", + "direct", + "static", + ] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + + serial = urllib.parse.quote(serial, safe="") + resource = f"/devices/{serial}/liveTools/routingTable/lookups" + + body_params = [ + "type", + "destination", + "nextHop", + "vpn", + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "lookup", + "body": payload, + } + return action + + def createDeviceLiveToolsRoutingTableSummary(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a routing table summary request for the device. Only Cisco routers are supported.** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table-summary + + - serial (string): Serial + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + serial = urllib.parse.quote(serial, safe="") + resource = f"/devices/{serial}/liveTools/routingTable/summaries" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "summary", + "body": payload, + } + return action + def createDeviceLiveToolsThroughputTest(self, serial: str, **kwargs): """ **Enqueue a job to test a device throughput, the test will run for 10 secs to test throughput. This endpoint has a rate limit of one request every five seconds per device.** diff --git a/meraki/api/batch/insight.py b/meraki/api/batch/insight.py index 7e850f1c..c2057ffd 100644 --- a/meraki/api/batch/insight.py +++ b/meraki/api/batch/insight.py @@ -5,6 +5,83 @@ class ActionBatchInsight(object): def __init__(self): super(ActionBatchInsight, self).__init__() + def createOrganizationInsightApplication(self, organizationId: str, counterSetRuleId: int, **kwargs): + """ + **Add an Insight tracked application** + https://developer.cisco.com/meraki/api-v1/#!create-organization-insight-application + + - organizationId (string): Organization ID + - counterSetRuleId (integer): The id of the counter set rule + - enableSmartThresholds (boolean): Enable Smart Thresholds + - thresholds (object): Thresholds defined by a user for each application + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/insight/applications" + + body_params = [ + "counterSetRuleId", + "enableSmartThresholds", + "thresholds", + ] + 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 updateOrganizationInsightApplication(self, organizationId: str, applicationId: str, **kwargs): + """ + **Update an Insight tracked application** + https://developer.cisco.com/meraki/api-v1/#!update-organization-insight-application + + - organizationId (string): Organization ID + - applicationId (string): Application ID + - enableSmartThresholds (boolean): Enable Smart Thresholds + - thresholds (object): Thresholds defined by a user for each application + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + applicationId = urllib.parse.quote(applicationId, safe="") + resource = f"/organizations/{organizationId}/insight/applications/{applicationId}" + + body_params = [ + "enableSmartThresholds", + "thresholds", + ] + 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 deleteOrganizationInsightApplication(self, organizationId: str, applicationId: str): + """ + **Delete an Insight tracked application** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-insight-application + + - organizationId (string): Organization ID + - applicationId (string): Application ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + applicationId = urllib.parse.quote(applicationId, safe="") + resource = f"/organizations/{organizationId}/insight/applications/{applicationId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def createOrganizationInsightMonitoredMediaServer(self, organizationId: str, name: str, address: str, **kwargs): """ **Add a media server to be monitored for this organization. Only valid for organizations with Meraki Insight.** @@ -83,3 +160,78 @@ def deleteOrganizationInsightMonitoredMediaServer(self, organizationId: str, mon "operation": "destroy", } return action + + def createOrganizationInsightWebApp(self, organizationId: str, name: str, hostname: str, **kwargs): + """ + **Add a custom web application for Insight to be able to track** + https://developer.cisco.com/meraki/api-v1/#!create-organization-insight-web-app + + - organizationId (string): Organization ID + - name (string): The name of the Web Application + - hostname (string): The hostname of Web Application + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/insight/webApps" + + body_params = [ + "name", + "hostname", + ] + 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 updateOrganizationInsightWebApp(self, organizationId: str, customCounterSetRuleId: str, **kwargs): + """ + **Update a custom web application for Insight to be able to track** + https://developer.cisco.com/meraki/api-v1/#!update-organization-insight-web-app + + - organizationId (string): Organization ID + - customCounterSetRuleId (string): Custom counter set rule ID + - name (string): The name of the Web Application + - hostname (string): The hostname of Web Application + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + customCounterSetRuleId = urllib.parse.quote(customCounterSetRuleId, safe="") + resource = f"/organizations/{organizationId}/insight/webApps/{customCounterSetRuleId}" + + body_params = [ + "name", + "hostname", + ] + 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 deleteOrganizationInsightWebApp(self, organizationId: str, customCounterSetRuleId: str): + """ + **Delete a custom web application by counter set rule id.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-insight-web-app + + - organizationId (string): Organization ID + - customCounterSetRuleId (string): Custom counter set rule ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + customCounterSetRuleId = urllib.parse.quote(customCounterSetRuleId, safe="") + resource = f"/organizations/{organizationId}/insight/webApps/{customCounterSetRuleId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action diff --git a/meraki/api/batch/nac.py b/meraki/api/batch/nac.py new file mode 100644 index 00000000..7a6720b0 --- /dev/null +++ b/meraki/api/batch/nac.py @@ -0,0 +1,316 @@ +import urllib + + +class ActionBatchNac(object): + def __init__(self): + super(ActionBatchNac, self).__init__() + + def createOrganizationNacCertificatesAuthoritiesCrl( + self, organizationId: str, caId: str, content: str, isDelta: bool, **kwargs + ): + """ + **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() + + organizationId = urllib.parse.quote(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} + action = { + "resource": resource, + "operation": "create", + "body": payload, + } + return action + + def deleteOrganizationNacCertificatesAuthoritiesCrl(self, organizationId: str, crlId: str): + """ + **Deletes a whole CRL, including all its deltas (in case of base CRL removal)** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-nac-certificates-authorities-crl + + - organizationId (string): Organization ID + - crlId (string): Crl ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + crlId = urllib.parse.quote(crlId, safe="") + resource = f"/organizations/{organizationId}/nac/certificates/authorities/crls/{crlId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def createOrganizationNacCertificatesImport(self, organizationId: str, contents: str, **kwargs): + """ + **Import certificate for this organization or validate without persisting** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-certificates-import + + - organizationId (string): Organization ID + - contents (string): Certificate content in valid PEM format + - dryRun (boolean): If true, validates the certificate without persisting it + - profile (object): Profile object containing certificate config fields + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/nac/certificates/import" + + body_params = [ + "contents", + "dryRun", + "profile", + ] + 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 updateOrganizationNacCertificate(self, organizationId: str, certificateId: str, profile: dict, **kwargs): + """ + **Update certificate configuration by certificateId for this organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-nac-certificate + + - organizationId (string): Organization ID + - certificateId (string): Certificate ID + - profile (object): Profile object containing certificate config fields + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + certificateId = urllib.parse.quote(certificateId, safe="") + resource = f"/organizations/{organizationId}/nac/certificates/{certificateId}" + + body_params = [ + "profile", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "action", + "body": payload, + } + return action + + def bulkOrganizationNacClientsDelete(self, organizationId: str, clientIds: list, **kwargs): + """ + **Delete existing client(s) for the organization** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-nac-clients-delete + + - organizationId (string): Organization ID + - clientIds (array): List of ids for specific client retrieval + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/nac/clients/bulkDelete" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def createOrganizationNacClientsBulkEdit(self, organizationId: str, clientIds: list, **kwargs): + """ + **Bulk Update of existing clients for the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-clients-bulk-edit + + - organizationId (string): Organization ID + - clientIds (array): List of clients ids to apply the bulk edit operation on. + - description (string): User provided description to be applied on the list of clients provided + - groups (object): Client group information to be applied on the list of clients provided + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/nac/clients/bulkEdit" + + body_params = [ + "clientIds", + "description", + "groups", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "edit", + "body": payload, + } + return action + + def createOrganizationNacClientsBulkUpload( + self, organizationId: str, contents: str, updateClients: bool, createClientGroups: bool, **kwargs + ): + """ + **Bulk upload of clients, client groups and their associations for the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-clients-bulk-upload + + - organizationId (string): Organization ID + - contents (string): CSV file content in Base64 encoded string format + - updateClients (boolean): The updateClients indicates whether existing clients must be updated with new data from the CSV + - createClientGroups (boolean): The createClientGroups indicates whether new client groups must be created or not + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/nac/clients/bulkUpload" + + body_params = [ + "contents", + "updateClients", + "createClientGroups", + ] + 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 createOrganizationNacClientsGroup(self, organizationId: str, name: str, **kwargs): + """ + **Create a client group for the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-clients-group + + - organizationId (string): Organization ID + - name (string): The name of the group for access control model + - description (string): User provided description of the group + - members (array): List of client members associated with the group + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/nac/clients/groups" + + body_params = [ + "name", + "description", + "members", + ] + 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 updateOrganizationNacClientsGroup(self, organizationId: str, groupId: str, **kwargs): + """ + **Update an existing client group for the organization with bulk member operations** + https://developer.cisco.com/meraki/api-v1/#!update-organization-nac-clients-group + + - organizationId (string): Organization ID + - groupId (string): Group ID + - name (string): The name of the group for access control model + - description (string): User provided description of the group + - members (object): Bulk member operations with addList/removeList arrays + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + groupId = urllib.parse.quote(groupId, safe="") + resource = f"/organizations/{organizationId}/nac/clients/groups/{groupId}" + + body_params = [ + "name", + "description", + "members", + ] + 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 deleteOrganizationNacClientsGroup(self, organizationId: str, groupId: str): + """ + **Delete an existing client group for the organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-nac-clients-group + + - organizationId (string): Organization ID + - groupId (string): Group ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + groupId = urllib.parse.quote(groupId, safe="") + resource = f"/organizations/{organizationId}/nac/clients/groups/{groupId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def updateOrganizationNacClient(self, organizationId: str, clientId: str, mac: str, **kwargs): + """ + **Update an existing client for the organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-nac-client + + - organizationId (string): Organization ID + - clientId (string): Client ID + - mac (string): The MAC address of the client + - type (string): Type describes if the network client belongs to an individual user or corporate + - owner (string): The username of the owner of the client + - description (string): User provided description for the client + - uuid (string): Universally unique identifier of the client + - userDetails (array): List of users of this network client + - oui (object): Organizationally unique identifier assigned to a vendor of the client + - groups (object): Client group membership changes + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = ["BYOD", "corporate"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + + organizationId = urllib.parse.quote(organizationId, safe="") + clientId = urllib.parse.quote(clientId, safe="") + resource = f"/organizations/{organizationId}/nac/clients/{clientId}" + + body_params = [ + "type", + "owner", + "mac", + "description", + "uuid", + "userDetails", + "oui", + "groups", + ] + 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 diff --git a/meraki/api/batch/networks.py b/meraki/api/batch/networks.py index 5fd9dc9f..cc7f323f 100644 --- a/meraki/api/batch/networks.py +++ b/meraki/api/batch/networks.py @@ -203,6 +203,31 @@ def removeNetworkDevices(self, networkId: str, serial: str, **kwargs): } return action + def updateNetworkDevicesSyslogServers(self, networkId: str, servers: list, **kwargs): + """ + **Updates the syslog servers configuration for a network.** + https://developer.cisco.com/meraki/api-v1/#!update-network-devices-syslog-servers + + - networkId (string): Network ID + - servers (array): A list of the syslog servers for this network; suggested maximum array size is 10 + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/devices/syslog/servers" + + body_params = [ + "servers", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "servers", + "body": payload, + } + return action + def updateNetworkFirmwareUpgrades(self, networkId: str, **kwargs): """ **Update firmware upgrade information for a network** @@ -467,6 +492,7 @@ def updateNetworkFloorPlan(self, networkId: str, floorPlanId: str, **kwargs): - topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan. - topRightCorner (object): The longitude and latitude of the top right corner of your floor plan. - floorNumber (number): The floor number of the floors within the building + - buildingId (string): The ID of the building that this floor belongs to. - 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. """ @@ -484,6 +510,7 @@ def updateNetworkFloorPlan(self, networkId: str, floorPlanId: str, **kwargs): "topLeftCorner", "topRightCorner", "floorNumber", + "buildingId", "imageContents", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -633,6 +660,58 @@ def deleteNetworkGroupPolicy(self, networkId: str, groupPolicyId: str, **kwargs) } return action + def updateNetworkLocationScanning(self, networkId: str, **kwargs): + """ + **Change scanning API settings** + https://developer.cisco.com/meraki/api-v1/#!update-network-location-scanning + + - networkId (string): Network ID + - analyticsEnabled (boolean): Collect location and scanning analytics + - scanningApiEnabled (boolean): Enable push API for scanning events, analytics must be enabled + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/locationScanning" + + body_params = [ + "analyticsEnabled", + "scanningApiEnabled", + ] + 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 updateNetworkLocationScanningHttpServers(self, networkId: str, endpoints: list, **kwargs): + """ + **Set the list of scanning API receivers. Old receivers will be removed** + https://developer.cisco.com/meraki/api-v1/#!update-network-location-scanning-http-servers + + - networkId (string): Network ID + - endpoints (array): A set of http server configurations + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/locationScanning/httpServers" + + body_params = [ + "endpoints", + ] + 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 createNetworkMerakiAuthUser(self, networkId: str, email: str, authorizations: list, **kwargs): """ **Authorize a user configured with Meraki Authentication for a network (currently supports 802.1X, splash guest, and client VPN users, and currently, organizations have a 50,000 user cap)** @@ -828,6 +907,7 @@ def updateNetworkSettings(self, networkId: str, **kwargs): - remoteStatusPageEnabled (boolean): Enables / disables access to the device status page (http://[device's LAN IP]). Optional. Can only be set if localStatusPageEnabled is set to true - localStatusPage (object): A hash of Local Status page(s)' authentication options applied to the Network. - securePort (object): A hash of SecureConnect options applied to the Network. + - fips (object): A hash of FIPS options applied to the Network - namedVlans (object): A hash of Named VLANs options applied to the Network. """ @@ -841,6 +921,7 @@ def updateNetworkSettings(self, networkId: str, **kwargs): "remoteStatusPageEnabled", "localStatusPage", "securePort", + "fips", "namedVlans", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -851,6 +932,116 @@ def updateNetworkSettings(self, networkId: str, **kwargs): } return action + def createNetworkSitesBuilding(self, networkId: str, name: str, **kwargs): + """ + **Create a new building** + https://developer.cisco.com/meraki/api-v1/#!create-network-sites-building + + - networkId (string): Network ID + - name (string): The name of the building + - floors (array): The floors of the building + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/sites/buildings" + + body_params = [ + "name", + "floors", + ] + 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 deleteNetworkSitesBuilding(self, networkId: str, buildingId: str): + """ + **Delete a building** + https://developer.cisco.com/meraki/api-v1/#!delete-network-sites-building + + - networkId (string): Network ID + - buildingId (string): Building ID + """ + + networkId = urllib.parse.quote(networkId, safe="") + buildingId = urllib.parse.quote(buildingId, safe="") + resource = f"/networks/{networkId}/sites/buildings/{buildingId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def updateNetworkSitesBuilding(self, networkId: str, buildingId: str, **kwargs): + """ + **Update a building** + https://developer.cisco.com/meraki/api-v1/#!update-network-sites-building + + - networkId (string): Network ID + - buildingId (string): Building ID + - name (string): The name of the building + - floors (array): The floors of the building + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + buildingId = urllib.parse.quote(buildingId, safe="") + resource = f"/networks/{networkId}/sites/buildings/{buildingId}" + + body_params = [ + "name", + "floors", + ] + 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 updateNetworkSnmpTraps(self, networkId: str, **kwargs): + """ + **Update the SNMP trap configuration for the specified network** + https://developer.cisco.com/meraki/api-v1/#!update-network-snmp-traps + + - networkId (string): Network ID + - mode (string): SNMP trap protocol version + - receiver (object): Stores the port and address + - v2 (object): V2 mode + - v3 (object): V3 mode + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["disabled", "v1/v2c", "v3"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/snmp/traps" + + body_params = [ + "mode", + "receiver", + "v2", + "v3", + ] + 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 splitNetwork(self, networkId: str): """ **Split a combined network into individual networks for each type of device** @@ -903,15 +1094,17 @@ def createNetworkVlanProfile(self, networkId: str, name: str, vlanNames: list, v - vlanNames (array): An array of named VLANs - vlanGroups (array): An array of VLAN groups - iname (string): IName of the profile + - allowedVlans (string): The VLANs allowed on the VLAN profile. Only applicable to trunk ports. The given range must be inclusive of all named VLANs. """ - kwargs = locals() + kwargs.update(locals()) networkId = urllib.parse.quote(networkId, safe="") resource = f"/networks/{networkId}/vlanProfiles" body_params = [ "name", + "allowedVlans", "vlanNames", "vlanGroups", "iname", diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index 4b8adf62..cfe628f8 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -420,6 +420,89 @@ def deleteOrganizationAlertsProfile(self, organizationId: str, alertConfigId: st } return action + def createOrganizationAuthRadiusServer(self, organizationId: str, address: str, secret: str, **kwargs): + """ + **Add an organization-wide RADIUS server** + https://developer.cisco.com/meraki/api-v1/#!create-organization-auth-radius-server + + - organizationId (string): Organization ID + - address (string): The IP address or FQDN of the RADIUS server + - secret (string): Shared secret of the RADIUS server + - name (string): The name of the RADIUS server + - modes (array): Available server modes + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers" + + body_params = [ + "name", + "address", + "modes", + "secret", + ] + 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 updateOrganizationAuthRadiusServer(self, organizationId: str, serverId: str, **kwargs): + """ + **Update an organization-wide RADIUS server** + https://developer.cisco.com/meraki/api-v1/#!update-organization-auth-radius-server + + - organizationId (string): Organization ID + - serverId (string): Server ID + - name (string): The name of the RADIUS server + - address (string): The IP address or FQDN of the RADIUS server + - modes (array): Available server modes + - secret (string): Shared secret of the RADIUS server + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + serverId = urllib.parse.quote(serverId, safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers/{serverId}" + + body_params = [ + "name", + "address", + "modes", + "secret", + ] + 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 deleteOrganizationAuthRadiusServer(self, organizationId: str, serverId: str): + """ + **Delete an organization-wide RADIUS server from a organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-auth-radius-server + + - organizationId (string): Organization ID + - serverId (string): Server ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + serverId = urllib.parse.quote(serverId, safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers/{serverId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def createOrganizationBrandingPolicy(self, organizationId: str, name: str, **kwargs): """ **Add a new branding policy to an organization** @@ -541,6 +624,41 @@ def deleteOrganizationBrandingPolicy(self, organizationId: str, brandingPolicyId } return action + def importOrganizationCertificates(self, organizationId: str, managedBy: str, contents: str, description: str, **kwargs): + """ + **Import certificate for this organization** + https://developer.cisco.com/meraki/api-v1/#!import-organization-certificates + + - organizationId (string): Organization ID + - managedBy (string): Certificate managed by type [system_manager, mr, encrypted_syslog] + - contents (string): Certificate content in valid PEM format + - description (string): Certificate description + """ + + kwargs = locals() + + if "managedBy" in kwargs: + options = ["encrypted_syslog", "mr", "system_manager"] + assert kwargs["managedBy"] in options, ( + f'''"managedBy" cannot be "{kwargs["managedBy"]}", & must be set to one of: {options}''' + ) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/certificates/import" + + body_params = [ + "managedBy", + "contents", + "description", + ] + 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 createOrganizationConfigTemplate(self, organizationId: str, name: str, **kwargs): """ **Create a new configuration template** @@ -860,6 +978,26 @@ def createOrganizationDevicesPacketCaptureSchedule(self, organizationId: str, de } return action + def bulkOrganizationDevicesPacketCaptureSchedulesDelete(self, organizationId: str, scheduleIds: list, **kwargs): + """ + **Delete packet capture schedules** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-devices-packet-capture-schedules-delete + + - organizationId (string): Organization ID + - scheduleIds (array): Delete the packet capture schedules of the specified schedule ids + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/devices/packetCapture/schedules/bulkDelete" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def reorderOrganizationDevicesPacketCaptureSchedules(self, organizationId: str, order: list, **kwargs): """ **Bulk update priorities of pcap schedules** @@ -945,6 +1083,66 @@ def deleteOrganizationDevicesPacketCaptureSchedule(self, organizationId: str, sc } return action + def tasksOrganizationDevicesPacketCapture(self, organizationId: str, packetId: str, task: str, **kwargs): + """ + **Enqueues a task for a specific packet capture. This endpoint has a sustained rate limit of one request every 60 seconds.** + https://developer.cisco.com/meraki/api-v1/#!tasks-organization-devices-packet-capture + + - organizationId (string): Organization ID + - packetId (string): Packet ID + - task (string): Type of task to enqueue. It can be one of: ["analysis", "reasoning", "summary", "highlights", "title", "flow"] + - networkId (string): Parameter to validate authorization by network access + """ + + kwargs.update(locals()) + + if "task" in kwargs: + options = ["analysis", "flow", "highlights", "reasoning", "summary", "title"] + assert kwargs["task"] in options, f'''"task" cannot be "{kwargs["task"]}", & must be set to one of: {options}''' + + organizationId = urllib.parse.quote(organizationId, safe="") + packetId = urllib.parse.quote(packetId, safe="") + resource = f"/organizations/{organizationId}/devices/packetCaptures/{packetId}/tasks" + + body_params = [ + "networkId", + "task", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "enqueue_task", + "body": payload, + } + return action + + def bulkOrganizationDevicesPlacementPositionsUpdate(self, organizationId: str, serials: list, **kwargs): + """ + **Bulk update the attributes related to positions for provided devices** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-devices-placement-positions-update + + - organizationId (string): Organization ID + - serials (array): List of device serials on a floor plan to update + - height (object): Height of the devices on the floor plan + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/devices/placement/positions/bulkUpdate" + + body_params = [ + "serials", + "height", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "bulk_update", + "body": payload, + } + return action + def updateOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str, **kwargs): """ **Update an early access feature opt-in for an organization** @@ -972,6 +1170,137 @@ def updateOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInI } return action + def updateOrganizationExtensionsSdwanmanagerInterconnect( + self, organizationId: str, interconnectId: str, name: str, status: str, **kwargs + ): + """ + **Update name and status of an Interconnect** + https://developer.cisco.com/meraki/api-v1/#!update-organization-extensions-sdwanmanager-interconnect + + - organizationId (string): Organization ID + - interconnectId (string): Interconnect ID + - name (string): Interconnect name + - status (string): Interconnect status + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + interconnectId = urllib.parse.quote(interconnectId, safe="") + resource = f"/organizations/{organizationId}/extensions/sdwanmanager/interconnects/{interconnectId}" + + body_params = [ + "name", + "status", + ] + 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 createOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, enabled: bool, networkId: str, **kwargs): + """ + **Add a ThousandEyes agent for this network. Only valid for networks with access to Meraki Insight. Organization must have a ThousandEyes account connected to perform this action.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-extensions-thousand-eyes-network + + - organizationId (string): Organization ID + - enabled (boolean): Whether or not the ThousandEyes agent is enabled for the network. + - networkId (string): Network that will have the ThousandEyes agent installed on. + - tests (array): An array of tests to be created + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks" + + body_params = [ + "enabled", + "networkId", + "tests", + ] + 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 updateOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, networkId: str, enabled: bool, **kwargs): + """ + **Update a ThousandEyes agent from this network. Only valid for networks with access to Meraki Insight. Organization must have a ThousandEyes account connected to perform this action.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-extensions-thousand-eyes-network + + - organizationId (string): Organization ID + - networkId (string): Network ID + - enabled (boolean): Whether or not the ThousandEyes agent is enabled for the network. + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks/{networkId}" + + body_params = [ + "enabled", + ] + 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 deleteOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, networkId: str): + """ + **Delete a ThousandEyes agent from this network. Only valid for networks with access to Meraki Insight. Organization must have a ThousandEyes account connected to perform this action.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-extensions-thousand-eyes-network + + - organizationId (string): Organization ID + - networkId (string): Network ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks/{networkId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def createOrganizationExtensionsThousandEyesTest(self, organizationId: str, **kwargs): + """ + **Create a ThousandEyes test based on a provided test template. Only valid for networks with access to Meraki Insight. Organization must have a ThousandEyes account connected to perform this action.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-extensions-thousand-eyes-test + + - organizationId (string): Organization ID + - tests (array): An array of tests to be created + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/tests" + + body_params = [ + "tests", + ] + 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 disableOrganizationIntegrationsXdrNetworks(self, organizationId: str, networks: list, **kwargs): """ **Disable XDR on networks** @@ -1253,6 +1582,7 @@ def createOrganizationNetwork(self, organizationId: str, name: str, productTypes - timeZone (string): The timezone of the network. For a list of allowed timezones, please see the 'TZ' column in the table in this article. - copyFromNetworkId (string): The ID of the network to copy configuration from. Other provided parameters will override the copied configuration, except type which must match this network's type exactly. - notes (string): Add any notes or additional information about this network here. + - details (array): An array of details """ kwargs.update(locals()) @@ -1267,6 +1597,7 @@ def createOrganizationNetwork(self, organizationId: str, name: str, productTypes "timeZone", "copyFromNetworkId", "notes", + "details", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -1305,6 +1636,131 @@ def combineOrganizationNetworks(self, organizationId: str, name: str, networkIds } return action + def createOrganizationNetworksGroup(self, organizationId: str, name: str, **kwargs): + """ + **Create a network group** + https://developer.cisco.com/meraki/api-v1/#!create-organization-networks-group + + - organizationId (string): Organization ID + - name (string): The name of the network group + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/networks/groups" + + body_params = [ + "name", + ] + 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 updateOrganizationNetworksGroup(self, organizationId: str, groupId: str, name: str, **kwargs): + """ + **Update a network group** + https://developer.cisco.com/meraki/api-v1/#!update-organization-networks-group + + - organizationId (string): Organization ID + - groupId (string): Group ID + - name (string): The new name of the network group + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + groupId = urllib.parse.quote(groupId, safe="") + resource = f"/organizations/{organizationId}/networks/groups/{groupId}" + + body_params = [ + "name", + ] + 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 deleteOrganizationNetworksGroup(self, organizationId: str, groupId: str): + """ + **Delete a network group** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-networks-group + + - organizationId (string): Organization ID + - groupId (string): Group ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + groupId = urllib.parse.quote(groupId, safe="") + resource = f"/organizations/{organizationId}/networks/groups/{groupId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def bulkOrganizationNetworksGroupAssign(self, organizationId: str, groupId: str, networkIds: list, **kwargs): + """ + **Add networks to a network group** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-networks-group-assign + + - organizationId (string): Organization ID + - groupId (string): Group ID + - networkIds (array): A list of network IDs to add to the network group + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + groupId = urllib.parse.quote(groupId, safe="") + resource = f"/organizations/{organizationId}/networks/groups/{groupId}/bulkAssign" + + body_params = [ + "networkIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "bulk_assign", + "body": payload, + } + return action + + def bulkOrganizationNetworksGroupUnassign(self, organizationId: str, groupId: str, networkIds: list, **kwargs): + """ + **Remove networks from a network group** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-networks-group-unassign + + - organizationId (string): Organization ID + - groupId (string): Group ID + - networkIds (array): A list of network IDs to remove from the network group + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + groupId = urllib.parse.quote(groupId, safe="") + resource = f"/organizations/{organizationId}/networks/groups/{groupId}/bulkUnassign" + + body_params = [ + "networkIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "bulk_unassign", + "body": payload, + } + return action + def createOrganizationPoliciesGlobalFirewallRuleset(self, organizationId: str, name: str, **kwargs): """ **Create an Organization-Wide Policy Firewall Ruleset** @@ -1885,6 +2341,89 @@ def deleteOrganizationPolicyObject(self, organizationId: str, policyObjectId: st } return action + def createOrganizationRoutingVrf(self, organizationId: str, name: str, **kwargs): + """ + **Add an organization-wide VRF (Virtual Routing and Forwarding)** + https://developer.cisco.com/meraki/api-v1/#!create-organization-routing-vrf + + - organizationId (string): Organization ID + - name (string): The name of the VRF (Virtual Routing and Forwarding) + - description (string): Description of the VRF (Virtual Routing and Forwarding) + - routeDistinguisher (string): RD (Route Distinguisher) for the VRF (Virtual Routing and Forwarding) + - routeTarget (string): Route target are used to control the import and export of routes between VRFs + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/routing/vrfs" + + body_params = [ + "name", + "description", + "routeDistinguisher", + "routeTarget", + ] + 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 updateOrganizationRoutingVrf(self, organizationId: str, vrfId: str, **kwargs): + """ + **Update an organization-wide VRF (Virtual Routing and Forwarding)** + https://developer.cisco.com/meraki/api-v1/#!update-organization-routing-vrf + + - organizationId (string): Organization ID + - vrfId (string): Vrf ID + - name (string): The name of the VRF (Virtual Routing and Forwarding) + - description (string): Description of the VRF (Virtual Routing and Forwarding) + - routeDistinguisher (string): RD (Route Distinguisher) for the VRF (Virtual Routing and Forwarding) + - routeTarget (string): Route target are used to control the import and export of routes between VRFs + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + vrfId = urllib.parse.quote(vrfId, safe="") + resource = f"/organizations/{organizationId}/routing/vrfs/{vrfId}" + + body_params = [ + "name", + "description", + "routeDistinguisher", + "routeTarget", + ] + 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 deleteOrganizationRoutingVrf(self, organizationId: str, vrfId: str): + """ + **Delete a VRF (Virtual Routing and Forwarding) from a organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-routing-vrf + + - organizationId (string): Organization ID + - vrfId (string): Vrf ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + vrfId = urllib.parse.quote(vrfId, safe="") + resource = f"/organizations/{organizationId}/routing/vrfs/{vrfId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def createOrganizationSamlIdp(self, organizationId: str, x509certSha1Fingerprint: str, **kwargs): """ **Create a SAML IdP for your organization.** @@ -2081,6 +2620,33 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): } return action + def enrollOrganizationSaseSites(self, organizationId: str, **kwargs): + """ + **Enroll sites in this organization to Secure Access. For an organization, a maximum of 2500 sites can be enrolled if they are in spoke mode or a maximum of 10 sites can be enrolled in hub mode.** + https://developer.cisco.com/meraki/api-v1/#!enroll-organization-sase-sites + + - organizationId (string): Organization ID + - items (array): List of Meraki SD-WAN sites with the associated regions to be enrolled. + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/sase/sites/enroll" + + body_params = [ + "items", + "callback", + ] + 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 updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs): """ **Update the configuration for a site. Currently, only supports updating default route enablement.** @@ -2202,3 +2768,94 @@ def createOrganizationSplashThemeAsset(self, organizationId: str, themeIdentifie "body": payload, } return action + + def createOrganizationWebhooksPayloadTemplate(self, organizationId: str, name: str, **kwargs): + """ + **Create a webhook payload template for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-webhooks-payload-template + + - organizationId (string): Organization ID + - name (string): The name of the new template + - body (string): The liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. + - headers (array): The liquid template used with the webhook headers. + - bodyFile (string): A file containing liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. + - headersFile (string): A file containing the liquid template used with the webhook headers. + - sharing (object): Information on which entities have access to the template + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates" + + body_params = [ + "name", + "body", + "headers", + "bodyFile", + "headersFile", + "sharing", + ] + 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 deleteOrganizationWebhooksPayloadTemplate(self, organizationId: str, payloadTemplateId: str): + """ + **Destroy a webhook payload template for an organization. Does not work for included templates ('wpt_00001', 'wpt_00002', 'wpt_00003', 'wpt_00004', 'wpt_00005', 'wpt_00006', 'wpt_00007' or 'wpt_00008')** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-webhooks-payload-template + + - organizationId (string): Organization ID + - payloadTemplateId (string): Payload template ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + payloadTemplateId = urllib.parse.quote(payloadTemplateId, safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates/{payloadTemplateId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def updateOrganizationWebhooksPayloadTemplate(self, organizationId: str, payloadTemplateId: str, **kwargs): + """ + **Update a webhook payload template for an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-webhooks-payload-template + + - organizationId (string): Organization ID + - payloadTemplateId (string): Payload template ID + - name (string): The name of the template + - body (string): The liquid template used for the body of the webhook message. + - headers (array): The liquid template used with the webhook headers. + - bodyFile (string): A file containing liquid template used for the body of the webhook message. + - headersFile (string): A file containing the liquid template used with the webhook headers. + - sharing (object): Information on which entities have access to the template + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + payloadTemplateId = urllib.parse.quote(payloadTemplateId, safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates/{payloadTemplateId}" + + body_params = [ + "name", + "body", + "headers", + "bodyFile", + "headersFile", + "sharing", + ] + 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 diff --git a/meraki/api/batch/secureConnect.py b/meraki/api/batch/secureConnect.py new file mode 100644 index 00000000..aa0b6f8b --- /dev/null +++ b/meraki/api/batch/secureConnect.py @@ -0,0 +1,224 @@ +import urllib + + +class ActionBatchSecureConnect(object): + def __init__(self): + super(ActionBatchSecureConnect, self).__init__() + + def createOrganizationSecureConnectPrivateResourceGroup(self, organizationId: str, name: str, **kwargs): + """ + **Adds a new private resource group to an organization.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-private-resource-group + + - organizationId (string): Organization ID + - name (string): Name of group. This is required and should be unique across all groups for a given organization. Name cannot have any special characters other than spaces and hyphens. + - description (string): Optional text description for a group. + - resourceIds (array): List of resource ids assigned to this group. + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups" + + body_params = [ + "name", + "description", + "resourceIds", + ] + 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 updateOrganizationSecureConnectPrivateResourceGroup(self, organizationId: str, id: str, name: str, **kwargs): + """ + **Updates a specific private resource group.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-secure-connect-private-resource-group + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of group. This is required and should be unique across all groups for a given organization. Name cannot have any special characters other than spaces and hyphens. + - description (string): Optional text description for a group. + - resourceIds (array): List of resource ids assigned to this group. + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups/{id}" + + body_params = [ + "name", + "description", + "resourceIds", + ] + 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 deleteOrganizationSecureConnectPrivateResourceGroup(self, organizationId: str, id: str): + """ + **Deletes a specific private resource group.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-private-resource-group + + - organizationId (string): Organization ID + - id (string): ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups/{id}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def createOrganizationSecureConnectPrivateResource( + self, organizationId: str, name: str, accessTypes: list, resourceAddresses: list, **kwargs + ): + """ + **Adds a new private resource to the organization.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-private-resource + + - organizationId (string): Organization ID + - name (string): Name of resource. This is required and should be unique across all resources for a given organization. Name cannot have any special characters other than spaces and hyphens. + - accessTypes (array): List of access types. + - resourceAddresses (array): List of resource addresses Protocols must be unique in this list. + - description (string): Optional text description for a resource. + - resourceGroupIds (array): List of resource group ids attached to this resource. + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResources" + + body_params = [ + "name", + "description", + "accessTypes", + "resourceAddresses", + "resourceGroupIds", + ] + 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 updateOrganizationSecureConnectPrivateResource( + self, organizationId: str, id: str, name: str, accessTypes: list, resourceAddresses: list, **kwargs + ): + """ + **Updates a specific private resource.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-secure-connect-private-resource + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of resource. This is required and should be unique across all resources for a given organization.Name cannot have any special characters other than spaces and hyphens. + - accessTypes (array): List of access types. + - resourceAddresses (array): List of resource addresses Protocols must be unique in this list. + - description (string): Optional text description for resource. + - resourceGroupIds (array): List of resource group ids attached to this resource. + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResources/{id}" + + body_params = [ + "name", + "description", + "accessTypes", + "resourceAddresses", + "resourceGroupIds", + ] + 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 deleteOrganizationSecureConnectPrivateResource(self, organizationId: str, id: str): + """ + **Deletes a specific private resource. If this is the last resource in a resource group you must remove it from that resource group before deleting.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-private-resource + + - organizationId (string): Organization ID + - id (string): ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResources/{id}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def createOrganizationSecureConnectSite(self, organizationId: str, **kwargs): + """ + **Enroll sites in this organization to Secure Connect. For an organization, a maximum of 4000 sites can be enrolled if they are in spoke mode or a maximum of 10 sites can be enrolled in hub mode.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-site + + - organizationId (string): Organization ID + - enrollments (array): List of Meraki SD-WAN sites with the associated regions to be enrolled. + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/secureConnect/sites" + + body_params = [ + "enrollments", + "callback", + ] + 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 deleteOrganizationSecureConnectSites(self, organizationId: str, **kwargs): + """ + **Detach given sites from Secure Connect** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-sites + + - organizationId (string): Organization ID + - sites (array): List of site IDs to detach + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/secureConnect/sites" + + action = { + "resource": resource, + "operation": "destroy", + } + return action diff --git a/meraki/api/batch/sensor.py b/meraki/api/batch/sensor.py index 777ea1c2..63e5f436 100644 --- a/meraki/api/batch/sensor.py +++ b/meraki/api/batch/sensor.py @@ -12,9 +12,10 @@ def createDeviceSensorCommand(self, serial: str, operation: str, **kwargs): - serial (string): Serial - operation (string): Operation to run on the sensor. 'enableDownstreamPower', 'disableDownstreamPower', and 'cycleDownstreamPower' turn power on/off to the device that is connected downstream of an MT40 power monitor. 'refreshData' causes an MT15 or MT40 device to upload its latest readings so that they are immediately available in the Dashboard API. + - arguments (array): Additional options to provide to commands run on the sensor, each with a corresponding 'name' and 'value'. """ - kwargs = locals() + kwargs.update(locals()) if "operation" in kwargs: options = ["cycleDownstreamPower", "disableDownstreamPower", "enableDownstreamPower", "refreshData"] @@ -26,6 +27,7 @@ def createDeviceSensorCommand(self, serial: str, operation: str, **kwargs): resource = f"/devices/{serial}/sensor/commands" body_params = [ + "arguments", "operation", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/api/batch/sm.py b/meraki/api/batch/sm.py index fab4bc90..784dd966 100644 --- a/meraki/api/batch/sm.py +++ b/meraki/api/batch/sm.py @@ -111,6 +111,108 @@ def deleteOrganizationSmAdminsRole(self, organizationId: str, roleId: str): } return action + def createOrganizationSmAppleCloudEnrollmentSyncJob(self, organizationId: str, **kwargs): + """ + **Enqueue a sync job for an ADE account** + https://developer.cisco.com/meraki/api-v1/#!create-organization-sm-apple-cloud-enrollment-sync-job + + - organizationId (string): Organization ID + - adeAccountId (string): ADE Account ID + - fullSync (boolean): Whether or not job is full sync (defaults to full sync) + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/sm/apple/cloudEnrollment/syncJobs" + + body_params = [ + "adeAccountId", + "fullSync", + ] + 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 createOrganizationSmBulkEnrollmentToken(self, organizationId: str, networkId: str, expiresAt: str, **kwargs): + """ + **Create a PccBulkEnrollmentToken** + https://developer.cisco.com/meraki/api-v1/#!create-organization-sm-bulk-enrollment-token + + - organizationId (string): Organization ID + - networkId (string): The id of the associated node_group. + - expiresAt (string): The expiration date. + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token" + + body_params = [ + "networkId", + "expiresAt", + ] + 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 updateOrganizationSmBulkEnrollmentToken(self, organizationId: str, tokenId: str, **kwargs): + """ + **Update a PccBulkEnrollmentToken** + https://developer.cisco.com/meraki/api-v1/#!update-organization-sm-bulk-enrollment-token + + - organizationId (string): Organization ID + - tokenId (string): Token ID + - networkId (string): The id of the associated node_group. + - expiresAt (string): The expiration date. + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + tokenId = urllib.parse.quote(tokenId, safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token/{tokenId}" + + body_params = [ + "networkId", + "expiresAt", + ] + 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 deleteOrganizationSmBulkEnrollmentToken(self, organizationId: str, tokenId: str): + """ + **Delete a PccBulkEnrollmentToken** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-sm-bulk-enrollment-token + + - organizationId (string): Organization ID + - tokenId (string): Token ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + tokenId = urllib.parse.quote(tokenId, safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token/{tokenId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def updateOrganizationSmSentryPoliciesAssignments(self, organizationId: str, items: list, **kwargs): """ **Update an Organizations Sentry Policies using the provided list. Sentry Policies are ordered in descending order of priority (i.e. highest priority at the bottom, this is opposite the Dashboard UI). Policies not present in the request will be deleted.** diff --git a/meraki/api/batch/support.py b/meraki/api/batch/support.py new file mode 100644 index 00000000..e884c292 --- /dev/null +++ b/meraki/api/batch/support.py @@ -0,0 +1,3 @@ +class ActionBatchSupport(object): + def __init__(self): + super(ActionBatchSupport, self).__init__() diff --git a/meraki/api/batch/switch.py b/meraki/api/batch/switch.py index c469c7ba..c35d14c7 100644 --- a/meraki/api/batch/switch.py +++ b/meraki/api/batch/switch.py @@ -30,6 +30,40 @@ def cycleDeviceSwitchPorts(self, serial: str, ports: list, **kwargs): } return action + def updateDeviceSwitchPortsMirror(self, serial: str, source: dict, destination: dict, **kwargs): + """ + **Update a port mirror** + https://developer.cisco.com/meraki/api-v1/#!update-device-switch-ports-mirror + + - serial (string): The switch identifier + - source (object): Source ports mirror configuration + - destination (object): Destination port mirror configuration + - tags (array): Port mirror tags + - role (string): Switch role can be source or destination + - comment (string): My pretty comment + """ + + kwargs.update(locals()) + + serial = urllib.parse.quote(serial, safe="") + resource = f"/devices/{serial}/switch/ports/mirror" + + body_params = [ + "serial", + "source", + "destination", + "tags", + "role", + "comment", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "mirrors/update", + "body": payload, + } + return action + def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): """ **Update a switch port** @@ -45,6 +79,7 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): - vlan (integer): The VLAN of the switch port. For a trunk port, this is the native VLAN. A null value will clear the value set for trunk ports. - voiceVlan (integer): The voice VLAN of the switch port. Only applicable to access ports. - allowedVlans (string): The VLANs allowed on the switch port. Only applicable to trunk ports. + - activeVlans (string): The VLANs that are active on the switch port. Only applicable to trunk ports. - isolationEnabled (boolean): The isolation status of the switch port. - rstpEnabled (boolean): The rapid spanning tree protocol status. - stpGuard (string): The state of the STP guard ('disabled', 'root guard', 'bpdu guard' or 'loop guard'). @@ -101,6 +136,7 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): "vlan", "voiceVlan", "allowedVlans", + "activeVlans", "isolationEnabled", "rstpEnabled", "stpGuard", @@ -146,6 +182,12 @@ def createDeviceSwitchRoutingInterface(self, serial: str, name: str, **kwargs): - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. + - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. + - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. + - staticV4Dns1 (string): Primary IPv4 DNS server address + - staticV4Dns2 (string): Secondary IPv4 DNS server address - ospfSettings (object): The OSPF routing settings of the interface. - ipv6 (object): The IPv6 settings of the interface. - vrf (object): The VRF settings of the interface. Requires IOS XE 17.18 or higher @@ -176,6 +218,12 @@ def createDeviceSwitchRoutingInterface(self, serial: str, name: str, **kwargs): "multicastRouting", "vlanId", "defaultGateway", + "isSwitchDefaultGateway", + "uplinkV4", + "candidateUplinkV4", + "uplinkV6", + "staticV4Dns1", + "staticV4Dns2", "ospfSettings", "ipv6", "vrf", @@ -204,6 +252,12 @@ def updateDeviceSwitchRoutingInterface(self, serial: str, interfaceId: str, **kw - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. + - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. + - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. + - staticV4Dns1 (string): Primary IPv4 DNS server address + - staticV4Dns2 (string): Secondary IPv4 DNS server address - ospfSettings (object): The OSPF routing settings of the interface. - ipv6 (object): The IPv6 settings of the interface. - vrf (object): The VRF settings of the interface. Requires IOS XE 17.18 or higher @@ -231,6 +285,12 @@ def updateDeviceSwitchRoutingInterface(self, serial: str, interfaceId: str, **kw "multicastRouting", "vlanId", "defaultGateway", + "isSwitchDefaultGateway", + "uplinkV4", + "candidateUplinkV4", + "uplinkV6", + "staticV4Dns1", + "staticV4Dns2", "ospfSettings", "ipv6", "vrf", @@ -928,6 +988,97 @@ def updateNetworkSwitchPortSchedule(self, networkId: str, portScheduleId: str, * } return action + def createNetworkSwitchPortsProfile(self, networkId: str, **kwargs): + """ + **Create a port profile in a network** + https://developer.cisco.com/meraki/api-v1/#!create-network-switch-ports-profile + + - networkId (string): Network ID + - name (string): The name of the profile. + - description (string): Text describing the profile. + - tags (array): Space-seperated list of tags + - defaultRadiusProfileName (string): When present, the default RADIUS attribute value for RADIUS-based port profile application + - authentication (object): Authentication settings for RADIUS-based port profile application. + - port (object): Configuration settings for port profile + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/switch/ports/profiles" + + body_params = [ + "name", + "description", + "tags", + "defaultRadiusProfileName", + "authentication", + "port", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "profiles/create", + "body": payload, + } + return action + + def updateNetworkSwitchPortsProfile(self, networkId: str, id: str, **kwargs): + """ + **Update a port profile in a network** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-ports-profile + + - networkId (string): Network ID + - id (string): ID + - name (string): The name of the profile. + - description (string): Text describing the profile. + - tags (array): Space-seperated list of tags + - defaultRadiusProfileName (string): When present, the default RADIUS attribute value for RADIUS-based port profile application + - authentication (object): Authentication settings for RADIUS-based port profile application. + - port (object): Configuration settings for port profile + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/networks/{networkId}/switch/ports/profiles/{id}" + + body_params = [ + "name", + "description", + "tags", + "defaultRadiusProfileName", + "authentication", + "port", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "profiles/update", + "body": payload, + } + return action + + def deleteNetworkSwitchPortsProfile(self, networkId: str, id: str): + """ + **Delete a port profile from a network** + https://developer.cisco.com/meraki/api-v1/#!delete-network-switch-ports-profile + + - networkId (string): Network ID + - id (string): ID + """ + + networkId = urllib.parse.quote(networkId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/networks/{networkId}/switch/ports/profiles/{id}" + + action = { + "resource": resource, + "operation": "profiles/destroy", + } + return action + def createNetworkSwitchQosRule(self, networkId: str, vlan: int, **kwargs): """ **Add a quality of service rule** @@ -1245,6 +1396,105 @@ def updateNetworkSwitchSettings(self, networkId: str, **kwargs): } return action + def updateNetworkSwitchSpanningTree(self, networkId: str, **kwargs): + """ + **Updates Spanning Tree configuration** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-spanning-tree + + - networkId (string): Network ID + - enabled (boolean): Network-level spanning Tree enable + - mode (string): Catalyst Spanning Tree Protocol mode (mst, rpvst+) + - priorities (array): Spanning tree priority for switches/stacks or switch templates. An empty array will clear the priority settings. + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["mst", "rpvst+"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/switch/spanningTree" + + body_params = [ + "enabled", + "mode", + "priorities", + ] + 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 updateNetworkSwitchStack(self, networkId: str, switchStackId: str, **kwargs): + """ + **Update a switch stack** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-stack + + - networkId (string): Network ID + - switchStackId (string): Switch stack ID + - name (string): The name of the stack + - members (array): The list of switches that should be in the stack + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + switchStackId = urllib.parse.quote(switchStackId, safe="") + resource = f"/networks/{networkId}/switch/stacks/{switchStackId}" + + body_params = [ + "name", + "members", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "stacks/actions/update", + "body": payload, + } + return action + + def updateNetworkSwitchStackPortsMirror( + self, networkId: str, switchStackId: str, source: dict, destination: dict, **kwargs + ): + """ + **Update switch port mirrors for switch stacks** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-stack-ports-mirror + + - networkId (string): Network ID + - switchStackId (string): Switch stack ID + - source (object): Source port details + - destination (object): Destination port Details + - tags (array): Port mirror tags + - role (string): Switch role can be source or destination + - comment (string): My pretty comment + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + switchStackId = urllib.parse.quote(switchStackId, safe="") + resource = f"/networks/{networkId}/switch/stacks/{switchStackId}/ports/mirror" + + body_params = [ + "source", + "destination", + "tags", + "role", + "comment", + ] + 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 createNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId: str, name: str, **kwargs): """ **Create a layer 3 interface for a switch stack** @@ -1261,6 +1511,12 @@ def createNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. + - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. + - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. + - staticV4Dns1 (string): Primary IPv4 DNS server address + - staticV4Dns2 (string): Secondary IPv4 DNS server address - ospfSettings (object): The OSPF routing settings of the interface. - ipv6 (object): The IPv6 settings of the interface. - vrf (object): The VRF settings of the interface. Requires IOS XE 17.18 or higher @@ -1292,6 +1548,12 @@ def createNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId "multicastRouting", "vlanId", "defaultGateway", + "isSwitchDefaultGateway", + "uplinkV4", + "candidateUplinkV4", + "uplinkV6", + "staticV4Dns1", + "staticV4Dns2", "ospfSettings", "ipv6", "vrf", @@ -1321,6 +1583,12 @@ def updateNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. + - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. + - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. + - staticV4Dns1 (string): Primary IPv4 DNS server address + - staticV4Dns2 (string): Secondary IPv4 DNS server address - ospfSettings (object): The OSPF routing settings of the interface. - ipv6 (object): The IPv6 settings of the interface. - vrf (object): The VRF settings of the interface. Requires IOS XE 17.18 or higher @@ -1349,6 +1617,12 @@ def updateNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId "multicastRouting", "vlanId", "defaultGateway", + "isSwitchDefaultGateway", + "uplinkV4", + "candidateUplinkV4", + "uplinkV6", + "staticV4Dns1", + "staticV4Dns2", "ospfSettings", "ipv6", "vrf", @@ -1613,6 +1887,47 @@ def updateNetworkSwitchStp(self, networkId: str, **kwargs): } return action + def updateOrganizationConfigTemplateSwitchProfilePortsMirror( + self, organizationId: str, configTemplateId: str, profileId: str, source: dict, destination: dict, **kwargs + ): + """ + **Update a port mirror** + https://developer.cisco.com/meraki/api-v1/#!update-organization-config-template-switch-profile-ports-mirror + + - organizationId (string): Organization ID + - configTemplateId (string): Config template ID + - profileId (string): Profile ID + - source (object): Source ports mirror configuration + - destination (object): Destination port mirror configuration + - tags (array): Port mirror tags + - role (string): Switch role can be source or destination + - comment (string): My pretty comment + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + configTemplateId = urllib.parse.quote(configTemplateId, safe="") + profileId = urllib.parse.quote(profileId, safe="") + resource = ( + f"/organizations/{organizationId}/configTemplates/{configTemplateId}/switch/profiles/{profileId}/ports/mirror" + ) + + body_params = [ + "source", + "destination", + "tags", + "role", + "comment", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "mirrors/update", + "body": payload, + } + return action + def updateOrganizationConfigTemplateSwitchProfilePort( self, organizationId: str, configTemplateId: str, profileId: str, portId: str, **kwargs ): @@ -1632,6 +1947,7 @@ def updateOrganizationConfigTemplateSwitchProfilePort( - vlan (integer): The VLAN of the switch template port. For a trunk port, this is the native VLAN. A null value will clear the value set for trunk ports. - voiceVlan (integer): The voice VLAN of the switch template port. Only applicable to access ports. - allowedVlans (string): The VLANs allowed on the switch template port. Only applicable to trunk ports. + - activeVlans (string): The VLANs that are active on the switch template port. Only applicable to trunk ports. - isolationEnabled (boolean): The isolation status of the switch template port. - rstpEnabled (boolean): The rapid spanning tree protocol status. - stpGuard (string): The state of the STP guard ('disabled', 'root guard', 'bpdu guard' or 'loop guard'). @@ -1690,6 +2006,7 @@ def updateOrganizationConfigTemplateSwitchProfilePort( "vlan", "voiceVlan", "allowedVlans", + "activeVlans", "isolationEnabled", "rstpEnabled", "stpGuard", @@ -1718,6 +2035,33 @@ def updateOrganizationConfigTemplateSwitchProfilePort( } return action + def cloneOrganizationSwitchProfilesToTemplateNetwork(self, organizationId: str, **kwargs): + """ + **Clone existing switch templates into a destination template network.** + https://developer.cisco.com/meraki/api-v1/#!clone-organization-switch-profiles-to-template-network + + - organizationId (string): Organization ID + - profileIds (array): Switch profile IDs to clone + - templateNodeGroupId (string): Destination template network ID + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/cloneProfilesToTemplateNetwork" + + body_params = [ + "profileIds", + "templateNodeGroupId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "cloneProfilesToTemplateNetwork", + "body": payload, + } + return action + def cloneOrganizationSwitchDevices(self, organizationId: str, sourceSerial: str, targetSerials: list, **kwargs): """ **Clone port-level and some switch-level configuration settings from a source switch to one or more target switches. Cloned settings include: Aggregation Groups, Power Settings, Multicast Settings, MTU Configuration, STP Bridge priority, Port Mirroring** @@ -1744,3 +2088,762 @@ def cloneOrganizationSwitchDevices(self, organizationId: str, sourceSerial: str, "body": payload, } return action + + def createOrganizationSwitchPortsProfile(self, organizationId: str, **kwargs): + """ + **Create a port profile in an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-ports-profile + + - organizationId (string): Organization ID + - name (string): The name of the profile. + - description (string): Text describing the profile. + - isOrganizationWide (boolean): The scope of the profile whether it is organization level or network level + - networks (object): The networks which are included/excluded in the profile + - networkId (string): The network identifier + - tags (array): Space-seperated list of tags + - defaultRadiusProfileName (string): When present, the default RADIUS attribute value for RADIUS-based port profile application + - authentication (object): Authentication settings for RADIUS-based port profile application. + - port (object): Configuration settings for port profile + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles" + + body_params = [ + "name", + "description", + "isOrganizationWide", + "networks", + "networkId", + "tags", + "defaultRadiusProfileName", + "authentication", + "port", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "profiles/create", + "body": payload, + } + return action + + def batchOrganizationSwitchPortsProfilesAssignmentsAssign(self, organizationId: str, items: list, **kwargs): + """ + **Batch assign or unassign port profiles to switch ports** + https://developer.cisco.com/meraki/api-v1/#!batch-organization-switch-ports-profiles-assignments-assign + + - organizationId (string): Organization ID + - items (array): Array of assignment operations (max 100) + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/assignments/batchAssign" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "batch_assign", + "body": payload, + } + return action + + def createOrganizationSwitchPortsProfilesAutomation(self, organizationId: str, **kwargs): + """ + **Create a port profile automation for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-ports-profiles-automation + + - organizationId (string): Organization ID + - name (string): Name of the port profile automation. + - description (string): Text describing the port profile automation. + - fallbackProfile (object): Configuration settings for port profile + - rules (array): Configuration settings for port profile automation rules + - assignedSwitchPorts (array): assigned switch ports + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/automations" + + body_params = [ + "name", + "description", + "fallbackProfile", + "rules", + "assignedSwitchPorts", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "automations/actions/update", + "body": payload, + } + return action + + def updateOrganizationSwitchPortsProfilesAutomation(self, organizationId: str, id: str, **kwargs): + """ + **Update a port profile automation in an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-switch-ports-profiles-automation + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of the port profile automation. + - description (string): Text describing the port profile automation. + - fallbackProfile (object): Configuration settings for port profile + - rules (array): Configuration settings for port profile automation rules + - assignedSwitchPorts (array): assigned switch ports + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/automations/{id}" + + body_params = [ + "name", + "description", + "fallbackProfile", + "rules", + "assignedSwitchPorts", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "automations/actions/update", + "body": payload, + } + return action + + def deleteOrganizationSwitchPortsProfilesAutomation(self, organizationId: str, id: str): + """ + **Delete an automation port profile from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-ports-profiles-automation + + - organizationId (string): Organization ID + - id (string): ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/automations/{id}" + + action = { + "resource": resource, + "operation": "automations/actions/destroy", + } + return action + + def createOrganizationSwitchPortsProfilesNetworksAssignment( + self, organizationId: str, type: str, profile: dict, network: dict, **kwargs + ): + """ + **Create Network and Smart Ports Profile association for a specific profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-ports-profiles-networks-assignment + + - organizationId (string): Organization ID + - type (string): Type of association + - profile (object): Smart Port Profile object + - network (object): Network object + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments" + + body_params = [ + "type", + "profile", + "network", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "profiles/create", + "body": payload, + } + return action + + def batchOrganizationSwitchPortsProfilesNetworksAssignmentsCreate(self, organizationId: str, items: list, **kwargs): + """ + **Batch Create Network and Smart Ports Profile associations for a specific profile** + https://developer.cisco.com/meraki/api-v1/#!batch-organization-switch-ports-profiles-networks-assignments-create + + - organizationId (string): Organization ID + - items (array): Array of network and profile associations + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments/batchCreate" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "batch_create", + "body": payload, + } + return action + + def bulkOrganizationSwitchPortsProfilesNetworksAssignmentsDelete(self, organizationId: str, items: list, **kwargs): + """ + **Bulk delete Network and Smart Port Profile associations** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-switch-ports-profiles-networks-assignments-delete + + - organizationId (string): Organization ID + - items (array): Array of assignments to delete + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments/bulkDelete" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "bulk_destroy", + "body": payload, + } + return action + + def deleteOrganizationSwitchPortsProfilesNetworksAssignment(self, organizationId: str, assignmentId: str): + """ + **Delete Network and Smart Port profile association for a specific profile** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-ports-profiles-networks-assignment + + - organizationId (string): Organization ID + - assignmentId (string): Assignment ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + assignmentId = urllib.parse.quote(assignmentId, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments/{assignmentId}" + + action = { + "resource": resource, + "operation": "profiles/destroy", + } + return action + + def createOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: str, network: dict, **kwargs): + """ + **Create a port profile RADIUS assignment** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-ports-profiles-radius-assignment + + - organizationId (string): Organization ID + - network (object): The network where the RADIUS name is assigned + - portProfile (object): The assigned port profile + - radius (object): The RADIUS options for this assignment + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments" + + body_params = [ + "network", + "portProfile", + "radius", + ] + 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 updateOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: str, id: str, **kwargs): + """ + **Update a port profile RADIUS assignment** + https://developer.cisco.com/meraki/api-v1/#!update-organization-switch-ports-profiles-radius-assignment + + - organizationId (string): Organization ID + - id (string): ID + - network (object): The network where the RADIUS name is assigned + - portProfile (object): The assigned port profile + - radius (object): The RADIUS options for this assignment + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments/{id}" + + body_params = [ + "network", + "portProfile", + "radius", + ] + 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 deleteOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: str, id: str): + """ + **Deletes a port profile RADIUS assignment** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-ports-profiles-radius-assignment + + - organizationId (string): Organization ID + - id (string): ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments/{id}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def updateOrganizationSwitchPortsProfile(self, organizationId: str, id: str, **kwargs): + """ + **Update a port profile in an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-switch-ports-profile + + - organizationId (string): Organization ID + - id (string): ID + - name (string): The name of the profile. + - description (string): Text describing the profile. + - isOrganizationWide (boolean): The scope of the profile whether it is organization level or network level + - networks (object): The networks which are included/excluded in the profile + - networkId (string): The network identifier + - tags (array): Space-seperated list of tags + - defaultRadiusProfileName (string): When present, the default RADIUS attribute value for RADIUS-based port profile application + - authentication (object): Authentication settings for RADIUS-based port profile application. + - port (object): Configuration settings for port profile + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/{id}" + + body_params = [ + "name", + "description", + "isOrganizationWide", + "networks", + "networkId", + "tags", + "defaultRadiusProfileName", + "authentication", + "port", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "profiles/update", + "body": payload, + } + return action + + def deleteOrganizationSwitchPortsProfile(self, organizationId: str, id: str): + """ + **Delete a port profile from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-ports-profile + + - organizationId (string): Organization ID + - id (string): ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/{id}" + + action = { + "resource": resource, + "operation": "profiles/destroy", + } + return action + + def createOrganizationSwitchRoutingBgpAutonomousSystem(self, organizationId: str, number: int, **kwargs): + """ + **Create an autonomous system. Border Gateway Protocol requires IOS XE 17.18 or higher** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-autonomous-system + + - organizationId (string): Organization ID + - number (integer): The autonomous system number (CLI: 'router bgp ') + - description (string): A description for the autonomous system + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems" + + body_params = [ + "number", + "description", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "systems/create", + "body": payload, + } + return action + + def updateOrganizationSwitchRoutingBgpAutonomousSystem(self, organizationId: str, autonomousSystemId: str, **kwargs): + """ + **Update an autonomous system. Border Gateway Protocol requires IOS XE 17.18 or higher** + https://developer.cisco.com/meraki/api-v1/#!update-organization-switch-routing-bgp-autonomous-system + + - organizationId (string): Organization ID + - autonomousSystemId (string): Autonomous system ID + - number (integer): The autonomous system number (CLI: 'router bgp ') + - description (string): A description for the autonomous system + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + autonomousSystemId = urllib.parse.quote(autonomousSystemId, safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems/{autonomousSystemId}" + + body_params = [ + "number", + "description", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "systems/update", + "body": payload, + } + return action + + def deleteOrganizationSwitchRoutingBgpAutonomousSystem(self, organizationId: str, autonomousSystemId: str): + """ + **Delete an autonomous system from an organization. Border Gateway Protocol requires IOS XE 17.18 or higher** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-routing-bgp-autonomous-system + + - organizationId (string): Organization ID + - autonomousSystemId (string): Autonomous system ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + autonomousSystemId = urllib.parse.quote(autonomousSystemId, safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems/{autonomousSystemId}" + + action = { + "resource": resource, + "operation": "systems/destroy", + } + return action + + def createOrganizationSwitchRoutingBgpFiltersFilterListsDeploy( + self, organizationId: str, filterList: dict, network: dict, rules: list, **kwargs + ): + """ + **Create or update a filter list, in addition to its associated rules. Border Gateway Protocol requires IOS XE 17.18 or higher** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-filters-filter-lists-deploy + + - organizationId (string): Organization ID + - filterList (object): Information regarding the filter list + - network (object): Information regarding the network the filter list belongs to + - rules (array): Information regarding the filter list rules + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists/deploy" + + body_params = [ + "filterList", + "network", + "rules", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "deploy", + "body": payload, + } + return action + + def deleteOrganizationSwitchRoutingBgpFiltersFilterList(self, organizationId: str, listId: str): + """ + **Delete a filter list. Border Gateway Protocol requires IOS XE 17.18 or higher** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-routing-bgp-filters-filter-list + + - organizationId (string): Organization ID + - listId (string): List ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + listId = urllib.parse.quote(listId, safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists/{listId}" + + action = { + "resource": resource, + "operation": "lists/destroy", + } + return action + + def createOrganizationSwitchRoutingBgpFiltersPrefixListsDeploy( + self, organizationId: str, network: dict, prefixList: dict, rules: list, **kwargs + ): + """ + **Create or update a prefix list, in addition to its associated rules. Border Gateway Protocol requires IOS XE 17.18 or higher** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-filters-prefix-lists-deploy + + - organizationId (string): Organization ID + - network (object): Information regarding the network the prefix list belongs to + - prefixList (object): Information regarding the prefix list + - rules (array): Information regarding the prefix list rules + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists/deploy" + + body_params = [ + "network", + "prefixList", + "rules", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "deploy", + "body": payload, + } + return action + + def deleteOrganizationSwitchRoutingBgpFiltersPrefixList(self, organizationId: str, listId: str): + """ + **Delete a prefix list. Border Gateway Protocol requires IOS XE 17.18 or higher** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-routing-bgp-filters-prefix-list + + - organizationId (string): Organization ID + - listId (string): List ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + listId = urllib.parse.quote(listId, safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists/{listId}" + + action = { + "resource": resource, + "operation": "lists/destroy", + } + return action + + def createOrganizationSwitchRoutingBgpPeersGroupsDeploy( + self, + organizationId: str, + addressFamily: dict, + network: dict, + peerGroup: dict, + peerGroupAddressFamilyBindingProfile: dict, + peerGroupProfile: dict, + policies: list, + router: dict, + **kwargs, + ): + """ + **Create or update a peer group, in addition to an associated peer group profile, peer group address family binding, peer group address family binding profile and routing policies associated with the peer group. Border Gateway Protocol requires IOS XE 17.18 or higher** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-peers-groups-deploy + + - organizationId (string): Organization ID + - addressFamily (object): Information regarding the address family the peer group address family binding belongs to + - network (object): Information regarding the network the peer group profile belongs to + - peerGroup (object): Information regarding the peer group + - peerGroupAddressFamilyBindingProfile (object): Information regarding the peer group address family binding profile + - peerGroupProfile (object): Information regarding the peer group profile + - policies (array): Information regarding the routing policies + - router (object): Information regarding the router this peer group belongs to + - peerGroupAddressFamilyBinding (object): Information regarding the peer group address family binding. Only required when updating. + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/groups/deploy" + + body_params = [ + "addressFamily", + "network", + "peerGroup", + "peerGroupAddressFamilyBinding", + "peerGroupAddressFamilyBindingProfile", + "peerGroupProfile", + "policies", + "router", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "deploy", + "body": payload, + } + return action + + def createOrganizationSwitchRoutingBgpPeersNeighborsDeploy( + self, + organizationId: str, + addressFamily: dict, + neighbor: dict, + neighborAddressFamilyBinding: dict, + peerGroup: dict, + policies: list, + router: dict, + **kwargs, + ): + """ + **Create or update a neighor, in addition to an associated neighbor address family binding and routing policies associated with the neighbor. Border Gateway Protocol requires IOS XE 17.18 or higher** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-peers-neighbors-deploy + + - organizationId (string): Organization ID + - addressFamily (object): Information regarding the address family this binding is bound to + - neighbor (object): Information regarding the BPG neighbor + - neighborAddressFamilyBinding (object): Information regarding the neighbor address family binding + - peerGroup (object): Information regarding the peer group this neighbor belongs to + - policies (array): Information regarding the routing policies related to the neighbor + - router (object): Information regarding the router this neighbor peers with + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/neighbors/deploy" + + body_params = [ + "addressFamily", + "neighbor", + "neighborAddressFamilyBinding", + "peerGroup", + "policies", + "router", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "deploy", + "body": payload, + } + return action + + def createOrganizationSwitchRoutingBgpRoutersDeploy( + self, + organizationId: str, + addressFamily: dict, + addressFamilyPrefixes: list, + addressFamilyProfile: dict, + autonomousSystem: dict, + router: dict, + switch: dict, + **kwargs, + ): + """ + **Create a BGP router, in addition to an associated address family, address family prefixes, and address family profile. This is helpful for the initial deployment of a BGP router.. Border Gateway Protocol requires IOS XE 17.18 or higher** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-routers-deploy + + - organizationId (string): Organization ID + - addressFamily (object): Information regarding the address family + - addressFamilyPrefixes (array): The list of network prefixes to which the address family applies + - addressFamilyProfile (object): Information regarding the profile applied to the address family + - autonomousSystem (object): Information regarding the router's autonomous system + - router (object): Information regarding the BPG router + - switch (object): The router's switch node. When the router is part of a switch stack, this is the switch stack's active node + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/deploy" + + body_params = [ + "addressFamily", + "addressFamilyPrefixes", + "addressFamilyProfile", + "autonomousSystem", + "router", + "switch", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "deploy", + "body": payload, + } + return action + + def createOrganizationSwitchRoutingBgpRoutersPeersDeploy( + self, organizationId: str, addressFamily: dict, peerGroups: list, router: dict, **kwargs + ): + """ + **Create and update listen ranges, update peers' enabled flag, and delete peer groups for a BGP router. Border Gateway Protocol requires IOS XE 17.18 or higher** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-routers-peers-deploy + + - organizationId (string): Organization ID + - addressFamily (object): Information regarding the address family + - peerGroups (array): Information regarding the peer group peers for a router's peer group + - router (object): Information regarding the BPG router + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/peers/deploy" + + body_params = [ + "addressFamily", + "peerGroups", + "router", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "peers_deploy", + "body": payload, + } + return action + + def deleteOrganizationSwitchRoutingBgpRouter(self, organizationId: str, routerId: str): + """ + **Delete a router from an organization. Border Gateway Protocol requires IOS XE 17.18 or higher** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-routing-bgp-router + + - organizationId (string): Organization ID + - routerId (string): Router ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + routerId = urllib.parse.quote(routerId, safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/{routerId}" + + action = { + "resource": resource, + "operation": "ms/actions/bgp/routers/destroy", + } + return action diff --git a/meraki/api/batch/users.py b/meraki/api/batch/users.py new file mode 100644 index 00000000..b8dfbfdc --- /dev/null +++ b/meraki/api/batch/users.py @@ -0,0 +1,359 @@ +import urllib + + +class ActionBatchUsers(object): + def __init__(self): + super(ActionBatchUsers, self).__init__() + + def createOrganizationIamUsersAuthorization(self, organizationId: str, authZone: dict, **kwargs): + """ + **Authorize a Meraki end user for an auth zone.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-authorization + + - organizationId (string): Organization ID + - authZone (object): Auth zone + - email (string): Meraki end user's email + - idpUserId (string): Meraki end user's ID + - startsAt (string): Start time of the desired access for the authorization. Defaults to now. + - expiresAt (string): Expiration time of the desired access for the authorization + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations" + + body_params = [ + "email", + "idpUserId", + "authZone", + "startsAt", + "expiresAt", + ] + 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 updateOrganizationIamUsersAuthorizations(self, organizationId: str, **kwargs): + """ + **Update a Meraki end user's access to an auth zone.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-iam-users-authorizations + + - organizationId (string): Organization ID + - authorizationId (string): Authorization ID + - email (string): Meraki end user's email + - authZone (object): Auth zone + - startsAt (string): Start time of the desired access for the authorization + - expiresAt (string): Expiration time of the desired access for the authorization + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations" + + body_params = [ + "authorizationId", + "email", + "authZone", + "startsAt", + "expiresAt", + ] + 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 revokeOrganizationIamUsersAuthorizationsAuthorization(self, organizationId: str, authZone: dict, **kwargs): + """ + **Revoke a Meraki end user's access to an auth zone.** + https://developer.cisco.com/meraki/api-v1/#!revoke-organization-iam-users-authorizations-authorization + + - organizationId (string): Organization ID + - authZone (object): Auth zone + - email (string): Meraki end user's email + - authorizationId (string): Authorization ID + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations/authorization/revoke" + + body_params = [ + "email", + "authorizationId", + "authZone", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "revoke", + "body": payload, + } + return action + + def deleteOrganizationIamUsersAuthorization(self, organizationId: str, authorizationId: str): + """ + **Delete an authorization for a Meraki end user.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-iam-users-authorization + + - organizationId (string): Organization ID + - authorizationId (string): Authorization ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + authorizationId = urllib.parse.quote(authorizationId, safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations/{authorizationId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def createOrganizationIamUsersIdp(self, organizationId: str, name: str, type: str, idpConfig: dict, **kwargs): + """ + **Create an identity provider for an organization. Only Entra ID(Azure AD) is supported at this time.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idp + + - organizationId (string): Organization ID + - name (string): Name of the identity provider + - type (string): Type of the identity provider + - idpConfig (object): Identity provider configuration. Required for external identity providers. + - description (string): Optional. Description of the identity provider + - syncType (string): The synchronization method for the identity provider. Set to 'proactive' to sync all users and groups from your identity provider. + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = ["Azure AD"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + if "syncType" in kwargs: + options = ["proactive"] + assert kwargs["syncType"] in options, ( + f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' + ) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/iam/users/idps" + + body_params = [ + "name", + "type", + "description", + "idpConfig", + "syncType", + ] + 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 createOrganizationIamUsersIdpsTestConnectivity(self, organizationId: str, **kwargs): + """ + **Test connectivity to an Entra ID identity provider.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idps-test-connectivity + + - organizationId (string): Organization ID + - idpId (string): Id of the identity provider + - idpConfig (object): Identity provider configuration. Required for external identity providers. + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/testConnectivity" + + body_params = [ + "idpId", + "idpConfig", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "test_connectivity", + "body": payload, + } + return action + + def createOrganizationIamUsersIdpsUser(self, organizationId: str, **kwargs): + """ + **Create a Meraki user** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idps-user + + - organizationId (string): Organization ID + - displayName (string): A human-readable identifier for the created user. + - email (string): An email address identified with the user. + - password (string): The password for the user account. + - sendPassword (boolean): If true, sends an email with the password to the user. + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/users" + + body_params = [ + "displayName", + "email", + "password", + "sendPassword", + ] + 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 updateOrganizationIamUsersIdpsUser(self, organizationId: str, id: str, **kwargs): + """ + **Update a Meraki user** + https://developer.cisco.com/meraki/api-v1/#!update-organization-iam-users-idps-user + + - organizationId (string): Organization ID + - id (string): ID + - displayName (string): A human-readable identifier for the created user. + - email (string): An email address identified with the user. + - password (string): The password for the user account. + - sendPassword (boolean): If true, sends an email with the password to the user. + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/users/{id}" + + body_params = [ + "displayName", + "email", + "password", + "sendPassword", + ] + 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 deleteOrganizationIamUsersIdpsUser(self, organizationId: str, id: str): + """ + **Delete a Meraki end user** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-iam-users-idps-user + + - organizationId (string): Organization ID + - id (string): ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/users/{id}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def createOrganizationIamUsersIdpSync(self, organizationId: str, idpId: str, **kwargs): + """ + **Trigger an IdP sync for an identity provider. Only Entra ID(Azure AD) is supported at this time.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idp-sync + + - organizationId (string): Organization ID + - idpId (string): Idp ID + - emails (array): List of emails to sync + - force (boolean): Force a complete sync of all users and groups + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + idpId = urllib.parse.quote(idpId, safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{idpId}/sync" + + body_params = [ + "emails", + "force", + ] + 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 updateOrganizationIamUsersIdp(self, organizationId: str, id: str, **kwargs): + """ + **Update an identity provider. Only Entra ID(Azure AD) is supported at this time.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-iam-users-idp + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of the identity provider + - description (string): Description of the identity provider + - idpConfig (object): Identity provider configuration. You can update individual attributes + - syncType (string): The synchronization method for the identity provider. Set to 'proactive' to sync all users and groups from your identity provider. Set to 'null' for on-demand user and group provisioning. + """ + + kwargs.update(locals()) + + if "syncType" in kwargs: + options = ["proactive"] + assert kwargs["syncType"] in options, ( + f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' + ) + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{id}" + + body_params = [ + "name", + "description", + "idpConfig", + "syncType", + ] + 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 deleteOrganizationIamUsersIdp(self, organizationId: str, id: str): + """ + **Delete a identity provider from an organization. Only Entra ID(Azure AD) is supported at this time.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-iam-users-idp + + - organizationId (string): Organization ID + - id (string): ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{id}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action diff --git a/meraki/api/batch/wireless.py b/meraki/api/batch/wireless.py index f2983d22..f529ffa9 100644 --- a/meraki/api/batch/wireless.py +++ b/meraki/api/batch/wireless.py @@ -42,6 +42,7 @@ def updateDeviceWirelessBluetoothSettings(self, serial: str, **kwargs): Dashboard's automatically generated value. - minor (integer): Desired minor value of the beacon. If the value is set to null it will reset to Dashboard's automatically generated value. + - transmit (object): Transmit settings including power, interval, and advertised power. """ kwargs.update(locals()) @@ -53,6 +54,7 @@ def updateDeviceWirelessBluetoothSettings(self, serial: str, **kwargs): "uuid", "major", "minor", + "transmit", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -89,6 +91,60 @@ def updateDeviceWirelessElectronicShelfLabel(self, serial: str, **kwargs): } return action + def updateDeviceWirelessRadioAfcPosition(self, serial: str, **kwargs): + """ + **Update the position attributes for this device** + https://developer.cisco.com/meraki/api-v1/#!update-device-wireless-radio-afc-position + + - serial (string): Serial + - height (object): Height attributes + - gps (object): GPS attributes + """ + + kwargs.update(locals()) + + serial = urllib.parse.quote(serial, safe="") + resource = f"/devices/{serial}/wireless/radio/afc/position" + + body_params = [ + "height", + "gps", + ] + 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 updateDeviceWirelessRadioOverrides(self, serial: str, **kwargs): + """ + **Update 2.4 GHz, 5 GHz, and 6 GHz radio settings (channel, channel width, power, and enable/disable) that override RF profiles.** + https://developer.cisco.com/meraki/api-v1/#!update-device-wireless-radio-overrides + + - serial (string): Serial + - rfProfile (object): This device's RF profile + - radios (array): Radio overrides. + """ + + kwargs.update(locals()) + + serial = urllib.parse.quote(serial, safe="") + resource = f"/devices/{serial}/wireless/radio/overrides" + + body_params = [ + "rfProfile", + "radios", + ] + 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 updateDeviceWirelessRadioSettings(self, serial: str, **kwargs): """ **Update 2.4 GHz and 5 GHz radio settings (channel, channel width, power) that override RF profiles. For 6 GHz support or radio enable/disable, use updateDeviceWirelessRadioOverrides instead.** @@ -481,6 +537,89 @@ def updateNetworkWirelessLocationScanning(self, networkId: str, **kwargs): } return action + def updateNetworkWirelessLocationWayfinding(self, networkId: str, **kwargs): + """ + **Change client wayfinding settings** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-location-wayfinding + + - networkId (string): Network ID + - enabled (boolean): Whether to enable client wayfinding on that network (only supported on Wireless networks). + - maintenanceWindow (object): Maintenance window during which optimization might take place to improve location accuracy. + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/wireless/location/wayfinding" + + body_params = [ + "enabled", + "maintenanceWindow", + ] + 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 updateNetworkWirelessOpportunisticPcap(self, networkId: str, **kwargs): + """ + **Update the Opportunistic Pcap settings for a wireless network** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-opportunistic-pcap + + - networkId (string): Network ID + - enablement (object): Enablement settings + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/wireless/opportunisticPcap" + + body_params = [ + "enablement", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "factory", + "body": payload, + } + return action + + def updateNetworkWirelessRadioAutoRf(self, networkId: str, **kwargs): + """ + **Update the AutoRF settings for a wireless network** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-radio-auto-rf + + - networkId (string): Network ID + - busyHour (object): Busy Hour settings + - channel (object): Channel settings + - fra (object): FRA settings + - aiRrm (object): AI-RRM settings + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/wireless/radio/autoRf" + + body_params = [ + "busyHour", + "channel", + "fra", + "aiRrm", + ] + 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 updateNetworkWirelessRadioRrm(self, networkId: str, **kwargs): """ **Update the AutoRF settings for a wireless network** @@ -703,6 +842,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - number (string): Number - name (string): The name of the SSID - enabled (boolean): Whether or not the SSID is enabled + - localAuth (boolean): Extended local auth flag for Enterprise NAC - authMode (string): The association control method for the SSID ('open', 'open-enhanced', 'psk', 'open-with-radius', 'open-enhanced-with-radius', 'open-with-nac', '8021x-meraki', '8021x-nac', '8021x-radius', '8021x-google', '8021x-entra', '8021x-localradius', 'ipsk-with-radius', 'ipsk-without-radius', 'ipsk-with-nac' or 'ipsk-with-radius-easy-psk') - enterpriseAdminAccess (string): Whether or not an SSID is accessible by 'enterprise' administrators ('access disabled' or 'access enabled') - ssidAdminAccessible (boolean): SSID Administrator access status @@ -734,6 +874,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - radiusAccountingInterimInterval (integer): The interval (in seconds) in which accounting information is updated and sent to the RADIUS accounting server. - radiusAttributeForGroupPolicies (string): Specify the RADIUS attribute used to look up group policies ('Filter-Id', 'Reply-Message', 'Airespace-ACL-Name' or 'Aruba-User-Role'). Access points must receive this attribute in the RADIUS Access-Accept message - ipAssignmentMode (string): The client IP assignment mode ('NAT mode', 'Bridge mode', 'Layer 3 roaming', 'Ethernet over GRE', 'Layer 3 roaming with a concentrator', 'VPN' or 'Campus Gateway') + - campusGateway (object): Campus gateway settings - useVlanTagging (boolean): Whether or not traffic should be directed to use specific VLANs. This param is only valid if the ipAssignmentMode is 'Bridge mode' or 'Layer 3 roaming' - concentratorNetworkId (string): The concentrator to use when the ipAssignmentMode is 'Layer 3 roaming with a concentrator' or 'VPN'. - secondaryConcentratorNetworkId (string): The secondary concentrator to use when the ipAssignmentMode is 'VPN'. If configured, the APs will switch to using this concentrator if the primary concentrator is unreachable. This param is optional. ('disabled' represents no secondary concentrator.) @@ -850,6 +991,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): body_params = [ "name", "enabled", + "localAuth", "authMode", "enterpriseAdminAccess", "ssidAdminAccessible", @@ -881,6 +1023,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): "radiusAccountingInterimInterval", "radiusAttributeForGroupPolicies", "ipAssignmentMode", + "campusGateway", "useVlanTagging", "concentratorNetworkId", "secondaryConcentratorNetworkId", @@ -1244,6 +1387,115 @@ def updateNetworkWirelessSsidOpenRoaming(self, networkId: str, number: str, **kw } return action + def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, number: str, static: dict, **kwargs): + """ + **Update the client exclusion status configuration for a given SSID** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-policies-client-exclusion + + - networkId (string): Network ID + - number (string): Number + - static (object): Static client exclusion status + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + number = urllib.parse.quote(number, safe="") + resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion" + + body_params = [ + "static", + ] + 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 updateNetworkWirelessSsidPoliciesClientExclusionStaticExclusions( + self, networkId: str, number: str, macs: list, **kwargs + ): + """ + **Set the static client exclusion list for the given SSID** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-policies-client-exclusion-static-exclusions + + - networkId (string): Network ID + - number (string): Number + - macs (array): MAC addresses to set as static exclusion list + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + number = urllib.parse.quote(number, safe="") + resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion/static/exclusions" + + body_params = [ + "macs", + ] + 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 createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkAdd( + self, networkId: str, number: str, macs: list, **kwargs + ): + """ + **Add a list of MAC addresses to the static client exclusion list for the given SSID** + https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ssid-policies-client-exclusion-static-exclusions-bulk-add + + - networkId (string): Network ID + - number (string): Number + - macs (array): MAC addresses to add to static exclusion + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + number = urllib.parse.quote(number, safe="") + resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion/static/exclusions/bulkAdd" + + body_params = [ + "macs", + ] + 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 createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkRemove( + self, networkId: str, number: str, macs: list, **kwargs + ): + """ + **Delete a list of MAC addresses from the static client exclusion list for the given SSID** + https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ssid-policies-client-exclusion-static-exclusions-bulk-remove + + - networkId (string): Network ID + - number (string): Number + - macs (array): MAC addresses to remove from static exclusion + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + number = urllib.parse.quote(number, safe="") + resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion/static/exclusions/bulkRemove" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def updateNetworkWirelessSsidSchedules(self, networkId: str, number: str, **kwargs): """ **Update the outage schedule for the SSID** @@ -1288,6 +1540,8 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * - redirectUrl (string): The custom redirect URL where the users will go after the splash page. - useRedirectUrl (boolean): The Boolean indicating whether the the user will be redirected to the custom redirect URL after the splash page. A custom redirect URL must be set if this is true. - welcomeMessage (string): The welcome message for the users on the splash page. + - language (string): Language of splash page. + - userConsent (object): User consent settings. - themeId (string): The id of the selected splash theme. - splashLogo (object): The logo used in the splash page. - splashImage (object): The image used in the splash page. @@ -1308,6 +1562,32 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * assert kwargs["splashTimeout"] in options, ( f'''"splashTimeout" cannot be "{kwargs["splashTimeout"]}", & must be set to one of: {options}''' ) + if "language" in kwargs: + options = [ + "DA", + "DE", + "EL", + "EN", + "ES", + "FI", + "FR", + "GL", + "IT", + "JA", + "KO", + "NL", + "NO", + "PL", + "PT", + "RU", + "SK", + "SV", + "UK", + "ZH", + ] + assert kwargs["language"] in options, ( + f'''"language" cannot be "{kwargs["language"]}", & must be set to one of: {options}''' + ) if "controllerDisconnectionBehavior" in kwargs: options = ["default", "open", "restricted"] assert kwargs["controllerDisconnectionBehavior"] in options, ( @@ -1325,6 +1605,8 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * "redirectUrl", "useRedirectUrl", "welcomeMessage", + "language", + "userConsent", "themeId", "splashLogo", "splashImage", @@ -1441,6 +1723,33 @@ def updateNetworkWirelessZigbee(self, networkId: str, **kwargs): } return action + def createOrganizationWirelessDevicesLiveToolsClientDisconnect(self, organizationId: str, clientId: str, **kwargs): + """ + **Enqueue a job to disconnect a client from an AP. This endpoint has a sustained rate limit of one request every five seconds per device, with an allowed burst of five requests.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-live-tools-client-disconnect + + - organizationId (string): Organization ID + - clientId (string): Client ID + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + clientId = urllib.parse.quote(clientId, safe="") + resource = f"/organizations/{organizationId}/wireless/devices/liveTools/clients/{clientId}/disconnect" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "disconnect", + "body": payload, + } + return action + def createOrganizationWirelessDevicesProvisioningDeployment(self, organizationId: str, items: list, **kwargs): """ **Create a zero touch deployment for a wireless access point** @@ -1736,6 +2045,133 @@ def updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry(self, organiz } return action + def createOrganizationWirelessSsidsProfile(self, organizationId: str, name: str, ssid: dict, **kwargs): + """ + **Create a new SSID profile in an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-ssids-profile + + - organizationId (string): Organization ID + - name (string): Name of the SSID profile + - ssid (object): SSID configuration for the profile + - precedence (object): Precedence configuration for the SSID profile + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/profiles" + + body_params = [ + "name", + "precedence", + "ssid", + ] + 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 createOrganizationWirelessSsidsProfilesAssignment(self, organizationId: str, profile: dict, ssid: dict, **kwargs): + """ + **Assigns an SSID profile to an SSID in the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-ssids-profiles-assignment + + - organizationId (string): Organization ID + - profile (object): SSID profile to assign + - ssid (object): SSID to assign the SSID profile to + - network (object): Network containing the SSID (required if SSID number is used) + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/assignments" + + body_params = [ + "profile", + "ssid", + "network", + ] + 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 deleteOrganizationWirelessSsidsProfilesAssignments(self, organizationId: str, ssid: dict, **kwargs): + """ + **Unassigns the SSID profile assigned to an SSID** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-ssids-profiles-assignments + + - organizationId (string): Organization ID + - ssid (object): SSID to delete the SSID profile assignment of + - network (object): Network containing the SSID (required if SSID number is used) + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/assignments" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def updateOrganizationWirelessSsidsProfile(self, organizationId: str, id: str, **kwargs): + """ + **Update this SSID profile** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-ssids-profile + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of the SSID profile + - ssid (object): SSID configuration for the profile + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/{id}" + + body_params = [ + "name", + "ssid", + ] + 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 deleteOrganizationWirelessSsidsProfile(self, organizationId: str, id: str): + """ + **Delete an SSID profile** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-ssids-profile + + - organizationId (string): Organization ID + - id (string): ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/{id}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def updateOrganizationWirelessZigbeeDevice(self, organizationId: str, id: str, enrolled: bool, **kwargs): """ **Endpoint to update zigbee gateways** diff --git a/meraki/api/camera.py b/meraki/api/camera.py index 2f834255..7d983310 100644 --- a/meraki/api/camera.py +++ b/meraki/api/camera.py @@ -739,6 +739,97 @@ def getNetworkCameraSchedules(self, networkId: str): return self._session.get(metadata, resource) + def createNetworkCameraVideoWall(self, networkId: str, name: str, tiles: list, **kwargs): + """ + **Create a new video wall.** + https://developer.cisco.com/meraki/api-v1/#!create-network-camera-video-wall + + - networkId (string): Network ID + - name (string): The name of the video wall. + - tiles (array): The tiles that should appear on the video wall. + - index (integer): The order that this wall should appear on the video wall list. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["camera", "configure", "videoWalls"], + "operation": "createNetworkCameraVideoWall", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/camera/videoWalls" + + body_params = [ + "name", + "index", + "tiles", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkCameraVideoWall: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateNetworkCameraVideoWall(self, networkId: str, id: str, name: str, tiles: list, **kwargs): + """ + **Update the specified video wall.** + https://developer.cisco.com/meraki/api-v1/#!update-network-camera-video-wall + + - networkId (string): Network ID + - id (string): ID + - name (string): The name of the video wall. + - tiles (array): The tiles that should appear on the video wall. + - index (integer): The order that this wall should appear on the video wall list. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["camera", "configure", "videoWalls"], + "operation": "updateNetworkCameraVideoWall", + } + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/networks/{networkId}/camera/videoWalls/{id}" + + body_params = [ + "name", + "index", + "tiles", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkCameraVideoWall: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteNetworkCameraVideoWall(self, networkId: str, id: str): + """ + **Delete the specified video wall.** + https://developer.cisco.com/meraki/api-v1/#!delete-network-camera-video-wall + + - networkId (string): Network ID + - id (string): ID + """ + + metadata = { + "tags": ["camera", "configure", "videoWalls"], + "operation": "deleteNetworkCameraVideoWall", + } + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/networks/{networkId}/camera/videoWalls/{id}" + + return self._session.delete(metadata, resource) + def createNetworkCameraWirelessProfile(self, networkId: str, name: str, ssid: dict, **kwargs): """ **Creates a new camera wireless profile for this network.** @@ -1091,6 +1182,45 @@ def getOrganizationCameraDetectionsHistoryByBoundaryByInterval( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCameraDevicesConfigurations(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Lists all the capabilities of cameras in this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-devices-configurations + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 20. + - 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": ["camera", "configure", "devices", "configurations"], + "operation": "getOrganizationCameraDevicesConfigurations", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/camera/devices/configurations" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCameraDevicesConfigurations: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCameraOnboardingStatuses(self, organizationId: str, **kwargs): """ **Fetch onboarding status of cameras** @@ -1336,3 +1466,104 @@ def updateOrganizationCameraRole(self, organizationId: str, roleId: str, **kwarg self._session._logger.warning(f"updateOrganizationCameraRole: ignoring unrecognized kwargs: {invalid}") return self._session.put(metadata, resource, payload) + + def getOrganizationCameraVideoWalls(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return a list of video walls.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-video-walls + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 10 - 250. 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. + - networkIds (array): A list of network ids to filter video walls on + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["camera", "configure", "videoWalls"], + "operation": "getOrganizationCameraVideoWalls", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/camera/videoWalls" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationCameraVideoWalls: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationCameraVideoWall(self, organizationId: str, id: str): + """ + **Return the specified video wall.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-video-wall + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["camera", "configure", "videoWalls"], + "operation": "getOrganizationCameraVideoWall", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/camera/videoWalls/{id}" + + return self._session.get(metadata, resource) + + def getOrganizationCameraVideoWallVideoLink(self, organizationId: str, id: str, **kwargs): + """ + **Returns video wall link to the specified video wall id** + https://developer.cisco.com/meraki/api-v1/#!get-organization-camera-video-wall-video-link + + - organizationId (string): Organization ID + - id (string): ID + - timestamp (string): [optional] The video link will start at this time. The timestamp should be a string in ISO8601 format. If no timestamp is specified, we will assume current time. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["camera", "configure", "videoWalls", "videoLink"], + "operation": "getOrganizationCameraVideoWallVideoLink", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/camera/videoWalls/{id}/videoLink" + + query_params = [ + "timestamp", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCameraVideoWallVideoLink: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) diff --git a/meraki/api/campusGateway.py b/meraki/api/campusGateway.py index c5636184..46ac13e6 100644 --- a/meraki/api/campusGateway.py +++ b/meraki/api/campusGateway.py @@ -96,6 +96,96 @@ def updateNetworkCampusGatewayCluster(self, networkId: str, clusterId: str, **kw return self._session.put(metadata, resource, payload) + def deleteNetworkCampusGatewayCluster(self, networkId: str, clusterId: str): + """ + **Delete a cluster** + https://developer.cisco.com/meraki/api-v1/#!delete-network-campus-gateway-cluster + + - networkId (string): Network ID + - clusterId (string): Cluster ID + """ + + metadata = { + "tags": ["campusGateway", "configure", "clusters"], + "operation": "deleteNetworkCampusGatewayCluster", + } + networkId = urllib.parse.quote(str(networkId), safe="") + clusterId = urllib.parse.quote(str(clusterId), safe="") + resource = f"/networks/{networkId}/campusGateway/clusters/{clusterId}" + + return self._session.delete(metadata, resource) + + def getOrganizationCampusGatewayClientsUsageByNetworkByCluster( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns client usage details for campus gateway clusters within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clients-usage-by-network-by-cluster + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 1 hour and be less than or equal to 7 days. The default is 2 hours. + - networkIds (array): Filter results by a list of network IDs. + - networkGroupIds (array): Limit the results to clients that belong to one of the provided network groups. + - clusterIds (array): Filter results by a list of cluster IDs. + - usageUnits (string): Usage units to use in the response. + """ + + kwargs.update(locals()) + + if "usageUnits" in kwargs: + options = ["GB", "KB", "MB", "TB"] + assert kwargs["usageUnits"] in options, ( + f'''"usageUnits" cannot be "{kwargs["usageUnits"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["campusGateway", "monitor", "clients", "usage", "byNetwork", "byCluster"], + "operation": "getOrganizationCampusGatewayClientsUsageByNetworkByCluster", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clients/usage/byNetwork/byCluster" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "networkGroupIds", + "clusterIds", + "usageUnits", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "networkGroupIds", + "clusterIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClientsUsageByNetworkByCluster: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCampusGatewayClusters(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **Get the details of campus gateway clusters** @@ -143,6 +233,464 @@ def getOrganizationCampusGatewayClusters(self, organizationId: str, total_pages= return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCampusGatewayClustersFailoverTargets( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the details of a Failover Targets for a Campus Gateway cluster** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters-failover-targets + + - 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): Optional parameter to filter networks. This filter uses multiple exact matches. + - clusterIds (array): Optional parameter to filter clusters. This filter uses multiple exact matches. + - 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", "failover", "targets"], + "operation": "getOrganizationCampusGatewayClustersFailoverTargets", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/failover/targets" + + query_params = [ + "networkIds", + "clusterIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "clusterIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClustersFailoverTargets: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationCampusGatewayClustersFailoverTargetsByCluster( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get available backup cluster targets for campus gateway failover configuration** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters-failover-targets-by-cluster + + - 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 backup cluster targets should be gathered. + - clusterIds (array): Cluster IDs to filter backup cluster targets. + - 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", "failover", "targets", "byCluster"], + "operation": "getOrganizationCampusGatewayClustersFailoverTargetsByCluster", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/failover/targets/byCluster" + + query_params = [ + "networkIds", + "clusterIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "clusterIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClustersFailoverTargetsByCluster: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationCampusGatewayClustersNetworksOverviews( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List networks tunneling through Campus Gateway clusters with their AP, ssids and client counts** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters-networks-overviews + + - 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 + - clusterIds (array): Optional parameter to filter by MCG cluster IDs. This filter uses multiple exact matches. + - siteIds (array): Optional parameter to filter by site IDs. This filter uses multiple exact matches. + - networkIds (array): Optional parameter to filter networks. This filter uses multiple exact matches. + - search (string): Optional parameter to filter networks by wireless network name. This filter uses case-insensitive substring matching. + - sortBy (string): Optional parameter to sort results. Default is 'name'. Use 'siteName' to sort by site name. + - sortOrder (string): Optional parameter to specify sort direction. Default is 'asc'. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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()) + + if "sortBy" in kwargs: + options = ["clients", "clusterId", "connections", "name", "networkId", "siteName", "ssids"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["campusGateway", "configure", "clusters", "networks", "overviews"], + "operation": "getOrganizationCampusGatewayClustersNetworksOverviews", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/networks/overviews" + + query_params = [ + "clusterIds", + "siteIds", + "networkIds", + "search", + "sortBy", + "sortOrder", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "clusterIds", + "siteIds", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClustersNetworksOverviews: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def provisionOrganizationCampusGatewayClusters( + self, + organizationId: str, + clusterId: str, + network: dict, + name: str, + uplinks: list, + tunnels: list, + nameservers: dict, + portChannels: list, + **kwargs, + ): + """ + **Provisions a cluster,adds campus gateways to it and associate/dissociate failover targets.** + https://developer.cisco.com/meraki/api-v1/#!provision-organization-campus-gateway-clusters + + - organizationId (string): Organization ID + - clusterId (string): ID of the cluster to be provisioned + - network (object): Network to be provisioned + - name (string): Name of the new cluster + - uplinks (array): Uplink interface settings of the cluster + - tunnels (array): Tunnel interface settings of the cluster: Reuse uplink or specify tunnel interface + - nameservers (object): Nameservers of the cluster + - portChannels (array): Port channel settings of the cluster + - devices (array): Devices to be added to the cluster + - failover (object): Failover targets for the cluster + - notes (string): Notes about cluster with max size of 511 characters allowed + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["campusGateway", "configure", "clusters"], + "operation": "provisionOrganizationCampusGatewayClusters", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/provision" + + body_params = [ + "clusterId", + "network", + "name", + "uplinks", + "tunnels", + "nameservers", + "portChannels", + "devices", + "failover", + "notes", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"provisionOrganizationCampusGatewayClusters: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationCampusGatewayClustersSsids(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List SSIDs tunneling through Campus Gateway clusters** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters-ssids + + - 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 + - clusterIds (array): Optional parameter to filter by MCG cluster IDs. This filter uses multiple exact matches. + - networkIds (array): Optional parameter to filter networks. This filter uses multiple exact matches. + - search (string): Optional parameter to filter SSIDs by name. This filter uses case-insensitive starts with string matching. + - sortBy (string): Optional parameter to sort results. Default is 'networkId'. + - sortOrder (string): Optional parameter to specify sort direction. Default is 'asc'. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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()) + + if "sortBy" in kwargs: + options = ["clusterId", "name", "networkId", "ssidId"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["campusGateway", "configure", "clusters", "ssids"], + "operation": "getOrganizationCampusGatewayClustersSsids", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/ssids" + + query_params = [ + "clusterIds", + "networkIds", + "search", + "sortBy", + "sortOrder", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "clusterIds", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClustersSsids: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationCampusGatewayConnections(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the details of APs tunneling through the Campus Gateway clusters** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-connections + + - 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): Optional parameter to filter networks. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter connections(APs) by its own serials. This filter uses multiple exact matches. + - campusGatewaySerials (array): Optional parameter to filter connections(APs) by MCG serials. This filter uses multiple exact matches. + - campusGatewayClusterIds (array): Optional parameter to filter connections(APs) by MCG cluster IDs. This filter uses multiple exact matches. + - campusGatewayTunnelStatuses (array): Optional parameter to filter connections(APs) by tunnel statuses. This filter uses multiple exact matches. + - search (string): Optional parameter to filter connections(APs) on AP name, serial, MAC address, network name, or interface IP address. This filter uses partial string matching (ILIKE). + - models (array): Optional parameter to filter connections(APs) by device model names. This filter uses multiple exact matches. + - dataEncryptionStatuses (array): Optional parameter to filter connections(APs) by data encryption status. This filter uses multiple exact matches. + - sortBy (string): Optional parameter to sort results. Available options: name, serial, status, interfaces, clients, dataEncryption, networkName. Default is 'serial'. + - sortOrder (string): Optional parameter to specify sort direction. Default is 'asc'. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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()) + + if "sortBy" in kwargs: + options = ["clients", "dataEncryption", "interfaces", "name", "networkName", "serial", "status"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["campusGateway", "configure", "connections"], + "operation": "getOrganizationCampusGatewayConnections", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/connections" + + query_params = [ + "networkIds", + "serials", + "campusGatewaySerials", + "campusGatewayClusterIds", + "campusGatewayTunnelStatuses", + "search", + "models", + "dataEncryptionStatuses", + "sortBy", + "sortOrder", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "campusGatewaySerials", + "campusGatewayClusterIds", + "campusGatewayTunnelStatuses", + "models", + "dataEncryptionStatuses", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayConnections: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationCampusGatewayConnectionsOverview(self, organizationId: str, **kwargs): + """ + **List the count of connections(APs) with tunneling status up and down through the Campus Gateway clusters** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-connections-overview + + - organizationId (string): Organization ID + - networkIds (array): Optional parameter to filter networks. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter connections(APs) by its own serials. This filter uses multiple exact matches. + - campusGatewaySerials (array): Optional parameter to filter connections(APs) by Campus Gateway serials. This filter uses multiple exact matches. + - campusGatewayClusterIds (array): Optional parameter to filter connections(APs) by Campus Gateway cluster IDs. This filter uses multiple exact matches. + - campusGatewayTunnelStatuses (array): Optional parameter to filter connections(APs) by tunnel statuses. This filter uses multiple exact matches. + - search (string): Optional setting that lets you filter access points (APs) by name, serial number, MAC address, network name, or interface IP address. The filter matches partial text, not just exact values (uses ILIKE matching). + - models (array): Optional parameter to filter connections(APs) by device model names. This filter uses multiple exact matches. + - dataEncryptionStatuses (array): Optional parameter to filter connections(APs) by data encryption status. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["campusGateway", "configure", "connections", "overview"], + "operation": "getOrganizationCampusGatewayConnectionsOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/connections/overview" + + query_params = [ + "networkIds", + "serials", + "campusGatewaySerials", + "campusGatewayClusterIds", + "campusGatewayTunnelStatuses", + "search", + "models", + "dataEncryptionStatuses", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "campusGatewaySerials", + "campusGatewayClusterIds", + "campusGatewayTunnelStatuses", + "models", + "dataEncryptionStatuses", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayConnectionsOverview: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationCampusGatewayDevicesUplinksLocalOverridesByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): diff --git a/meraki/api/devices.py b/meraki/api/devices.py index ab404ce2..b3e059c3 100644 --- a/meraki/api/devices.py +++ b/meraki/api/devices.py @@ -232,6 +232,72 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty return self._session.post(metadata, resource, payload) + def updateDeviceCliConfigFavorite(self, serial: str, configId: str, favorite: bool, **kwargs): + """ + **Favorite or unfavorite a configuration for an IOS-XE device** + https://developer.cisco.com/meraki/api-v1/#!update-device-cli-config-favorite + + - serial (string): Serial + - configId (string): Config ID + - favorite (boolean): Whether the config should be favorited + """ + + kwargs = locals() + + metadata = { + "tags": ["devices", "configure", "cli", "configs"], + "operation": "updateDeviceCliConfigFavorite", + } + serial = urllib.parse.quote(str(serial), safe="") + configId = urllib.parse.quote(str(configId), safe="") + resource = f"/devices/{serial}/cli/configs/{configId}" + + body_params = [ + "favorite", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateDeviceCliConfigFavorite: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def createDeviceConfigRestore(self, serial: str, configId: str, **kwargs): + """ + **Create a restore request for a specific config history record** + https://developer.cisco.com/meraki/api-v1/#!create-device-config-restore + + - serial (string): Serial + - configId (string): Config ID + - scheduledFor (string): Requested ISO 8601 UTC timestamp for when the restore should be scheduled + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["devices", "configure", "cli", "configs"], + "operation": "createDeviceConfigRestore", + } + serial = urllib.parse.quote(str(serial), safe="") + configId = urllib.parse.quote(str(configId), safe="") + resource = f"/devices/{serial}/cli/configs/{configId}/restores" + + body_params = [ + "scheduledFor", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceConfigRestore: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + def getDeviceClients(self, serial: str, **kwargs): """ **List the clients of a device, up to a maximum of a month ago** @@ -265,6 +331,56 @@ def getDeviceClients(self, serial: str, **kwargs): return self._session.get(metadata, resource, params) + def createDeviceLiveToolsAclHitCount(self, serial: str, **kwargs): + """ + **Enqueue a job to perform an ACL hit count for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-acl-hit-count + + - 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", "aclHitCount"], + "operation": "createDeviceLiveToolsAclHitCount", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/aclHitCount" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsAclHitCount: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsAclHitCount(self, serial: str, id: str): + """ + **Return an ACL hit count live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-acl-hit-count + + - serial (string): Serial + - id (string): ID + """ + + metadata = { + "tags": ["devices", "liveTools", "aclHitCount"], + "operation": "getDeviceLiveToolsAclHitCount", + } + serial = urllib.parse.quote(str(serial), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/aclHitCount/{id}" + + return self._session.get(metadata, resource) + def createDeviceLiveToolsArpTable(self, serial: str, **kwargs): """ **Enqueue a job to perform a ARP table request for the device** @@ -367,6 +483,75 @@ def getDeviceLiveToolsCableTest(self, serial: str, id: str): return self._session.get(metadata, resource) + def getDeviceLiveToolsClientsDisconnect(self, serial: str, id: str): + """ + **Return a client disconnect job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-clients-disconnect + + - serial (string): Serial + - id (string): ID + """ + + metadata = { + "tags": ["devices", "liveTools", "clients", "disconnect"], + "operation": "getDeviceLiveToolsClientsDisconnect", + } + serial = urllib.parse.quote(str(serial), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/clients/disconnect/{id}" + + return self._session.get(metadata, resource) + + def createDeviceLiveToolsDhcpLease(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a DHCP leases request for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-dhcp-lease + + - 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", "dhcpLeases"], + "operation": "createDeviceLiveToolsDhcpLease", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/dhcpLeases" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsDhcpLease: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsDhcpLease(self, serial: str, dhcpLeasesId: str): + """ + **Return a DHCP leases live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-dhcp-lease + + - serial (string): Serial + - dhcpLeasesId (string): Dhcp leases ID + """ + + metadata = { + "tags": ["devices", "liveTools", "dhcpLeases"], + "operation": "getDeviceLiveToolsDhcpLease", + } + serial = urllib.parse.quote(str(serial), safe="") + dhcpLeasesId = urllib.parse.quote(str(dhcpLeasesId), safe="") + resource = f"/devices/{serial}/liveTools/dhcpLeases/{dhcpLeasesId}" + + return self._session.get(metadata, resource) + def createDeviceLiveToolsLedsBlink(self, serial: str, duration: int, **kwargs): """ **Enqueue a job to blink LEDs on a device** @@ -521,6 +706,56 @@ def getDeviceLiveToolsMulticastRouting(self, serial: str, multicastRoutingId: st return self._session.get(metadata, resource) + def createDeviceLiveToolsOspfNeighbor(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a OSPF neighbors request for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-ospf-neighbor + + - 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", "ospfNeighbors"], + "operation": "createDeviceLiveToolsOspfNeighbor", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/ospfNeighbors" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsOspfNeighbor: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsOspfNeighbor(self, serial: str, ospfNeighborsId: str): + """ + **Return an OSPF neighbors live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-ospf-neighbor + + - serial (string): Serial + - ospfNeighborsId (string): Ospf neighbors ID + """ + + metadata = { + "tags": ["devices", "liveTools", "ospfNeighbors"], + "operation": "getDeviceLiveToolsOspfNeighbor", + } + serial = urllib.parse.quote(str(serial), safe="") + ospfNeighborsId = urllib.parse.quote(str(ospfNeighborsId), safe="") + resource = f"/devices/{serial}/liveTools/ospfNeighbors/{ospfNeighborsId}" + + 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** @@ -627,6 +862,56 @@ def getDeviceLiveToolsPingDevice(self, serial: str, id: str): return self._session.get(metadata, resource) + def createDeviceLiveToolsPortStatus(self, serial: str, **kwargs): + """ + **Enqueue a job to retrieve port status for a device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-port-status + + - 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", "portStatus"], + "operation": "createDeviceLiveToolsPortStatus", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/portStatus" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsPortStatus: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsPortStatus(self, serial: str, portStatusId: str): + """ + **Return a port status live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-port-status + + - serial (string): Serial + - portStatusId (string): Port status ID + """ + + metadata = { + "tags": ["devices", "liveTools", "portStatus"], + "operation": "getDeviceLiveToolsPortStatus", + } + serial = urllib.parse.quote(str(serial), safe="") + portStatusId = urllib.parse.quote(str(portStatusId), safe="") + resource = f"/devices/{serial}/liveTools/portStatus/{portStatusId}" + + return self._session.get(metadata, resource) + def createDeviceLiveToolsPortsCycle(self, serial: str, ports: list, **kwargs): """ **Enqueue a job to perform a cycle port for the device on the specified ports** @@ -679,6 +964,294 @@ def getDeviceLiveToolsPortsCycle(self, serial: str, id: str): return self._session.get(metadata, resource) + def createDeviceLiveToolsReboot(self, serial: str, **kwargs): + """ + **Enqueue a job to reboot a device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-reboot + + - 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", "reboot"], + "operation": "createDeviceLiveToolsReboot", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/reboot" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsReboot: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsReboot(self, serial: str, rebootId: str): + """ + **Return a reboot job** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-reboot + + - serial (string): Serial + - rebootId (string): Reboot ID + """ + + metadata = { + "tags": ["devices", "liveTools", "reboot"], + "operation": "getDeviceLiveToolsReboot", + } + serial = urllib.parse.quote(str(serial), safe="") + rebootId = urllib.parse.quote(str(rebootId), safe="") + resource = f"/devices/{serial}/liveTools/reboot/{rebootId}" + + return self._session.get(metadata, resource) + + def createDeviceLiveToolsRoutingTable(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a routing table request for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-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", "routingTable"], + "operation": "createDeviceLiveToolsRoutingTable", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/routingTable" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsRoutingTable: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a routing table lookup request for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table-lookup + + - serial (string): Serial + - type (string): The type of route defined + - destination (object): The destination IP or subnet to lookup + - nextHop (object): The next hop to lookup + - vpn (object): VPN related search criteria + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = [ + "BGP", + "EIGRP", + "HSRP", + "IGRP", + "ISIS", + "LISP", + "NAT", + "ND", + "NHRP", + "OMP", + "OSPF", + "RIP", + "default WAN", + "direct", + "static", + ] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["devices", "liveTools", "routingTable", "lookups"], + "operation": "createDeviceLiveToolsRoutingTableLookup", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/routingTable/lookups" + + body_params = [ + "type", + "destination", + "nextHop", + "vpn", + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createDeviceLiveToolsRoutingTableLookup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsRoutingTableLookup(self, serial: str, id: str): + """ + **Return a routing table live tool lookup job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-routing-table-lookup + + - serial (string): Serial + - id (string): ID + """ + + metadata = { + "tags": ["devices", "liveTools", "routingTable", "lookups"], + "operation": "getDeviceLiveToolsRoutingTableLookup", + } + serial = urllib.parse.quote(str(serial), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/routingTable/lookups/{id}" + + return self._session.get(metadata, resource) + + def createDeviceLiveToolsRoutingTableSummary(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a routing table summary request for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table-summary + + - 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", "routingTable", "summaries"], + "operation": "createDeviceLiveToolsRoutingTableSummary", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/routingTable/summaries" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createDeviceLiveToolsRoutingTableSummary: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsRoutingTableSummary(self, serial: str, id: str): + """ + **Return a routing table live tool summary job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-routing-table-summary + + - serial (string): Serial + - id (string): ID + """ + + metadata = { + "tags": ["devices", "liveTools", "routingTable", "summaries"], + "operation": "getDeviceLiveToolsRoutingTableSummary", + } + serial = urllib.parse.quote(str(serial), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/routingTable/summaries/{id}" + + return self._session.get(metadata, resource) + + def getDeviceLiveToolsRoutingTable(self, serial: str, id: str): + """ + **Return an routing table live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-routing-table + + - serial (string): Serial + - id (string): ID + """ + + metadata = { + "tags": ["devices", "liveTools", "routingTable"], + "operation": "getDeviceLiveToolsRoutingTable", + } + serial = urllib.parse.quote(str(serial), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/routingTable/{id}" + + return self._session.get(metadata, resource) + + def createDeviceLiveToolsSpeedTest(self, serial: str, **kwargs): + """ + **Enqueue a job to execute a speed test from a device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-speed-test + + - serial (string): Serial + - interface (string): Optional filter for a specific WAN interface. Valid interfaces are wan1, wan2, wan3, wan4. Default will return wan1. + """ + + kwargs.update(locals()) + + if "interface" in kwargs: + options = ["wan1", "wan2", "wan3", "wan4"] + assert kwargs["interface"] in options, ( + f'''"interface" cannot be "{kwargs["interface"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["devices", "liveTools", "speedTest"], + "operation": "createDeviceLiveToolsSpeedTest", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/speedTest" + + body_params = [ + "interface", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsSpeedTest: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsSpeedTest(self, serial: str, id: str): + """ + **Returns a speed test result in megabits per second** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-speed-test + + - serial (string): Serial + - id (string): ID + """ + + metadata = { + "tags": ["devices", "liveTools", "speedTest"], + "operation": "getDeviceLiveToolsSpeedTest", + } + serial = urllib.parse.quote(str(serial), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/speedTest/{id}" + + return self._session.get(metadata, resource) + def createDeviceLiveToolsThroughputTest(self, serial: str, **kwargs): """ **Enqueue a job to test a device throughput, the test will run for 10 secs to test throughput** @@ -729,6 +1302,110 @@ def getDeviceLiveToolsThroughputTest(self, serial: str, throughputTestId: str): return self._session.get(metadata, resource) + def createDeviceLiveToolsTraceRoute(self, serial: str, target: str, sourceInterface: str, **kwargs): + """ + **Enqueue a job to run trace route in the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-trace-route + + - serial (string): Serial + - target (string): Destination Host name or address + - sourceInterface (string): Source Interface IP address + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["devices", "liveTools", "traceRoute"], + "operation": "createDeviceLiveToolsTraceRoute", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/traceRoute" + + body_params = [ + "target", + "sourceInterface", + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsTraceRoute: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsTraceRoute(self, serial: str, traceRouteId: str): + """ + **Return a trace route job** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-trace-route + + - serial (string): Serial + - traceRouteId (string): Trace route ID + """ + + metadata = { + "tags": ["devices", "liveTools", "traceRoute"], + "operation": "getDeviceLiveToolsTraceRoute", + } + serial = urllib.parse.quote(str(serial), safe="") + traceRouteId = urllib.parse.quote(str(traceRouteId), safe="") + resource = f"/devices/{serial}/liveTools/traceRoute/{traceRouteId}" + + return self._session.get(metadata, resource) + + def createDeviceLiveToolsVrrpTable(self, serial: str, **kwargs): + """ + **Enqueue a job to perform a VRRP table request for the device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-vrrp-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", "vrrpTable"], + "operation": "createDeviceLiveToolsVrrpTable", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/vrrpTable" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsVrrpTable: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsVrrpTable(self, serial: str, vrrpTableId: str): + """ + **Return an VRRP table live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-vrrp-table + + - serial (string): Serial + - vrrpTableId (string): Vrrp table ID + """ + + metadata = { + "tags": ["devices", "liveTools", "vrrpTable"], + "operation": "getDeviceLiveToolsVrrpTable", + } + serial = urllib.parse.quote(str(serial), safe="") + vrrpTableId = urllib.parse.quote(str(vrrpTableId), safe="") + resource = f"/devices/{serial}/liveTools/vrrpTable/{vrrpTableId}" + + 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** diff --git a/meraki/api/insight.py b/meraki/api/insight.py index 79b02839..08b7cb4b 100644 --- a/meraki/api/insight.py +++ b/meraki/api/insight.py @@ -64,6 +64,95 @@ def getOrganizationInsightApplications(self, organizationId: str): return self._session.get(metadata, resource) + def createOrganizationInsightApplication(self, organizationId: str, counterSetRuleId: int, **kwargs): + """ + **Add an Insight tracked application** + https://developer.cisco.com/meraki/api-v1/#!create-organization-insight-application + + - organizationId (string): Organization ID + - counterSetRuleId (integer): The id of the counter set rule + - enableSmartThresholds (boolean): Enable Smart Thresholds + - thresholds (object): Thresholds defined by a user for each application + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["insight", "configure", "applications"], + "operation": "createOrganizationInsightApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/insight/applications" + + body_params = [ + "counterSetRuleId", + "enableSmartThresholds", + "thresholds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationInsightApplication: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateOrganizationInsightApplication(self, organizationId: str, applicationId: str, **kwargs): + """ + **Update an Insight tracked application** + https://developer.cisco.com/meraki/api-v1/#!update-organization-insight-application + + - organizationId (string): Organization ID + - applicationId (string): Application ID + - enableSmartThresholds (boolean): Enable Smart Thresholds + - thresholds (object): Thresholds defined by a user for each application + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["insight", "configure", "applications"], + "operation": "updateOrganizationInsightApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + applicationId = urllib.parse.quote(str(applicationId), safe="") + resource = f"/organizations/{organizationId}/insight/applications/{applicationId}" + + body_params = [ + "enableSmartThresholds", + "thresholds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationInsightApplication: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationInsightApplication(self, organizationId: str, applicationId: str): + """ + **Delete an Insight tracked application** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-insight-application + + - organizationId (string): Organization ID + - applicationId (string): Application ID + """ + + metadata = { + "tags": ["insight", "configure", "applications"], + "operation": "deleteOrganizationInsightApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + applicationId = urllib.parse.quote(str(applicationId), safe="") + resource = f"/organizations/{organizationId}/insight/applications/{applicationId}" + + return self._session.delete(metadata, resource) + def getOrganizationInsightMonitoredMediaServers(self, organizationId: str): """ **List the monitored media servers for this organization** @@ -194,3 +283,154 @@ def deleteOrganizationInsightMonitoredMediaServer(self, organizationId: str, mon resource = f"/organizations/{organizationId}/insight/monitoredMediaServers/{monitoredMediaServerId}" return self._session.delete(metadata, resource) + + def getOrganizationInsightSpeedTestResults(self, organizationId: str, serials: list, **kwargs): + """ + **List the speed tests for the given devices under this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-insight-speed-test-results + + - organizationId (string): Organization ID + - serials (array): A list of serial numbers. The returned results will be filtered to only include these serials. + - timespan (integer): Amount of seconds ago to query for results. Only include timespan OR both t0 & t1. + - t0 (integer): Start time to query for results in epoch seconds. Only include timespan OR both t0 & t1. + - t1 (integer): End time to query for results in epoch seconds. Only include timespan OR both t0 & t1. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["insight", "configure", "speedTestResults"], + "operation": "getOrganizationInsightSpeedTestResults", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/insight/speedTestResults" + + query_params = [ + "serials", + "timespan", + "t0", + "t1", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationInsightSpeedTestResults: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationInsightWebApps(self, organizationId: str): + """ + **Lists all default web applications rules with counter set rule ids** + https://developer.cisco.com/meraki/api-v1/#!get-organization-insight-web-apps + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["insight", "configure", "webApps"], + "operation": "getOrganizationInsightWebApps", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/insight/webApps" + + return self._session.get(metadata, resource) + + def createOrganizationInsightWebApp(self, organizationId: str, name: str, hostname: str, **kwargs): + """ + **Add a custom web application for Insight to be able to track** + https://developer.cisco.com/meraki/api-v1/#!create-organization-insight-web-app + + - organizationId (string): Organization ID + - name (string): The name of the Web Application + - hostname (string): The hostname of Web Application + """ + + kwargs = locals() + + metadata = { + "tags": ["insight", "configure", "webApps"], + "operation": "createOrganizationInsightWebApp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/insight/webApps" + + body_params = [ + "name", + "hostname", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationInsightWebApp: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateOrganizationInsightWebApp(self, organizationId: str, customCounterSetRuleId: str, **kwargs): + """ + **Update a custom web application for Insight to be able to track** + https://developer.cisco.com/meraki/api-v1/#!update-organization-insight-web-app + + - organizationId (string): Organization ID + - customCounterSetRuleId (string): Custom counter set rule ID + - name (string): The name of the Web Application + - hostname (string): The hostname of Web Application + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["insight", "configure", "webApps"], + "operation": "updateOrganizationInsightWebApp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + customCounterSetRuleId = urllib.parse.quote(str(customCounterSetRuleId), safe="") + resource = f"/organizations/{organizationId}/insight/webApps/{customCounterSetRuleId}" + + body_params = [ + "name", + "hostname", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationInsightWebApp: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationInsightWebApp(self, organizationId: str, customCounterSetRuleId: str): + """ + **Delete a custom web application by counter set rule id.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-insight-web-app + + - organizationId (string): Organization ID + - customCounterSetRuleId (string): Custom counter set rule ID + """ + + metadata = { + "tags": ["insight", "configure", "webApps"], + "operation": "deleteOrganizationInsightWebApp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + customCounterSetRuleId = urllib.parse.quote(str(customCounterSetRuleId), safe="") + resource = f"/organizations/{organizationId}/insight/webApps/{customCounterSetRuleId}" + + return self._session.delete(metadata, resource) diff --git a/meraki/api/licensing.py b/meraki/api/licensing.py index df89824b..5911aa63 100644 --- a/meraki/api/licensing.py +++ b/meraki/api/licensing.py @@ -45,6 +45,39 @@ def getAdministeredLicensingSubscriptionEntitlements(self, **kwargs): return self._session.get(metadata, resource, params) + def batchAdministeredLicensingSubscriptionNetworksFeatureTiersUpdate(self, **kwargs): + """ + **Batch change networks to their desired feature tier for specified product types** + https://developer.cisco.com/meraki/api-v1/#!batch-administered-licensing-subscription-networks-feature-tiers-update + + - items (array): List of networks and corresponding product types to update. Maximum 500 networks + - isAtomic (boolean): Flag to determine if the operation should act atomically + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["licensing", "configure", "subscription", "featureTiers"], + "operation": "batchAdministeredLicensingSubscriptionNetworksFeatureTiersUpdate", + } + resource = "/administered/licensing/subscription/networks/featureTiers/batchUpdate" + + body_params = [ + "items", + "isAtomic", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"batchAdministeredLicensingSubscriptionNetworksFeatureTiersUpdate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def getAdministeredLicensingSubscriptionSubscriptions( self, organizationIds: list, total_pages=1, direction="next", **kwargs ): diff --git a/meraki/api/nac.py b/meraki/api/nac.py new file mode 100644 index 00000000..067cc48e --- /dev/null +++ b/meraki/api/nac.py @@ -0,0 +1,1151 @@ +import urllib + + +class Nac(object): + def __init__(self, session): + super(Nac, self).__init__() + self._session = session + + def getOrganizationNacAuthorizationPolicies(self, organizationId: str, **kwargs): + """ + **Get all nac authorization policies for this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-authorization-policies + + - organizationId (string): Organization ID + - policyIds (array): List of ids for specific authorization policies retrieval + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "authorization", "policies"], + "operation": "getOrganizationNacAuthorizationPolicies", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/authorization/policies" + + query_params = [ + "policyIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationNacAuthorizationPolicies: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def createOrganizationNacAuthorizationPolicyRule( + self, organizationId: str, policyId: str, name: str, rank: int, authorizationProfile: dict, **kwargs + ): + """ + **Create a rule in an authorization policy set of an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-authorization-policy-rule + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - name (string): Name of Authorization rule + - rank (integer): Rank of Authorization rule + - authorizationProfile (object): Authorization profile associated with the rule + - enabled (boolean): Enabled status of authorization rule. Default is False. + - sourcePolicyVersion (string): Source policy version of the policy set containing this rule + - condition (object): Condition of Authorization rule. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "authorization", "policies", "rules"], + "operation": "createOrganizationNacAuthorizationPolicyRule", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + resource = f"/organizations/{organizationId}/nac/authorization/policies/{policyId}/rules" + + body_params = [ + "name", + "rank", + "enabled", + "sourcePolicyVersion", + "authorizationProfile", + "condition", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationNacAuthorizationPolicyRule: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationNacAuthorizationPolicyRule( + self, organizationId: str, policyId: str, ruleId: str, name: str, rank: int, authorizationProfile: dict, **kwargs + ): + """ + **Update an existing rule of an authorization policy set within an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-nac-authorization-policy-rule + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleId (string): Rule ID + - name (string): Name of Authorization rule + - rank (integer): Rank of Authorization rule + - authorizationProfile (object): Authorization profile associated with the rule + - enabled (boolean): Enabled status of authorization rule. Default is False. + - sourcePolicyVersion (string): Source policy version of the policy set containing this rule + - condition (object): Condition of Authorization rule. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "authorization", "policies", "rules"], + "operation": "updateOrganizationNacAuthorizationPolicyRule", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + ruleId = urllib.parse.quote(str(ruleId), safe="") + resource = f"/organizations/{organizationId}/nac/authorization/policies/{policyId}/rules/{ruleId}" + + body_params = [ + "name", + "rank", + "enabled", + "sourcePolicyVersion", + "authorizationProfile", + "condition", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationNacAuthorizationPolicyRule: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationNacAuthorizationPolicyRule(self, organizationId: str, policyId: str, ruleId: str, **kwargs): + """ + **Delete a rule in an authorization policy set of an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-nac-authorization-policy-rule + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleId (string): Rule ID + - sourcePolicyVersion (string): Source policy version of the policy set containing this rule + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "authorization", "policies", "rules"], + "operation": "deleteOrganizationNacAuthorizationPolicyRule", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + ruleId = urllib.parse.quote(str(ruleId), safe="") + resource = f"/organizations/{organizationId}/nac/authorization/policies/{policyId}/rules/{ruleId}" + + return self._session.delete(metadata, resource) + + def getOrganizationNacCertificates(self, organizationId: str, **kwargs): + """ + **Gets all certificates for an organization and can filter by certificate status, expiry date and last used date** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-certificates + + - organizationId (string): Organization ID + - status (string): Status Parameter for GetAll request + - expiry (boolean): Boolean indicating whether to filter by expiry in one month + - lastUsed (boolean): Boolean indicating whether to filter by last used in over one month + """ + + kwargs.update(locals()) + + if "status" in kwargs: + options = ["Disabled", "Enabled"] + assert kwargs["status"] in options, ( + f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["nac", "configure", "certificates"], + "operation": "getOrganizationNacCertificates", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates" + + query_params = [ + "status", + "expiry", + "lastUsed", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationNacCertificates: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def getOrganizationNacCertificatesAuthoritiesCrls(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get all the organization's CRL.It's possible to filter results by CRL issuers (CA) or CRL's ID - see caIds and crlIds query parameters.This endpoint could be used for 'show' action when you specify a single CRL ID in crlIds parameter** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-certificates-authorities-crls + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 5. + - 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. + - sortBy (string): Optional parameter to specify the field used to sort results. (default: caId) + - sortOrder (string): Optional parameter to specify the sort order. (default: asc) + - crlIds (array): A list of CRL ids. The returned CRLs will be filtered to only include these ids + - caIds (array): When ca Ids are provided, only CRLs associated to the given CA will be returned. Otherwise, all the CRLs created for an organization will be returned. + """ + + kwargs.update(locals()) + + if "sortBy" in kwargs: + options = ["caId", "createdAt", "lastUpdatedAt"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["nac", "configure", "certificates", "authorities", "crls"], + "operation": "getOrganizationNacCertificatesAuthoritiesCrls", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates/authorities/crls" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "sortBy", + "sortOrder", + "crlIds", + "caIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "crlIds", + "caIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationNacCertificatesAuthoritiesCrls: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationNacCertificatesAuthoritiesCrl( + self, organizationId: str, caId: str, content: str, isDelta: bool, **kwargs + ): + """ + **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} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationNacCertificatesAuthoritiesCrl: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationNacCertificatesAuthoritiesCrlsDescriptors( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get all the organization's CRL descriptors (metadata only - revocation list data is excluded)** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-certificates-authorities-crls-descriptors + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 20. + - 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. + - sortBy (string): Optional parameter to specify the field used to sort results. (default: caId) + - sortOrder (string): Optional parameter to specify the sort order. (default: asc) + - caIds (array): When ca Ids are provided, only CRLs associated to the given CA will be returned. Otherwise, all the CRLs created for an organization will be returned. + """ + + kwargs.update(locals()) + + if "sortBy" in kwargs: + options = ["caId", "createdAt", "lastUpdatedAt"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["nac", "configure", "certificates", "authorities", "crls", "descriptors"], + "operation": "getOrganizationNacCertificatesAuthoritiesCrlsDescriptors", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates/authorities/crls/descriptors" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "sortBy", + "sortOrder", + "caIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "caIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationNacCertificatesAuthoritiesCrlsDescriptors: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationNacCertificatesAuthoritiesCrl(self, organizationId: str, crlId: str): + """ + **Deletes a whole CRL, including all its deltas (in case of base CRL removal)** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-nac-certificates-authorities-crl + + - organizationId (string): Organization ID + - crlId (string): Crl ID + """ + + metadata = { + "tags": ["nac", "configure", "certificates", "authorities", "crls"], + "operation": "deleteOrganizationNacCertificatesAuthoritiesCrl", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + crlId = urllib.parse.quote(str(crlId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates/authorities/crls/{crlId}" + + return self._session.delete(metadata, resource) + + def createOrganizationNacCertificatesImport(self, organizationId: str, contents: str, **kwargs): + """ + **Import certificate for this organization or validate without persisting** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-certificates-import + + - organizationId (string): Organization ID + - contents (string): Certificate content in valid PEM format + - dryRun (boolean): If true, validates the certificate without persisting it + - profile (object): Profile object containing certificate config fields + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "certificates", "import"], + "operation": "createOrganizationNacCertificatesImport", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates/import" + + body_params = [ + "contents", + "dryRun", + "profile", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationNacCertificatesImport: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationNacCertificatesOverview(self, organizationId: str): + """ + **Get counts of Enabled, Disabled, Expired and Last Used certificates for this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-certificates-overview + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["nac", "configure", "certificates", "overview"], + "operation": "getOrganizationNacCertificatesOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates/overview" + + return self._session.get(metadata, resource) + + def updateOrganizationNacCertificate(self, organizationId: str, certificateId: str, profile: dict, **kwargs): + """ + **Update certificate configuration by certificateId for this organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-nac-certificate + + - organizationId (string): Organization ID + - certificateId (string): Certificate ID + - profile (object): Profile object containing certificate config fields + """ + + kwargs = locals() + + metadata = { + "tags": ["nac", "configure", "certificates"], + "operation": "updateOrganizationNacCertificate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + certificateId = urllib.parse.quote(str(certificateId), safe="") + resource = f"/organizations/{organizationId}/nac/certificates/{certificateId}" + + body_params = [ + "profile", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationNacCertificate: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getOrganizationNacClients(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get all known clients for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-clients + + - 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 + - sortOrder (string): Query parameter for specifying the direction of sorting to use for the given sortKey. + - sortKey (string): Query parameter to sort the clients by the value of the specified key. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - search (string): Optional parameter to fuzzy search on clients. + - clientIds (array): List of ids for specific client retrieval + - groupIds (array): List of group ids for client retrieval by group + - lastNetworkName (array): List of network names for client retrieval by last login network name + - ssid (array): List of SSID's to filter + - classification (object): Classification filters for client retrieval + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ASC", "DESC"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + if "sortKey" in kwargs: + options = ["mac"] + assert kwargs["sortKey"] in options, ( + f'''"sortKey" cannot be "{kwargs["sortKey"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["nac", "configure", "clients"], + "operation": "getOrganizationNacClients", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients" + + query_params = [ + "sortOrder", + "sortKey", + "perPage", + "startingAfter", + "endingBefore", + "search", + "clientIds", + "groupIds", + "lastNetworkName", + "ssid", + "classification", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "clientIds", + "groupIds", + "lastNetworkName", + "ssid", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationNacClients: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationNacClient(self, organizationId: str, mac: str, **kwargs): + """ + **Create a client for the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-client + + - organizationId (string): Organization ID + - mac (string): The MAC address of the client + - type (string): Type describes if the network client belongs to an individual user or corporate + - owner (string): The username of the owner of the client + - description (string): User provided description for the client + - uuid (string): Universally unique identifier of the client + - userDetails (array): List of users of this network client + - oui (object): Organizationally unique identifier assigned to a vendor of the client + - groups (array): List of group members associated with the client + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = ["BYOD", "corporate"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["nac", "configure", "clients"], + "operation": "createOrganizationNacClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients" + + body_params = [ + "type", + "owner", + "mac", + "description", + "uuid", + "userDetails", + "oui", + "groups", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationNacClient: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def bulkOrganizationNacClientsDelete(self, organizationId: str, clientIds: list, **kwargs): + """ + **Delete existing client(s) for the organization** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-nac-clients-delete + + - organizationId (string): Organization ID + - clientIds (array): List of ids for specific client retrieval + """ + + kwargs = locals() + + metadata = { + "tags": ["nac", "configure", "clients"], + "operation": "bulkOrganizationNacClientsDelete", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/bulkDelete" + + body_params = [ + "clientIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"bulkOrganizationNacClientsDelete: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def createOrganizationNacClientsBulkEdit(self, organizationId: str, clientIds: list, **kwargs): + """ + **Bulk Update of existing clients for the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-clients-bulk-edit + + - organizationId (string): Organization ID + - clientIds (array): List of clients ids to apply the bulk edit operation on. + - description (string): User provided description to be applied on the list of clients provided + - groups (object): Client group information to be applied on the list of clients provided + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "clients", "bulkEdit"], + "operation": "createOrganizationNacClientsBulkEdit", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/bulkEdit" + + body_params = [ + "clientIds", + "description", + "groups", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationNacClientsBulkEdit: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def createOrganizationNacClientsBulkUpload( + self, organizationId: str, contents: str, updateClients: bool, createClientGroups: bool, **kwargs + ): + """ + **Bulk upload of clients, client groups and their associations for the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-clients-bulk-upload + + - organizationId (string): Organization ID + - contents (string): CSV file content in Base64 encoded string format + - updateClients (boolean): The updateClients indicates whether existing clients must be updated with new data from the CSV + - createClientGroups (boolean): The createClientGroups indicates whether new client groups must be created or not + """ + + kwargs = locals() + + metadata = { + "tags": ["nac", "configure", "clients", "bulkUpload"], + "operation": "createOrganizationNacClientsBulkUpload", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/bulkUpload" + + body_params = [ + "contents", + "updateClients", + "createClientGroups", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationNacClientsBulkUpload: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationNacClientsGroups(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get all known client groups for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-clients-groups + + - 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 + - sortOrder (string): Query parameter for specifying the direction of sorting to use for the given sortKey. + - sortKey (string): Query parameter to sort the client groups by the value of the specified key. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - search (string): Optional parameter to fuzzy search on client groups. + - groupIds (array): List of ids for specific group retrieval + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ASC", "DESC"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + if "sortKey" in kwargs: + options = ["name"] + assert kwargs["sortKey"] in options, ( + f'''"sortKey" cannot be "{kwargs["sortKey"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["nac", "configure", "clients", "groups"], + "operation": "getOrganizationNacClientsGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/groups" + + query_params = [ + "sortOrder", + "sortKey", + "perPage", + "startingAfter", + "endingBefore", + "search", + "groupIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "groupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationNacClientsGroups: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationNacClientsGroup(self, organizationId: str, name: str, **kwargs): + """ + **Create a client group for the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-nac-clients-group + + - organizationId (string): Organization ID + - name (string): The name of the group for access control model + - description (string): User provided description of the group + - members (array): List of client members associated with the group + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "clients", "groups"], + "operation": "createOrganizationNacClientsGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/groups" + + body_params = [ + "name", + "description", + "members", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationNacClientsGroup: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateOrganizationNacClientsGroup(self, organizationId: str, groupId: str, **kwargs): + """ + **Update an existing client group for the organization with bulk member operations** + https://developer.cisco.com/meraki/api-v1/#!update-organization-nac-clients-group + + - organizationId (string): Organization ID + - groupId (string): Group ID + - name (string): The name of the group for access control model + - description (string): User provided description of the group + - members (object): Bulk member operations with addList/removeList arrays + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "clients", "groups"], + "operation": "updateOrganizationNacClientsGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/groups/{groupId}" + + body_params = [ + "name", + "description", + "members", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationNacClientsGroup: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationNacClientsGroup(self, organizationId: str, groupId: str): + """ + **Delete an existing client group for the organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-nac-clients-group + + - organizationId (string): Organization ID + - groupId (string): Group ID + """ + + metadata = { + "tags": ["nac", "configure", "clients", "groups"], + "operation": "deleteOrganizationNacClientsGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/groups/{groupId}" + + return self._session.delete(metadata, resource) + + def getOrganizationNacClientsOverview(self, organizationId: str): + """ + **Get overview data for all known clients for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-clients-overview + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["nac", "configure", "clients", "overview"], + "operation": "getOrganizationNacClientsOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/overview" + + return self._session.get(metadata, resource) + + def updateOrganizationNacClient(self, organizationId: str, clientId: str, mac: str, **kwargs): + """ + **Update an existing client for the organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-nac-client + + - organizationId (string): Organization ID + - clientId (string): Client ID + - mac (string): The MAC address of the client + - type (string): Type describes if the network client belongs to an individual user or corporate + - owner (string): The username of the owner of the client + - description (string): User provided description for the client + - uuid (string): Universally unique identifier of the client + - userDetails (array): List of users of this network client + - oui (object): Organizationally unique identifier assigned to a vendor of the client + - groups (object): Client group membership changes + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = ["BYOD", "corporate"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["nac", "configure", "clients"], + "operation": "updateOrganizationNacClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + clientId = urllib.parse.quote(str(clientId), safe="") + resource = f"/organizations/{organizationId}/nac/clients/{clientId}" + + body_params = [ + "type", + "owner", + "mac", + "description", + "uuid", + "userDetails", + "oui", + "groups", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationNacClient: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getOrganizationNacDictionaries(self, organizationId: str): + """ + **Get all NAC dictionaries** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-dictionaries + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["nac", "configure", "dictionaries"], + "operation": "getOrganizationNacDictionaries", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/dictionaries" + + return self._session.get(metadata, resource) + + def getOrganizationNacDictionaryAttributes(self, organizationId: str, dictionaryId: str, **kwargs): + """ + **Get all attributes by dictionary ID** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-dictionary-attributes + + - organizationId (string): Organization ID + - dictionaryId (string): Dictionary ID + - networkIds (array): An optional list of network IDs to filter the 'enum' field. Only enum values applicable to the specified networks will be returned. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "dictionaries", "attributes"], + "operation": "getOrganizationNacDictionaryAttributes", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + dictionaryId = urllib.parse.quote(str(dictionaryId), safe="") + resource = f"/organizations/{organizationId}/nac/dictionaries/{dictionaryId}/attributes" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationNacDictionaryAttributes: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationNacDictionaryAttributeValues( + self, organizationId: str, dictionaryId: str, attributeName: str, **kwargs + ): + """ + **Search allowed values for a dictionary attribute** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-dictionary-attribute-values + + - organizationId (string): Organization ID + - dictionaryId (string): Dictionary ID + - attributeName (string): Attribute name + - search (string): Optional search string for contains-match filtering of allowed values + - networkIds (array): An optional list of network IDs to filter the allowed values. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "dictionaries", "attributes", "values"], + "operation": "getOrganizationNacDictionaryAttributeValues", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + dictionaryId = urllib.parse.quote(str(dictionaryId), safe="") + attributeName = urllib.parse.quote(str(attributeName), safe="") + resource = f"/organizations/{organizationId}/nac/dictionaries/{dictionaryId}/attributes/{attributeName}/values" + + query_params = [ + "search", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationNacDictionaryAttributeValues: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationNacLicenseUsage(self, organizationId: str, startDate: str, **kwargs): + """ + **Returns license usage data for a specific organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-license-usage + + - organizationId (string): Organization ID + - startDate (string): Start date for the usage data in UTC timezone + - endDate (string): End date for the usage data in UTC timezone + - networkIds (array): List of locale and node group ids + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["nac", "configure", "license", "usage"], + "operation": "getOrganizationNacLicenseUsage", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/license/usage" + + query_params = [ + "startDate", + "endDate", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationNacLicenseUsage: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def getOrganizationNacSessionsHistory(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the NAC Sessions for this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-sessions-history + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 hour. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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": ["nac", "configure", "sessions", "history"], + "operation": "getOrganizationNacSessionsHistory", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/nac/sessions/history" + + query_params = [ + "t0", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationNacSessionsHistory: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationNacSessionDetails(self, organizationId: str, sessionId: str): + """ + **Return the details of selected NAC Sessions** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-session-details + + - organizationId (string): Organization ID + - sessionId (string): Session ID + """ + + metadata = { + "tags": ["nac", "configure", "sessions", "details"], + "operation": "getOrganizationNacSessionDetails", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + sessionId = urllib.parse.quote(str(sessionId), safe="") + resource = f"/organizations/{organizationId}/nac/sessions/{sessionId}/details" + + return self._session.get(metadata, resource) diff --git a/meraki/api/networks.py b/meraki/api/networks.py index eb8ae8e4..9e7c4c4e 100644 --- a/meraki/api/networks.py +++ b/meraki/api/networks.py @@ -886,6 +886,37 @@ def removeNetworkDevices(self, networkId: str, serial: str, **kwargs): return self._session.post(metadata, resource, payload) + def updateNetworkDevicesSyslogServers(self, networkId: str, servers: list, **kwargs): + """ + **Updates the syslog servers configuration for a network.** + https://developer.cisco.com/meraki/api-v1/#!update-network-devices-syslog-servers + + - networkId (string): Network ID + - servers (array): A list of the syslog servers for this network; suggested maximum array size is 10 + """ + + kwargs = locals() + + metadata = { + "tags": ["networks", "configure", "devices", "syslog", "servers"], + "operation": "updateNetworkDevicesSyslogServers", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/devices/syslog/servers" + + body_params = [ + "servers", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkDevicesSyslogServers: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkEvents(self, networkId: str, total_pages=1, direction="prev", event_log_end_time=None, **kwargs): """ **List the events for the network** @@ -1455,6 +1486,7 @@ def createNetworkFloorPlan(self, networkId: str, name: str, imageContents: str, - topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan. - topRightCorner (object): The longitude and latitude of the top right corner of your floor plan. - floorNumber (number): The floor number of the floors within the building + - buildingId (string): The ID of the building that this floor belongs to. """ kwargs.update(locals()) @@ -1474,6 +1506,7 @@ def createNetworkFloorPlan(self, networkId: str, name: str, imageContents: str, "topLeftCorner", "topRightCorner", "floorNumber", + "buildingId", "imageContents", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1670,6 +1703,7 @@ def updateNetworkFloorPlan(self, networkId: str, floorPlanId: str, **kwargs): - topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan. - topRightCorner (object): The longitude and latitude of the top right corner of your floor plan. - floorNumber (number): The floor number of the floors within the building + - buildingId (string): The ID of the building that this floor belongs to. - 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. """ @@ -1691,6 +1725,7 @@ def updateNetworkFloorPlan(self, networkId: str, floorPlanId: str, **kwargs): "topLeftCorner", "topRightCorner", "floorNumber", + "buildingId", "imageContents", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1918,6 +1953,106 @@ def getNetworkHealthAlerts(self, networkId: str): return self._session.get(metadata, resource) + def getNetworkLocationScanning(self, networkId: str): + """ + **Return scanning API settings** + https://developer.cisco.com/meraki/api-v1/#!get-network-location-scanning + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["networks", "configure", "locationScanning"], + "operation": "getNetworkLocationScanning", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/locationScanning" + + return self._session.get(metadata, resource) + + def updateNetworkLocationScanning(self, networkId: str, **kwargs): + """ + **Change scanning API settings** + https://developer.cisco.com/meraki/api-v1/#!update-network-location-scanning + + - networkId (string): Network ID + - analyticsEnabled (boolean): Collect location and scanning analytics + - scanningApiEnabled (boolean): Enable push API for scanning events, analytics must be enabled + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["networks", "configure", "locationScanning"], + "operation": "updateNetworkLocationScanning", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/locationScanning" + + body_params = [ + "analyticsEnabled", + "scanningApiEnabled", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkLocationScanning: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getNetworkLocationScanningHttpServers(self, networkId: str): + """ + **Return list of scanning API receivers** + https://developer.cisco.com/meraki/api-v1/#!get-network-location-scanning-http-servers + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["networks", "configure", "locationScanning", "httpServers"], + "operation": "getNetworkLocationScanningHttpServers", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/locationScanning/httpServers" + + return self._session.get(metadata, resource) + + def updateNetworkLocationScanningHttpServers(self, networkId: str, endpoints: list, **kwargs): + """ + **Set the list of scanning API receivers** + https://developer.cisco.com/meraki/api-v1/#!update-network-location-scanning-http-servers + + - networkId (string): Network ID + - endpoints (array): A set of http server configurations + """ + + kwargs = locals() + + metadata = { + "tags": ["networks", "configure", "locationScanning", "httpServers"], + "operation": "updateNetworkLocationScanningHttpServers", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/locationScanning/httpServers" + + body_params = [ + "endpoints", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateNetworkLocationScanningHttpServers: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + def getNetworkMerakiAuthUsers(self, networkId: str): """ **List the authorized users configured under Meraki Authentication for a network (splash guest or RADIUS users for a wireless network, or client VPN users for a MX network)** @@ -2606,6 +2741,7 @@ def updateNetworkSettings(self, networkId: str, **kwargs): - remoteStatusPageEnabled (boolean): Enables / disables access to the device status page (http://[device's LAN IP]). Optional. Can only be set if localStatusPageEnabled is set to true - localStatusPage (object): A hash of Local Status page(s)' authentication options applied to the Network. - securePort (object): A hash of SecureConnect options applied to the Network. + - fips (object): A hash of FIPS options applied to the Network - namedVlans (object): A hash of Named VLANs options applied to the Network. """ @@ -2623,6 +2759,7 @@ def updateNetworkSettings(self, networkId: str, **kwargs): "remoteStatusPageEnabled", "localStatusPage", "securePort", + "fips", "namedVlans", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2635,6 +2772,93 @@ def updateNetworkSettings(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) + def createNetworkSitesBuilding(self, networkId: str, name: str, **kwargs): + """ + **Create a new building** + https://developer.cisco.com/meraki/api-v1/#!create-network-sites-building + + - networkId (string): Network ID + - name (string): The name of the building + - floors (array): The floors of the building + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["networks", "configure", "sites", "buildings"], + "operation": "createNetworkSitesBuilding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sites/buildings" + + body_params = [ + "name", + "floors", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkSitesBuilding: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def deleteNetworkSitesBuilding(self, networkId: str, buildingId: str): + """ + **Delete a building** + https://developer.cisco.com/meraki/api-v1/#!delete-network-sites-building + + - networkId (string): Network ID + - buildingId (string): Building ID + """ + + metadata = { + "tags": ["networks", "configure", "sites", "buildings"], + "operation": "deleteNetworkSitesBuilding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + buildingId = urllib.parse.quote(str(buildingId), safe="") + resource = f"/networks/{networkId}/sites/buildings/{buildingId}" + + return self._session.delete(metadata, resource) + + def updateNetworkSitesBuilding(self, networkId: str, buildingId: str, **kwargs): + """ + **Update a building** + https://developer.cisco.com/meraki/api-v1/#!update-network-sites-building + + - networkId (string): Network ID + - buildingId (string): Building ID + - name (string): The name of the building + - floors (array): The floors of the building + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["networks", "configure", "sites", "buildings"], + "operation": "updateNetworkSitesBuilding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + buildingId = urllib.parse.quote(str(buildingId), safe="") + resource = f"/networks/{networkId}/sites/buildings/{buildingId}" + + body_params = [ + "name", + "floors", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSitesBuilding: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkSnmp(self, networkId: str): """ **Return the SNMP settings for a network** @@ -2661,6 +2885,8 @@ def updateNetworkSnmp(self, networkId: str, **kwargs): - access (string): The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3). - communityString (string): The SNMP community string. Only relevant if 'access' is set to 'community'. - users (array): The list of SNMP users. Only relevant if 'access' is set to 'users'. + - authentication (object): SNMPv3 authentication settings. Only relevant if 'access' is set to 'users'. + - privacy (object): SNMPv3 privacy settings. Only relevant if 'access' is set to 'users'. """ kwargs.update(locals()) @@ -2682,6 +2908,8 @@ def updateNetworkSnmp(self, networkId: str, **kwargs): "access", "communityString", "users", + "authentication", + "privacy", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2693,6 +2921,47 @@ def updateNetworkSnmp(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) + def updateNetworkSnmpTraps(self, networkId: str, **kwargs): + """ + **Update the SNMP trap configuration for the specified network** + https://developer.cisco.com/meraki/api-v1/#!update-network-snmp-traps + + - networkId (string): Network ID + - mode (string): SNMP trap protocol version + - receiver (object): Stores the port and address + - v2 (object): V2 mode + - v3 (object): V3 mode + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["disabled", "v1/v2c", "v3"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["networks", "configure", "snmp", "traps"], + "operation": "updateNetworkSnmpTraps", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/snmp/traps" + + body_params = [ + "mode", + "receiver", + "v2", + "v3", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSnmpTraps: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkSplashLoginAttempts(self, networkId: str, **kwargs): """ **List the splash login attempts for a network** @@ -3005,9 +3274,10 @@ def createNetworkVlanProfile(self, networkId: str, name: str, vlanNames: list, v - vlanNames (array): An array of named VLANs - vlanGroups (array): An array of VLAN groups - iname (string): IName of the profile + - allowedVlans (string): The VLANs allowed on the VLAN profile. Only applicable to trunk ports. The given range must be inclusive of all named VLANs. """ - kwargs = locals() + kwargs.update(locals()) metadata = { "tags": ["networks", "configure", "vlanProfiles"], @@ -3018,6 +3288,7 @@ def createNetworkVlanProfile(self, networkId: str, name: str, vlanNames: list, v body_params = [ "name", + "allowedVlans", "vlanNames", "vlanGroups", "iname", @@ -3153,9 +3424,10 @@ def updateNetworkVlanProfile(self, networkId: str, iname: str, name: str, vlanNa - name (string): Name of the profile, string length must be from 1 to 255 characters - vlanNames (array): An array of named VLANs - vlanGroups (array): An array of VLAN groups + - allowedVlans (string): The VLANs allowed on the VLAN profile. Only applicable to trunk ports. The given range must be inclusive of all named VLANs. """ - kwargs = locals() + kwargs.update(locals()) metadata = { "tags": ["networks", "configure", "vlanProfiles"], @@ -3167,6 +3439,7 @@ def updateNetworkVlanProfile(self, networkId: str, iname: str, name: str, vlanNa body_params = [ "name", + "allowedVlans", "vlanNames", "vlanGroups", ] diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index ae425f85..61db38eb 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -1081,6 +1081,52 @@ def deleteOrganizationAlertsProfile(self, organizationId: str, alertConfigId: st return self._session.delete(metadata, resource) + def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwargs): + """ + **List pipeline IDs for the organization, with optional status and timespan filtering** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-rest-provisioning-pipelines + + - organizationId (string): Organization ID + - status (string): If provided, filters pipelines by status. If omitted, pipelines of all statuses are returned. + - timespan (string): Created-at lookback for matching pipelines. Defaults to -2hours. + """ + + kwargs.update(locals()) + + if "status" in kwargs: + options = ["active", "error", "pending", "success"] + assert kwargs["status"] in options, ( + f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' + ) + if "timespan" in kwargs: + options = ["-1days", "-2hours", "-30days", "-7days"] + assert kwargs["timespan"] in options, ( + f'''"timespan" cannot be "{kwargs["timespan"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "api", "rest", "provisioning", "pipelines"], + "operation": "getOrganizationApiRestProvisioningPipelines", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/api/rest/provisioning/pipelines" + + query_params = [ + "status", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApiRestProvisioningPipelines: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationApiRestProvisioningPipelinesJobs(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List pipeline jobs, with optional status filtering** @@ -1367,6 +1413,154 @@ def getOrganizationApiRequestsOverviewResponseCodesByInterval(self, organization return self._session.get(metadata, resource, params) + def getOrganizationApiRequestsResponseCodesHistoryByAdmin(self, organizationId: str, **kwargs): + """ + **Lists API request response codes and their counts aggregated by admin** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-requests-response-codes-history-by-admin + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "apiRequests", "responseCodes", "history", "byAdmin"], + "operation": "getOrganizationApiRequestsResponseCodesHistoryByAdmin", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/apiRequests/responseCodes/history/byAdmin" + + query_params = [ + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApiRequestsResponseCodesHistoryByAdmin: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApiRequestsResponseCodesHistoryByApplication(self, organizationId: str, **kwargs): + """ + **Lists API request response codes and their counts aggregated by application** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-requests-response-codes-history-by-application + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "apiRequests", "responseCodes", "history", "byApplication"], + "operation": "getOrganizationApiRequestsResponseCodesHistoryByApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/apiRequests/responseCodes/history/byApplication" + + query_params = [ + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApiRequestsResponseCodesHistoryByApplication: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApiRequestsResponseCodesHistoryByOperation(self, organizationId: str, **kwargs): + """ + **Aggregates API usage data by operationId** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-requests-response-codes-history-by-operation + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "apiRequests", "responseCodes", "history", "byOperation"], + "operation": "getOrganizationApiRequestsResponseCodesHistoryByOperation", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/apiRequests/responseCodes/history/byOperation" + + query_params = [ + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApiRequestsResponseCodesHistoryByOperation: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationApiRequestsResponseCodesHistoryBySourceIp(self, organizationId: str, **kwargs): + """ + **Aggregates API usage by source ip** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-requests-response-codes-history-by-source-ip + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "apiRequests", "responseCodes", "history", "bySourceIp"], + "operation": "getOrganizationApiRequestsResponseCodesHistoryBySourceIp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/apiRequests/responseCodes/history/bySourceIp" + + query_params = [ + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApiRequestsResponseCodesHistoryBySourceIp: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationAssuranceAlerts(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **Return all health alerts for an organization** @@ -1906,124 +2100,1335 @@ def getOrganizationAssuranceAlert(self, organizationId: str, id: str): return self._session.get(metadata, resource) - def getOrganizationBrandingPolicies(self, organizationId: str): + def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: str, networkId: str, **kwargs): """ - **List the branding policies of an organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-branding-policies + **Return combined wireless and wired connected client counts over time for a network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-clients-connected-count-history - organizationId (string): Organization ID - """ - - metadata = { - "tags": ["organizations", "configure", "brandingPolicies"], - "operation": "getOrganizationBrandingPolicies", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/brandingPolicies" - - return self._session.get(metadata, resource) - - def createOrganizationBrandingPolicy(self, organizationId: str, name: str, **kwargs): - """ - **Add a new branding policy to an organization** - https://developer.cisco.com/meraki/api-v1/#!create-organization-branding-policy - - - organizationId (string): Organization ID - - name (string): Name of the Dashboard branding policy. - - enabled (boolean): Boolean indicating whether this policy is enabled. - - adminSettings (object): Settings for describing which kinds of admins this policy applies to. - - helpSettings (object): Settings for describing the modifications to various Help page features. Each property in this object accepts one of - 'default or inherit' (do not modify functionality), 'hide' (remove the section from Dashboard), or 'show' (always show - the section on Dashboard). Some properties in this object also accept custom HTML used to replace the section on - Dashboard; see the documentation for each property to see the allowed values. - Each property defaults to 'default or inherit' when not provided. - - customLogo (object): Properties describing the custom logo attached to the branding policy. + - networkId (string): Network ID to query. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 8 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600. The default is 600. Interval is calculated if time params are provided. """ kwargs.update(locals()) metadata = { - "tags": ["organizations", "configure", "brandingPolicies"], - "operation": "createOrganizationBrandingPolicy", + "tags": ["organizations", "monitor", "clients", "connectedCountHistory"], + "operation": "getOrganizationAssuranceClientsConnectedCountHistory", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/brandingPolicies" + resource = f"/organizations/{organizationId}/assurance/clients/connectedCountHistory" - body_params = [ - "name", - "enabled", - "adminSettings", - "helpSettings", - "customLogo", + query_params = [ + "networkId", + "t0", + "t1", + "timespan", + "interval", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"createOrganizationBrandingPolicy: ignoring unrecognized kwargs: {invalid}") - - return self._session.post(metadata, resource, payload) - - def getOrganizationBrandingPoliciesPriorities(self, organizationId: str): - """ - **Return the branding policy IDs of an organization in priority order** - https://developer.cisco.com/meraki/api-v1/#!get-organization-branding-policies-priorities - - - organizationId (string): Organization ID - """ - - metadata = { - "tags": ["organizations", "configure", "brandingPolicies", "priorities"], - "operation": "getOrganizationBrandingPoliciesPriorities", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/brandingPolicies/priorities" + self._session._logger.warning( + f"getOrganizationAssuranceClientsConnectedCountHistory: ignoring unrecognized kwargs: {invalid}" + ) - return self._session.get(metadata, resource) + return self._session.get(metadata, resource, params) - def updateOrganizationBrandingPoliciesPriorities(self, organizationId: str, **kwargs): + def getOrganizationAssuranceClientsEvents(self, organizationId: str, clientId: str, networkId: str, **kwargs): """ - **Update the priority ordering of an organization's branding policies.** - https://developer.cisco.com/meraki/api-v1/#!update-organization-branding-policies-priorities + **Given a client, get all alerts and events for a given timespan** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-clients-events - organizationId (string): Organization ID - - brandingPolicyIds (array): An ordered list of branding policy IDs that determines the priority order of how to apply the policies - + - clientId (string): ID of client to query + - networkId (string): Network ID where client is connected + - filter (array): Optional parameter to filter by issue + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. """ kwargs.update(locals()) metadata = { - "tags": ["organizations", "configure", "brandingPolicies", "priorities"], - "operation": "updateOrganizationBrandingPoliciesPriorities", + "tags": ["organizations", "configure", "clients", "events"], + "operation": "getOrganizationAssuranceClientsEvents", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/brandingPolicies/priorities" + resource = f"/organizations/{organizationId}/assurance/clients/events" - body_params = [ - "brandingPolicyIds", + query_params = [ + "filter", + "clientId", + "networkId", + "t0", + "t1", + "timespan", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "filter", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"updateOrganizationBrandingPoliciesPriorities: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceClientsEvents: ignoring unrecognized kwargs: {invalid}" ) - return self._session.put(metadata, resource, payload) + return self._session.get(metadata, resource, params) - def getOrganizationBrandingPolicy(self, organizationId: str, brandingPolicyId: str): + def getOrganizationAssuranceClientsEventsCorrelated( + self, organizationId: str, clientId: str, category: str, networkId: str, timestamp: str, **kwargs + ): """ - **Return a branding policy** - https://developer.cisco.com/meraki/api-v1/#!get-organization-branding-policy + **Given a client, category, and timespan, return events that have a close connection to each other.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-clients-events-correlated - organizationId (string): Organization ID - - brandingPolicyId (string): Branding policy ID + - clientId (string): Client ID + - category (string): Category of events + - networkId (string): Network used by the client + - timestamp (string): Timestamp for the event + - lookback (integer): Amount of time in minutes to look back + - lookforward (integer): Amount of time in minutes to look forwards + """ + + kwargs.update(locals()) + + if "category" in kwargs: + options = ["application", "association", "authentication", "dhcp", "dns"] + assert kwargs["category"] in options, ( + f'''"category" cannot be "{kwargs["category"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "clients", "events", "correlated"], + "operation": "getOrganizationAssuranceClientsEventsCorrelated", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/clients/events/correlated" + + query_params = [ + "clientId", + "category", + "networkId", + "timestamp", + "lookback", + "lookforward", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceClientsEventsCorrelated: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceClientsTopologyCurrent(self, organizationId: str, clientId: str, networkId: str, **kwargs): + """ + **Given a client, return current topology** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-clients-topology-current + + - organizationId (string): Organization ID + - clientId (string): ID of client to query + - networkId (string): Network ID where client is connected + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "clients", "topology", "current"], + "operation": "getOrganizationAssuranceClientsTopologyCurrent", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/clients/topology/current" + + query_params = [ + "clientId", + "networkId", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceClientsTopologyCurrent: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceClientsTopologyNew(self, organizationId: str, clientIds: list, networkId: str, **kwargs): + """ + **Given a client, return current topology** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-clients-topology-new + + - organizationId (string): Organization ID + - clientIds (array): List of IDs for client retrieval for a given network. Limited to 1 client for now + - networkId (string): Network ID where client is connected + - timestamp (string): Timestamp for client topology path + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "clients", "topology", "new"], + "operation": "getOrganizationAssuranceClientsTopologyNew", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/clients/topology/new" + + query_params = [ + "clientIds", + "networkId", + "timestamp", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "clientIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceClientsTopologyNew: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceDevicesStatusesOverview(self, organizationId: str, **kwargs): + """ + **Returns counts of online, offline, and recovered devices by product type, along with offline intervals for impacted devices in the organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-devices-statuses-overview + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "devices", "statuses", "overview"], + "operation": "getOrganizationAssuranceDevicesStatusesOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/devices/statuses/overview" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceDevicesStatusesOverview: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceFetchTableQuery(self, organizationId: str, tableName: str, **kwargs): + """ + **Returns the table data for a given timespan** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-fetch-table-query + + - organizationId (string): Organization ID + - tableName (string): The table from which we want to get data + - t0 (string): The beginning of the timespan for the data. + - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 365 days, 5 hours, 49 minutes, and 12 seconds. The default is 30 days, 10 hours, 29 minutes, and 6 seconds. + - userEmail (string): The user email for whom we want to calculate lookback + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "fetchTableQuery"], + "operation": "getOrganizationAssuranceFetchTableQuery", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/fetchTableQuery" + + query_params = [ + "t0", + "timespan", + "tableName", + "userEmail", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceFetchTableQuery: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceNetworkServicesServerHealthByServer(self, organizationId: str, **kwargs): + """ + **Returns network server health in organization by server.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-network-services-server-health-by-server + + - organizationId (string): Organization ID + - networkIds (array): Filter results for these networks. + - serverTypes (array): Filter results for these server types. + - serverIps (array): Filter results for these server IP addresses. + - ssidNumbers (array): Filter results for these SSID Numbers. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "networkServices", "serverHealth", "byServer"], + "operation": "getOrganizationAssuranceNetworkServicesServerHealthByServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/networkServices/serverHealth/byServer" + + query_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceNetworkServicesServerHealthByServer: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceNetworkServicesServerHealthByServerByInterval(self, organizationId: str, **kwargs): + """ + **Returns network server health in organization by server and by interval.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-network-services-server-health-by-server-by-interval + + - organizationId (string): Organization ID + - networkIds (array): Filter results for these networks. + - serverTypes (array): Filter results for these server types. + - serverIps (array): Filter results for these server IP addresses. + - ssidNumbers (array): Filter results for these SSID Numbers. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "networkServices", "serverHealth", "byServer", "byInterval"], + "operation": "getOrganizationAssuranceNetworkServicesServerHealthByServerByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/networkServices/serverHealth/byServer/byInterval" + + query_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceNetworkServicesServerHealthByServerByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceNetworkServicesServerHealthByServerType(self, organizationId: str, **kwargs): + """ + **Returns network server health in organization by server type.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-network-services-server-health-by-server-type + + - organizationId (string): Organization ID + - networkIds (array): Filter results for these networks. + - serverTypes (array): Filter results for these server types. + - serverIps (array): Filter results for these server IP addresses. + - ssidNumbers (array): Filter results for these SSID Numbers. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "networkServices", "serverHealth", "byServerType"], + "operation": "getOrganizationAssuranceNetworkServicesServerHealthByServerType", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/networkServices/serverHealth/byServerType" + + query_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceNetworkServicesServerHealthByServerType: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceNetworkServicesServerHealthByServerTypeByInterval(self, organizationId: str, **kwargs): + """ + **Returns network server health in organization by server type and by interval.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-network-services-server-health-by-server-type-by-interval + + - organizationId (string): Organization ID + - networkIds (array): Filter results for these networks. + - serverTypes (array): Filter results for these server types. + - serverIps (array): Filter results for these server IP addresses. + - ssidNumbers (array): Filter results for these SSID Numbers. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "networkServices", "serverHealth", "byServerType", "byInterval"], + "operation": "getOrganizationAssuranceNetworkServicesServerHealthByServerTypeByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/networkServices/serverHealth/byServerType/byInterval" + + query_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serverTypes", + "serverIps", + "ssidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceNetworkServicesServerHealthByServerTypeByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def checkupOrganizationAssuranceOptimization(self, organizationId: str, **kwargs): + """ + **Returns an array of checkup results for the organization** + https://developer.cisco.com/meraki/api-v1/#!checkup-organization-assurance-optimization + + - organizationId (string): Organization ID + - forceRefresh (boolean): Optional parameter to reassess best practices + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "optimization"], + "operation": "checkupOrganizationAssuranceOptimization", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/optimization/checkup" + + query_params = [ + "forceRefresh", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"checkupOrganizationAssuranceOptimization: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceOptimizationCheckupByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns an array of checkup results for the networks** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-optimization-checkup-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 7. + - 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. + - networkIds (array): Optional parameter to filter checkups by Network Id + - forceRefresh (boolean): Optional parameter to reassess best practices + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "optimization", "checkup", "byNetwork"], + "operation": "getOrganizationAssuranceOptimizationCheckupByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/optimization/checkup/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "forceRefresh", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceOptimizationCheckupByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceProductAnnouncements(self, organizationId: str, **kwargs): + """ + **Gets relevant product announcements for a user** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-product-announcements + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. + - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 365 days, 5 hours, 49 minutes, and 12 seconds. The default is 91 days, 7 hours, 27 minutes, and 18 seconds. + - onlyRelevant (boolean): Limits product announcements that are considered relevant to this user when true + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "productAnnouncements"], + "operation": "getOrganizationAssuranceProductAnnouncements", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/productAnnouncements" + + query_params = [ + "t0", + "timespan", + "onlyRelevant", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceProductAnnouncements: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceScores(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get network health scores for a list of networks.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-scores + + - 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): Filter results by network. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 2 hours and be less than or equal to 14 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "scores"], + "operation": "getOrganizationAssuranceScores", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/scores" + + query_params = [ + "networkIds", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationAssuranceScores: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceThousandEyesApplications(self, organizationId: str, networkIds: list, **kwargs): + """ + **Get a list of Thousand Eyes applications with their alerts.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-thousand-eyes-applications + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - clientId (string): Filter results by client. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "thousandEyes", "applications"], + "operation": "getOrganizationAssuranceThousandEyesApplications", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/thousandEyes/applications" + + query_params = [ + "networkIds", + "clientId", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceThousandEyesApplications: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wired connection successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["organizations", "configure", "wired", "experience", "successfulConnections", "byNetwork"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClient(self, organizationId: str, **kwargs): + """ + **Summarizes wired connection successes and failures by client.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "wired", "experience", "successfulConnections", "byNetwork", "byClient"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork/byClient" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wired connection successes and failures by device.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["organizations", "configure", "wired", "experience", "successfulConnections", "byNetwork", "byDevice"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork/byDevice" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByInterval(self, organizationId: str, **kwargs): + """ + **Time-series of wired connection successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network-by-interval + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 60, 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "wired", "experience", "successfulConnections", "byNetwork", "byInterval"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork/byInterval" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceWorkflows(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return workflows filtered by organization ID, network ID, type, and category** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-workflows + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 30. + - 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. + - sortOrder (string): Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'ascending'. + - networkIds (array): Optional parameter to filter by network ID + - types (array): Optional parameter to filter workflows by types + - categories (array): Optional parameter to filter workflows by categories + - scopeTypes (array): Optional parameter to filter workflows by scope types + - networkTags (array): Optional parameter to filter workflows by network tags + - clientTags (array): Optional parameter to filter workflows by client tags + - nodeTags (array): Optional parameter to filter workflows by node tags + - state (string): Optional parameter to filter workflows by state + - tsStart (string): Start time to filter workflows + - tsEnd (string): End time to filter workflows + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "workflows"], + "operation": "getOrganizationAssuranceWorkflows", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/workflows" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "sortOrder", + "networkIds", + "types", + "categories", + "scopeTypes", + "networkTags", + "clientTags", + "nodeTags", + "state", + "tsStart", + "tsEnd", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "types", + "categories", + "scopeTypes", + "networkTags", + "clientTags", + "nodeTags", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationAssuranceWorkflows: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAuthRadiusServers(self, organizationId: str): + """ + **List the organization-wide RADIUS servers in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-auth-radius-servers + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "auth", "radius", "servers"], + "operation": "getOrganizationAuthRadiusServers", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers" + + return self._session.get(metadata, resource) + + def createOrganizationAuthRadiusServer(self, organizationId: str, address: str, secret: str, **kwargs): + """ + **Add an organization-wide RADIUS server** + https://developer.cisco.com/meraki/api-v1/#!create-organization-auth-radius-server + + - organizationId (string): Organization ID + - address (string): The IP address or FQDN of the RADIUS server + - secret (string): Shared secret of the RADIUS server + - name (string): The name of the RADIUS server + - modes (array): Available server modes + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "auth", "radius", "servers"], + "operation": "createOrganizationAuthRadiusServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers" + + body_params = [ + "name", + "address", + "modes", + "secret", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationAuthRadiusServer: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationAuthRadiusServersAssignments(self, organizationId: str): + """ + **Return list of network and policies that organization-wide RADIUS servers are bing used** + https://developer.cisco.com/meraki/api-v1/#!get-organization-auth-radius-servers-assignments + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "auth", "radius", "servers", "assignments"], + "operation": "getOrganizationAuthRadiusServersAssignments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers/assignments" + + return self._session.get(metadata, resource) + + def getOrganizationAuthRadiusServer(self, organizationId: str, serverId: str): + """ + **Return an organization-wide RADIUS server** + https://developer.cisco.com/meraki/api-v1/#!get-organization-auth-radius-server + + - organizationId (string): Organization ID + - serverId (string): Server ID + """ + + metadata = { + "tags": ["organizations", "configure", "auth", "radius", "servers"], + "operation": "getOrganizationAuthRadiusServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + serverId = urllib.parse.quote(str(serverId), safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers/{serverId}" + + return self._session.get(metadata, resource) + + def updateOrganizationAuthRadiusServer(self, organizationId: str, serverId: str, **kwargs): + """ + **Update an organization-wide RADIUS server** + https://developer.cisco.com/meraki/api-v1/#!update-organization-auth-radius-server + + - organizationId (string): Organization ID + - serverId (string): Server ID + - name (string): The name of the RADIUS server + - address (string): The IP address or FQDN of the RADIUS server + - modes (array): Available server modes + - secret (string): Shared secret of the RADIUS server + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "auth", "radius", "servers"], + "operation": "updateOrganizationAuthRadiusServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + serverId = urllib.parse.quote(str(serverId), safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers/{serverId}" + + body_params = [ + "name", + "address", + "modes", + "secret", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationAuthRadiusServer: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationAuthRadiusServer(self, organizationId: str, serverId: str): + """ + **Delete an organization-wide RADIUS server from a organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-auth-radius-server + + - organizationId (string): Organization ID + - serverId (string): Server ID + """ + + metadata = { + "tags": ["organizations", "configure", "auth", "radius", "servers"], + "operation": "deleteOrganizationAuthRadiusServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + serverId = urllib.parse.quote(str(serverId), safe="") + resource = f"/organizations/{organizationId}/auth/radius/servers/{serverId}" + + return self._session.delete(metadata, resource) + + def getOrganizationBrandingPolicies(self, organizationId: str): + """ + **List the branding policies of an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-branding-policies + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "brandingPolicies"], + "operation": "getOrganizationBrandingPolicies", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/brandingPolicies" + + return self._session.get(metadata, resource) + + def createOrganizationBrandingPolicy(self, organizationId: str, name: str, **kwargs): + """ + **Add a new branding policy to an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-branding-policy + + - organizationId (string): Organization ID + - name (string): Name of the Dashboard branding policy. + - enabled (boolean): Boolean indicating whether this policy is enabled. + - adminSettings (object): Settings for describing which kinds of admins this policy applies to. + - helpSettings (object): Settings for describing the modifications to various Help page features. Each property in this object accepts one of + 'default or inherit' (do not modify functionality), 'hide' (remove the section from Dashboard), or 'show' (always show + the section on Dashboard). Some properties in this object also accept custom HTML used to replace the section on + Dashboard; see the documentation for each property to see the allowed values. + Each property defaults to 'default or inherit' when not provided. + - customLogo (object): Properties describing the custom logo attached to the branding policy. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "brandingPolicies"], + "operation": "createOrganizationBrandingPolicy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/brandingPolicies" + + body_params = [ + "name", + "enabled", + "adminSettings", + "helpSettings", + "customLogo", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationBrandingPolicy: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationBrandingPoliciesPriorities(self, organizationId: str): + """ + **Return the branding policy IDs of an organization in priority order** + https://developer.cisco.com/meraki/api-v1/#!get-organization-branding-policies-priorities + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "brandingPolicies", "priorities"], + "operation": "getOrganizationBrandingPoliciesPriorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/brandingPolicies/priorities" + + return self._session.get(metadata, resource) + + def updateOrganizationBrandingPoliciesPriorities(self, organizationId: str, **kwargs): + """ + **Update the priority ordering of an organization's branding policies.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-branding-policies-priorities + + - organizationId (string): Organization ID + - brandingPolicyIds (array): An ordered list of branding policy IDs that determines the priority order of how to apply the policies + + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "brandingPolicies", "priorities"], + "operation": "updateOrganizationBrandingPoliciesPriorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/brandingPolicies/priorities" + + body_params = [ + "brandingPolicyIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationBrandingPoliciesPriorities: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def getOrganizationBrandingPolicy(self, organizationId: str, brandingPolicyId: str): + """ + **Return a branding policy** + https://developer.cisco.com/meraki/api-v1/#!get-organization-branding-policy + + - organizationId (string): Organization ID + - brandingPolicyId (string): Branding policy ID """ metadata = { @@ -2100,6 +3505,191 @@ def deleteOrganizationBrandingPolicy(self, organizationId: str, brandingPolicyId return self._session.delete(metadata, resource) + def getOrganizationCertificates(self, organizationId: str, **kwargs): + """ + **Gets all or specific certificates for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-certificates + + - organizationId (string): Organization ID + - certificateIds (array): List of ids for specific certificate retrieval + - certManagedBy (array): List of cert managed by types + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "certificates"], + "operation": "getOrganizationCertificates", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates" + + query_params = [ + "certificateIds", + "certManagedBy", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "certificateIds", + "certManagedBy", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationCertificates: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def importOrganizationCertificates(self, organizationId: str, managedBy: str, contents: str, description: str, **kwargs): + """ + **Import certificate for this organization** + https://developer.cisco.com/meraki/api-v1/#!import-organization-certificates + + - organizationId (string): Organization ID + - managedBy (string): Certificate managed by type [system_manager, mr, encrypted_syslog] + - contents (string): Certificate content in valid PEM format + - description (string): Certificate description + """ + + kwargs = locals() + + if "managedBy" in kwargs: + options = ["encrypted_syslog", "mr", "system_manager"] + assert kwargs["managedBy"] in options, ( + f'''"managedBy" cannot be "{kwargs["managedBy"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "certificates"], + "operation": "importOrganizationCertificates", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/import" + + body_params = [ + "managedBy", + "contents", + "description", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"importOrganizationCertificates: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationCertificatesMerakiAuthContents(self, organizationId: str): + """ + **Download the public RADIUS certificate.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-certificates-meraki-auth-contents + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "monitor", "certificates", "merakiAuth", "contents"], + "operation": "getOrganizationCertificatesMerakiAuthContents", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/merakiAuth/contents" + + return self._session.get(metadata, resource) + + def deleteOrganizationCertificate(self, organizationId: str, certificateId: str): + """ + **Delete a certificate for an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-certificate + + - organizationId (string): Organization ID + - certificateId (string): Certificate ID + """ + + metadata = { + "tags": ["organizations", "configure", "certificates"], + "operation": "deleteOrganizationCertificate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + certificateId = urllib.parse.quote(str(certificateId), safe="") + resource = f"/organizations/{organizationId}/certificates/{certificateId}" + + return self._session.delete(metadata, resource) + + def updateOrganizationCertificate(self, organizationId: str, certificateId: str, **kwargs): + """ + **Update a certificate's description for an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-certificate + + - organizationId (string): Organization ID + - certificateId (string): Certificate ID + - description (string): Description of a certificate that already exist in your org + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "certificates"], + "operation": "updateOrganizationCertificate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + certificateId = urllib.parse.quote(str(certificateId), safe="") + resource = f"/organizations/{organizationId}/certificates/{certificateId}" + + body_params = [ + "description", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationCertificate: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getOrganizationCertificateContents(self, organizationId: str, certificateId: str, **kwargs): + """ + **Download the trusted certificate by certificate id.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-certificate-contents + + - organizationId (string): Organization ID + - certificateId (string): Certificate ID + - chainId (string): chainId that represent which certificate chain is being requested + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "certificates", "contents"], + "operation": "getOrganizationCertificateContents", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + certificateId = urllib.parse.quote(str(certificateId), safe="") + resource = f"/organizations/{organizationId}/certificates/{certificateId}/contents" + + query_params = [ + "chainId", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationCertificateContents: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + def claimIntoOrganization(self, organizationId: str, **kwargs): """ **Claim a list of devices, licenses, and/or orders into an organization inventory** @@ -2143,6 +3733,7 @@ def getOrganizationClientsBandwidthUsageHistory(self, organizationId: str, **kwa - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink - t0 (string): The beginning of the timespan for the data. @@ -2162,6 +3753,7 @@ def getOrganizationClientsBandwidthUsageHistory(self, organizationId: str, **kwa query_params = [ "networkTag", "deviceTag", + "networkId", "ssidName", "usageUplink", "t0", @@ -2285,6 +3877,23 @@ def cloneOrganization(self, organizationId: str, name: str, **kwargs): return self._session.post(metadata, resource, payload) + def getOrganizationCloudConnectivityRequirements(self, organizationId: str): + """ + **List of source/destination traffic rules** + https://developer.cisco.com/meraki/api-v1/#!get-organization-cloud-connectivity-requirements + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "monitor", "cloud", "connectivity", "requirements"], + "operation": "getOrganizationCloudConnectivityRequirements", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/cloud/connectivity/requirements" + + return self._session.get(metadata, resource) + def getOrganizationConfigTemplates(self, organizationId: str): """ **List the configuration templates for this organization** @@ -2630,10 +4239,26 @@ def getOrganizationDevicesAvailabilitiesChangeHistory( - productTypes (array): Optional parameter to filter device availabilities history by device product types - networkIds (array): Optional parameter to filter device availabilities history by network IDs - statuses (array): Optional parameter to filter device availabilities history by device statuses + - categories (array): Optional parameter to filter device availabilities history by categories of status, reboot, or upgrade + - networkTags (array): Optional parameter to filter device availabilities history by network tags. The filtering is case-sensitive. If tags are included, 'networkTagsFilterType' should also be included (see below). + - networkTagsFilterType (string): An optional parameter of value 'withAnyTags' or 'withAllTags' to indicate whether to return networks which contain ANY or ALL of the included tags. If no type is included, 'withAnyTags' will be selected. + - deviceTags (array): Optional parameter to filter device availabilities history by device tags. The filtering is case-sensitive. If tags are included, 'deviceTagsFilterType' should also be included (see below). + - deviceTagsFilterType (string): An optional parameter of value 'withAnyTags' or 'withAllTags' to indicate whether to return devices which contain ANY or ALL of the included tags. If no type is included, 'withAnyTags' will be selected. """ kwargs.update(locals()) + if "networkTagsFilterType" in kwargs: + options = ["withAllTags", "withAnyTags"] + assert kwargs["networkTagsFilterType"] in options, ( + f'''"networkTagsFilterType" cannot be "{kwargs["networkTagsFilterType"]}", & must be set to one of: {options}''' + ) + if "deviceTagsFilterType" in kwargs: + options = ["withAllTags", "withAnyTags"] + assert kwargs["deviceTagsFilterType"] in options, ( + f'''"deviceTagsFilterType" cannot be "{kwargs["deviceTagsFilterType"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["organizations", "monitor", "devices", "availabilities", "changeHistory"], "operation": "getOrganizationDevicesAvailabilitiesChangeHistory", @@ -2648,18 +4273,142 @@ def getOrganizationDevicesAvailabilitiesChangeHistory( "t0", "t1", "timespan", - "serials", - "productTypes", - "networkIds", - "statuses", + "serials", + "productTypes", + "networkIds", + "statuses", + "categories", + "networkTags", + "networkTagsFilterType", + "deviceTags", + "deviceTagsFilterType", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "serials", + "productTypes", + "networkIds", + "statuses", + "categories", + "networkTags", + "deviceTags", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesAvailabilitiesChangeHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationDevicesBootsHistory(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns the history of device boots in reverse chronological order (most recent first)** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-boots-history + + - 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 + - t0 (string): The beginning of the timespan for the data. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 730 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 730 days. + - serials (array): Optional parameter to filter device by device serial numbers. This filter uses multiple exact matches. + - productTypes (array): Optional parameter to filter devices by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect. + - mostRecentPerDevice (boolean): If true, only the most recent boot for each device is returned. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - sortOrder (string): Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'descending'. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "devices", "boots", "history"], + "operation": "getOrganizationDevicesBootsHistory", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/boots/history" + + query_params = [ + "t0", + "t1", + "timespan", + "serials", + "productTypes", + "mostRecentPerDevice", + "perPage", + "startingAfter", + "endingBefore", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "serials", + "productTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationDevicesBootsHistory: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationDevicesBootsOverviewByDevice(self, organizationId: str, **kwargs): + """ + **Summarizes device reboots across an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-boots-overview-by-device + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - productTypes (array): An optional parameter to filter device statuses by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "devices", "boots", "overview", "byDevice"], + "operation": "getOrganizationDevicesBootsOverviewByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/boots/overview/byDevice" + + query_params = [ + "networkIds", + "productTypes", + "t0", + "t1", + "timespan", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "serials", - "productTypes", "networkIds", - "statuses", + "productTypes", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -2671,10 +4420,10 @@ def getOrganizationDevicesAvailabilitiesChangeHistory( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationDevicesAvailabilitiesChangeHistory: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationDevicesBootsOverviewByDevice: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) def getOrganizationDevicesCellularDataDevices(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ @@ -3274,6 +5023,147 @@ def getOrganizationDevicesCellularUplinksTowersByDevice( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesCliConfigs(self, organizationId: str, serials: list, total_pages=1, direction="next", **kwargs): + """ + **Retrieve the history of running configurations for IOS-XE devices** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-cli-configs + + - organizationId (string): Organization ID + - serials (array): Device serials to include in the response + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 20. + - 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. + - isFavorite (boolean): Whether to return only favorited configs + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "devices", "cli", "configs"], + "operation": "getOrganizationDevicesCliConfigs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/cli/configs" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "serials", + "isFavorite", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationDevicesCliConfigs: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationDevicesCliConfigsDetails( + self, organizationId: str, configId: str, serials: list, total_pages=1, direction="next", **kwargs + ): + """ + **Retrieve the full contents for a given IOS-XE device configuration** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-cli-configs-details + + - organizationId (string): Organization ID + - configId (string): Config ID + - serials (array): Device serials to use when locating the config record + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5. Default is 5. + - 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": ["organizations", "configure", "devices", "cli", "configs", "details"], + "operation": "getOrganizationDevicesCliConfigsDetails", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/cli/configs/details" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "configId", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesCliConfigsDetails: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getDeviceConfigRestores(self, organizationId: str, serials: list, **kwargs): + """ + **Return restore status entries for IOS-XE device configurations** + https://developer.cisco.com/meraki/api-v1/#!get-device-config-restores + + - organizationId (string): Organization ID + - serials (array): Device serial numbers + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "devices", "cli", "configs", "restores"], + "operation": "getDeviceConfigRestores", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/cli/configs/restores" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getDeviceConfigRestores: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + def createOrganizationDevicesControllerMigration(self, organizationId: str, serials: list, target: str, **kwargs): """ **Migrate devices to another controller or management mode** @@ -3408,6 +5298,56 @@ def bulkUpdateOrganizationDevicesDetails(self, organizationId: str, serials: lis return self._session.post(metadata, resource, payload) + def getOrganizationDevicesMemoryByDevice(self, organizationId: str, networkIds: list, productTypes: list, **kwargs): + """ + **Summarizes memory status across devices of a given network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-memory-by-device + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - productTypes (array): Parameter to filter device availabilities by device product types. This filter uses multiple exact matches. + - usageThreshold (number): Threshold of device memory utilization expressed as a percent. Filters out all devices below this value. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 1 hour and be less than or equal to 7 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "devices", "memory", "byDevice"], + "operation": "getOrganizationDevicesMemoryByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/memory/byDevice" + + query_params = [ + "networkIds", + "productTypes", + "usageThreshold", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "productTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationDevicesMemoryByDevice: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + def getOrganizationDevicesOverviewByModel(self, organizationId: str, **kwargs): """ **Lists the count for each device model** @@ -3742,6 +5682,65 @@ def stopOrganizationDevicesPacketCaptureCapture(self, organizationId: str, captu return self._session.post(metadata, resource, payload) + def getOrganizationDevicesPacketCaptureOpportunisticByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the Opportunistic Pcap settings of an organization by network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-packet-capture-opportunistic-by-network + + - 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): Optional parameter to filter results by network. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - sortOrder (string): Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'descending'. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "devices", "packetCapture", "opportunistic", "byNetwork"], + "operation": "getOrganizationDevicesPacketCaptureOpportunisticByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/packetCapture/opportunistic/byNetwork" + + query_params = [ + "networkIds", + "perPage", + "startingAfter", + "endingBefore", + "sortOrder", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesPacketCaptureOpportunisticByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesPacketCaptureSchedules(self, organizationId: str, **kwargs): """ **List the Packet Capture Schedules** @@ -3791,36 +5790,69 @@ def getOrganizationDevicesPacketCaptureSchedules(self, organizationId: str, **kw 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 + **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", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + 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} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationDevicesPacketCaptureSchedule: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def bulkOrganizationDevicesPacketCaptureSchedulesDelete(self, organizationId: str, scheduleIds: list, **kwargs): + """ + **Delete packet capture schedules** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-devices-packet-capture-schedules-delete - 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 + - scheduleIds (array): Delete the packet capture schedules of the specified schedule ids """ - kwargs.update(locals()) + kwargs = locals() metadata = { "tags": ["organizations", "configure", "devices", "packetCapture", "schedules"], - "operation": "createOrganizationDevicesPacketCaptureSchedule", + "operation": "bulkOrganizationDevicesPacketCaptureSchedulesDelete", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/devices/packetCapture/schedules" + resource = f"/organizations/{organizationId}/devices/packetCapture/schedules/bulkDelete" body_params = [ - "devices", - "name", - "notes", - "duration", - "filterExpression", - "enabled", - "schedule", + "scheduleIds", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -3829,7 +5861,7 @@ def createOrganizationDevicesPacketCaptureSchedule(self, organizationId: str, de invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"createOrganizationDevicesPacketCaptureSchedule: ignoring unrecognized kwargs: {invalid}" + f"bulkOrganizationDevicesPacketCaptureSchedulesDelete: ignoring unrecognized kwargs: {invalid}" ) return self._session.post(metadata, resource, payload) @@ -3935,6 +5967,119 @@ def deleteOrganizationDevicesPacketCaptureSchedule(self, organizationId: str, sc return self._session.delete(metadata, resource) + def tasksOrganizationDevicesPacketCapture(self, organizationId: str, packetId: str, task: str, **kwargs): + """ + **Enqueues a task for a specific packet capture** + https://developer.cisco.com/meraki/api-v1/#!tasks-organization-devices-packet-capture + + - organizationId (string): Organization ID + - packetId (string): Packet ID + - task (string): Type of task to enqueue. It can be one of: ["analysis", "reasoning", "summary", "highlights", "title", "flow"] + - networkId (string): Parameter to validate authorization by network access + """ + + kwargs.update(locals()) + + if "task" in kwargs: + options = ["analysis", "flow", "highlights", "reasoning", "summary", "title"] + assert kwargs["task"] in options, f'''"task" cannot be "{kwargs["task"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["organizations", "configure", "devices", "packetCaptures"], + "operation": "tasksOrganizationDevicesPacketCapture", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + packetId = urllib.parse.quote(str(packetId), safe="") + resource = f"/organizations/{organizationId}/devices/packetCaptures/{packetId}/tasks" + + body_params = [ + "networkId", + "task", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"tasksOrganizationDevicesPacketCapture: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationDevicesPacketCaptureTask(self, organizationId: str, packetId: str, id: str, **kwargs): + """ + **Retrieves packet capture analysis result for a specific packet capture task.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-packet-capture-task + + - organizationId (string): Organization ID + - packetId (string): Packet ID + - id (string): ID + - networkId (string): Optional parameter to validate authorization by network access + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "devices", "packetCaptures", "tasks"], + "operation": "getOrganizationDevicesPacketCaptureTask", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + packetId = urllib.parse.quote(str(packetId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/devices/packetCaptures/{packetId}/tasks/{id}" + + query_params = [ + "networkId", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesPacketCaptureTask: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def bulkOrganizationDevicesPlacementPositionsUpdate(self, organizationId: str, serials: list, **kwargs): + """ + **Bulk update the attributes related to positions for provided devices** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-devices-placement-positions-update + + - organizationId (string): Organization ID + - serials (array): List of device serials on a floor plan to update + - height (object): Height of the devices on the floor plan + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "devices", "placement", "positions"], + "operation": "bulkOrganizationDevicesPlacementPositionsUpdate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/placement/positions/bulkUpdate" + + body_params = [ + "serials", + "height", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"bulkOrganizationDevicesPlacementPositionsUpdate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def getOrganizationDevicesPowerModulesStatusesByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -4076,6 +6221,128 @@ def getOrganizationDevicesProvisioningStatuses(self, organizationId: str, total_ return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns details about software updates for networks within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-software-updates-overviews-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 30. + - 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. + - sortOrder (string): Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'ascending'. + - sortKey (string): Specify key to order the list of networks. + - configSource (string): Limit the list of networks to those that contain devices with the specified config source + - networkIds (array): Limit the list of networks to those that match the provided network IDs + - networkGroupIds (array): Limit the list of networks to those that belong to one of the provided network group IDs. + - productTypes (array): Limit the list of product types included for each network + - networkName (string): Limit the list of networks to those whose name contains the given search string. + - versionIds (array): Limit the list of networks to those that are currently on one of the provided version IDs. + - firmwareStatus (string): Limit the list of networks to those whose current firmware version has the specified end-of-support status. + - firmwareType (string): Limit the list of networks to those whose current firmware version has the specified release type. + - upgradeDependencyIds (array): Limit the list of networks to those that belong to one of the provided upgrade dependencies. + - upgradeAvailable (boolean): Limit the list of networks by upgrade availability. + - templateRole (string): Limit the list of networks by config template role: non-template only, templates only, or templates and bound networks. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + if "sortKey" in kwargs: + options = [ + "availability", + "currentVersion", + "firmwareStatus", + "firmwareType", + "lastUpgrade", + "networkGroup", + "networkName", + "networkType", + "scheduledTime", + "scheduledUpgradeVersion", + "upgradeDependency", + ] + assert kwargs["sortKey"] in options, ( + f'''"sortKey" cannot be "{kwargs["sortKey"]}", & must be set to one of: {options}''' + ) + if "configSource" in kwargs: + options = ["cloud", "local"] + assert kwargs["configSource"] in options, ( + f'''"configSource" cannot be "{kwargs["configSource"]}", & must be set to one of: {options}''' + ) + if "firmwareStatus" in kwargs: + options = ["critical", "good", "warning"] + assert kwargs["firmwareStatus"] in options, ( + f'''"firmwareStatus" cannot be "{kwargs["firmwareStatus"]}", & must be set to one of: {options}''' + ) + if "firmwareType" in kwargs: + options = ["beta", "candidate", "stable"] + assert kwargs["firmwareType"] in options, ( + f'''"firmwareType" cannot be "{kwargs["firmwareType"]}", & must be set to one of: {options}''' + ) + if "templateRole" in kwargs: + options = ["bound-templates", "non-template", "templates"] + assert kwargs["templateRole"] in options, ( + f'''"templateRole" cannot be "{kwargs["templateRole"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "devices", "software", "updates", "overviews", "byNetwork"], + "operation": "getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/software/updates/overviews/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "sortOrder", + "sortKey", + "configSource", + "networkIds", + "networkGroupIds", + "productTypes", + "networkName", + "versionIds", + "firmwareStatus", + "firmwareType", + "upgradeDependencyIds", + "upgradeAvailable", + "templateRole", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "networkGroupIds", + "productTypes", + "versionIds", + "upgradeDependencyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesStatuses(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the status of every Meraki device in the organization** @@ -4094,6 +6361,7 @@ def getOrganizationDevicesStatuses(self, organizationId: str, total_pages=1, dir - models (array): Optional parameter to filter devices by models. - tags (array): An optional parameter to filter devices by tags. The filtering is case-sensitive. If tags are included, 'tagsFilterType' should also be included (see below). - tagsFilterType (string): An optional parameter of value 'withAnyTags' or 'withAllTags' to indicate whether to return devices which contain ANY or ALL of the included tags. If no type is included, 'withAnyTags' will be selected. + - configurationUpdatedAfter (string): Optional parameter to filter results by whether or not the device's configuration has been updated after the given timestamp """ kwargs.update(locals()) @@ -4105,33 +6373,125 @@ def getOrganizationDevicesStatuses(self, organizationId: str, total_pages=1, dir ) metadata = { - "tags": ["organizations", "monitor", "devices", "statuses"], - "operation": "getOrganizationDevicesStatuses", + "tags": ["organizations", "monitor", "devices", "statuses"], + "operation": "getOrganizationDevicesStatuses", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/statuses" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + "statuses", + "productTypes", + "models", + "tags", + "tagsFilterType", + "configurationUpdatedAfter", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "statuses", + "productTypes", + "models", + "tags", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationDevicesStatuses: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationDevicesStatusesOverview(self, organizationId: str, **kwargs): + """ + **Return an overview of current device statuses** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-statuses-overview + + - organizationId (string): Organization ID + - productTypes (array): An optional parameter to filter device statuses by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect. + - networkIds (array): An optional parameter to filter device statuses by network. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "devices", "statuses", "overview"], + "operation": "getOrganizationDevicesStatusesOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/statuses/overview" + + query_params = [ + "productTypes", + "networkIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "productTypes", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesStatusesOverview: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationDevicesSyslogServersByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns syslog servers configured for the networks within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-syslog-servers-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - networkIds (array): IDs of the networks for which to fetch syslog servers; suggested maximum array size is 100 + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "devices", "syslog", "servers", "byNetwork"], + "operation": "getOrganizationDevicesSyslogServersByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/devices/statuses" + resource = f"/organizations/{organizationId}/devices/syslog/servers/byNetwork" query_params = [ "perPage", "startingAfter", "endingBefore", "networkIds", - "serials", - "statuses", - "productTypes", - "models", - "tags", - "tagsFilterType", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", - "serials", - "statuses", - "productTypes", - "models", - "tags", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4142,37 +6502,46 @@ def getOrganizationDevicesStatuses(self, organizationId: str, total_pages=1, dir all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationDevicesStatuses: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"getOrganizationDevicesSyslogServersByNetwork: ignoring unrecognized kwargs: {invalid}" + ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationDevicesStatusesOverview(self, organizationId: str, **kwargs): + def getOrganizationDevicesSyslogServersRolesByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Return an overview of current device statuses** - https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-statuses-overview + **Returns roles that can be assigned to a syslog server for a given network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-syslog-servers-roles-by-network - organizationId (string): Organization ID - - productTypes (array): An optional parameter to filter device statuses by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect. - - networkIds (array): An optional parameter to filter device statuses by network. + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - networkIds (array): IDs of the networks for which to fetch valid syslog server roles; suggested maximum array size is 100 """ kwargs.update(locals()) metadata = { - "tags": ["organizations", "monitor", "devices", "statuses", "overview"], - "operation": "getOrganizationDevicesStatusesOverview", + "tags": ["organizations", "configure", "devices", "syslog", "servers", "roles", "byNetwork"], + "operation": "getOrganizationDevicesSyslogServersRolesByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/devices/statuses/overview" + resource = f"/organizations/{organizationId}/devices/syslog/servers/roles/byNetwork" query_params = [ - "productTypes", + "perPage", + "startingAfter", + "endingBefore", "networkIds", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "productTypes", "networkIds", ] for k, v in kwargs.items(): @@ -4185,10 +6554,10 @@ def getOrganizationDevicesStatusesOverview(self, organizationId: str, **kwargs): invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationDevicesStatusesOverview: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationDevicesSyslogServersRolesByNetwork: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get(metadata, resource, params) + return self._session.get_pages(metadata, resource, params, total_pages, direction) def getOrganizationDevicesSystemMemoryUsageHistoryByInterval( self, organizationId: str, total_pages=1, direction="next", **kwargs @@ -4408,22 +6777,285 @@ def createOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, shortN https://developer.cisco.com/meraki/api-v1/#!create-organization-early-access-features-opt-in - organizationId (string): Organization ID - - shortName (string): Short name of the early access feature - - limitScopeToNetworks (array): A list of network IDs to apply the opt-in to + - shortName (string): Short name of the early access feature + - limitScopeToNetworks (array): A list of network IDs to apply the opt-in to + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], + "operation": "createOrganizationEarlyAccessFeaturesOptIn", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/earlyAccess/features/optIns" + + body_params = [ + "shortName", + "limitScopeToNetworks", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationEarlyAccessFeaturesOptIn: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str): + """ + **Show an early access feature opt-in for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-early-access-features-opt-in + + - organizationId (string): Organization ID + - optInId (string): Opt in ID + """ + + metadata = { + "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], + "operation": "getOrganizationEarlyAccessFeaturesOptIn", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + optInId = urllib.parse.quote(str(optInId), safe="") + resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" + + return self._session.get(metadata, resource) + + def updateOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str, **kwargs): + """ + **Update an early access feature opt-in for an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-early-access-features-opt-in + + - organizationId (string): Organization ID + - optInId (string): Opt in ID + - limitScopeToNetworks (array): A list of network IDs to apply the opt-in to + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], + "operation": "updateOrganizationEarlyAccessFeaturesOptIn", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + optInId = urllib.parse.quote(str(optInId), safe="") + resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" + + body_params = [ + "limitScopeToNetworks", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationEarlyAccessFeaturesOptIn: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str): + """ + **Delete an early access feature opt-in** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-early-access-features-opt-in + + - organizationId (string): Organization ID + - optInId (string): Opt in ID + """ + + metadata = { + "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], + "operation": "deleteOrganizationEarlyAccessFeaturesOptIn", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + optInId = urllib.parse.quote(str(optInId), safe="") + resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" + + return self._session.delete(metadata, resource) + + def updateOrganizationExtensionsSdwanmanagerInterconnect( + self, organizationId: str, interconnectId: str, name: str, status: str, **kwargs + ): + """ + **Update name and status of an Interconnect** + https://developer.cisco.com/meraki/api-v1/#!update-organization-extensions-sdwanmanager-interconnect + + - organizationId (string): Organization ID + - interconnectId (string): Interconnect ID + - name (string): Interconnect name + - status (string): Interconnect status + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "extensions", "sdwanmanager", "interconnects"], + "operation": "updateOrganizationExtensionsSdwanmanagerInterconnect", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + interconnectId = urllib.parse.quote(str(interconnectId), safe="") + resource = f"/organizations/{organizationId}/extensions/sdwanmanager/interconnects/{interconnectId}" + + body_params = [ + "name", + "status", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationExtensionsSdwanmanagerInterconnect: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def getOrganizationExtensionsThousandEyesNetworks(self, organizationId: str): + """ + **List the ThousandEyes agent configurations under this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-extensions-thousand-eyes-networks + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "extensions", "thousandEyes", "networks"], + "operation": "getOrganizationExtensionsThousandEyesNetworks", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks" + + return self._session.get(metadata, resource) + + def createOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, enabled: bool, networkId: str, **kwargs): + """ + **Add a ThousandEyes agent for this network** + https://developer.cisco.com/meraki/api-v1/#!create-organization-extensions-thousand-eyes-network + + - organizationId (string): Organization ID + - enabled (boolean): Whether or not the ThousandEyes agent is enabled for the network. + - networkId (string): Network that will have the ThousandEyes agent installed on. + - tests (array): An array of tests to be created + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "extensions", "thousandEyes", "networks"], + "operation": "createOrganizationExtensionsThousandEyesNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks" + + body_params = [ + "enabled", + "networkId", + "tests", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationExtensionsThousandEyesNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationExtensionsThousandEyesNetworksSupported( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List all the networks eligible for ThousandEyes agent activation under this organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-extensions-thousand-eyes-networks-supported + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - agentInstalled (boolean): Set to true to get only networks with installed ThousandEyes agent; set to false to get networks without agents. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "extensions", "thousandEyes", "networks", "supported"], + "operation": "getOrganizationExtensionsThousandEyesNetworksSupported", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks/supported" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "agentInstalled", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationExtensionsThousandEyesNetworksSupported: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, networkId: str): + """ + **List the ThousandEyes agent configuration under this network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-extensions-thousand-eyes-network + + - organizationId (string): Organization ID + - networkId (string): Network ID + """ + + metadata = { + "tags": ["organizations", "configure", "extensions", "thousandEyes", "networks"], + "operation": "getOrganizationExtensionsThousandEyesNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks/{networkId}" + + return self._session.get(metadata, resource) + + def updateOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, networkId: str, enabled: bool, **kwargs): + """ + **Update a ThousandEyes agent from this network** + https://developer.cisco.com/meraki/api-v1/#!update-organization-extensions-thousand-eyes-network + + - organizationId (string): Organization ID + - networkId (string): Network ID + - enabled (boolean): Whether or not the ThousandEyes agent is enabled for the network. """ - kwargs.update(locals()) + kwargs = locals() metadata = { - "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], - "operation": "createOrganizationEarlyAccessFeaturesOptIn", + "tags": ["organizations", "configure", "extensions", "thousandEyes", "networks"], + "operation": "updateOrganizationExtensionsThousandEyesNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/earlyAccess/features/optIns" + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks/{networkId}" body_params = [ - "shortName", - "limitScopeToNetworks", + "enabled", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -4432,52 +7064,50 @@ def createOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, shortN invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"createOrganizationEarlyAccessFeaturesOptIn: ignoring unrecognized kwargs: {invalid}" + f"updateOrganizationExtensionsThousandEyesNetwork: ignoring unrecognized kwargs: {invalid}" ) - return self._session.post(metadata, resource, payload) + return self._session.put(metadata, resource, payload) - def getOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str): + def deleteOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, networkId: str): """ - **Show an early access feature opt-in for an organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-early-access-features-opt-in + **Delete a ThousandEyes agent from this network** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-extensions-thousand-eyes-network - organizationId (string): Organization ID - - optInId (string): Opt in ID + - networkId (string): Network ID """ metadata = { - "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], - "operation": "getOrganizationEarlyAccessFeaturesOptIn", + "tags": ["organizations", "configure", "extensions", "thousandEyes", "networks"], + "operation": "deleteOrganizationExtensionsThousandEyesNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - optInId = urllib.parse.quote(str(optInId), safe="") - resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks/{networkId}" - return self._session.get(metadata, resource) + return self._session.delete(metadata, resource) - def updateOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str, **kwargs): + def createOrganizationExtensionsThousandEyesTest(self, organizationId: str, **kwargs): """ - **Update an early access feature opt-in for an organization** - https://developer.cisco.com/meraki/api-v1/#!update-organization-early-access-features-opt-in + **Create a ThousandEyes test based on a provided test template** + https://developer.cisco.com/meraki/api-v1/#!create-organization-extensions-thousand-eyes-test - organizationId (string): Organization ID - - optInId (string): Opt in ID - - limitScopeToNetworks (array): A list of network IDs to apply the opt-in to + - tests (array): An array of tests to be created """ kwargs.update(locals()) metadata = { - "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], - "operation": "updateOrganizationEarlyAccessFeaturesOptIn", + "tags": ["organizations", "configure", "extensions", "thousandEyes", "tests"], + "operation": "createOrganizationExtensionsThousandEyesTest", } organizationId = urllib.parse.quote(str(organizationId), safe="") - optInId = urllib.parse.quote(str(optInId), safe="") - resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" + resource = f"/organizations/{organizationId}/extensions/thousandEyes/tests" body_params = [ - "limitScopeToNetworks", + "tests", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -4486,29 +7116,10 @@ def updateOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInI invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"updateOrganizationEarlyAccessFeaturesOptIn: ignoring unrecognized kwargs: {invalid}" + f"createOrganizationExtensionsThousandEyesTest: ignoring unrecognized kwargs: {invalid}" ) - return self._session.put(metadata, resource, payload) - - def deleteOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInId: str): - """ - **Delete an early access feature opt-in** - https://developer.cisco.com/meraki/api-v1/#!delete-organization-early-access-features-opt-in - - - organizationId (string): Organization ID - - optInId (string): Opt in ID - """ - - metadata = { - "tags": ["organizations", "configure", "earlyAccess", "features", "optIns"], - "operation": "deleteOrganizationEarlyAccessFeaturesOptIn", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - optInId = urllib.parse.quote(str(optInId), safe="") - resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" - - return self._session.delete(metadata, resource) + return self._session.post(metadata, resource, payload) def getOrganizationFirmwareUpgrades(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ @@ -5567,40 +8178,287 @@ def getOrganizationNetworks(self, organizationId: str, total_pages=1, direction= all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationNetworks: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning(f"getOrganizationNetworks: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationNetwork(self, organizationId: str, name: str, productTypes: list, **kwargs): + """ + **Create a network** + https://developer.cisco.com/meraki/api-v1/#!create-organization-network + + - organizationId (string): Organization ID + - name (string): The name of the new network + - productTypes (array): The product type(s) of the new network. If more than one type is included, the network will be a combined network. + - tags (array): A list of tags to be applied to the network + - timeZone (string): The timezone of the network. For a list of allowed timezones, please see the 'TZ' column in the table in this article. + - copyFromNetworkId (string): The ID of the network to copy configuration from. Other provided parameters will override the copied configuration, except type which must match this network's type exactly. + - notes (string): Add any notes or additional information about this network here. + - details (array): An array of details + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "networks"], + "operation": "createOrganizationNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/networks" + + body_params = [ + "name", + "productTypes", + "tags", + "timeZone", + "copyFromNetworkId", + "notes", + "details", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationNetwork: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def combineOrganizationNetworks(self, organizationId: str, name: str, networkIds: list, **kwargs): + """ + **Combine multiple networks into a single network** + https://developer.cisco.com/meraki/api-v1/#!combine-organization-networks + + - organizationId (string): Organization ID + - name (string): The name of the combined network + - networkIds (array): A list of the network IDs that will be combined. If an ID of a combined network is included in this list, the other networks in the list will be grouped into that network + - enrollmentString (string): A unique identifier which can be used for device enrollment or easy access through the Meraki SM Registration page or the Self Service Portal. Please note that changing this field may cause existing bookmarks to break. All networks that are part of this combined network will have their enrollment string appended by '-network_type'. If left empty, all exisitng enrollment strings will be deleted. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "networks"], + "operation": "combineOrganizationNetworks", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/networks/combine" + + body_params = [ + "name", + "networkIds", + "enrollmentString", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"combineOrganizationNetworks: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationNetworksGroups(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the network groups in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-networks-groups + + - 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 + - groupIds (array): Optional parameter to filter network groups by ID + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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": ["organizations", "configure", "networks", "groups"], + "operation": "getOrganizationNetworksGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/networks/groups" + + query_params = [ + "groupIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "groupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationNetworksGroups: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationNetworksGroup(self, organizationId: str, name: str, **kwargs): + """ + **Create a network group** + https://developer.cisco.com/meraki/api-v1/#!create-organization-networks-group + + - organizationId (string): Organization ID + - name (string): The name of the network group + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "networks", "groups"], + "operation": "createOrganizationNetworksGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/networks/groups" + + body_params = [ + "name", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationNetworksGroup: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationNetworksGroupsOverviewByGroup(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the client and status overview information for the network groups in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-networks-groups-overview-by-group + + - 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 + - sortBy (string): Field by which to sort the results + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5000. + - 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()) + + if "sortBy" in kwargs: + options = ["status"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "monitor", "networks", "groups", "overview", "byGroup"], + "operation": "getOrganizationNetworksGroupsOverviewByGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/networks/groups/overview/byGroup" + + query_params = [ + "sortBy", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationNetworksGroupsOverviewByGroup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def updateOrganizationNetworksGroup(self, organizationId: str, groupId: str, name: str, **kwargs): + """ + **Update a network group** + https://developer.cisco.com/meraki/api-v1/#!update-organization-networks-group + + - organizationId (string): Organization ID + - groupId (string): Group ID + - name (string): The new name of the network group + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "networks", "groups"], + "operation": "updateOrganizationNetworksGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") + resource = f"/organizations/{organizationId}/networks/groups/{groupId}" + + body_params = [ + "name", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationNetworksGroup: ignoring unrecognized kwargs: {invalid}") - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.put(metadata, resource, payload) - def createOrganizationNetwork(self, organizationId: str, name: str, productTypes: list, **kwargs): + def deleteOrganizationNetworksGroup(self, organizationId: str, groupId: str): """ - **Create a network** - https://developer.cisco.com/meraki/api-v1/#!create-organization-network + **Delete a network group** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-networks-group - organizationId (string): Organization ID - - name (string): The name of the new network - - productTypes (array): The product type(s) of the new network. If more than one type is included, the network will be a combined network. - - tags (array): A list of tags to be applied to the network - - timeZone (string): The timezone of the network. For a list of allowed timezones, please see the 'TZ' column in the table in this article. - - copyFromNetworkId (string): The ID of the network to copy configuration from. Other provided parameters will override the copied configuration, except type which must match this network's type exactly. - - notes (string): Add any notes or additional information about this network here. + - groupId (string): Group ID """ - kwargs.update(locals()) + metadata = { + "tags": ["organizations", "configure", "networks", "groups"], + "operation": "deleteOrganizationNetworksGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") + resource = f"/organizations/{organizationId}/networks/groups/{groupId}" + + return self._session.delete(metadata, resource) + + def bulkOrganizationNetworksGroupAssign(self, organizationId: str, groupId: str, networkIds: list, **kwargs): + """ + **Add networks to a network group** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-networks-group-assign + + - organizationId (string): Organization ID + - groupId (string): Group ID + - networkIds (array): A list of network IDs to add to the network group + """ + + kwargs = locals() metadata = { - "tags": ["organizations", "configure", "networks"], - "operation": "createOrganizationNetwork", + "tags": ["organizations", "configure", "networks", "groups"], + "operation": "bulkOrganizationNetworksGroupAssign", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/networks" + groupId = urllib.parse.quote(str(groupId), safe="") + resource = f"/organizations/{organizationId}/networks/groups/{groupId}/bulkAssign" body_params = [ - "name", - "productTypes", - "tags", - "timeZone", - "copyFromNetworkId", - "notes", + "networkIds", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -5608,34 +8466,32 @@ def createOrganizationNetwork(self, organizationId: str, name: str, productTypes all_params = [] + body_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"createOrganizationNetwork: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning(f"bulkOrganizationNetworksGroupAssign: ignoring unrecognized kwargs: {invalid}") return self._session.post(metadata, resource, payload) - def combineOrganizationNetworks(self, organizationId: str, name: str, networkIds: list, **kwargs): + def bulkOrganizationNetworksGroupUnassign(self, organizationId: str, groupId: str, networkIds: list, **kwargs): """ - **Combine multiple networks into a single network** - https://developer.cisco.com/meraki/api-v1/#!combine-organization-networks + **Remove networks from a network group** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-networks-group-unassign - organizationId (string): Organization ID - - name (string): The name of the combined network - - networkIds (array): A list of the network IDs that will be combined. If an ID of a combined network is included in this list, the other networks in the list will be grouped into that network - - enrollmentString (string): A unique identifier which can be used for device enrollment or easy access through the Meraki SM Registration page or the Self Service Portal. Please note that changing this field may cause existing bookmarks to break. All networks that are part of this combined network will have their enrollment string appended by '-network_type'. If left empty, all exisitng enrollment strings will be deleted. + - groupId (string): Group ID + - networkIds (array): A list of network IDs to remove from the network group """ - kwargs.update(locals()) + kwargs = locals() metadata = { - "tags": ["organizations", "configure", "networks"], - "operation": "combineOrganizationNetworks", + "tags": ["organizations", "configure", "networks", "groups"], + "operation": "bulkOrganizationNetworksGroupUnassign", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/networks/combine" + groupId = urllib.parse.quote(str(groupId), safe="") + resource = f"/organizations/{organizationId}/networks/groups/{groupId}/bulkUnassign" body_params = [ - "name", "networkIds", - "enrollmentString", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -5643,7 +8499,9 @@ def combineOrganizationNetworks(self, organizationId: str, name: str, networkIds all_params = [] + body_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"combineOrganizationNetworks: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"bulkOrganizationNetworksGroupUnassign: ignoring unrecognized kwargs: {invalid}" + ) return self._session.post(metadata, resource, payload) @@ -6906,6 +9764,140 @@ def deleteOrganizationPolicyObject(self, organizationId: str, policyObjectId: st return self._session.delete(metadata, resource) + def getOrganizationRoutingVrfs(self, organizationId: str, **kwargs): + """ + **List existing organization-wide VRFs (Virtual Routing and Forwarding).** + https://developer.cisco.com/meraki/api-v1/#!get-organization-routing-vrfs + + - organizationId (string): Organization ID + - vrfIds (array): IDs of the desired VRFs. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "routing", "vrfs"], + "operation": "getOrganizationRoutingVrfs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/routing/vrfs" + + query_params = [ + "vrfIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "vrfIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationRoutingVrfs: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def createOrganizationRoutingVrf(self, organizationId: str, name: str, **kwargs): + """ + **Add an organization-wide VRF (Virtual Routing and Forwarding)** + https://developer.cisco.com/meraki/api-v1/#!create-organization-routing-vrf + + - organizationId (string): Organization ID + - name (string): The name of the VRF (Virtual Routing and Forwarding) + - description (string): Description of the VRF (Virtual Routing and Forwarding) + - routeDistinguisher (string): RD (Route Distinguisher) for the VRF (Virtual Routing and Forwarding) + - routeTarget (string): Route target are used to control the import and export of routes between VRFs + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "routing", "vrfs"], + "operation": "createOrganizationRoutingVrf", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/routing/vrfs" + + body_params = [ + "name", + "description", + "routeDistinguisher", + "routeTarget", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationRoutingVrf: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateOrganizationRoutingVrf(self, organizationId: str, vrfId: str, **kwargs): + """ + **Update an organization-wide VRF (Virtual Routing and Forwarding)** + https://developer.cisco.com/meraki/api-v1/#!update-organization-routing-vrf + + - organizationId (string): Organization ID + - vrfId (string): Vrf ID + - name (string): The name of the VRF (Virtual Routing and Forwarding) + - description (string): Description of the VRF (Virtual Routing and Forwarding) + - routeDistinguisher (string): RD (Route Distinguisher) for the VRF (Virtual Routing and Forwarding) + - routeTarget (string): Route target are used to control the import and export of routes between VRFs + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "routing", "vrfs"], + "operation": "updateOrganizationRoutingVrf", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + vrfId = urllib.parse.quote(str(vrfId), safe="") + resource = f"/organizations/{organizationId}/routing/vrfs/{vrfId}" + + body_params = [ + "name", + "description", + "routeDistinguisher", + "routeTarget", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationRoutingVrf: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationRoutingVrf(self, organizationId: str, vrfId: str): + """ + **Delete a VRF (Virtual Routing and Forwarding) from a organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-routing-vrf + + - organizationId (string): Organization ID + - vrfId (string): Vrf ID + """ + + metadata = { + "tags": ["organizations", "configure", "routing", "vrfs"], + "operation": "deleteOrganizationRoutingVrf", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + vrfId = urllib.parse.quote(str(vrfId), safe="") + resource = f"/organizations/{organizationId}/routing/vrfs/{vrfId}" + + return self._session.delete(metadata, resource) + def getOrganizationSaml(self, organizationId: str): """ **Returns the SAML SSO enabled settings for an organization.** @@ -7214,6 +10206,72 @@ def deleteOrganizationSamlRole(self, organizationId: str, samlRoleId: str): return self._session.delete(metadata, resource) + def getOrganizationSaseBatch(self, organizationId: str, batchId: str): + """ + **Retrieves a batch summary with aggregated job status counts** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sase-batch + + - organizationId (string): Organization ID + - batchId (string): Batch ID + """ + + metadata = { + "tags": ["organizations", "configure", "sase", "batches"], + "operation": "getOrganizationSaseBatch", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + batchId = urllib.parse.quote(str(batchId), safe="") + resource = f"/organizations/{organizationId}/sase/batches/{batchId}" + + return self._session.get(metadata, resource) + + def getOrganizationSaseBatchJobs(self, organizationId: str, batchId: str, total_pages=1, direction="next", **kwargs): + """ + **List jobs within a batch, with optional status filtering** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sase-batch-jobs + + - organizationId (string): Organization ID + - batchId (string): Batch 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - status (string): If provided, filters jobs by status + """ + + kwargs.update(locals()) + + if "status" in kwargs: + options = ["complete", "deferred", "failed", "new", "ready", "running", "scheduled"] + assert kwargs["status"] in options, ( + f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "sase", "batches", "jobs"], + "operation": "getOrganizationSaseBatchJobs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + batchId = urllib.parse.quote(str(batchId), safe="") + resource = f"/organizations/{organizationId}/sase/batches/{batchId}/jobs" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "status", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSaseBatchJobs: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationSaseConnectors(self, organizationId: str): """ **List SSE Connectors for an organization** @@ -7552,6 +10610,39 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): return self._session.delete(metadata, resource) + def enrollOrganizationSaseSites(self, organizationId: str, **kwargs): + """ + **Enroll sites in this organization to Secure Access** + https://developer.cisco.com/meraki/api-v1/#!enroll-organization-sase-sites + + - organizationId (string): Organization ID + - items (array): List of Meraki SD-WAN sites with the associated regions to be enrolled. + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "sase", "sites"], + "operation": "enrollOrganizationSaseSites", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sase/sites/enroll" + + body_params = [ + "items", + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"enrollOrganizationSaseSites: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + def updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs): """ **Update the configuration for a site** @@ -7582,9 +10673,59 @@ def updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs) all_params = [] + body_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"updateOrganizationSaseSite: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning(f"updateOrganizationSaseSite: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getOrganizationSitesBuildings(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the buildings belonging to the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sites-buildings + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter buildings by one or more network IDs + - buildingIds (array): Optional parameter to filter buildings by one or more building IDs + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "sites", "buildings"], + "operation": "getOrganizationSitesBuildings", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sites/buildings" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "buildingIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "buildingIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSitesBuildings: ignoring unrecognized kwargs: {invalid}") - return self._session.put(metadata, resource, payload) + return self._session.get_pages(metadata, resource, params, total_pages, direction) def getOrganizationSnmp(self, organizationId: str): """ @@ -7657,6 +10798,45 @@ def updateOrganizationSnmp(self, organizationId: str, **kwargs): return self._session.put(metadata, resource, payload) + def getOrganizationSnmpTrapsByNetwork(self, organizationId: str, **kwargs): + """ + **Retrieve the SNMP trap configuration for the networks in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-snmp-traps-by-network + + - organizationId (string): Organization ID + - networkIds (array): An optional parameter to filter SNMP trap configs by network IDs + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "snmp", "traps", "byNetwork"], + "operation": "getOrganizationSnmpTrapsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/snmp/traps/byNetwork" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSnmpTrapsByNetwork: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + def getOrganizationSplashAsset(self, organizationId: str, id: str): """ **Get a Splash Theme Asset** @@ -7807,6 +10987,7 @@ def getOrganizationSummaryTopAppliancesByUtilization(self, organizationId: str, - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -7827,6 +11008,7 @@ def getOrganizationSummaryTopAppliancesByUtilization(self, organizationId: str, query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -7952,6 +11134,7 @@ def getOrganizationSummaryTopClientsByUsage(self, organizationId: str, **kwargs) - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -7972,6 +11155,7 @@ def getOrganizationSummaryTopClientsByUsage(self, organizationId: str, **kwargs) query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -7999,6 +11183,7 @@ def getOrganizationSummaryTopClientsManufacturersByUsage(self, organizationId: s - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -8019,6 +11204,7 @@ def getOrganizationSummaryTopClientsManufacturersByUsage(self, organizationId: s query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -8046,6 +11232,7 @@ def getOrganizationSummaryTopDevicesByUsage(self, organizationId: str, **kwargs) - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -8066,6 +11253,7 @@ def getOrganizationSummaryTopDevicesByUsage(self, organizationId: str, **kwargs) query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -8093,6 +11281,7 @@ def getOrganizationSummaryTopDevicesModelsByUsage(self, organizationId: str, **k - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -8113,6 +11302,7 @@ def getOrganizationSummaryTopDevicesModelsByUsage(self, organizationId: str, **k query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -8142,6 +11332,7 @@ def getOrganizationSummaryTopNetworksByStatus(self, organizationId: str, total_p - direction (string): direction to paginate, either "next" (default) or "prev" page - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -8162,6 +11353,7 @@ def getOrganizationSummaryTopNetworksByStatus(self, organizationId: str, total_p query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -8189,6 +11381,7 @@ def getOrganizationSummaryTopSsidsByUsage(self, organizationId: str, **kwargs): - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -8209,6 +11402,7 @@ def getOrganizationSummaryTopSsidsByUsage(self, organizationId: str, **kwargs): query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -8236,6 +11430,7 @@ def getOrganizationSummaryTopSwitchesByEnergyUsage(self, organizationId: str, ** - organizationId (string): Organization ID - networkTag (string): Match result to an exact network tag - deviceTag (string): Match result to an exact device tag + - networkId (string): Match result to an exact network id - quantity (integer): Set number of desired results to return. Default is 10. Maximum is 50 - ssidName (string): Filter results by ssid name - usageUplink (string): Filter results by usage uplink @@ -8256,6 +11451,7 @@ def getOrganizationSummaryTopSwitchesByEnergyUsage(self, organizationId: str, ** query_params = [ "networkTag", "deviceTag", + "networkId", "quantity", "ssidName", "usageUplink", @@ -8384,6 +11580,137 @@ def getOrganizationWebhooksCallbacksStatus(self, organizationId: str, callbackId return self._session.get(metadata, resource) + def getOrganizationWebhooksHttpServers(self, organizationId: str): + """ + **List the HTTP servers for this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-webhooks-http-servers + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "httpServers"], + "operation": "getOrganizationWebhooksHttpServers", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/webhooks/httpServers" + + return self._session.get(metadata, resource) + + def createOrganizationWebhooksHttpServer(self, organizationId: str, name: str, url: str, **kwargs): + """ + **Add an HTTP server to an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-webhooks-http-server + + - organizationId (string): Organization ID + - name (string): A name for easy reference to the HTTP server + - url (string): The URL of the HTTP server + - sharedSecret (string): A shared secret that will be included in POSTs sent to the HTTP server. This secret can be used to verify that the request was sent by Meraki. + - payloadTemplate (object): The payload template to use when posting data to the HTTP server. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "webhooks", "httpServers"], + "operation": "createOrganizationWebhooksHttpServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/webhooks/httpServers" + + body_params = [ + "name", + "url", + "sharedSecret", + "payloadTemplate", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationWebhooksHttpServer: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationWebhooksHttpServer(self, organizationId: str, id: str): + """ + **Return an HTTP server for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-webhooks-http-server + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "httpServers"], + "operation": "getOrganizationWebhooksHttpServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/webhooks/httpServers/{id}" + + return self._session.get(metadata, resource) + + def updateOrganizationWebhooksHttpServer(self, organizationId: str, id: str, **kwargs): + """ + **Update an HTTP server for an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-webhooks-http-server + + - organizationId (string): Organization ID + - id (string): ID + - name (string): A name for easy reference to the HTTP server + - url (string): The URL of the HTTP server + - sharedSecret (string): A shared secret that will be included in POSTs sent to the HTTP server. This secret can be used to verify that the request was sent by Meraki. + - payloadTemplate (object): The payload template to use when posting data to the HTTP server. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "webhooks", "httpServers"], + "operation": "updateOrganizationWebhooksHttpServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/webhooks/httpServers/{id}" + + body_params = [ + "name", + "url", + "sharedSecret", + "payloadTemplate", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationWebhooksHttpServer: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationWebhooksHttpServer(self, organizationId: str, id: str): + """ + **Delete an HTTP server from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-webhooks-http-server + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "httpServers"], + "operation": "deleteOrganizationWebhooksHttpServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/webhooks/httpServers/{id}" + + return self._session.delete(metadata, resource) + def getOrganizationWebhooksLogs(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **Return the log of webhook POSTs sent** @@ -8428,3 +11755,206 @@ def getOrganizationWebhooksLogs(self, organizationId: str, total_pages=1, direct self._session._logger.warning(f"getOrganizationWebhooksLogs: ignoring unrecognized kwargs: {invalid}") return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWebhooksPayloadTemplates(self, organizationId: str): + """ + **List the webhook payload templates for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-webhooks-payload-templates + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "payloadTemplates"], + "operation": "getOrganizationWebhooksPayloadTemplates", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates" + + return self._session.get(metadata, resource) + + def createOrganizationWebhooksPayloadTemplate(self, organizationId: str, name: str, **kwargs): + """ + **Create a webhook payload template for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-webhooks-payload-template + + - organizationId (string): Organization ID + - name (string): The name of the new template + - body (string): The liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. + - headers (array): The liquid template used with the webhook headers. + - bodyFile (string): A file containing liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. + - headersFile (string): A file containing the liquid template used with the webhook headers. + - sharing (object): Information on which entities have access to the template + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "webhooks", "payloadTemplates"], + "operation": "createOrganizationWebhooksPayloadTemplate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates" + + body_params = [ + "name", + "body", + "headers", + "bodyFile", + "headersFile", + "sharing", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationWebhooksPayloadTemplate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationWebhooksPayloadTemplate(self, organizationId: str, payloadTemplateId: str): + """ + **Get the webhook payload template for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-webhooks-payload-template + + - organizationId (string): Organization ID + - payloadTemplateId (string): Payload template ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "payloadTemplates"], + "operation": "getOrganizationWebhooksPayloadTemplate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + payloadTemplateId = urllib.parse.quote(str(payloadTemplateId), safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates/{payloadTemplateId}" + + return self._session.get(metadata, resource) + + def deleteOrganizationWebhooksPayloadTemplate(self, organizationId: str, payloadTemplateId: str): + """ + **Destroy a webhook payload template for an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-webhooks-payload-template + + - organizationId (string): Organization ID + - payloadTemplateId (string): Payload template ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "payloadTemplates"], + "operation": "deleteOrganizationWebhooksPayloadTemplate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + payloadTemplateId = urllib.parse.quote(str(payloadTemplateId), safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates/{payloadTemplateId}" + + return self._session.delete(metadata, resource) + + def updateOrganizationWebhooksPayloadTemplate(self, organizationId: str, payloadTemplateId: str, **kwargs): + """ + **Update a webhook payload template for an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-webhooks-payload-template + + - organizationId (string): Organization ID + - payloadTemplateId (string): Payload template ID + - name (string): The name of the template + - body (string): The liquid template used for the body of the webhook message. + - headers (array): The liquid template used with the webhook headers. + - bodyFile (string): A file containing liquid template used for the body of the webhook message. + - headersFile (string): A file containing the liquid template used with the webhook headers. + - sharing (object): Information on which entities have access to the template + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "webhooks", "payloadTemplates"], + "operation": "updateOrganizationWebhooksPayloadTemplate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + payloadTemplateId = urllib.parse.quote(str(payloadTemplateId), safe="") + resource = f"/organizations/{organizationId}/webhooks/payloadTemplates/{payloadTemplateId}" + + body_params = [ + "name", + "body", + "headers", + "bodyFile", + "headersFile", + "sharing", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationWebhooksPayloadTemplate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def createOrganizationWebhooksWebhookTest(self, organizationId: str, url: str, **kwargs): + """ + **Send a test webhook for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-webhooks-webhook-test + + - organizationId (string): Organization ID + - url (string): The URL where the test webhook will be sent + - sharedSecret (string): The shared secret the test webhook will send. Optional. Defaults to HTTP server's shared secret. Otherwise, defaults to an empty string. + - payloadTemplateId (string): The ID of the payload template of the test webhook. Defaults to the HTTP server's template ID if one exists for the given URL, or Generic template ID otherwise + - payloadTemplateName (string): The name of the payload template. + - alertTypeId (string): The type of alert which the test webhook will send. Optional. Defaults to insight_app_outage_start. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "webhooks", "webhookTests"], + "operation": "createOrganizationWebhooksWebhookTest", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/webhooks/webhookTests" + + body_params = [ + "url", + "sharedSecret", + "payloadTemplateId", + "payloadTemplateName", + "alertTypeId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationWebhooksWebhookTest: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationWebhooksWebhookTest(self, organizationId: str, webhookTestId: str): + """ + **Return the status of a webhook test for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-webhooks-webhook-test + + - organizationId (string): Organization ID + - webhookTestId (string): Webhook test ID + """ + + metadata = { + "tags": ["organizations", "configure", "webhooks", "webhookTests"], + "operation": "getOrganizationWebhooksWebhookTest", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + webhookTestId = urllib.parse.quote(str(webhookTestId), safe="") + resource = f"/organizations/{organizationId}/webhooks/webhookTests/{webhookTestId}" + + return self._session.get(metadata, resource) diff --git a/meraki/api/secureConnect.py b/meraki/api/secureConnect.py new file mode 100644 index 00000000..a3a6f7fe --- /dev/null +++ b/meraki/api/secureConnect.py @@ -0,0 +1,1082 @@ +import urllib + + +class SecureConnect(object): + def __init__(self, session): + super(SecureConnect, self).__init__() + self._session = session + + def getOrganizationSecureConnectPrivateApplicationGroups( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Provides a list of private application groups for an Organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-private-application-groups + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - nameIncludes (string): Optional parameter to search the application group list by group name, case is ignored + - applicationGroupIds (array): List of application group ids attached to fetch + - sortBy (string): Optional parameter to specify the field used to sort objects. + - sortOrder (string): Optional parameter to specify the sort order. Default value is asc. + """ + + kwargs.update(locals()) + + if "sortBy" in kwargs: + options = ["applicationGroupId", "modifiedAt", "name"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplicationGroups"], + "operation": "getOrganizationSecureConnectPrivateApplicationGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplicationGroups" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "nameIncludes", + "applicationGroupIds", + "sortBy", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "applicationGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectPrivateApplicationGroups: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSecureConnectPrivateApplicationGroup(self, organizationId: str, name: str, **kwargs): + """ + **Creates a group of private applications to apply to policy** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-private-application-group + + - organizationId (string): Organization ID + - name (string): Application Group Name. This is required and cannot have any special characters other than spaces and hyphens + - description (string): Optional short description for application group + - applicationIds (array): List of application ids attached to this Private Application Group + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplicationGroups"], + "operation": "createOrganizationSecureConnectPrivateApplicationGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplicationGroups" + + body_params = [ + "name", + "description", + "applicationIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSecureConnectPrivateApplicationGroup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationSecureConnectPrivateApplicationGroup(self, organizationId: str, id: str, name: str, **kwargs): + """ + **Update an application group in an Organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-secure-connect-private-application-group + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Application Group Name. This is required and cannot have any special characters other than spaces and hyphens + - description (string): Optional short description for application group + - applicationIds (array): List of application ids attached to this Private Application Group + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplicationGroups"], + "operation": "updateOrganizationSecureConnectPrivateApplicationGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplicationGroups/{id}" + + body_params = [ + "name", + "description", + "applicationIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSecureConnectPrivateApplicationGroup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSecureConnectPrivateApplicationGroup(self, organizationId: str, id: str, **kwargs): + """ + **Deletes private application group from an Organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-private-application-group + + - organizationId (string): Organization ID + - id (string): ID + - force (boolean): Boolean flag to force delete application group, even if application group is in use by one or more rules. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplicationGroups"], + "operation": "deleteOrganizationSecureConnectPrivateApplicationGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplicationGroups/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSecureConnectPrivateApplicationGroup(self, organizationId: str, id: str): + """ + **Return the details of a specific private application group** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-private-application-group + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["secureConnect", "configure", "privateApplicationGroups"], + "operation": "getOrganizationSecureConnectPrivateApplicationGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplicationGroups/{id}" + + return self._session.get(metadata, resource) + + def getOrganizationSecureConnectPrivateApplications(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Provides a list of private applications for an Organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-private-applications + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - nameIncludes (string): Optional parameter to filter the private applications list by application and associated application group names, case is ignored + - applicationGroupIds (array): Optional parameter for filtering the list of private applications belonging to the application group identified by the given IDs. + - appTypes (array): Optional parameter for filtering the list of private applications by applications that contain at least one destination with the specified accessType value. + - sortBy (string): Optional parameter to specify the field used to sort objects. + - sortOrder (string): Optional parameter to specify the sort order. Default value is asc. + """ + + kwargs.update(locals()) + + if "sortBy" in kwargs: + options = ["modifiedAt", "name"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplications"], + "operation": "getOrganizationSecureConnectPrivateApplications", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplications" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "nameIncludes", + "applicationGroupIds", + "appTypes", + "sortBy", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "applicationGroupIds", + "appTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectPrivateApplications: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSecureConnectPrivateApplication(self, organizationId: str, name: str, destinations: list, **kwargs): + """ + **Adds a new private application to the Organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-private-application + + - organizationId (string): Organization ID + - name (string): Name of Application. This is required and should be unique across all applications for a given organization. Name cannot have any special characters other than spaces and hyphens. + - destinations (array): List of IP address destinations. + - description (string): Optional Text description for Application + - appProtocol (string): Protocol for communication between proxy to private application. Applicable for Browser Based Access only. + - sni (string): Optional SNI. Applicable for Browser Based Access only. SNI should be a valid domain. + - externalFQDN (string): Cisco or Customer Managed URL for Application. Applicable for Browser Based Access only. This field is system generated based on the application name and organization ID and overrides user input in payload. This value must be unique across all applications for a given organization. + - sslVerificationEnabled (boolean): Enable Upstream SSL verification for the internally hosted URL by the customer. Applicable for Browser Based Access only. Default is true. + - applicationGroupIds (array): List of application group ids attached to this Private Application + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplications"], + "operation": "createOrganizationSecureConnectPrivateApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplications" + + body_params = [ + "name", + "description", + "destinations", + "appProtocol", + "sni", + "externalFQDN", + "sslVerificationEnabled", + "applicationGroupIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSecureConnectPrivateApplication: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationSecureConnectPrivateApplication( + self, organizationId: str, id: str, name: str, destinations: list, **kwargs + ): + """ + **Updates a specific private application** + https://developer.cisco.com/meraki/api-v1/#!update-organization-secure-connect-private-application + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of Application. This is required and should be unique across all applications for a given organization. Name cannot have any special characters other than spaces and hyphens. + - destinations (array): List of IP address destinations. + - description (string): Optional Text description for Application + - appProtocol (string): Protocol for communication between proxy to private application. Applicable for Browser Based Access only. + - sni (string): Optional SNI. Applicable for Browser Based Access only. SNI should be a valid domain. + - externalFQDN (string): Cisco or Customer Managed URL for Application. Applicable for Browser Based Access only. This field is system generated based on the application name and organization ID and overrides user input in payload. This value must be unique across all applications for a given organization. + - sslVerificationEnabled (boolean): Enable Upstream SSL verification for the internally hosted URL by the customer. Applicable for Browser Based Access only. Default is true. + - applicationGroupIds (array): List of application group ids attached to this Private Application + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplications"], + "operation": "updateOrganizationSecureConnectPrivateApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplications/{id}" + + body_params = [ + "name", + "description", + "destinations", + "appProtocol", + "sni", + "externalFQDN", + "sslVerificationEnabled", + "applicationGroupIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSecureConnectPrivateApplication: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSecureConnectPrivateApplication(self, organizationId: str, id: str, **kwargs): + """ + **Deletes a specific private application** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-private-application + + - organizationId (string): Organization ID + - id (string): ID + - force (boolean): Boolean flag to force delete application, even if application is in use by one or more rules. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateApplications"], + "operation": "deleteOrganizationSecureConnectPrivateApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplications/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSecureConnectPrivateApplication(self, organizationId: str, id: str): + """ + **Return the details of a specific private application** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-private-application + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["secureConnect", "configure", "privateApplications"], + "operation": "getOrganizationSecureConnectPrivateApplication", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateApplications/{id}" + + return self._session.get(metadata, resource) + + def getOrganizationSecureConnectPrivateResourceGroups(self, organizationId: str): + """ + **Provides a list of the private resource groups in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-private-resource-groups + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["secureConnect", "configure", "privateResourceGroups"], + "operation": "getOrganizationSecureConnectPrivateResourceGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups" + + return self._session.get(metadata, resource) + + def createOrganizationSecureConnectPrivateResourceGroup(self, organizationId: str, name: str, **kwargs): + """ + **Adds a new private resource group to an organization.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-private-resource-group + + - organizationId (string): Organization ID + - name (string): Name of group. This is required and should be unique across all groups for a given organization. Name cannot have any special characters other than spaces and hyphens. + - description (string): Optional text description for a group. + - resourceIds (array): List of resource ids assigned to this group. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateResourceGroups"], + "operation": "createOrganizationSecureConnectPrivateResourceGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups" + + body_params = [ + "name", + "description", + "resourceIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSecureConnectPrivateResourceGroup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationSecureConnectPrivateResourceGroup(self, organizationId: str, id: str, name: str, **kwargs): + """ + **Updates a specific private resource group.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-secure-connect-private-resource-group + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of group. This is required and should be unique across all groups for a given organization. Name cannot have any special characters other than spaces and hyphens. + - description (string): Optional text description for a group. + - resourceIds (array): List of resource ids assigned to this group. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateResourceGroups"], + "operation": "updateOrganizationSecureConnectPrivateResourceGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups/{id}" + + body_params = [ + "name", + "description", + "resourceIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSecureConnectPrivateResourceGroup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSecureConnectPrivateResourceGroup(self, organizationId: str, id: str): + """ + **Deletes a specific private resource group.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-private-resource-group + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["secureConnect", "configure", "privateResourceGroups"], + "operation": "deleteOrganizationSecureConnectPrivateResourceGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSecureConnectPrivateResources(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Provides a list of private resources for an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-private-resources + + - 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 + - perPage (string): Number of resources to return for a paginated response. + - startingAfter (string): The name of the resource to start after for a paginated response. Use '' for the first page. + - endingBefore (string): The name of the resource to end before for a paginated response. Use '' for the final page. + - sortBy (string): Parameter to specify the field used to sort objects, by default, resources are returned by name asc. + - sortOrder (string): Parameter to specify the direction used to sort objects, by default, resources are returned by name asc. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateResources"], + "operation": "getOrganizationSecureConnectPrivateResources", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResources" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "sortBy", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectPrivateResources: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSecureConnectPrivateResource( + self, organizationId: str, name: str, accessTypes: list, resourceAddresses: list, **kwargs + ): + """ + **Adds a new private resource to the organization.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-private-resource + + - organizationId (string): Organization ID + - name (string): Name of resource. This is required and should be unique across all resources for a given organization. Name cannot have any special characters other than spaces and hyphens. + - accessTypes (array): List of access types. + - resourceAddresses (array): List of resource addresses Protocols must be unique in this list. + - description (string): Optional text description for a resource. + - resourceGroupIds (array): List of resource group ids attached to this resource. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateResources"], + "operation": "createOrganizationSecureConnectPrivateResource", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResources" + + body_params = [ + "name", + "description", + "accessTypes", + "resourceAddresses", + "resourceGroupIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSecureConnectPrivateResource: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationSecureConnectPrivateResource( + self, organizationId: str, id: str, name: str, accessTypes: list, resourceAddresses: list, **kwargs + ): + """ + **Updates a specific private resource.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-secure-connect-private-resource + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of resource. This is required and should be unique across all resources for a given organization.Name cannot have any special characters other than spaces and hyphens. + - accessTypes (array): List of access types. + - resourceAddresses (array): List of resource addresses Protocols must be unique in this list. + - description (string): Optional text description for resource. + - resourceGroupIds (array): List of resource group ids attached to this resource. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "privateResources"], + "operation": "updateOrganizationSecureConnectPrivateResource", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResources/{id}" + + body_params = [ + "name", + "description", + "accessTypes", + "resourceAddresses", + "resourceGroupIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSecureConnectPrivateResource: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSecureConnectPrivateResource(self, organizationId: str, id: str): + """ + **Deletes a specific private resource** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-private-resource + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["secureConnect", "configure", "privateResources"], + "operation": "deleteOrganizationSecureConnectPrivateResource", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/privateResources/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSecureConnectPublicApplications(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Provides a list of public applications for an Organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-public-applications + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - nameIncludes (string): Optional parameter to filter the public applications list by application name, case is ignored + - risks (array): List of risk levels to filter by + - categories (array): List of categories to filter by + - appTypes (array): List of app types to filter by + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. + - sortBy (string): Optional parameter to specify the field used to sort objects, by default, applications are returned by lastDetected desc + - sortOrder (string): Optional parameter to specify the sort order. Default value is desc. + """ + + kwargs.update(locals()) + + if "sortBy" in kwargs: + options = ["appType", "category", "lastDetected", "name", "risk"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "configure", "publicApplications"], + "operation": "getOrganizationSecureConnectPublicApplications", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/publicApplications" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "nameIncludes", + "risks", + "categories", + "appTypes", + "t0", + "t1", + "timespan", + "sortBy", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "risks", + "categories", + "appTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectPublicApplications: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSecureConnectRegions(self, organizationId: str, **kwargs): + """ + **List deployed cloud hubs and regions in this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-regions + + - organizationId (string): Organization ID + - regionType (string): Filter results by region type + """ + + kwargs.update(locals()) + + if "regionType" in kwargs: + options = ["CNHE", "CloudHub", "Region", "ThirdParty"] + assert kwargs["regionType"] in options, ( + f'''"regionType" cannot be "{kwargs["regionType"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "configure", "regions"], + "operation": "getOrganizationSecureConnectRegions", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/regions" + + query_params = [ + "regionType", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSecureConnectRegions: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def getOrganizationSecureConnectRemoteAccessLog(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the latest 5000 events logged by remote access.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-remote-access-log + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5000. 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. + - identityids (string): An identity ID or comma-delimited list of identity ID. + - identitytypes (string): An identity type or comma-delimited list of identity type. + - connectionevent (string): Specify the type of connection event. + - anyconnectversions (string): Specify a comma-separated list of AnyConnect Roaming Security module + versions to filter the data. + - osversions (string): Specify a comma-separated list of OS versions to filter the data. + """ + + kwargs.update(locals()) + + if "connectionevent" in kwargs: + options = ["connected", "disconnected", "failed"] + assert kwargs["connectionevent"] in options, ( + f'''"connectionevent" cannot be "{kwargs["connectionevent"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "monitor", "remoteAccessLog"], + "operation": "getOrganizationSecureConnectRemoteAccessLog", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/remoteAccessLog" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "identityids", + "identitytypes", + "connectionevent", + "anyconnectversions", + "osversions", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectRemoteAccessLog: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSecureConnectRemoteAccessLogsExports( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Provides a list of remote access logs exports for an Organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-remote-access-logs-exports + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - status (string): Filter exports by status. + """ + + kwargs.update(locals()) + + if "status" in kwargs: + options = ["complete", "continue", "error", "in_progress", "new", "zip"] + assert kwargs["status"] in options, ( + f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "configure", "remoteAccessLogsExports"], + "operation": "getOrganizationSecureConnectRemoteAccessLogsExports", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/remoteAccessLogsExports" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "status", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectRemoteAccessLogsExports: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSecureConnectRemoteAccessLogsExport(self, organizationId: str, from_: int, to: int, **kwargs): + """ + **Creates a export for a provided timestamp interval.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-remote-access-logs-export + + - organizationId (string): Organization ID + - from (integer): The start of the interval, must be within the past 30 days. + - to (integer): The end of the interval, must not exceed the current date. + """ + + kwargs = locals() + if "from_" in kwargs: + kwargs["from"] = kwargs.pop("from_") + + metadata = { + "tags": ["secureConnect", "configure", "remoteAccessLogsExports"], + "operation": "createOrganizationSecureConnectRemoteAccessLogsExport", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/remoteAccessLogsExports" + + body_params = [ + "from", + "to", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSecureConnectRemoteAccessLogsExport: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSecureConnectRemoteAccessLogsExportsDownload( + self, organizationId: str, id: str, fileType: str, **kwargs + ): + """ + **Redirects to the download link of the completed export.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-remote-access-logs-exports-download + + - organizationId (string): Organization ID + - id (string): Export ID. + - fileType (string): Export download file type. + """ + + kwargs = locals() + + metadata = { + "tags": ["secureConnect", "configure", "remoteAccessLogsExports", "download"], + "operation": "getOrganizationSecureConnectRemoteAccessLogsExportsDownload", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/remoteAccessLogsExports/download" + + query_params = [ + "id", + "fileType", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSecureConnectRemoteAccessLogsExportsDownload: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationSecureConnectRemoteAccessLogsExport(self, organizationId: str, id: str): + """ + **Return the details of a specific remote access logs export** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-remote-access-logs-export + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["secureConnect", "configure", "remoteAccessLogsExports"], + "operation": "getOrganizationSecureConnectRemoteAccessLogsExport", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/secureConnect/remoteAccessLogsExports/{id}" + + return self._session.get(metadata, resource) + + def getOrganizationSecureConnectSites(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List sites in this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-secure-connect-sites + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - search (string): If provided, filters results by search string + - enrolledState (string): Filter results by sites that have already been enrolled or can be enrolled. Acceptable values are 'enrolled' or 'enrollable + """ + + kwargs.update(locals()) + + if "enrolledState" in kwargs: + options = ["enrollable", "enrolled"] + assert kwargs["enrolledState"] in options, ( + f'''"enrolledState" cannot be "{kwargs["enrolledState"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["secureConnect", "configure", "sites"], + "operation": "getOrganizationSecureConnectSites", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/sites" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "search", + "enrolledState", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSecureConnectSites: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSecureConnectSite(self, organizationId: str, **kwargs): + """ + **Enroll sites in this organization to Secure Connect** + https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-site + + - organizationId (string): Organization ID + - enrollments (array): List of Meraki SD-WAN sites with the associated regions to be enrolled. + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "sites"], + "operation": "createOrganizationSecureConnectSite", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/sites" + + body_params = [ + "enrollments", + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationSecureConnectSite: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def deleteOrganizationSecureConnectSites(self, organizationId: str, **kwargs): + """ + **Detach given sites from Secure Connect** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-secure-connect-sites + + - organizationId (string): Organization ID + - sites (array): List of site IDs to detach + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["secureConnect", "configure", "sites"], + "operation": "deleteOrganizationSecureConnectSites", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/secureConnect/sites" + + return self._session.delete(metadata, resource) diff --git a/meraki/api/sensor.py b/meraki/api/sensor.py index 2807976a..9c901dee 100644 --- a/meraki/api/sensor.py +++ b/meraki/api/sensor.py @@ -74,9 +74,10 @@ def createDeviceSensorCommand(self, serial: str, operation: str, **kwargs): - serial (string): Serial - operation (string): Operation to run on the sensor. 'enableDownstreamPower', 'disableDownstreamPower', and 'cycleDownstreamPower' turn power on/off to the device that is connected downstream of an MT40 power monitor. 'refreshData' causes an MT15 or MT40 device to upload its latest readings so that they are immediately available in the Dashboard API. + - arguments (array): Additional options to provide to commands run on the sensor, each with a corresponding 'name' and 'value'. """ - kwargs = locals() + kwargs.update(locals()) if "operation" in kwargs: options = ["cycleDownstreamPower", "disableDownstreamPower", "enableDownstreamPower", "refreshData"] @@ -92,6 +93,7 @@ def createDeviceSensorCommand(self, serial: str, operation: str, **kwargs): resource = f"/devices/{serial}/sensor/commands" body_params = [ + "arguments", "operation", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -456,6 +458,103 @@ def getNetworkSensorRelationships(self, networkId: str): return self._session.get(metadata, resource) + def getNetworkSensorSchedules(self, networkId: str): + """ + **Returns a list of all sensor schedules.** + https://developer.cisco.com/meraki/api-v1/#!get-network-sensor-schedules + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["sensor", "configure", "schedules"], + "operation": "getNetworkSensorSchedules", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sensor/schedules" + + return self._session.get(metadata, resource) + + def getOrganizationSensorAlerts(self, organizationId: str, networkIds: list, total_pages=1, direction="next", **kwargs): + """ + **Return a list of sensor alert events** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sensor-alerts + + - organizationId (string): Organization ID + - networkIds (array): Filters alerts by network. For now, this must be a single network 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 365 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 365 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 365 days. The default is 365 days. + - sensorSerial (string): Filters alerts to those triggered by this sensor. + - triggerMetric (string): Filters alerts to those triggered by this metric. + """ + + kwargs.update(locals()) + + if "triggerMetric" in kwargs: + options = [ + "apparentPower", + "co2", + "current", + "door", + "frequency", + "humidity", + "indoorAirQuality", + "noise", + "pm25", + "powerFactor", + "realPower", + "temperature", + "tvoc", + "upstreamPower", + "voltage", + "water", + ] + assert kwargs["triggerMetric"] in options, ( + f'''"triggerMetric" cannot be "{kwargs["triggerMetric"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["sensor", "monitor", "alerts"], + "operation": "getOrganizationSensorAlerts", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sensor/alerts" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "sensorSerial", + "networkIds", + "triggerMetric", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSensorAlerts: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationSensorGatewaysConnectionsLatest(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **Returns latest sensor-gateway connectivity data.** @@ -564,6 +663,72 @@ def getOrganizationSensorReadingsHistory(self, organizationId: str, total_pages= return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationSensorReadingsHistoryByInterval(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return all reported readings from sensors in a given timespan, summarized as a series of intervals, sorted by interval start time in descending order** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sensor-readings-history-by-interval + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 730 days, 11 hours, 38 minutes, and 24 seconds from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 730 days, 11 hours, 38 minutes, and 24 seconds 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 730 days, 11 hours, 38 minutes, and 24 seconds. The default is 7 days. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 15, 120, 300, 900, 3600, 14400, 86400, 604800. The default is 86400. Interval is calculated if time params are provided. + - networkIds (array): Optional parameter to filter readings by network. + - serials (array): Optional parameter to filter readings by sensor. + - metrics (array): Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved. + - models (array): Optional parameter to filter readings by one or more models. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["sensor", "monitor", "readings", "history", "byInterval"], + "operation": "getOrganizationSensorReadingsHistoryByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sensor/readings/history/byInterval" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + "networkIds", + "serials", + "metrics", + "models", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "metrics", + "models", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSensorReadingsHistoryByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationSensorReadingsLatest(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **Return the latest available reading for each metric from each sensor, sorted by sensor serial** diff --git a/meraki/api/sm.py b/meraki/api/sm.py index c79ab088..af8fcfa5 100644 --- a/meraki/api/sm.py +++ b/meraki/api/sm.py @@ -1396,6 +1396,187 @@ def getOrganizationSmApnsCert(self, organizationId: str): return self._session.get(metadata, resource) + def createOrganizationSmAppleCloudEnrollmentSyncJob(self, organizationId: str, **kwargs): + """ + **Enqueue a sync job for an ADE account** + https://developer.cisco.com/meraki/api-v1/#!create-organization-sm-apple-cloud-enrollment-sync-job + + - organizationId (string): Organization ID + - adeAccountId (string): ADE Account ID + - fullSync (boolean): Whether or not job is full sync (defaults to full sync) + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["sm", "configure", "apple", "cloudEnrollment", "syncJobs"], + "operation": "createOrganizationSmAppleCloudEnrollmentSyncJob", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sm/apple/cloudEnrollment/syncJobs" + + body_params = [ + "adeAccountId", + "fullSync", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSmAppleCloudEnrollmentSyncJob: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSmAppleCloudEnrollmentSyncJob(self, organizationId: str, syncJobId: str): + """ + **Retrieve the status of an ADE sync job** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sm-apple-cloud-enrollment-sync-job + + - organizationId (string): Organization ID + - syncJobId (string): Sync job ID + """ + + metadata = { + "tags": ["sm", "configure", "apple", "cloudEnrollment", "syncJobs"], + "operation": "getOrganizationSmAppleCloudEnrollmentSyncJob", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + syncJobId = urllib.parse.quote(str(syncJobId), safe="") + resource = f"/organizations/{organizationId}/sm/apple/cloudEnrollment/syncJobs/{syncJobId}" + + return self._session.get(metadata, resource) + + def createOrganizationSmBulkEnrollmentToken(self, organizationId: str, networkId: str, expiresAt: str, **kwargs): + """ + **Create a PccBulkEnrollmentToken** + https://developer.cisco.com/meraki/api-v1/#!create-organization-sm-bulk-enrollment-token + + - organizationId (string): Organization ID + - networkId (string): The id of the associated node_group. + - expiresAt (string): The expiration date. + """ + + kwargs = locals() + + metadata = { + "tags": ["sm", "configure", "bulkEnrollment", "token"], + "operation": "createOrganizationSmBulkEnrollmentToken", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token" + + body_params = [ + "networkId", + "expiresAt", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSmBulkEnrollmentToken: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSmBulkEnrollmentToken(self, organizationId: str, tokenId: str): + """ + **Return a BulkEnrollmentToken** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sm-bulk-enrollment-token + + - organizationId (string): Organization ID + - tokenId (string): Token ID + """ + + metadata = { + "tags": ["sm", "configure", "bulkEnrollment", "token"], + "operation": "getOrganizationSmBulkEnrollmentToken", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + tokenId = urllib.parse.quote(str(tokenId), safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token/{tokenId}" + + return self._session.get(metadata, resource) + + def updateOrganizationSmBulkEnrollmentToken(self, organizationId: str, tokenId: str, **kwargs): + """ + **Update a PccBulkEnrollmentToken** + https://developer.cisco.com/meraki/api-v1/#!update-organization-sm-bulk-enrollment-token + + - organizationId (string): Organization ID + - tokenId (string): Token ID + - networkId (string): The id of the associated node_group. + - expiresAt (string): The expiration date. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["sm", "configure", "bulkEnrollment", "token"], + "operation": "updateOrganizationSmBulkEnrollmentToken", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + tokenId = urllib.parse.quote(str(tokenId), safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token/{tokenId}" + + body_params = [ + "networkId", + "expiresAt", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSmBulkEnrollmentToken: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSmBulkEnrollmentToken(self, organizationId: str, tokenId: str): + """ + **Delete a PccBulkEnrollmentToken** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-sm-bulk-enrollment-token + + - organizationId (string): Organization ID + - tokenId (string): Token ID + """ + + metadata = { + "tags": ["sm", "configure", "bulkEnrollment", "token"], + "operation": "deleteOrganizationSmBulkEnrollmentToken", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + tokenId = urllib.parse.quote(str(tokenId), safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token/{tokenId}" + + return self._session.delete(metadata, resource) + + def getOrganizationSmBulkEnrollmentTokens(self, organizationId: str): + """ + **List all BulkEnrollmentTokens for an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sm-bulk-enrollment-tokens + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["sm", "configure", "bulkEnrollment", "tokens"], + "operation": "getOrganizationSmBulkEnrollmentTokens", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sm/bulkEnrollment/tokens" + + return self._session.get(metadata, resource) + def updateOrganizationSmSentryPoliciesAssignments(self, organizationId: str, items: list, **kwargs): """ **Update an Organizations Sentry Policies using the provided list** diff --git a/meraki/api/support.py b/meraki/api/support.py new file mode 100644 index 00000000..9fe7ab7e --- /dev/null +++ b/meraki/api/support.py @@ -0,0 +1,24 @@ +import urllib + + +class Support(object): + def __init__(self, session): + super(Support, self).__init__() + self._session = session + + def getOrganizationSupportSalesRepresentatives(self, organizationId: str): + """ + **Returns the organization's sales representatives** + https://developer.cisco.com/meraki/api-v1/#!get-organization-support-sales-representatives + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["support", "monitor", "salesRepresentatives"], + "operation": "getOrganizationSupportSalesRepresentatives", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/support/salesRepresentatives" + + return self._session.get(metadata, resource) diff --git a/meraki/api/switch.py b/meraki/api/switch.py index d5cbf2dd..e9522480 100644 --- a/meraki/api/switch.py +++ b/meraki/api/switch.py @@ -6,14 +6,17 @@ def __init__(self, session): super(Switch, self).__init__() self._session = session - def getDeviceSwitchPorts(self, serial: str): + def getDeviceSwitchPorts(self, serial: str, **kwargs): """ **List the switch ports for a switch** https://developer.cisco.com/meraki/api-v1/#!get-device-switch-ports - serial (string): Serial + - hideDefaultPorts (boolean): Optional flag that, when true, will hide modular switchports that may not be connected to the device at the moment """ + kwargs.update(locals()) + metadata = { "tags": ["switch", "configure", "ports"], "operation": "getDeviceSwitchPorts", @@ -21,7 +24,18 @@ def getDeviceSwitchPorts(self, serial: str): serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/switch/ports" - return self._session.get(metadata, resource) + query_params = [ + "hideDefaultPorts", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getDeviceSwitchPorts: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) def cycleDeviceSwitchPorts(self, serial: str, ports: list, **kwargs): """ @@ -54,6 +68,46 @@ def cycleDeviceSwitchPorts(self, serial: str, ports: list, **kwargs): return self._session.post(metadata, resource, payload) + def updateDeviceSwitchPortsMirror(self, serial: str, source: dict, destination: dict, **kwargs): + """ + **Update a port mirror** + https://developer.cisco.com/meraki/api-v1/#!update-device-switch-ports-mirror + + - serial (string): The switch identifier + - source (object): Source ports mirror configuration + - destination (object): Destination port mirror configuration + - tags (array): Port mirror tags + - role (string): Switch role can be source or destination + - comment (string): My pretty comment + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "mirror"], + "operation": "updateDeviceSwitchPortsMirror", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/switch/ports/mirror" + + body_params = [ + "serial", + "source", + "destination", + "tags", + "role", + "comment", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateDeviceSwitchPortsMirror: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getDeviceSwitchPortsStatuses(self, serial: str, **kwargs): """ **Return the status for all the ports of a switch** @@ -154,6 +208,7 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): - vlan (integer): The VLAN of the switch port. For a trunk port, this is the native VLAN. A null value will clear the value set for trunk ports. - voiceVlan (integer): The voice VLAN of the switch port. Only applicable to access ports. - allowedVlans (string): The VLANs allowed on the switch port. Only applicable to trunk ports. + - activeVlans (string): The VLANs that are active on the switch port. Only applicable to trunk ports. - isolationEnabled (boolean): The isolation status of the switch port. - rstpEnabled (boolean): The rapid spanning tree protocol status. - stpGuard (string): The state of the STP guard ('disabled', 'root guard', 'bpdu guard' or 'loop guard'). @@ -214,6 +269,7 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): "vlan", "voiceVlan", "allowedVlans", + "activeVlans", "isolationEnabled", "rstpEnabled", "stpGuard", @@ -303,6 +359,12 @@ def createDeviceSwitchRoutingInterface(self, serial: str, name: str, **kwargs): - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. + - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. + - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. + - staticV4Dns1 (string): Primary IPv4 DNS server address + - staticV4Dns2 (string): Secondary IPv4 DNS server address - ospfSettings (object): The OSPF routing settings of the interface. - ipv6 (object): The IPv6 settings of the interface. - vrf (object): The VRF settings of the interface. Requires IOS XE 17.18 or higher @@ -337,6 +399,12 @@ def createDeviceSwitchRoutingInterface(self, serial: str, name: str, **kwargs): "multicastRouting", "vlanId", "defaultGateway", + "isSwitchDefaultGateway", + "uplinkV4", + "candidateUplinkV4", + "uplinkV6", + "staticV4Dns1", + "staticV4Dns2", "ospfSettings", "ipv6", "vrf", @@ -386,6 +454,12 @@ def updateDeviceSwitchRoutingInterface(self, serial: str, interfaceId: str, **kw - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. + - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. + - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. + - staticV4Dns1 (string): Primary IPv4 DNS server address + - staticV4Dns2 (string): Secondary IPv4 DNS server address - ospfSettings (object): The OSPF routing settings of the interface. - ipv6 (object): The IPv6 settings of the interface. - vrf (object): The VRF settings of the interface. Requires IOS XE 17.18 or higher @@ -417,6 +491,12 @@ def updateDeviceSwitchRoutingInterface(self, serial: str, interfaceId: str, **kw "multicastRouting", "vlanId", "defaultGateway", + "isSwitchDefaultGateway", + "uplinkV4", + "candidateUplinkV4", + "uplinkV6", + "staticV4Dns1", + "staticV4Dns2", "ospfSettings", "ipv6", "vrf", @@ -1388,14 +1468,17 @@ def updateNetworkSwitchDscpToCosMappings(self, networkId: str, mappings: list, * return self._session.put(metadata, resource, payload) - def getNetworkSwitchLinkAggregations(self, networkId: str): + def getNetworkSwitchLinkAggregations(self, networkId: str, **kwargs): """ **List link aggregation groups** https://developer.cisco.com/meraki/api-v1/#!get-network-switch-link-aggregations - networkId (string): Network ID + - serials (array): Optional parameter to filter by device serial numbers. Matches multiple exact serials. """ + kwargs.update(locals()) + metadata = { "tags": ["switch", "configure", "linkAggregations"], "operation": "getNetworkSwitchLinkAggregations", @@ -1403,7 +1486,26 @@ def getNetworkSwitchLinkAggregations(self, networkId: str): networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/linkAggregations" - return self._session.get(metadata, resource) + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getNetworkSwitchLinkAggregations: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) def createNetworkSwitchLinkAggregation(self, networkId: str, **kwargs): """ @@ -1652,6 +1754,126 @@ def updateNetworkSwitchPortSchedule(self, networkId: str, portScheduleId: str, * return self._session.put(metadata, resource, payload) + def getNetworkSwitchPortsProfiles(self, networkId: str): + """ + **List the port profiles in a network** + https://developer.cisco.com/meraki/api-v1/#!get-network-switch-ports-profiles + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "getNetworkSwitchPortsProfiles", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/ports/profiles" + + return self._session.get(metadata, resource) + + def createNetworkSwitchPortsProfile(self, networkId: str, **kwargs): + """ + **Create a port profile in a network** + https://developer.cisco.com/meraki/api-v1/#!create-network-switch-ports-profile + + - networkId (string): Network ID + - name (string): The name of the profile. + - description (string): Text describing the profile. + - tags (array): Space-seperated list of tags + - defaultRadiusProfileName (string): When present, the default RADIUS attribute value for RADIUS-based port profile application + - authentication (object): Authentication settings for RADIUS-based port profile application. + - port (object): Configuration settings for port profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "createNetworkSwitchPortsProfile", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/ports/profiles" + + body_params = [ + "name", + "description", + "tags", + "defaultRadiusProfileName", + "authentication", + "port", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkSwitchPortsProfile: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateNetworkSwitchPortsProfile(self, networkId: str, id: str, **kwargs): + """ + **Update a port profile in a network** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-ports-profile + + - networkId (string): Network ID + - id (string): ID + - name (string): The name of the profile. + - description (string): Text describing the profile. + - tags (array): Space-seperated list of tags + - defaultRadiusProfileName (string): When present, the default RADIUS attribute value for RADIUS-based port profile application + - authentication (object): Authentication settings for RADIUS-based port profile application. + - port (object): Configuration settings for port profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "updateNetworkSwitchPortsProfile", + } + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/networks/{networkId}/switch/ports/profiles/{id}" + + body_params = [ + "name", + "description", + "tags", + "defaultRadiusProfileName", + "authentication", + "port", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSwitchPortsProfile: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteNetworkSwitchPortsProfile(self, networkId: str, id: str): + """ + **Delete a port profile from a network** + https://developer.cisco.com/meraki/api-v1/#!delete-network-switch-ports-profile + + - networkId (string): Network ID + - id (string): ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "deleteNetworkSwitchPortsProfile", + } + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/networks/{networkId}/switch/ports/profiles/{id}" + + return self._session.delete(metadata, resource) + def getNetworkSwitchQosRules(self, networkId: str): """ **List quality of service rules** @@ -1855,6 +2077,64 @@ def updateNetworkSwitchQosRule(self, networkId: str, qosRuleId: str, **kwargs): return self._session.put(metadata, resource, payload) + def getNetworkSwitchRaGuardPolicy(self, networkId: str): + """ + **Return RA Guard settings** + https://developer.cisco.com/meraki/api-v1/#!get-network-switch-ra-guard-policy + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["switch", "configure", "raGuardPolicy"], + "operation": "getNetworkSwitchRaGuardPolicy", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/raGuardPolicy" + + return self._session.get(metadata, resource) + + def updateNetworkSwitchRaGuardPolicy(self, networkId: str, **kwargs): + """ + **Update RA Guard settings** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-ra-guard-policy + + - networkId (string): Network ID + - defaultPolicy (string): New Router Advertisers are 'allowed' or 'blocked'. Default value is 'allowed'. + - allowedServers (array): List the MAC addresses of Router Advertisers to permit on the network when defaultPolicy is set to blocked. + - blockedServers (array): List the MAC addresses of Router Advertisers to block on the network when defaultPolicy is set to allowed. + """ + + kwargs.update(locals()) + + if "defaultPolicy" in kwargs: + options = ["allowed", "blocked"] + assert kwargs["defaultPolicy"] in options, ( + f'''"defaultPolicy" cannot be "{kwargs["defaultPolicy"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["switch", "configure", "raGuardPolicy"], + "operation": "updateNetworkSwitchRaGuardPolicy", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/raGuardPolicy" + + body_params = [ + "defaultPolicy", + "allowedServers", + "blockedServers", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSwitchRaGuardPolicy: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkSwitchRoutingMulticast(self, networkId: str): """ **Return multicast settings for a network** @@ -2175,6 +2455,45 @@ def updateNetworkSwitchSettings(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) + def updateNetworkSwitchSpanningTree(self, networkId: str, **kwargs): + """ + **Updates Spanning Tree configuration** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-spanning-tree + + - networkId (string): Network ID + - enabled (boolean): Network-level spanning Tree enable + - mode (string): Catalyst Spanning Tree Protocol mode (mst, rpvst+) + - priorities (array): Spanning tree priority for switches/stacks or switch templates. An empty array will clear the priority settings. + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["mst", "rpvst+"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["switch", "configure", "spanningTree"], + "operation": "updateNetworkSwitchSpanningTree", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/spanningTree" + + body_params = [ + "enabled", + "mode", + "priorities", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSwitchSpanningTree: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkSwitchStacks(self, networkId: str): """ **List the switch stacks in a network** @@ -2225,6 +2544,41 @@ def createNetworkSwitchStack(self, networkId: str, name: str, serials: list, **k return self._session.post(metadata, resource, payload) + def updateNetworkSwitchStack(self, networkId: str, switchStackId: str, **kwargs): + """ + **Update a switch stack** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-stack + + - networkId (string): Network ID + - switchStackId (string): Switch stack ID + - name (string): The name of the stack + - members (array): The list of switches that should be in the stack + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "stacks"], + "operation": "updateNetworkSwitchStack", + } + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") + resource = f"/networks/{networkId}/switch/stacks/{switchStackId}" + + body_params = [ + "name", + "members", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSwitchStack: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkSwitchStack(self, networkId: str, switchStackId: str): """ **Show a switch stack** @@ -2296,6 +2650,49 @@ def addNetworkSwitchStack(self, networkId: str, switchStackId: str, serial: str, return self._session.post(metadata, resource, payload) + def updateNetworkSwitchStackPortsMirror( + self, networkId: str, switchStackId: str, source: dict, destination: dict, **kwargs + ): + """ + **Update switch port mirrors for switch stacks** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-stack-ports-mirror + + - networkId (string): Network ID + - switchStackId (string): Switch stack ID + - source (object): Source port details + - destination (object): Destination port Details + - tags (array): Port mirror tags + - role (string): Switch role can be source or destination + - comment (string): My pretty comment + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "stacks", "ports", "mirror"], + "operation": "updateNetworkSwitchStackPortsMirror", + } + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") + resource = f"/networks/{networkId}/switch/stacks/{switchStackId}/ports/mirror" + + body_params = [ + "source", + "destination", + "tags", + "role", + "comment", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSwitchStackPortsMirror: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def removeNetworkSwitchStack(self, networkId: str, switchStackId: str, serial: str, **kwargs): """ **Remove a switch from a stack** @@ -2391,6 +2788,12 @@ def createNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. + - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. + - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. + - staticV4Dns1 (string): Primary IPv4 DNS server address + - staticV4Dns2 (string): Secondary IPv4 DNS server address - ospfSettings (object): The OSPF routing settings of the interface. - ipv6 (object): The IPv6 settings of the interface. - vrf (object): The VRF settings of the interface. Requires IOS XE 17.18 or higher @@ -2426,6 +2829,12 @@ def createNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId "multicastRouting", "vlanId", "defaultGateway", + "isSwitchDefaultGateway", + "uplinkV4", + "candidateUplinkV4", + "uplinkV6", + "staticV4Dns1", + "staticV4Dns2", "ospfSettings", "ipv6", "vrf", @@ -2480,6 +2889,12 @@ def updateNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. + - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. + - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. + - staticV4Dns1 (string): Primary IPv4 DNS server address + - staticV4Dns2 (string): Secondary IPv4 DNS server address - ospfSettings (object): The OSPF routing settings of the interface. - ipv6 (object): The IPv6 settings of the interface. - vrf (object): The VRF settings of the interface. Requires IOS XE 17.18 or higher @@ -2512,6 +2927,12 @@ def updateNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId "multicastRouting", "vlanId", "defaultGateway", + "isSwitchDefaultGateway", + "uplinkV4", + "candidateUplinkV4", + "uplinkV6", + "staticV4Dns1", + "staticV4Dns2", "ospfSettings", "ipv6", "vrf", @@ -2911,14 +3332,68 @@ def updateNetworkSwitchStp(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) - def getOrganizationConfigTemplateSwitchProfiles(self, organizationId: str, configTemplateId: str): + def getOrganizationConfigTemplatesSwitchProfilesPortsMirrorsBySwitchProfile( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **List the switch templates for your switch template configuration** - https://developer.cisco.com/meraki/api-v1/#!get-organization-config-template-switch-profiles + **list the port mirror configurations in an organization by switch profile** + https://developer.cisco.com/meraki/api-v1/#!get-organization-config-templates-switch-profiles-ports-mirrors-by-switch-profile - organizationId (string): Organization ID - - configTemplateId (string): Config template 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 + - configTemplateIds (array): Optional parameter to filter the result set by the included set of config template IDs + - ids (array): A list of switch profile ids. The returned profiles will be filtered to only include these ids. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. + - 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": ["switch", "configure", "configTemplates", "profiles", "ports", "mirrors", "bySwitchProfile"], + "operation": "getOrganizationConfigTemplatesSwitchProfilesPortsMirrorsBySwitchProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/configTemplates/switch/profiles/ports/mirrors/bySwitchProfile" + + query_params = [ + "configTemplateIds", + "ids", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "configTemplateIds", + "ids", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationConfigTemplatesSwitchProfilesPortsMirrorsBySwitchProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationConfigTemplateSwitchProfiles(self, organizationId: str, configTemplateId: str): + """ + **List the switch templates for your switch template configuration** + https://developer.cisco.com/meraki/api-v1/#!get-organization-config-template-switch-profiles + + - organizationId (string): Organization ID + - configTemplateId (string): Config template ID + """ metadata = { "tags": ["switch", "configure", "configTemplates", "profiles"], @@ -2951,6 +3426,55 @@ def getOrganizationConfigTemplateSwitchProfilePorts(self, organizationId: str, c return self._session.get(metadata, resource) + def updateOrganizationConfigTemplateSwitchProfilePortsMirror( + self, organizationId: str, configTemplateId: str, profileId: str, source: dict, destination: dict, **kwargs + ): + """ + **Update a port mirror** + https://developer.cisco.com/meraki/api-v1/#!update-organization-config-template-switch-profile-ports-mirror + + - organizationId (string): Organization ID + - configTemplateId (string): Config template ID + - profileId (string): Profile ID + - source (object): Source ports mirror configuration + - destination (object): Destination port mirror configuration + - tags (array): Port mirror tags + - role (string): Switch role can be source or destination + - comment (string): My pretty comment + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "configTemplates", "profiles", "ports", "mirror"], + "operation": "updateOrganizationConfigTemplateSwitchProfilePortsMirror", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + configTemplateId = urllib.parse.quote(str(configTemplateId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") + resource = ( + f"/organizations/{organizationId}/configTemplates/{configTemplateId}/switch/profiles/{profileId}/ports/mirror" + ) + + body_params = [ + "source", + "destination", + "tags", + "role", + "comment", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationConfigTemplateSwitchProfilePortsMirror: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + def getOrganizationConfigTemplateSwitchProfilePort( self, organizationId: str, configTemplateId: str, profileId: str, portId: str ): @@ -2997,6 +3521,7 @@ def updateOrganizationConfigTemplateSwitchProfilePort( - vlan (integer): The VLAN of the switch template port. For a trunk port, this is the native VLAN. A null value will clear the value set for trunk ports. - voiceVlan (integer): The voice VLAN of the switch template port. Only applicable to access ports. - allowedVlans (string): The VLANs allowed on the switch template port. Only applicable to trunk ports. + - activeVlans (string): The VLANs that are active on the switch template port. Only applicable to trunk ports. - isolationEnabled (boolean): The isolation status of the switch template port. - rstpEnabled (boolean): The rapid spanning tree protocol status. - stpGuard (string): The state of the STP guard ('disabled', 'root guard', 'bpdu guard' or 'loop guard'). @@ -3059,6 +3584,7 @@ def updateOrganizationConfigTemplateSwitchProfilePort( "vlan", "voiceVlan", "allowedVlans", + "activeVlans", "isolationEnabled", "rstpEnabled", "stpGuard", @@ -3128,89 +3654,101 @@ def getOrganizationSummarySwitchPowerHistory(self, organizationId: str, **kwargs return self._session.get(metadata, resource, params) - def cloneOrganizationSwitchDevices(self, organizationId: str, sourceSerial: str, targetSerials: list, **kwargs): + def getOrganizationSwitchAlertsPoeByDevice(self, organizationId: str, networkIds: list, **kwargs): """ - **Clone port-level and some switch-level configuration settings from a source switch to one or more target switches** - https://developer.cisco.com/meraki/api-v1/#!clone-organization-switch-devices + **Gets all poe related alerts over a given network and returns information by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-alerts-poe-by-device - organizationId (string): Organization ID - - sourceSerial (string): Serial number of the source switch (must be on a network not bound to a template) - - targetSerials (array): Array of serial numbers of one or more target switches (must be on a network not bound to a template) + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. """ - kwargs = locals() + kwargs.update(locals()) metadata = { - "tags": ["switch", "configure", "devices"], - "operation": "cloneOrganizationSwitchDevices", + "tags": ["switch", "monitor", "alerts", "poe", "byDevice"], + "operation": "getOrganizationSwitchAlertsPoeByDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/devices/clone" + resource = f"/organizations/{organizationId}/switch/alerts/poe/byDevice" - body_params = [ - "sourceSerial", - "targetSerials", + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + 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()) if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"cloneOrganizationSwitchDevices: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"getOrganizationSwitchAlertsPoeByDevice: ignoring unrecognized kwargs: {invalid}" + ) - return self._session.post(metadata, resource, payload) + return self._session.get(metadata, resource, params) - def getOrganizationSwitchPortsBySwitch(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def aurora2OrganizationSwitchSwitchTemplates(self, organizationId: str): """ - **List the switchports in an organization by switch** - https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-by-switch + **List switch templates running IOS XE Catalyst firmware.** + https://developer.cisco.com/meraki/api-v1/#!aurora-2-organization-switch-switch-templates - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. 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. - - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. - - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. - - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. - - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. - - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. - - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. - - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. - - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + """ + + metadata = { + "tags": ["switch", "configure"], + "operation": "aurora2OrganizationSwitchSwitchTemplates", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/aurora2SwitchTemplates" + + return self._session.get(metadata, resource) + + def getOrganizationSwitchClientsConnectionsAuthenticationByClient(self, organizationId: str, **kwargs): + """ + **Summarizes authentication outcomes per switch client across an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-clients-connections-authentication-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. """ kwargs.update(locals()) metadata = { - "tags": ["switch", "configure", "ports", "bySwitch"], - "operation": "getOrganizationSwitchPortsBySwitch", + "tags": ["switch", "monitor", "clients", "connections", "authentication", "byClient"], + "operation": "getOrganizationSwitchClientsConnectionsAuthenticationByClient", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/ports/bySwitch" + resource = f"/organizations/{organizationId}/switch/clients/connections/authentication/byClient" query_params = [ - "perPage", - "startingAfter", - "endingBefore", - "configurationUpdatedAfter", - "mac", - "macs", - "name", "networkIds", - "portProfileIds", - "serial", - "serials", + "t0", + "t1", + "timespan", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "macs", "networkIds", - "portProfileIds", - "serials", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3221,66 +3759,43 @@ def getOrganizationSwitchPortsBySwitch(self, organizationId: str, total_pages=1, all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationSwitchPortsBySwitch: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"getOrganizationSwitchClientsConnectionsAuthenticationByClient: ignoring unrecognized kwargs: {invalid}" + ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) - def getOrganizationSwitchPortsClientsOverviewByDevice( - self, organizationId: str, total_pages=1, direction="next", **kwargs - ): + def getOrganizationSwitchClientsConnectionsDhcpByClient(self, organizationId: str, **kwargs): """ - **List the number of clients for all switchports with at least one online client in an organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-clients-overview-by-device + **Get IP assignment for all clients in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-clients-connections-dhcp-by-client - 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 - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 20. - - 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. - - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. - - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. - - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. - - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. - - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. - - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. - - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. - - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 2 hours. """ kwargs.update(locals()) metadata = { - "tags": ["switch", "monitor", "ports", "clients", "overview", "byDevice"], - "operation": "getOrganizationSwitchPortsClientsOverviewByDevice", + "tags": ["switch", "monitor", "clients", "connections", "dhcp", "byClient"], + "operation": "getOrganizationSwitchClientsConnectionsDhcpByClient", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/ports/clients/overview/byDevice" + resource = f"/organizations/{organizationId}/switch/clients/connections/dhcp/byClient" query_params = [ + "networkIds", "t0", + "t1", "timespan", - "perPage", - "startingAfter", - "endingBefore", - "configurationUpdatedAfter", - "mac", - "macs", - "name", - "networkIds", - "portProfileIds", - "serial", - "serials", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "macs", "networkIds", - "portProfileIds", - "serials", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3292,96 +3807,124 @@ def getOrganizationSwitchPortsClientsOverviewByDevice( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationSwitchPortsClientsOverviewByDevice: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationSwitchClientsConnectionsDhcpByClient: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) - def getOrganizationSwitchPortsOverview(self, organizationId: str, **kwargs): + def getOrganizationSwitchClientsConnectionsSwitchPortStatusByClient(self, organizationId: str, **kwargs): """ - **Returns the counts of all active ports for the requested timespan, grouped by speed** - https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-overview + **Switch port status by client.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-clients-connections-switch-port-status-by-client - organizationId (string): Organization ID - - t0 (string): The beginning of the timespan for the data. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 186 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 greater than or equal to 12 hours and be less than or equal to 186 days. The default is 1 day. + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. """ kwargs.update(locals()) metadata = { - "tags": ["switch", "monitor", "ports", "overview"], - "operation": "getOrganizationSwitchPortsOverview", + "tags": ["switch", "monitor", "clients", "connections", "switchPortStatus", "byClient"], + "operation": "getOrganizationSwitchClientsConnectionsSwitchPortStatusByClient", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/ports/overview" + resource = f"/organizations/{organizationId}/switch/clients/connections/switchPortStatus/byClient" query_params = [ + "networkIds", "t0", "t1", "timespan", ] 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()) + if self._session._validate_kwargs: - all_params = query_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationSwitchPortsOverview: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"getOrganizationSwitchClientsConnectionsSwitchPortStatusByClient: ignoring unrecognized kwargs: {invalid}" + ) return self._session.get(metadata, resource, params) - def getOrganizationSwitchPortsStatusesBySwitch(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def cloneOrganizationSwitchProfilesToTemplateNetwork(self, organizationId: str, **kwargs): """ - **List the switchports in an organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-statuses-by-switch + **Clone existing switch templates into a destination template network.** + https://developer.cisco.com/meraki/api-v1/#!clone-organization-switch-profiles-to-template-network - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. - - 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. - - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. - - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. - - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. - - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. - - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. - - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. - - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. - - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + - profileIds (array): Switch profile IDs to clone + - templateNodeGroupId (string): Destination template network ID """ kwargs.update(locals()) metadata = { - "tags": ["switch", "monitor", "ports", "statuses", "bySwitch"], - "operation": "getOrganizationSwitchPortsStatusesBySwitch", + "tags": ["switch", "configure"], + "operation": "cloneOrganizationSwitchProfilesToTemplateNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/ports/statuses/bySwitch" + resource = f"/organizations/{organizationId}/switch/cloneProfilesToTemplateNetwork" - query_params = [ - "perPage", - "startingAfter", - "endingBefore", - "configurationUpdatedAfter", - "mac", - "macs", - "name", - "networkIds", - "portProfileIds", - "serial", - "serials", + body_params = [ + "profileIds", + "templateNodeGroupId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"cloneOrganizationSwitchProfilesToTemplateNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchConnectivityLanLinkErrorsByDeviceByPort(self, organizationId: str, networkIds: list, **kwargs): + """ + **Lan link errors by device and port.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-connectivity-lan-link-errors-by-device-by-port + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "connectivity", "lanLink", "errors", "byDevice", "byPort"], + "operation": "getOrganizationSwitchConnectivityLanLinkErrorsByDeviceByPort", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/connectivity/lanLink/errors/byDevice/byPort" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "macs", "networkIds", - "portProfileIds", - "serials", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3393,26 +3936,214 @@ def getOrganizationSwitchPortsStatusesBySwitch(self, organizationId: str, total_ invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationSwitchPortsStatusesBySwitch: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationSwitchConnectivityLanLinkErrorsByDeviceByPort: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) - def getOrganizationSwitchPortsTopologyDiscoveryByDevice( + def getOrganizationSwitchConnectivityLanStpErrorsByDeviceByPort(self, organizationId: str, networkIds: list, **kwargs): + """ + **Lan STP errors by device and port.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-connectivity-lan-stp-errors-by-device-by-port + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "connectivity", "lanStp", "errors", "byDevice", "byPort"], + "operation": "getOrganizationSwitchConnectivityLanStpErrorsByDeviceByPort", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/connectivity/lanStp/errors/byDevice/byPort" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchConnectivityLanStpErrorsByDeviceByPort: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationSwitchConnectivityVrrpFailuresByDevice(self, organizationId: str, networkIds: list, **kwargs): + """ + **Gets all vrrp related alerts over a given network and returns information by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-connectivity-vrrp-failures-by-device + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "connectivity", "vrrp", "failures", "byDevice"], + "operation": "getOrganizationSwitchConnectivityVrrpFailuresByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/connectivity/vrrp/failures/byDevice" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchConnectivityVrrpFailuresByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def cloneOrganizationSwitchDevices(self, organizationId: str, sourceSerial: str, targetSerials: list, **kwargs): + """ + **Clone port-level and some switch-level configuration settings from a source switch to one or more target switches** + https://developer.cisco.com/meraki/api-v1/#!clone-organization-switch-devices + + - organizationId (string): Organization ID + - sourceSerial (string): Serial number of the source switch (must be on a network not bound to a template) + - targetSerials (array): Array of serial numbers of one or more target switches (must be on a network not bound to a template) + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "devices"], + "operation": "cloneOrganizationSwitchDevices", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/devices/clone" + + body_params = [ + "sourceSerial", + "targetSerials", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"cloneOrganizationSwitchDevices: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchDevicesSystemQueuesHistoryBySwitchByInterval( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **List most recently seen LLDP/CDP discovery and topology information per switch port in an organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-topology-discovery-by-device + **Return a historical record of packet transmission and loss, broken down by protocol, for insight into switch device health.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-devices-system-queues-history-by-switch-by-interval - 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 + - 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. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided. + - networkIds (array): Optional parameter to filter connectivity history by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter connectivity history by switch. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "devices", "system", "queues", "history", "bySwitch", "byInterval"], + "operation": "getOrganizationSwitchDevicesSystemQueuesHistoryBySwitchByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/devices/system/queues/history/bySwitch/byInterval" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchDevicesSystemQueuesHistoryBySwitchByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsBySwitch(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the switchports in an organization by switch** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-by-switch + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. 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. + - extendedParams (boolean): Optional flag to return all of the switchport data vs smaller dataset + - hideDefaultPorts (boolean): Optional flag that, when true, will hide modular switchports that may not be connected to the device at the moment + - type (array): Optional parameter to filter switchports by type ('access', 'trunk', 'stack', 'routed', 'svl' or 'dad'). All types are selected if not supplied. - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. @@ -3426,18 +4157,19 @@ def getOrganizationSwitchPortsTopologyDiscoveryByDevice( kwargs.update(locals()) metadata = { - "tags": ["switch", "monitor", "ports", "topology", "discovery", "byDevice"], - "operation": "getOrganizationSwitchPortsTopologyDiscoveryByDevice", + "tags": ["switch", "configure", "ports", "bySwitch"], + "operation": "getOrganizationSwitchPortsBySwitch", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/ports/topology/discovery/byDevice" + resource = f"/organizations/{organizationId}/switch/ports/bySwitch" query_params = [ - "t0", - "timespan", "perPage", "startingAfter", "endingBefore", + "extendedParams", + "hideDefaultPorts", + "type", "configurationUpdatedAfter", "mac", "macs", @@ -3450,6 +4182,7 @@ def getOrganizationSwitchPortsTopologyDiscoveryByDevice( params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ + "type", "macs", "networkIds", "portProfileIds", @@ -3464,27 +4197,23 @@ def getOrganizationSwitchPortsTopologyDiscoveryByDevice( all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning( - f"getOrganizationSwitchPortsTopologyDiscoveryByDevice: ignoring unrecognized kwargs: {invalid}" - ) + self._session._logger.warning(f"getOrganizationSwitchPortsBySwitch: ignoring unrecognized kwargs: {invalid}") return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationSwitchPortsUsageHistoryByDeviceByInterval( + def getOrganizationSwitchPortsClientsOverviewByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **List the historical usage and traffic data of switchports in an organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-usage-history-by-device-by-interval + **List the number of clients for all switchports with at least one online client in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-clients-overview-by-device - 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 - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. - - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 10. + - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 20. - 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. - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. @@ -3500,17 +4229,15 @@ def getOrganizationSwitchPortsUsageHistoryByDeviceByInterval( kwargs.update(locals()) metadata = { - "tags": ["switch", "monitor", "ports", "usage", "history", "byDevice", "byInterval"], - "operation": "getOrganizationSwitchPortsUsageHistoryByDeviceByInterval", + "tags": ["switch", "monitor", "ports", "clients", "overview", "byDevice"], + "operation": "getOrganizationSwitchPortsClientsOverviewByDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/switch/ports/usage/history/byDevice/byInterval" + resource = f"/organizations/{organizationId}/switch/ports/clients/overview/byDevice" query_params = [ "t0", - "t1", "timespan", - "interval", "perPage", "startingAfter", "endingBefore", @@ -3541,7 +4268,2962 @@ def getOrganizationSwitchPortsUsageHistoryByDeviceByInterval( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationSwitchPortsUsageHistoryByDeviceByInterval: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationSwitchPortsClientsOverviewByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsMirrorsBySwitch(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **list the port mirror configurations in an organization by switch** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-mirrors-by-switch + + - 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): Optional parameter to filter the result set by the included set of network IDs + - serials (array): A list of serial numbers. The returned devices will be filtered to only include these serials. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. + - 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": ["switch", "configure", "ports", "mirrors", "bySwitch"], + "operation": "getOrganizationSwitchPortsMirrorsBySwitch", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/mirrors/bySwitch" + + query_params = [ + "networkIds", + "serials", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsMirrorsBySwitch: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsOverview(self, organizationId: str, **kwargs): + """ + **Returns the counts of all active ports for the requested timespan, grouped by speed** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-overview + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 186 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 greater than or equal to 12 hours and be less than or equal to 186 days. The default is 1 day. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "ports", "overview"], + "operation": "getOrganizationSwitchPortsOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/overview" + + query_params = [ + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSwitchPortsOverview: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def getOrganizationSwitchPortsProfiles(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the port profiles in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles + + - 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): Return the port profiles for the specified network(s) + - formattedStaticAssignments (boolean): Returns the list of static switchports that are assigned to the switchport profile + - searchQuery (string): Optional parameter to filter the result set by the search query + - radiusProfileEnabled (boolean): Optional parameter. If true, only return port profiles with a radius profile enabled + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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": ["switch", "configure", "ports", "profiles"], + "operation": "getOrganizationSwitchPortsProfiles", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles" + + query_params = [ + "networkIds", + "formattedStaticAssignments", + "searchQuery", + "radiusProfileEnabled", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSwitchPortsProfiles: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchPortsProfile(self, organizationId: str, **kwargs): + """ + **Create a port profile in an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-ports-profile + + - organizationId (string): Organization ID + - name (string): The name of the profile. + - description (string): Text describing the profile. + - isOrganizationWide (boolean): The scope of the profile whether it is organization level or network level + - networks (object): The networks which are included/excluded in the profile + - networkId (string): The network identifier + - tags (array): Space-seperated list of tags + - defaultRadiusProfileName (string): When present, the default RADIUS attribute value for RADIUS-based port profile application + - authentication (object): Authentication settings for RADIUS-based port profile application. + - port (object): Configuration settings for port profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "createOrganizationSwitchPortsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles" + + body_params = [ + "name", + "description", + "isOrganizationWide", + "networks", + "networkId", + "tags", + "defaultRadiusProfileName", + "authentication", + "port", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationSwitchPortsProfile: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def batchOrganizationSwitchPortsProfilesAssignmentsAssign(self, organizationId: str, items: list, **kwargs): + """ + **Batch assign or unassign port profiles to switch ports** + https://developer.cisco.com/meraki/api-v1/#!batch-organization-switch-ports-profiles-assignments-assign + + - organizationId (string): Organization ID + - items (array): Array of assignment operations (max 100) + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "assignments"], + "operation": "batchOrganizationSwitchPortsProfilesAssignmentsAssign", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/assignments/batchAssign" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"batchOrganizationSwitchPortsProfilesAssignmentsAssign: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchPortsProfilesAssignmentsByPort( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the port profile assignments in an organization, grouped by port** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-assignments-by-port + + - 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 + - profileIds (array): Filter by specific profile IDs + - serials (array): Filter by switch serials + - networkIds (array): Filter by network IDs + - templateIds (array): Filter by template (node_profile) IDs + - types (array): Filter by port type: switch, template + - assignmentTypes (array): Filter by assignment type: direct, template, exception + - isActive (boolean): Filter by assignment status. true: only ports with active assignments, showing only active assignments per port. false: only ports with inactive assignments, showing only inactive assignments per port. Omit: all ports with all assignment layers. + - 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": ["switch", "configure", "ports", "profiles", "assignments", "byPort"], + "operation": "getOrganizationSwitchPortsProfilesAssignmentsByPort", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/assignments/byPort" + + query_params = [ + "profileIds", + "serials", + "networkIds", + "templateIds", + "types", + "assignmentTypes", + "isActive", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "profileIds", + "serials", + "networkIds", + "templateIds", + "types", + "assignmentTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsProfilesAssignmentsByPort: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsProfilesAssignmentsBySwitch( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the port profile assignments in an organization, grouped by switch** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-assignments-by-switch + + - 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 + - profileIds (array): Filter by specific profile IDs + - serials (array): Filter by switch serials + - networkIds (array): Filter by network IDs + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. 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": ["switch", "configure", "ports", "profiles", "assignments", "bySwitch"], + "operation": "getOrganizationSwitchPortsProfilesAssignmentsBySwitch", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/assignments/bySwitch" + + query_params = [ + "profileIds", + "serials", + "networkIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "profileIds", + "serials", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsProfilesAssignmentsBySwitch: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsProfilesAutomations(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **list the automation port profiles in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-automations + + - 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 + - ids (array): Optional parameter to filter the result set by the included set of automation IDs + - networkIds (array): Optional parameter to filter the result set by the associated networks. + - isOrganizationWide (string): Optional parameter to filter the result set by automations org-wide flag. + - searchQuery (string): Optional parameter to filter the result set by the search query + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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": ["switch", "configure", "ports", "profiles", "automations"], + "operation": "getOrganizationSwitchPortsProfilesAutomations", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/automations" + + query_params = [ + "ids", + "networkIds", + "isOrganizationWide", + "searchQuery", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "ids", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsProfilesAutomations: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchPortsProfilesAutomation(self, organizationId: str, **kwargs): + """ + **Create a port profile automation for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-ports-profiles-automation + + - organizationId (string): Organization ID + - name (string): Name of the port profile automation. + - description (string): Text describing the port profile automation. + - fallbackProfile (object): Configuration settings for port profile + - rules (array): Configuration settings for port profile automation rules + - assignedSwitchPorts (array): assigned switch ports + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "automations"], + "operation": "createOrganizationSwitchPortsProfilesAutomation", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/automations" + + body_params = [ + "name", + "description", + "fallbackProfile", + "rules", + "assignedSwitchPorts", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchPortsProfilesAutomation: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationSwitchPortsProfilesAutomation(self, organizationId: str, id: str, **kwargs): + """ + **Update a port profile automation in an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-switch-ports-profiles-automation + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of the port profile automation. + - description (string): Text describing the port profile automation. + - fallbackProfile (object): Configuration settings for port profile + - rules (array): Configuration settings for port profile automation rules + - assignedSwitchPorts (array): assigned switch ports + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "automations"], + "operation": "updateOrganizationSwitchPortsProfilesAutomation", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/automations/{id}" + + body_params = [ + "name", + "description", + "fallbackProfile", + "rules", + "assignedSwitchPorts", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSwitchPortsProfilesAutomation: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSwitchPortsProfilesAutomation(self, organizationId: str, id: str): + """ + **Delete an automation port profile from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-ports-profiles-automation + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "automations"], + "operation": "deleteOrganizationSwitchPortsProfilesAutomation", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/automations/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchPortsProfilesNetworksAssignments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Fetch all Network - Smart Port Profile associations for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-networks-assignments + + - 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 + - perPage (integer): Number of records per page + - page (integer): Page number + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "networks", "assignments"], + "operation": "getOrganizationSwitchPortsProfilesNetworksAssignments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments" + + query_params = [ + "perPage", + "page", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsProfilesNetworksAssignments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchPortsProfilesNetworksAssignment( + self, organizationId: str, type: str, profile: dict, network: dict, **kwargs + ): + """ + **Create Network and Smart Ports Profile association for a specific profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-ports-profiles-networks-assignment + + - organizationId (string): Organization ID + - type (string): Type of association + - profile (object): Smart Port Profile object + - network (object): Network object + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "networks", "assignments"], + "operation": "createOrganizationSwitchPortsProfilesNetworksAssignment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments" + + body_params = [ + "type", + "profile", + "network", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchPortsProfilesNetworksAssignment: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def batchOrganizationSwitchPortsProfilesNetworksAssignmentsCreate(self, organizationId: str, items: list, **kwargs): + """ + **Batch Create Network and Smart Ports Profile associations for a specific profile** + https://developer.cisco.com/meraki/api-v1/#!batch-organization-switch-ports-profiles-networks-assignments-create + + - organizationId (string): Organization ID + - items (array): Array of network and profile associations + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "networks", "assignments"], + "operation": "batchOrganizationSwitchPortsProfilesNetworksAssignmentsCreate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments/batchCreate" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"batchOrganizationSwitchPortsProfilesNetworksAssignmentsCreate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def bulkOrganizationSwitchPortsProfilesNetworksAssignmentsDelete(self, organizationId: str, items: list, **kwargs): + """ + **Bulk delete Network and Smart Port Profile associations** + https://developer.cisco.com/meraki/api-v1/#!bulk-organization-switch-ports-profiles-networks-assignments-delete + + - organizationId (string): Organization ID + - items (array): Array of assignments to delete + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "networks", "assignments"], + "operation": "bulkOrganizationSwitchPortsProfilesNetworksAssignmentsDelete", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments/bulkDelete" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"bulkOrganizationSwitchPortsProfilesNetworksAssignmentsDelete: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def deleteOrganizationSwitchPortsProfilesNetworksAssignment(self, organizationId: str, assignmentId: str): + """ + **Delete Network and Smart Port profile association for a specific profile** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-ports-profiles-networks-assignment + + - organizationId (string): Organization ID + - assignmentId (string): Assignment ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "networks", "assignments"], + "operation": "deleteOrganizationSwitchPortsProfilesNetworksAssignment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + assignmentId = urllib.parse.quote(str(assignmentId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments/{assignmentId}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchPortsProfilesOverviewByProfile( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the port profiles in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-overview-by-profile + + - 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): Return the port profiles for the specified network(s) + - formattedStaticAssignments (boolean): Returns the list of static switchports that are assgined to the switchport profile + - searchQuery (string): Optional parameter to filter the result set by the search query + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. + - 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": ["switch", "configure", "ports", "profiles", "overview", "byProfile"], + "operation": "getOrganizationSwitchPortsProfilesOverviewByProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/overview/byProfile" + + query_params = [ + "networkIds", + "formattedStaticAssignments", + "searchQuery", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsProfilesOverviewByProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsProfilesRadiusAssignments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the port profile RADIUS assignments** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-radius-assignments + + - 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): If present, the networks to limit the assignments to + - portProfileIds (array): If present, the port profiles to limit the assignments to + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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": ["switch", "configure", "ports", "profiles", "radius", "assignments"], + "operation": "getOrganizationSwitchPortsProfilesRadiusAssignments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments" + + query_params = [ + "networkIds", + "portProfileIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "portProfileIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsProfilesRadiusAssignments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: str, network: dict, **kwargs): + """ + **Create a port profile RADIUS assignment** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-ports-profiles-radius-assignment + + - organizationId (string): Organization ID + - network (object): The network where the RADIUS name is assigned + - portProfile (object): The assigned port profile + - radius (object): The RADIUS options for this assignment + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "radius", "assignments"], + "operation": "createOrganizationSwitchPortsProfilesRadiusAssignment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments" + + body_params = [ + "network", + "portProfile", + "radius", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchPortsProfilesRadiusAssignment: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: str, id: str): + """ + **Return a port profile RADIUS assignment** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profiles-radius-assignment + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "radius", "assignments"], + "operation": "getOrganizationSwitchPortsProfilesRadiusAssignment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments/{id}" + + return self._session.get(metadata, resource) + + def updateOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: str, id: str, **kwargs): + """ + **Update a port profile RADIUS assignment** + https://developer.cisco.com/meraki/api-v1/#!update-organization-switch-ports-profiles-radius-assignment + + - organizationId (string): Organization ID + - id (string): ID + - network (object): The network where the RADIUS name is assigned + - portProfile (object): The assigned port profile + - radius (object): The RADIUS options for this assignment + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "radius", "assignments"], + "operation": "updateOrganizationSwitchPortsProfilesRadiusAssignment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments/{id}" + + body_params = [ + "network", + "portProfile", + "radius", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSwitchPortsProfilesRadiusAssignment: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: str, id: str): + """ + **Deletes a port profile RADIUS assignment** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-ports-profiles-radius-assignment + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles", "radius", "assignments"], + "operation": "deleteOrganizationSwitchPortsProfilesRadiusAssignment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchPortsProfile(self, organizationId: str, id: str): + """ + **Get detailed information about a port profile** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-profile + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "getOrganizationSwitchPortsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/{id}" + + return self._session.get(metadata, resource) + + def updateOrganizationSwitchPortsProfile(self, organizationId: str, id: str, **kwargs): + """ + **Update a port profile in an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-switch-ports-profile + + - organizationId (string): Organization ID + - id (string): ID + - name (string): The name of the profile. + - description (string): Text describing the profile. + - isOrganizationWide (boolean): The scope of the profile whether it is organization level or network level + - networks (object): The networks which are included/excluded in the profile + - networkId (string): The network identifier + - tags (array): Space-seperated list of tags + - defaultRadiusProfileName (string): When present, the default RADIUS attribute value for RADIUS-based port profile application + - authentication (object): Authentication settings for RADIUS-based port profile application. + - port (object): Configuration settings for port profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "updateOrganizationSwitchPortsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/{id}" + + body_params = [ + "name", + "description", + "isOrganizationWide", + "networks", + "networkId", + "tags", + "defaultRadiusProfileName", + "authentication", + "port", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationSwitchPortsProfile: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSwitchPortsProfile(self, organizationId: str, id: str): + """ + **Delete a port profile from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-ports-profile + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["switch", "configure", "ports", "profiles"], + "operation": "deleteOrganizationSwitchPortsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/switch/ports/profiles/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchPortsStatusesBySwitch(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the switchports in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-statuses-by-switch + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. + - 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. + - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. + - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. + - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. + - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. + - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. + - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. + - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. + - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "ports", "statuses", "bySwitch"], + "operation": "getOrganizationSwitchPortsStatusesBySwitch", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/statuses/bySwitch" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "configurationUpdatedAfter", + "mac", + "macs", + "name", + "networkIds", + "portProfileIds", + "serial", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "macs", + "networkIds", + "portProfileIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsStatusesBySwitch: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsStatusesPacketsByDeviceByPort(self, organizationId: str, networkIds: list, **kwargs): + """ + **Switch port packets by device and port.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-statuses-packets-by-device-by-port + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 1200, 14400, 86400. The default is 14400. Interval is calculated if time params are provided. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "ports", "statuses", "packets", "byDevice", "byPort"], + "operation": "getOrganizationSwitchPortsStatusesPacketsByDeviceByPort", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/statuses/packets/byDevice/byPort" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + "interval", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsStatusesPacketsByDeviceByPort: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationSwitchPortsTopologyDiscoveryByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List most recently seen LLDP/CDP discovery and topology information per switch port in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-topology-discovery-by-device + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. + - 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. + - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. + - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. + - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. + - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. + - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. + - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. + - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. + - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "ports", "topology", "discovery", "byDevice"], + "operation": "getOrganizationSwitchPortsTopologyDiscoveryByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/topology/discovery/byDevice" + + query_params = [ + "t0", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + "configurationUpdatedAfter", + "mac", + "macs", + "name", + "networkIds", + "portProfileIds", + "serial", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "macs", + "networkIds", + "portProfileIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsTopologyDiscoveryByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsTransceiversReadingsHistoryBySwitch( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Return time-series digital optical monitoring (DOM) readings for ports on each DOM-enabled switch in an organization, in addition to thresholds for each relevant Small Form Factor Pluggable (SFP) module.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-transceivers-readings-history-by-switch + + - 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 + - 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. + - 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 30 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 30 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided. + - networkIds (array): Networks for which information should be gathered. + - serials (array): Optional parameter to filter usage by switch. + - portIds (array): Optional parameter to filter usage by port ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "ports", "transceivers", "readings", "history", "bySwitch"], + "operation": "getOrganizationSwitchPortsTransceiversReadingsHistoryBySwitch", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/transceivers/readings/history/bySwitch" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + "networkIds", + "serials", + "portIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "portIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsTransceiversReadingsHistoryBySwitch: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPortsUsageHistoryByDeviceByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the historical usage and traffic data of switchports in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-usage-history-by-device-by-interval + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 10. + - 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. + - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. + - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. + - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. + - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. + - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. + - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. + - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. + - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "ports", "usage", "history", "byDevice", "byInterval"], + "operation": "getOrganizationSwitchPortsUsageHistoryByDeviceByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/ports/usage/history/byDevice/byInterval" + + query_params = [ + "t0", + "t1", + "timespan", + "interval", + "perPage", + "startingAfter", + "endingBefore", + "configurationUpdatedAfter", + "mac", + "macs", + "name", + "networkIds", + "portProfileIds", + "serial", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "macs", + "networkIds", + "portProfileIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchPortsUsageHistoryByDeviceByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpAutonomousSystems(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the autonomous systems configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-autonomous-systems + + - 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 + - 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. + - numbers (array): Optional parameter to filter autonomous systems by number. This filter uses multiple exact matches. + - autonomousSystemIds (array): Optional parameter to filter autonomous systems by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "autonomousSystems"], + "operation": "getOrganizationSwitchRoutingBgpAutonomousSystems", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "numbers", + "autonomousSystemIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "numbers", + "autonomousSystemIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpAutonomousSystems: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpAutonomousSystem(self, organizationId: str, number: int, **kwargs): + """ + **Create an autonomous system** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-autonomous-system + + - organizationId (string): Organization ID + - number (integer): The autonomous system number (CLI: 'router bgp ') + - description (string): A description for the autonomous system + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "autonomousSystems"], + "operation": "createOrganizationSwitchRoutingBgpAutonomousSystem", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems" + + body_params = [ + "number", + "description", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpAutonomousSystem: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchRoutingBgpAutonomousSystemsOverviewByAutonomousSystem( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the overview of the autonomous systems configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-autonomous-systems-overview-by-autonomous-system + + - 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 + - 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. + - numbers (array): Optional parameter to filter autonomous systems by number. This filter uses multiple exact matches. + - autonomousSystemIds (array): Optional parameter to filter autonomous systems by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "autonomousSystems", "overview", "byAutonomousSystem"], + "operation": "getOrganizationSwitchRoutingBgpAutonomousSystemsOverviewByAutonomousSystem", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems/overview/byAutonomousSystem" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "numbers", + "autonomousSystemIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "numbers", + "autonomousSystemIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpAutonomousSystemsOverviewByAutonomousSystem: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def updateOrganizationSwitchRoutingBgpAutonomousSystem(self, organizationId: str, autonomousSystemId: str, **kwargs): + """ + **Update an autonomous system** + https://developer.cisco.com/meraki/api-v1/#!update-organization-switch-routing-bgp-autonomous-system + + - organizationId (string): Organization ID + - autonomousSystemId (string): Autonomous system ID + - number (integer): The autonomous system number (CLI: 'router bgp ') + - description (string): A description for the autonomous system + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "autonomousSystems"], + "operation": "updateOrganizationSwitchRoutingBgpAutonomousSystem", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + autonomousSystemId = urllib.parse.quote(str(autonomousSystemId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems/{autonomousSystemId}" + + body_params = [ + "number", + "description", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationSwitchRoutingBgpAutonomousSystem: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationSwitchRoutingBgpAutonomousSystem(self, organizationId: str, autonomousSystemId: str): + """ + **Delete an autonomous system from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-routing-bgp-autonomous-system + + - organizationId (string): Organization ID + - autonomousSystemId (string): Autonomous system ID + """ + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "autonomousSystems"], + "operation": "deleteOrganizationSwitchRoutingBgpAutonomousSystem", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + autonomousSystemId = urllib.parse.quote(str(autonomousSystemId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems/{autonomousSystemId}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchRoutingBgpFiltersFilterLists( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the filter lists configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-filters-filter-lists + + - 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 + - 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. + - networkIds (array): Optional parameter to filter 'filter lists' by network ID. This filter uses multiple exact matches. + - listIds (array): Optional parameter to filter 'filter lists' by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "filterLists"], + "operation": "getOrganizationSwitchRoutingBgpFiltersFilterLists", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "listIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "listIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpFiltersFilterLists: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpFiltersFilterListsDeploy( + self, organizationId: str, filterList: dict, network: dict, rules: list, **kwargs + ): + """ + **Create or update a filter list, in addition to its associated rules** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-filters-filter-lists-deploy + + - organizationId (string): Organization ID + - filterList (object): Information regarding the filter list + - network (object): Information regarding the network the filter list belongs to + - rules (array): Information regarding the filter list rules + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "filterLists", "deploy"], + "operation": "createOrganizationSwitchRoutingBgpFiltersFilterListsDeploy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists/deploy" + + body_params = [ + "filterList", + "network", + "rules", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpFiltersFilterListsDeploy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchRoutingBgpFiltersFilterListsOverviewByFilterList( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the overview of the filter lists configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-filters-filter-lists-overview-by-filter-list + + - 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 + - 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. + - networkIds (array): Optional parameter to filter 'filter list' overviews by network ID. This filter uses multiple exact matches. + - listIds (array): Optional parameter to filter 'filter list' overviews by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "routing", "bgp", "filters", "filterLists", "overview", "byFilterList"], + "operation": "getOrganizationSwitchRoutingBgpFiltersFilterListsOverviewByFilterList", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists/overview/byFilterList" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "listIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "listIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpFiltersFilterListsOverviewByFilterList: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpFiltersFilterListsRules( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the filter list rules configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-filters-filter-lists-rules + + - 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 + - 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. + - networkIds (array): Optional parameter to filter 'filter list' rules by network ID. This filter uses multiple exact matches. + - ruleIds (array): Optional parameter to filter 'filter list' rules by ID. This filter uses multiple exact matches. + - filterListIds (array): Optional parameter to filter 'filter lists' by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "filterLists", "rules"], + "operation": "getOrganizationSwitchRoutingBgpFiltersFilterListsRules", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists/rules" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "ruleIds", + "filterListIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "ruleIds", + "filterListIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpFiltersFilterListsRules: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationSwitchRoutingBgpFiltersFilterList(self, organizationId: str, listId: str): + """ + **Delete a filter list** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-routing-bgp-filters-filter-list + + - organizationId (string): Organization ID + - listId (string): List ID + """ + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "filterLists"], + "operation": "deleteOrganizationSwitchRoutingBgpFiltersFilterList", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + listId = urllib.parse.quote(str(listId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists/{listId}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchRoutingBgpFiltersPrefixLists( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the prefix lists configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-filters-prefix-lists + + - 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 + - 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. + - networkIds (array): Optional parameter to filter prefix lists by network ID. This filter uses multiple exact matches. + - listIds (array): Optional parameter to filter prefix lists by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "prefixLists"], + "operation": "getOrganizationSwitchRoutingBgpFiltersPrefixLists", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "listIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "listIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpFiltersPrefixLists: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpFiltersPrefixListsDeploy( + self, organizationId: str, network: dict, prefixList: dict, rules: list, **kwargs + ): + """ + **Create or update a prefix list, in addition to its associated rules** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-filters-prefix-lists-deploy + + - organizationId (string): Organization ID + - network (object): Information regarding the network the prefix list belongs to + - prefixList (object): Information regarding the prefix list + - rules (array): Information regarding the prefix list rules + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "prefixLists", "deploy"], + "operation": "createOrganizationSwitchRoutingBgpFiltersPrefixListsDeploy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists/deploy" + + body_params = [ + "network", + "prefixList", + "rules", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpFiltersPrefixListsDeploy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchRoutingBgpFiltersPrefixListsOverviewByPrefixList( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the overview of the prefix lists configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-filters-prefix-lists-overview-by-prefix-list + + - 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 + - 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. + - networkIds (array): Optional parameter to filter prefix list overviews by network ID. This filter uses multiple exact matches. + - listIds (array): Optional parameter to filter prefix list overviews by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "routing", "bgp", "filters", "prefixLists", "overview", "byPrefixList"], + "operation": "getOrganizationSwitchRoutingBgpFiltersPrefixListsOverviewByPrefixList", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists/overview/byPrefixList" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "listIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "listIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpFiltersPrefixListsOverviewByPrefixList: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpFiltersPrefixListsRules( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the prefix list rules configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-filters-prefix-lists-rules + + - 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 + - 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. + - networkIds (array): Optional parameter to filter prefix list rules by network ID. This filter uses multiple exact matches. + - prefixListIds (array): Optional parameter to filter prefix list rules by prefix list ID. This filter uses multiple exact matches. + - ruleIds (array): Optional parameter to filter prefix list rules by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "prefixLists", "rules"], + "operation": "getOrganizationSwitchRoutingBgpFiltersPrefixListsRules", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists/rules" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "prefixListIds", + "ruleIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "prefixListIds", + "ruleIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpFiltersPrefixListsRules: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationSwitchRoutingBgpFiltersPrefixList(self, organizationId: str, listId: str): + """ + **Delete a prefix list** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-routing-bgp-filters-prefix-list + + - organizationId (string): Organization ID + - listId (string): List ID + """ + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "filters", "prefixLists"], + "operation": "deleteOrganizationSwitchRoutingBgpFiltersPrefixList", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + listId = urllib.parse.quote(str(listId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists/{listId}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchRoutingBgpPeersGroups(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the BGP peer groups configured in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-groups + + - 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 + - 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. + - networkIds (array): Optional parameter to filter peer groups by network ID. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter peer groups by router ID. This filter uses multiple exact matches. + - profileIds (array): Optional parameter to filter peer groups by profile ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter peer groups by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "groups"], + "operation": "getOrganizationSwitchRoutingBgpPeersGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/groups" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "routerIds", + "profileIds", + "peerGroupIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "routerIds", + "profileIds", + "peerGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersGroups: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpPeersGroupsAddressFamiliesDeployments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List all BGP deployment information for multiple peer groups or address families configured in the given organization, including profile information, peer group address family information, neighbors, and listen ranges** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-groups-address-families-deployments + + - 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 + - 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. + - networkIds (array): Optional parameter to filter peer group address family deployments by network ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter peer group address family deployments by peer group + - addressFamilyIds (array): Optional parameter to filter peer group address family deployments by address family + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "groups", "addressFamilies", "deployments"], + "operation": "getOrganizationSwitchRoutingBgpPeersGroupsAddressFamiliesDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/groups/addressFamilies/deployments" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "peerGroupIds", + "addressFamilyIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "peerGroupIds", + "addressFamilyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersGroupsAddressFamiliesDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpPeersGroupsDeploy( + self, + organizationId: str, + addressFamily: dict, + network: dict, + peerGroup: dict, + peerGroupAddressFamilyBindingProfile: dict, + peerGroupProfile: dict, + policies: list, + router: dict, + **kwargs, + ): + """ + **Create or update a peer group, in addition to an associated peer group profile, peer group address family binding, peer group address family binding profile and routing policies associated with the peer group** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-peers-groups-deploy + + - organizationId (string): Organization ID + - addressFamily (object): Information regarding the address family the peer group address family binding belongs to + - network (object): Information regarding the network the peer group profile belongs to + - peerGroup (object): Information regarding the peer group + - peerGroupAddressFamilyBindingProfile (object): Information regarding the peer group address family binding profile + - peerGroupProfile (object): Information regarding the peer group profile + - policies (array): Information regarding the routing policies + - router (object): Information regarding the router this peer group belongs to + - peerGroupAddressFamilyBinding (object): Information regarding the peer group address family binding. Only required when updating. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "groups", "deploy"], + "operation": "createOrganizationSwitchRoutingBgpPeersGroupsDeploy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/groups/deploy" + + body_params = [ + "addressFamily", + "network", + "peerGroup", + "peerGroupAddressFamilyBinding", + "peerGroupAddressFamilyBindingProfile", + "peerGroupProfile", + "policies", + "router", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpPeersGroupsDeploy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchRoutingBgpPeersGroupsDeployments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List all BGP deployment information for peer groups configured in the given organization, including peer group address family information, as well as routing policies** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-groups-deployments + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 20. + - 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. + - networkIds (array): Optional parameter to filter peer group deployments by network ID. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter peer group deployments by router ID. This filter uses multiple exact matches. + - profileIds (array): Optional parameter to filter peer group deployments by profile ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter peer group deployments by peer group ID. This filter uses multiple exact matches. + - afi (string): Optional parameter to filter deployments on each peer group by address family identifier (AFI). + - safi (string): Optional parameter to filter deployments on each peer group by subsequent address family identifier (SAFI). + """ + + kwargs.update(locals()) + + if "afi" in kwargs: + options = ["ipv4"] + assert kwargs["afi"] in options, f'''"afi" cannot be "{kwargs["afi"]}", & must be set to one of: {options}''' + if "safi" in kwargs: + options = ["unicast"] + assert kwargs["safi"] in options, f'''"safi" cannot be "{kwargs["safi"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "groups", "deployments"], + "operation": "getOrganizationSwitchRoutingBgpPeersGroupsDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/groups/deployments" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "routerIds", + "profileIds", + "peerGroupIds", + "afi", + "safi", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "routerIds", + "profileIds", + "peerGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersGroupsDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpPeersGroupsOverviewByPeerGroup( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the overview of the BGP peer groups configured in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-groups-overview-by-peer-group + + - 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 + - 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. + - networkIds (array): Optional parameter to filter peer group overviews by network ID. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter peer group overviews by router ID. This filter uses multiple exact matches. + - profileIds (array): Optional parameter to filter peer group overviews by profile ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter peer group overviews by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "routing", "bgp", "peers", "groups", "overview", "byPeerGroup"], + "operation": "getOrganizationSwitchRoutingBgpPeersGroupsOverviewByPeerGroup", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/groups/overview/byPeerGroup" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "routerIds", + "profileIds", + "peerGroupIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "routerIds", + "profileIds", + "peerGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersGroupsOverviewByPeerGroup: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpPeersListenRanges(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the listen ranges configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-listen-ranges + + - 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 + - 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. + - networkIds (array): Optional parameter to filter listen ranges by network ID. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter listen ranges by router ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter listen ranges by peer group ID. This filter uses multiple exact matches. + - listenRangeIds (array): Optional parameter to filter listen ranges by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "listenRanges"], + "operation": "getOrganizationSwitchRoutingBgpPeersListenRanges", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/listenRanges" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "routerIds", + "peerGroupIds", + "listenRangeIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "routerIds", + "peerGroupIds", + "listenRangeIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersListenRanges: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpPeersNeighbors(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the neighbors configured for BGP in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-neighbors + + - 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 + - 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. + - networkIds (array): Optional parameter to filter neighbors by network ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter neighbors by peer group ID. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter neighbors by router ID. This filter uses multiple exact matches. + - neighborIds (array): Optional parameter to filter neighbors by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "neighbors"], + "operation": "getOrganizationSwitchRoutingBgpPeersNeighbors", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/neighbors" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "peerGroupIds", + "routerIds", + "neighborIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "peerGroupIds", + "routerIds", + "neighborIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersNeighbors: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpPeersNeighborsDeploy( + self, + organizationId: str, + addressFamily: dict, + neighbor: dict, + neighborAddressFamilyBinding: dict, + peerGroup: dict, + policies: list, + router: dict, + **kwargs, + ): + """ + **Create or update a neighor, in addition to an associated neighbor address family binding and routing policies associated with the neighbor** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-peers-neighbors-deploy + + - organizationId (string): Organization ID + - addressFamily (object): Information regarding the address family this binding is bound to + - neighbor (object): Information regarding the BPG neighbor + - neighborAddressFamilyBinding (object): Information regarding the neighbor address family binding + - peerGroup (object): Information regarding the peer group this neighbor belongs to + - policies (array): Information regarding the routing policies related to the neighbor + - router (object): Information regarding the router this neighbor peers with + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "neighbors", "deploy"], + "operation": "createOrganizationSwitchRoutingBgpPeersNeighborsDeploy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/neighbors/deploy" + + body_params = [ + "addressFamily", + "neighbor", + "neighborAddressFamilyBinding", + "peerGroup", + "policies", + "router", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpPeersNeighborsDeploy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchRoutingBgpPeersNeighborsDeployments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List all BGP deployment information for neighbors configured in the given organization, including address family information, as well as routing policies** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-peers-neighbors-deployments + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 20. + - 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. + - networkIds (array): Optional parameter to filter neighbor deployments by network ID. This filter uses multiple exact matches. + - peerGroupIds (array): Optional parameter to filter neighbor deployments by peer group ID. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter neighbor deployments by router ID. This filter uses multiple exact matches. + - neighborIds (array): Optional parameter to filter neighbor deployments by neighbor ID. This filter uses multiple exact matches. + - afi (string): Optional parameter to filter deployments on each neighbor by address family identifier (AFI). + - safi (string): Optional parameter to filter deployments on each neighbor by subsequent address family identifier (SAFI). + """ + + kwargs.update(locals()) + + if "afi" in kwargs: + options = ["ipv4"] + assert kwargs["afi"] in options, f'''"afi" cannot be "{kwargs["afi"]}", & must be set to one of: {options}''' + if "safi" in kwargs: + options = ["unicast"] + assert kwargs["safi"] in options, f'''"safi" cannot be "{kwargs["safi"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "peers", "neighbors", "deployments"], + "operation": "getOrganizationSwitchRoutingBgpPeersNeighborsDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/neighbors/deployments" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "peerGroupIds", + "routerIds", + "neighborIds", + "afi", + "safi", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "peerGroupIds", + "routerIds", + "neighborIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpPeersNeighborsDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpRouters(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the routers configured in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-routers + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. 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. + - networkIds (array): Optional parameter to filter routers by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter routers by serial. This filter uses multiple exact matches. + - switchNames (array): Optional parameter to filter routers by switch name. The filter uses multiple exact matches. + - asNumbers (array): Optional parameter to filter routers by autonomous system number. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter routers by ID. This filter uses multiple exact matches. + - switchStackIds (array): Optional parameter to filter routers by switch stack id. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "routers"], + "operation": "getOrganizationSwitchRoutingBgpRouters", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + "switchNames", + "asNumbers", + "routerIds", + "switchStackIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "switchNames", + "asNumbers", + "routerIds", + "switchStackIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpRouters: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpRoutersDeploy( + self, + organizationId: str, + addressFamily: dict, + addressFamilyPrefixes: list, + addressFamilyProfile: dict, + autonomousSystem: dict, + router: dict, + switch: dict, + **kwargs, + ): + """ + **Create a BGP router, in addition to an associated address family, address family prefixes, and address family profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-routers-deploy + + - organizationId (string): Organization ID + - addressFamily (object): Information regarding the address family + - addressFamilyPrefixes (array): The list of network prefixes to which the address family applies + - addressFamilyProfile (object): Information regarding the profile applied to the address family + - autonomousSystem (object): Information regarding the router's autonomous system + - router (object): Information regarding the BPG router + - switch (object): The router's switch node. When the router is part of a switch stack, this is the switch stack's active node + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "routers", "deploy"], + "operation": "createOrganizationSwitchRoutingBgpRoutersDeploy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/deploy" + + body_params = [ + "addressFamily", + "addressFamilyPrefixes", + "addressFamilyProfile", + "autonomousSystem", + "router", + "switch", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpRoutersDeploy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationSwitchRoutingBgpRoutersDeployments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List all BGP deployment information for routers configured in a given organization, including all address families** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-routers-deployments + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 20. + - 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. + - networkIds (array): Optional parameter to filter router deployments by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter router deployments by serial. This filter uses multiple exact matches. + - switchNames (array): Optional parameter to filter router deployments by switch name. The filter uses multiple exact matches. + - asNumbers (array): Optional parameter to filter router deployments by autonomous system number. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter router deployments by router ID. This filter uses multiple exact matches. + - switchStackIds (array): Optional parameter to filter router deployments by switch stack id. This filter uses multiple exact matches. + - afi (string): Optional parameter to filter deployments on each router by address family identifier (AFI). + - safi (string): Optional parameter to filter deployments on each router by subsequent address family identifier (SAFI). + """ + + kwargs.update(locals()) + + if "afi" in kwargs: + options = ["ipv4"] + assert kwargs["afi"] in options, f'''"afi" cannot be "{kwargs["afi"]}", & must be set to one of: {options}''' + if "safi" in kwargs: + options = ["unicast"] + assert kwargs["safi"] in options, f'''"safi" cannot be "{kwargs["safi"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "routers", "deployments"], + "operation": "getOrganizationSwitchRoutingBgpRoutersDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/deployments" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + "switchNames", + "asNumbers", + "routerIds", + "switchStackIds", + "afi", + "safi", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "switchNames", + "asNumbers", + "routerIds", + "switchStackIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpRoutersDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchRoutingBgpRoutersOverviewByRouter( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the overview of the routers configured in the given organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-bgp-routers-overview-by-router + + - 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 + - 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. + - networkIds (array): Optional parameter to filter router overviews by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter router overviews by serial. This filter uses multiple exact matches. + - switchNames (array): Optional parameter to filter router overviews by switch name. This filter uses multiple exact matches. + - asNumbers (array): Optional parameter to filter router overviews by autonomous system number. This filter uses multiple exact matches. + - routerIds (array): Optional parameter to filter router overviews by ID. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "monitor", "routing", "bgp", "routers", "overview", "byRouter"], + "operation": "getOrganizationSwitchRoutingBgpRoutersOverviewByRouter", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/overview/byRouter" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + "switchNames", + "asNumbers", + "routerIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "switchNames", + "asNumbers", + "routerIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingBgpRoutersOverviewByRouter: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationSwitchRoutingBgpRoutersPeersDeploy( + self, organizationId: str, addressFamily: dict, peerGroups: list, router: dict, **kwargs + ): + """ + **Create and update listen ranges, update peers' enabled flag, and delete peer groups for a BGP router** + https://developer.cisco.com/meraki/api-v1/#!create-organization-switch-routing-bgp-routers-peers-deploy + + - organizationId (string): Organization ID + - addressFamily (object): Information regarding the address family + - peerGroups (array): Information regarding the peer group peers for a router's peer group + - router (object): Information regarding the BPG router + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "routers", "peers", "deploy"], + "operation": "createOrganizationSwitchRoutingBgpRoutersPeersDeploy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/peers/deploy" + + body_params = [ + "addressFamily", + "peerGroups", + "router", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationSwitchRoutingBgpRoutersPeersDeploy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def deleteOrganizationSwitchRoutingBgpRouter(self, organizationId: str, routerId: str): + """ + **Delete a router from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-switch-routing-bgp-router + + - organizationId (string): Organization ID + - routerId (string): Router ID + """ + + metadata = { + "tags": ["switch", "configure", "routing", "bgp", "routers"], + "operation": "deleteOrganizationSwitchRoutingBgpRouter", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + routerId = urllib.parse.quote(str(routerId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/{routerId}" + + return self._session.delete(metadata, resource) + + def getOrganizationSwitchRoutingStaticRoutes(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List layer 3 static routes for switches within an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-routing-static-routes + + - 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): Optional parameter to filter the result set by the included set of network IDs + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 20. + - 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": ["switch", "monitor", "routing", "staticRoutes"], + "operation": "getOrganizationSwitchRoutingStaticRoutes", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/routing/staticRoutes" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchRoutingStaticRoutes: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchSpanningTree(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns Spanning Tree configuration settings** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-spanning-tree + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter by network ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["switch", "configure", "spanningTree"], + "operation": "getOrganizationSwitchSpanningTree", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/spanningTree" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSwitchSpanningTree: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchStacksPortsMirrorsByStack(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the port mirror configurations in an organization by switch** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-stacks-ports-mirrors-by-stack + + - 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 + - ids (array): Return the port mirror configuration for the specified stack(s) + - networkIds (array): Return the port mirror configurations for the specified network(s) + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. + - 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": ["switch", "configure", "stacks", "ports", "mirrors", "byStack"], + "operation": "getOrganizationSwitchStacksPortsMirrorsByStack", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/stacks/ports/mirrors/byStack" + + query_params = [ + "ids", + "networkIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "ids", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationSwitchStacksPortsMirrorsByStack: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) diff --git a/meraki/api/users.py b/meraki/api/users.py new file mode 100644 index 00000000..7efa68ec --- /dev/null +++ b/meraki/api/users.py @@ -0,0 +1,838 @@ +import urllib + + +class Users(object): + def __init__(self, session): + super(Users, self).__init__() + self._session = session + + def getOrganizationIamUsersAuthorizations( + self, organizationId: str, userIds: list, total_pages=1, direction="next", **kwargs + ): + """ + **List specific authorizations for the list of Meraki end users.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-authorizations + + - organizationId (string): Organization ID + - userIds (array): Meraki end user 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 10. + - 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": ["users", "configure", "iam", "authorizations"], + "operation": "getOrganizationIamUsersAuthorizations", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "userIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "userIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationIamUsersAuthorizations: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationIamUsersAuthorization(self, organizationId: str, authZone: dict, **kwargs): + """ + **Authorize a Meraki end user for an auth zone.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-authorization + + - organizationId (string): Organization ID + - authZone (object): Auth zone + - email (string): Meraki end user's email + - idpUserId (string): Meraki end user's ID + - startsAt (string): Start time of the desired access for the authorization. Defaults to now. + - expiresAt (string): Expiration time of the desired access for the authorization + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "authorizations"], + "operation": "createOrganizationIamUsersAuthorization", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations" + + body_params = [ + "email", + "idpUserId", + "authZone", + "startsAt", + "expiresAt", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationIamUsersAuthorization: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationIamUsersAuthorizations(self, organizationId: str, **kwargs): + """ + **Update a Meraki end user's access to an auth zone.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-iam-users-authorizations + + - organizationId (string): Organization ID + - authorizationId (string): Authorization ID + - email (string): Meraki end user's email + - authZone (object): Auth zone + - startsAt (string): Start time of the desired access for the authorization + - expiresAt (string): Expiration time of the desired access for the authorization + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "authorizations"], + "operation": "updateOrganizationIamUsersAuthorizations", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations" + + body_params = [ + "authorizationId", + "email", + "authZone", + "startsAt", + "expiresAt", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationIamUsersAuthorizations: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def revokeOrganizationIamUsersAuthorizationsAuthorization(self, organizationId: str, authZone: dict, **kwargs): + """ + **Revoke a Meraki end user's access to an auth zone.** + https://developer.cisco.com/meraki/api-v1/#!revoke-organization-iam-users-authorizations-authorization + + - organizationId (string): Organization ID + - authZone (object): Auth zone + - email (string): Meraki end user's email + - authorizationId (string): Authorization ID + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "authorizations", "authorization"], + "operation": "revokeOrganizationIamUsersAuthorizationsAuthorization", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations/authorization/revoke" + + body_params = [ + "email", + "authorizationId", + "authZone", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"revokeOrganizationIamUsersAuthorizationsAuthorization: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationIamUsersAuthorizationsZones(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List all of the available auth zones for an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-authorizations-zones + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 10 - 1000. Default is 100. + - 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": ["users", "configure", "iam", "authorizations", "zones"], + "operation": "getOrganizationIamUsersAuthorizationsZones", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations/zones" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationIamUsersAuthorizationsZones: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationIamUsersAuthorization(self, organizationId: str, authorizationId: str): + """ + **Delete an authorization for a Meraki end user.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-iam-users-authorization + + - organizationId (string): Organization ID + - authorizationId (string): Authorization ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "authorizations"], + "operation": "deleteOrganizationIamUsersAuthorization", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + authorizationId = urllib.parse.quote(str(authorizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/authorizations/{authorizationId}" + + return self._session.delete(metadata, resource) + + def createOrganizationIamUsersIdp(self, organizationId: str, name: str, type: str, idpConfig: dict, **kwargs): + """ + **Create an identity provider for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idp + + - organizationId (string): Organization ID + - name (string): Name of the identity provider + - type (string): Type of the identity provider + - idpConfig (object): Identity provider configuration. Required for external identity providers. + - description (string): Optional. Description of the identity provider + - syncType (string): The synchronization method for the identity provider. Set to 'proactive' to sync all users and groups from your identity provider. + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = ["Azure AD"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + if "syncType" in kwargs: + options = ["proactive"] + assert kwargs["syncType"] in options, ( + f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["users", "configure", "iam", "idps"], + "operation": "createOrganizationIamUsersIdp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps" + + body_params = [ + "name", + "type", + "description", + "idpConfig", + "syncType", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationIamUsersIdp: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def searchOrganizationIdpGroups(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Search all IdP groups for an organization** + https://developer.cisco.com/meraki/api-v1/#!search-organization-idp-groups + + - 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 + - idpIds (array): Filter IdP groups by IdP ID(s). Multiple IdP IDs can be passed as a comma separated list. + - authZone (object): Auth zone + - searchQuery (string): Fuzzy filter by group name + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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": ["users", "configure", "iam", "idps", "groups", "search"], + "operation": "searchOrganizationIdpGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/groups/search" + + body_params = [ + "idpIds", + "authZone", + "searchQuery", + "perPage", + "startingAfter", + "endingBefore", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"searchOrganizationIdpGroups: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationIamUsersIdpsProductIntegrations(self, organizationId: str): + """ + **List all available IdP Product Integration urls for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-idps-product-integrations + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "idps", "productIntegrations"], + "operation": "getOrganizationIamUsersIdpsProductIntegrations", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/productIntegrations" + + return self._session.get(metadata, resource) + + def createOrganizationIamUsersIdpsSearch(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Search all IdPs for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idps-search + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - idpIds (array): Filter identity providers by id(s). Multiple ids can be passed as a comma separated list. + - type (string): Filter identity providers by idp type. + - authZone (object): Filter by auth zone + """ + + kwargs.update(locals()) + + if "type" in kwargs: + options = ["Azure AD"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["users", "configure", "iam", "idps", "search"], + "operation": "createOrganizationIamUsersIdpsSearch", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/search" + + body_params = [ + "perPage", + "startingAfter", + "endingBefore", + "idpIds", + "type", + "authZone", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationIamUsersIdpsSearch: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationIamUsersIdpsSyncHistory(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get the IdP sync status records for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-idps-sync-history + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - idpId (string): Identity provider ID. Optional. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "idps", "sync", "history"], + "operation": "getOrganizationIamUsersIdpsSyncHistory", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/sync/history" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "idpId", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationIamUsersIdpsSyncHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationIamUsersIdpsSyncLatest(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get the latest IdP sync status records for all IdPs in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-idps-sync-latest + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - idpIds (array): Identity provider IDs. Optional. + - authZoneId (string): Auth Zone ID + - authZoneType (string): Auth Zone type + """ + + kwargs.update(locals()) + + if "authZoneType" in kwargs: + options = ["access_policy", "node_group", "product", "ssid"] + assert kwargs["authZoneType"] in options, ( + f'''"authZoneType" cannot be "{kwargs["authZoneType"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["users", "configure", "iam", "idps", "sync", "latest"], + "operation": "getOrganizationIamUsersIdpsSyncLatest", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/sync/latest" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "idpIds", + "authZoneId", + "authZoneType", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "idpIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationIamUsersIdpsSyncLatest: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationIamUsersIdpsTestConnectivity(self, organizationId: str, **kwargs): + """ + **Test connectivity to an Entra ID identity provider.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idps-test-connectivity + + - organizationId (string): Organization ID + - idpId (string): Id of the identity provider + - idpConfig (object): Identity provider configuration. Required for external identity providers. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "idps", "testConnectivity"], + "operation": "createOrganizationIamUsersIdpsTestConnectivity", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/testConnectivity" + + body_params = [ + "idpId", + "idpConfig", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationIamUsersIdpsTestConnectivity: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def createOrganizationIamUsersIdpsUser(self, organizationId: str, **kwargs): + """ + **Create a Meraki user** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idps-user + + - organizationId (string): Organization ID + - displayName (string): A human-readable identifier for the created user. + - email (string): An email address identified with the user. + - password (string): The password for the user account. + - sendPassword (boolean): If true, sends an email with the password to the user. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "idps"], + "operation": "createOrganizationIamUsersIdpsUser", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/users" + + body_params = [ + "displayName", + "email", + "password", + "sendPassword", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationIamUsersIdpsUser: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateOrganizationIamUsersIdpsUser(self, organizationId: str, id: str, **kwargs): + """ + **Update a Meraki user** + https://developer.cisco.com/meraki/api-v1/#!update-organization-iam-users-idps-user + + - organizationId (string): Organization ID + - id (string): ID + - displayName (string): A human-readable identifier for the created user. + - email (string): An email address identified with the user. + - password (string): The password for the user account. + - sendPassword (boolean): If true, sends an email with the password to the user. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "idps"], + "operation": "updateOrganizationIamUsersIdpsUser", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/users/{id}" + + body_params = [ + "displayName", + "email", + "password", + "sendPassword", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationIamUsersIdpsUser: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationIamUsersIdpsUser(self, organizationId: str, id: str): + """ + **Delete a Meraki end user** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-iam-users-idps-user + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "idps"], + "operation": "deleteOrganizationIamUsersIdpsUser", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/users/{id}" + + return self._session.delete(metadata, resource) + + def createOrganizationIamUsersIdpSync(self, organizationId: str, idpId: str, **kwargs): + """ + **Trigger an IdP sync for an identity provider** + https://developer.cisco.com/meraki/api-v1/#!create-organization-iam-users-idp-sync + + - organizationId (string): Organization ID + - idpId (string): Idp ID + - emails (array): List of emails to sync + - force (boolean): Force a complete sync of all users and groups + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["users", "configure", "iam", "idps", "sync"], + "operation": "createOrganizationIamUsersIdpSync", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + idpId = urllib.parse.quote(str(idpId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{idpId}/sync" + + body_params = [ + "emails", + "force", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationIamUsersIdpSync: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationIamUsersIdpSyncLatest(self, organizationId: str, idpId: str): + """ + **Get the latest IdP sync status for an identity provider** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-idp-sync-latest + + - organizationId (string): Organization ID + - idpId (string): Idp ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "idps", "sync", "latest"], + "operation": "getOrganizationIamUsersIdpSyncLatest", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + idpId = urllib.parse.quote(str(idpId), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{idpId}/sync/latest" + + return self._session.get(metadata, resource) + + def updateOrganizationIamUsersIdp(self, organizationId: str, id: str, **kwargs): + """ + **Update an identity provider** + https://developer.cisco.com/meraki/api-v1/#!update-organization-iam-users-idp + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of the identity provider + - description (string): Description of the identity provider + - idpConfig (object): Identity provider configuration. You can update individual attributes + - syncType (string): The synchronization method for the identity provider. Set to 'proactive' to sync all users and groups from your identity provider. Set to 'null' for on-demand user and group provisioning. + """ + + kwargs.update(locals()) + + if "syncType" in kwargs: + options = ["proactive"] + assert kwargs["syncType"] in options, ( + f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["users", "configure", "iam", "idps"], + "operation": "updateOrganizationIamUsersIdp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{id}" + + body_params = [ + "name", + "description", + "idpConfig", + "syncType", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationIamUsersIdp: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationIamUsersIdp(self, organizationId: str, id: str): + """ + **Delete a identity provider from an organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-iam-users-idp + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "idps"], + "operation": "deleteOrganizationIamUsersIdp", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{id}" + + return self._session.delete(metadata, resource) + + def getOrganizationIamUsersIdpAuthZones(self, organizationId: str, id: str): + """ + **List all auth zones for an identity provider** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-idp-auth-zones + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "idps", "authZones"], + "operation": "getOrganizationIamUsersIdpAuthZones", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/iam/users/idps/{id}/authZones" + + return self._session.get(metadata, resource) + + def searchOrganizationUsers(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the end users and their associated identity providers for an organization.** + https://developer.cisco.com/meraki/api-v1/#!search-organization-users + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 10. + - 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. + - userIds (array): Filter end users by id(s). + - idpIds (array): Filter by identity provider id(s). + - groupIds (array): Filter by identity provider group id(s). + - accessTypes (array): Filter by access type(s). + - searchQuery (string): Fuzzy filter by display name, user name and email. + - statuses (array): Filter by user status(es). + - sortKey (string): Optional parameter to specify the field used to sort results. (default: username) + - sortOrder (string): Optional parameter to specify the sort order. (default: asc) + """ + + kwargs.update(locals()) + + if "sortKey" in kwargs: + options = ["created_at", "updated_at", "username"] + assert kwargs["sortKey"] in options, ( + f'''"sortKey" cannot be "{kwargs["sortKey"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["users", "configure", "iam", "search"], + "operation": "searchOrganizationUsers", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/search" + + body_params = [ + "perPage", + "startingAfter", + "endingBefore", + "userIds", + "idpIds", + "groupIds", + "accessTypes", + "searchQuery", + "statuses", + "sortKey", + "sortOrder", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"searchOrganizationUsers: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getOrganizationIamUsersSummaryPanel(self, organizationId: str): + """ + **Get the count of users and user groups for an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-users-summary-panel + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["users", "configure", "iam", "summaryPanel"], + "operation": "getOrganizationIamUsersSummaryPanel", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/users/summaryPanel" + + return self._session.get(metadata, resource) diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index 6ec80c8e..03907415 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -68,6 +68,7 @@ def updateDeviceWirelessBluetoothSettings(self, serial: str, **kwargs): Dashboard's automatically generated value. - minor (integer): Desired minor value of the beacon. If the value is set to null it will reset to Dashboard's automatically generated value. + - transmit (object): Transmit settings including power, interval, and advertised power. """ kwargs.update(locals()) @@ -83,6 +84,7 @@ def updateDeviceWirelessBluetoothSettings(self, serial: str, **kwargs): "uuid", "major", "minor", + "transmit", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -196,6 +198,23 @@ def updateDeviceWirelessElectronicShelfLabel(self, serial: str, **kwargs): return self._session.put(metadata, resource, payload) + def getDeviceWirelessHealthScores(self, serial: str): + """ + **Fetch the health scores for a given AP on this network** + https://developer.cisco.com/meraki/api-v1/#!get-device-wireless-health-scores + + - serial (string): Serial + """ + + metadata = { + "tags": ["wireless", "monitor", "healthScores"], + "operation": "getDeviceWirelessHealthScores", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/healthScores" + + return self._session.get(metadata, resource) + def getDeviceWirelessLatencyStats(self, serial: str, **kwargs): """ **Aggregated latency info for a given AP on this network** @@ -248,6 +267,123 @@ def getDeviceWirelessLatencyStats(self, serial: str, **kwargs): return self._session.get(metadata, resource, params) + def getDeviceWirelessRadioAfcPosition(self, serial: str): + """ + **Return the position for a wireless device** + https://developer.cisco.com/meraki/api-v1/#!get-device-wireless-radio-afc-position + + - serial (string): Serial + """ + + metadata = { + "tags": ["wireless", "configure", "radio", "afc", "position"], + "operation": "getDeviceWirelessRadioAfcPosition", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/radio/afc/position" + + return self._session.get(metadata, resource) + + def updateDeviceWirelessRadioAfcPosition(self, serial: str, **kwargs): + """ + **Update the position attributes for this device** + https://developer.cisco.com/meraki/api-v1/#!update-device-wireless-radio-afc-position + + - serial (string): Serial + - height (object): Height attributes + - gps (object): GPS attributes + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "afc", "position"], + "operation": "updateDeviceWirelessRadioAfcPosition", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/radio/afc/position" + + body_params = [ + "height", + "gps", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateDeviceWirelessRadioAfcPosition: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getDeviceWirelessRadioAfcPowerLimits(self, serial: str): + """ + **Return the AFC power limits for a wireless device** + https://developer.cisco.com/meraki/api-v1/#!get-device-wireless-radio-afc-power-limits + + - serial (string): Serial + """ + + metadata = { + "tags": ["wireless", "configure", "radio", "afc", "powerLimits"], + "operation": "getDeviceWirelessRadioAfcPowerLimits", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/radio/afc/powerLimits" + + return self._session.get(metadata, resource) + + def getDeviceWirelessRadioOverrides(self, serial: str): + """ + **Return the radio overrides of a device** + https://developer.cisco.com/meraki/api-v1/#!get-device-wireless-radio-overrides + + - serial (string): Serial + """ + + metadata = { + "tags": ["wireless", "configure", "radio", "overrides"], + "operation": "getDeviceWirelessRadioOverrides", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/radio/overrides" + + return self._session.get(metadata, resource) + + def updateDeviceWirelessRadioOverrides(self, serial: str, **kwargs): + """ + **Update 2.4 GHz, 5 GHz, and 6 GHz radio settings (channel, channel width, power, and enable/disable) that override RF profiles.** + https://developer.cisco.com/meraki/api-v1/#!update-device-wireless-radio-overrides + + - serial (string): Serial + - rfProfile (object): This device's RF profile + - radios (array): Radio overrides. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "overrides"], + "operation": "updateDeviceWirelessRadioOverrides", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/radio/overrides" + + body_params = [ + "rfProfile", + "radios", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateDeviceWirelessRadioOverrides: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getDeviceWirelessRadioSettings(self, serial: str): """ **Return the manually configured radio settings overrides of a device, which take precedence over RF profiles.** @@ -300,6 +436,23 @@ def updateDeviceWirelessRadioSettings(self, serial: str, **kwargs): return self._session.put(metadata, resource, payload) + def getDeviceWirelessRadioStatus(self, serial: str): + """ + **Show the status of this device's radios** + https://developer.cisco.com/meraki/api-v1/#!get-device-wireless-radio-status + + - serial (string): Serial + """ + + metadata = { + "tags": ["wireless", "configure", "radio", "status"], + "operation": "getDeviceWirelessRadioStatus", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/wireless/radio/status" + + return self._session.get(metadata, resource) + def getDeviceWirelessStatus(self, serial: str): """ **Return the SSID statuses of an access point** @@ -655,6 +808,7 @@ def updateNetworkWirelessBluetoothSettings(self, networkId: str, **kwargs): - majorMinorAssignmentMode (string): The way major and minor number should be assigned to nodes in the network. ('Unique', 'Non-unique') - major (integer): The major number to be used in the beacon identifier. Only valid in 'Non-unique' mode. - minor (integer): The minor number to be used in the beacon identifier. Only valid in 'Non-unique' mode. + - transmit (object): Transmit settings including power, interval, and advertised power. """ kwargs.update(locals()) @@ -679,6 +833,7 @@ def updateNetworkWirelessBluetoothSettings(self, networkId: str, **kwargs): "majorMinorAssignmentMode", "major", "minor", + "transmit", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -848,6 +1003,23 @@ def getNetworkWirelessClientsConnectionStats(self, networkId: str, **kwargs): return self._session.get(metadata, resource, params) + def getNetworkWirelessClientsHealthScores(self, networkId: str): + """ + **Fetch the health scores for all clients on this network** + https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-clients-health-scores + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["wireless", "monitor", "clients", "healthScores"], + "operation": "getNetworkWirelessClientsHealthScores", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/clients/healthScores" + + return self._session.get(metadata, resource) + def getNetworkWirelessClientsLatencyStats(self, networkId: str, **kwargs): """ **Aggregated latency info for this network, grouped by clients** @@ -902,6 +1074,53 @@ def getNetworkWirelessClientsLatencyStats(self, networkId: str, **kwargs): return self._session.get(metadata, resource, params) + def getNetworkWirelessClientsOnboardingHistory(self, networkId: str, **kwargs): + """ + **Return counts of distinct wireless clients connecting to a network over time** + https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-clients-onboarding-history + + - networkId (string): Network ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 7 days. + - resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 300. The default is 300. + - band (string): Filter results by band (either '2.4', '5' or '6'); this cannot be combined with the SSID filter. + - ssid (integer): Filter results by SSID number; this cannot be combined with the band filter. + """ + + kwargs.update(locals()) + + if "band" in kwargs: + options = ["2.4", "5", "6"] + assert kwargs["band"] in options, f'''"band" cannot be "{kwargs["band"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["wireless", "monitor", "clients", "onboardingHistory"], + "operation": "getNetworkWirelessClientsOnboardingHistory", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/clients/onboardingHistory" + + query_params = [ + "t0", + "t1", + "timespan", + "resolution", + "band", + "ssid", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getNetworkWirelessClientsOnboardingHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getNetworkWirelessClientConnectionStats(self, networkId: str, clientId: str, **kwargs): """ **Aggregated connectivity info for a given client on this network** @@ -1038,6 +1257,25 @@ def getNetworkWirelessClientConnectivityEvents( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getNetworkWirelessClientHealthScores(self, networkId: str, clientId: str): + """ + **Fetch the health scores for a given client on this network** + https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-client-health-scores + + - networkId (string): Network ID + - clientId (string): Client ID + """ + + metadata = { + "tags": ["wireless", "monitor", "clients", "healthScores"], + "operation": "getNetworkWirelessClientHealthScores", + } + networkId = urllib.parse.quote(str(networkId), safe="") + clientId = urllib.parse.quote(str(clientId), safe="") + resource = f"/networks/{networkId}/wireless/clients/{clientId}/healthScores" + + return self._session.get(metadata, resource) + def getNetworkWirelessClientLatencyHistory(self, networkId: str, clientId: str, **kwargs): """ **Return the latency history for a client** @@ -1133,6 +1371,53 @@ def getNetworkWirelessClientLatencyStats(self, networkId: str, clientId: str, ** return self._session.get(metadata, resource, params) + def getNetworkWirelessClientRoamingHistory(self, networkId: str, clientId: str, total_pages=1, direction="next", **kwargs): + """ + **Get client roam events within the specified timespan.** + https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-client-roaming-history + + - networkId (string): Network ID + - clientId (string): Client 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - 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 30 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 30 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "clients", "roaming", "history"], + "operation": "getNetworkWirelessClientRoamingHistory", + } + networkId = urllib.parse.quote(str(networkId), safe="") + clientId = urllib.parse.quote(str(clientId), safe="") + resource = f"/networks/{networkId}/wireless/clients/{clientId}/roaming/history" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getNetworkWirelessClientRoamingHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getNetworkWirelessConnectionStats(self, networkId: str, **kwargs): """ **Aggregated connectivity info for this network** @@ -1284,6 +1569,23 @@ def getNetworkWirelessDevicesConnectionStats(self, networkId: str, **kwargs): return self._session.get(metadata, resource, params) + def getNetworkWirelessDevicesHealthScores(self, networkId: str): + """ + **Fetch the health scores of all APs on this network** + https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-devices-health-scores + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["wireless", "monitor", "devices", "healthScores"], + "operation": "getNetworkWirelessDevicesHealthScores", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/devices/healthScores" + + return self._session.get(metadata, resource) + def getNetworkWirelessDevicesLatencyStats(self, networkId: str, **kwargs): """ **Aggregated latency info for this network, grouped by node** @@ -1811,6 +2113,41 @@ def updateNetworkWirelessLocationScanning(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) + def updateNetworkWirelessLocationWayfinding(self, networkId: str, **kwargs): + """ + **Change client wayfinding settings** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-location-wayfinding + + - networkId (string): Network ID + - enabled (boolean): Whether to enable client wayfinding on that network (only supported on Wireless networks). + - maintenanceWindow (object): Maintenance window during which optimization might take place to improve location accuracy. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "location", "wayfinding"], + "operation": "updateNetworkWirelessLocationWayfinding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/location/wayfinding" + + body_params = [ + "enabled", + "maintenanceWindow", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateNetworkWirelessLocationWayfinding: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + def getNetworkWirelessMeshStatuses(self, networkId: str, total_pages=1, direction="next", **kwargs): """ **List wireless mesh statuses for repeaters** @@ -1848,32 +2185,26 @@ def getNetworkWirelessMeshStatuses(self, networkId: str, total_pages=1, directio return self._session.get_pages(metadata, resource, params, total_pages, direction) - def updateNetworkWirelessRadioRrm(self, networkId: str, **kwargs): + def updateNetworkWirelessOpportunisticPcap(self, networkId: str, **kwargs): """ - **Update the AutoRF settings for a wireless network** - https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-radio-rrm + **Update the Opportunistic Pcap settings for a wireless network** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-opportunistic-pcap - networkId (string): Network ID - - busyHour (object): Busy Hour settings - - channel (object): Channel settings - - fra (object): FRA settings - - ai (object): AI settings + - enablement (object): Enablement settings """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "radio", "rrm"], - "operation": "updateNetworkWirelessRadioRrm", + "tags": ["wireless", "configure", "opportunisticPcap"], + "operation": "updateNetworkWirelessOpportunisticPcap", } networkId = urllib.parse.quote(str(networkId), safe="") - resource = f"/networks/{networkId}/wireless/radio/rrm" + resource = f"/networks/{networkId}/wireless/opportunisticPcap" body_params = [ - "busyHour", - "channel", - "fra", - "ai", + "enablement", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1881,18 +2212,94 @@ def updateNetworkWirelessRadioRrm(self, networkId: str, **kwargs): all_params = [] + body_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"updateNetworkWirelessRadioRrm: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"updateNetworkWirelessOpportunisticPcap: ignoring unrecognized kwargs: {invalid}" + ) return self._session.put(metadata, resource, payload) - def getNetworkWirelessRfProfiles(self, networkId: str, **kwargs): + def updateNetworkWirelessRadioAutoRf(self, networkId: str, **kwargs): """ - **List RF profiles for this network** - https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-rf-profiles + **Update the AutoRF settings for a wireless network** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-radio-auto-rf - networkId (string): Network ID - - includeTemplateProfiles (boolean): If the network is bound to a template, this parameter controls whether or not the non-basic RF profiles defined on the template should be included in the response alongside the non-basic profiles defined on the bound network. Defaults to false. - """ + - busyHour (object): Busy Hour settings + - channel (object): Channel settings + - fra (object): FRA settings + - aiRrm (object): AI-RRM settings + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "autoRf"], + "operation": "updateNetworkWirelessRadioAutoRf", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/radio/autoRf" + + body_params = [ + "busyHour", + "channel", + "fra", + "aiRrm", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkWirelessRadioAutoRf: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def updateNetworkWirelessRadioRrm(self, networkId: str, **kwargs): + """ + **Update the AutoRF settings for a wireless network** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-radio-rrm + + - networkId (string): Network ID + - busyHour (object): Busy Hour settings + - channel (object): Channel settings + - fra (object): FRA settings + - ai (object): AI settings + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "rrm"], + "operation": "updateNetworkWirelessRadioRrm", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/radio/rrm" + + body_params = [ + "busyHour", + "channel", + "fra", + "ai", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkWirelessRadioRrm: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def getNetworkWirelessRfProfiles(self, networkId: str, **kwargs): + """ + **List RF profiles for this network** + https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-rf-profiles + + - networkId (string): Network ID + - includeTemplateProfiles (boolean): If the network is bound to a template, this parameter controls whether or not the non-basic RF profiles defined on the template should be included in the response alongside the non-basic profiles defined on the bound network. Defaults to false. + """ kwargs.update(locals()) @@ -2252,6 +2659,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - number (string): Number - name (string): The name of the SSID - enabled (boolean): Whether or not the SSID is enabled + - localAuth (boolean): Extended local auth flag for Enterprise NAC - authMode (string): The association control method for the SSID ('open', 'open-enhanced', 'psk', 'open-with-radius', 'open-enhanced-with-radius', 'open-with-nac', '8021x-meraki', '8021x-nac', '8021x-radius', '8021x-google', '8021x-entra', '8021x-localradius', 'ipsk-with-radius', 'ipsk-without-radius', 'ipsk-with-nac' or 'ipsk-with-radius-easy-psk') - enterpriseAdminAccess (string): Whether or not an SSID is accessible by 'enterprise' administrators ('access disabled' or 'access enabled') - ssidAdminAccessible (boolean): SSID Administrator access status @@ -2283,6 +2691,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - radiusAccountingInterimInterval (integer): The interval (in seconds) in which accounting information is updated and sent to the RADIUS accounting server. - radiusAttributeForGroupPolicies (string): Specify the RADIUS attribute used to look up group policies ('Filter-Id', 'Reply-Message', 'Airespace-ACL-Name' or 'Aruba-User-Role'). Access points must receive this attribute in the RADIUS Access-Accept message - ipAssignmentMode (string): The client IP assignment mode ('NAT mode', 'Bridge mode', 'Layer 3 roaming', 'Ethernet over GRE', 'Layer 3 roaming with a concentrator', 'VPN' or 'Campus Gateway') + - campusGateway (object): Campus gateway settings - useVlanTagging (boolean): Whether or not traffic should be directed to use specific VLANs. This param is only valid if the ipAssignmentMode is 'Bridge mode' or 'Layer 3 roaming' - concentratorNetworkId (string): The concentrator to use when the ipAssignmentMode is 'Layer 3 roaming with a concentrator' or 'VPN'. - secondaryConcentratorNetworkId (string): The secondary concentrator to use when the ipAssignmentMode is 'VPN'. If configured, the APs will switch to using this concentrator if the primary concentrator is unreachable. This param is optional. ('disabled' represents no secondary concentrator.) @@ -2403,6 +2812,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): body_params = [ "name", "enabled", + "localAuth", "authMode", "enterpriseAdminAccess", "ssidAdminAccessible", @@ -2434,6 +2844,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): "radiusAccountingInterimInterval", "radiusAttributeForGroupPolicies", "ipAssignmentMode", + "campusGateway", "useVlanTagging", "concentratorNetworkId", "secondaryConcentratorNetworkId", @@ -3015,6 +3426,152 @@ def updateNetworkWirelessSsidOpenRoaming(self, networkId: str, number: str, **kw return self._session.put(metadata, resource, payload) + def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, number: str, static: dict, **kwargs): + """ + **Update the client exclusion status configuration for a given SSID** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-policies-client-exclusion + + - networkId (string): Network ID + - number (string): Number + - static (object): Static client exclusion status + """ + + kwargs = locals() + + metadata = { + "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion"], + "operation": "updateNetworkWirelessSsidPoliciesClientExclusion", + } + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion" + + body_params = [ + "static", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateNetworkWirelessSsidPoliciesClientExclusion: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def updateNetworkWirelessSsidPoliciesClientExclusionStaticExclusions( + self, networkId: str, number: str, macs: list, **kwargs + ): + """ + **Set the static client exclusion list for the given SSID** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-policies-client-exclusion-static-exclusions + + - networkId (string): Network ID + - number (string): Number + - macs (array): MAC addresses to set as static exclusion list + """ + + kwargs = locals() + + metadata = { + "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion", "static", "exclusions"], + "operation": "updateNetworkWirelessSsidPoliciesClientExclusionStaticExclusions", + } + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion/static/exclusions" + + body_params = [ + "macs", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateNetworkWirelessSsidPoliciesClientExclusionStaticExclusions: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkAdd( + self, networkId: str, number: str, macs: list, **kwargs + ): + """ + **Add a list of MAC addresses to the static client exclusion list for the given SSID** + https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ssid-policies-client-exclusion-static-exclusions-bulk-add + + - networkId (string): Network ID + - number (string): Number + - macs (array): MAC addresses to add to static exclusion + """ + + kwargs = locals() + + metadata = { + "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion", "static", "exclusions", "bulkAdd"], + "operation": "createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkAdd", + } + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion/static/exclusions/bulkAdd" + + body_params = [ + "macs", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkAdd: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkRemove( + self, networkId: str, number: str, macs: list, **kwargs + ): + """ + **Delete a list of MAC addresses from the static client exclusion list for the given SSID** + https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ssid-policies-client-exclusion-static-exclusions-bulk-remove + + - networkId (string): Network ID + - number (string): Number + - macs (array): MAC addresses to remove from static exclusion + """ + + kwargs = locals() + + metadata = { + "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion", "static", "exclusions", "bulkRemove"], + "operation": "createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkRemove", + } + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion/static/exclusions/bulkRemove" + + body_params = [ + "macs", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkRemove: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def getNetworkWirelessSsidSchedules(self, networkId: str, number: str): """ **List the outage schedule for the SSID** @@ -3103,6 +3660,8 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * - redirectUrl (string): The custom redirect URL where the users will go after the splash page. - useRedirectUrl (boolean): The Boolean indicating whether the the user will be redirected to the custom redirect URL after the splash page. A custom redirect URL must be set if this is true. - welcomeMessage (string): The welcome message for the users on the splash page. + - language (string): Language of splash page. + - userConsent (object): User consent settings. - themeId (string): The id of the selected splash theme. - splashLogo (object): The logo used in the splash page. - splashImage (object): The image used in the splash page. @@ -3123,6 +3682,32 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * assert kwargs["splashTimeout"] in options, ( f'''"splashTimeout" cannot be "{kwargs["splashTimeout"]}", & must be set to one of: {options}''' ) + if "language" in kwargs: + options = [ + "DA", + "DE", + "EL", + "EN", + "ES", + "FI", + "FR", + "GL", + "IT", + "JA", + "KO", + "NL", + "NO", + "PL", + "PT", + "RU", + "SK", + "SV", + "UK", + "ZH", + ] + assert kwargs["language"] in options, ( + f'''"language" cannot be "{kwargs["language"]}", & must be set to one of: {options}''' + ) if "controllerDisconnectionBehavior" in kwargs: options = ["default", "open", "restricted"] assert kwargs["controllerDisconnectionBehavior"] in options, ( @@ -3144,6 +3729,8 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * "redirectUrl", "useRedirectUrl", "welcomeMessage", + "language", + "userConsent", "themeId", "splashLogo", "splashImage", @@ -3375,34 +3962,38 @@ def updateNetworkWirelessZigbee(self, networkId: str, **kwargs): return self._session.put(metadata, resource, payload) - def getOrganizationWirelessAirMarshalRules(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationAssuranceConnectivityWirelessRfHealthByBand(self, organizationId: str, networkIds: list, **kwargs): """ - **Returns the current Air Marshal rules for this organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-air-marshal-rules + **Show the by-device RF Health score overview information for the organization in the given interval** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-connectivity-wireless-rf-health-by-band - 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): (optional) The set of network IDs to include. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - - 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. + - networkIds (array): Networks for which information should be gathered. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 3600, 14400, 86400. The default is 3600. Interval is calculated if time params are provided. + - minimumRfHealthScore (integer): Minimum RF Health score for an AP to be retrieved. + - maximumRfHealthScore (integer): Maximum RF Health score for an AP to be retrieved. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "airMarshal", "rules"], - "operation": "getOrganizationWirelessAirMarshalRules", + "tags": ["wireless", "configure", "connectivity", "rfHealth", "byBand"], + "operation": "getOrganizationAssuranceConnectivityWirelessRfHealthByBand", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/airMarshal/rules" + resource = f"/organizations/{organizationId}/assurance/connectivity/wireless/rfHealth/byBand" query_params = [ + "t0", + "t1", + "timespan", + "interval", "networkIds", - "perPage", - "startingAfter", - "endingBefore", + "minimumRfHealthScore", + "maximumRfHealthScore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} @@ -3419,23 +4010,26 @@ def getOrganizationWirelessAirMarshalRules(self, organizationId: str, total_page invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessAirMarshalRules: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceConnectivityWirelessRfHealthByBand: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) - def getOrganizationWirelessAirMarshalSettingsByNetwork( + def getOrganizationAssuranceImpactedDeviceWirelessByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Returns the current Air Marshal settings for this network** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-air-marshal-settings-by-network + **Returns count of impacted wireless devices per network on a given organization and time range.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-impacted-device-wireless-by-network - 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): The network IDs to include in the result set. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - networkGroupIds (array): Filter results by a list of network group IDs. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 2 hours and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5000. Default is 1000. - 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. """ @@ -3443,14 +4037,17 @@ def getOrganizationWirelessAirMarshalSettingsByNetwork( kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "airMarshal", "settings", "byNetwork"], - "operation": "getOrganizationWirelessAirMarshalSettingsByNetwork", + "tags": ["wireless", "monitor", "impactedDevice", "byNetwork"], + "operation": "getOrganizationAssuranceImpactedDeviceWirelessByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/airMarshal/settings/byNetwork" + resource = f"/organizations/{organizationId}/assurance/impactedDevice/wireless/byNetwork" query_params = [ - "networkIds", + "networkGroupIds", + "t0", + "t1", + "timespan", "perPage", "startingAfter", "endingBefore", @@ -3458,7 +4055,7 @@ def getOrganizationWirelessAirMarshalSettingsByNetwork( params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "networkIds", + "networkGroupIds", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3470,23 +4067,29 @@ def getOrganizationWirelessAirMarshalSettingsByNetwork( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessAirMarshalSettingsByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceImpactedDeviceWirelessByNetwork: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessClientsOverviewByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **List access point client count at the moment in an organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-overview-by-device + **Summarizes wireless post connection capacity successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network - 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): Optional parameter to filter access points client counts by network ID. This filter uses multiple exact matches. - - serials (array): Optional parameter to filter access points client counts by its serial numbers. This filter uses multiple exact matches. - - campusGatewayClusterIds (array): Optional parameter to filter access points client counts by MCG cluster IDs. This filter uses multiple exact matches. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. """ @@ -3494,16 +4097,20 @@ def getOrganizationWirelessClientsOverviewByDevice(self, organizationId: str, to kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "clients", "overview", "byDevice"], - "operation": "getOrganizationWirelessClientsOverviewByDevice", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/clients/overview/byDevice" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork" query_params = [ "networkIds", "serials", - "campusGatewayClusterIds", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", "perPage", "startingAfter", "endingBefore", @@ -3513,7 +4120,8 @@ def getOrganizationWirelessClientsOverviewByDevice(self, organizationId: str, to array_params = [ "networkIds", "serials", - "campusGatewayClusterIds", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3525,57 +4133,61 @@ def getOrganizationWirelessClientsOverviewByDevice(self, organizationId: str, to invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessClientsOverviewByDevice: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetwork: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesChannelUtilizationByDevice( + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByBand( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Get average channel utilization for all bands in a network, split by AP** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-by-device + **Summarizes wireless post connection capacity successes and failures by band.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-band - 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): Filter results by network. - - serials (array): Filter results by device. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. - - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "channelUtilization", "byDevice"], - "operation": "getOrganizationWirelessDevicesChannelUtilizationByDevice", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork", "byBand"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByBand", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/byDevice" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/byBand" query_params = [ "networkIds", "serials", - "perPage", - "startingAfter", - "endingBefore", + "ssidNumbers", + "bands", "t0", "t1", "timespan", - "interval", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3587,57 +4199,61 @@ def getOrganizationWirelessDevicesChannelUtilizationByDevice( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesChannelUtilizationByDevice: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByBand: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesChannelUtilizationByNetwork( + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClient( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Get average channel utilization across all bands for all networks in the organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-by-network + **Summarizes wireless post connection capacity successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-client - 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): Filter results by network. - - serials (array): Filter results by device. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. - - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "channelUtilization", "byNetwork"], - "operation": "getOrganizationWirelessDevicesChannelUtilizationByNetwork", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork", "byClient"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClient", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/byNetwork" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/byClient" query_params = [ "networkIds", "serials", - "perPage", - "startingAfter", - "endingBefore", + "ssidNumbers", + "bands", "t0", "t1", "timespan", - "interval", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3649,57 +4265,61 @@ def getOrganizationWirelessDevicesChannelUtilizationByNetwork( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesChannelUtilizationByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClient: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval( + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClientOs( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Get a time-series of average channel utilization for all bands, segmented by device.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-history-by-device-by-interval + **Summarizes wireless post connection capacity successes and failures by client OS.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-client-os - 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): Filter results by network. - - serials (array): Filter results by device. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 7 days. - - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "channelUtilization", "history", "byDevice", "byInterval"], - "operation": "getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork", "byClientOs"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClientOs", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/history/byDevice/byInterval" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/byClientOs" query_params = [ "networkIds", "serials", - "perPage", - "startingAfter", - "endingBefore", + "ssidNumbers", + "bands", "t0", "t1", "timespan", - "interval", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3711,57 +4331,61 @@ def getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClientOs: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval( + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClientType( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Get a time-series of average channel utilization for all bands** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-history-by-network-by-interval + **Summarizes wireless post connection capacity successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-client-type - 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): Filter results by network. - - serials (array): Filter results by device. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 7 days. - - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "channelUtilization", "history", "byNetwork", "byInterval"], - "operation": "getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork", "byClientType"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClientType", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/history/byNetwork/byInterval" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/byClientType" query_params = [ "networkIds", "serials", - "perPage", - "startingAfter", - "endingBefore", + "ssidNumbers", + "bands", "t0", "t1", "timespan", - "interval", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3773,44 +4397,61 @@ def getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClientType: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesEthernetStatuses(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **List the most recent Ethernet link speed, duplex, aggregation and power mode and status information for wireless devices.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-ethernet-statuses + **Summarizes wireless post connection capacity successes and failures by device.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-device - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - networkIds (array): A list of Meraki network IDs to filter results to contain only specified networks. E.g.: networkIds[]=N_12345678&networkIds[]=L_3456 """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "ethernet", "statuses"], - "operation": "getOrganizationWirelessDevicesEthernetStatuses", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork", "byDevice"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/ethernet/statuses" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/byDevice" query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", "perPage", "startingAfter", "endingBefore", - "networkIds", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", + "serials", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3822,59 +4463,63 @@ def getOrganizationWirelessDevicesEthernetStatuses(self, organizationId: str, to invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesEthernetStatuses: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByDevice: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesPacketLossByClient(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Get average packet loss for the given timespan for all clients in the organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-client + **Time-series of wireless post connection capacity successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-interval - 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): Filter results by network. - - ssids (array): Filter results by SSID number. - - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. - - macs (array): Filter results by client mac address(es). - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "packetLoss", "byClient"], - "operation": "getOrganizationWirelessDevicesPacketLossByClient", + "tags": ["wireless", "monitor", "experience", "channelAvailability", "byNetwork", "byInterval"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByInterval", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/packetLoss/byClient" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/byInterval" query_params = [ "networkIds", - "ssids", + "serials", + "ssidNumbers", "bands", - "macs", - "perPage", - "startingAfter", - "endingBefore", "t0", "t1", "timespan", + "interval", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", - "ssids", + "serials", + "ssidNumbers", "bands", - "macs", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -3886,58 +4531,60 @@ def getOrganizationWirelessDevicesPacketLossByClient(self, organizationId: str, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesPacketLossByClient: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesPacketLossByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Get average packet loss for the given timespan for all devices in the organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-device + **Summarizes wireless post connection capacity successes and failures by ssid.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-ssid - 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): Filter results by network. - - serials (array): Filter results by device. - - ssids (array): Filter results by SSID number. - - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "packetLoss", "byDevice"], - "operation": "getOrganizationWirelessDevicesPacketLossByDevice", + "tags": ["wireless", "configure", "experience", "channelAvailability", "byNetwork", "bySsid"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkBySsid", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/packetLoss/byDevice" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/byNetwork/bySsid" query_params = [ "networkIds", "serials", - "ssids", + "ssidNumbers", "bands", - "perPage", - "startingAfter", - "endingBefore", "t0", "t1", "timespan", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", - "ssids", + "ssidNumbers", "bands", ] for k, v in kwargs.items(): @@ -3950,60 +4597,70 @@ def getOrganizationWirelessDevicesPacketLossByDevice(self, organizationId: str, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesPacketLossByDevice: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkBySsid: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesPacketLossByNetwork( + def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Get average packet loss for the given timespan for all networks in the organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-network + **Provides insights into wireless capacity experience by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-insights-by-network - 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): Filter results by network. - - serials (array): Filter results by device. - - ssids (array): Filter results by SSID number. - - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. + - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days. """ kwargs.update(locals()) + if "contributor" in kwargs: + options = ["Co-channel interference", "High traffic", "Non-wifi interference"] + assert kwargs["contributor"] in options, ( + f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' + ) + metadata = { - "tags": ["wireless", "monitor", "devices", "packetLoss", "byNetwork"], - "operation": "getOrganizationWirelessDevicesPacketLossByNetwork", + "tags": ["wireless", "configure", "experience", "channelAvailability", "insights", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/packetLoss/byNetwork" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/channelAvailability/insights/byNetwork" query_params = [ "networkIds", "serials", - "ssids", + "ssidNumbers", "bands", - "perPage", - "startingAfter", - "endingBefore", + "contributor", + "subContributor", "t0", "t1", "timespan", + "perPage", + "startingAfter", + "endingBefore", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", - "ssids", + "ssidNumbers", "bands", ] for k, v in kwargs.items(): @@ -4016,53 +4673,143 @@ def getOrganizationWirelessDevicesPacketLossByNetwork( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesPacketLossByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwork: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesPowerModeHistory(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationAssuranceWirelessExperienceClientsInsights(self, organizationId: str, **kwargs): """ - **Return a record of power mode changes for wireless devices in the organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-power-mode-history + **Returns the top wireless service-level insights for the specified time window, including each network and the impacted client count per metric.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-clients-insights + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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. + - limit (integer): Number of top networks to return. Default is 5. Maximum is 10. + """ + + kwargs.update(locals()) + + if "limit" in kwargs: + options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + assert kwargs["limit"] in options, f'''"limit" cannot be "{kwargs["limit"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["wireless", "configure", "experience", "clients", "insights"], + "operation": "getOrganizationAssuranceWirelessExperienceClientsInsights", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/clients/insights" + + query_params = [ + "t0", + "t1", + "timespan", + "limit", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceClientsInsights: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceWirelessExperienceClientsOverviewHistoryByInterval(self, organizationId: str, **kwargs): + """ + **Returns time series data for impacted and active clients for organization wireless experience metrics.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-clients-overview-history-by-interval + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 300, 600, 900, 1800, 3600, 86400. The default is 300. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "experience", "clients", "overview", "history", "byInterval"], + "operation": "getOrganizationAssuranceWirelessExperienceClientsOverviewHistoryByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/clients/overview/history/byInterval" + + query_params = [ + "t0", + "t1", + "timespan", + "resolution", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceClientsOverviewHistoryByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless coverage successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network - 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 - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 1 day from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 1 day 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 1 day. The default is 1 day. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - networkIds (array): Optional parameter to filter the result set by the included set of network IDs - - serials (array): Optional parameter to filter device availabilities history by device serial numbers """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "power", "mode", "history"], - "operation": "getOrganizationWirelessDevicesPowerModeHistory", + "tags": ["wireless", "configure", "experience", "coverage", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/power/mode/history" + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork" query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", "t0", "t1", "timespan", "perPage", "startingAfter", "endingBefore", - "networkIds", - "serials", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", "serials", + "ssidNumbers", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4074,133 +4821,5090 @@ def getOrganizationWirelessDevicesPowerModeHistory(self, organizationId: str, to invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesPowerModeHistory: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationAssuranceWirelessExperienceCoverageByNetwork: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesProvisioningDeployments( + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkByBand( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **List the zero touch deployments for wireless access points in an organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-provisioning-deployments + **Summarizes wireless coverage successes and failures by band.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-band - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 20. + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - 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. - - search (string): Filter by MAC address, serial number, new device name, old device name, or model. - - sortBy (string): Field used to sort results. Default is 'status'. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "experience", "coverage", "byNetwork", "byBand"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkByBand", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/byBand" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkByBand: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClient( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless coverage successes and failures by client.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-client + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "coverage", "byNetwork", "byClient"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/byClient" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClientOs( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless coverage successes and failures by client OS.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-client-os + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "coverage", "byNetwork", "byClientOs"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClientOs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/byClientOs" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClientOs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClientType( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless coverage successes and failures by client type.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-client-type + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "coverage", "byNetwork", "byClientType"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClientType", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/byClientType" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkByClientType: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless coverage successes and failures by device.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "coverage", "byNetwork", "byDevice"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/byDevice" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Time-series of wireless coverage successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-interval + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 60, 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "monitor", "experience", "coverage", "byNetwork", "byInterval"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/byInterval" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "interval", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageByNetworkBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless coverage successes and failures by SSID.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-by-network-by-ssid + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "coverage", "byNetwork", "bySsid"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageByNetworkBySsid", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/byNetwork/bySsid" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageByNetworkBySsid: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Provides insights into wireless coverage experience by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-coverage-insights-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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()) + + if "contributor" in kwargs: + options = ["Admin power restriction", "Insufficient AP density", "Sticky client", "Weak client signal"] + assert kwargs["contributor"] in options, ( + f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "experience", "coverage", "insights", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/coverage/insights/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "contributor", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceMetricsOverviewHistoryByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns organization wireless experience metrics overview grouped by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-metrics-overview-history-by-network + + - 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): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5000. Default is 1000. + - 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": ["wireless", "configure", "experience", "metrics", "overview", "history", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceMetricsOverviewHistoryByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/metrics/overview/history/byNetwork" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceMetricsOverviewHistoryByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by band.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-band + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byBand"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byBand" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClient( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by client.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-client + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 10000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byClient"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byClient" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientOs( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by client OS.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-client-os + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byClientOs"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientOs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byClientOs" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientOs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientType( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by client type.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-client-type + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byClientType"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientType", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byClientType" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientType: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by device.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byDevice"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byDevice" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Time-series of wireless connection successes and failures by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-interval + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 60, 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "monitor", "experience", "successfulConnects", "byNetwork", "byInterval"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byInterval" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "interval", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServer( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by server.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-server + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byServer"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/byServer" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServer: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by ssid.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-by-network-by-ssid + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "bySsid"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/byNetwork/bySsid" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Provides insights into wireless successful connects experience by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-insights-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. + - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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()) + + if "contributor" in kwargs: + options = ["assoc", "auth", "dhcp", "dns"] + assert kwargs["contributor"] in options, ( + f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "experience", "successfulConnects", "insights", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/insights/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "contributor", + "subContributor", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless time to connect metrics by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by band.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-band + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byBand"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byBand" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless time to connect metrics by client.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-client + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 10000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byClient"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byClient" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by client OS.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-client-os + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byClientOs"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byClientOs" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection successes and failures by client type.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-client-type + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byClientType"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byClientType" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection time to connect metrics by device.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byDevice"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byDevice" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Time-series of wireless time to connect by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-interval + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 60, 300, 600, 3600, 14400, 86400. The default is 300. Interval is calculated if time params are provided. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "monitor", "experience", "timeToConnect", "byNetwork", "byInterval"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byInterval" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "interval", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection time to connect metrics by server.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-server + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byServer"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/byServer" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wireless connection time to connect metrics by ssid.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-by-network-by-ssid + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "bySsid"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/byNetwork/bySsid" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Provides insights into wireless time to connect experience by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-time-to-connect-insights-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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()) + + if "contributor" in kwargs: + options = ["assoc", "auth", "dhcp", "dns"] + assert kwargs["contributor"] in options, ( + f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "experience", "timeToConnect", "insights", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/timeToConnect/insights/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "contributor", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessAirMarshalRules(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns the current Air Marshal rules for this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-air-marshal-rules + + - 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): (optional) The set of network IDs to include. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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": ["wireless", "configure", "airMarshal", "rules"], + "operation": "getOrganizationWirelessAirMarshalRules", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/airMarshal/rules" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessAirMarshalRules: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessAirMarshalSettingsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns the current Air Marshal settings for this network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-air-marshal-settings-by-network + + - 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): The network IDs to include in the result set. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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": ["wireless", "configure", "airMarshal", "settings", "byNetwork"], + "operation": "getOrganizationWirelessAirMarshalSettingsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/airMarshal/settings/byNetwork" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessAirMarshalSettingsByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessAlertsLowPowerByDevice(self, organizationId: str, networkIds: list, **kwargs): + """ + **Gets all low power related alerts over a given network and returns information by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-alerts-low-power-by-device + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "alerts", "lowPower", "byDevice"], + "operation": "getOrganizationWirelessAlertsLowPowerByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/alerts/lowPower/byDevice" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessAlertsLowPowerByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessCertificatesOpenRoamingCertificateAuthority(self, organizationId: str): + """ + **Query for details on the organization's OpenRoaming Certificate Authority certificate (CAs).** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-certificates-open-roaming-certificate-authority + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["wireless", "configure", "certificates", "openRoaming", "certificateAuthority"], + "operation": "getOrganizationWirelessCertificatesOpenRoamingCertificateAuthority", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/certificates/openRoaming/certificateAuthority" + + return self._session.get(metadata, resource) + + def getOrganizationWirelessClientsConnectionsAssociationByClient(self, organizationId: str, **kwargs): + """ + **Summarize association outcomes per wireless client across an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-connections-association-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "clients", "connections", "association", "byClient"], + "operation": "getOrganizationWirelessClientsConnectionsAssociationByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/connections/association/byClient" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsConnectionsAssociationByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessClientsConnectionsAuthenticationByClient(self, organizationId: str, **kwargs): + """ + **Summarize authentication outcomes per wireless client across an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-connections-authentication-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "clients", "connections", "authentication", "byClient"], + "operation": "getOrganizationWirelessClientsConnectionsAuthenticationByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/connections/authentication/byClient" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsConnectionsAuthenticationByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessClientsConnectionsDhcpByClient(self, organizationId: str, **kwargs): + """ + **Get IP assignment for all clients in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-connections-dhcp-by-client + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 7 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "clients", "connections", "dhcp", "byClient"], + "operation": "getOrganizationWirelessClientsConnectionsDhcpByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/connections/dhcp/byClient" + + query_params = [ + "networkIds", + "t0", + "t1", + "timespan", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsConnectionsDhcpByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessClientsConnectionsFailuresHistoryByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns failed wireless client connections for this organization by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-connections-failures-history-by-device + + - 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 + - connectionTimeSortOrder (string): (optional) Sort order of events by connection start time. (default desc) + - failureSteps (array): (optional) The step in the connection process that failed + - clientMac (string): (optional) The MAC address of the client with which the list of events will be filtered. + - serials (array): (optional) Filter devices by serial number + - timespan (integer): (optional) The timespan, in seconds, for the failed connections. The period will be from [timespan] seconds ago until now. The maximum allowed timespan is 1 month. Default: 86400 (24 hours) + - ssidNumber (integer): (optional) The SSID number to include + - networkIds (array): (optional) The set of network IDs to include. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. 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()) + + if "connectionTimeSortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["connectionTimeSortOrder"] in options, ( + f'''"connectionTimeSortOrder" cannot be "{kwargs["connectionTimeSortOrder"]}", & must be set to one of: {options}''' + ) + if "ssidNumber" in kwargs: + options = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] + assert kwargs["ssidNumber"] in options, ( + f'''"ssidNumber" cannot be "{kwargs["ssidNumber"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "clients", "connections", "failures", "history", "byDevice"], + "operation": "getOrganizationWirelessClientsConnectionsFailuresHistoryByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/connections/failures/history/byDevice" + + query_params = [ + "connectionTimeSortOrder", + "failureSteps", + "clientMac", + "serials", + "timespan", + "ssidNumber", + "networkIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "failureSteps", + "serials", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsConnectionsFailuresHistoryByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessClientsConnectionsImpactedByNetworkBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarize the number of wireless clients impacted by connection failures on network SSIDs, across an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-connections-impacted-by-network-by-ssid + + - 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): Filter results by network. + - networkGroupIds (array): Filter results by a list of network group IDs. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 5 minutes and be less than or equal to 7 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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": ["wireless", "monitor", "clients", "connections", "impacted", "byNetwork", "bySsid"], + "operation": "getOrganizationWirelessClientsConnectionsImpactedByNetworkBySsid", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/connections/impacted/byNetwork/bySsid" + + query_params = [ + "networkIds", + "networkGroupIds", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "networkGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsConnectionsImpactedByNetworkBySsid: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessClientsOverviewByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List access point client count at the moment in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-overview-by-device + + - 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): Optional parameter to filter access points client counts by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter access points client counts by its serial numbers. This filter uses multiple exact matches. + - campusGatewayClusterIds (array): Optional parameter to filter access points client counts by MCG cluster IDs. This filter uses multiple exact matches. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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": ["wireless", "monitor", "clients", "overview", "byDevice"], + "operation": "getOrganizationWirelessClientsOverviewByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/overview/byDevice" + + query_params = [ + "networkIds", + "serials", + "campusGatewayClusterIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "campusGatewayClusterIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsOverviewByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def byOrganizationWirelessClientsRfHealthOverviewNetwork(self, organizationId: str, **kwargs): + """ + **Show the by-network client information for the organization in the given interval** + https://developer.cisco.com/meraki/api-v1/#!by-organization-wireless-clients-rf-health-overview-network + + - organizationId (string): Organization ID + - networkIds (array): Networks for which information should be gathered. + - bands (array): Bands for which information should be gathered. Valid bands are 2.4, 5, and 6. + - channels (array): Channel for which information should be gathered. + - serials (array): Serial number of the devices for which information should be gathered. + - gFloorplanId (string): Geoaligned floorplan ID nodes for which information is gathered belong to. + - tags (array): Access Point tags for which information should be gathered. + - models (array): Access Point models for which information should be gathered. + - rfProfiles (array): Rf Profiles for which information should be gathered. + - minimumRfHealthScore (integer): Minimum RF Health score for an AP to be retrieved. + - maximumRfHealthScore (integer): Maximum RF Health score for an AP to be retrieved. + - retryOnEmpty (boolean): If true, the query will be retried with a longer timeframe if the results are empty. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "clients", "rfHealth", "overview"], + "operation": "byOrganizationWirelessClientsRfHealthOverviewNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/rfHealth/overview/byNetwork" + + query_params = [ + "networkIds", + "bands", + "channels", + "serials", + "gFloorplanId", + "tags", + "models", + "rfProfiles", + "minimumRfHealthScore", + "maximumRfHealthScore", + "retryOnEmpty", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "bands", + "channels", + "serials", + "tags", + "models", + "rfProfiles", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"byOrganizationWirelessClientsRfHealthOverviewNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessClientsStickyEvents(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get sticky client events within the specified timespan.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-sticky-events + + - 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): Filter results by network. + - clientIds (array): Filter results by client id. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - 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 30 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 30 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "clients", "stickyEvents"], + "operation": "getOrganizationWirelessClientsStickyEvents", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/stickyEvents" + + query_params = [ + "networkIds", + "clientIds", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "clientIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsStickyEvents: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessClientsUsageByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns client usage details for wireless networks within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-usage-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 1 hour and be less than or equal to 7 days. The default is 2 hours. + - networkIds (array): Filter results by a list of network IDs. + - networkGroupIds (array): Filter results by a list of network group IDs. + - gatewayNetworkIds (array): Limit the results to clients tunneled to campus gateways in the provided networks. + - usageUnits (string): Usage units to use in the response. + """ + + kwargs.update(locals()) + + if "usageUnits" in kwargs: + options = ["GB", "KB", "MB", "TB"] + assert kwargs["usageUnits"] in options, ( + f'''"usageUnits" cannot be "{kwargs["usageUnits"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "monitor", "clients", "usage", "byNetwork"], + "operation": "getOrganizationWirelessClientsUsageByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/usage/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "networkGroupIds", + "gatewayNetworkIds", + "usageUnits", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "networkGroupIds", + "gatewayNetworkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsUsageByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessClientsUsageByNetworkBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns client usage details for wireless network SSIDs within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-usage-by-network-by-ssid + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 1 hour and be less than or equal to 7 days. The default is 2 hours. + - networkIds (array): Filter results by a list of network IDs. + - networkGroupIds (array): Filter results by a list of network group IDs. + - ssidIds (array): Filter results by a list of SSID IDs. + - ssidNames (array): Filter results by a list of SSID names. + - gatewayNetworkIds (array): Limit the results to clients tunneled to campus gateways in the provided networks. + - usageUnits (string): Usage units to use in the response. + """ + + kwargs.update(locals()) + + if "usageUnits" in kwargs: + options = ["GB", "KB", "MB", "TB"] + assert kwargs["usageUnits"] in options, ( + f'''"usageUnits" cannot be "{kwargs["usageUnits"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "monitor", "clients", "usage", "byNetwork", "bySsid"], + "operation": "getOrganizationWirelessClientsUsageByNetworkBySsid", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/usage/byNetwork/bySsid" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "networkGroupIds", + "ssidIds", + "ssidNames", + "gatewayNetworkIds", + "usageUnits", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "networkGroupIds", + "ssidIds", + "ssidNames", + "gatewayNetworkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsUsageByNetworkBySsid: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessClientsUsageBySsid(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns client usage details for SSIDs within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-clients-usage-by-ssid + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 8 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 greater than or equal to 1 hour and be less than or equal to 7 days. The default is 2 hours. + - ssidNames (array): Filter results by a list of SSID names. + - networkIds (array): Limit the results to clients that belong to one of the provided networks. + - networkGroupIds (array): Limit the results to clients that belong to one of the provided network groups. + - gatewayNetworkIds (array): Limit the results to clients tunneled to campus gateways in the provided networks. + - usageUnits (string): Usage units to use in the response. + """ + + kwargs.update(locals()) + + if "usageUnits" in kwargs: + options = ["GB", "KB", "MB", "TB"] + assert kwargs["usageUnits"] in options, ( + f'''"usageUnits" cannot be "{kwargs["usageUnits"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "monitor", "clients", "usage", "bySsid"], + "operation": "getOrganizationWirelessClientsUsageBySsid", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/clients/usage/bySsid" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "ssidNames", + "networkIds", + "networkGroupIds", + "gatewayNetworkIds", + "usageUnits", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "ssidNames", + "networkIds", + "networkGroupIds", + "gatewayNetworkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessClientsUsageBySsid: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesAccelerometerStatuses( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the most recent AP accelerometer status information for wireless devices that support it.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-accelerometer-statuses + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - networkIds (array): A list of Meraki network IDs to filter results to contain only specified networks. E.g.: networkIds[]=N_12345678&networkIds[]=L_3456 + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "accelerometer", "statuses"], + "operation": "getOrganizationWirelessDevicesAccelerometerStatuses", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/accelerometer/statuses" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesAccelerometerStatuses: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesChannelUtilizationByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get average channel utilization for all bands in a network, split by AP** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "channelUtilization", "byDevice"], + "operation": "getOrganizationWirelessDevicesChannelUtilizationByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/byDevice" + + query_params = [ + "networkIds", + "serials", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesChannelUtilizationByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesChannelUtilizationByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get average channel utilization across all bands for all networks in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "channelUtilization", "byNetwork"], + "operation": "getOrganizationWirelessDevicesChannelUtilizationByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/byNetwork" + + query_params = [ + "networkIds", + "serials", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesChannelUtilizationByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get a time-series of average channel utilization for all bands, segmented by device.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-history-by-device-by-interval + + - 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): Filter results by network. + - serials (array): Filter results by device. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 7 days. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "channelUtilization", "history", "byDevice", "byInterval"], + "operation": "getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/history/byDevice/byInterval" + + query_params = [ + "networkIds", + "serials", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesChannelUtilizationHistoryByDeviceByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get a time-series of average channel utilization for all bands** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-channel-utilization-history-by-network-by-interval + + - 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): Filter results by network. + - serials (array): Filter results by device. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 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 31 days. The default is 7 days. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 3600, 7200, 14400, 21600. The default is 3600. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "channelUtilization", "history", "byNetwork", "byInterval"], + "operation": "getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/channelUtilization/history/byNetwork/byInterval" + + query_params = [ + "networkIds", + "serials", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesChannelUtilizationHistoryByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesDataRateByClient(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get average uplink and downlink datarates for all clients in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-data-rate-by-client + + - 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): Filter results by network. + - serials (array): Filter results by device serial number. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - macs (array): Filter results by client mac address(es). + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - 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 30 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 30 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "dataRate", "byClient"], + "operation": "getOrganizationWirelessDevicesDataRateByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/dataRate/byClient" + + query_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "macs", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "macs", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesDataRateByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesEthernetStatuses(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the most recent Ethernet link speed, duplex, aggregation and power mode and status information for wireless devices.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-ethernet-statuses + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - networkIds (array): A list of Meraki network IDs to filter results to contain only specified networks. E.g.: networkIds[]=N_12345678&networkIds[]=L_3456 + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "ethernet", "statuses"], + "operation": "getOrganizationWirelessDevicesEthernetStatuses", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/ethernet/statuses" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesEthernetStatuses: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesLatencyByClient(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get latency summaries for all wireless devices in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-latency-by-client + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. + - networkIds (array): Filter results by network. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - ssids (array): Filter results by SSID number. + - macs (array): Filter results by client mac address(es). + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "latency", "byClient"], + "operation": "getOrganizationWirelessDevicesLatencyByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/latency/byClient" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "bands", + "ssids", + "macs", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "bands", + "ssids", + "macs", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesLatencyByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesLatencyByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get latency summaries for all wireless devices in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-latency-by-device + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. + - networkIds (array): Filter results by network. + - serials (array): Filter results by device. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - ssids (array): Filter results by SSID number. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "latency", "byDevice"], + "operation": "getOrganizationWirelessDevicesLatencyByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/latency/byDevice" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "serials", + "bands", + "ssids", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "bands", + "ssids", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesLatencyByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesLatencyByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get per-network latency summaries for all wireless networks in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-latency-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. + - networkIds (array): Filter results by network. + - serials (array): Filter results by device. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - ssids (array): Filter results by SSID number. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "latency", "byNetwork"], + "operation": "getOrganizationWirelessDevicesLatencyByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/latency/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "serials", + "bands", + "ssids", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "bands", + "ssids", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesLatencyByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationWirelessDevicesLiveToolsClientDisconnect(self, organizationId: str, clientId: str, **kwargs): + """ + **Enqueue a job to disconnect a client from an AP** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-live-tools-client-disconnect + + - organizationId (string): Organization ID + - clientId (string): Client ID + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "liveTools", "devices", "clients", "disconnect"], + "operation": "createOrganizationWirelessDevicesLiveToolsClientDisconnect", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + clientId = urllib.parse.quote(str(clientId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/liveTools/clients/{clientId}/disconnect" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationWirelessDevicesLiveToolsClientDisconnect: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationWirelessDevicesPacketLossByClient(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get average packet loss for the given timespan for all clients in the organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-client + + - 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): Filter results by network. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - macs (array): Filter results by client mac address(es). + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "packetLoss", "byClient"], + "operation": "getOrganizationWirelessDevicesPacketLossByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/packetLoss/byClient" + + query_params = [ + "networkIds", + "ssids", + "bands", + "macs", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "ssids", + "bands", + "macs", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesPacketLossByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesPacketLossByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Get average packet loss for the given timespan for all devices in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "packetLoss", "byDevice"], + "operation": "getOrganizationWirelessDevicesPacketLossByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/packetLoss/byDevice" + + query_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssids", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesPacketLossByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesPacketLossByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get average packet loss for the given timespan for all networks in the organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "packetLoss", "byNetwork"], + "operation": "getOrganizationWirelessDevicesPacketLossByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/packetLoss/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssids", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesPacketLossByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesPowerModeHistory(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return a record of power mode changes for wireless devices in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-power-mode-history + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 1 day from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 1 day 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 1 day. The default is 1 day. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. + - 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. + - networkIds (array): Optional parameter to filter the result set by the included set of network IDs + - serials (array): Optional parameter to filter device availabilities history by device serial numbers + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "power", "mode", "history"], + "operation": "getOrganizationWirelessDevicesPowerModeHistory", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/power/mode/history" + + query_params = [ + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesPowerModeHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesProvisioningDeployments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the zero touch deployments for wireless access points in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-provisioning-deployments + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 20. + - 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. + - search (string): Filter by MAC address, serial number, new device name, old device name, or model. + - sortBy (string): Field used to sort results. Default is 'status'. - sortOrder (string): Sort order. Default is 'asc'. - deploymentType (string): Filter deployments by type. """ kwargs.update(locals()) - if "sortBy" in kwargs: - options = ["afterAction", "createdAt", "deploymentId", "name", "status"] - assert kwargs["sortBy"] in options, ( - f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' - ) - if "sortOrder" in kwargs: - options = ["asc", "desc"] - assert kwargs["sortOrder"] in options, ( - f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' - ) - if "deploymentType" in kwargs: - options = ["deploy", "replace"] - assert kwargs["deploymentType"] in options, ( - f'''"deploymentType" cannot be "{kwargs["deploymentType"]}", & must be set to one of: {options}''' - ) + if "sortBy" in kwargs: + options = ["afterAction", "createdAt", "deploymentId", "name", "status"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + if "deploymentType" in kwargs: + options = ["deploy", "replace"] + assert kwargs["deploymentType"] in options, ( + f'''"deploymentType" cannot be "{kwargs["deploymentType"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], + "operation": "getOrganizationWirelessDevicesProvisioningDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "search", + "sortBy", + "sortOrder", + "deploymentType", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesProvisioningDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationWirelessDevicesProvisioningDeployment(self, organizationId: str, items: list, **kwargs): + """ + **Create a zero touch deployment for a wireless access point** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-provisioning-deployment + + - organizationId (string): Organization ID + - items (array): List of zero touch deployments to create + - meta (object): Metadata relevant to the paginated dataset + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], + "operation": "createOrganizationWirelessDevicesProvisioningDeployment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" + + body_params = [ + "items", + "meta", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationWirelessDevicesProvisioningDeployment: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationWirelessDevicesProvisioningDeployments(self, organizationId: str, items: list, **kwargs): + """ + **Update a zero touch deployment** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-devices-provisioning-deployments + + - organizationId (string): Organization ID + - items (array): List of zero touch deployments to create + - meta (object): Metadata relevant to the paginated dataset + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], + "operation": "updateOrganizationWirelessDevicesProvisioningDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" + + body_params = [ + "items", + "meta", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationWirelessDevicesProvisioningDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def getOrganizationWirelessDevicesProvisioningDeploymentsByNewDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns deployment IDs for the given new node serial numbers** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-provisioning-deployments-by-new-device + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 80. + - 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. + - serials (array): Array of new device serial numbers to query + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "provisioning", "deployments", "byNewDevice"], + "operation": "getOrganizationWirelessDevicesProvisioningDeploymentsByNewDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments/byNewDevice" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesProvisioningDeploymentsByNewDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationWirelessDevicesProvisioningDeployment(self, organizationId: str, deploymentId: str): + """ + **Delete a zero touch deployment** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-devices-provisioning-deployment + + - organizationId (string): Organization ID + - deploymentId (string): Deployment ID + """ + + metadata = { + "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], + "operation": "deleteOrganizationWirelessDevicesProvisioningDeployment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + deploymentId = urllib.parse.quote(str(deploymentId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments/{deploymentId}" + + return self._session.delete(metadata, resource) + + def getOrganizationWirelessDevicesProvisioningRecommendationsTags(self, organizationId: str, **kwargs): + """ + **List the recommended device tags for zero touch deployments available for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-provisioning-recommendations-tags + + - organizationId (string): Organization ID + - networkIds (array): The list of networks to use as hints for device tags recommendations. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "provisioning", "recommendations", "tags"], + "operation": "getOrganizationWirelessDevicesProvisioningRecommendationsTags", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/provisioning/recommendations/tags" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesProvisioningRecommendationsTags: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): + """ + **Query for details on the organization's RADSEC device Certificate Authority certificates (CAs)** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities + + - organizationId (string): Organization ID + - certificateAuthorityIds (array): Optional parameter to filter CAs by one or more CA IDs. All returned CAs will have an ID that is an exact match. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities"], + "operation": "getOrganizationWirelessDevicesRadsecCertificatesAuthorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities" + + query_params = [ + "certificateAuthorityIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "certificateAuthorityIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesRadsecCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def updateOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): + """ + **Update an organization's RADSEC device Certificate Authority (CA) state** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-devices-radsec-certificates-authorities + + - organizationId (string): Organization ID + - status (string): The "status" to update the Certificate Authority to. Only valid option is "trusted". + - certificateAuthorityId (string): The ID of the Certificate Authority to update. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities"], + "operation": "updateOrganizationWirelessDevicesRadsecCertificatesAuthorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities" + + body_params = [ + "status", + "certificateAuthorityId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationWirelessDevicesRadsecCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def createOrganizationWirelessDevicesRadsecCertificatesAuthority(self, organizationId: str): + """ + **Create an organization's RADSEC device Certificate Authority (CA)** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-radsec-certificates-authority + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities"], + "operation": "createOrganizationWirelessDevicesRadsecCertificatesAuthority", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities" + + return self._session.post(metadata, resource) + + def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organizationId: str, **kwargs): + """ + **Query for certificate revocation list (CRL) for the organization's RADSEC device Certificate Authorities (CAs).** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls + + - organizationId (string): Organization ID + - certificateAuthorityIds (array): Optional parameter to filter CAs by one or more CA IDs. All returned CAs will have an ID that is an exact match. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities", "crls"], + "operation": "getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities/crls" + + query_params = [ + "certificateAuthorityIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "certificateAuthorityIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas(self, organizationId: str, **kwargs): + """ + **Query for all delta certificate revocation list (CRL) for the organization's RADSEC device Certificate Authority (CA) with the given id.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls-deltas + + - organizationId (string): Organization ID + - certificateAuthorityIds (array): Parameter to filter CAs by one or more CA IDs. All returned CAs will have an ID that is an exact match. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities", "crls", "deltas"], + "operation": "getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities/crls/deltas" + + query_params = [ + "certificateAuthorityIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "certificateAuthorityIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessDevicesSignalQualityByClient( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get average signal quality for all clients in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-signal-quality-by-client + + - 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): Filter results by network. + - serials (array): Filter results by device serial number. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - macs (array): Filter results by client mac address(es). + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - 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 30 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 30 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "signalQuality", "byClient"], + "operation": "getOrganizationWirelessDevicesSignalQualityByClient", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/signalQuality/byClient" + + query_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "macs", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "macs", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesSignalQualityByClient: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesSignalQualityByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get average signal quality for all devices in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-signal-quality-by-device + + - 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): Filter results by network. + - serials (array): Filter results by device serial number. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - 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 30 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 30 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "signalQuality", "byDevice"], + "operation": "getOrganizationWirelessDevicesSignalQualityByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/signalQuality/byDevice" + + query_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssids", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesSignalQualityByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesSignalQualityByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Get average signal quality for all networks in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-signal-quality-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial number. + - ssids (array): Filter results by SSID number. + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - 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 30 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 30 days. The default is 7 days. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "signalQuality", "byNetwork"], + "operation": "getOrganizationWirelessDevicesSignalQualityByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/signalQuality/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssids", + "bands", + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssids", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesSignalQualityByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesSystemCpuLoadHistory( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Return the CPU Load history for a list of wireless devices in the organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-system-cpu-load-history + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 1 day from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 1 day 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 1 day. The default is 1 day. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. + - 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. + - networkIds (array): Optional parameter to filter the result set by the included set of network IDs + - serials (array): Optional parameter to filter device availabilities history by device serial numbers + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "system", "cpu", "load", "history"], + "operation": "getOrganizationWirelessDevicesSystemCpuLoadHistory", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/system/cpu/load/history" + + query_params = [ + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesSystemCpuLoadHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesTelemetry(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the wireless device telemetry of an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-telemetry + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 200. Default is 100. + - 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. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 3 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 30 minutes 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 greater than or equal to 5 minutes and be less than or equal to 30 minutes. The default is 30 minutes. + - networkIds (array): Optional parameter to filter results by network. + - serials (array): Optional parameter to filter results by device serial. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "monitor", "devices", "telemetry"], + "operation": "getOrganizationWirelessDevicesTelemetry", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/telemetry" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesTelemetry: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessDevicesWirelessControllersByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List of Catalyst access points information** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-wireless-controllers-by-device + + - 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): Optional parameter to filter access points by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter access points by its cloud ID. This filter uses multiple exact matches. + - controllerSerials (array): Optional parameter to filter access points by its wireless LAN controller cloud ID. This filter uses multiple exact matches. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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": ["wireless", "monitor", "devices", "wirelessControllers", "byDevice"], + "operation": "getOrganizationWirelessDevicesWirelessControllersByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/devices/wirelessControllers/byDevice" + + query_params = [ + "networkIds", + "serials", + "controllerSerials", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "controllerSerials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessDevicesWirelessControllersByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessLocationScanningByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return scanning API settings** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-location-scanning-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 250. 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. + - networkIds (array): Optional parameter to filter scanning settings by network ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "location", "scanning", "byNetwork"], + "operation": "getOrganizationWirelessLocationScanningByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/location/scanning/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessLocationScanningByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessLocationScanningReceivers(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return scanning API receivers** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-location-scanning-receivers + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 250. 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. + - networkIds (array): Optional parameter to filter scanning API receivers by network ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "location", "scanning", "receivers"], + "operation": "getOrganizationWirelessLocationScanningReceivers", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessLocationScanningReceivers: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationWirelessLocationScanningReceiver( + self, organizationId: str, network: dict, url: str, version: str, radio: dict, sharedSecret: str, **kwargs + ): + """ + **Add new receiver for scanning API** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-location-scanning-receiver + + - organizationId (string): Organization ID + - network (object): Add scanning API receiver for network + - url (string): Receiver Url + - version (string): Scanning API Version + - radio (object): Add scanning API Radio + - sharedSecret (string): Secret Value for Receiver + """ + + kwargs = locals() + + metadata = { + "tags": ["wireless", "configure", "location", "scanning", "receivers"], + "operation": "createOrganizationWirelessLocationScanningReceiver", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers" + + body_params = [ + "network", + "url", + "version", + "radio", + "sharedSecret", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationWirelessLocationScanningReceiver: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationWirelessLocationScanningReceiver(self, organizationId: str, receiverId: str, **kwargs): + """ + **Change scanning API receiver settings** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-location-scanning-receiver + + - organizationId (string): Organization ID + - receiverId (string): Receiver ID + - url (string): Receiver Url + - version (string): Scanning API Version + - radio (object): Add scanning API Radio + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "location", "scanning", "receivers"], + "operation": "updateOrganizationWirelessLocationScanningReceiver", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + receiverId = urllib.parse.quote(str(receiverId), safe="") + resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers/{receiverId}" + + body_params = [ + "url", + "version", + "radio", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationWirelessLocationScanningReceiver: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationWirelessLocationScanningReceiver(self, organizationId: str, receiverId: str): + """ + **Delete a scanning API receiver** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-location-scanning-receiver + + - organizationId (string): Organization ID + - receiverId (string): Receiver ID + """ + + metadata = { + "tags": ["wireless", "configure", "location", "scanning", "receivers"], + "operation": "deleteOrganizationWirelessLocationScanningReceiver", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + receiverId = urllib.parse.quote(str(receiverId), safe="") + resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers/{receiverId}" + + return self._session.delete(metadata, resource) + + def getOrganizationWirelessLocationWayfindingByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Return Client wayfinding settings** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-location-wayfinding-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter wayfinding settings by network ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "location", "wayfinding", "byNetwork"], + "operation": "getOrganizationWirelessLocationWayfindingByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/location/wayfinding/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessLocationWayfindingByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessMqttSettings(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return MQTT Settings for networks** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-mqtt-settings + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 250. 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. + - networkIds (array): Optional parameter to filter mqtt settings by network ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "mqtt", "settings"], + "operation": "getOrganizationWirelessMqttSettings", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/mqtt/settings" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationWirelessMqttSettings: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def updateOrganizationWirelessMqttSettings(self, organizationId: str, network: dict, mqtt: dict, **kwargs): + """ + **Add new broker config for wireless MQTT** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-mqtt-settings + + - organizationId (string): Organization ID + - network (object): Add MQTT Settings for network + - mqtt (object): MQTT Settings for network + - ble (object): MQTT BLE Settings for network + - wifi (object): MQTT Wi-Fi Settings for network + """ + + kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], - "operation": "getOrganizationWirelessDevicesProvisioningDeployments", + "tags": ["wireless", "configure", "mqtt", "settings"], + "operation": "updateOrganizationWirelessMqttSettings", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" + resource = f"/organizations/{organizationId}/wireless/mqtt/settings" + + body_params = [ + "network", + "mqtt", + "ble", + "wifi", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationWirelessMqttSettings: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def byOrganizationWirelessOpportunisticPcapLicenseNetwork(self, organizationId: str, **kwargs): + """ + **Check the Opportunistic Pcap license status of an organization by network** + https://developer.cisco.com/meraki/api-v1/#!by-organization-wireless-opportunistic-pcap-license-network + + - organizationId (string): Organization ID + - networkIds (array): Optional parameter to filter results by network. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "opportunisticPcap", "license"], + "operation": "byOrganizationWirelessOpportunisticPcapLicenseNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/opportunisticPcap/license/byNetwork" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"byOrganizationWirelessOpportunisticPcapLicenseNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessRadioAfcPositionByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the AFC power limits of an organization by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-afc-position-by-device + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter device's AFC position by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter device's AFC position by device serial numbers. This filter uses multiple exact matches. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "afc", "position", "byDevice"], + "operation": "getOrganizationWirelessRadioAfcPositionByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/radio/afc/position/byDevice" query_params = [ "perPage", "startingAfter", "endingBefore", - "search", - "sortBy", - "sortOrder", - "deploymentType", + "networkIds", + "serials", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + if self._session._validate_kwargs: - all_params = query_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesProvisioningDeployments: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRadioAfcPositionByDevice: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def createOrganizationWirelessDevicesProvisioningDeployment(self, organizationId: str, items: list, **kwargs): + def getOrganizationWirelessRadioAfcPowerLimitsByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Create a zero touch deployment for a wireless access point** - https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-provisioning-deployment + **List the AFC power limits of an organization by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-afc-power-limits-by-device - organizationId (string): Organization ID - - items (array): List of zero touch deployments to create - - meta (object): Metadata relevant to the paginated dataset + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter device's AFC power limits by network ID. This filter uses multiple exact matches. + - serials (array): Optional parameter to filter device's AFC power limits by device serial numbers. This filter uses multiple exact matches. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], - "operation": "createOrganizationWirelessDevicesProvisioningDeployment", + "tags": ["wireless", "configure", "radio", "afc", "powerLimits", "byDevice"], + "operation": "getOrganizationWirelessRadioAfcPowerLimitsByDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" + resource = f"/organizations/{organizationId}/wireless/radio/afc/powerLimits/byDevice" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessRadioAfcPowerLimitsByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationWirelessRadioAutoRfByNetwork(self, organizationId: str, **kwargs): + """ + **List the AutoRF settings of an organization by network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-auto-rf-by-network + + - organizationId (string): Organization ID + - networkIds (array): Optional parameter to filter results by network. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "autoRf", "byNetwork"], + "operation": "getOrganizationWirelessRadioAutoRfByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/radio/autoRf/byNetwork" + + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessRadioAutoRfByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationWirelessRadioAutoRfChannelsPlanningActivities(self, organizationId: str, **kwargs): + """ + **List the channel planning activities of an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-auto-rf-channels-planning-activities + + - organizationId (string): Organization ID + - networkIds (array): Optional parameter to filter results by network. + - deviceSerials (array): Optional parameter to filter results by device serial. + - bands (array): Optional parameter to filter results by bands. Valid bands are 2.4, 5, and 6. + - channels (array): Optional parameter to filter results by channels. + - serials (array): Serial number of the devices for which information should be gathered. + - gFloorplanId (string): Geoaligned floorplan ID nodes for which information is gathered belong to. + - tags (array): Optional parameter to filter results by node tags. + - models (array): Optional parameter to filter results by access point models. + - rfProfiles (array): Optional parameter to filter results by RF Profiles. + - minimumRfHealthScore (integer): Minimum RF Health score for an AP to be retrieved. + - maximumRfHealthScore (integer): Maximum RF Health score for an AP to be retrieved. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "radio", "autoRf", "channels", "planning", "activities"], + "operation": "getOrganizationWirelessRadioAutoRfChannelsPlanningActivities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/radio/autoRf/channels/planning/activities" + + query_params = [ + "networkIds", + "deviceSerials", + "bands", + "channels", + "serials", + "gFloorplanId", + "tags", + "models", + "rfProfiles", + "minimumRfHealthScore", + "maximumRfHealthScore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} - body_params = [ - "items", - "meta", + array_params = [ + "networkIds", + "deviceSerials", + "bands", + "channels", + "serials", + "tags", + "models", + "rfProfiles", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"createOrganizationWirelessDevicesProvisioningDeployment: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRadioAutoRfChannelsPlanningActivities: ignoring unrecognized kwargs: {invalid}" ) - return self._session.post(metadata, resource, payload) + return self._session.get(metadata, resource, params) - def updateOrganizationWirelessDevicesProvisioningDeployments(self, organizationId: str, items: list, **kwargs): + def recalculateOrganizationWirelessRadioAutoRfChannels(self, organizationId: str, networkIds: list, **kwargs): """ - **Update a zero touch deployment** - https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-devices-provisioning-deployments + **Recalculates automatically assigned channels for every AP within specified the specified network(s)** + https://developer.cisco.com/meraki/api-v1/#!recalculate-organization-wireless-radio-auto-rf-channels - organizationId (string): Organization ID - - items (array): List of zero touch deployments to create - - meta (object): Metadata relevant to the paginated dataset + - networkIds (array): A list of network ids (limit: 15). """ - kwargs.update(locals()) + kwargs = locals() metadata = { - "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], - "operation": "updateOrganizationWirelessDevicesProvisioningDeployments", + "tags": ["wireless", "configure", "radio", "autoRf", "channels"], + "operation": "recalculateOrganizationWirelessRadioAutoRfChannels", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" + resource = f"/organizations/{organizationId}/wireless/radio/autoRf/channels/recalculate" body_params = [ - "items", - "meta", + "networkIds", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -4209,55 +9913,47 @@ def updateOrganizationWirelessDevicesProvisioningDeployments(self, organizationI invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"updateOrganizationWirelessDevicesProvisioningDeployments: ignoring unrecognized kwargs: {invalid}" + f"recalculateOrganizationWirelessRadioAutoRfChannels: ignoring unrecognized kwargs: {invalid}" ) - return self._session.put(metadata, resource, payload) - - def deleteOrganizationWirelessDevicesProvisioningDeployment(self, organizationId: str, deploymentId: str): - """ - **Delete a zero touch deployment** - https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-devices-provisioning-deployment - - - organizationId (string): Organization ID - - deploymentId (string): Deployment ID - """ - - metadata = { - "tags": ["wireless", "configure", "devices", "provisioning", "deployments"], - "operation": "deleteOrganizationWirelessDevicesProvisioningDeployment", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - deploymentId = urllib.parse.quote(str(deploymentId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments/{deploymentId}" - - return self._session.delete(metadata, resource) + return self._session.post(metadata, resource, payload) - def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): + def getOrganizationWirelessRadioOverridesByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **Query for details on the organization's RADSEC device Certificate Authority certificates (CAs)** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities + **Return a list of radio overrides** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-overrides-by-device - organizationId (string): Organization ID - - certificateAuthorityIds (array): Optional parameter to filter CAs by one or more CA IDs. All returned CAs will have an ID that is an exact match. + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 100. + - 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. + - networkIds (array): A list of network IDs. The returned radio overrides will be filtered to only include these networks. + - serials (array): A list of serial numbers. The returned radio overrides will be filtered to only include these serials. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities"], - "operation": "getOrganizationWirelessDevicesRadsecCertificatesAuthorities", + "tags": ["wireless", "configure", "radio", "overrides", "byDevice"], + "operation": "getOrganizationWirelessRadioOverridesByDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities" + resource = f"/organizations/{organizationId}/wireless/radio/overrides/byDevice" query_params = [ - "certificateAuthorityIds", + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "certificateAuthorityIds", + "networkIds", + "serials", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4269,88 +9965,132 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizati invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesRadsecCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRadioOverridesByDevice: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get(metadata, resource, params) + return self._session.get_pages(metadata, resource, params, total_pages, direction) - def updateOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): + def byOrganizationWirelessRadioRfHealthNeighborsRssiDevice(self, organizationId: str, **kwargs): """ - **Update an organization's RADSEC device Certificate Authority (CA) state** - https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-devices-radsec-certificates-authorities + **Show the by-device neighbor rssi information for the organization in the given interval** + https://developer.cisco.com/meraki/api-v1/#!by-organization-wireless-radio-rf-health-neighbors-rssi-device - organizationId (string): Organization ID - - status (string): The "status" to update the Certificate Authority to. Only valid option is "trusted". - - certificateAuthorityId (string): The ID of the Certificate Authority to update. + - networkIds (array): Networks for which information should be gathered. + - bands (array): Bands for which information should be gathered. Valid bands are 2.4, 5, and 6. + - channels (array): Channel for which information should be gathered. + - serials (array): Serial number of the devices for which information should be gathered. + - tags (array): Access Point tags for which information should be gathered. + - models (array): Access Point models for which information should be gathered. + - rfProfiles (array): Rf Profiles for which information should be gathered. + - gFloorplanId (string): Geoaligned floorplan ID nodes for which information is gathered belong to. + - minimumNeighborRssi (integer): Minimum Neighbor RSSI score for a neighbor entry to be retrieved. + - maximumNeighborRssi (integer): Maximum Neighbor RSSI score for a neighbor entry to be retrieved. + - minimumRfHealthScore (integer): Minimum RF Health score for an AP to be retrieved. + - maximumRfHealthScore (integer): Maximum RF Health score for an AP to be retrieved. + - rfScoreInterval (integer): Size of the rf score interval in seconds. + - rfScoreRetryOnEmpty (boolean): If true, the query will be retried further back if no data is present in the latest rf score interval. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities"], - "operation": "updateOrganizationWirelessDevicesRadsecCertificatesAuthorities", + "tags": ["wireless", "configure", "radio", "rfHealth", "neighbors", "rssi"], + "operation": "byOrganizationWirelessRadioRfHealthNeighborsRssiDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities" + resource = f"/organizations/{organizationId}/wireless/radio/rfHealth/neighbors/rssi/byDevice" - body_params = [ - "status", - "certificateAuthorityId", + query_params = [ + "networkIds", + "bands", + "channels", + "serials", + "tags", + "models", + "rfProfiles", + "gFloorplanId", + "minimumNeighborRssi", + "maximumNeighborRssi", + "minimumRfHealthScore", + "maximumRfHealthScore", + "rfScoreInterval", + "rfScoreRetryOnEmpty", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "bands", + "channels", + "serials", + "tags", + "models", + "rfProfiles", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"updateOrganizationWirelessDevicesRadsecCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + f"byOrganizationWirelessRadioRfHealthNeighborsRssiDevice: ignoring unrecognized kwargs: {invalid}" ) - return self._session.put(metadata, resource, payload) - - def createOrganizationWirelessDevicesRadsecCertificatesAuthority(self, organizationId: str): - """ - **Create an organization's RADSEC device Certificate Authority (CA)** - https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-radsec-certificates-authority - - - organizationId (string): Organization ID - """ - - metadata = { - "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities"], - "operation": "createOrganizationWirelessDevicesRadsecCertificatesAuthority", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities" - - return self._session.post(metadata, resource) + return self._session.get(metadata, resource, params) - def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organizationId: str, **kwargs): + def getOrganizationWirelessRadioRfHealthOverviewByNetworkByInterval(self, organizationId: str, **kwargs): """ - **Query for certificate revocation list (CRL) for the organization's RADSEC device Certificate Authorities (CAs).** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls + **Show the by-network RF Health score overview information for the organization in the given interval** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-rf-health-overview-by-network-by-interval - organizationId (string): Organization ID - - certificateAuthorityIds (array): Optional parameter to filter CAs by one or more CA IDs. All returned CAs will have an ID that is an exact match. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 182 days, 14 hours, 54 minutes, and 36 seconds from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 30 days, 10 hours, 29 minutes, and 6 seconds 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 30 days, 10 hours, 29 minutes, and 6 seconds. The default is 14 days. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 7200, 86400. The default is 7200. Interval is calculated if time params are provided. + - networkIds (array): Networks for which information should be gathered. + - bands (array): Bands for which information should be gathered. Valid bands are 2.4, 5, and 6. + - minimumRfHealthScore (integer): Minimum RF Health score for a network to be retrieved. + - maximumRfHealthScore (integer): Maximum RF Health score for a network to be retrieved. + - minimumHighCciPercentage (integer): Minimum percentage of radios with high CCI for a network to be retrieved. + - maximumHighCciPercentage (integer): Maximum percentage of radios with high CCI for a network to be retrieved. + - minimumChannelChanges (integer): Minimum number of channel changes for a network to be retrieved. + - maximumChannelChanges (integer): Maximum number of channel changes for a network to be retrieved. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities", "crls"], - "operation": "getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls", + "tags": ["wireless", "configure", "radio", "rfHealth", "overview", "byNetwork", "byInterval"], + "operation": "getOrganizationWirelessRadioRfHealthOverviewByNetworkByInterval", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities/crls" + resource = f"/organizations/{organizationId}/wireless/radio/rfHealth/overview/byNetwork/byInterval" query_params = [ - "certificateAuthorityIds", + "t0", + "t1", + "timespan", + "interval", + "networkIds", + "bands", + "minimumRfHealthScore", + "maximumRfHealthScore", + "minimumHighCciPercentage", + "maximumHighCciPercentage", + "minimumChannelChanges", + "maximumChannelChanges", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "certificateAuthorityIds", + "networkIds", + "bands", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4362,36 +10102,52 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organi invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRadioRfHealthOverviewByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" ) return self._session.get(metadata, resource, params) - def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas(self, organizationId: str, **kwargs): + def getOrganizationWirelessRadioRrmByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **Query for all delta certificate revocation list (CRL) for the organization's RADSEC device Certificate Authority (CA) with the given id.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls-deltas + **List the AutoRF settings of an organization by network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-rrm-by-network - organizationId (string): Organization ID - - certificateAuthorityIds (array): Parameter to filter CAs by one or more CA IDs. All returned CAs will have an ID that is an exact match. + - 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): Optional parameter to filter results by network. + - startingAfter (string): Retrieving items after this network ID + - endingBefore (string): Retrieving items before this network ID + - perPage (integer): Number of items per page + - sortOrder (string): The sort order of items """ kwargs.update(locals()) + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + metadata = { - "tags": ["wireless", "configure", "devices", "radsec", "certificates", "authorities", "crls", "deltas"], - "operation": "getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas", + "tags": ["wireless", "configure", "radio", "rrm", "byNetwork"], + "operation": "getOrganizationWirelessRadioRrmByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/radsec/certificates/authorities/crls/deltas" + resource = f"/organizations/{organizationId}/wireless/radio/rrm/byNetwork" query_params = [ - "certificateAuthorityIds", + "networkIds", + "startingAfter", + "endingBefore", + "perPage", + "sortOrder", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "certificateAuthorityIds", + "networkIds", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4403,47 +10159,31 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas(self, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRadioRrmByNetwork: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get(metadata, resource, params) + return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessDevicesSystemCpuLoadHistory( - self, organizationId: str, total_pages=1, direction="next", **kwargs - ): + def getOrganizationWirelessRadioStatusByNetwork(self, organizationId: str, **kwargs): """ - **Return the CPU Load history for a list of wireless devices in the organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-system-cpu-load-history + **Show the status of this organization's radios, categorized by network and device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-status-by-network - 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 - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 1 day from today. - - t1 (string): The end of the timespan for the data. t1 can be a maximum of 1 day 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 1 day. The default is 1 day. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 10. - - 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. - - networkIds (array): Optional parameter to filter the result set by the included set of network IDs - - serials (array): Optional parameter to filter device availabilities history by device serial numbers + - networkIds (array): Networks for which radio status should be returned. + - serials (array): Serials for which radio status should be returned. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "system", "cpu", "load", "history"], - "operation": "getOrganizationWirelessDevicesSystemCpuLoadHistory", + "tags": ["wireless", "configure", "radio", "status", "byNetwork"], + "operation": "getOrganizationWirelessRadioStatusByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/system/cpu/load/history" + resource = f"/organizations/{organizationId}/wireless/radio/status/byNetwork" query_params = [ - "t0", - "t1", - "timespan", - "perPage", - "startingAfter", - "endingBefore", "networkIds", "serials", ] @@ -4463,52 +10203,66 @@ def getOrganizationWirelessDevicesSystemCpuLoadHistory( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesSystemCpuLoadHistory: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRadioStatusByNetwork: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) - def getOrganizationWirelessDevicesWirelessControllersByDevice( + def getOrganizationWirelessRfProfilesAssignmentsByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **List of Catalyst access points information** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-wireless-controllers-by-device + **List the RF profiles of an organization by device** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-rf-profiles-assignments-by-device - 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): Optional parameter to filter access points by network ID. This filter uses multiple exact matches. - - serials (array): Optional parameter to filter access points by its cloud ID. This filter uses multiple exact matches. - - controllerSerials (array): Optional parameter to filter access points by its wireless LAN controller cloud ID. This filter uses multiple exact matches. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. + - networkIds (array): Optional parameter to filter devices by network. + - productTypes (array): Optional parameter to filter devices by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect. + - name (string): Optional parameter to filter RF profiles by device name. All returned devices will have a name that contains the search term or is an exact match. + - mac (string): Optional parameter to filter RF profiles by device MAC address. All returned devices will have a MAC address that contains the search term or is an exact match. + - serial (string): Optional parameter to filter RF profiles by device serial number. All returned devices will have a serial number that contains the search term or is an exact match. + - model (string): Optional parameter to filter RF profiles by device model. All returned devices will have a model that contains the search term or is an exact match. + - macs (array): Optional parameter to filter RF profiles by one or more device MAC addresses. All returned devices will have a MAC address that is an exact match. + - serials (array): Optional parameter to filter RF profiles by one or more device serial numbers. All returned devices will have a serial number that is an exact match. + - models (array): Optional parameter to filter RF profiles by one or more device models. All returned devices will have a model that is an exact match. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "monitor", "devices", "wirelessControllers", "byDevice"], - "operation": "getOrganizationWirelessDevicesWirelessControllersByDevice", + "tags": ["wireless", "configure", "rfProfiles", "assignments", "byDevice"], + "operation": "getOrganizationWirelessRfProfilesAssignmentsByDevice", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/devices/wirelessControllers/byDevice" + resource = f"/organizations/{organizationId}/wireless/rfProfiles/assignments/byDevice" query_params = [ + "perPage", + "startingAfter", + "endingBefore", "networkIds", + "productTypes", + "name", + "mac", + "serial", + "model", + "macs", "serials", - "controllerSerials", - "perPage", - "startingAfter", - "endingBefore", + "models", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", + "productTypes", + "macs", "serials", - "controllerSerials", + "models", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4520,39 +10274,39 @@ def getOrganizationWirelessDevicesWirelessControllersByDevice( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessDevicesWirelessControllersByDevice: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRfProfilesAssignmentsByDevice: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessLocationScanningByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationWirelessRoamingByNetworkByInterval(self, organizationId: str, networkIds: list, **kwargs): """ - **Return scanning API settings** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-location-scanning-by-network + **Get all wireless clients' roam events within the specified timespan grouped by network and time interval.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-roaming-by-network-by-interval - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 250. 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. - - networkIds (array): Optional parameter to filter scanning settings by network ID. + - networkIds (array): Filter results by network. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 7 days. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 600, 1800, 3600, 7200, 10800, 14400, 18000, 21600, 25200, 28800, 32400, 36000, 39600, 43200, 86400, 604800. The default is 7200. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "location", "scanning", "byNetwork"], - "operation": "getOrganizationWirelessLocationScanningByNetwork", + "tags": ["wireless", "monitor", "roaming", "byNetwork", "byInterval"], + "operation": "getOrganizationWirelessRoamingByNetworkByInterval", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/location/scanning/byNetwork" + resource = f"/organizations/{organizationId}/wireless/roaming/byNetwork/byInterval" query_params = [ - "perPage", - "startingAfter", - "endingBefore", "networkIds", + "t0", + "t1", + "timespan", + "interval", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} @@ -4569,44 +10323,49 @@ def getOrganizationWirelessLocationScanningByNetwork(self, organizationId: str, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessLocationScanningByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessRoamingByNetworkByInterval: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.get(metadata, resource, params) - def getOrganizationWirelessLocationScanningReceivers(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Return scanning API receivers** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-location-scanning-receivers + **List the L2 isolation allow list MAC entry in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-firewall-isolation-allowlist-entries - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 250. Default is 50. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. - - networkIds (array): Optional parameter to filter scanning API receivers by network ID. + - networkIds (array): networkIds array to filter out results + - ssids (array): ssids number array to filter out results """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "location", "scanning", "receivers"], - "operation": "getOrganizationWirelessLocationScanningReceivers", + "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], + "operation": "getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers" + resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries" query_params = [ "perPage", "startingAfter", "endingBefore", "networkIds", + "ssids", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", + "ssids", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4618,41 +10377,39 @@ def getOrganizationWirelessLocationScanningReceivers(self, organizationId: str, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessLocationScanningReceivers: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def createOrganizationWirelessLocationScanningReceiver( - self, organizationId: str, network: dict, url: str, version: str, radio: dict, sharedSecret: str, **kwargs + def createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry( + self, organizationId: str, client: dict, ssid: dict, network: dict, **kwargs ): """ - **Add new receiver for scanning API** - https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-location-scanning-receiver + **Create isolation allow list MAC entry for this organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-ssids-firewall-isolation-allowlist-entry - organizationId (string): Organization ID - - network (object): Add scanning API receiver for network - - url (string): Receiver Url - - version (string): Scanning API Version - - radio (object): Add scanning API Radio - - sharedSecret (string): Secret Value for Receiver + - client (object): The client of allowlist + - ssid (object): The SSID that allowlist belongs to + - network (object): The Network that allowlist belongs to + - description (string): The description of mac address """ - kwargs = locals() + kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "location", "scanning", "receivers"], - "operation": "createOrganizationWirelessLocationScanningReceiver", + "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], + "operation": "createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers" + resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries" body_params = [ + "description", + "client", + "ssid", "network", - "url", - "version", - "radio", - "sharedSecret", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -4661,37 +10418,54 @@ def createOrganizationWirelessLocationScanningReceiver( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"createOrganizationWirelessLocationScanningReceiver: ignoring unrecognized kwargs: {invalid}" + f"createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry: ignoring unrecognized kwargs: {invalid}" ) return self._session.post(metadata, resource, payload) - def updateOrganizationWirelessLocationScanningReceiver(self, organizationId: str, receiverId: str, **kwargs): + def deleteOrganizationWirelessSsidsFirewallIsolationAllowlistEntry(self, organizationId: str, entryId: str): """ - **Change scanning API receiver settings** - https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-location-scanning-receiver + **Destroy isolation allow list MAC entry for this organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-ssids-firewall-isolation-allowlist-entry - organizationId (string): Organization ID - - receiverId (string): Receiver ID - - url (string): Receiver Url - - version (string): Scanning API Version - - radio (object): Add scanning API Radio + - entryId (string): Entry ID + """ + + metadata = { + "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], + "operation": "deleteOrganizationWirelessSsidsFirewallIsolationAllowlistEntry", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + entryId = urllib.parse.quote(str(entryId), safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries/{entryId}" + + return self._session.delete(metadata, resource) + + def updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry(self, organizationId: str, entryId: str, **kwargs): + """ + **Update isolation allow list MAC entry info** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-ssids-firewall-isolation-allowlist-entry + + - organizationId (string): Organization ID + - entryId (string): Entry ID + - description (string): The description of mac address + - client (object): The client of allowlist """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "location", "scanning", "receivers"], - "operation": "updateOrganizationWirelessLocationScanningReceiver", + "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], + "operation": "updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry", } organizationId = urllib.parse.quote(str(organizationId), safe="") - receiverId = urllib.parse.quote(str(receiverId), safe="") - resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers/{receiverId}" + entryId = urllib.parse.quote(str(entryId), safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries/{entryId}" body_params = [ - "url", - "version", - "radio", + "description", + "client", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -4700,58 +10474,41 @@ def updateOrganizationWirelessLocationScanningReceiver(self, organizationId: str invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"updateOrganizationWirelessLocationScanningReceiver: ignoring unrecognized kwargs: {invalid}" + f"updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry: ignoring unrecognized kwargs: {invalid}" ) return self._session.put(metadata, resource, payload) - def deleteOrganizationWirelessLocationScanningReceiver(self, organizationId: str, receiverId: str): - """ - **Delete a scanning API receiver** - https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-location-scanning-receiver - - - organizationId (string): Organization ID - - receiverId (string): Receiver ID - """ - - metadata = { - "tags": ["wireless", "configure", "location", "scanning", "receivers"], - "operation": "deleteOrganizationWirelessLocationScanningReceiver", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - receiverId = urllib.parse.quote(str(receiverId), safe="") - resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers/{receiverId}" - - return self._session.delete(metadata, resource) - - def getOrganizationWirelessMqttSettings(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationWirelessSsidsOpenRoamingByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **Return MQTT Settings for networks** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-mqtt-settings + **Returns an array of objects, each containing SSID OpenRoaming configs for the corresponding network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-open-roaming-by-network - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 250. Default is 50. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. - - networkIds (array): Optional parameter to filter mqtt settings by network ID. + - networkIds (array): Optional parameter to filter OpenRoaming configuration by Network Id. + - includeDisabledSsids (boolean): Optional parameter to include OpenRoaming configuration for disabled ssids. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "mqtt", "settings"], - "operation": "getOrganizationWirelessMqttSettings", + "tags": ["wireless", "configure", "ssids", "openRoaming", "byNetwork"], + "operation": "getOrganizationWirelessSsidsOpenRoamingByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/mqtt/settings" + resource = f"/organizations/{organizationId}/wireless/ssids/openRoaming/byNetwork" query_params = [ "perPage", "startingAfter", "endingBefore", "networkIds", + "includeDisabledSsids", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} @@ -4767,123 +10524,108 @@ def getOrganizationWirelessMqttSettings(self, organizationId: str, total_pages=1 all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationWirelessMqttSettings: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning( + f"getOrganizationWirelessSsidsOpenRoamingByNetwork: ignoring unrecognized kwargs: {invalid}" + ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def updateOrganizationWirelessMqttSettings(self, organizationId: str, network: dict, mqtt: dict, **kwargs): + def getOrganizationWirelessSsidsPoliciesClientExclusionBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Add new broker config for wireless MQTT** - https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-mqtt-settings + **Returns an array of objects, each containing client exclusion enablement statuses for one SSID** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-policies-client-exclusion-by-ssid - organizationId (string): Organization ID - - network (object): Add MQTT Settings for network - - mqtt (object): MQTT Settings for network - - ble (object): MQTT BLE Settings for network - - wifi (object): MQTT Wi-Fi Settings for network + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter by Network ID. + - includeDisabledSsids (boolean): Optional parameter to include disabled SSID's. + - ssidNumbers (array): Optional parameter to filter by SSID numbers. """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "mqtt", "settings"], - "operation": "updateOrganizationWirelessMqttSettings", + "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion", "bySsid"], + "operation": "getOrganizationWirelessSsidsPoliciesClientExclusionBySsid", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/mqtt/settings" + resource = f"/organizations/{organizationId}/wireless/ssids/policies/clientExclusion/bySsid" - body_params = [ - "network", - "mqtt", - "ble", - "wifi", + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "includeDisabledSsids", + "ssidNumbers", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} - - if self._session._validate_kwargs: - all_params = [] + body_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning( - f"updateOrganizationWirelessMqttSettings: ignoring unrecognized kwargs: {invalid}" - ) - - return self._session.put(metadata, resource, payload) - - def recalculateOrganizationWirelessRadioAutoRfChannels(self, organizationId: str, networkIds: list, **kwargs): - """ - **Recalculates automatically assigned channels for every AP within specified the specified network(s)** - https://developer.cisco.com/meraki/api-v1/#!recalculate-organization-wireless-radio-auto-rf-channels - - - organizationId (string): Organization ID - - networkIds (array): A list of network ids (limit: 15). - """ - - kwargs = locals() - - metadata = { - "tags": ["wireless", "configure", "radio", "autoRf", "channels"], - "operation": "recalculateOrganizationWirelessRadioAutoRfChannels", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/radio/autoRf/channels/recalculate" + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} - body_params = [ + array_params = [ "networkIds", + "ssidNumbers", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"recalculateOrganizationWirelessRadioAutoRfChannels: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessSsidsPoliciesClientExclusionBySsid: ignoring unrecognized kwargs: {invalid}" ) - return self._session.post(metadata, resource, payload) + return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessRadioRrmByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): - """ - **List the AutoRF settings of an organization by network** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-rrm-by-network + def getOrganizationWirelessSsidsPoliciesClientExclusionStaticExclusionsBySsid( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns an array of objects, each containing a list of MAC's excluded from a given SSID** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-policies-client-exclusion-static-exclusions-by-ssid - 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): Optional parameter to filter results by network. - - startingAfter (string): Retrieving items after this network ID - - endingBefore (string): Retrieving items before this network ID - - perPage (integer): Number of items per page - - sortOrder (string): The sort order of items + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter Network ID. + - includeDisabledSsids (boolean): Optional parameter to include disabled SSID's. + - ssidNumbers (array): Optional parameter to filter by SSID numbers. """ kwargs.update(locals()) - if "sortOrder" in kwargs: - options = ["ascending", "descending"] - assert kwargs["sortOrder"] in options, ( - f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' - ) - metadata = { - "tags": ["wireless", "configure", "radio", "rrm", "byNetwork"], - "operation": "getOrganizationWirelessRadioRrmByNetwork", + "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion", "static", "exclusions", "bySsid"], + "operation": "getOrganizationWirelessSsidsPoliciesClientExclusionStaticExclusionsBySsid", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/radio/rrm/byNetwork" + resource = f"/organizations/{organizationId}/wireless/ssids/policies/clientExclusion/static/exclusions/bySsid" query_params = [ - "networkIds", + "perPage", "startingAfter", "endingBefore", - "perPage", - "sortOrder", + "networkIds", + "includeDisabledSsids", + "ssidNumbers", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", + "ssidNumbers", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4895,66 +10637,61 @@ def getOrganizationWirelessRadioRrmByNetwork(self, organizationId: str, total_pa invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessRadioRrmByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessSsidsPoliciesClientExclusionStaticExclusionsBySsid: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessRfProfilesAssignmentsByDevice( - self, organizationId: str, total_pages=1, direction="next", **kwargs - ): + def getOrganizationWirelessSsidsProfiles(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **List the RF profiles of an organization by device** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-rf-profiles-assignments-by-device + **Returns the SSID profiles for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-profiles - 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 + - name (string): (Optional) Filter results by name. Case insensitive substring match. + - sortBy (string): Column to sort results by. Default is `name`. + - sortOrder (string): Direction to sort results by. Default is `asc`. + - profileIds (array): (Optional) Filter results by a list of SSID profile IDs. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. - - networkIds (array): Optional parameter to filter devices by network. - - productTypes (array): Optional parameter to filter devices by product type. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect. - - name (string): Optional parameter to filter RF profiles by device name. All returned devices will have a name that contains the search term or is an exact match. - - mac (string): Optional parameter to filter RF profiles by device MAC address. All returned devices will have a MAC address that contains the search term or is an exact match. - - serial (string): Optional parameter to filter RF profiles by device serial number. All returned devices will have a serial number that contains the search term or is an exact match. - - model (string): Optional parameter to filter RF profiles by device model. All returned devices will have a model that contains the search term or is an exact match. - - macs (array): Optional parameter to filter RF profiles by one or more device MAC addresses. All returned devices will have a MAC address that is an exact match. - - serials (array): Optional parameter to filter RF profiles by one or more device serial numbers. All returned devices will have a serial number that is an exact match. - - models (array): Optional parameter to filter RF profiles by one or more device models. All returned devices will have a model that is an exact match. """ kwargs.update(locals()) + if "sortBy" in kwargs: + options = ["name"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + metadata = { - "tags": ["wireless", "configure", "rfProfiles", "assignments", "byDevice"], - "operation": "getOrganizationWirelessRfProfilesAssignmentsByDevice", + "tags": ["wireless", "configure", "ssids", "profiles"], + "operation": "getOrganizationWirelessSsidsProfiles", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/rfProfiles/assignments/byDevice" + resource = f"/organizations/{organizationId}/wireless/ssids/profiles" query_params = [ + "name", + "sortBy", + "sortOrder", + "profileIds", "perPage", "startingAfter", "endingBefore", - "networkIds", - "productTypes", - "name", - "mac", - "serial", - "model", - "macs", - "serials", - "models", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "networkIds", - "productTypes", - "macs", - "serials", - "models", + "profileIds", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -4964,51 +10701,87 @@ def getOrganizationWirelessRfProfilesAssignmentsByDevice( if self._session._validate_kwargs: all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationWirelessSsidsProfiles: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationWirelessSsidsProfile(self, organizationId: str, name: str, ssid: dict, **kwargs): + """ + **Create a new SSID profile in an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-ssids-profile + + - organizationId (string): Organization ID + - name (string): Name of the SSID profile + - ssid (object): SSID configuration for the profile + - precedence (object): Precedence configuration for the SSID profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "ssids", "profiles"], + "operation": "createOrganizationWirelessSsidsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/profiles" + + body_params = [ + "name", + "precedence", + "ssid", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessRfProfilesAssignmentsByDevice: ignoring unrecognized kwargs: {invalid}" + f"createOrganizationWirelessSsidsProfile: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get_pages(metadata, resource, params, total_pages, direction) + return self._session.post(metadata, resource, payload) - def getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries( - self, organizationId: str, total_pages=1, direction="next", **kwargs - ): + def getOrganizationWirelessSsidsProfilesAssignments(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **List the L2 isolation allow list MAC entry in an organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-firewall-isolation-allowlist-entries + **List the SSID profile assignments in an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-profiles-assignments - 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): The network IDs to include in the result set. + - ssidIds (array): The SSID IDs to include in the result set. + - profileIds (array): The SSID profile IDs to include in the result set. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. - - networkIds (array): networkIds array to filter out results - - ssids (array): ssids number array to filter out results """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], - "operation": "getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries", + "tags": ["wireless", "configure", "ssids", "profiles", "assignments"], + "operation": "getOrganizationWirelessSsidsProfilesAssignments", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries" + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/assignments" query_params = [ + "networkIds", + "ssidIds", + "profileIds", "perPage", "startingAfter", "endingBefore", - "networkIds", - "ssids", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "networkIds", - "ssids", + "ssidIds", + "profileIds", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -5020,37 +10793,33 @@ def getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessSsidsFirewallIsolationAllowlistEntries: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessSsidsProfilesAssignments: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) - def createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry( - self, organizationId: str, client: dict, ssid: dict, network: dict, **kwargs - ): + def createOrganizationWirelessSsidsProfilesAssignment(self, organizationId: str, profile: dict, ssid: dict, **kwargs): """ - **Create isolation allow list MAC entry for this organization** - https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-ssids-firewall-isolation-allowlist-entry + **Assigns an SSID profile to an SSID in the organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-ssids-profiles-assignment - organizationId (string): Organization ID - - client (object): The client of allowlist - - ssid (object): The SSID that allowlist belongs to - - network (object): The Network that allowlist belongs to - - description (string): The description of mac address + - profile (object): SSID profile to assign + - ssid (object): SSID to assign the SSID profile to + - network (object): Network containing the SSID (required if SSID number is used) """ kwargs.update(locals()) metadata = { - "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], - "operation": "createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry", + "tags": ["wireless", "configure", "ssids", "profiles", "assignments"], + "operation": "createOrganizationWirelessSsidsProfilesAssignment", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries" + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/assignments" body_params = [ - "description", - "client", + "profile", "ssid", "network", ] @@ -5061,102 +10830,161 @@ def createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry: ignoring unrecognized kwargs: {invalid}" + f"createOrganizationWirelessSsidsProfilesAssignment: ignoring unrecognized kwargs: {invalid}" ) return self._session.post(metadata, resource, payload) - def deleteOrganizationWirelessSsidsFirewallIsolationAllowlistEntry(self, organizationId: str, entryId: str): + def deleteOrganizationWirelessSsidsProfilesAssignments(self, organizationId: str, ssid: dict, **kwargs): """ - **Destroy isolation allow list MAC entry for this organization** - https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-ssids-firewall-isolation-allowlist-entry + **Unassigns the SSID profile assigned to an SSID** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-ssids-profiles-assignments - organizationId (string): Organization ID - - entryId (string): Entry ID + - ssid (object): SSID to delete the SSID profile assignment of + - network (object): Network containing the SSID (required if SSID number is used) """ + kwargs.update(locals()) + metadata = { - "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], - "operation": "deleteOrganizationWirelessSsidsFirewallIsolationAllowlistEntry", + "tags": ["wireless", "configure", "ssids", "profiles", "assignments"], + "operation": "deleteOrganizationWirelessSsidsProfilesAssignments", } organizationId = urllib.parse.quote(str(organizationId), safe="") - entryId = urllib.parse.quote(str(entryId), safe="") - resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries/{entryId}" + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/assignments" return self._session.delete(metadata, resource) - def updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry(self, organizationId: str, entryId: str, **kwargs): + def getOrganizationWirelessSsidsProfilesAssignmentsByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): """ - **Update isolation allow list MAC entry info** - https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-ssids-firewall-isolation-allowlist-entry + **List the SSID profile assignments in an organization, grouped by network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-profiles-assignments-by-network - organizationId (string): Organization ID - - entryId (string): Entry ID - - description (string): The description of mac address - - client (object): The client of allowlist + - 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): The network IDs to include in the result set. + - profileIds (array): The SSID profile IDs to include in the result set. + - networkGroupIds (array): The network group IDs to include in the result set. + - includeAllNetworks (boolean): When set to true, include all networks in the organization, even those without any SSID profile assignments. Defaults to false. + - excludeProfileIds (array): The SSID profile IDs to exclude from the result set. + - sortBy (string): Optional parameter to specify the field used to sort results. (default: network) + - sortOrder (string): Optional parameter to specify the sort order. Default value is asc. + - search (string): Optional parameter to search on network name or network group name. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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()) + if "sortBy" in kwargs: + options = ["group", "network"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + metadata = { - "tags": ["wireless", "configure", "ssids", "firewall", "isolation", "allowlist", "entries"], - "operation": "updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry", + "tags": ["wireless", "configure", "ssids", "profiles", "assignments", "byNetwork"], + "operation": "getOrganizationWirelessSsidsProfilesAssignmentsByNetwork", } organizationId = urllib.parse.quote(str(organizationId), safe="") - entryId = urllib.parse.quote(str(entryId), safe="") - resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries/{entryId}" + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/assignments/byNetwork" - body_params = [ - "description", - "client", + query_params = [ + "networkIds", + "profileIds", + "networkGroupIds", + "includeAllNetworks", + "excludeProfileIds", + "sortBy", + "sortOrder", + "search", + "perPage", + "startingAfter", + "endingBefore", ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "profileIds", + "networkGroupIds", + "excludeProfileIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) if self._session._validate_kwargs: - all_params = [] + body_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessSsidsProfilesAssignmentsByNetwork: ignoring unrecognized kwargs: {invalid}" ) - return self._session.put(metadata, resource, payload) + return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationWirelessSsidsOpenRoamingByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + def getOrganizationWirelessSsidsProfilesOverviews(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **Returns an array of objects, each containing SSID OpenRoaming configs for the corresponding network** - https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-open-roaming-by-network + **Returns the SSID profiles' overview information for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-profiles-overviews - 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 + - name (string): (Optional) Filter results by name. Case insensitive substring match. + - sortBy (string): Column to sort results by. Default is `name`. + - sortOrder (string): Direction to sort results by. Default is `asc`. + - profileIds (array): (Optional) Filter results by a list of SSID profile IDs. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. - - networkIds (array): Optional parameter to filter OpenRoaming configuration by Network Id. - - includeDisabledSsids (boolean): Optional parameter to include OpenRoaming configuration for disabled ssids. """ kwargs.update(locals()) + if "sortBy" in kwargs: + options = ["name"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + metadata = { - "tags": ["wireless", "configure", "ssids", "openRoaming", "byNetwork"], - "operation": "getOrganizationWirelessSsidsOpenRoamingByNetwork", + "tags": ["wireless", "configure", "ssids", "profiles", "overviews"], + "operation": "getOrganizationWirelessSsidsProfilesOverviews", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/wireless/ssids/openRoaming/byNetwork" + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/overviews" query_params = [ + "name", + "sortBy", + "sortOrder", + "profileIds", "perPage", "startingAfter", "endingBefore", - "networkIds", - "includeDisabledSsids", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ - "networkIds", + "profileIds", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -5168,11 +10996,67 @@ def getOrganizationWirelessSsidsOpenRoamingByNetwork(self, organizationId: str, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationWirelessSsidsOpenRoamingByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationWirelessSsidsProfilesOverviews: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) + def updateOrganizationWirelessSsidsProfile(self, organizationId: str, id: str, **kwargs): + """ + **Update this SSID profile** + https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-ssids-profile + + - organizationId (string): Organization ID + - id (string): ID + - name (string): Name of the SSID profile + - ssid (object): SSID configuration for the profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "ssids", "profiles"], + "operation": "updateOrganizationWirelessSsidsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/{id}" + + body_params = [ + "name", + "ssid", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationWirelessSsidsProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationWirelessSsidsProfile(self, organizationId: str, id: str): + """ + **Delete an SSID profile** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-wireless-ssids-profile + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["wireless", "configure", "ssids", "profiles"], + "operation": "deleteOrganizationWirelessSsidsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/profiles/{id}" + + return self._session.delete(metadata, resource) + def getOrganizationWirelessSsidsStatusesByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List status information of all BSSIDs in your organization** diff --git a/meraki/api/wirelessController.py b/meraki/api/wirelessController.py index 23510e42..3ba7fa19 100644 --- a/meraki/api/wirelessController.py +++ b/meraki/api/wirelessController.py @@ -177,6 +177,59 @@ def getOrganizationWirelessControllerConnections(self, organizationId: str, tota return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationWirelessControllerConnectionsUnassigned( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List of unassigned Catalyst access points and summary information** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-connections-unassigned + + - 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 + - controllerSerials (array): Optional parameter to filter access points by wireless LAN controller cloud ID. This filter uses multiple exact matches. + - supported (boolean): Optional parameter to filter access points based on if they are supported for dashboard monitoring. Values can be true/false, if not provided then all unassigned APs will be returned + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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": ["wirelessController", "configure", "connections", "unassigned"], + "operation": "getOrganizationWirelessControllerConnectionsUnassigned", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wirelessController/connections/unassigned" + + query_params = [ + "controllerSerials", + "supported", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "controllerSerials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessControllerConnectionsUnassigned: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationWirelessControllerDevicesInterfacesL2ByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -861,3 +914,36 @@ def getOrganizationWirelessControllerOverviewByDevice( ) return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def generateOrganizationWirelessControllerRegulatoryDomainPackage(self, organizationId: str, **kwargs): + """ + **Generate the regulatory domain package** + https://developer.cisco.com/meraki/api-v1/#!generate-organization-wireless-controller-regulatory-domain-package + + - organizationId (string): Organization ID + - networkIds (array): A list of network IDs to filter by + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wirelessController", "configure", "regulatoryDomain", "package"], + "operation": "generateOrganizationWirelessControllerRegulatoryDomainPackage", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wirelessController/regulatoryDomain/package/generate" + + body_params = [ + "networkIds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"generateOrganizationWirelessControllerRegulatoryDomainPackage: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) From b4784e818a71950d007bd50884748b7e962489d5 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Wed, 13 May 2026 17:26:44 -0700 Subject: [PATCH 04/60] Expand testing environments. --- .github/workflows/enable-early-access.yml | 9 +++- .github/workflows/regenerate-library.yml | 2 +- .github/workflows/test-library.yml | 25 ++++++++--- examples/ci/enable_all_early_access.py | 53 +++++++++++++---------- 4 files changed, 58 insertions(+), 31 deletions(-) diff --git a/.github/workflows/enable-early-access.yml b/.github/workflows/enable-early-access.yml index a9c2bb2d..d5fc84c6 100644 --- a/.github/workflows/enable-early-access.yml +++ b/.github/workflows/enable-early-access.yml @@ -25,5 +25,12 @@ jobs: - name: Enable all early access features env: MERAKI_DASHBOARD_API_KEY: ${{ secrets.TEST_ORG_API_KEY }} - BETA_ORG_1_ID: ${{ secrets.BETA_ORG_1_ID }} + EA_ORG_0: ${{ secrets.TEST_ORG_BETA_00_ID }} + EA_ORG_1: ${{ secrets.TEST_ORG_BETA_01_ID }} + EA_ORG_2: ${{ secrets.TEST_ORG_BETA_02_ID }} + EA_ORG_3: ${{ secrets.TEST_ORG_BETA_03_ID }} + EA_ORG_4: ${{ secrets.TEST_ORG_DEV_00_ID }} + EA_ORG_5: ${{ secrets.TEST_ORG_DEV_01_ID }} + EA_ORG_6: ${{ secrets.TEST_ORG_DEV_02_ID }} + EA_ORG_7: ${{ secrets.TEST_ORG_DEV_03_ID }} run: uv run python examples/ci/enable_all_early_access.py diff --git a/.github/workflows/regenerate-library.yml b/.github/workflows/regenerate-library.yml index cab79d30..35faf708 100644 --- a/.github/workflows/regenerate-library.yml +++ b/.github/workflows/regenerate-library.yml @@ -42,7 +42,7 @@ jobs: LIBRARY_VERSION: ${{ github.event.inputs.library_version }} API_VERSION: ${{ github.event.inputs.api_version }} MERAKI_DASHBOARD_API_KEY: ${{ github.event.inputs.target_branch == 'beta' && secrets.TEST_ORG_API_KEY || '' }} - BETA_ORG_ID: ${{ github.event.inputs.target_branch == 'beta' && secrets.BETA_ORG_1_ID || '' }} + BETA_ORG_ID: ${{ github.event.inputs.target_branch == 'beta' && secrets.TEST_ORG_BETA_00_ID || '' }} run: | ARGS="-g true -v $LIBRARY_VERSION -a $API_VERSION" if [ -n "$BETA_ORG_ID" ]; then diff --git a/.github/workflows/test-library.yml b/.github/workflows/test-library.yml index 85450737..1e0acf4c 100644 --- a/.github/workflows/test-library.yml +++ b/.github/workflows/test-library.yml @@ -92,12 +92,27 @@ jobs: - name: Integration tests env: - ORG_0: ${{ secrets.TEST_ORG_ID }} - ORG_1: ${{ secrets.TEST_ORG_ID_1 }} - ORG_2: ${{ secrets.TEST_ORG_ID_2 }} - ORG_3: ${{ secrets.TEST_ORG_ID_3 }} + ORG_GA_0: ${{ secrets.TEST_ORG_GA_00_ID }} + ORG_GA_1: ${{ secrets.TEST_ORG_GA_01_ID }} + ORG_GA_2: ${{ secrets.TEST_ORG_GA_02_ID }} + ORG_GA_3: ${{ secrets.TEST_ORG_GA_03_ID }} + ORG_BETA_0: ${{ secrets.TEST_ORG_BETA_00_ID }} + ORG_BETA_1: ${{ secrets.TEST_ORG_BETA_01_ID }} + ORG_BETA_2: ${{ secrets.TEST_ORG_BETA_02_ID }} + ORG_BETA_3: ${{ secrets.TEST_ORG_BETA_03_ID }} + ORG_DEV_0: ${{ secrets.TEST_ORG_DEV_00_ID }} + ORG_DEV_1: ${{ secrets.TEST_ORG_DEV_01_ID }} + ORG_DEV_2: ${{ secrets.TEST_ORG_DEV_02_ID }} + ORG_DEV_3: ${{ secrets.TEST_ORG_DEV_03_ID }} run: | + BRANCH="${{ github.head_ref || github.ref_name }}" + case "$BRANCH" in + main|release) PREFIX="GA" ;; + beta|beta-release) PREFIX="BETA" ;; + httpx|httpx-release) PREFIX="DEV" ;; + *) echo "Unknown branch: $BRANCH" && exit 1 ;; + esac INDEX=$(echo '${{ needs.assign-orgs.outputs.assignments }}' | jq -r '.["${{ matrix.python-version }}"]') - VAR_NAME="ORG_${INDEX}" + VAR_NAME="ORG_${PREFIX}_${INDEX}" ORG_ID="${!VAR_NAME}" uv run pytest tests/integration -v --tb=short --apikey ${{ secrets.TEST_ORG_API_KEY }} --o "$ORG_ID" diff --git a/examples/ci/enable_all_early_access.py b/examples/ci/enable_all_early_access.py index 68f299be..19a7b5ed 100644 --- a/examples/ci/enable_all_early_access.py +++ b/examples/ci/enable_all_early_access.py @@ -1,10 +1,10 @@ -"""Opt in to all available early access features for a Meraki organization. +"""Opt in to all available early access features for Meraki organizations. -Reads BETA_ORG_1_ID from the environment, fetches the feature list, -creates org-wide opt-ins for any features not already enabled, and -prints a summary report. +Reads EA_ORG_0 through EA_ORG_7 from the environment, and for each org +fetches the feature list, creates org-wide opt-ins for any features not +already enabled, and prints a summary report. -WARNING: This will subject the organization to unannounced breaking API +WARNING: This will subject the organizations to unannounced breaking API changes. """ @@ -14,32 +14,37 @@ import meraki.aio -ORG_ID: str = os.environ.get("BETA_ORG_1_ID", "") -if not ORG_ID: - sys.exit("BETA_ORG_1_ID environment variable is not set") +ORG_IDS: list[str] = [v for i in range(8) if (v := os.environ.get(f"EA_ORG_{i}", ""))] +if not ORG_IDS: + sys.exit("No EA_ORG_* environment variables are set") -async def main(): - async with meraki.aio.AsyncDashboardAPI(suppress_logging=True) as dashboard: - features = await dashboard.organizations.getOrganizationEarlyAccessFeatures(ORG_ID) - opt_ins = await dashboard.organizations.getOrganizationEarlyAccessFeaturesOptIns(ORG_ID) +async def enable_early_access(dashboard, org_id: str): + features = await dashboard.organizations.getOrganizationEarlyAccessFeatures(org_id) + opt_ins = await dashboard.organizations.getOrganizationEarlyAccessFeaturesOptIns(org_id) + + opted_in_short_names = {oi["shortName"] for oi in opt_ins} - opted_in_short_names = {oi["shortName"] for oi in opt_ins} + tasks = [] + for feature in features: + if feature["shortName"] not in opted_in_short_names: + tasks.append(dashboard.organizations.createOrganizationEarlyAccessFeaturesOptIn(org_id, feature["shortName"])) - tasks = [] - for feature in features: - if feature["shortName"] not in opted_in_short_names: - tasks.append(dashboard.organizations.createOrganizationEarlyAccessFeaturesOptIn(ORG_ID, feature["shortName"])) + new_opt_ins = await asyncio.gather(*tasks) if tasks else [] - new_opt_ins = await asyncio.gather(*tasks) if tasks else [] + all_opt_ins = opt_ins + list(new_opt_ins) + print(f"\nOrg {org_id}: enabled {len(new_opt_ins)} new features ({len(opt_ins)} already opted in)") + print(f" All early access features ({len(all_opt_ins)} total):") + for oi in all_opt_ins: + print(f" - {oi['shortName']}") - all_opt_ins = opt_ins + list(new_opt_ins) - print(f"Enabled {len(new_opt_ins)} new features ({len(opt_ins)} already opted in)") - print(f"\nAll early access features ({len(all_opt_ins)} total):") - for oi in all_opt_ins: - print(f" - {oi['shortName']}") + return all_opt_ins - return all_opt_ins + +async def main(): + async with meraki.aio.AsyncDashboardAPI(suppress_logging=True) as dashboard: + results = await asyncio.gather(*(enable_early_access(dashboard, org_id) for org_id in ORG_IDS)) + return results if __name__ == "__main__": From 26952147008e9fcfcd60971008e4b293e380487a Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Thu, 14 May 2026 01:26:20 +0000 Subject: [PATCH 05/60] Auto-generated library v3.1.0b1 for API v1.70.0-beta.1. (#356) Co-authored-by: GitHub Action --- docs/generation-report.md | 15 ++++ meraki/__init__.py | 2 +- meraki/_version.py | 2 +- meraki/aio/api/appliance.py | 91 +++++++++++++++++++++++ meraki/aio/api/networks.py | 51 ++++++++++++- meraki/aio/api/organizations.py | 118 +++++++++++++++++++++++++++++- meraki/aio/api/wireless.py | 10 ++- meraki/api/appliance.py | 91 +++++++++++++++++++++++ meraki/api/batch/appliance.py | 27 +++++++ meraki/api/batch/networks.py | 8 ++ meraki/api/batch/organizations.py | 27 ++++++- meraki/api/batch/wireless.py | 4 +- meraki/api/networks.py | 51 ++++++++++++- meraki/api/organizations.py | 118 +++++++++++++++++++++++++++++- meraki/api/wireless.py | 10 ++- pyproject.toml | 2 +- uv.lock | 2 +- 17 files changed, 606 insertions(+), 23 deletions(-) diff --git a/docs/generation-report.md b/docs/generation-report.md index 884d7544..cd46262f 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,20 @@ # Generation Report +## 2026-05-14 | Library v3.1.0b1 | API 1.70.0-beta.1 + + +### Python keyword parameter conflicts + + +The following operations have parameters whose names are Python reserved keywords. +The generator renames them with a trailing underscore (e.g., `from` -> `from_`). +These should be reported to the owning teams for resolution in the API spec. + + +| Scope | Operation | Location | Param | +| --- | --- | --- | --- | +| secureConnect | `createOrganizationSecureConnectRemoteAccessLogsExport` | body | `from` | + ## 2026-05-06 | Library v3.1.0b0 | API 1.70.0-beta.0 diff --git a/meraki/__init__.py b/meraki/__init__.py index aafca112..0e054ff9 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -52,7 +52,7 @@ from meraki._version import __version__ # noqa: F401 from datetime import datetime -__api_version__ = "1.70.0-beta.0" +__api_version__ = "1.70.0-beta.1" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index af79d361..f17b01a6 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "3.1.0b0" +__version__ = "3.1.0b1" diff --git a/meraki/aio/api/appliance.py b/meraki/aio/api/appliance.py index b4634abd..edd24888 100644 --- a/meraki/aio/api/appliance.py +++ b/meraki/aio/api/appliance.py @@ -2032,6 +2032,7 @@ def createNetworkApplianceStaticRoute(self, networkId: str, name: str, subnet: s - subnet (string): Subnet of the route - gatewayIp (string): Gateway IP address (next hop) - gatewayVlanId (integer): Gateway VLAN ID + - vrf (object): VRF settings for the static route. """ kwargs.update(locals()) @@ -2048,6 +2049,7 @@ def createNetworkApplianceStaticRoute(self, networkId: str, name: str, subnet: s "subnet", "gatewayIp", "gatewayVlanId", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2092,6 +2094,7 @@ def updateNetworkApplianceStaticRoute(self, networkId: str, staticRouteId: str, - enabled (boolean): Whether the route should be enabled or not - fixedIpAssignments (object): Fixed DHCP IP assignments on the route - reservedIpRanges (array): DHCP reserved IP ranges + - vrf (object): VRF settings for the static route. """ kwargs.update(locals()) @@ -2112,6 +2115,7 @@ def updateNetworkApplianceStaticRoute(self, networkId: str, staticRouteId: str, "enabled", "fixedIpAssignments", "reservedIpRanges", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -3166,6 +3170,41 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): return self._session.put(metadata, resource, payload) + def updateNetworkApplianceVpnSiteToSiteHubVrfs(self, networkId: str, hubNetworkId: str, _json: list, **kwargs): + """ + **Update the VRF mappings for a source network and hub pair.** + https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-vpn-site-to-site-hub-vrfs + + - networkId (string): Network ID + - hubNetworkId (string): Hub network ID + - _json (array): The list of VRFs for this source and hub mapping. + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "vpn", "siteToSite", "hubs", "vrfs"], + "operation": "updateNetworkApplianceVpnSiteToSiteHubVrfs", + } + networkId = urllib.parse.quote(str(networkId), safe="") + hubNetworkId = urllib.parse.quote(str(hubNetworkId), safe="") + resource = f"/networks/{networkId}/appliance/vpn/siteToSite/hubs/{hubNetworkId}/vrfs" + + body_params = [ + "_json", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateNetworkApplianceVpnSiteToSiteHubVrfs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + def getNetworkApplianceVpnSiteToSiteVpn(self, networkId: str): """ **Return the site-to-site VPN settings of a network** @@ -3361,6 +3400,7 @@ def getOrganizationApplianceDevicesInterfacesPortsByDevice(self, organizationId: - organizationId (string): Organization ID - serials (array): Parameter to filter the results by device serials + - interfaces (array): Parameter to filter the results by specific interfaces - numbers (array): Parameter to filter the results by specific ports """ @@ -3375,12 +3415,14 @@ def getOrganizationApplianceDevicesInterfacesPortsByDevice(self, organizationId: query_params = [ "serials", + "interfaces", "numbers", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "serials", + "interfaces", "numbers", ] for k, v in kwargs.items(): @@ -4893,6 +4935,55 @@ def getOrganizationApplianceVpnRemoteAccessSecureClientTunnelCreationByClient(se return self._session.get(metadata, resource, params) + def getOrganizationApplianceVpnSiteToSiteHubsVrfs(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return source-to-hub VRF mappings for site-to-site VPN within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-site-to-site-hubs-vrfs + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. 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. + - networkIds (array): Optional parameter to filter source-to-hub mappings by source network IDs. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "vpn", "siteToSite", "hubs", "vrfs"], + "operation": "getOrganizationApplianceVpnSiteToSiteHubsVrfs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/vpn/siteToSite/hubs/vrfs" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceVpnSiteToSiteHubsVrfs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceVpnSiteToSiteIpsecPeersSlas(self, organizationId: str): """ **Get the list of available IPsec SLA policies for an organization** diff --git a/meraki/aio/api/networks.py b/meraki/aio/api/networks.py index 63de7305..e995d1df 100644 --- a/meraki/aio/api/networks.py +++ b/meraki/aio/api/networks.py @@ -855,6 +855,23 @@ def vmxNetworkDevicesClaim(self, networkId: str, size: str, **kwargs): return self._session.post(metadata, resource, payload) + def getNetworkDevicesJson(self, networkId: str): + """ + **Extraction of the legacy nodes JSON endpoint for a network** + https://developer.cisco.com/meraki/api-v1/#!get-network-devices-json + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["networks", "configure", "devices", "json"], + "operation": "getNetworkDevicesJson", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/devices/json" + + return self._session.get(metadata, resource) + def removeNetworkDevices(self, networkId: str, serial: str, **kwargs): """ **Remove a single device** @@ -2210,14 +2227,17 @@ def updateNetworkMerakiAuthUser(self, networkId: str, merakiAuthUserId: str, **k return self._session.put(metadata, resource, payload) - def getNetworkMqttBrokers(self, networkId: str): + def getNetworkMqttBrokers(self, networkId: str, **kwargs): """ **List the MQTT brokers for this network** https://developer.cisco.com/meraki/api-v1/#!get-network-mqtt-brokers - networkId (string): Network ID + - productTypes (array): Optional parameter to filter MQTT brokers by product type. If multiple types are provided, the query will return brokers that match any of the provided types. """ + kwargs.update(locals()) + metadata = { "tags": ["networks", "configure", "mqttBrokers"], "operation": "getNetworkMqttBrokers", @@ -2225,7 +2245,26 @@ def getNetworkMqttBrokers(self, networkId: str): networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/mqttBrokers" - return self._session.get(metadata, resource) + query_params = [ + "productTypes", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "productTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getNetworkMqttBrokers: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) def createNetworkMqttBroker(self, networkId: str, name: str, host: str, port: int, **kwargs): """ @@ -2238,10 +2277,17 @@ def createNetworkMqttBroker(self, networkId: str, name: str, host: str, port: in - port (integer): Host port though which the MQTT broker can be reached. - security (object): Security settings of the MQTT broker. - authentication (object): Authentication settings of the MQTT broker + - productType (string): The product type for which the MQTT broker is being created. """ kwargs.update(locals()) + if "productType" in kwargs: + options = ["camera", "wireless"] + assert kwargs["productType"] in options, ( + f'''"productType" cannot be "{kwargs["productType"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["networks", "configure", "mqttBrokers"], "operation": "createNetworkMqttBroker", @@ -2255,6 +2301,7 @@ def createNetworkMqttBroker(self, networkId: str, name: str, host: str, port: in "port", "security", "authentication", + "productType", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 30a71f71..83078802 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -2972,6 +2972,56 @@ def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClien return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClientOs(self, organizationId: str, **kwargs): + """ + **Summarizes wired connection successes and failures by client OS.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network-by-client-os + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "wired", "experience", "successfulConnections", "byNetwork", "byClientOs"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClientOs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork/byClientOs" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClientOs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -3553,7 +3603,7 @@ def importOrganizationCertificates(self, organizationId: str, managedBy: str, co https://developer.cisco.com/meraki/api-v1/#!import-organization-certificates - organizationId (string): Organization ID - - managedBy (string): Certificate managed by type [system_manager, mr, encrypted_syslog] + - managedBy (string): Certificate managed by type [system_manager, mr, encrypted_syslog, grpc_dial_out] - contents (string): Certificate content in valid PEM format - description (string): Certificate description """ @@ -3561,7 +3611,7 @@ def importOrganizationCertificates(self, organizationId: str, managedBy: str, co kwargs = locals() if "managedBy" in kwargs: - options = ["encrypted_syslog", "mr", "system_manager"] + options = ["encrypted_syslog", "grpc_dial_out", "mr", "system_manager"] assert kwargs["managedBy"] in options, ( f'''"managedBy" cannot be "{kwargs["managedBy"]}", & must be set to one of: {options}''' ) @@ -8587,6 +8637,25 @@ def getNetworkMoves(self, organizationId: str, total_pages=1, direction="next", return self._session.get_pages(metadata, resource, params, total_pages, direction) + def deleteOrganizationOpenRoamingCertificate(self, organizationId: str, id: str): + """ + **Delete an open roaming certificate.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-open-roaming-certificate + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["organizations", "configure", "openRoaming", "certificates"], + "operation": "deleteOrganizationOpenRoamingCertificate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/openRoaming/certificates/{id}" + + return self._session.delete(metadata, resource) + def getOrganizationOpenapiSpec(self, organizationId: str, **kwargs): """ **Return the OpenAPI Specification of the organization's API documentation in JSON** @@ -9813,6 +9882,7 @@ def createOrganizationRoutingVrf(self, organizationId: str, name: str, **kwargs) - description (string): Description of the VRF (Virtual Routing and Forwarding) - routeDistinguisher (string): RD (Route Distinguisher) for the VRF (Virtual Routing and Forwarding) - routeTarget (string): Route target are used to control the import and export of routes between VRFs + - appliance (object): This parameter is used to enable or disable the VRF on the WAN appliance """ kwargs.update(locals()) @@ -9829,6 +9899,7 @@ def createOrganizationRoutingVrf(self, organizationId: str, name: str, **kwargs) "description", "routeDistinguisher", "routeTarget", + "appliance", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -9840,6 +9911,47 @@ def createOrganizationRoutingVrf(self, organizationId: str, name: str, **kwargs) return self._session.post(metadata, resource, payload) + def getOrganizationRoutingVrfsOverviewByVrf(self, organizationId: str, **kwargs): + """ + **List existing organization-wide VRFs (Virtual Routing and Forwarding) overviews.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-routing-vrfs-overview-by-vrf + + - organizationId (string): Organization ID + - vrfIds (array): IDs of the desired VRFs. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "routing", "vrfs", "overview", "byVrf"], + "operation": "getOrganizationRoutingVrfsOverviewByVrf", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/routing/vrfs/overview/byVrf" + + query_params = [ + "vrfIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "vrfIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationRoutingVrfsOverviewByVrf: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def updateOrganizationRoutingVrf(self, organizationId: str, vrfId: str, **kwargs): """ **Update an organization-wide VRF (Virtual Routing and Forwarding)** @@ -9851,6 +9963,7 @@ def updateOrganizationRoutingVrf(self, organizationId: str, vrfId: str, **kwargs - description (string): Description of the VRF (Virtual Routing and Forwarding) - routeDistinguisher (string): RD (Route Distinguisher) for the VRF (Virtual Routing and Forwarding) - routeTarget (string): Route target are used to control the import and export of routes between VRFs + - appliance (object): This parameter is used to enable or disable the VRF on the WAN appliance """ kwargs.update(locals()) @@ -9868,6 +9981,7 @@ def updateOrganizationRoutingVrf(self, organizationId: str, vrfId: str, **kwargs "description", "routeDistinguisher", "routeTarget", + "appliance", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index 87306a97..1135a513 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -808,7 +808,7 @@ def updateNetworkWirelessBluetoothSettings(self, networkId: str, **kwargs): - majorMinorAssignmentMode (string): The way major and minor number should be assigned to nodes in the network. ('Unique', 'Non-unique') - major (integer): The major number to be used in the beacon identifier. Only valid in 'Non-unique' mode. - minor (integer): The minor number to be used in the beacon identifier. Only valid in 'Non-unique' mode. - - transmit (object): Transmit settings including power, interval, and advertised power. + - transmit (object): Transmit settings. """ kwargs.update(locals()) @@ -2721,6 +2721,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - dnsRewrite (object): DNS servers rewrite settings - speedBurst (object): The SpeedBurst setting for this SSID' - namedVlans (object): Named VLAN settings. + - security (object): Security settings for the SSID - localAuthFallback (object): The current configuration for Local Authentication Fallback. Enables the Access Point (AP) to store client authentication data for a specified duration that can be adjusted as needed. - radiusAccountingStartDelay (integer): The delay (in seconds) before sending the first RADIUS accounting start message. Must be between 0 and 60 seconds. """ @@ -2874,6 +2875,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): "dnsRewrite", "speedBurst", "namedVlans", + "security", "localAuthFallback", "radiusAccountingStartDelay", ] @@ -3661,7 +3663,7 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * - useRedirectUrl (boolean): The Boolean indicating whether the the user will be redirected to the custom redirect URL after the splash page. A custom redirect URL must be set if this is true. - welcomeMessage (string): The welcome message for the users on the splash page. - language (string): Language of splash page. - - userConsent (object): User consent settings. + - userConsent (object): User consent settings - themeId (string): The id of the selected splash theme. - splashLogo (object): The logo used in the splash page. - splashImage (object): The image used in the splash page. @@ -4274,7 +4276,7 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClie self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Summarizes wireless post connection capacity successes and failures by client OS.** + **Summarizes wireless post connection capacity successes and failures by client OS and driver version.** https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-client-os - organizationId (string): Organization ID @@ -5316,7 +5318,7 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( kwargs.update(locals()) if "contributor" in kwargs: - options = ["Admin power restriction", "Insufficient AP density", "Sticky client", "Weak client signal"] + options = ["Admin power restriction", "Insufficient AP density", "Sticky client", "Transient weak signal"] assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) diff --git a/meraki/api/appliance.py b/meraki/api/appliance.py index 24b56d66..ae13c800 100644 --- a/meraki/api/appliance.py +++ b/meraki/api/appliance.py @@ -2032,6 +2032,7 @@ def createNetworkApplianceStaticRoute(self, networkId: str, name: str, subnet: s - subnet (string): Subnet of the route - gatewayIp (string): Gateway IP address (next hop) - gatewayVlanId (integer): Gateway VLAN ID + - vrf (object): VRF settings for the static route. """ kwargs.update(locals()) @@ -2048,6 +2049,7 @@ def createNetworkApplianceStaticRoute(self, networkId: str, name: str, subnet: s "subnet", "gatewayIp", "gatewayVlanId", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2092,6 +2094,7 @@ def updateNetworkApplianceStaticRoute(self, networkId: str, staticRouteId: str, - enabled (boolean): Whether the route should be enabled or not - fixedIpAssignments (object): Fixed DHCP IP assignments on the route - reservedIpRanges (array): DHCP reserved IP ranges + - vrf (object): VRF settings for the static route. """ kwargs.update(locals()) @@ -2112,6 +2115,7 @@ def updateNetworkApplianceStaticRoute(self, networkId: str, staticRouteId: str, "enabled", "fixedIpAssignments", "reservedIpRanges", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -3166,6 +3170,41 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): return self._session.put(metadata, resource, payload) + def updateNetworkApplianceVpnSiteToSiteHubVrfs(self, networkId: str, hubNetworkId: str, _json: list, **kwargs): + """ + **Update the VRF mappings for a source network and hub pair.** + https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-vpn-site-to-site-hub-vrfs + + - networkId (string): Network ID + - hubNetworkId (string): Hub network ID + - _json (array): The list of VRFs for this source and hub mapping. + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "vpn", "siteToSite", "hubs", "vrfs"], + "operation": "updateNetworkApplianceVpnSiteToSiteHubVrfs", + } + networkId = urllib.parse.quote(str(networkId), safe="") + hubNetworkId = urllib.parse.quote(str(hubNetworkId), safe="") + resource = f"/networks/{networkId}/appliance/vpn/siteToSite/hubs/{hubNetworkId}/vrfs" + + body_params = [ + "_json", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateNetworkApplianceVpnSiteToSiteHubVrfs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + def getNetworkApplianceVpnSiteToSiteVpn(self, networkId: str): """ **Return the site-to-site VPN settings of a network** @@ -3361,6 +3400,7 @@ def getOrganizationApplianceDevicesInterfacesPortsByDevice(self, organizationId: - organizationId (string): Organization ID - serials (array): Parameter to filter the results by device serials + - interfaces (array): Parameter to filter the results by specific interfaces - numbers (array): Parameter to filter the results by specific ports """ @@ -3375,12 +3415,14 @@ def getOrganizationApplianceDevicesInterfacesPortsByDevice(self, organizationId: query_params = [ "serials", + "interfaces", "numbers", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = [ "serials", + "interfaces", "numbers", ] for k, v in kwargs.items(): @@ -4893,6 +4935,55 @@ def getOrganizationApplianceVpnRemoteAccessSecureClientTunnelCreationByClient(se return self._session.get(metadata, resource, params) + def getOrganizationApplianceVpnSiteToSiteHubsVrfs(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return source-to-hub VRF mappings for site-to-site VPN within an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-site-to-site-hubs-vrfs + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. 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. + - networkIds (array): Optional parameter to filter source-to-hub mappings by source network IDs. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "vpn", "siteToSite", "hubs", "vrfs"], + "operation": "getOrganizationApplianceVpnSiteToSiteHubsVrfs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/vpn/siteToSite/hubs/vrfs" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceVpnSiteToSiteHubsVrfs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceVpnSiteToSiteIpsecPeersSlas(self, organizationId: str): """ **Get the list of available IPsec SLA policies for an organization** diff --git a/meraki/api/batch/appliance.py b/meraki/api/batch/appliance.py index dc941fb8..0cd65c9e 100644 --- a/meraki/api/batch/appliance.py +++ b/meraki/api/batch/appliance.py @@ -1402,6 +1402,33 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): } return action + def updateNetworkApplianceVpnSiteToSiteHubVrfs(self, networkId: str, hubNetworkId: str, _json: list, **kwargs): + """ + **Update the VRF mappings for a source network and hub pair.** + https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-vpn-site-to-site-hub-vrfs + + - networkId (string): Network ID + - hubNetworkId (string): Hub network ID + - _json (array): The list of VRFs for this source and hub mapping. + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + hubNetworkId = urllib.parse.quote(hubNetworkId, safe="") + resource = f"/networks/{networkId}/appliance/vpn/siteToSite/hubs/{hubNetworkId}/vrfs" + + body_params = [ + "_json", + ] + 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 updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kwargs): """ **Update the site-to-site VPN settings of a network. Only valid for MX networks in NAT mode.** diff --git a/meraki/api/batch/networks.py b/meraki/api/batch/networks.py index cc7f323f..3b6e6d94 100644 --- a/meraki/api/batch/networks.py +++ b/meraki/api/batch/networks.py @@ -821,10 +821,17 @@ def createNetworkMqttBroker(self, networkId: str, name: str, host: str, port: in - port (integer): Host port though which the MQTT broker can be reached. - security (object): Security settings of the MQTT broker. - authentication (object): Authentication settings of the MQTT broker + - productType (string): The product type for which the MQTT broker is being created. """ kwargs.update(locals()) + if "productType" in kwargs: + options = ["camera", "wireless"] + assert kwargs["productType"] in options, ( + f'''"productType" cannot be "{kwargs["productType"]}", & must be set to one of: {options}''' + ) + networkId = urllib.parse.quote(networkId, safe="") resource = f"/networks/{networkId}/mqttBrokers" @@ -834,6 +841,7 @@ def createNetworkMqttBroker(self, networkId: str, name: str, host: str, port: in "port", "security", "authentication", + "productType", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index cfe628f8..f01a712e 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -630,7 +630,7 @@ def importOrganizationCertificates(self, organizationId: str, managedBy: str, co https://developer.cisco.com/meraki/api-v1/#!import-organization-certificates - organizationId (string): Organization ID - - managedBy (string): Certificate managed by type [system_manager, mr, encrypted_syslog] + - managedBy (string): Certificate managed by type [system_manager, mr, encrypted_syslog, grpc_dial_out] - contents (string): Certificate content in valid PEM format - description (string): Certificate description """ @@ -638,7 +638,7 @@ def importOrganizationCertificates(self, organizationId: str, managedBy: str, co kwargs = locals() if "managedBy" in kwargs: - options = ["encrypted_syslog", "mr", "system_manager"] + options = ["encrypted_syslog", "grpc_dial_out", "mr", "system_manager"] assert kwargs["managedBy"] in options, ( f'''"managedBy" cannot be "{kwargs["managedBy"]}", & must be set to one of: {options}''' ) @@ -1761,6 +1761,25 @@ def bulkOrganizationNetworksGroupUnassign(self, organizationId: str, groupId: st } return action + def deleteOrganizationOpenRoamingCertificate(self, organizationId: str, id: str): + """ + **Delete an open roaming certificate.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-open-roaming-certificate + + - organizationId (string): Organization ID + - id (string): ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(id, safe="") + resource = f"/organizations/{organizationId}/openRoaming/certificates/{id}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def createOrganizationPoliciesGlobalFirewallRuleset(self, organizationId: str, name: str, **kwargs): """ **Create an Organization-Wide Policy Firewall Ruleset** @@ -2351,6 +2370,7 @@ def createOrganizationRoutingVrf(self, organizationId: str, name: str, **kwargs) - description (string): Description of the VRF (Virtual Routing and Forwarding) - routeDistinguisher (string): RD (Route Distinguisher) for the VRF (Virtual Routing and Forwarding) - routeTarget (string): Route target are used to control the import and export of routes between VRFs + - appliance (object): This parameter is used to enable or disable the VRF on the WAN appliance """ kwargs.update(locals()) @@ -2363,6 +2383,7 @@ def createOrganizationRoutingVrf(self, organizationId: str, name: str, **kwargs) "description", "routeDistinguisher", "routeTarget", + "appliance", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -2383,6 +2404,7 @@ def updateOrganizationRoutingVrf(self, organizationId: str, vrfId: str, **kwargs - description (string): Description of the VRF (Virtual Routing and Forwarding) - routeDistinguisher (string): RD (Route Distinguisher) for the VRF (Virtual Routing and Forwarding) - routeTarget (string): Route target are used to control the import and export of routes between VRFs + - appliance (object): This parameter is used to enable or disable the VRF on the WAN appliance """ kwargs.update(locals()) @@ -2396,6 +2418,7 @@ def updateOrganizationRoutingVrf(self, organizationId: str, vrfId: str, **kwargs "description", "routeDistinguisher", "routeTarget", + "appliance", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { diff --git a/meraki/api/batch/wireless.py b/meraki/api/batch/wireless.py index f529ffa9..8714267d 100644 --- a/meraki/api/batch/wireless.py +++ b/meraki/api/batch/wireless.py @@ -904,6 +904,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - dnsRewrite (object): DNS servers rewrite settings - speedBurst (object): The SpeedBurst setting for this SSID' - namedVlans (object): Named VLAN settings. + - security (object): Security settings for the SSID - localAuthFallback (object): The current configuration for Local Authentication Fallback. Enables the Access Point (AP) to store client authentication data for a specified duration that can be adjusted as needed. - radiusAccountingStartDelay (integer): The delay (in seconds) before sending the first RADIUS accounting start message. Must be between 0 and 60 seconds. """ @@ -1053,6 +1054,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): "dnsRewrite", "speedBurst", "namedVlans", + "security", "localAuthFallback", "radiusAccountingStartDelay", ] @@ -1541,7 +1543,7 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * - useRedirectUrl (boolean): The Boolean indicating whether the the user will be redirected to the custom redirect URL after the splash page. A custom redirect URL must be set if this is true. - welcomeMessage (string): The welcome message for the users on the splash page. - language (string): Language of splash page. - - userConsent (object): User consent settings. + - userConsent (object): User consent settings - themeId (string): The id of the selected splash theme. - splashLogo (object): The logo used in the splash page. - splashImage (object): The image used in the splash page. diff --git a/meraki/api/networks.py b/meraki/api/networks.py index 9e7c4c4e..73107503 100644 --- a/meraki/api/networks.py +++ b/meraki/api/networks.py @@ -855,6 +855,23 @@ def vmxNetworkDevicesClaim(self, networkId: str, size: str, **kwargs): return self._session.post(metadata, resource, payload) + def getNetworkDevicesJson(self, networkId: str): + """ + **Extraction of the legacy nodes JSON endpoint for a network** + https://developer.cisco.com/meraki/api-v1/#!get-network-devices-json + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["networks", "configure", "devices", "json"], + "operation": "getNetworkDevicesJson", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/devices/json" + + return self._session.get(metadata, resource) + def removeNetworkDevices(self, networkId: str, serial: str, **kwargs): """ **Remove a single device** @@ -2210,14 +2227,17 @@ def updateNetworkMerakiAuthUser(self, networkId: str, merakiAuthUserId: str, **k return self._session.put(metadata, resource, payload) - def getNetworkMqttBrokers(self, networkId: str): + def getNetworkMqttBrokers(self, networkId: str, **kwargs): """ **List the MQTT brokers for this network** https://developer.cisco.com/meraki/api-v1/#!get-network-mqtt-brokers - networkId (string): Network ID + - productTypes (array): Optional parameter to filter MQTT brokers by product type. If multiple types are provided, the query will return brokers that match any of the provided types. """ + kwargs.update(locals()) + metadata = { "tags": ["networks", "configure", "mqttBrokers"], "operation": "getNetworkMqttBrokers", @@ -2225,7 +2245,26 @@ def getNetworkMqttBrokers(self, networkId: str): networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/mqttBrokers" - return self._session.get(metadata, resource) + query_params = [ + "productTypes", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "productTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getNetworkMqttBrokers: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) def createNetworkMqttBroker(self, networkId: str, name: str, host: str, port: int, **kwargs): """ @@ -2238,10 +2277,17 @@ def createNetworkMqttBroker(self, networkId: str, name: str, host: str, port: in - port (integer): Host port though which the MQTT broker can be reached. - security (object): Security settings of the MQTT broker. - authentication (object): Authentication settings of the MQTT broker + - productType (string): The product type for which the MQTT broker is being created. """ kwargs.update(locals()) + if "productType" in kwargs: + options = ["camera", "wireless"] + assert kwargs["productType"] in options, ( + f'''"productType" cannot be "{kwargs["productType"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["networks", "configure", "mqttBrokers"], "operation": "createNetworkMqttBroker", @@ -2255,6 +2301,7 @@ def createNetworkMqttBroker(self, networkId: str, name: str, host: str, port: in "port", "security", "authentication", + "productType", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index 61db38eb..a72cdfd0 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -2972,6 +2972,56 @@ def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClien return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClientOs(self, organizationId: str, **kwargs): + """ + **Summarizes wired connection successes and failures by client OS.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network-by-client-os + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "wired", "experience", "successfulConnections", "byNetwork", "byClientOs"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClientOs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork/byClientOs" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClientOs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -3553,7 +3603,7 @@ def importOrganizationCertificates(self, organizationId: str, managedBy: str, co https://developer.cisco.com/meraki/api-v1/#!import-organization-certificates - organizationId (string): Organization ID - - managedBy (string): Certificate managed by type [system_manager, mr, encrypted_syslog] + - managedBy (string): Certificate managed by type [system_manager, mr, encrypted_syslog, grpc_dial_out] - contents (string): Certificate content in valid PEM format - description (string): Certificate description """ @@ -3561,7 +3611,7 @@ def importOrganizationCertificates(self, organizationId: str, managedBy: str, co kwargs = locals() if "managedBy" in kwargs: - options = ["encrypted_syslog", "mr", "system_manager"] + options = ["encrypted_syslog", "grpc_dial_out", "mr", "system_manager"] assert kwargs["managedBy"] in options, ( f'''"managedBy" cannot be "{kwargs["managedBy"]}", & must be set to one of: {options}''' ) @@ -8587,6 +8637,25 @@ def getNetworkMoves(self, organizationId: str, total_pages=1, direction="next", return self._session.get_pages(metadata, resource, params, total_pages, direction) + def deleteOrganizationOpenRoamingCertificate(self, organizationId: str, id: str): + """ + **Delete an open roaming certificate.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-open-roaming-certificate + + - organizationId (string): Organization ID + - id (string): ID + """ + + metadata = { + "tags": ["organizations", "configure", "openRoaming", "certificates"], + "operation": "deleteOrganizationOpenRoamingCertificate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") + resource = f"/organizations/{organizationId}/openRoaming/certificates/{id}" + + return self._session.delete(metadata, resource) + def getOrganizationOpenapiSpec(self, organizationId: str, **kwargs): """ **Return the OpenAPI Specification of the organization's API documentation in JSON** @@ -9813,6 +9882,7 @@ def createOrganizationRoutingVrf(self, organizationId: str, name: str, **kwargs) - description (string): Description of the VRF (Virtual Routing and Forwarding) - routeDistinguisher (string): RD (Route Distinguisher) for the VRF (Virtual Routing and Forwarding) - routeTarget (string): Route target are used to control the import and export of routes between VRFs + - appliance (object): This parameter is used to enable or disable the VRF on the WAN appliance """ kwargs.update(locals()) @@ -9829,6 +9899,7 @@ def createOrganizationRoutingVrf(self, organizationId: str, name: str, **kwargs) "description", "routeDistinguisher", "routeTarget", + "appliance", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -9840,6 +9911,47 @@ def createOrganizationRoutingVrf(self, organizationId: str, name: str, **kwargs) return self._session.post(metadata, resource, payload) + def getOrganizationRoutingVrfsOverviewByVrf(self, organizationId: str, **kwargs): + """ + **List existing organization-wide VRFs (Virtual Routing and Forwarding) overviews.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-routing-vrfs-overview-by-vrf + + - organizationId (string): Organization ID + - vrfIds (array): IDs of the desired VRFs. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "routing", "vrfs", "overview", "byVrf"], + "operation": "getOrganizationRoutingVrfsOverviewByVrf", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/routing/vrfs/overview/byVrf" + + query_params = [ + "vrfIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "vrfIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationRoutingVrfsOverviewByVrf: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def updateOrganizationRoutingVrf(self, organizationId: str, vrfId: str, **kwargs): """ **Update an organization-wide VRF (Virtual Routing and Forwarding)** @@ -9851,6 +9963,7 @@ def updateOrganizationRoutingVrf(self, organizationId: str, vrfId: str, **kwargs - description (string): Description of the VRF (Virtual Routing and Forwarding) - routeDistinguisher (string): RD (Route Distinguisher) for the VRF (Virtual Routing and Forwarding) - routeTarget (string): Route target are used to control the import and export of routes between VRFs + - appliance (object): This parameter is used to enable or disable the VRF on the WAN appliance """ kwargs.update(locals()) @@ -9868,6 +9981,7 @@ def updateOrganizationRoutingVrf(self, organizationId: str, vrfId: str, **kwargs "description", "routeDistinguisher", "routeTarget", + "appliance", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index 03907415..6c77bc46 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -808,7 +808,7 @@ def updateNetworkWirelessBluetoothSettings(self, networkId: str, **kwargs): - majorMinorAssignmentMode (string): The way major and minor number should be assigned to nodes in the network. ('Unique', 'Non-unique') - major (integer): The major number to be used in the beacon identifier. Only valid in 'Non-unique' mode. - minor (integer): The minor number to be used in the beacon identifier. Only valid in 'Non-unique' mode. - - transmit (object): Transmit settings including power, interval, and advertised power. + - transmit (object): Transmit settings. """ kwargs.update(locals()) @@ -2721,6 +2721,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - dnsRewrite (object): DNS servers rewrite settings - speedBurst (object): The SpeedBurst setting for this SSID' - namedVlans (object): Named VLAN settings. + - security (object): Security settings for the SSID - localAuthFallback (object): The current configuration for Local Authentication Fallback. Enables the Access Point (AP) to store client authentication data for a specified duration that can be adjusted as needed. - radiusAccountingStartDelay (integer): The delay (in seconds) before sending the first RADIUS accounting start message. Must be between 0 and 60 seconds. """ @@ -2874,6 +2875,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): "dnsRewrite", "speedBurst", "namedVlans", + "security", "localAuthFallback", "radiusAccountingStartDelay", ] @@ -3661,7 +3663,7 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * - useRedirectUrl (boolean): The Boolean indicating whether the the user will be redirected to the custom redirect URL after the splash page. A custom redirect URL must be set if this is true. - welcomeMessage (string): The welcome message for the users on the splash page. - language (string): Language of splash page. - - userConsent (object): User consent settings. + - userConsent (object): User consent settings - themeId (string): The id of the selected splash theme. - splashLogo (object): The logo used in the splash page. - splashImage (object): The image used in the splash page. @@ -4274,7 +4276,7 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityByNetworkByClie self, organizationId: str, total_pages=1, direction="next", **kwargs ): """ - **Summarizes wireless post connection capacity successes and failures by client OS.** + **Summarizes wireless post connection capacity successes and failures by client OS and driver version.** https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-channel-availability-by-network-by-client-os - organizationId (string): Organization ID @@ -5316,7 +5318,7 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( kwargs.update(locals()) if "contributor" in kwargs: - options = ["Admin power restriction", "Insufficient AP density", "Sticky client", "Weak client signal"] + options = ["Admin power restriction", "Insufficient AP density", "Sticky client", "Transient weak signal"] assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) diff --git a/pyproject.toml b/pyproject.toml index a340392f..75afd8c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "3.1.0b0" +version = "3.1.0b1" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index 04ba9e4c..39f4f29e 100644 --- a/uv.lock +++ b/uv.lock @@ -521,7 +521,7 @@ wheels = [ [[package]] name = "meraki" -version = "3.1.0b0" +version = "3.1.0b1" source = { editable = "." } dependencies = [ { name = "aiohttp" }, From 7703108c02204dce70f1a67696984e7c4d1fb88a Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 15:18:05 +0000 Subject: [PATCH 06/60] Auto-generated library v3.1.0b2 for API v1.70.0-beta.2. (#363) Co-authored-by: GitHub Action --- docs/generation-report.md | 15 + meraki/__init__.py | 2 +- meraki/_version.py | 2 +- meraki/aio/api/appliance.py | 50 ++- meraki/aio/api/campusGateway.py | 143 +++++++ meraki/aio/api/organizations.py | 670 +++++++++++++++++++++++++++++- meraki/aio/api/switch.py | 8 +- meraki/aio/api/wireless.py | 80 ++++ meraki/api/appliance.py | 50 ++- meraki/api/batch/appliance.py | 21 +- meraki/api/batch/campusGateway.py | 54 +++ meraki/api/batch/organizations.py | 199 +++++++++ meraki/api/batch/switch.py | 8 +- meraki/api/batch/wireless.py | 4 + meraki/api/campusGateway.py | 143 +++++++ meraki/api/organizations.py | 670 +++++++++++++++++++++++++++++- meraki/api/switch.py | 8 +- meraki/api/wireless.py | 80 ++++ pyproject.toml | 2 +- uv.lock | 2 +- 20 files changed, 2135 insertions(+), 76 deletions(-) diff --git a/docs/generation-report.md b/docs/generation-report.md index cd46262f..e7964adc 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,20 @@ # Generation Report +## 2026-05-20 | Library v3.1.0b2 | API 1.70.0-beta.2 + + +### Python keyword parameter conflicts + + +The following operations have parameters whose names are Python reserved keywords. +The generator renames them with a trailing underscore (e.g., `from` -> `from_`). +These should be reported to the owning teams for resolution in the API spec. + + +| Scope | Operation | Location | Param | +| --- | --- | --- | --- | +| secureConnect | `createOrganizationSecureConnectRemoteAccessLogsExport` | body | `from` | + ## 2026-05-14 | Library v3.1.0b1 | API 1.70.0-beta.1 diff --git a/meraki/__init__.py b/meraki/__init__.py index 0e054ff9..ae7603a4 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -52,7 +52,7 @@ from meraki._version import __version__ # noqa: F401 from datetime import datetime -__api_version__ = "1.70.0-beta.1" +__api_version__ = "1.70.0-beta.2" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index f17b01a6..0e915519 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "3.1.0b1" +__version__ = "3.1.0b2" diff --git a/meraki/aio/api/appliance.py b/meraki/aio/api/appliance.py index edd24888..728acb26 100644 --- a/meraki/aio/api/appliance.py +++ b/meraki/aio/api/appliance.py @@ -1146,7 +1146,7 @@ def updateNetworkApplianceFirewallSettings(self, networkId: str, **kwargs): def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwargs): """ - **Create wired L3 interface configuration** + **Create wired L3 interface** https://developer.cisco.com/meraki/api-v1/#!create-network-appliance-interfaces-l-3 - networkId (string): Network ID @@ -1179,7 +1179,7 @@ def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwarg def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, **kwargs): """ - **Update wired L3 interface configuration** + **Update wired L3 interface** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-interfaces-l-3 - networkId (string): Network ID @@ -1214,7 +1214,7 @@ def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, * def deleteNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str): """ - **Delete wired L3 interface configuration** + **Delete wired L3 interface** https://developer.cisco.com/meraki/api-v1/#!delete-network-appliance-interfaces-l-3 - networkId (string): Network ID @@ -2681,13 +2681,13 @@ def policiesNetworkApplianceUmbrella(self, networkId: str, policyIds: list, **kw return self._session.put(metadata, resource, payload) - def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str, **kwargs): + def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kwargs): """ **Add one umbrella policy to your network.** https://developer.cisco.com/meraki/api-v1/#!add-network-appliance-umbrella-policies - networkId (string): Network ID - - policyId (string): Umbrella policy ID + - policy (object): Umbrella policy to add """ kwargs = locals() @@ -2700,7 +2700,7 @@ def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str, **k resource = f"/networks/{networkId}/appliance/umbrella/policies/add" body_params = [ - "policyId", + "policy", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2712,13 +2712,13 @@ def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str, **k return self._session.post(metadata, resource, payload) - def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str): + def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kwargs): """ **Remove one umbrella policy from your network.** https://developer.cisco.com/meraki/api-v1/#!remove-network-appliance-umbrella-policies - networkId (string): Network ID - - policyId (string): Umbrella policy ID + - policy (object): Umbrella policy to remove """ kwargs = locals() @@ -2730,7 +2730,20 @@ def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str): networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/umbrella/policies/remove" - return self._session.delete(metadata, resource) + body_params = [ + "policy", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"removeNetworkApplianceUmbrellaPolicies: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) def protectionNetworkApplianceUmbrella(self, networkId: str, enable: bool, **kwargs): """ @@ -3342,12 +3355,10 @@ def swapNetworkApplianceWarmSpare(self, networkId: str): return self._session.post(metadata, resource) - def getOrganizationApplianceDevicesInterfacesL3ByNetwork( - self, organizationId: str, total_pages=1, direction="next", **kwargs - ): + def getOrganizationApplianceDevicesInterfacesL3(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **Listing of L3 Interface Configurations across networks for the organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-interfaces-l-3-by-network + **List L3 interfaces across networks for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-interfaces-l-3 - 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 @@ -3361,11 +3372,11 @@ def getOrganizationApplianceDevicesInterfacesL3ByNetwork( kwargs.update(locals()) metadata = { - "tags": ["appliance", "configure", "devices", "interfaces", "l3", "byNetwork"], - "operation": "getOrganizationApplianceDevicesInterfacesL3ByNetwork", + "tags": ["appliance", "configure", "devices", "interfaces", "l3"], + "operation": "getOrganizationApplianceDevicesInterfacesL3", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/appliance/devices/interfaces/l3/byNetwork" + resource = f"/organizations/{organizationId}/appliance/devices/interfaces/l3" query_params = [ "networkIds", @@ -3388,7 +3399,7 @@ def getOrganizationApplianceDevicesInterfacesL3ByNetwork( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationApplianceDevicesInterfacesL3ByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationApplianceDevicesInterfacesL3: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) @@ -4478,9 +4489,9 @@ def getOrganizationApplianceUmbrellaPoliciesByNetwork( **List Umbrella policy IDs applied to MX networks in the organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-umbrella-policies-by-network + - 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 - - organizationId (string): Organization identifier - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. - 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. @@ -4497,7 +4508,6 @@ def getOrganizationApplianceUmbrellaPoliciesByNetwork( resource = f"/organizations/{organizationId}/appliance/umbrella/policies/byNetwork" query_params = [ - "organizationId", "perPage", "startingAfter", "endingBefore", diff --git a/meraki/aio/api/campusGateway.py b/meraki/aio/api/campusGateway.py index cfe63c52..2f602c19 100644 --- a/meraki/aio/api/campusGateway.py +++ b/meraki/aio/api/campusGateway.py @@ -115,6 +115,60 @@ def deleteNetworkCampusGatewayCluster(self, networkId: str, clusterId: str): return self._session.delete(metadata, resource) + def getNetworkCampusGatewaySsidMdns(self, networkId: str, number: str): + """ + **List the currently configured mDNS settings for the SSID** + https://developer.cisco.com/meraki/api-v1/#!get-network-campus-gateway-ssid-mdns + + - networkId (string): Network ID + - number (string): Number + """ + + metadata = { + "tags": ["campusGateway", "configure", "ssids", "mdns"], + "operation": "getNetworkCampusGatewaySsidMdns", + } + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/networks/{networkId}/campusGateway/ssids/{number}/mdns" + + return self._session.get(metadata, resource) + + def updateNetworkCampusGatewaySsidMdns(self, networkId: str, number: str, **kwargs): + """ + **Update the mDNS gateway settings and rules for a SSID and cluster** + https://developer.cisco.com/meraki/api-v1/#!update-network-campus-gateway-ssid-mdns + + - networkId (string): Network ID + - number (string): Number + - enabled (boolean): If true, mDNS gateway is enabled for this SSID and cluster. + - rules (array): List of mDNS forwarding rules. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["campusGateway", "configure", "ssids", "mdns"], + "operation": "updateNetworkCampusGatewaySsidMdns", + } + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/networks/{networkId}/campusGateway/ssids/{number}/mdns" + + body_params = [ + "enabled", + "rules", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkCampusGatewaySsidMdns: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getOrganizationCampusGatewayClientsUsageByNetworkByCluster( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -546,6 +600,95 @@ def getOrganizationCampusGatewayClustersSsids(self, organizationId: str, total_p return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCampusGatewayClustersTunnelingByClusterByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List all the MCG cluster-network tunnel settings** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters-tunneling-by-cluster-by-network + + - 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 + - clusterIds (array): Optional parameter to filter MCG clusters. This filter uses multiple exact matches + - dataEncryptionEnabled (boolean): Optional parameter to filter cluster-network tunnel settings by data encryption configuration + - networkIds (array): Optional parameter to filter networks. This filter uses multiple exact matches + - 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", "tunneling", "byCluster", "byNetwork"], + "operation": "getOrganizationCampusGatewayClustersTunnelingByClusterByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/tunneling/byCluster/byNetwork" + + query_params = [ + "clusterIds", + "dataEncryptionEnabled", + "networkIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "clusterIds", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClustersTunnelingByClusterByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def batchOrganizationCampusGatewayClustersTunnelingByClusterByNetworkUpdate(self, organizationId: str, **kwargs): + """ + **Update MCG cluster-network tunnel settings for multiple networks** + https://developer.cisco.com/meraki/api-v1/#!batch-organization-campus-gateway-clusters-tunneling-by-cluster-by-network-update + + - organizationId (string): Organization ID + - items (array): MCG cluster-network tunnel settings + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["campusGateway", "configure", "clusters", "tunneling", "byCluster", "byNetwork"], + "operation": "batchOrganizationCampusGatewayClustersTunnelingByClusterByNetworkUpdate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/tunneling/byCluster/byNetwork/batchUpdate" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"batchOrganizationCampusGatewayClustersTunnelingByClusterByNetworkUpdate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def getOrganizationCampusGatewayConnections(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the details of APs tunneling through the Campus Gateway clusters** diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 83078802..cb29bedd 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -1081,6 +1081,273 @@ def deleteOrganizationAlertsProfile(self, organizationId: str, alertConfigId: st return self._session.delete(metadata, resource) + def getOrganizationApiPushProfiles(self, organizationId: str, **kwargs): + """ + **List the push profiles in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-push-profiles + + - organizationId (string): Organization ID + - inames (array): Optional parameter to filter the result set by the included set of push profile inames + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "api", "push", "profiles"], + "operation": "getOrganizationApiPushProfiles", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/api/push/profiles" + + query_params = [ + "inames", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "inames", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationApiPushProfiles: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def createOrganizationApiPushProfile(self, organizationId: str, iname: str, topic: dict, receiver: dict, **kwargs): + """ + **Create a new push profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-api-push-profile + + - organizationId (string): Organization ID + - iname (string): Immutable name of the resource. Must be unique within resources of this type. + - topic (object): Push topic + - receiver (object): Push receiver profile + - name (string): Name of push profile + - description (string): Description of push profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "api", "push", "profiles"], + "operation": "createOrganizationApiPushProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/api/push/profiles" + + body_params = [ + "iname", + "name", + "description", + "topic", + "receiver", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationApiPushProfile: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateOrganizationApiPushProfile(self, organizationId: str, iname: str, **kwargs): + """ + **Update a push profile** + https://developer.cisco.com/meraki/api-v1/#!update-organization-api-push-profile + + - organizationId (string): Organization ID + - iname (string): Iname + - name (string): Name of push profile + - description (string): Description of push profile + - topic (object): Push topic + - receiver (object): Push receiver profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "api", "push", "profiles"], + "operation": "updateOrganizationApiPushProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + iname = urllib.parse.quote(str(iname), safe="") + resource = f"/organizations/{organizationId}/api/push/profiles/{iname}" + + body_params = [ + "name", + "description", + "topic", + "receiver", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationApiPushProfile: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationApiPushProfile(self, organizationId: str, iname: str): + """ + **Delete a push profile** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-api-push-profile + + - organizationId (string): Organization ID + - iname (string): Iname + """ + + metadata = { + "tags": ["organizations", "configure", "api", "push", "profiles"], + "operation": "deleteOrganizationApiPushProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + iname = urllib.parse.quote(str(iname), safe="") + resource = f"/organizations/{organizationId}/api/push/profiles/{iname}" + + return self._session.delete(metadata, resource) + + def getOrganizationApiPushReceiversProfiles(self, organizationId: str): + """ + **List the push receiver profiles in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-push-receivers-profiles + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "api", "push", "receivers", "profiles"], + "operation": "getOrganizationApiPushReceiversProfiles", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/api/push/receivers/profiles" + + return self._session.get(metadata, resource) + + def createOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str, receiver: dict, **kwargs): + """ + **Create a new push receiver profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-api-push-receivers-profile + + - organizationId (string): Organization ID + - iname (string): Immutable name of the resource. Must be unique within resources of this type. + - receiver (object): Webhook receiver + - name (string): Name of receiver profile + - description (string): Description of receiver profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "api", "push", "receivers", "profiles"], + "operation": "createOrganizationApiPushReceiversProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/api/push/receivers/profiles" + + body_params = [ + "iname", + "name", + "description", + "receiver", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationApiPushReceiversProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def deleteOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str): + """ + **Delete a push receiver profile** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-api-push-receivers-profile + + - organizationId (string): Organization ID + - iname (string): Iname + """ + + metadata = { + "tags": ["organizations", "configure", "api", "push", "receivers", "profiles"], + "operation": "deleteOrganizationApiPushReceiversProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + iname = urllib.parse.quote(str(iname), safe="") + resource = f"/organizations/{organizationId}/api/push/receivers/profiles/{iname}" + + return self._session.delete(metadata, resource) + + def updateOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str, **kwargs): + """ + **Update a push receiver profile** + https://developer.cisco.com/meraki/api-v1/#!update-organization-api-push-receivers-profile + + - organizationId (string): Organization ID + - iname (string): Iname + - name (string): Name of the receiver profile + - description (string): Description of the receiver profile + - receiver (object): API Push Receiver details + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "api", "push", "receivers", "profiles"], + "operation": "updateOrganizationApiPushReceiversProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + iname = urllib.parse.quote(str(iname), safe="") + resource = f"/organizations/{organizationId}/api/push/receivers/profiles/{iname}" + + body_params = [ + "name", + "description", + "receiver", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationApiPushReceiversProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def getOrganizationApiPushTopics(self, organizationId: str): + """ + **List of push topics** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-push-topics + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "api", "push", "topics"], + "operation": "getOrganizationApiPushTopics", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/api/push/topics" + + return self._session.get(metadata, resource) + def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwargs): """ **List pipeline IDs for the organization, with optional status and timespan filtering** @@ -1088,7 +1355,7 @@ def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwa - organizationId (string): Organization ID - status (string): If provided, filters pipelines by status. If omitted, pipelines of all statuses are returned. - - timespan (string): Created-at lookback for matching pipelines. Defaults to -2hours. + - timespan (integer): Created-at lookback for matching pipelines, in seconds. Defaults to 7200 seconds. The maximum is 30 days. """ kwargs.update(locals()) @@ -1098,11 +1365,6 @@ def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwa assert kwargs["status"] in options, ( f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' ) - if "timespan" in kwargs: - options = ["-1days", "-2hours", "-30days", "-7days"] - assert kwargs["timespan"] in options, ( - f'''"timespan" cannot be "{kwargs["timespan"]}", & must be set to one of: {options}''' - ) metadata = { "tags": ["organizations", "configure", "api", "rest", "provisioning", "pipelines"], @@ -3022,6 +3284,74 @@ def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClien return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClientType( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wired connection successes and failures by client type.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network-by-client-type + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": [ + "organizations", + "configure", + "wired", + "experience", + "successfulConnections", + "byNetwork", + "byClientType", + ], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClientType", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork/byClientType" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClientType: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -6674,6 +7004,136 @@ def getOrganizationDevicesSystemMemoryUsageHistoryByInterval( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesTopologyInterfaces(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List topology interfaces in an organization, including layer 2 and layer 3 metadata when available.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-topology-interfaces + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter interfaces by network ID. This filter uses multiple exact matches. Query array syntax follows the standard bracket form, for example: networkIds[]=L_1234&networkIds[]=L_5678. + - serials (array): Optional parameter to filter interfaces by device serial. This filter uses multiple exact matches. Query array syntax follows the standard bracket form, for example: serials[]=Q234-ABCD-5678&serials[]=Q234-ABCD-9012. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "devices", "topology", "interfaces"], + "operation": "getOrganizationDevicesTopologyInterfaces", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/topology/interfaces" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesTopologyInterfaces: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationDevicesTopologyL2Links(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List layer 2 topology links originating from devices in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-topology-l-2-links + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. Default is 500. + - 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": ["organizations", "monitor", "devices", "topology", "l2", "links"], + "operation": "getOrganizationDevicesTopologyL2Links", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/topology/l2/links" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesTopologyL2Links: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationDevicesTopologyNodesDiscovered(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List topology nodes discovered by LLDP/CDP from devices in an organization, including reported metadata when available.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-topology-nodes-discovered + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. Default is 500. + - 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": ["organizations", "monitor", "devices", "topology", "nodes", "discovered"], + "operation": "getOrganizationDevicesTopologyNodesDiscovered", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/topology/nodes/discovered" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesTopologyNodesDiscovered: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesUplinksAddressesByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the current uplink addresses for devices in an organization.** @@ -7390,6 +7850,94 @@ def getOrganizationFloorPlansAutoLocateStatuses(self, organizationId: str, total return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAccessGroups(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List effective Catalyst Center access groups for the requested Catalyst Center administrators in the specified organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-access-groups + + - 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 + - perPage (integer): Number of access groups to return per page. Range: 1-50. Defaults to 50 when omitted. + - startingAfter (string): Cursor token to retrieve access groups after the specified access group identifier. + - endingBefore (string): Cursor token to retrieve access groups before the specified access group identifier. + - assignedAdminEmails (array): Catalyst Center administrator email addresses used by federation to filter access groups for the requested administrators. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "iam", "admins", "accessGroups"], + "operation": "getOrganizationAccessGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/admins/accessGroups" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "assignedAdminEmails", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "assignedAdminEmails", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationAccessGroups: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def resolveOrganizationIamAdminsAdministratorsMePermissions( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the authenticated caller admin's permissions for an organization** + https://developer.cisco.com/meraki/api-v1/#!resolve-organization-iam-admins-administrators-me-permissions + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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": ["organizations", "configure", "iam", "admins", "administrators", "me", "permissions"], + "operation": "resolveOrganizationIamAdminsAdministratorsMePermissions", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/admins/administrators/me/permissions/resolve" + + body_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"resolveOrganizationIamAdminsAdministratorsMePermissions: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def getOrganizationIntegrationsDeployable(self, organizationId: str): """ **Provides a list of integrations that can be enabled for an Organization.** @@ -7659,6 +8207,61 @@ def getOrganizationInventoryDevices(self, organizationId: str, total_pages=1, di return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationInventoryDevicesDetails(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return inventory devices with additional site, geolocation, software, licensing, lifecycle, and Catalyst Center-specific fields** + https://developer.cisco.com/meraki/api-v1/#!get-organization-inventory-devices-details + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 100. + - 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. + - networkIds (array): Optional parameter to filter devices by network IDs. Matches devices in any of the provided network IDs. When multiple filter parameters are provided, a device must match each provided filter. Query array syntax follows the standard bracket form, for example: networkIds[]=L_1234&networkIds[]=L_5678. Maximum 100 network IDs. + - serials (array): Optional parameter to filter devices by serials. Matches devices with any of the provided serials. When multiple filter parameters are provided, a device must match each provided filter. Query array syntax follows the standard bracket form, for example: serials[]=Q234-ABCD-5678&serials[]=Q234-ABCD-9012. Maximum 100 serials. + - productTypes (array): Optional parameter to filter devices by product type. Matches devices with any of the provided product types. When multiple filter parameters are provided, a device must match each provided filter. Query array syntax follows the standard bracket form, for example: productTypes[]=switch&productTypes[]=wireless. Maximum 100 product types. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "inventory", "devices", "details"], + "operation": "getOrganizationInventoryDevicesDetails", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/inventory/devices/details" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + "productTypes", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "productTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationInventoryDevicesDetails: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationInventoryDevicesEoxOverview(self, organizationId: str): """ **Fetch the EOX summary for an organization, including counts of devices that are end-of-sale, end-of-support, and end-of-support-soon.** @@ -10791,6 +11394,61 @@ def updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs) return self._session.put(metadata, resource, payload) + def getOrganizationSites(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Lists unified site resources for an organization across Meraki networks and Catalyst Center sites** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sites + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. Default is 500. + - 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. + - ids (array): Optional parameter to filter resources by unified resource ID. This filter uses multiple exact matches. + - resourceTypes (array): Optional parameter to filter resources by returned resource type. + - resourceTags (array): Optional parameter to filter resources by tag. By default all provided tags must match. + - resourceName (string): Optional parameter to filter resources by case-insensitive partial name match. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "sites"], + "operation": "getOrganizationSites", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sites" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "ids", + "resourceTypes", + "resourceTags", + "resourceName", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "ids", + "resourceTypes", + "resourceTags", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSites: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationSitesBuildings(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the buildings belonging to the organization** diff --git a/meraki/aio/api/switch.py b/meraki/aio/api/switch.py index d3ddf5fc..ba0c021b 100644 --- a/meraki/aio/api/switch.py +++ b/meraki/aio/api/switch.py @@ -359,7 +359,7 @@ def createDeviceSwitchRoutingInterface(self, serial: str, name: str, **kwargs): - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. - - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink and the switch is running IOS XE version >= 17.18.3. - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. @@ -454,7 +454,7 @@ def updateDeviceSwitchRoutingInterface(self, serial: str, interfaceId: str, **kw - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. - - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink and the switch is running IOS XE version >= 17.18.3. - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. @@ -2788,7 +2788,7 @@ def createNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. - - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink and the switch is running IOS XE version >= 17.18.3. - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. @@ -2889,7 +2889,7 @@ def updateNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. - - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink and the switch is running IOS XE version >= 17.18.3. - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index 1135a513..ff370888 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -1741,6 +1741,7 @@ def createNetworkWirelessEthernetPortsProfile(self, networkId: str, name: str, p - name (string): AP port profile name - ports (array): AP ports configuration - usbPorts (array): AP usb ports configuration + - security (object): AP port security configuration """ kwargs.update(locals()) @@ -1756,6 +1757,7 @@ def createNetworkWirelessEthernetPortsProfile(self, networkId: str, name: str, p "name", "ports", "usbPorts", + "security", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1866,6 +1868,7 @@ def updateNetworkWirelessEthernetPortsProfile(self, networkId: str, profileId: s - name (string): AP port profile name - ports (array): AP ports configuration - usbPorts (array): AP usb ports configuration + - security (object): AP port security configuration """ kwargs.update(locals()) @@ -1882,6 +1885,7 @@ def updateNetworkWirelessEthernetPortsProfile(self, networkId: str, profileId: s "name", "ports", "usbPorts", + "security", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -6095,6 +6099,82 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsV2ByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Provides root-cause diagnostics for wireless successful connects experience by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-insights-v-2-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - contributor (string): Restrict RCA to a single contributor (assoc, auth, dhcp, dns). If omitted, all contributors are considered. + - subContributor (string): Restrict RCA to a single sub-contributor (failure reason). If omitted, all sub-contributors are considered. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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()) + + if "contributor" in kwargs: + options = ["assoc", "auth", "dhcp", "dns"] + assert kwargs["contributor"] in options, ( + f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "experience", "successfulConnects", "insightsV2", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsV2ByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/insightsV2/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "contributor", + "subContributor", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsV2ByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): diff --git a/meraki/api/appliance.py b/meraki/api/appliance.py index ae13c800..8d21afb7 100644 --- a/meraki/api/appliance.py +++ b/meraki/api/appliance.py @@ -1146,7 +1146,7 @@ def updateNetworkApplianceFirewallSettings(self, networkId: str, **kwargs): def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwargs): """ - **Create wired L3 interface configuration** + **Create wired L3 interface** https://developer.cisco.com/meraki/api-v1/#!create-network-appliance-interfaces-l-3 - networkId (string): Network ID @@ -1179,7 +1179,7 @@ def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwarg def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, **kwargs): """ - **Update wired L3 interface configuration** + **Update wired L3 interface** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-interfaces-l-3 - networkId (string): Network ID @@ -1214,7 +1214,7 @@ def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, * def deleteNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str): """ - **Delete wired L3 interface configuration** + **Delete wired L3 interface** https://developer.cisco.com/meraki/api-v1/#!delete-network-appliance-interfaces-l-3 - networkId (string): Network ID @@ -2681,13 +2681,13 @@ def policiesNetworkApplianceUmbrella(self, networkId: str, policyIds: list, **kw return self._session.put(metadata, resource, payload) - def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str, **kwargs): + def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kwargs): """ **Add one umbrella policy to your network.** https://developer.cisco.com/meraki/api-v1/#!add-network-appliance-umbrella-policies - networkId (string): Network ID - - policyId (string): Umbrella policy ID + - policy (object): Umbrella policy to add """ kwargs = locals() @@ -2700,7 +2700,7 @@ def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str, **k resource = f"/networks/{networkId}/appliance/umbrella/policies/add" body_params = [ - "policyId", + "policy", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2712,13 +2712,13 @@ def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str, **k return self._session.post(metadata, resource, payload) - def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str): + def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kwargs): """ **Remove one umbrella policy from your network.** https://developer.cisco.com/meraki/api-v1/#!remove-network-appliance-umbrella-policies - networkId (string): Network ID - - policyId (string): Umbrella policy ID + - policy (object): Umbrella policy to remove """ kwargs = locals() @@ -2730,7 +2730,20 @@ def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str): networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/umbrella/policies/remove" - return self._session.delete(metadata, resource) + body_params = [ + "policy", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"removeNetworkApplianceUmbrellaPolicies: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) def protectionNetworkApplianceUmbrella(self, networkId: str, enable: bool, **kwargs): """ @@ -3342,12 +3355,10 @@ def swapNetworkApplianceWarmSpare(self, networkId: str): return self._session.post(metadata, resource) - def getOrganizationApplianceDevicesInterfacesL3ByNetwork( - self, organizationId: str, total_pages=1, direction="next", **kwargs - ): + def getOrganizationApplianceDevicesInterfacesL3(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **Listing of L3 Interface Configurations across networks for the organization** - https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-interfaces-l-3-by-network + **List L3 interfaces across networks for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-interfaces-l-3 - 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 @@ -3361,11 +3372,11 @@ def getOrganizationApplianceDevicesInterfacesL3ByNetwork( kwargs.update(locals()) metadata = { - "tags": ["appliance", "configure", "devices", "interfaces", "l3", "byNetwork"], - "operation": "getOrganizationApplianceDevicesInterfacesL3ByNetwork", + "tags": ["appliance", "configure", "devices", "interfaces", "l3"], + "operation": "getOrganizationApplianceDevicesInterfacesL3", } organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/appliance/devices/interfaces/l3/byNetwork" + resource = f"/organizations/{organizationId}/appliance/devices/interfaces/l3" query_params = [ "networkIds", @@ -3388,7 +3399,7 @@ def getOrganizationApplianceDevicesInterfacesL3ByNetwork( invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"getOrganizationApplianceDevicesInterfacesL3ByNetwork: ignoring unrecognized kwargs: {invalid}" + f"getOrganizationApplianceDevicesInterfacesL3: ignoring unrecognized kwargs: {invalid}" ) return self._session.get_pages(metadata, resource, params, total_pages, direction) @@ -4478,9 +4489,9 @@ def getOrganizationApplianceUmbrellaPoliciesByNetwork( **List Umbrella policy IDs applied to MX networks in the organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-umbrella-policies-by-network + - 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 - - organizationId (string): Organization identifier - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. - 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. @@ -4497,7 +4508,6 @@ def getOrganizationApplianceUmbrellaPoliciesByNetwork( resource = f"/organizations/{organizationId}/appliance/umbrella/policies/byNetwork" query_params = [ - "organizationId", "perPage", "startingAfter", "endingBefore", diff --git a/meraki/api/batch/appliance.py b/meraki/api/batch/appliance.py index 0cd65c9e..d70c2042 100644 --- a/meraki/api/batch/appliance.py +++ b/meraki/api/batch/appliance.py @@ -297,7 +297,7 @@ def updateNetworkApplianceFirewallMulticastForwarding(self, networkId: str, rule def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwargs): """ - **Create wired L3 interface configuration** + **Create wired L3 interface** https://developer.cisco.com/meraki/api-v1/#!create-network-appliance-interfaces-l-3 - networkId (string): Network ID @@ -324,7 +324,7 @@ def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwarg def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, **kwargs): """ - **Update wired L3 interface configuration** + **Update wired L3 interface** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-interfaces-l-3 - networkId (string): Network ID @@ -353,7 +353,7 @@ def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, * def deleteNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str): """ - **Delete wired L3 interface configuration** + **Delete wired L3 interface** https://developer.cisco.com/meraki/api-v1/#!delete-network-appliance-interfaces-l-3 - networkId (string): Network ID @@ -1064,13 +1064,13 @@ def policiesNetworkApplianceUmbrella(self, networkId: str, policyIds: list, **kw } return action - def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str, **kwargs): + def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kwargs): """ **Add one umbrella policy to your network.** https://developer.cisco.com/meraki/api-v1/#!add-network-appliance-umbrella-policies - networkId (string): Network ID - - policyId (string): Umbrella policy ID + - policy (object): Umbrella policy to add """ kwargs = locals() @@ -1079,7 +1079,7 @@ def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str, **k resource = f"/networks/{networkId}/appliance/umbrella/policies/add" body_params = [ - "policyId", + "policy", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -1089,13 +1089,13 @@ def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str, **k } return action - def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str): + def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kwargs): """ **Remove one umbrella policy from your network.** https://developer.cisco.com/meraki/api-v1/#!remove-network-appliance-umbrella-policies - networkId (string): Network ID - - policyId (string): Umbrella policy ID + - policy (object): Umbrella policy to remove """ kwargs = locals() @@ -1103,9 +1103,14 @@ def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policyId: str): networkId = urllib.parse.quote(networkId, safe="") resource = f"/networks/{networkId}/appliance/umbrella/policies/remove" + body_params = [ + "policy", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { "resource": resource, "operation": "policies_remove", + "body": payload, } return action diff --git a/meraki/api/batch/campusGateway.py b/meraki/api/batch/campusGateway.py index b1b54828..60c995d6 100644 --- a/meraki/api/batch/campusGateway.py +++ b/meraki/api/batch/campusGateway.py @@ -102,6 +102,35 @@ def deleteNetworkCampusGatewayCluster(self, networkId: str, clusterId: str): } return action + def updateNetworkCampusGatewaySsidMdns(self, networkId: str, number: str, **kwargs): + """ + **Update the mDNS gateway settings and rules for a SSID and cluster** + https://developer.cisco.com/meraki/api-v1/#!update-network-campus-gateway-ssid-mdns + + - networkId (string): Network ID + - number (string): Number + - enabled (boolean): If true, mDNS gateway is enabled for this SSID and cluster. + - rules (array): List of mDNS forwarding rules. + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + number = urllib.parse.quote(number, safe="") + resource = f"/networks/{networkId}/campusGateway/ssids/{number}/mdns" + + body_params = [ + "enabled", + "rules", + ] + 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 provisionOrganizationCampusGatewayClusters( self, organizationId: str, @@ -155,3 +184,28 @@ def provisionOrganizationCampusGatewayClusters( "body": payload, } return action + + def batchOrganizationCampusGatewayClustersTunnelingByClusterByNetworkUpdate(self, organizationId: str, **kwargs): + """ + **Update MCG cluster-network tunnel settings for multiple networks** + https://developer.cisco.com/meraki/api-v1/#!batch-organization-campus-gateway-clusters-tunneling-by-cluster-by-network-update + + - organizationId (string): Organization ID + - items (array): MCG cluster-network tunnel settings + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/tunneling/byCluster/byNetwork/batchUpdate" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "batch_update", + "body": payload, + } + return action diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index f01a712e..202a0cc1 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -420,6 +420,172 @@ def deleteOrganizationAlertsProfile(self, organizationId: str, alertConfigId: st } return action + def createOrganizationApiPushProfile(self, organizationId: str, iname: str, topic: dict, receiver: dict, **kwargs): + """ + **Create a new push profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-api-push-profile + + - organizationId (string): Organization ID + - iname (string): Immutable name of the resource. Must be unique within resources of this type. + - topic (object): Push topic + - receiver (object): Push receiver profile + - name (string): Name of push profile + - description (string): Description of push profile + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/api/push/profiles" + + body_params = [ + "iname", + "name", + "description", + "topic", + "receiver", + ] + 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 updateOrganizationApiPushProfile(self, organizationId: str, iname: str, **kwargs): + """ + **Update a push profile** + https://developer.cisco.com/meraki/api-v1/#!update-organization-api-push-profile + + - organizationId (string): Organization ID + - iname (string): Iname + - name (string): Name of push profile + - description (string): Description of push profile + - topic (object): Push topic + - receiver (object): Push receiver profile + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + iname = urllib.parse.quote(iname, safe="") + resource = f"/organizations/{organizationId}/api/push/profiles/{iname}" + + body_params = [ + "name", + "description", + "topic", + "receiver", + ] + 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 deleteOrganizationApiPushProfile(self, organizationId: str, iname: str): + """ + **Delete a push profile** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-api-push-profile + + - organizationId (string): Organization ID + - iname (string): Iname + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + iname = urllib.parse.quote(iname, safe="") + resource = f"/organizations/{organizationId}/api/push/profiles/{iname}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def createOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str, receiver: dict, **kwargs): + """ + **Create a new push receiver profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-api-push-receivers-profile + + - organizationId (string): Organization ID + - iname (string): Immutable name of the resource. Must be unique within resources of this type. + - receiver (object): Webhook receiver + - name (string): Name of receiver profile + - description (string): Description of receiver profile + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/api/push/receivers/profiles" + + body_params = [ + "iname", + "name", + "description", + "receiver", + ] + 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 deleteOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str): + """ + **Delete a push receiver profile** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-api-push-receivers-profile + + - organizationId (string): Organization ID + - iname (string): Iname + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + iname = urllib.parse.quote(iname, safe="") + resource = f"/organizations/{organizationId}/api/push/receivers/profiles/{iname}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def updateOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str, **kwargs): + """ + **Update a push receiver profile** + https://developer.cisco.com/meraki/api-v1/#!update-organization-api-push-receivers-profile + + - organizationId (string): Organization ID + - iname (string): Iname + - name (string): Name of the receiver profile + - description (string): Description of the receiver profile + - receiver (object): API Push Receiver details + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + iname = urllib.parse.quote(iname, safe="") + resource = f"/organizations/{organizationId}/api/push/receivers/profiles/{iname}" + + body_params = [ + "name", + "description", + "receiver", + ] + 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 createOrganizationAuthRadiusServer(self, organizationId: str, address: str, secret: str, **kwargs): """ **Add an organization-wide RADIUS server** @@ -1301,6 +1467,39 @@ def createOrganizationExtensionsThousandEyesTest(self, organizationId: str, **kw } return action + def resolveOrganizationIamAdminsAdministratorsMePermissions( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the authenticated caller admin's permissions for an organization. Org-wide read and write admins receive a single organization-scoped permission item instead of per-network items. Scoped callers receive the network resources they can access in the requested organization, along with the effective allowed action for each resource.** + https://developer.cisco.com/meraki/api-v1/#!resolve-organization-iam-admins-administrators-me-permissions + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/iam/admins/administrators/me/permissions/resolve" + + body_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "permissions/resolve", + "body": payload, + } + return action + def disableOrganizationIntegrationsXdrNetworks(self, organizationId: str, networks: list, **kwargs): """ **Disable XDR on networks** diff --git a/meraki/api/batch/switch.py b/meraki/api/batch/switch.py index c35d14c7..cca6ece9 100644 --- a/meraki/api/batch/switch.py +++ b/meraki/api/batch/switch.py @@ -182,7 +182,7 @@ def createDeviceSwitchRoutingInterface(self, serial: str, name: str, **kwargs): - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. - - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink and the switch is running IOS XE version >= 17.18.3. - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. @@ -252,7 +252,7 @@ def updateDeviceSwitchRoutingInterface(self, serial: str, interfaceId: str, **kw - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. - - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink and the switch is running IOS XE version >= 17.18.3. - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. @@ -1511,7 +1511,7 @@ def createNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. - - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink and the switch is running IOS XE version >= 17.18.3. - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. @@ -1583,7 +1583,7 @@ def updateNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. - - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink and the switch is running IOS XE version >= 17.18.3. - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. diff --git a/meraki/api/batch/wireless.py b/meraki/api/batch/wireless.py index 8714267d..e7ba6a1c 100644 --- a/meraki/api/batch/wireless.py +++ b/meraki/api/batch/wireless.py @@ -388,6 +388,7 @@ def createNetworkWirelessEthernetPortsProfile(self, networkId: str, name: str, p - name (string): AP port profile name - ports (array): AP ports configuration - usbPorts (array): AP usb ports configuration + - security (object): AP port security configuration """ kwargs.update(locals()) @@ -399,6 +400,7 @@ def createNetworkWirelessEthernetPortsProfile(self, networkId: str, name: str, p "name", "ports", "usbPorts", + "security", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -470,6 +472,7 @@ def updateNetworkWirelessEthernetPortsProfile(self, networkId: str, profileId: s - name (string): AP port profile name - ports (array): AP ports configuration - usbPorts (array): AP usb ports configuration + - security (object): AP port security configuration """ kwargs.update(locals()) @@ -482,6 +485,7 @@ def updateNetworkWirelessEthernetPortsProfile(self, networkId: str, profileId: s "name", "ports", "usbPorts", + "security", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { diff --git a/meraki/api/campusGateway.py b/meraki/api/campusGateway.py index 46ac13e6..e2a279d1 100644 --- a/meraki/api/campusGateway.py +++ b/meraki/api/campusGateway.py @@ -115,6 +115,60 @@ def deleteNetworkCampusGatewayCluster(self, networkId: str, clusterId: str): return self._session.delete(metadata, resource) + def getNetworkCampusGatewaySsidMdns(self, networkId: str, number: str): + """ + **List the currently configured mDNS settings for the SSID** + https://developer.cisco.com/meraki/api-v1/#!get-network-campus-gateway-ssid-mdns + + - networkId (string): Network ID + - number (string): Number + """ + + metadata = { + "tags": ["campusGateway", "configure", "ssids", "mdns"], + "operation": "getNetworkCampusGatewaySsidMdns", + } + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/networks/{networkId}/campusGateway/ssids/{number}/mdns" + + return self._session.get(metadata, resource) + + def updateNetworkCampusGatewaySsidMdns(self, networkId: str, number: str, **kwargs): + """ + **Update the mDNS gateway settings and rules for a SSID and cluster** + https://developer.cisco.com/meraki/api-v1/#!update-network-campus-gateway-ssid-mdns + + - networkId (string): Network ID + - number (string): Number + - enabled (boolean): If true, mDNS gateway is enabled for this SSID and cluster. + - rules (array): List of mDNS forwarding rules. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["campusGateway", "configure", "ssids", "mdns"], + "operation": "updateNetworkCampusGatewaySsidMdns", + } + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + resource = f"/networks/{networkId}/campusGateway/ssids/{number}/mdns" + + body_params = [ + "enabled", + "rules", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkCampusGatewaySsidMdns: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getOrganizationCampusGatewayClientsUsageByNetworkByCluster( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -546,6 +600,95 @@ def getOrganizationCampusGatewayClustersSsids(self, organizationId: str, total_p return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCampusGatewayClustersTunnelingByClusterByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List all the MCG cluster-network tunnel settings** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters-tunneling-by-cluster-by-network + + - 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 + - clusterIds (array): Optional parameter to filter MCG clusters. This filter uses multiple exact matches + - dataEncryptionEnabled (boolean): Optional parameter to filter cluster-network tunnel settings by data encryption configuration + - networkIds (array): Optional parameter to filter networks. This filter uses multiple exact matches + - 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", "tunneling", "byCluster", "byNetwork"], + "operation": "getOrganizationCampusGatewayClustersTunnelingByClusterByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/tunneling/byCluster/byNetwork" + + query_params = [ + "clusterIds", + "dataEncryptionEnabled", + "networkIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "clusterIds", + "networkIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClustersTunnelingByClusterByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def batchOrganizationCampusGatewayClustersTunnelingByClusterByNetworkUpdate(self, organizationId: str, **kwargs): + """ + **Update MCG cluster-network tunnel settings for multiple networks** + https://developer.cisco.com/meraki/api-v1/#!batch-organization-campus-gateway-clusters-tunneling-by-cluster-by-network-update + + - organizationId (string): Organization ID + - items (array): MCG cluster-network tunnel settings + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["campusGateway", "configure", "clusters", "tunneling", "byCluster", "byNetwork"], + "operation": "batchOrganizationCampusGatewayClustersTunnelingByClusterByNetworkUpdate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/tunneling/byCluster/byNetwork/batchUpdate" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"batchOrganizationCampusGatewayClustersTunnelingByClusterByNetworkUpdate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def getOrganizationCampusGatewayConnections(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the details of APs tunneling through the Campus Gateway clusters** diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index a72cdfd0..a7bbcacd 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -1081,6 +1081,273 @@ def deleteOrganizationAlertsProfile(self, organizationId: str, alertConfigId: st return self._session.delete(metadata, resource) + def getOrganizationApiPushProfiles(self, organizationId: str, **kwargs): + """ + **List the push profiles in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-push-profiles + + - organizationId (string): Organization ID + - inames (array): Optional parameter to filter the result set by the included set of push profile inames + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "api", "push", "profiles"], + "operation": "getOrganizationApiPushProfiles", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/api/push/profiles" + + query_params = [ + "inames", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "inames", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationApiPushProfiles: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) + + def createOrganizationApiPushProfile(self, organizationId: str, iname: str, topic: dict, receiver: dict, **kwargs): + """ + **Create a new push profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-api-push-profile + + - organizationId (string): Organization ID + - iname (string): Immutable name of the resource. Must be unique within resources of this type. + - topic (object): Push topic + - receiver (object): Push receiver profile + - name (string): Name of push profile + - description (string): Description of push profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "api", "push", "profiles"], + "operation": "createOrganizationApiPushProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/api/push/profiles" + + body_params = [ + "iname", + "name", + "description", + "topic", + "receiver", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createOrganizationApiPushProfile: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateOrganizationApiPushProfile(self, organizationId: str, iname: str, **kwargs): + """ + **Update a push profile** + https://developer.cisco.com/meraki/api-v1/#!update-organization-api-push-profile + + - organizationId (string): Organization ID + - iname (string): Iname + - name (string): Name of push profile + - description (string): Description of push profile + - topic (object): Push topic + - receiver (object): Push receiver profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "api", "push", "profiles"], + "operation": "updateOrganizationApiPushProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + iname = urllib.parse.quote(str(iname), safe="") + resource = f"/organizations/{organizationId}/api/push/profiles/{iname}" + + body_params = [ + "name", + "description", + "topic", + "receiver", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateOrganizationApiPushProfile: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationApiPushProfile(self, organizationId: str, iname: str): + """ + **Delete a push profile** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-api-push-profile + + - organizationId (string): Organization ID + - iname (string): Iname + """ + + metadata = { + "tags": ["organizations", "configure", "api", "push", "profiles"], + "operation": "deleteOrganizationApiPushProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + iname = urllib.parse.quote(str(iname), safe="") + resource = f"/organizations/{organizationId}/api/push/profiles/{iname}" + + return self._session.delete(metadata, resource) + + def getOrganizationApiPushReceiversProfiles(self, organizationId: str): + """ + **List the push receiver profiles in the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-push-receivers-profiles + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "api", "push", "receivers", "profiles"], + "operation": "getOrganizationApiPushReceiversProfiles", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/api/push/receivers/profiles" + + return self._session.get(metadata, resource) + + def createOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str, receiver: dict, **kwargs): + """ + **Create a new push receiver profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-api-push-receivers-profile + + - organizationId (string): Organization ID + - iname (string): Immutable name of the resource. Must be unique within resources of this type. + - receiver (object): Webhook receiver + - name (string): Name of receiver profile + - description (string): Description of receiver profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "api", "push", "receivers", "profiles"], + "operation": "createOrganizationApiPushReceiversProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/api/push/receivers/profiles" + + body_params = [ + "iname", + "name", + "description", + "receiver", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationApiPushReceiversProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def deleteOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str): + """ + **Delete a push receiver profile** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-api-push-receivers-profile + + - organizationId (string): Organization ID + - iname (string): Iname + """ + + metadata = { + "tags": ["organizations", "configure", "api", "push", "receivers", "profiles"], + "operation": "deleteOrganizationApiPushReceiversProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + iname = urllib.parse.quote(str(iname), safe="") + resource = f"/organizations/{organizationId}/api/push/receivers/profiles/{iname}" + + return self._session.delete(metadata, resource) + + def updateOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str, **kwargs): + """ + **Update a push receiver profile** + https://developer.cisco.com/meraki/api-v1/#!update-organization-api-push-receivers-profile + + - organizationId (string): Organization ID + - iname (string): Iname + - name (string): Name of the receiver profile + - description (string): Description of the receiver profile + - receiver (object): API Push Receiver details + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "api", "push", "receivers", "profiles"], + "operation": "updateOrganizationApiPushReceiversProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + iname = urllib.parse.quote(str(iname), safe="") + resource = f"/organizations/{organizationId}/api/push/receivers/profiles/{iname}" + + body_params = [ + "name", + "description", + "receiver", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationApiPushReceiversProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def getOrganizationApiPushTopics(self, organizationId: str): + """ + **List of push topics** + https://developer.cisco.com/meraki/api-v1/#!get-organization-api-push-topics + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "api", "push", "topics"], + "operation": "getOrganizationApiPushTopics", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/api/push/topics" + + return self._session.get(metadata, resource) + def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwargs): """ **List pipeline IDs for the organization, with optional status and timespan filtering** @@ -1088,7 +1355,7 @@ def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwa - organizationId (string): Organization ID - status (string): If provided, filters pipelines by status. If omitted, pipelines of all statuses are returned. - - timespan (string): Created-at lookback for matching pipelines. Defaults to -2hours. + - timespan (integer): Created-at lookback for matching pipelines, in seconds. Defaults to 7200 seconds. The maximum is 30 days. """ kwargs.update(locals()) @@ -1098,11 +1365,6 @@ def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwa assert kwargs["status"] in options, ( f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' ) - if "timespan" in kwargs: - options = ["-1days", "-2hours", "-30days", "-7days"] - assert kwargs["timespan"] in options, ( - f'''"timespan" cannot be "{kwargs["timespan"]}", & must be set to one of: {options}''' - ) metadata = { "tags": ["organizations", "configure", "api", "rest", "provisioning", "pipelines"], @@ -3022,6 +3284,74 @@ def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClien return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClientType( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Summarizes wired connection successes and failures by client type.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network-by-client-type + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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": [ + "organizations", + "configure", + "wired", + "experience", + "successfulConnections", + "byNetwork", + "byClientType", + ], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClientType", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork/byClientType" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByClientType: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -6674,6 +7004,136 @@ def getOrganizationDevicesSystemMemoryUsageHistoryByInterval( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesTopologyInterfaces(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List topology interfaces in an organization, including layer 2 and layer 3 metadata when available.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-topology-interfaces + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter interfaces by network ID. This filter uses multiple exact matches. Query array syntax follows the standard bracket form, for example: networkIds[]=L_1234&networkIds[]=L_5678. + - serials (array): Optional parameter to filter interfaces by device serial. This filter uses multiple exact matches. Query array syntax follows the standard bracket form, for example: serials[]=Q234-ABCD-5678&serials[]=Q234-ABCD-9012. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "devices", "topology", "interfaces"], + "operation": "getOrganizationDevicesTopologyInterfaces", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/topology/interfaces" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesTopologyInterfaces: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationDevicesTopologyL2Links(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List layer 2 topology links originating from devices in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-topology-l-2-links + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. Default is 500. + - 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": ["organizations", "monitor", "devices", "topology", "l2", "links"], + "operation": "getOrganizationDevicesTopologyL2Links", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/topology/l2/links" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesTopologyL2Links: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationDevicesTopologyNodesDiscovered(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List topology nodes discovered by LLDP/CDP from devices in an organization, including reported metadata when available.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-topology-nodes-discovered + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. Default is 500. + - 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": ["organizations", "monitor", "devices", "topology", "nodes", "discovered"], + "operation": "getOrganizationDevicesTopologyNodesDiscovered", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/topology/nodes/discovered" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesTopologyNodesDiscovered: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesUplinksAddressesByDevice(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the current uplink addresses for devices in an organization.** @@ -7390,6 +7850,94 @@ def getOrganizationFloorPlansAutoLocateStatuses(self, organizationId: str, total return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAccessGroups(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List effective Catalyst Center access groups for the requested Catalyst Center administrators in the specified organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-access-groups + + - 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 + - perPage (integer): Number of access groups to return per page. Range: 1-50. Defaults to 50 when omitted. + - startingAfter (string): Cursor token to retrieve access groups after the specified access group identifier. + - endingBefore (string): Cursor token to retrieve access groups before the specified access group identifier. + - assignedAdminEmails (array): Catalyst Center administrator email addresses used by federation to filter access groups for the requested administrators. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "iam", "admins", "accessGroups"], + "operation": "getOrganizationAccessGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/admins/accessGroups" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "assignedAdminEmails", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "assignedAdminEmails", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationAccessGroups: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def resolveOrganizationIamAdminsAdministratorsMePermissions( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the authenticated caller admin's permissions for an organization** + https://developer.cisco.com/meraki/api-v1/#!resolve-organization-iam-admins-administrators-me-permissions + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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": ["organizations", "configure", "iam", "admins", "administrators", "me", "permissions"], + "operation": "resolveOrganizationIamAdminsAdministratorsMePermissions", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/admins/administrators/me/permissions/resolve" + + body_params = [ + "perPage", + "startingAfter", + "endingBefore", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"resolveOrganizationIamAdminsAdministratorsMePermissions: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def getOrganizationIntegrationsDeployable(self, organizationId: str): """ **Provides a list of integrations that can be enabled for an Organization.** @@ -7659,6 +8207,61 @@ def getOrganizationInventoryDevices(self, organizationId: str, total_pages=1, di return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationInventoryDevicesDetails(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Return inventory devices with additional site, geolocation, software, licensing, lifecycle, and Catalyst Center-specific fields** + https://developer.cisco.com/meraki/api-v1/#!get-organization-inventory-devices-details + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 100. + - 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. + - networkIds (array): Optional parameter to filter devices by network IDs. Matches devices in any of the provided network IDs. When multiple filter parameters are provided, a device must match each provided filter. Query array syntax follows the standard bracket form, for example: networkIds[]=L_1234&networkIds[]=L_5678. Maximum 100 network IDs. + - serials (array): Optional parameter to filter devices by serials. Matches devices with any of the provided serials. When multiple filter parameters are provided, a device must match each provided filter. Query array syntax follows the standard bracket form, for example: serials[]=Q234-ABCD-5678&serials[]=Q234-ABCD-9012. Maximum 100 serials. + - productTypes (array): Optional parameter to filter devices by product type. Matches devices with any of the provided product types. When multiple filter parameters are provided, a device must match each provided filter. Query array syntax follows the standard bracket form, for example: productTypes[]=switch&productTypes[]=wireless. Maximum 100 product types. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "inventory", "devices", "details"], + "operation": "getOrganizationInventoryDevicesDetails", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/inventory/devices/details" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + "productTypes", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "productTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationInventoryDevicesDetails: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationInventoryDevicesEoxOverview(self, organizationId: str): """ **Fetch the EOX summary for an organization, including counts of devices that are end-of-sale, end-of-support, and end-of-support-soon.** @@ -10791,6 +11394,61 @@ def updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs) return self._session.put(metadata, resource, payload) + def getOrganizationSites(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Lists unified site resources for an organization across Meraki networks and Catalyst Center sites** + https://developer.cisco.com/meraki/api-v1/#!get-organization-sites + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. Default is 500. + - 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. + - ids (array): Optional parameter to filter resources by unified resource ID. This filter uses multiple exact matches. + - resourceTypes (array): Optional parameter to filter resources by returned resource type. + - resourceTags (array): Optional parameter to filter resources by tag. By default all provided tags must match. + - resourceName (string): Optional parameter to filter resources by case-insensitive partial name match. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "monitor", "sites"], + "operation": "getOrganizationSites", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/sites" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "ids", + "resourceTypes", + "resourceTags", + "resourceName", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "ids", + "resourceTypes", + "resourceTags", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationSites: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationSitesBuildings(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the buildings belonging to the organization** diff --git a/meraki/api/switch.py b/meraki/api/switch.py index e9522480..58727fd2 100644 --- a/meraki/api/switch.py +++ b/meraki/api/switch.py @@ -359,7 +359,7 @@ def createDeviceSwitchRoutingInterface(self, serial: str, name: str, **kwargs): - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. - - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink and the switch is running IOS XE version >= 17.18.3. - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. @@ -454,7 +454,7 @@ def updateDeviceSwitchRoutingInterface(self, serial: str, interfaceId: str, **kw - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. - - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink and the switch is running IOS XE version >= 17.18.3. - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. @@ -2788,7 +2788,7 @@ def createNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. - - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink and the switch is running IOS XE version >= 17.18.3. - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. @@ -2889,7 +2889,7 @@ def updateNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - multicastRouting (string): Enable multicast support if, multicast routing between VLANs is required. Options are: 'disabled', 'enabled' or 'IGMP snooping querier'. Default is 'disabled'. - vlanId (integer): The VLAN this L3 interface is on. VLAN must be between 1 and 4094. - defaultGateway (string): The next hop for any traffic that isn't going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a L3 interface. Required if this is the first IPv4 interface. - - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink. + - isSwitchDefaultGateway (boolean): When true, the switch uses the IPv4 uplink gateway as its IPv4 default gateway. This can only be set if the interface is designated as the IPv4 uplink and the switch is running IOS XE version >= 17.18.3. - uplinkV4 (boolean): When true, this interface is used as static IPv4 uplink. - candidateUplinkV4 (boolean): When true, this interface is a UAC candidate for IPv4 Uplink. - uplinkV6 (boolean): When true, this interface is used as static IPv6 uplink. diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index 6c77bc46..e14d3eaa 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -1741,6 +1741,7 @@ def createNetworkWirelessEthernetPortsProfile(self, networkId: str, name: str, p - name (string): AP port profile name - ports (array): AP ports configuration - usbPorts (array): AP usb ports configuration + - security (object): AP port security configuration """ kwargs.update(locals()) @@ -1756,6 +1757,7 @@ def createNetworkWirelessEthernetPortsProfile(self, networkId: str, name: str, p "name", "ports", "usbPorts", + "security", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1866,6 +1868,7 @@ def updateNetworkWirelessEthernetPortsProfile(self, networkId: str, profileId: s - name (string): AP port profile name - ports (array): AP ports configuration - usbPorts (array): AP usb ports configuration + - security (object): AP port security configuration """ kwargs.update(locals()) @@ -1882,6 +1885,7 @@ def updateNetworkWirelessEthernetPortsProfile(self, networkId: str, profileId: s "name", "ports", "usbPorts", + "security", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -6095,6 +6099,82 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsV2ByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Provides root-cause diagnostics for wireless successful connects experience by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-insights-v-2-by-network + + - 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): Filter results by network. + - serials (array): Filter results by device serial. + - ssidNumbers (array): Filter results by SSID number. + - bands (array): Filter results by band. + - contributor (string): Restrict RCA to a single contributor (assoc, auth, dhcp, dns). If omitted, all contributors are considered. + - subContributor (string): Restrict RCA to a single sub-contributor (failure reason). If omitted, all sub-contributors are considered. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. + - 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()) + + if "contributor" in kwargs: + options = ["assoc", "auth", "dhcp", "dns"] + assert kwargs["contributor"] in options, ( + f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "experience", "successfulConnects", "insightsV2", "byNetwork"], + "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsV2ByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/insightsV2/byNetwork" + + query_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + "contributor", + "subContributor", + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "ssidNumbers", + "bands", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsV2ByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): diff --git a/pyproject.toml b/pyproject.toml index 75afd8c9..61c50c68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "3.1.0b1" +version = "3.1.0b2" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index 39f4f29e..5bb917b7 100644 --- a/uv.lock +++ b/uv.lock @@ -521,7 +521,7 @@ wheels = [ [[package]] name = "meraki" -version = "3.1.0b1" +version = "3.1.0b2" source = { editable = "." } dependencies = [ { name = "aiohttp" }, From 89106169926793e62e2d9fb90438c49029c3b621 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Wed, 20 May 2026 17:09:51 -0700 Subject: [PATCH 07/60] Skip enum assertion for nullable params in generated SDK methods. The generator now passes the OAS nullable flag through to templates. When a parameter is marked nullable, the generated code allows None without triggering the client-side enum assertion. Co-Authored-By: Claude Opus 4.6 (1M context) --- generator/async_function_template.jinja2 | 4 ++-- generator/batch_function_template.jinja2 | 4 ++-- generator/function_template.jinja2 | 4 ++-- generator/generate_library.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/generator/async_function_template.jinja2 b/generator/async_function_template.jinja2 index 2842de10..bcc5faef 100644 --- a/generator/async_function_template.jinja2 +++ b/generator/async_function_template.jinja2 @@ -13,8 +13,8 @@ {% endif %} {% if assert_blocks|length > 0 %} - {% for param, values in assert_blocks %} - if "{{ param }}" in kwargs: + {% for param, values, nullable in assert_blocks %} + if "{{ param }}" in kwargs{% if nullable %} and kwargs["{{ param }}"] is not None{% endif %}: options = {{ values }} assert kwargs["{{ param }}"] in options, f'''"{{ param }}" cannot be "{kwargs['{{ param }}']}", & must be set to one of: {options}''' {% endfor %} diff --git a/generator/batch_function_template.jinja2 b/generator/batch_function_template.jinja2 index 55a0a903..33d7e712 100644 --- a/generator/batch_function_template.jinja2 +++ b/generator/batch_function_template.jinja2 @@ -17,8 +17,8 @@ {% endif %} {% if assert_blocks|length > 0 %} - {% for param, values in assert_blocks %} - if "{{ param }}" in kwargs: + {% for param, values, nullable in assert_blocks %} + if "{{ param }}" in kwargs{% if nullable %} and kwargs["{{ param }}"] is not None{% endif %}: options = {{ values }} assert kwargs["{{ param }}"] in options, f'''"{{ param }}" cannot be "{kwargs['{{ param }}']}", & must be set to one of: {options}''' {% endfor %} diff --git a/generator/function_template.jinja2 b/generator/function_template.jinja2 index 9a95ecb2..24f72789 100644 --- a/generator/function_template.jinja2 +++ b/generator/function_template.jinja2 @@ -17,8 +17,8 @@ {% endif %} {% if assert_blocks|length > 0 %} - {% for param, values in assert_blocks %} - if "{{ param }}" in kwargs: + {% for param, values, nullable in assert_blocks %} + if "{{ param }}" in kwargs{% if nullable %} and kwargs["{{ param }}"] is not None{% endif %}: options = {{ values }} assert kwargs["{{ param }}"] in options, f'''"{{ param }}" cannot be "{kwargs['{{ param }}']}", & must be set to one of: {options}''' {% endfor %} diff --git a/generator/generate_library.py b/generator/generate_library.py index 79a2f2c8..057b2dfa 100644 --- a/generator/generate_library.py +++ b/generator/generate_library.py @@ -420,7 +420,7 @@ def generate_standard_and_async_functions( assert_blocks = list() if enum_params: for p, values in enum_params.items(): - assert_blocks.append((p, values["enum"])) + assert_blocks.append((p, values["enum"], values.get("nullable", False))) # Generate call_line based on method if method == "get": @@ -654,7 +654,7 @@ def generate_action_batch_functions( assert_blocks = list() if enum_params: for p, values in enum_params.items(): - assert_blocks.append((p, values["enum"])) + assert_blocks.append((p, values["enum"], values.get("nullable", False))) # Function return statement call_line = "return action" From c0f438fe3aae36d6ba78015bc55d6faa4e5a8be7 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Thu, 21 May 2026 14:55:19 -0700 Subject: [PATCH 08/60] Move migration docs to docs/ and add VERSIONING.md Co-Authored-By: Claude Opus 4.6 (1M context) --- VERSIONING.md | 99 +++++++++++++++++++ HTTPX-MIGRATION.md => docs/HTTPX-MIGRATION.md | 0 OASV3-MIGRATION.md => docs/OASV3-MIGRATION.md | 0 3 files changed, 99 insertions(+) create mode 100644 VERSIONING.md rename HTTPX-MIGRATION.md => docs/HTTPX-MIGRATION.md (100%) rename OASV3-MIGRATION.md => docs/OASV3-MIGRATION.md (100%) diff --git a/VERSIONING.md b/VERSIONING.md new file mode 100644 index 00000000..0ef9bcd2 --- /dev/null +++ b/VERSIONING.md @@ -0,0 +1,99 @@ +# Versioning + +This document covers the SDK versioning strategy and how it relates to the upstream dashboard API. + +## Which version should I use? + +Use the latest stable release: + +```sh +pip install --upgrade meraki +``` + +Only use a different release if: + +- You want to test out the latest SDK features that aren't yet stable, or +- You want access to beta API operations that haven't graduated to GA yet, and you accept that those operations may change or disappear in future releases, even if you don't update or change your library version. + +## How do I know which version I'm using? + +If you're using v3.x+: + +```python +import meraki +print(meraki.__version__) # SDK version, e.g. "4.1.0b2" +print(meraki.__api_version__) # API version, e.g. "1.70.0-beta.2" +``` + +Otherwise, please see [Releases](https://github.com/meraki/dashboard-api-python/releases). + +### Why aren't the SDK version and the API version linked (as of [SDK 2.x, released April 8, 2025](https://github.com/meraki/dashboard-api-python/releases/tag/2.0.0))? + +The library and the API are related but separate software. Improving the SDK sometimes requires SDK-only changes, which in turn necessitates bumping the SDK version separately from the upstream API. + +## Scheme + +```text +MAJOR.MINOR.PATCH[bN] +``` + +| Segment | Bumped when | +| ------- | ----------------------------------------------------------------------------------------------------------------------- | +| MAJOR | SDK-only breaking changes are made (new HTTP backend, generated code structure changes, Python version support changes) | +| MINOR | New upstream API release (tracks Meraki dashboard API minor versions) | +| PATCH | SDK bug fixes or upstream API patch releases | +| bN | Pre-release beta suffix for unreleased major/minor tracks, including upstream API beta operations | + +## Objective + +The repo maintainers work to streamline the adoption of new major SDK versions and minimize breaking changes. The general expectation is as follows: + +- if you are exclusively using GA operations from the upstream API, and +- if you are keeping your local Python environment updated to [a contemporary Python version](https://devguide.python.org/versions/), i.e., a version that is not already nor end of life within 6 months, and +- if you are sticking to the SDK's own supported surfaces (i.e., not monkey-patching the library) + +Then you should be able to update your environment to the latest stable library version without breaking changes to your application. + +If you identify any unexpected breaking changes that are not a result of the upstream API changing, then please [report the issue](https://github.com/meraki/dashboard-api-python/issues). + +## Beta Convention + +Pre-release versions use PEP 440 beta suffixes: `4.1.0b1`, `4.1.0b2`, etc. + +Beta releases are published to PyPI and installable via `pip install meraki==4.1.0b2`. They are not installed by default (`pip install meraki` gets the latest stable). + +### API operation coverage + +- **Stable releases** contain only GA (stable) operations from the upstream API. If an operation is marked beta in the dashboard API spec, it is excluded from stable builds. +- **Beta releases** may include beta API operations from the dashboard API in addition to all GA operations. These operations are subject to change or removal without notice by the upstream API, since beta API operations are subject to unannounced breaking changes. + +This means upgrading from a beta to a stable release can _remove_ operations that were previously available, if those operations have not yet graduated to GA upstream. + +## SDK-to-API Version Mapping + +Each SDK minor release is generated from a specific dashboard API version: + +| SDK | API | Status | What changed | +| --- | ------------ | ----------- | --------------------------------------------------------------------------------------------------------------------- | +| 4.x | v1.70.0+ | Development | httpx migration (unified sync/async backend), supported Python version changes, all major developments moving forward | +| 3.x | v1.69.0+ | Stable | OASv3-based, automated release pipeline, supported Python version changes | +| 2.x | v1 (various) | Deprecated | Internal overhaul (async via aiohttp, pagination, logging, supported Python version changes) | +| 1.x | v1 (various) | Deprecated | Initial v1 API library, requests-based | + +Within a major, the minor version/patch versions advance with each API release. For example, 3.1.0 was generated from API v1.70.0. + +Patch versions can also advance based on SDK-only fixes. + +## Where Versions Live + +| What | Location | +| --------------- | ------------------------------------------------------------------ | +| SDK version | `meraki/_version.py` (`__version__`), `pyproject.toml` (`version`) | +| API version | `meraki/__init__.py` (`__api_version__`) | +| Git tags | `4.1.0b2` (no `v` prefix for 2.x+) | +| Release commits | `Auto-generated library v{SDK} for API v{API}.` | + +## Release Triggers + +- **Automated**: the generator runs when a new OpenAPI spec is detected, producing a minor bump +- **Manual**: major versions and SDK-only patches are released by maintainers diff --git a/HTTPX-MIGRATION.md b/docs/HTTPX-MIGRATION.md similarity index 100% rename from HTTPX-MIGRATION.md rename to docs/HTTPX-MIGRATION.md diff --git a/OASV3-MIGRATION.md b/docs/OASV3-MIGRATION.md similarity index 100% rename from OASV3-MIGRATION.md rename to docs/OASV3-MIGRATION.md From 8179b542582547fa77351087cf02fc9081e8af29 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Thu, 21 May 2026 15:39:21 -0700 Subject: [PATCH 09/60] Include beta endpoints when generating for dev (httpx) stage The org-scoped spec (which includes beta endpoints) was only used for release_stage=beta. httpx releases target the same upstream API betas, so they need the same spec source. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/regenerate-library.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regenerate-library.yml b/.github/workflows/regenerate-library.yml index 35faf708..f846692a 100644 --- a/.github/workflows/regenerate-library.yml +++ b/.github/workflows/regenerate-library.yml @@ -41,8 +41,8 @@ jobs: env: LIBRARY_VERSION: ${{ github.event.inputs.library_version }} API_VERSION: ${{ github.event.inputs.api_version }} - MERAKI_DASHBOARD_API_KEY: ${{ github.event.inputs.target_branch == 'beta' && secrets.TEST_ORG_API_KEY || '' }} - BETA_ORG_ID: ${{ github.event.inputs.target_branch == 'beta' && secrets.TEST_ORG_BETA_00_ID || '' }} + MERAKI_DASHBOARD_API_KEY: ${{ (github.event.inputs.target_branch == 'beta' || github.event.inputs.target_branch == 'httpx') && secrets.TEST_ORG_API_KEY || '' }} + BETA_ORG_ID: ${{ (github.event.inputs.target_branch == 'beta' || github.event.inputs.target_branch == 'httpx') && secrets.TEST_ORG_BETA_00_ID || '' }} run: | ARGS="-g true -v $LIBRARY_VERSION -a $API_VERSION" if [ -n "$BETA_ORG_ID" ]; then From fe15fee613ab07ab8bc5b3488698923eb082d72f Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Thu, 21 May 2026 15:41:42 -0700 Subject: [PATCH 10/60] Align regenerate-library workflow with main Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/regenerate-library.yml | 57 +++++++++++++++++------- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/.github/workflows/regenerate-library.yml b/.github/workflows/regenerate-library.yml index f846692a..40825839 100644 --- a/.github/workflows/regenerate-library.yml +++ b/.github/workflows/regenerate-library.yml @@ -8,20 +8,43 @@ on: api_version: description: 'The corresponding version of the API' required: true - branch_name: - description: 'Branch to commit changes to (release or beta-release)' - required: false - default: 'release' - target_branch: - description: 'Branch to merge into (main or beta)' - required: false - default: 'main' + release_stage: + description: 'Release stage' + required: true + type: choice + options: + - ga + - beta + - dev jobs: regenerate: runs-on: ubuntu-latest steps: + - name: Resolve branches + id: branches + run: | + case "${{ github.event.inputs.release_stage }}" in + dev) + echo "checkout_branch=httpx" >> "$GITHUB_OUTPUT" + echo "release_branch=httpx-release" >> "$GITHUB_OUTPUT" + echo "pr_base=httpx" >> "$GITHUB_OUTPUT" + ;; + beta) + echo "checkout_branch=beta" >> "$GITHUB_OUTPUT" + echo "release_branch=beta-release" >> "$GITHUB_OUTPUT" + echo "pr_base=beta" >> "$GITHUB_OUTPUT" + ;; + ga) + echo "checkout_branch=main" >> "$GITHUB_OUTPUT" + echo "release_branch=release" >> "$GITHUB_OUTPUT" + echo "pr_base=main" >> "$GITHUB_OUTPUT" + ;; + esac + - uses: actions/checkout@v6 + with: + ref: ${{ steps.branches.outputs.checkout_branch }} - name: Install uv uses: astral-sh/setup-uv@v7 @@ -29,7 +52,7 @@ jobs: enable-cache: true - name: Set up Python - run: uv python install 3.12 + run: uv python install 3.13 - name: Install dependencies run: uv sync --group generator @@ -41,10 +64,13 @@ jobs: env: LIBRARY_VERSION: ${{ github.event.inputs.library_version }} API_VERSION: ${{ github.event.inputs.api_version }} - MERAKI_DASHBOARD_API_KEY: ${{ (github.event.inputs.target_branch == 'beta' || github.event.inputs.target_branch == 'httpx') && secrets.TEST_ORG_API_KEY || '' }} - BETA_ORG_ID: ${{ (github.event.inputs.target_branch == 'beta' || github.event.inputs.target_branch == 'httpx') && secrets.TEST_ORG_BETA_00_ID || '' }} + MERAKI_DASHBOARD_API_KEY: ${{ (github.event.inputs.release_stage == 'beta' || github.event.inputs.release_stage == 'dev') && secrets.TEST_ORG_API_KEY || '' }} + BETA_ORG_ID: ${{ (github.event.inputs.release_stage == 'beta' || github.event.inputs.release_stage == 'dev') && secrets.TEST_ORG_BETA_00_ID || '' }} run: | ARGS="-g true -v $LIBRARY_VERSION -a $API_VERSION" + if [ "${{ github.event.inputs.release_stage }}" = "dev" ]; then + ARGS="$ARGS -b httpx" + fi if [ -n "$BETA_ORG_ID" ]; then ARGS="$ARGS -o $BETA_ORG_ID" fi @@ -70,7 +96,7 @@ jobs: author_name: GitHub Action author_email: support@meraki.com message: Auto-generated library v${{ github.event.inputs.library_version }} for API v${{ github.event.inputs.api_version }}. - new_branch: ${{ github.event.inputs.branch_name }} + new_branch: ${{ steps.branches.outputs.release_branch }} github_token: ${{ steps.app-token.outputs.token }} - name: Create pull request @@ -78,8 +104,8 @@ jobs: GH_TOKEN: ${{ steps.app-token.outputs.token }} run: | gh pr create \ - --base "${{ github.event.inputs.target_branch }}" \ - --head "${{ github.event.inputs.branch_name }}" \ + --base "${{ steps.branches.outputs.pr_base }}" \ + --head "${{ steps.branches.outputs.release_branch }}" \ --title "Release v${{ github.event.inputs.library_version }} (API v${{ github.event.inputs.api_version }})" \ --body "Auto-generated library v${{ github.event.inputs.library_version }} for API v${{ github.event.inputs.api_version }}." @@ -87,6 +113,5 @@ jobs: env: GH_TOKEN: ${{ steps.app-token.outputs.token }} run: | - gh pr merge "${{ github.event.inputs.branch_name }}" \ + gh pr merge "${{ steps.branches.outputs.release_branch }}" \ --auto --squash - From 6f1889217087ce1eb1b2af4c6d7c8ff1e35717e8 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Thu, 21 May 2026 15:46:34 -0700 Subject: [PATCH 11/60] Fall back to PR base branch for integration test org routing Dependabot (and other external) branches aren't in the known branch list, so use github.base_ref to determine which test orgs to use. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/test-library.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-library.yml b/.github/workflows/test-library.yml index 1e0acf4c..56c8090e 100644 --- a/.github/workflows/test-library.yml +++ b/.github/workflows/test-library.yml @@ -106,11 +106,19 @@ jobs: ORG_DEV_3: ${{ secrets.TEST_ORG_DEV_03_ID }} run: | BRANCH="${{ github.head_ref || github.ref_name }}" + BASE="${{ github.base_ref }}" case "$BRANCH" in main|release) PREFIX="GA" ;; beta|beta-release) PREFIX="BETA" ;; httpx|httpx-release) PREFIX="DEV" ;; - *) echo "Unknown branch: $BRANCH" && exit 1 ;; + *) + case "$BASE" in + main) PREFIX="GA" ;; + beta) PREFIX="BETA" ;; + httpx) PREFIX="DEV" ;; + *) echo "Unknown branch: $BRANCH (base: $BASE)" && exit 1 ;; + esac + ;; esac INDEX=$(echo '${{ needs.assign-orgs.outputs.assignments }}' | jq -r '.["${{ matrix.python-version }}"]') VAR_NAME="ORG_${PREFIX}_${INDEX}" From 5eadc77b37ea781929047ef7178f9772c6713725 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Thu, 21 May 2026 16:01:43 -0700 Subject: [PATCH 12/60] Run dependabot on all primary branches; auto-merge dependabot PRs. --- .github/dependabot.yml | 10 ++++++++++ .github/workflows/dependabot-auto-merge.yml | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/dependabot-auto-merge.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 616f347a..d44e189f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,5 +2,15 @@ version: 2 updates: - package-ecosystem: "uv" directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "uv" + directory: "/" + target-branch: "beta" + schedule: + interval: "daily" + - package-ecosystem: "uv" + directory: "/" + target-branch: "httpx" schedule: interval: "daily" \ No newline at end of file diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 00000000..f7a8f238 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,16 @@ +name: Auto-merge Dependabot PRs +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + auto-merge: + if: github.actor == 'dependabot[bot]' + runs-on: ubuntu-latest + steps: + - run: gh pr merge --squash --auto "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d13102dcf58696a72cf08a06be4cbd95371cf279 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 16:39:44 -0700 Subject: [PATCH 13/60] chore(deps-dev): bump ruff from 0.15.12 to 0.15.14 (#370) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.12 to 0.15.14. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.12...0.15.14) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.14 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/uv.lock b/uv.lock index 5bb917b7..1abbd0f0 100644 --- a/uv.lock +++ b/uv.lock @@ -931,27 +931,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.12" +version = "0.15.14" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/99/43/3291f1cc9106f4c63bdce7a8d0df5047fe8422a75b091c16b5e9355e0b11/ruff-0.15.12.tar.gz", hash = "sha256:ecea26adb26b4232c0c2ca19ccbc0083a68344180bba2a600605538ce51a40a6", size = 4643852, upload-time = "2026-04-24T18:17:14.305Z" } +sdist = { url = "https://files.pythonhosted.org/packages/dc/8a/8bce2894573e9dae6ff4d77fe34ad727d79b9e6238ad288c5638990d90f6/ruff-0.15.14.tar.gz", hash = "sha256:48e866b165be4a9bdbf310f7d3c9a07edef2fe8cd63ffeb4e00bb590506ebf9f", size = 4700910, upload-time = "2026-05-21T14:34:55.177Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c3/6e/e78ffb61d4686f3d96ba3df2c801161843746dcbcbb17a1e927d4829312b/ruff-0.15.12-py3-none-linux_armv6l.whl", hash = "sha256:f86f176e188e94d6bdbc09f09bfd9dc729059ad93d0e7390b5a73efe19f8861c", size = 10640713, upload-time = "2026-04-24T18:17:22.841Z" }, - { url = "https://files.pythonhosted.org/packages/ae/08/a317bc231fb9e7b93e4ef3089501e51922ff88d6936ce5cf870c4fe55419/ruff-0.15.12-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e3bcd123364c3770b8e1b7baaf343cc99a35f197c5c6e8af79015c666c423a6c", size = 11069267, upload-time = "2026-04-24T18:17:30.105Z" }, - { url = "https://files.pythonhosted.org/packages/aa/a4/f828e9718d3dce1f5f11c39c4f65afd32783c8b2aebb2e3d259e492c47bd/ruff-0.15.12-py3-none-macosx_11_0_arm64.whl", hash = "sha256:fe87510d000220aa1ed530d4448a7c696a0cae1213e5ec30e5874287b66557b5", size = 10397182, upload-time = "2026-04-24T18:17:07.177Z" }, - { url = "https://files.pythonhosted.org/packages/71/e0/3310fc6d1b5e1fdea22bf3b1b807c7e187b581021b0d7d4514cccdb5fb71/ruff-0.15.12-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:84a1630093121375a3e2a95b4a6dc7b59e2b4ee76216e32d81aae550a832d002", size = 10758012, upload-time = "2026-04-24T18:16:55.759Z" }, - { url = "https://files.pythonhosted.org/packages/11/c1/a606911aee04c324ddaa883ae418f3569792fd3c4a10c50e0dd0a2311e1e/ruff-0.15.12-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fb129f40f114f089ebe0ca56c0d251cf2061b17651d464bb6478dc01e69f11f5", size = 10447479, upload-time = "2026-04-24T18:16:51.677Z" }, - { url = "https://files.pythonhosted.org/packages/9d/68/4201e8444f0894f21ab4aeeaee68aa4f10b51613514a20d80bd628d57e88/ruff-0.15.12-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b0c862b172d695db7598426b8af465e7e9ac00a3ea2a3630ee67eb82e366aaa6", size = 11234040, upload-time = "2026-04-24T18:17:16.529Z" }, - { url = "https://files.pythonhosted.org/packages/34/ff/8a6d6cf4ccc23fd67060874e832c18919d1557a0611ebef03fdb01fff11e/ruff-0.15.12-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2849ea9f3484c3aca43a82f484210370319e7170df4dfe4843395ddf6c57bc33", size = 12087377, upload-time = "2026-04-24T18:17:04.944Z" }, - { url = "https://files.pythonhosted.org/packages/85/f6/c669cf73f5152f623d34e69866a46d5e6185816b19fcd5b6dd8a2d299922/ruff-0.15.12-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9e77c7e51c07fe396826d5969a5b846d9cd4c402535835fb6e21ce8b28fef847", size = 11367784, upload-time = "2026-04-24T18:17:25.409Z" }, - { url = "https://files.pythonhosted.org/packages/e8/39/c61d193b8a1daaa8977f7dea9e8d8ba866e02ea7b65d32f6861693aa4c12/ruff-0.15.12-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83b2f4f2f3b1026b5fb449b467d9264bf22067b600f7b6f41fc5958909f449d0", size = 11344088, upload-time = "2026-04-24T18:17:12.258Z" }, - { url = "https://files.pythonhosted.org/packages/c2/8d/49afab3645e31e12c590acb6d3b5b69d7aab5b81926dbaf7461f9441f37a/ruff-0.15.12-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:9ba3b8f1afd7e2e43d8943e55f249e13f9682fde09711644a6e7290eb4f3e339", size = 11271770, upload-time = "2026-04-24T18:17:02.457Z" }, - { url = "https://files.pythonhosted.org/packages/46/06/33f41fe94403e2b755481cdfb9b7ef3e4e0ed031c4581124658d935d52b4/ruff-0.15.12-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e852ba9fdc890655e1d78f2df1499efbe0e54126bd405362154a75e2bde159c5", size = 10719355, upload-time = "2026-04-24T18:17:27.648Z" }, - { url = "https://files.pythonhosted.org/packages/0d/59/18aa4e014debbf559670e4048e39260a85c7fcee84acfd761ac01e7b8d35/ruff-0.15.12-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:dd8aed930da53780d22fc70bdf84452c843cf64f8cb4eb38984319c24c5cd5fd", size = 10462758, upload-time = "2026-04-24T18:17:32.347Z" }, - { url = "https://files.pythonhosted.org/packages/25/e7/cc9f16fd0f3b5fddcbd7ec3d6ae30c8f3fde1047f32a4093a98d633c6570/ruff-0.15.12-py3-none-musllinux_1_2_i686.whl", hash = "sha256:01da3988d225628b709493d7dc67c3b9b12c0210016b08690ef9bd27970b262b", size = 10953498, upload-time = "2026-04-24T18:17:20.674Z" }, - { url = "https://files.pythonhosted.org/packages/72/7a/a9ba7f98c7a575978698f4230c5e8cc54bbc761af34f560818f933dafa0c/ruff-0.15.12-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:9cae0f92bd5700d1213188b31cd3bdd2b315361296d10b96b8e2337d3d11f53e", size = 11447765, upload-time = "2026-04-24T18:17:09.755Z" }, - { url = "https://files.pythonhosted.org/packages/ea/f9/0ae446942c846b8266059ad8a30702a35afae55f5cdc54c5adf8d7afdc27/ruff-0.15.12-py3-none-win32.whl", hash = "sha256:d0185894e038d7043ba8fd6aee7499ece6462dc0ea9f1e260c7451807c714c20", size = 10657277, upload-time = "2026-04-24T18:17:18.591Z" }, - { url = "https://files.pythonhosted.org/packages/33/f1/9614e03e1cdcbf9437570b5400ced8a720b5db22b28d8e0f1bda429f660d/ruff-0.15.12-py3-none-win_amd64.whl", hash = "sha256:c87a162d61ab3adca47c03f7f717c68672edec7d1b5499e652331780fe74950d", size = 11837758, upload-time = "2026-04-24T18:17:00.113Z" }, - { url = "https://files.pythonhosted.org/packages/c0/98/6beb4b351e472e5f4c4613f7c35a5290b8be2497e183825310c4c3a3984b/ruff-0.15.12-py3-none-win_arm64.whl", hash = "sha256:a538f7a82d061cee7be55542aca1d86d1393d55d81d4fcc314370f4340930d4f", size = 11120821, upload-time = "2026-04-24T18:16:57.979Z" }, + { url = "https://files.pythonhosted.org/packages/b9/c8/74a92c6ff9fcfb4f1f947126d3ebee8389276e161ecc85de5bda7cda51bd/ruff-0.15.14-py3-none-linux_armv6l.whl", hash = "sha256:8dd2db9416e487c8d4b01fa7056bb02c4d05969d4f8d17a08c229c2f4ff3c108", size = 10739177, upload-time = "2026-05-21T14:34:37.332Z" }, + { url = "https://files.pythonhosted.org/packages/45/91/254a35c20acc38a7223c9d2d594af12e794432464f2cdeb52af1dc4a892d/ruff-0.15.14-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:be4ff55af755bd71a00ab3dc6bd7ffc467bd76e0df6881e286c2e3d23e8fb43b", size = 11144969, upload-time = "2026-05-21T14:34:43.978Z" }, + { url = "https://files.pythonhosted.org/packages/56/9e/d13e40f83b8d0a94430e6778ce1d94a43b38cf2efe63278bdd2b4c65abbf/ruff-0.15.14-py3-none-macosx_11_0_arm64.whl", hash = "sha256:48d5909d7d06276ce7dde6d32bfa4b0d4cb2651145cd8ee4b440722cbc77832f", size = 10478207, upload-time = "2026-05-21T14:34:48.378Z" }, + { url = "https://files.pythonhosted.org/packages/8d/f1/b15a7839fa4f332f8acec78e20564f26bb2d866e3d21710b877fd0263000/ruff-0.15.14-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca8cbfa94c4f90984a67561978602746d4cd27103568f745fa90eee3f0d4107d", size = 10818459, upload-time = "2026-05-21T14:34:22.318Z" }, + { url = "https://files.pythonhosted.org/packages/45/33/53d651177f84f94b400a0e27f8824eeada3dddc9d5ee8aeb048f4352a520/ruff-0.15.14-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9a6bbc0333f1ab053423bcbf6226477d266ca7cec7738c4c8e3f55647803f3c4", size = 10541800, upload-time = "2026-05-21T14:34:20.209Z" }, + { url = "https://files.pythonhosted.org/packages/b8/a6/868f87e0bf9786ed24b5d0d0ad8676b8a94fd1912f42cddf9cfc7857818a/ruff-0.15.14-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8a24a4f7605d7003a6674d4387651effd939dead3fddd0f36561eb77a9a2e542", size = 11342149, upload-time = "2026-05-21T14:34:46.365Z" }, + { url = "https://files.pythonhosted.org/packages/a7/8b/38cd5c19faffdcc05a408d2b78edccc69492ab9720eadb49ea15ef80d768/ruff-0.15.14-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:049b5326e53ed80978f2fc041a280603f69dd6b0c95464342a2bb4572d9d9e2f", size = 12212563, upload-time = "2026-05-21T14:34:28.579Z" }, + { url = "https://files.pythonhosted.org/packages/3e/4d/a3c5b874a556d5731e3e657aaf04311bb76f0a5c3ec220ed43051be6b64b/ruff-0.15.14-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d4ed42e6696c8dfa5f06728e6441993901f548eb92d73bc472cb5a38d1395fbf", size = 11493299, upload-time = "2026-05-21T14:34:41.836Z" }, + { url = "https://files.pythonhosted.org/packages/1e/c0/56472c251d09858a53e51efbd485b09e1995d8731668b76d52e5dd6ee0f1/ruff-0.15.14-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:715c543cf450c4888251f91c52f1942a800541d9bddd7ac060aa4e6b77ae7cba", size = 11455931, upload-time = "2026-05-21T14:34:57.276Z" }, + { url = "https://files.pythonhosted.org/packages/2c/4a/e2e7b4d8dbf233d4eace59c75bc3435fa6d8bd3bae82d351d4e4300c0fd1/ruff-0.15.14-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:72ebab6013ec887d439d8b7593737a0a4ffb06d45d209d4e4bf2e92813082d3f", size = 11400794, upload-time = "2026-05-21T14:34:39.773Z" }, + { url = "https://files.pythonhosted.org/packages/97/c7/83c0539fe34c3e09136204d1e75d6052492364e0b3cb05e9465423f567d7/ruff-0.15.14-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:49072d36abdbe97a8dd7f480afe9c675699c0c495d4c84076e2c1203c4550581", size = 10804759, upload-time = "2026-05-21T14:34:31.045Z" }, + { url = "https://files.pythonhosted.org/packages/86/a6/18f2bfc095a2ab4a78745644e428205532ce6653a5d0fa8501572891534d/ruff-0.15.14-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:958522aee105068640c2c2ceae08f413ae44d922f52a1374ac13d6a96032fc93", size = 10539517, upload-time = "2026-05-21T14:34:53.064Z" }, + { url = "https://files.pythonhosted.org/packages/54/3a/5a8b3b69c654d4e4bf1d246ac5b49cbcdac6eaab6905925f8915f31e3b80/ruff-0.15.14-py3-none-musllinux_1_2_i686.whl", hash = "sha256:f3707da619a143a2e8830e2abab8224478d69ace2d28cb6c20543ae97c36bf61", size = 11065169, upload-time = "2026-05-21T14:34:24.484Z" }, + { url = "https://files.pythonhosted.org/packages/ed/c5/8864e4e7925b836ea354b31d57641ec03830564e281a8b6f061f8c3e0ec1/ruff-0.15.14-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:bb01d645694e3ec0102105d07ef2d53703970407d59c04e59d3ba0b7a1d53553", size = 11560214, upload-time = "2026-05-21T14:34:50.975Z" }, + { url = "https://files.pythonhosted.org/packages/36/38/012bf76752e1f89ed50b77b99532d90f3a3e287bc7918e1fc0948ac866ac/ruff-0.15.14-py3-none-win32.whl", hash = "sha256:6d0c1ad2a0ab718d39b6d8fd2217981ce4d625cd96a720095f798fb47d8b13e6", size = 10805548, upload-time = "2026-05-21T14:34:33.453Z" }, + { url = "https://files.pythonhosted.org/packages/d1/b7/4ea2c170f10ad760fff2a5250beb18897719dc8b52b53a24cddbb9dd3f19/ruff-0.15.14-py3-none-win_amd64.whl", hash = "sha256:802342981e056db3851a7836e5b070f8f15f67d4a685ae2a6160939d364b2902", size = 11939523, upload-time = "2026-05-21T14:34:18.077Z" }, + { url = "https://files.pythonhosted.org/packages/62/d5/bc97ff895ec35cf3925d4bd60f3b39d822f377a446906ec9bcc87405e59b/ruff-0.15.14-py3-none-win_arm64.whl", hash = "sha256:ff47b90a9ef6a40c9e2f3b479c1fb78531adf055b94c1eba0a7ba04b31951826", size = 11208607, upload-time = "2026-05-21T14:34:26.525Z" }, ] [[package]] From 9436c9967a63717cb41077971e3e68a3f627f989 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Thu, 21 May 2026 16:42:14 -0700 Subject: [PATCH 14/60] Fix dependabot auto-merge: use pull_request_target for write access pull_request events from Dependabot get a read-only GITHUB_TOKEN, preventing gh pr merge --auto from enabling auto-merge. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/dependabot-auto-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index f7a8f238..4c5d505e 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -1,5 +1,5 @@ name: Auto-merge Dependabot PRs -on: pull_request +on: pull_request_target permissions: contents: write From 1c83e7696761262f8bdbcd93045f340e60ef7fef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 23:48:07 +0000 Subject: [PATCH 15/60] chore(deps-dev): bump responses from 0.26.0 to 0.26.1 (#368) Bumps [responses](https://github.com/getsentry/responses) from 0.26.0 to 0.26.1. - [Release notes](https://github.com/getsentry/responses/releases) - [Changelog](https://github.com/getsentry/responses/blob/master/CHANGES) - [Commits](https://github.com/getsentry/responses/compare/0.26.0...0.26.1) --- updated-dependencies: - dependency-name: responses dependency-version: 0.26.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uv.lock b/uv.lock index 1abbd0f0..b8eb2a30 100644 --- a/uv.lock +++ b/uv.lock @@ -917,16 +917,16 @@ wheels = [ [[package]] name = "responses" -version = "0.26.0" +version = "0.26.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pyyaml" }, { name = "requests" }, { name = "urllib3" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/9f/b4/b7e040379838cc71bf5aabdb26998dfbe5ee73904c92c1c161faf5de8866/responses-0.26.0.tar.gz", hash = "sha256:c7f6923e6343ef3682816ba421c006626777893cb0d5e1434f674b649bac9eb4", size = 81303, upload-time = "2026-02-19T14:38:05.574Z" } +sdist = { url = "https://files.pythonhosted.org/packages/c2/58/1fb6de3503428196df78638f991ec8095274f1ee9723e272ee4d9ff0092b/responses-0.26.1.tar.gz", hash = "sha256:2eb3218553cc8f79b57d257bac23af5e1bf381f5b9390b1767816f0843e01dc2", size = 83088, upload-time = "2026-05-21T19:56:39.747Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ce/04/7f73d05b556da048923e31a0cc878f03be7c5425ed1f268082255c75d872/responses-0.26.0-py3-none-any.whl", hash = "sha256:03ec4409088cd5c66b71ecbbbd27fe2c58ddfad801c66203457b3e6a04868c37", size = 35099, upload-time = "2026-02-19T14:38:03.847Z" }, + { url = "https://files.pythonhosted.org/packages/3a/31/6a620b4427d546b9e7cca8b3b8c5f0559d9cef2bb9eedcda7f73c1473c19/responses-0.26.1-py3-none-any.whl", hash = "sha256:8aacc4586eb08fb2208ef64a9eb4258d9b0c6e6f4260845f2f018ab847495345", size = 35502, upload-time = "2026-05-21T19:56:38.046Z" }, ] [[package]] From 43ee7b6bbba4e1627d38af7b3e8f474175e1fc2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 23:53:00 +0000 Subject: [PATCH 16/60] chore(deps): bump requests from 2.33.1 to 2.34.2 (#366) Bumps [requests](https://github.com/psf/requests) from 2.33.1 to 2.34.2. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](https://github.com/psf/requests/compare/v2.33.1...v2.34.2) --- updated-dependencies: - dependency-name: requests dependency-version: 2.34.2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uv.lock b/uv.lock index b8eb2a30..aae14ef1 100644 --- a/uv.lock +++ b/uv.lock @@ -902,7 +902,7 @@ wheels = [ [[package]] name = "requests" -version = "2.33.1" +version = "2.34.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "certifi" }, @@ -910,9 +910,9 @@ dependencies = [ { name = "idna" }, { name = "urllib3" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/5f/a4/98b9c7c6428a668bf7e42ebb7c79d576a1c3c1e3ae2d47e674b468388871/requests-2.33.1.tar.gz", hash = "sha256:18817f8c57c6263968bc123d237e3b8b08ac046f5456bd1e307ee8f4250d3517", size = 134120, upload-time = "2026-03-30T16:09:15.531Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856, upload-time = "2026-05-14T19:25:27.735Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d7/8e/7540e8a2036f79a125c1d2ebadf69ed7901608859186c856fa0388ef4197/requests-2.33.1-py3-none-any.whl", hash = "sha256:4e6d1ef462f3626a1f0a0a9c42dd93c63bad33f9f1c1937509b8c5c8718ab56a", size = 64947, upload-time = "2026-03-30T16:09:13.83Z" }, + { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075, upload-time = "2026-05-14T19:25:26.443Z" }, ] [[package]] From 2d3089168128f1fa48ca92c5e0c880290db66b7e Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Thu, 21 May 2026 17:06:02 -0700 Subject: [PATCH 17/60] ci: group dependabot updates into one PR per branch Prevents concurrent integration test runs from colliding on the shared live test environment. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/dependabot.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d44e189f..deac9726 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,13 +4,25 @@ updates: directory: "/" schedule: interval: "daily" + groups: + all-deps: + patterns: + - "*" - package-ecosystem: "uv" directory: "/" target-branch: "beta" schedule: interval: "daily" + groups: + all-deps: + patterns: + - "*" - package-ecosystem: "uv" directory: "/" target-branch: "httpx" schedule: - interval: "daily" \ No newline at end of file + interval: "daily" + groups: + all-deps: + patterns: + - "*" \ No newline at end of file From 6637f6ab223bcb740f573d2df13ca5e1d2a0dae7 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Thu, 21 May 2026 17:26:27 -0700 Subject: [PATCH 18/60] Update documentation for dev track (httpx branch) --- docs/releasing.md | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/docs/releasing.md b/docs/releasing.md index b366a0c0..4de91678 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -6,7 +6,7 @@ A GitHub Action polls [meraki/openapi releases](https://github.com/meraki/openap ## Versioning rules -1. **Source of truth is the target branch.** The current library minor version is read from `pyproject.toml` on `main` (GA) or `beta` (pre-releases). +1. **Source of truth is the target branch.** The current library minor version is read from `pyproject.toml` on `main` (GA), `beta` (pre-releases), or `httpx` (dev pre-releases). 2. **GA releases go to `main`.** Bump library minor, reset patch: `X.Y.Z` becomes `X.(Y+1).0`. @@ -15,27 +15,43 @@ A GitHub Action polls [meraki/openapi releases](https://github.com/meraki/openap - Library beta number = API beta number (e.g. API `1.81.2-beta.3` → `bN` where N=3) - New API minor bumps library minor (e.g. API minor 80 → 81 bumps library minor) -4. **API version is the OpenAPI tag with `v` stripped.** `v1.71.0-beta.2` becomes `1.71.0-beta.2`. +4. **Dev releases go to `httpx`.** Same versioning logic as beta (mirrors API patch and beta number). Triggered by the same prerelease tags. The generator runs with the `-b httpx` flag and a test org ID for beta endpoint access. -5. **Manual releases can happen independently.** Patches, features, or fixes can be released at any time. They update `pyproject.toml` on their target branch, and the next automated release uses that as its baseline. +5. **API version is the OpenAPI tag with `v` stripped.** `v1.71.0-beta.2` becomes `1.71.0-beta.2`. -6. **GA always bumps minor, never patch.** Even after manual patches (e.g. `3.1.1` becomes `3.2.0`, not `3.1.2`). +6. **Manual releases can happen independently.** Patches, features, or fixes can be released at any time. They update `pyproject.toml` on their target branch, and the next automated release uses that as its baseline. -7. **No version slot is reused.** If a manual release occupies the next expected version, the automated release takes the one after it. +7. **GA always bumps minor, never patch.** Even after manual patches (e.g. `3.1.1` becomes `3.2.0`, not `3.1.2`). + +8. **No version slot is reused.** If a manual release occupies the next expected version, the automated release takes the one after it. ## Examples -Starting from `main` at `3.1.0`, `beta` at `3.1.0`: +Starting from `main` at `3.1.0`, `beta` at `3.1.0`, `httpx` at `4.0.0`: | Event | API Version | Library Version | Branch | | --- | --- | --- | --- | | `v1.71.0-beta.0` detected | `1.71.0-beta.0` | `3.2.0b0` | `beta` | +| (same trigger) | `1.71.0-beta.0` | `4.1.0b0` | `httpx` | | `v1.71.0-beta.1` detected | `1.71.0-beta.1` | `3.2.0b1` | `beta` | +| (same trigger) | `1.71.0-beta.1` | `4.1.0b1` | `httpx` | | `v1.71.1-beta.0` detected | `1.71.1-beta.0` | `3.2.1b0` | `beta` | +| (same trigger) | `1.71.1-beta.0` | `4.1.1b0` | `httpx` | | Manual bugfix (no API change) | `1.70.0` | `3.1.1` | `main` | -| `v1.71.0` detected | `1.71.0` | `3.2.0` | `main` | +| `v1.71.0` detected (GA) | `1.71.0` | `3.2.0` | `main` | | `v1.72.0-beta.0` detected | `1.72.0-beta.0` | `3.3.0b0` | `beta` | +| (same trigger) | `1.72.0-beta.0` | `4.2.0b0` | `httpx` | + +## Beta/dev release additional step + +When a new prerelease is detected, the `enable-early-access.yml` workflow runs first (waited on synchronously). This enables early access features on the test organizations so the generated beta and dev SDKs can be tested against them. -## Beta release additional step +## Release branches and PRs + +| Stage | Source branch | Release branch | PR target | +| --- | --- | --- | --- | +| GA | `main` | `release` | `main` | +| Beta | `beta` | `beta-release` | `beta` | +| Dev | `httpx` | `httpx-release` | `httpx` | -When a new beta release is detected, the `enable-early-access.yml` workflow runs first. This enables early access features on the test organization so the generated beta SDK can be tested against them. +All release PRs are set to auto-merge (squash). Once merged and tests pass, the `create-release.yml` workflow creates a GitHub release, which triggers `publish-release.yml` to publish to PyPI. From 0f7b0611c3eb0d1e3c3dc01f931582d7fc692a7b Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Tue, 26 May 2026 09:51:20 -0700 Subject: [PATCH 19/60] Remove v3 drift detection workflow and script (#373) OASv2 scaffolding is removed on httpx branch; drift detection between v2/v3 generators is no longer needed. The workflow was also failing due to a template/generator mismatch (2-tuple vs 3-tuple assert_blocks). Co-authored-by: Claude Opus 4.6 (1M context) --- .github/workflows/v3-drift-detection.yml | 62 ----- scripts/semantic_diff_v2_v3.py | 339 ----------------------- 2 files changed, 401 deletions(-) delete mode 100644 .github/workflows/v3-drift-detection.yml delete mode 100644 scripts/semantic_diff_v2_v3.py diff --git a/.github/workflows/v3-drift-detection.yml b/.github/workflows/v3-drift-detection.yml deleted file mode 100644 index 7736dcf9..00000000 --- a/.github/workflows/v3-drift-detection.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: V3 Drift Detection - -on: - push: - branches: ['main', 'release'] - paths: - - 'generator/**' - - 'scripts/semantic_diff_v2_v3.py' - pull_request: - branches: ['main', 'release'] - paths: - - 'generator/**' - - 'scripts/semantic_diff_v2_v3.py' - workflow_dispatch: - schedule: - - cron: '0 6 * * 1' # Weekly Monday 6am UTC - -jobs: - drift-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Install uv - uses: astral-sh/setup-uv@v7 - with: - enable-cache: true - - - name: Set up Python - run: uv python install 3.13 - - - name: Install dependencies - run: uv sync --python 3.13 --group generator - - - name: Run semantic diff (live spec) - run: uv run python scripts/semantic_diff_v2_v3.py --live --json > drift-report.json - env: - PYTHONPATH: generator - - - name: Check for critical drift - run: | - python -c " - import json, sys - with open('drift-report.json') as f: - drifts = json.load(f) - critical_types = ('MISSING_IN_V3', 'BODY_WIRING', 'QUERY_WIRING') - critical = [d for d in drifts if d['type'] in critical_types] - if critical: - print(f'CRITICAL: {len(critical)} issues found') - for d in critical[:20]: - print(f' [{d[\"type\"]}] {d[\"scope\"]}.{d[\"method\"]}: {d.get(\"detail\", \"\")}') - sys.exit(1) - print(f'OK: {len(drifts)} expected differences, 0 critical') - " - - - name: Upload drift report - if: always() - uses: actions/upload-artifact@v4 - with: - name: drift-report - path: drift-report.json - retention-days: 30 diff --git a/scripts/semantic_diff_v2_v3.py b/scripts/semantic_diff_v2_v3.py deleted file mode 100644 index 58df4d8e..00000000 --- a/scripts/semantic_diff_v2_v3.py +++ /dev/null @@ -1,339 +0,0 @@ -#!/usr/bin/env python3 -"""Semantic diff between v2 and v3 generator output. - -Compares method signatures, parameter lists, and types. -Ignores formatting, kwargs style, and whitespace. - -Usage: - python scripts/semantic_diff_v2_v3.py [spec.json] - python scripts/semantic_diff_v2_v3.py --live - -Exit codes: - 0: Only known/expected differences (or identical) - 1: Unexpected semantic drift detected -""" - -import argparse -import contextlib -import json -import os -import re -import shutil -import sys -import tempfile -from pathlib import Path -from unittest.mock import patch, MagicMock - -GENERATOR_DIR = Path(__file__).resolve().parent.parent / "generator" -sys.path.insert(0, str(GENERATOR_DIR)) - - -def extract_methods(content: str) -> dict[str, dict]: - """Extract method name -> {signature, params, body_section} from module.""" - methods = {} - # Match method definitions (may span multiple lines after ruff formatting) - pattern = re.compile(r"^\s{4}def (\w+)\(\s*self(.*?)\s*\):", re.MULTILINE | re.DOTALL) - for match in pattern.finditer(content): - name = match.group(1) - if name == "__init__": - continue - # Normalize multiline signatures: collapse whitespace - raw_sig = re.sub(r"\s+", " ", match.group(2)).strip(", ") - # Parse param names and types from signature - params = {} - if raw_sig: - for part in re.split(r",\s*", raw_sig): - part = part.strip() - if "=" in part: - part = part.split("=")[0].strip() - if ":" in part: - pname, ptype = part.split(":", 1) - params[pname.strip()] = ptype.strip() - elif part == "**kwargs": - params["**kwargs"] = "**kwargs" - else: - params[part] = "untyped" - methods[name] = {"signature": raw_sig, "params": params} - return methods - - -def extract_method_bodies(content: str) -> dict[str, str]: - """Extract method name -> full body text (everything until the next method or EOF).""" - bodies = {} - pattern = re.compile(r"^ def (\w+)\(.*?\):\n", re.MULTILINE | re.DOTALL) - matches = list(pattern.finditer(content)) - for i, match in enumerate(matches): - name = match.group(1) - if name == "__init__": - continue - start = match.end() - end = matches[i + 1].start() if i + 1 < len(matches) else len(content) - bodies[name] = content[start:end] - return bodies - - -def check_body_wiring(content: str, scope: str) -> list[dict]: - """Check that positional params are reachable from the payload/params dict. - - Detects the case where a method has required positional args listed in - body_params but no kwargs.update(locals()) or kwargs = locals() to merge - them into kwargs for the dict comprehension. - """ - methods = extract_methods(content) - bodies = extract_method_bodies(content) - drifts = [] - - for name, info in methods.items(): - body = bodies.get(name, "") - if "body_params" not in body and "query_params" not in body: - continue - - has_merge = "kwargs.update(locals())" in body or "kwargs = locals()" in body - - if has_merge: - continue - - positional_params = {p for p in info["params"] if p != "**kwargs" and "=" not in p and p != "self"} - - if "body_params" in body: - bp_match = re.search(r"body_params\s*=\s*\[(.*?)\]", body, re.DOTALL) - if bp_match: - listed = set(re.findall(r'"(\w+)"', bp_match.group(1))) - unwired = positional_params & listed - if unwired: - drifts.append( - { - "type": "BODY_WIRING", - "scope": scope, - "method": name, - "detail": f"Positional params {unwired} in body_params but no kwargs merge", - } - ) - - if "query_params" in body: - qp_match = re.search(r"query_params\s*=\s*\[(.*?)\]", body, re.DOTALL) - if qp_match: - listed = set(re.findall(r'"(\w+)"', qp_match.group(1))) - unwired = positional_params & listed - if unwired: - drifts.append( - { - "type": "QUERY_WIRING", - "scope": scope, - "method": name, - "detail": f"Positional params {unwired} in query_params but no kwargs merge", - } - ) - - return drifts - - -def compare_modules(v2_content: str, v3_content: str, scope: str) -> list[dict]: - """Compare two module contents semantically. Returns list of drift entries.""" - v2_methods = extract_methods(v2_content) - v3_methods = extract_methods(v3_content) - - drifts = [] - - # Methods in v2 but not v3 - for name in sorted(set(v2_methods) - set(v3_methods)): - drifts.append( - {"type": "MISSING_IN_V3", "scope": scope, "method": name, "detail": f"Method {name} exists in v2 but not v3"} - ) - - # Methods in v3 but not v2 (informational, not failure) - for name in sorted(set(v3_methods) - set(v2_methods)): - drifts.append( - { - "type": "MISSING_IN_V2", - "scope": scope, - "method": name, - "detail": f"Method {name} exists in v3 but not v2 (likely new endpoint)", - } - ) - - # Methods in both: compare params - for name in sorted(set(v2_methods) & set(v3_methods)): - v2_params = v2_methods[name]["params"] - v3_params = v3_methods[name]["params"] - - # Compare param names (ignore **kwargs, it's expected to differ) - v2_names = set(v2_params.keys()) - {"**kwargs"} - v3_names = set(v3_params.keys()) - {"**kwargs"} - - if v2_names != v3_names: - missing_in_v3 = v2_names - v3_names - extra_in_v3 = v3_names - v2_names - if missing_in_v3 or extra_in_v3: - drifts.append( - { - "type": "PARAM_DIFF", - "scope": scope, - "method": name, - "detail": f"Param diff: missing_in_v3={missing_in_v3}, extra_in_v3={extra_in_v3}", - } - ) - - # Compare types for shared params - shared = v2_names & v3_names - for p in sorted(shared): - v2_type = v2_params[p] - v3_type = v3_params[p] - if v2_type != v3_type and v2_type != "untyped" and v3_type != "untyped": - drifts.append( - {"type": "TYPE_DIFF", "scope": scope, "method": name, "detail": f"Param '{p}': v2={v2_type}, v3={v3_type}"} - ) - - return drifts - - -def mock_requests_get(url): - """Mock requests.get for offline generation.""" - m = MagicMock() - m.text = f"# placeholder for {url.split('/')[-1]}\n" - m.ok = True - return m - - -def run_v2_generator(spec: dict, output_dir: Path): - """Run v2 generator in output_dir.""" - import generate_library_oasv2 as gen_v2 - - original = os.getcwd() - try: - os.chdir(output_dir) - with ( - patch("generate_library_oasv2.requests.get", side_effect=mock_requests_get), - contextlib.redirect_stdout(open(os.devnull, "w")), - ): - gen_v2.generate_library(spec, "0.0.0-diff", "v1", False) - finally: - os.chdir(original) - - -def run_v3_generator(spec: dict, output_dir: Path): - """Run v3 generator in output_dir.""" - import generate_library as gen_v3 - - original = os.getcwd() - try: - os.chdir(output_dir) - with ( - patch("generate_library.requests.get", side_effect=mock_requests_get), - contextlib.redirect_stdout(open(os.devnull, "w")), - ): - gen_v3.generate_library(spec, "0.0.0-diff", "v1", False) - finally: - os.chdir(original) - - -def main(): - parser = argparse.ArgumentParser(description="Semantic diff v2 vs v3 generator output") - parser.add_argument("spec_file", nargs="?", help="Path to OAS spec JSON (omit for live fetch)") - parser.add_argument("--live", action="store_true", help="Fetch live spec from api.meraki.com") - parser.add_argument("--json", action="store_true", help="Output as JSON") - parser.add_argument("--fail-on-missing", action="store_true", help="Exit 1 if v3 is missing methods that v2 has") - args = parser.parse_args() - - # Load spec - if args.spec_file: - with open(args.spec_file) as f: - spec = json.load(f) - elif args.live: - import requests - - resp = requests.get("https://api.meraki.com/api/v1/openapiSpec", params={"version": 3}) - resp.raise_for_status() - spec = resp.json() - else: - print("Error: provide spec_file path or --live flag", file=sys.stderr) - sys.exit(2) - - # Setup temp dirs with templates - v2_dir = Path(tempfile.mkdtemp(prefix="v2_")) - v3_dir = Path(tempfile.mkdtemp(prefix="v3_")) - - for d in (v2_dir, v3_dir): - for tmpl in GENERATOR_DIR.glob("*.jinja2"): - shutil.copy2(tmpl, d / tmpl.name) - # Copy pyproject.toml for ruff config - pyproject = GENERATOR_DIR.parent / "pyproject.toml" - if pyproject.exists(): - shutil.copy2(pyproject, d / "pyproject.toml") - - # Run both generators - print("Running v2 generator...", file=sys.stderr) - run_v2_generator(spec, v2_dir) - print("Running v3 generator...", file=sys.stderr) - run_v3_generator(spec, v3_dir) - - # Compare each scope - all_drifts = [] - v2_api = v2_dir / "meraki" / "api" - v3_api = v3_dir / "meraki" / "api" - - if v2_api.exists() and v3_api.exists(): - v2_modules = {f.stem for f in v2_api.glob("*.py") if f.stem != "__init__"} - v3_modules = {f.stem for f in v3_api.glob("*.py") if f.stem != "__init__"} - - for scope in sorted(v2_modules & v3_modules): - v2_content = (v2_api / f"{scope}.py").read_text() - v3_content = (v3_api / f"{scope}.py").read_text() - drifts = compare_modules(v2_content, v3_content, scope) - all_drifts.extend(drifts) - all_drifts.extend(check_body_wiring(v3_content, scope)) - - # Cleanup - shutil.rmtree(v2_dir, ignore_errors=True) - shutil.rmtree(v3_dir, ignore_errors=True) - - # Report - if args.json: - print(json.dumps(all_drifts, indent=2)) - else: - if not all_drifts: - print("No semantic drift detected between v2 and v3 output.") - else: - missing_v3 = [d for d in all_drifts if d["type"] == "MISSING_IN_V3"] - missing_v2 = [d for d in all_drifts if d["type"] == "MISSING_IN_V2"] - param_diffs = [d for d in all_drifts if d["type"] == "PARAM_DIFF"] - type_diffs = [d for d in all_drifts if d["type"] == "TYPE_DIFF"] - wiring = [d for d in all_drifts if d["type"] in ("BODY_WIRING", "QUERY_WIRING")] - - print("\n=== Semantic Drift Report ===") - print(f"Methods missing in v3: {len(missing_v3)}") - print(f"Methods only in v3: {len(missing_v2)}") - print(f"Parameter differences: {len(param_diffs)}") - print(f"Type differences: {len(type_diffs)}") - print(f"Body/query wiring issues: {len(wiring)}") - - if missing_v3: - print(f"\n--- Missing in v3 ({len(missing_v3)}) ---") - for d in missing_v3[:20]: - print(f" {d['scope']}.{d['method']}") - - if wiring: - print(f"\n--- Wiring Issues ({len(wiring)}) ---") - for d in wiring[:20]: - print(f" {d['scope']}.{d['method']}: {d['detail']}") - - if param_diffs: - print(f"\n--- Param Diffs ({len(param_diffs)}) ---") - for d in param_diffs[:20]: - print(f" {d['scope']}.{d['method']}: {d['detail']}") - - if type_diffs: - print(f"\n--- Type Diffs ({len(type_diffs)}) ---") - for d in type_diffs[:20]: - print(f" {d['scope']}.{d['method']}: {d['detail']}") - - # Exit code: fail on critical issues - critical = [d for d in all_drifts if d["type"] in ("MISSING_IN_V3", "BODY_WIRING", "QUERY_WIRING")] - if args.fail_on_missing and critical: - sys.exit(1) - - sys.exit(0) - - -if __name__ == "__main__": - main() From fcde9cbc20afb184f203f6eb7715d508278279a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 22:17:45 +0000 Subject: [PATCH 20/60] chore(deps-dev): bump pytest-asyncio in the all-deps group (#375) Bumps the all-deps group with 1 update: [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio). Updates `pytest-asyncio` from 1.3.0 to 1.4.0 - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v1.3.0...v1.4.0) --- updated-dependencies: - dependency-name: pytest-asyncio dependency-version: 1.4.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uv.lock b/uv.lock index aae14ef1..3d0791b4 100644 --- a/uv.lock +++ b/uv.lock @@ -807,15 +807,15 @@ wheels = [ [[package]] name = "pytest-asyncio" -version = "1.3.0" +version = "1.4.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pytest" }, { name = "typing-extensions", marker = "python_full_version < '3.13'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/90/2c/8af215c0f776415f3590cac4f9086ccefd6fd463befeae41cd4d3f193e5a/pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5", size = 50087, upload-time = "2025-11-10T16:07:47.256Z" } +sdist = { url = "https://files.pythonhosted.org/packages/43/7c/d36d04db312ecf4298932ef77e6e4a9e8ad017906e24e34f0b0c361a2473/pytest_asyncio-1.4.0.tar.gz", hash = "sha256:c6c0d2259945122819f171a32ecea2c349ead889ee28176caaf492143424be42", size = 58514, upload-time = "2026-05-26T09:56:04.083Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e5/35/f8b19922b6a25bc0880171a2f1a003eaeb93657475193ab516fd87cac9da/pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5", size = 15075, upload-time = "2025-11-10T16:07:45.537Z" }, + { url = "https://files.pythonhosted.org/packages/03/e2/08a497ef684b88559c9cc5f4ad53a37e7b99e727094a86d6ea32536d5d3c/pytest_asyncio-1.4.0-py3-none-any.whl", hash = "sha256:933ca923a23075a87fb7070c0ec272a6848489824d887c85c812670932835aa1", size = 16930, upload-time = "2026-05-26T09:56:02.576Z" }, ] [[package]] From 25cbda3f36312eb7e6c59d508ee2f18778d51c04 Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 18:01:22 +0000 Subject: [PATCH 21/60] Auto-generated library v3.1.0b3 for API v1.70.0-beta.3. (#377) Co-authored-by: GitHub Action --- docs/generation-report.md | 6 + meraki/__init__.py | 2 +- meraki/_version.py | 2 +- meraki/aio/api/appliance.py | 201 ++++++++++++++--- meraki/aio/api/campusGateway.py | 3 + meraki/aio/api/devices.py | 72 +++--- meraki/aio/api/organizations.py | 17 ++ meraki/aio/api/secureConnect.py | 16 +- meraki/aio/api/sm.py | 373 ++++++++++++++++++++++++++++++++ meraki/aio/api/switch.py | 2 + meraki/aio/api/users.py | 4 +- meraki/aio/api/wireless.py | 95 ++------ meraki/api/appliance.py | 201 ++++++++++++++--- meraki/api/batch/appliance.py | 60 ++--- meraki/api/batch/devices.py | 10 +- meraki/api/batch/sm.py | 160 ++++++++++++++ meraki/api/batch/switch.py | 2 + meraki/api/batch/users.py | 4 +- meraki/api/batch/wireless.py | 12 +- meraki/api/campusGateway.py | 3 + meraki/api/devices.py | 72 +++--- meraki/api/organizations.py | 17 ++ meraki/api/secureConnect.py | 16 +- meraki/api/sm.py | 373 ++++++++++++++++++++++++++++++++ meraki/api/switch.py | 2 + meraki/api/users.py | 4 +- meraki/api/wireless.py | 95 ++------ pyproject.toml | 2 +- uv.lock | 2 +- 29 files changed, 1466 insertions(+), 362 deletions(-) diff --git a/docs/generation-report.md b/docs/generation-report.md index e7964adc..d9a22bcb 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,11 @@ # Generation Report +## 2026-05-27 | Library v3.1.0b3 | API 1.70.0-beta.3 + + +No Python keyword parameter conflicts detected. + + ## 2026-05-20 | Library v3.1.0b2 | API 1.70.0-beta.2 diff --git a/meraki/__init__.py b/meraki/__init__.py index ae7603a4..77505a4a 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -52,7 +52,7 @@ from meraki._version import __version__ # noqa: F401 from datetime import datetime -__api_version__ = "1.70.0-beta.2" +__api_version__ = "1.70.0-beta.3" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index 0e915519..ae9bf830 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "3.1.0b2" +__version__ = "3.1.0b3" diff --git a/meraki/aio/api/appliance.py b/meraki/aio/api/appliance.py index 728acb26..a6a6e853 100644 --- a/meraki/aio/api/appliance.py +++ b/meraki/aio/api/appliance.py @@ -40,10 +40,10 @@ def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): kwargs.update(locals()) - if "speed" in kwargs: + if "speed" in kwargs and kwargs["speed"] is not None: options = ["10", "100", "1000", "10000", "2500", "25000", "5000", "auto"] assert kwargs["speed"] in options, f'''"speed" cannot be "{kwargs["speed"]}", & must be set to one of: {options}''' - if "duplex" in kwargs: + if "duplex" in kwargs and kwargs["duplex"] is not None: options = ["auto", "full", "half"] assert kwargs["duplex"] in options, ( f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' @@ -94,10 +94,10 @@ def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs kwargs.update(locals()) - if "speed" in kwargs: + if "speed" in kwargs and kwargs["speed"] is not None: options = ["10", "100", "1000", "10000", "2500", "25000", "5000", "auto"] assert kwargs["speed"] in options, f'''"speed" cannot be "{kwargs["speed"]}", & must be set to one of: {options}''' - if "duplex" in kwargs: + if "duplex" in kwargs and kwargs["duplex"] is not None: options = ["auto", "full", "half"] assert kwargs["duplex"] in options, ( f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' @@ -1282,6 +1282,7 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybris-radius' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. - peerSgtCapable (boolean): If true, Peer SGT is enabled for traffic through this port. Applicable to trunk port only, not access port. - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this port is assigned to. + - sgt (object): Security Group Tag settings for the port. """ kwargs.update(locals()) @@ -1303,6 +1304,7 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): "accessPolicy", "peerSgtCapable", "adaptivePolicyGroupId", + "sgt", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2600,40 +2602,23 @@ def disableNetworkApplianceUmbrellaProtection(self, networkId: str): return self._session.delete(metadata, resource) - def enableNetworkApplianceUmbrellaProtection(self, networkId: str): - """ - **Enable umbrella protection for an MX network** - https://developer.cisco.com/meraki/api-v1/#!enable-network-appliance-umbrella-protection - - - networkId (string): Network ID - """ - - metadata = { - "tags": ["appliance", "configure", "umbrella"], - "operation": "enableNetworkApplianceUmbrellaProtection", - } - networkId = urllib.parse.quote(str(networkId), safe="") - resource = f"/networks/{networkId}/appliance/umbrella/enableProtection" - - return self._session.post(metadata, resource) - - def excludeNetworkApplianceUmbrellaDomains(self, networkId: str, domains: list, **kwargs): + def exclusionsNetworkApplianceUmbrellaDomains(self, networkId: str, domains: list, **kwargs): """ **Specify one or more domain names to be excluded from being routed to Cisco Umbrella.** - https://developer.cisco.com/meraki/api-v1/#!exclude-network-appliance-umbrella-domains + https://developer.cisco.com/meraki/api-v1/#!exclusions-network-appliance-umbrella-domains - networkId (string): Network ID - - domains (array): Array of domain names + - domains (array): Domain names to exclude from Umbrella DNS routing (e.g., 'example.com', 'corp.example.org'). Standard FQDNs only — wildcards are not supported. Values are lowercased before saving. Each call replaces the full exclusion list. """ kwargs = locals() metadata = { - "tags": ["appliance", "configure", "umbrella"], - "operation": "excludeNetworkApplianceUmbrellaDomains", + "tags": ["appliance", "configure", "umbrella", "domains"], + "operation": "exclusionsNetworkApplianceUmbrellaDomains", } networkId = urllib.parse.quote(str(networkId), safe="") - resource = f"/networks/{networkId}/appliance/umbrella/excludeDomains" + resource = f"/networks/{networkId}/appliance/umbrella/domains/exclusions" body_params = [ "domains", @@ -2645,11 +2630,28 @@ def excludeNetworkApplianceUmbrellaDomains(self, networkId: str, domains: list, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"excludeNetworkApplianceUmbrellaDomains: ignoring unrecognized kwargs: {invalid}" + f"exclusionsNetworkApplianceUmbrellaDomains: ignoring unrecognized kwargs: {invalid}" ) return self._session.put(metadata, resource, payload) + def enableNetworkApplianceUmbrellaProtection(self, networkId: str): + """ + **Enable umbrella protection for an MX network** + https://developer.cisco.com/meraki/api-v1/#!enable-network-appliance-umbrella-protection + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["appliance", "configure", "umbrella"], + "operation": "enableNetworkApplianceUmbrellaProtection", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/enableProtection" + + return self._session.post(metadata, resource) + def policiesNetworkApplianceUmbrella(self, networkId: str, policyIds: list, **kwargs): """ **Update umbrella policies applied to MX network.** @@ -2683,7 +2685,7 @@ def policiesNetworkApplianceUmbrella(self, networkId: str, policyIds: list, **kw def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kwargs): """ - **Add one umbrella policy to your network.** + **Add one Cisco Umbrella DNS security policy to an MX network by policy ID** https://developer.cisco.com/meraki/api-v1/#!add-network-appliance-umbrella-policies - networkId (string): Network ID @@ -2714,7 +2716,7 @@ def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kw def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kwargs): """ - **Remove one umbrella policy from your network.** + **Remove one Cisco Umbrella DNS security policy from an MX network by policy ID** https://developer.cisco.com/meraki/api-v1/#!remove-network-appliance-umbrella-policies - networkId (string): Network ID @@ -2745,13 +2747,13 @@ def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, * return self._session.post(metadata, resource, payload) - def protectionNetworkApplianceUmbrella(self, networkId: str, enable: bool, **kwargs): + def protectionNetworkApplianceUmbrella(self, networkId: str, enabled: bool, **kwargs): """ - **Enable or disable umbrella protection for an MX network** + **Enable or disable umbrella protection for an appliance network** https://developer.cisco.com/meraki/api-v1/#!protection-network-appliance-umbrella - networkId (string): Network ID - - enable (boolean): Enable or disable umbrella protection + - enabled (boolean): Enable or disable umbrella protection """ kwargs = locals() @@ -2764,7 +2766,7 @@ def protectionNetworkApplianceUmbrella(self, networkId: str, enable: bool, **kwa resource = f"/networks/{networkId}/appliance/umbrella/protection" body_params = [ - "enable", + "enabled", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2887,6 +2889,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg - dhcpBootFilename (string): DHCP boot option for boot filename - dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties. - adaptivePolicyGroupId (string): Adaptive policy group ID this VLAN is assigned to. + - sgt (object): Security Group Tag settings for the VLAN. - vrf (object): VRF configuration on the VLAN - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -2935,6 +2938,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg "dhcpBootFilename", "dhcpOptions", "adaptivePolicyGroupId", + "sgt", "vrf", "uplinks", ] @@ -3043,6 +3047,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): - ipv6 (object): IPv6 configuration on the VLAN - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this VLAN is assigned to. + - sgt (object): Security Group Tag settings for the VLAN. - vrf (object): VRF configuration on the VLAN - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -3095,6 +3100,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): "ipv6", "mandatoryDhcp", "adaptivePolicyGroupId", + "sgt", "vrf", "uplinks", ] @@ -3245,6 +3251,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw - hubs (array): The list of VPN hubs, in order of preference. In spoke mode, at least 1 hub is required. - subnets (array): The list of subnets and their VPN presence. - peerSgtCapable (boolean): Whether or not Peer SGT is enabled for traffic to this VPN peer. + - sgt (object): Security Group Tag settings for the VPN peer. - subnet (object): Configuration of subnet features - hostTranslations (array): The list of VPN host translations. Host translations are supported starting from MX firmware version 26.1.2 """ @@ -3267,6 +3274,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw "hubs", "subnets", "peerSgtCapable", + "sgt", "subnet", "hostTranslations", ] @@ -3451,6 +3459,71 @@ def getOrganizationApplianceDevicesInterfacesPortsByDevice(self, organizationId: return self._session.get(metadata, resource, params) + def getOrganizationApplianceDevicesPortsTransceiversReadingsHistoryByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Return time-series digital optical monitoring (DOM) readings for ports on each DOM-enabled Catalyst appliance in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-ports-transceivers-readings-history-by-device + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10. Default is 5. + - 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. + - 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 30 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 30 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided. + - networkIds (array): Networks for which information should be gathered. + - serials (array): Optional parameter to filter usage by appliance serial. + - portIds (array): Optional parameter to filter usage by port ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "devices", "ports", "transceivers", "readings", "history", "byDevice"], + "operation": "getOrganizationApplianceDevicesPortsTransceiversReadingsHistoryByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/devices/ports/transceivers/readings/history/byDevice" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + "networkIds", + "serials", + "portIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "portIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceDevicesPortsTransceiversReadingsHistoryByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceDevicesRedundancyByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -4229,6 +4302,66 @@ def getOrganizationApplianceFirewallMulticastForwardingByNetwork( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceInterfacesPacketsOverviewsByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns packet counter overviews for all interfaces on Secure Routers in the organization, including totals and average rates by packet type over the requested timespan.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-interfaces-packets-overviews-by-device + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 10. + - 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. + - networkIds (array): Optional parameter to filter Secure Routers in the provided networks + - serials (array): Optional parameter to filter Secure Routers by their serial numbers + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "interfaces", "packets", "overviews", "byDevice"], + "operation": "getOrganizationApplianceInterfacesPacketsOverviewsByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/interfaces/packets/overviews/byDevice" + + query_params = [ + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceInterfacesPacketsOverviewsByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceRoutingVrfsSettings(self, organizationId: str): """ **Return the VRF setting for an organization.** diff --git a/meraki/aio/api/campusGateway.py b/meraki/aio/api/campusGateway.py index 2f602c19..90e053a1 100644 --- a/meraki/aio/api/campusGateway.py +++ b/meraki/aio/api/campusGateway.py @@ -408,6 +408,7 @@ def getOrganizationCampusGatewayClustersNetworksOverviews( - clusterIds (array): Optional parameter to filter by MCG cluster IDs. This filter uses multiple exact matches. - siteIds (array): Optional parameter to filter by site IDs. This filter uses multiple exact matches. - networkIds (array): Optional parameter to filter networks. This filter uses multiple exact matches. + - tunnelingSources (array): Optional parameter to filter networks by tunneling source. 'configured' returns networks explicitly set up to tunnel through the campus gateway. 'roaming' returns networks tunneling due to AP roaming or disaster recovery. 'roaming' is only effective when 'clusterIds' is also provided; without 'clusterIds', the filter defaults to configured-only behavior. Defaults to 'configured' if omitted. - search (string): Optional parameter to filter networks by wireless network name. This filter uses case-insensitive substring matching. - sortBy (string): Optional parameter to sort results. Default is 'name'. Use 'siteName' to sort by site name. - sortOrder (string): Optional parameter to specify sort direction. Default is 'asc'. @@ -440,6 +441,7 @@ def getOrganizationCampusGatewayClustersNetworksOverviews( "clusterIds", "siteIds", "networkIds", + "tunnelingSources", "search", "sortBy", "sortOrder", @@ -453,6 +455,7 @@ def getOrganizationCampusGatewayClustersNetworksOverviews( "clusterIds", "siteIds", "networkIds", + "tunnelingSources", ] for k, v in kwargs.items(): if k.strip() in array_params: diff --git a/meraki/aio/api/devices.py b/meraki/aio/api/devices.py index 3d4f22ab..1b778161 100644 --- a/meraki/aio/api/devices.py +++ b/meraki/aio/api/devices.py @@ -862,25 +862,27 @@ def getDeviceLiveToolsPingDevice(self, serial: str, id: str): return self._session.get(metadata, resource) - def createDeviceLiveToolsPortStatus(self, serial: str, **kwargs): + def createDeviceLiveToolsPortsCycle(self, serial: str, ports: list, **kwargs): """ - **Enqueue a job to retrieve port status for a device** - https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-port-status + **Enqueue a job to perform a cycle port for the device on the specified ports** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-ports-cycle - serial (string): Serial + - ports (array): A list of ports to cycle. For Catalyst switches, IOS interface names are also supported, such as "GigabitEthernet1/0/8", "Gi1/0/8", or even "1/0/8". - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ kwargs.update(locals()) metadata = { - "tags": ["devices", "liveTools", "portStatus"], - "operation": "createDeviceLiveToolsPortStatus", + "tags": ["devices", "liveTools", "ports", "cycle"], + "operation": "createDeviceLiveToolsPortsCycle", } serial = urllib.parse.quote(str(serial), safe="") - resource = f"/devices/{serial}/liveTools/portStatus" + resource = f"/devices/{serial}/liveTools/ports/cycle" body_params = [ + "ports", "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -889,50 +891,48 @@ def createDeviceLiveToolsPortStatus(self, serial: str, **kwargs): all_params = [] + body_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"createDeviceLiveToolsPortStatus: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning(f"createDeviceLiveToolsPortsCycle: ignoring unrecognized kwargs: {invalid}") return self._session.post(metadata, resource, payload) - def getDeviceLiveToolsPortStatus(self, serial: str, portStatusId: str): + def getDeviceLiveToolsPortsCycle(self, serial: str, id: str): """ - **Return a port status live tool job.** - https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-port-status + **Return a cycle port live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-ports-cycle - serial (string): Serial - - portStatusId (string): Port status ID + - id (string): ID """ metadata = { - "tags": ["devices", "liveTools", "portStatus"], - "operation": "getDeviceLiveToolsPortStatus", + "tags": ["devices", "liveTools", "ports", "cycle"], + "operation": "getDeviceLiveToolsPortsCycle", } serial = urllib.parse.quote(str(serial), safe="") - portStatusId = urllib.parse.quote(str(portStatusId), safe="") - resource = f"/devices/{serial}/liveTools/portStatus/{portStatusId}" + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/ports/cycle/{id}" return self._session.get(metadata, resource) - def createDeviceLiveToolsPortsCycle(self, serial: str, ports: list, **kwargs): + def createDeviceLiveToolsPortsStatus(self, serial: str, **kwargs): """ - **Enqueue a job to perform a cycle port for the device on the specified ports** - https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-ports-cycle + **Enqueue a job to retrieve port status for a device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-ports-status - serial (string): Serial - - ports (array): A list of ports to cycle. For Catalyst switches, IOS interface names are also supported, such as "GigabitEthernet1/0/8", "Gi1/0/8", or even "1/0/8". - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ kwargs.update(locals()) metadata = { - "tags": ["devices", "liveTools", "ports", "cycle"], - "operation": "createDeviceLiveToolsPortsCycle", + "tags": ["devices", "liveTools", "ports", "status"], + "operation": "createDeviceLiveToolsPortsStatus", } serial = urllib.parse.quote(str(serial), safe="") - resource = f"/devices/{serial}/liveTools/ports/cycle" + resource = f"/devices/{serial}/liveTools/ports/status" body_params = [ - "ports", "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -941,26 +941,26 @@ def createDeviceLiveToolsPortsCycle(self, serial: str, ports: list, **kwargs): all_params = [] + body_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"createDeviceLiveToolsPortsCycle: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning(f"createDeviceLiveToolsPortsStatus: ignoring unrecognized kwargs: {invalid}") return self._session.post(metadata, resource, payload) - def getDeviceLiveToolsPortsCycle(self, serial: str, id: str): + def getDeviceLiveToolsPortsStatus(self, serial: str, jobId: str): """ - **Return a cycle port live tool job.** - https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-ports-cycle + **Return a port status live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-ports-status - serial (string): Serial - - id (string): ID + - jobId (string): Job ID """ metadata = { - "tags": ["devices", "liveTools", "ports", "cycle"], - "operation": "getDeviceLiveToolsPortsCycle", + "tags": ["devices", "liveTools", "ports", "status"], + "operation": "getDeviceLiveToolsPortsStatus", } serial = urllib.parse.quote(str(serial), safe="") - id = urllib.parse.quote(str(id), safe="") - resource = f"/devices/{serial}/liveTools/ports/cycle/{id}" + jobId = urllib.parse.quote(str(jobId), safe="") + resource = f"/devices/{serial}/liveTools/ports/status/{jobId}" return self._session.get(metadata, resource) @@ -1047,7 +1047,7 @@ def createDeviceLiveToolsRoutingTable(self, serial: str, **kwargs): def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): """ - **Enqueue a job to perform a routing table lookup request for the device** + **Enqueue a job to perform a routing table lookup request for a device** https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table-lookup - serial (string): Serial @@ -1108,7 +1108,7 @@ def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): def getDeviceLiveToolsRoutingTableLookup(self, serial: str, id: str): """ - **Return a routing table live tool lookup job.** + **Return a routing table live tool lookup job for a device** https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-routing-table-lookup - serial (string): Serial @@ -1127,7 +1127,7 @@ def getDeviceLiveToolsRoutingTableLookup(self, serial: str, id: str): def createDeviceLiveToolsRoutingTableSummary(self, serial: str, **kwargs): """ - **Enqueue a job to perform a routing table summary request for the device** + **Enqueue a routing table summary job for a device** https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table-summary - serial (string): Serial @@ -1160,7 +1160,7 @@ def createDeviceLiveToolsRoutingTableSummary(self, serial: str, **kwargs): def getDeviceLiveToolsRoutingTableSummary(self, serial: str, id: str): """ - **Return a routing table live tool summary job.** + **Return the status and result of a routing table summary job** https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-routing-table-summary - serial (string): Serial diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index cb29bedd..9be8b7ae 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -3691,6 +3691,23 @@ def deleteOrganizationAuthRadiusServer(self, organizationId: str, serverId: str) return self._session.delete(metadata, resource) + def codeOrganizationAutomateIdentity(self, organizationId: str): + """ + **Generate a single use short lived code that can be used to retrieve the identity of the current user in the organization.** + https://developer.cisco.com/meraki/api-v1/#!code-organization-automate-identity + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "automate", "identity"], + "operation": "codeOrganizationAutomateIdentity", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/automate/identity/code" + + return self._session.post(metadata, resource) + def getOrganizationBrandingPolicies(self, organizationId: str): """ **List the branding policies of an organization** diff --git a/meraki/aio/api/secureConnect.py b/meraki/aio/api/secureConnect.py index dfec273c..47003170 100644 --- a/meraki/aio/api/secureConnect.py +++ b/meraki/aio/api/secureConnect.py @@ -887,19 +887,19 @@ def getOrganizationSecureConnectRemoteAccessLogsExports( return self._session.get_pages(metadata, resource, params, total_pages, direction) - def createOrganizationSecureConnectRemoteAccessLogsExport(self, organizationId: str, from_: int, to: int, **kwargs): + def createOrganizationSecureConnectRemoteAccessLogsExport(self, organizationId: str, **kwargs): """ - **Creates a export for a provided timestamp interval.** + **Creates an export for a provided timestamp interval.** https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-remote-access-logs-export - organizationId (string): Organization ID - - from (integer): The start of the interval, must be within the past 30 days. - - to (integer): The end of the interval, must not exceed the current date. + - t0 (string): The start of the interval, must be within the past 30 days. Must be provided with t1. + - t1 (string): The end of the interval, must not exceed the current date. Must be provided with t0. + - from (integer): Legacy start of the interval in epoch seconds, must be within the past 30 days. Must be provided with to. + - to (integer): Legacy end of the interval in epoch seconds, must not exceed the current date. Must be provided with from. """ - kwargs = locals() - if "from_" in kwargs: - kwargs["from"] = kwargs.pop("from_") + kwargs.update(locals()) metadata = { "tags": ["secureConnect", "configure", "remoteAccessLogsExports"], @@ -909,6 +909,8 @@ def createOrganizationSecureConnectRemoteAccessLogsExport(self, organizationId: resource = f"/organizations/{organizationId}/secureConnect/remoteAccessLogsExports" body_params = [ + "t0", + "t1", "from", "to", ] diff --git a/meraki/aio/api/sm.py b/meraki/aio/api/sm.py index 1ac166f1..263da776 100644 --- a/meraki/aio/api/sm.py +++ b/meraki/aio/api/sm.py @@ -894,6 +894,379 @@ def getNetworkSmProfiles(self, networkId: str, **kwargs): return self._session.get(metadata, resource, params) + def getNetworkSmScripts(self, networkId: str): + """ + **List the scripts for this network** + https://developer.cisco.com/meraki/api-v1/#!get-network-sm-scripts + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["sm", "configure", "scripts"], + "operation": "getNetworkSmScripts", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sm/scripts" + + return self._session.get(metadata, resource) + + def createNetworkSmScript(self, networkId: str, name: str, platform: str, **kwargs): + """ + **Create a new script** + https://developer.cisco.com/meraki/api-v1/#!create-network-sm-script + + - networkId (string): Network ID + - name (string): Unique name to identify this script. + - platform (string): Platform that this script will run on. + - scope (string): The target scope of the script. (Either scope or targetGroupId must be present.) + - tags (array): The target tags of the script as an array of strings. Required if scope is one of withAny, withoutAny, withAll, withoutAll. + - targetGroupId (string): The tag target group ID that should be used to scope devices. Either scope or targetGroupId must be present. + - description (string): Description of this script. + - runAsUsername (string): Username that script should run as. + - externalSource (object): Properties for a script provided by a url instead of an upload + - upload (object): Properties for a script provided as an upload instead of a url + - schedule (object): When the script is intended to run + """ + + kwargs.update(locals()) + + if "platform" in kwargs and kwargs["platform"] is not None: + options = ["Windows", "macOS"] + assert kwargs["platform"] in options, ( + f'''"platform" cannot be "{kwargs["platform"]}", & must be set to one of: {options}''' + ) + if "scope" in kwargs: + options = ["all", "none", "withAll", "withAny", "withoutAll", "withoutAny"] + assert kwargs["scope"] in options, f'''"scope" cannot be "{kwargs["scope"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["sm", "configure", "scripts"], + "operation": "createNetworkSmScript", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sm/scripts" + + body_params = [ + "name", + "platform", + "scope", + "tags", + "targetGroupId", + "description", + "runAsUsername", + "externalSource", + "upload", + "schedule", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkSmScript: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def createNetworkSmScriptsJob(self, networkId: str, scriptId: str, **kwargs): + """ + **Create a job that will run a script on a set of devices** + https://developer.cisco.com/meraki/api-v1/#!create-network-sm-scripts-job + + - networkId (string): Network ID + - scriptId (string): ID of script that should be run on the matching devices + - deviceIds (array): List of device IDs to run that should run this script + - deviceFilter (string): Create job on all devices in-scope or devices that have failed to run this script + """ + + kwargs.update(locals()) + + if "deviceFilter" in kwargs: + options = ["All", "Failed"] + assert kwargs["deviceFilter"] in options, ( + f'''"deviceFilter" cannot be "{kwargs["deviceFilter"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["sm", "configure", "scripts", "jobs"], + "operation": "createNetworkSmScriptsJob", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sm/scripts/jobs" + + body_params = [ + "scriptId", + "deviceIds", + "deviceFilter", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkSmScriptsJob: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getNetworkSmScriptsJobsStatusesLatestByScriptByInterval(self, networkId: str, **kwargs): + """ + **List the latest script job statuses by script and by interval** + https://developer.cisco.com/meraki/api-v1/#!get-network-sm-scripts-jobs-statuses-latest-by-script-by-interval + + - networkId (string): Network ID + - scriptIds (array): List of script IDs to fetch statuses + - t0 (string): The beginning of the timespan for the data. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 180 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 180 days. The default is 1 day. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["sm", "configure", "scripts", "jobs", "statuses", "latest", "byScript", "byInterval"], + "operation": "getNetworkSmScriptsJobsStatusesLatestByScriptByInterval", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sm/scripts/jobs/statuses/latest/byScript/byInterval" + + query_params = [ + "scriptIds", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "scriptIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getNetworkSmScriptsJobsStatusesLatestByScriptByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getNetworkSmScriptsJobsStatusesLatestByScriptAndDevice( + self, networkId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List jobs for a given script and/or device** + https://developer.cisco.com/meraki/api-v1/#!get-network-sm-scripts-jobs-statuses-latest-by-script-and-device + + - networkId (string): Network 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 + - deviceId (string): Query parameter for filtering the list of script job statuses to those belonging to the specified deviceId. + - scriptId (string): Query parameter for filtering the list of script job statuses to those belonging to the specified script. + - inScopeOnly (boolean): If true, show only job statuses for scripts or devices that are in scope. This only applies when either deviceId or scriptId are given. + - status (string): Query parameter for filtering the list of job statuses to those having the specified status. + - sortOrder (string): Query parameter for specifying the direction of sorting to use for the given sortKey. This param is overridden if startingAfter or endingBefore is provided. + - sortKey (string): Query parameter to sort the script tasks by the value of the specified key. This param is overridden if startingAfter or endingBefore is provided. + - perPage (integer): Number of results to show per page. + - startingAfter (string): A statusId. Start the search cursor after the specified Status record. + - endingBefore (string): A statusId. Search backward with the cursor starting before the specified Status record. + """ + + kwargs.update(locals()) + + if "status" in kwargs: + options = [ + "cancelled", + "command failed", + "completed", + "created", + "enqueued", + "error", + "failed", + "pending", + "running", + "success", + "unknown", + ] + assert kwargs["status"] in options, ( + f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + if "sortKey" in kwargs: + options = ["completedAt", "createdAt", "enqueuedAt", "status", "updatedAt"] + assert kwargs["sortKey"] in options, ( + f'''"sortKey" cannot be "{kwargs["sortKey"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["sm", "configure", "scripts", "jobs", "statuses", "latest", "byScriptAndDevice"], + "operation": "getNetworkSmScriptsJobsStatusesLatestByScriptAndDevice", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sm/scripts/jobs/statuses/latest/byScriptAndDevice" + + query_params = [ + "deviceId", + "scriptId", + "inScopeOnly", + "status", + "sortOrder", + "sortKey", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getNetworkSmScriptsJobsStatusesLatestByScriptAndDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createNetworkSmScriptsUpload(self, networkId: str, size: str, **kwargs): + """ + **Creates an upload URL that can be used to upload a script** + https://developer.cisco.com/meraki/api-v1/#!create-network-sm-scripts-upload + + - networkId (string): Network ID + - size (string): Size of the file in bytes that will be uploaded. + """ + + kwargs = locals() + + metadata = { + "tags": ["sm", "configure", "scripts", "uploads"], + "operation": "createNetworkSmScriptsUpload", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sm/scripts/uploads" + + body_params = [ + "size", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkSmScriptsUpload: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getNetworkSmScript(self, networkId: str, scriptId: str): + """ + **Return a script** + https://developer.cisco.com/meraki/api-v1/#!get-network-sm-script + + - networkId (string): Network ID + - scriptId (string): Script ID + """ + + metadata = { + "tags": ["sm", "configure", "scripts"], + "operation": "getNetworkSmScript", + } + networkId = urllib.parse.quote(str(networkId), safe="") + scriptId = urllib.parse.quote(str(scriptId), safe="") + resource = f"/networks/{networkId}/sm/scripts/{scriptId}" + + return self._session.get(metadata, resource) + + def updateNetworkSmScript(self, networkId: str, scriptId: str, **kwargs): + """ + **Update an existing script** + https://developer.cisco.com/meraki/api-v1/#!update-network-sm-script + + - networkId (string): Network ID + - scriptId (string): Script ID + - name (string): Unique name to identify this script. + - platform (string): Platform that this script will run on. + - scope (string): The target scope of the script. (Either scope or targetGroupId must be present.) + - tags (array): The target tags of the script as an array of strings. Required if scope is one of withAny, withoutAny, withAll, withoutAll. + - targetGroupId (string): The tag target group ID that should be used to scope devices. Either scope or targetGroupId must be present. + - description (string): Description of this script. + - runAsUsername (string): Username that script should run as. + - externalSource (object): Properties for a script provided by a url instead of an upload + - upload (object): Properties for a script provided as an upload instead of a url + - schedule (object): When the script is intended to run + """ + + kwargs.update(locals()) + + if "platform" in kwargs and kwargs["platform"] is not None: + options = ["Windows", "macOS"] + assert kwargs["platform"] in options, ( + f'''"platform" cannot be "{kwargs["platform"]}", & must be set to one of: {options}''' + ) + if "scope" in kwargs: + options = ["all", "none", "withAll", "withAny", "withoutAll", "withoutAny"] + assert kwargs["scope"] in options, f'''"scope" cannot be "{kwargs["scope"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["sm", "configure", "scripts"], + "operation": "updateNetworkSmScript", + } + networkId = urllib.parse.quote(str(networkId), safe="") + scriptId = urllib.parse.quote(str(scriptId), safe="") + resource = f"/networks/{networkId}/sm/scripts/{scriptId}" + + body_params = [ + "name", + "platform", + "scope", + "tags", + "targetGroupId", + "description", + "runAsUsername", + "externalSource", + "upload", + "schedule", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSmScript: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteNetworkSmScript(self, networkId: str, scriptId: str): + """ + **Delete a script** + https://developer.cisco.com/meraki/api-v1/#!delete-network-sm-script + + - networkId (string): Network ID + - scriptId (string): Script ID + """ + + metadata = { + "tags": ["sm", "configure", "scripts"], + "operation": "deleteNetworkSmScript", + } + networkId = urllib.parse.quote(str(networkId), safe="") + scriptId = urllib.parse.quote(str(scriptId), safe="") + resource = f"/networks/{networkId}/sm/scripts/{scriptId}" + + return self._session.delete(metadata, resource) + def getNetworkSmTargetGroups(self, networkId: str, **kwargs): """ **List the target groups in this network** diff --git a/meraki/aio/api/switch.py b/meraki/aio/api/switch.py index ba0c021b..746bbcaa 100644 --- a/meraki/aio/api/switch.py +++ b/meraki/aio/api/switch.py @@ -1515,6 +1515,7 @@ def createNetworkSwitchLinkAggregation(self, networkId: str, **kwargs): - networkId (string): Network ID - switchPorts (array): Array of switch or stack ports for creating aggregation group. Minimum 2 and maximum 8 ports are supported. - switchProfilePorts (array): Array of switch profile ports for creating aggregation group. Minimum 2 and maximum 8 ports are supported. + - esiMhPairId (string): ESI-MH pair ID. Required when creating a downstream aggregation across ESI-MH pair member switches. """ kwargs.update(locals()) @@ -1529,6 +1530,7 @@ def createNetworkSwitchLinkAggregation(self, networkId: str, **kwargs): body_params = [ "switchPorts", "switchProfilePorts", + "esiMhPairId", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/aio/api/users.py b/meraki/aio/api/users.py index c75cffd1..c65a5ecb 100644 --- a/meraki/aio/api/users.py +++ b/meraki/aio/api/users.py @@ -252,7 +252,7 @@ def createOrganizationIamUsersIdp(self, organizationId: str, name: str, type: st if "type" in kwargs: options = ["Azure AD"] assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' - if "syncType" in kwargs: + if "syncType" in kwargs and kwargs["syncType"] is not None: options = ["proactive"] assert kwargs["syncType"] in options, ( f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' @@ -688,7 +688,7 @@ def updateOrganizationIamUsersIdp(self, organizationId: str, id: str, **kwargs): kwargs.update(locals()) - if "syncType" in kwargs: + if "syncType" in kwargs and kwargs["syncType"] is not None: options = ["proactive"] assert kwargs["syncType"] in options, ( f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index ff370888..d33b5d8a 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -3432,7 +3432,7 @@ def updateNetworkWirelessSsidOpenRoaming(self, networkId: str, number: str, **kw return self._session.put(metadata, resource, payload) - def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, number: str, static: dict, **kwargs): + def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, number: str, **kwargs): """ **Update the client exclusion status configuration for a given SSID** https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-policies-client-exclusion @@ -3440,9 +3440,10 @@ def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, numbe - networkId (string): Network ID - number (string): Number - static (object): Static client exclusion status + - dynamic (object): Dynamic client exclusion configuration """ - kwargs = locals() + kwargs.update(locals()) metadata = { "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion"], @@ -3454,6 +3455,7 @@ def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, numbe body_params = [ "static", + "dynamic", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -3471,7 +3473,7 @@ def updateNetworkWirelessSsidPoliciesClientExclusionStaticExclusions( self, networkId: str, number: str, macs: list, **kwargs ): """ - **Set the static client exclusion list for the given SSID** + **Replace the static client exclusion list for the given SSID (use PUT /exclusions)** https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-policies-client-exclusion-static-exclusions - networkId (string): Network ID @@ -3508,7 +3510,7 @@ def createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkAdd( self, networkId: str, number: str, macs: list, **kwargs ): """ - **Add a list of MAC addresses to the static client exclusion list for the given SSID** + **Add MAC addresses to the existing static client exclusion list for the given SSID (use POST /bulkAdd)** https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ssid-policies-client-exclusion-static-exclusions-bulk-add - networkId (string): Network ID @@ -3545,7 +3547,7 @@ def createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkRemove( self, networkId: str, number: str, macs: list, **kwargs ): """ - **Delete a list of MAC addresses from the static client exclusion list for the given SSID** + **Remove MAC addresses from the existing static client exclusion list for the given SSID (use POST /bulkRemove)** https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ssid-policies-client-exclusion-static-exclusions-bulk-remove - networkId (string): Network ID @@ -6039,6 +6041,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. + - insights (string): Insights version to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6054,6 +6057,11 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) + if "insights" in kwargs: + options = ["1", "2"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "insights", "byNetwork"], @@ -6069,6 +6077,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor "bands", "contributor", "subContributor", + "insights", "t0", "t1", "timespan", @@ -6099,82 +6108,6 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsV2ByNetwork( - self, organizationId: str, total_pages=1, direction="next", **kwargs - ): - """ - **Provides root-cause diagnostics for wireless successful connects experience by network.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-insights-v-2-by-network - - - 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): Filter results by network. - - serials (array): Filter results by device serial. - - ssidNumbers (array): Filter results by SSID number. - - bands (array): Filter results by band. - - contributor (string): Restrict RCA to a single contributor (assoc, auth, dhcp, dns). If omitted, all contributors are considered. - - subContributor (string): Restrict RCA to a single sub-contributor (failure reason). If omitted, all sub-contributors are considered. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - - 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()) - - if "contributor" in kwargs: - options = ["assoc", "auth", "dhcp", "dns"] - assert kwargs["contributor"] in options, ( - f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' - ) - - metadata = { - "tags": ["wireless", "configure", "experience", "successfulConnects", "insightsV2", "byNetwork"], - "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsV2ByNetwork", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/insightsV2/byNetwork" - - query_params = [ - "networkIds", - "serials", - "ssidNumbers", - "bands", - "contributor", - "subContributor", - "t0", - "t1", - "timespan", - "perPage", - "startingAfter", - "endingBefore", - ] - params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} - - array_params = [ - "networkIds", - "serials", - "ssidNumbers", - "bands", - ] - for k, v in kwargs.items(): - if k.strip() in array_params: - params[f"{k.strip()}[]"] = kwargs[f"{k}"] - params.pop(k.strip()) - - if self._session._validate_kwargs: - all_params = query_params + array_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning( - f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsV2ByNetwork: ignoring unrecognized kwargs: {invalid}" - ) - - return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): diff --git a/meraki/api/appliance.py b/meraki/api/appliance.py index 8d21afb7..f20e932a 100644 --- a/meraki/api/appliance.py +++ b/meraki/api/appliance.py @@ -40,10 +40,10 @@ def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): kwargs.update(locals()) - if "speed" in kwargs: + if "speed" in kwargs and kwargs["speed"] is not None: options = ["10", "100", "1000", "10000", "2500", "25000", "5000", "auto"] assert kwargs["speed"] in options, f'''"speed" cannot be "{kwargs["speed"]}", & must be set to one of: {options}''' - if "duplex" in kwargs: + if "duplex" in kwargs and kwargs["duplex"] is not None: options = ["auto", "full", "half"] assert kwargs["duplex"] in options, ( f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' @@ -94,10 +94,10 @@ def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs kwargs.update(locals()) - if "speed" in kwargs: + if "speed" in kwargs and kwargs["speed"] is not None: options = ["10", "100", "1000", "10000", "2500", "25000", "5000", "auto"] assert kwargs["speed"] in options, f'''"speed" cannot be "{kwargs["speed"]}", & must be set to one of: {options}''' - if "duplex" in kwargs: + if "duplex" in kwargs and kwargs["duplex"] is not None: options = ["auto", "full", "half"] assert kwargs["duplex"] in options, ( f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' @@ -1282,6 +1282,7 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybris-radius' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. - peerSgtCapable (boolean): If true, Peer SGT is enabled for traffic through this port. Applicable to trunk port only, not access port. - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this port is assigned to. + - sgt (object): Security Group Tag settings for the port. """ kwargs.update(locals()) @@ -1303,6 +1304,7 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): "accessPolicy", "peerSgtCapable", "adaptivePolicyGroupId", + "sgt", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2600,40 +2602,23 @@ def disableNetworkApplianceUmbrellaProtection(self, networkId: str): return self._session.delete(metadata, resource) - def enableNetworkApplianceUmbrellaProtection(self, networkId: str): - """ - **Enable umbrella protection for an MX network** - https://developer.cisco.com/meraki/api-v1/#!enable-network-appliance-umbrella-protection - - - networkId (string): Network ID - """ - - metadata = { - "tags": ["appliance", "configure", "umbrella"], - "operation": "enableNetworkApplianceUmbrellaProtection", - } - networkId = urllib.parse.quote(str(networkId), safe="") - resource = f"/networks/{networkId}/appliance/umbrella/enableProtection" - - return self._session.post(metadata, resource) - - def excludeNetworkApplianceUmbrellaDomains(self, networkId: str, domains: list, **kwargs): + def exclusionsNetworkApplianceUmbrellaDomains(self, networkId: str, domains: list, **kwargs): """ **Specify one or more domain names to be excluded from being routed to Cisco Umbrella.** - https://developer.cisco.com/meraki/api-v1/#!exclude-network-appliance-umbrella-domains + https://developer.cisco.com/meraki/api-v1/#!exclusions-network-appliance-umbrella-domains - networkId (string): Network ID - - domains (array): Array of domain names + - domains (array): Domain names to exclude from Umbrella DNS routing (e.g., 'example.com', 'corp.example.org'). Standard FQDNs only — wildcards are not supported. Values are lowercased before saving. Each call replaces the full exclusion list. """ kwargs = locals() metadata = { - "tags": ["appliance", "configure", "umbrella"], - "operation": "excludeNetworkApplianceUmbrellaDomains", + "tags": ["appliance", "configure", "umbrella", "domains"], + "operation": "exclusionsNetworkApplianceUmbrellaDomains", } networkId = urllib.parse.quote(str(networkId), safe="") - resource = f"/networks/{networkId}/appliance/umbrella/excludeDomains" + resource = f"/networks/{networkId}/appliance/umbrella/domains/exclusions" body_params = [ "domains", @@ -2645,11 +2630,28 @@ def excludeNetworkApplianceUmbrellaDomains(self, networkId: str, domains: list, invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( - f"excludeNetworkApplianceUmbrellaDomains: ignoring unrecognized kwargs: {invalid}" + f"exclusionsNetworkApplianceUmbrellaDomains: ignoring unrecognized kwargs: {invalid}" ) return self._session.put(metadata, resource, payload) + def enableNetworkApplianceUmbrellaProtection(self, networkId: str): + """ + **Enable umbrella protection for an MX network** + https://developer.cisco.com/meraki/api-v1/#!enable-network-appliance-umbrella-protection + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["appliance", "configure", "umbrella"], + "operation": "enableNetworkApplianceUmbrellaProtection", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/umbrella/enableProtection" + + return self._session.post(metadata, resource) + def policiesNetworkApplianceUmbrella(self, networkId: str, policyIds: list, **kwargs): """ **Update umbrella policies applied to MX network.** @@ -2683,7 +2685,7 @@ def policiesNetworkApplianceUmbrella(self, networkId: str, policyIds: list, **kw def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kwargs): """ - **Add one umbrella policy to your network.** + **Add one Cisco Umbrella DNS security policy to an MX network by policy ID** https://developer.cisco.com/meraki/api-v1/#!add-network-appliance-umbrella-policies - networkId (string): Network ID @@ -2714,7 +2716,7 @@ def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kw def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kwargs): """ - **Remove one umbrella policy from your network.** + **Remove one Cisco Umbrella DNS security policy from an MX network by policy ID** https://developer.cisco.com/meraki/api-v1/#!remove-network-appliance-umbrella-policies - networkId (string): Network ID @@ -2745,13 +2747,13 @@ def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, * return self._session.post(metadata, resource, payload) - def protectionNetworkApplianceUmbrella(self, networkId: str, enable: bool, **kwargs): + def protectionNetworkApplianceUmbrella(self, networkId: str, enabled: bool, **kwargs): """ - **Enable or disable umbrella protection for an MX network** + **Enable or disable umbrella protection for an appliance network** https://developer.cisco.com/meraki/api-v1/#!protection-network-appliance-umbrella - networkId (string): Network ID - - enable (boolean): Enable or disable umbrella protection + - enabled (boolean): Enable or disable umbrella protection """ kwargs = locals() @@ -2764,7 +2766,7 @@ def protectionNetworkApplianceUmbrella(self, networkId: str, enable: bool, **kwa resource = f"/networks/{networkId}/appliance/umbrella/protection" body_params = [ - "enable", + "enabled", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2887,6 +2889,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg - dhcpBootFilename (string): DHCP boot option for boot filename - dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties. - adaptivePolicyGroupId (string): Adaptive policy group ID this VLAN is assigned to. + - sgt (object): Security Group Tag settings for the VLAN. - vrf (object): VRF configuration on the VLAN - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -2935,6 +2938,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg "dhcpBootFilename", "dhcpOptions", "adaptivePolicyGroupId", + "sgt", "vrf", "uplinks", ] @@ -3043,6 +3047,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): - ipv6 (object): IPv6 configuration on the VLAN - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this VLAN is assigned to. + - sgt (object): Security Group Tag settings for the VLAN. - vrf (object): VRF configuration on the VLAN - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -3095,6 +3100,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): "ipv6", "mandatoryDhcp", "adaptivePolicyGroupId", + "sgt", "vrf", "uplinks", ] @@ -3245,6 +3251,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw - hubs (array): The list of VPN hubs, in order of preference. In spoke mode, at least 1 hub is required. - subnets (array): The list of subnets and their VPN presence. - peerSgtCapable (boolean): Whether or not Peer SGT is enabled for traffic to this VPN peer. + - sgt (object): Security Group Tag settings for the VPN peer. - subnet (object): Configuration of subnet features - hostTranslations (array): The list of VPN host translations. Host translations are supported starting from MX firmware version 26.1.2 """ @@ -3267,6 +3274,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw "hubs", "subnets", "peerSgtCapable", + "sgt", "subnet", "hostTranslations", ] @@ -3451,6 +3459,71 @@ def getOrganizationApplianceDevicesInterfacesPortsByDevice(self, organizationId: return self._session.get(metadata, resource, params) + def getOrganizationApplianceDevicesPortsTransceiversReadingsHistoryByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Return time-series digital optical monitoring (DOM) readings for ports on each DOM-enabled Catalyst appliance in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-ports-transceivers-readings-history-by-device + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10. Default is 5. + - 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. + - 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 30 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 30 days. The default is 1 day. If interval is provided, the timespan will be autocalculated. + - interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided. + - networkIds (array): Networks for which information should be gathered. + - serials (array): Optional parameter to filter usage by appliance serial. + - portIds (array): Optional parameter to filter usage by port ID. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "devices", "ports", "transceivers", "readings", "history", "byDevice"], + "operation": "getOrganizationApplianceDevicesPortsTransceiversReadingsHistoryByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/devices/ports/transceivers/readings/history/byDevice" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "t0", + "t1", + "timespan", + "interval", + "networkIds", + "serials", + "portIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + "portIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceDevicesPortsTransceiversReadingsHistoryByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceDevicesRedundancyByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -4229,6 +4302,66 @@ def getOrganizationApplianceFirewallMulticastForwardingByNetwork( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceInterfacesPacketsOverviewsByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns packet counter overviews for all interfaces on Secure Routers in the organization, including totals and average rates by packet type over the requested timespan.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-interfaces-packets-overviews-by-device + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 10. + - 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. + - networkIds (array): Optional parameter to filter Secure Routers in the provided networks + - serials (array): Optional parameter to filter Secure Routers by their serial numbers + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "monitor", "interfaces", "packets", "overviews", "byDevice"], + "operation": "getOrganizationApplianceInterfacesPacketsOverviewsByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/interfaces/packets/overviews/byDevice" + + query_params = [ + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serials", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceInterfacesPacketsOverviewsByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceRoutingVrfsSettings(self, organizationId: str): """ **Return the VRF setting for an organization.** diff --git a/meraki/api/batch/appliance.py b/meraki/api/batch/appliance.py index d70c2042..eac132da 100644 --- a/meraki/api/batch/appliance.py +++ b/meraki/api/batch/appliance.py @@ -22,10 +22,10 @@ def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): kwargs.update(locals()) - if "speed" in kwargs: + if "speed" in kwargs and kwargs["speed"] is not None: options = ["10", "100", "1000", "10000", "2500", "25000", "5000", "auto"] assert kwargs["speed"] in options, f'''"speed" cannot be "{kwargs["speed"]}", & must be set to one of: {options}''' - if "duplex" in kwargs: + if "duplex" in kwargs and kwargs["duplex"] is not None: options = ["auto", "full", "half"] assert kwargs["duplex"] in options, ( f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' @@ -68,10 +68,10 @@ def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs kwargs.update(locals()) - if "speed" in kwargs: + if "speed" in kwargs and kwargs["speed"] is not None: options = ["10", "100", "1000", "10000", "2500", "25000", "5000", "auto"] assert kwargs["speed"] in options, f'''"speed" cannot be "{kwargs["speed"]}", & must be set to one of: {options}''' - if "duplex" in kwargs: + if "duplex" in kwargs and kwargs["duplex"] is not None: options = ["auto", "full", "half"] assert kwargs["duplex"] in options, ( f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' @@ -385,6 +385,7 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybris-radius' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. - peerSgtCapable (boolean): If true, Peer SGT is enabled for traffic through this port. Applicable to trunk port only, not access port. - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this port is assigned to. + - sgt (object): Security Group Tag settings for the port. """ kwargs.update(locals()) @@ -402,6 +403,7 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): "accessPolicy", "peerSgtCapable", "adaptivePolicyGroupId", + "sgt", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -997,45 +999,45 @@ def disableNetworkApplianceUmbrellaProtection(self, networkId: str): } return action - def enableNetworkApplianceUmbrellaProtection(self, networkId: str): + def exclusionsNetworkApplianceUmbrellaDomains(self, networkId: str, domains: list, **kwargs): """ - **Enable umbrella protection for an MX network** - https://developer.cisco.com/meraki/api-v1/#!enable-network-appliance-umbrella-protection + **Specify one or more domain names to be excluded from being routed to Cisco Umbrella.** + https://developer.cisco.com/meraki/api-v1/#!exclusions-network-appliance-umbrella-domains - networkId (string): Network ID + - domains (array): Domain names to exclude from Umbrella DNS routing (e.g., 'example.com', 'corp.example.org'). Standard FQDNs only — wildcards are not supported. Values are lowercased before saving. Each call replaces the full exclusion list. """ + kwargs = locals() + networkId = urllib.parse.quote(networkId, safe="") - resource = f"/networks/{networkId}/appliance/umbrella/enableProtection" + resource = f"/networks/{networkId}/appliance/umbrella/domains/exclusions" + body_params = [ + "domains", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { "resource": resource, "operation": "action", + "body": payload, } return action - def excludeNetworkApplianceUmbrellaDomains(self, networkId: str, domains: list, **kwargs): + def enableNetworkApplianceUmbrellaProtection(self, networkId: str): """ - **Specify one or more domain names to be excluded from being routed to Cisco Umbrella.** - https://developer.cisco.com/meraki/api-v1/#!exclude-network-appliance-umbrella-domains + **Enable umbrella protection for an MX network** + https://developer.cisco.com/meraki/api-v1/#!enable-network-appliance-umbrella-protection - networkId (string): Network ID - - domains (array): Array of domain names """ - kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") - resource = f"/networks/{networkId}/appliance/umbrella/excludeDomains" + resource = f"/networks/{networkId}/appliance/umbrella/enableProtection" - body_params = [ - "domains", - ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { "resource": resource, "operation": "action", - "body": payload, } return action @@ -1066,7 +1068,7 @@ def policiesNetworkApplianceUmbrella(self, networkId: str, policyIds: list, **kw def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kwargs): """ - **Add one umbrella policy to your network.** + **Add one Cisco Umbrella DNS security policy to an MX network by policy ID. Idempotent — if the policy is already applied, the request succeeds and returns the current policy set unchanged.** https://developer.cisco.com/meraki/api-v1/#!add-network-appliance-umbrella-policies - networkId (string): Network ID @@ -1091,7 +1093,7 @@ def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kw def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kwargs): """ - **Remove one umbrella policy from your network.** + **Remove one Cisco Umbrella DNS security policy from an MX network by policy ID. Returns 204 No Content on success. Behavior when the policy is not currently applied depends on the Cisco Umbrella API response.** https://developer.cisco.com/meraki/api-v1/#!remove-network-appliance-umbrella-policies - networkId (string): Network ID @@ -1114,13 +1116,13 @@ def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, * } return action - def protectionNetworkApplianceUmbrella(self, networkId: str, enable: bool, **kwargs): + def protectionNetworkApplianceUmbrella(self, networkId: str, enabled: bool, **kwargs): """ - **Enable or disable umbrella protection for an MX network. When disabling, the umbrella property will be omitted from the response.** + **Enable or disable umbrella protection for an appliance network. When 'enabled' is false, 'umbrella.organization.id' and 'umbrella.origin.id' are null in the response.** https://developer.cisco.com/meraki/api-v1/#!protection-network-appliance-umbrella - networkId (string): Network ID - - enable (boolean): Enable or disable umbrella protection + - enabled (boolean): Enable or disable umbrella protection """ kwargs = locals() @@ -1129,7 +1131,7 @@ def protectionNetworkApplianceUmbrella(self, networkId: str, enable: bool, **kwa resource = f"/networks/{networkId}/appliance/umbrella/protection" body_params = [ - "enable", + "enabled", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -1188,6 +1190,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg - dhcpBootFilename (string): DHCP boot option for boot filename - dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties. - adaptivePolicyGroupId (string): Adaptive policy group ID this VLAN is assigned to. + - sgt (object): Security Group Tag settings for the VLAN. - vrf (object): VRF configuration on the VLAN - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -1232,6 +1235,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg "dhcpBootFilename", "dhcpOptions", "adaptivePolicyGroupId", + "sgt", "vrf", "uplinks", ] @@ -1296,6 +1300,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): - ipv6 (object): IPv6 configuration on the VLAN - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this VLAN is assigned to. + - sgt (object): Security Group Tag settings for the VLAN. - vrf (object): VRF configuration on the VLAN - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -1344,6 +1349,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): "ipv6", "mandatoryDhcp", "adaptivePolicyGroupId", + "sgt", "vrf", "uplinks", ] @@ -1444,6 +1450,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw - hubs (array): The list of VPN hubs, in order of preference. In spoke mode, at least 1 hub is required. - subnets (array): The list of subnets and their VPN presence. - peerSgtCapable (boolean): Whether or not Peer SGT is enabled for traffic to this VPN peer. + - sgt (object): Security Group Tag settings for the VPN peer. - subnet (object): Configuration of subnet features - hostTranslations (array): The list of VPN host translations. Host translations are supported starting from MX firmware version 26.1.2 """ @@ -1462,6 +1469,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw "hubs", "subnets", "peerSgtCapable", + "sgt", "subnet", "hostTranslations", ] diff --git a/meraki/api/batch/devices.py b/meraki/api/batch/devices.py index e444d87b..c3c5b134 100644 --- a/meraki/api/batch/devices.py +++ b/meraki/api/batch/devices.py @@ -188,10 +188,10 @@ def createDeviceLiveToolsLedsBlink(self, serial: str, duration: int, **kwargs): } return action - def createDeviceLiveToolsPortStatus(self, serial: str, **kwargs): + def createDeviceLiveToolsPortsStatus(self, serial: str, **kwargs): """ **Enqueue a job to retrieve port status for a device. This endpoint has a sustained rate limit of one request every five seconds per device, with an allowed burst of five requests.** - https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-port-status + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-ports-status - serial (string): Serial - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret @@ -200,7 +200,7 @@ def createDeviceLiveToolsPortStatus(self, serial: str, **kwargs): kwargs.update(locals()) serial = urllib.parse.quote(serial, safe="") - resource = f"/devices/{serial}/liveTools/portStatus" + resource = f"/devices/{serial}/liveTools/ports/status" body_params = [ "callback", @@ -240,7 +240,7 @@ def createDeviceLiveToolsReboot(self, serial: str, **kwargs): def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): """ - **Enqueue a job to perform a routing table lookup request for the device. Only Cisco routers are supported. Any combination of search filters can be applied.** + **Enqueue a job to perform a routing table lookup request for a device. The routing table lookup request fetches a specific set of routes based on filters. Any combination of search filters can be applied. Only Cisco Secure Routers are supported.** https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table-lookup - serial (string): Serial @@ -293,7 +293,7 @@ def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): def createDeviceLiveToolsRoutingTableSummary(self, serial: str, **kwargs): """ - **Enqueue a job to perform a routing table summary request for the device. Only Cisco routers are supported.** + **Enqueue a routing table summary job for a device. The job fetches summary data such as route counts by VRF and protocol. Only Cisco Secure Routers are supported.** https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table-summary - serial (string): Serial diff --git a/meraki/api/batch/sm.py b/meraki/api/batch/sm.py index 784dd966..738e1498 100644 --- a/meraki/api/batch/sm.py +++ b/meraki/api/batch/sm.py @@ -5,6 +5,166 @@ class ActionBatchSm(object): def __init__(self): super(ActionBatchSm, self).__init__() + def createNetworkSmScript(self, networkId: str, name: str, platform: str, **kwargs): + """ + **Create a new script** + https://developer.cisco.com/meraki/api-v1/#!create-network-sm-script + + - networkId (string): Network ID + - name (string): Unique name to identify this script. + - platform (string): Platform that this script will run on. + - scope (string): The target scope of the script. (Either scope or targetGroupId must be present.) + - tags (array): The target tags of the script as an array of strings. Required if scope is one of withAny, withoutAny, withAll, withoutAll. + - targetGroupId (string): The tag target group ID that should be used to scope devices. Either scope or targetGroupId must be present. + - description (string): Description of this script. + - runAsUsername (string): Username that script should run as. + - externalSource (object): Properties for a script provided by a url instead of an upload + - upload (object): Properties for a script provided as an upload instead of a url + - schedule (object): When the script is intended to run + """ + + kwargs.update(locals()) + + if "platform" in kwargs and kwargs["platform"] is not None: + options = ["Windows", "macOS"] + assert kwargs["platform"] in options, ( + f'''"platform" cannot be "{kwargs["platform"]}", & must be set to one of: {options}''' + ) + if "scope" in kwargs: + options = ["all", "none", "withAll", "withAny", "withoutAll", "withoutAny"] + assert kwargs["scope"] in options, f'''"scope" cannot be "{kwargs["scope"]}", & must be set to one of: {options}''' + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/sm/scripts" + + body_params = [ + "name", + "platform", + "scope", + "tags", + "targetGroupId", + "description", + "runAsUsername", + "externalSource", + "upload", + "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 createNetworkSmScriptsJob(self, networkId: str, scriptId: str, **kwargs): + """ + **Create a job that will run a script on a set of devices** + https://developer.cisco.com/meraki/api-v1/#!create-network-sm-scripts-job + + - networkId (string): Network ID + - scriptId (string): ID of script that should be run on the matching devices + - deviceIds (array): List of device IDs to run that should run this script + - deviceFilter (string): Create job on all devices in-scope or devices that have failed to run this script + """ + + kwargs.update(locals()) + + if "deviceFilter" in kwargs: + options = ["All", "Failed"] + assert kwargs["deviceFilter"] in options, ( + f'''"deviceFilter" cannot be "{kwargs["deviceFilter"]}", & must be set to one of: {options}''' + ) + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/sm/scripts/jobs" + + body_params = [ + "scriptId", + "deviceIds", + "deviceFilter", + ] + 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 updateNetworkSmScript(self, networkId: str, scriptId: str, **kwargs): + """ + **Update an existing script** + https://developer.cisco.com/meraki/api-v1/#!update-network-sm-script + + - networkId (string): Network ID + - scriptId (string): Script ID + - name (string): Unique name to identify this script. + - platform (string): Platform that this script will run on. + - scope (string): The target scope of the script. (Either scope or targetGroupId must be present.) + - tags (array): The target tags of the script as an array of strings. Required if scope is one of withAny, withoutAny, withAll, withoutAll. + - targetGroupId (string): The tag target group ID that should be used to scope devices. Either scope or targetGroupId must be present. + - description (string): Description of this script. + - runAsUsername (string): Username that script should run as. + - externalSource (object): Properties for a script provided by a url instead of an upload + - upload (object): Properties for a script provided as an upload instead of a url + - schedule (object): When the script is intended to run + """ + + kwargs.update(locals()) + + if "platform" in kwargs and kwargs["platform"] is not None: + options = ["Windows", "macOS"] + assert kwargs["platform"] in options, ( + f'''"platform" cannot be "{kwargs["platform"]}", & must be set to one of: {options}''' + ) + if "scope" in kwargs: + options = ["all", "none", "withAll", "withAny", "withoutAll", "withoutAny"] + assert kwargs["scope"] in options, f'''"scope" cannot be "{kwargs["scope"]}", & must be set to one of: {options}''' + + networkId = urllib.parse.quote(networkId, safe="") + scriptId = urllib.parse.quote(scriptId, safe="") + resource = f"/networks/{networkId}/sm/scripts/{scriptId}" + + body_params = [ + "name", + "platform", + "scope", + "tags", + "targetGroupId", + "description", + "runAsUsername", + "externalSource", + "upload", + "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 deleteNetworkSmScript(self, networkId: str, scriptId: str): + """ + **Delete a script** + https://developer.cisco.com/meraki/api-v1/#!delete-network-sm-script + + - networkId (string): Network ID + - scriptId (string): Script ID + """ + + networkId = urllib.parse.quote(networkId, safe="") + scriptId = urllib.parse.quote(scriptId, safe="") + resource = f"/networks/{networkId}/sm/scripts/{scriptId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def deleteNetworkSmUserAccessDevice(self, networkId: str, userAccessDeviceId: str): """ **Delete a User Access Device** diff --git a/meraki/api/batch/switch.py b/meraki/api/batch/switch.py index cca6ece9..71d35164 100644 --- a/meraki/api/batch/switch.py +++ b/meraki/api/batch/switch.py @@ -862,6 +862,7 @@ def createNetworkSwitchLinkAggregation(self, networkId: str, **kwargs): - networkId (string): Network ID - switchPorts (array): Array of switch or stack ports for creating aggregation group. Minimum 2 and maximum 8 ports are supported. - switchProfilePorts (array): Array of switch profile ports for creating aggregation group. Minimum 2 and maximum 8 ports are supported. + - esiMhPairId (string): ESI-MH pair ID. Required when creating a downstream aggregation across ESI-MH pair member switches. """ kwargs.update(locals()) @@ -872,6 +873,7 @@ def createNetworkSwitchLinkAggregation(self, networkId: str, **kwargs): body_params = [ "switchPorts", "switchProfilePorts", + "esiMhPairId", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { diff --git a/meraki/api/batch/users.py b/meraki/api/batch/users.py index b8dfbfdc..a194ca60 100644 --- a/meraki/api/batch/users.py +++ b/meraki/api/batch/users.py @@ -137,7 +137,7 @@ def createOrganizationIamUsersIdp(self, organizationId: str, name: str, type: st if "type" in kwargs: options = ["Azure AD"] assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' - if "syncType" in kwargs: + if "syncType" in kwargs and kwargs["syncType"] is not None: options = ["proactive"] assert kwargs["syncType"] in options, ( f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' @@ -315,7 +315,7 @@ def updateOrganizationIamUsersIdp(self, organizationId: str, id: str, **kwargs): kwargs.update(locals()) - if "syncType" in kwargs: + if "syncType" in kwargs and kwargs["syncType"] is not None: options = ["proactive"] assert kwargs["syncType"] in options, ( f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' diff --git a/meraki/api/batch/wireless.py b/meraki/api/batch/wireless.py index e7ba6a1c..ca73d367 100644 --- a/meraki/api/batch/wireless.py +++ b/meraki/api/batch/wireless.py @@ -1393,7 +1393,7 @@ def updateNetworkWirelessSsidOpenRoaming(self, networkId: str, number: str, **kw } return action - def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, number: str, static: dict, **kwargs): + def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, number: str, **kwargs): """ **Update the client exclusion status configuration for a given SSID** https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-policies-client-exclusion @@ -1401,9 +1401,10 @@ def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, numbe - networkId (string): Network ID - number (string): Number - static (object): Static client exclusion status + - dynamic (object): Dynamic client exclusion configuration """ - kwargs = locals() + kwargs.update(locals()) networkId = urllib.parse.quote(networkId, safe="") number = urllib.parse.quote(number, safe="") @@ -1411,6 +1412,7 @@ def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, numbe body_params = [ "static", + "dynamic", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -1424,7 +1426,7 @@ def updateNetworkWirelessSsidPoliciesClientExclusionStaticExclusions( self, networkId: str, number: str, macs: list, **kwargs ): """ - **Set the static client exclusion list for the given SSID** + **Replace the static client exclusion list for the given SSID (use PUT /exclusions)** https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-policies-client-exclusion-static-exclusions - networkId (string): Network ID @@ -1453,7 +1455,7 @@ def createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkAdd( self, networkId: str, number: str, macs: list, **kwargs ): """ - **Add a list of MAC addresses to the static client exclusion list for the given SSID** + **Add MAC addresses to the existing static client exclusion list for the given SSID (use POST /bulkAdd)** https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ssid-policies-client-exclusion-static-exclusions-bulk-add - networkId (string): Network ID @@ -1482,7 +1484,7 @@ def createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkRemove( self, networkId: str, number: str, macs: list, **kwargs ): """ - **Delete a list of MAC addresses from the static client exclusion list for the given SSID** + **Remove MAC addresses from the existing static client exclusion list for the given SSID (use POST /bulkRemove)** https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ssid-policies-client-exclusion-static-exclusions-bulk-remove - networkId (string): Network ID diff --git a/meraki/api/campusGateway.py b/meraki/api/campusGateway.py index e2a279d1..cc456d95 100644 --- a/meraki/api/campusGateway.py +++ b/meraki/api/campusGateway.py @@ -408,6 +408,7 @@ def getOrganizationCampusGatewayClustersNetworksOverviews( - clusterIds (array): Optional parameter to filter by MCG cluster IDs. This filter uses multiple exact matches. - siteIds (array): Optional parameter to filter by site IDs. This filter uses multiple exact matches. - networkIds (array): Optional parameter to filter networks. This filter uses multiple exact matches. + - tunnelingSources (array): Optional parameter to filter networks by tunneling source. 'configured' returns networks explicitly set up to tunnel through the campus gateway. 'roaming' returns networks tunneling due to AP roaming or disaster recovery. 'roaming' is only effective when 'clusterIds' is also provided; without 'clusterIds', the filter defaults to configured-only behavior. Defaults to 'configured' if omitted. - search (string): Optional parameter to filter networks by wireless network name. This filter uses case-insensitive substring matching. - sortBy (string): Optional parameter to sort results. Default is 'name'. Use 'siteName' to sort by site name. - sortOrder (string): Optional parameter to specify sort direction. Default is 'asc'. @@ -440,6 +441,7 @@ def getOrganizationCampusGatewayClustersNetworksOverviews( "clusterIds", "siteIds", "networkIds", + "tunnelingSources", "search", "sortBy", "sortOrder", @@ -453,6 +455,7 @@ def getOrganizationCampusGatewayClustersNetworksOverviews( "clusterIds", "siteIds", "networkIds", + "tunnelingSources", ] for k, v in kwargs.items(): if k.strip() in array_params: diff --git a/meraki/api/devices.py b/meraki/api/devices.py index b3e059c3..e1f59096 100644 --- a/meraki/api/devices.py +++ b/meraki/api/devices.py @@ -862,25 +862,27 @@ def getDeviceLiveToolsPingDevice(self, serial: str, id: str): return self._session.get(metadata, resource) - def createDeviceLiveToolsPortStatus(self, serial: str, **kwargs): + def createDeviceLiveToolsPortsCycle(self, serial: str, ports: list, **kwargs): """ - **Enqueue a job to retrieve port status for a device** - https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-port-status + **Enqueue a job to perform a cycle port for the device on the specified ports** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-ports-cycle - serial (string): Serial + - ports (array): A list of ports to cycle. For Catalyst switches, IOS interface names are also supported, such as "GigabitEthernet1/0/8", "Gi1/0/8", or even "1/0/8". - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ kwargs.update(locals()) metadata = { - "tags": ["devices", "liveTools", "portStatus"], - "operation": "createDeviceLiveToolsPortStatus", + "tags": ["devices", "liveTools", "ports", "cycle"], + "operation": "createDeviceLiveToolsPortsCycle", } serial = urllib.parse.quote(str(serial), safe="") - resource = f"/devices/{serial}/liveTools/portStatus" + resource = f"/devices/{serial}/liveTools/ports/cycle" body_params = [ + "ports", "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -889,50 +891,48 @@ def createDeviceLiveToolsPortStatus(self, serial: str, **kwargs): all_params = [] + body_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"createDeviceLiveToolsPortStatus: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning(f"createDeviceLiveToolsPortsCycle: ignoring unrecognized kwargs: {invalid}") return self._session.post(metadata, resource, payload) - def getDeviceLiveToolsPortStatus(self, serial: str, portStatusId: str): + def getDeviceLiveToolsPortsCycle(self, serial: str, id: str): """ - **Return a port status live tool job.** - https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-port-status + **Return a cycle port live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-ports-cycle - serial (string): Serial - - portStatusId (string): Port status ID + - id (string): ID """ metadata = { - "tags": ["devices", "liveTools", "portStatus"], - "operation": "getDeviceLiveToolsPortStatus", + "tags": ["devices", "liveTools", "ports", "cycle"], + "operation": "getDeviceLiveToolsPortsCycle", } serial = urllib.parse.quote(str(serial), safe="") - portStatusId = urllib.parse.quote(str(portStatusId), safe="") - resource = f"/devices/{serial}/liveTools/portStatus/{portStatusId}" + id = urllib.parse.quote(str(id), safe="") + resource = f"/devices/{serial}/liveTools/ports/cycle/{id}" return self._session.get(metadata, resource) - def createDeviceLiveToolsPortsCycle(self, serial: str, ports: list, **kwargs): + def createDeviceLiveToolsPortsStatus(self, serial: str, **kwargs): """ - **Enqueue a job to perform a cycle port for the device on the specified ports** - https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-ports-cycle + **Enqueue a job to retrieve port status for a device** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-ports-status - serial (string): Serial - - ports (array): A list of ports to cycle. For Catalyst switches, IOS interface names are also supported, such as "GigabitEthernet1/0/8", "Gi1/0/8", or even "1/0/8". - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ kwargs.update(locals()) metadata = { - "tags": ["devices", "liveTools", "ports", "cycle"], - "operation": "createDeviceLiveToolsPortsCycle", + "tags": ["devices", "liveTools", "ports", "status"], + "operation": "createDeviceLiveToolsPortsStatus", } serial = urllib.parse.quote(str(serial), safe="") - resource = f"/devices/{serial}/liveTools/ports/cycle" + resource = f"/devices/{serial}/liveTools/ports/status" body_params = [ - "ports", "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -941,26 +941,26 @@ def createDeviceLiveToolsPortsCycle(self, serial: str, ports: list, **kwargs): all_params = [] + body_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: - self._session._logger.warning(f"createDeviceLiveToolsPortsCycle: ignoring unrecognized kwargs: {invalid}") + self._session._logger.warning(f"createDeviceLiveToolsPortsStatus: ignoring unrecognized kwargs: {invalid}") return self._session.post(metadata, resource, payload) - def getDeviceLiveToolsPortsCycle(self, serial: str, id: str): + def getDeviceLiveToolsPortsStatus(self, serial: str, jobId: str): """ - **Return a cycle port live tool job.** - https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-ports-cycle + **Return a port status live tool job.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-ports-status - serial (string): Serial - - id (string): ID + - jobId (string): Job ID """ metadata = { - "tags": ["devices", "liveTools", "ports", "cycle"], - "operation": "getDeviceLiveToolsPortsCycle", + "tags": ["devices", "liveTools", "ports", "status"], + "operation": "getDeviceLiveToolsPortsStatus", } serial = urllib.parse.quote(str(serial), safe="") - id = urllib.parse.quote(str(id), safe="") - resource = f"/devices/{serial}/liveTools/ports/cycle/{id}" + jobId = urllib.parse.quote(str(jobId), safe="") + resource = f"/devices/{serial}/liveTools/ports/status/{jobId}" return self._session.get(metadata, resource) @@ -1047,7 +1047,7 @@ def createDeviceLiveToolsRoutingTable(self, serial: str, **kwargs): def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): """ - **Enqueue a job to perform a routing table lookup request for the device** + **Enqueue a job to perform a routing table lookup request for a device** https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table-lookup - serial (string): Serial @@ -1108,7 +1108,7 @@ def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): def getDeviceLiveToolsRoutingTableLookup(self, serial: str, id: str): """ - **Return a routing table live tool lookup job.** + **Return a routing table live tool lookup job for a device** https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-routing-table-lookup - serial (string): Serial @@ -1127,7 +1127,7 @@ def getDeviceLiveToolsRoutingTableLookup(self, serial: str, id: str): def createDeviceLiveToolsRoutingTableSummary(self, serial: str, **kwargs): """ - **Enqueue a job to perform a routing table summary request for the device** + **Enqueue a routing table summary job for a device** https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table-summary - serial (string): Serial @@ -1160,7 +1160,7 @@ def createDeviceLiveToolsRoutingTableSummary(self, serial: str, **kwargs): def getDeviceLiveToolsRoutingTableSummary(self, serial: str, id: str): """ - **Return a routing table live tool summary job.** + **Return the status and result of a routing table summary job** https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-routing-table-summary - serial (string): Serial diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index a7bbcacd..080ddf3d 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -3691,6 +3691,23 @@ def deleteOrganizationAuthRadiusServer(self, organizationId: str, serverId: str) return self._session.delete(metadata, resource) + def codeOrganizationAutomateIdentity(self, organizationId: str): + """ + **Generate a single use short lived code that can be used to retrieve the identity of the current user in the organization.** + https://developer.cisco.com/meraki/api-v1/#!code-organization-automate-identity + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "automate", "identity"], + "operation": "codeOrganizationAutomateIdentity", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/automate/identity/code" + + return self._session.post(metadata, resource) + def getOrganizationBrandingPolicies(self, organizationId: str): """ **List the branding policies of an organization** diff --git a/meraki/api/secureConnect.py b/meraki/api/secureConnect.py index a3a6f7fe..75a773ac 100644 --- a/meraki/api/secureConnect.py +++ b/meraki/api/secureConnect.py @@ -887,19 +887,19 @@ def getOrganizationSecureConnectRemoteAccessLogsExports( return self._session.get_pages(metadata, resource, params, total_pages, direction) - def createOrganizationSecureConnectRemoteAccessLogsExport(self, organizationId: str, from_: int, to: int, **kwargs): + def createOrganizationSecureConnectRemoteAccessLogsExport(self, organizationId: str, **kwargs): """ - **Creates a export for a provided timestamp interval.** + **Creates an export for a provided timestamp interval.** https://developer.cisco.com/meraki/api-v1/#!create-organization-secure-connect-remote-access-logs-export - organizationId (string): Organization ID - - from (integer): The start of the interval, must be within the past 30 days. - - to (integer): The end of the interval, must not exceed the current date. + - t0 (string): The start of the interval, must be within the past 30 days. Must be provided with t1. + - t1 (string): The end of the interval, must not exceed the current date. Must be provided with t0. + - from (integer): Legacy start of the interval in epoch seconds, must be within the past 30 days. Must be provided with to. + - to (integer): Legacy end of the interval in epoch seconds, must not exceed the current date. Must be provided with from. """ - kwargs = locals() - if "from_" in kwargs: - kwargs["from"] = kwargs.pop("from_") + kwargs.update(locals()) metadata = { "tags": ["secureConnect", "configure", "remoteAccessLogsExports"], @@ -909,6 +909,8 @@ def createOrganizationSecureConnectRemoteAccessLogsExport(self, organizationId: resource = f"/organizations/{organizationId}/secureConnect/remoteAccessLogsExports" body_params = [ + "t0", + "t1", "from", "to", ] diff --git a/meraki/api/sm.py b/meraki/api/sm.py index af8fcfa5..e4f811c1 100644 --- a/meraki/api/sm.py +++ b/meraki/api/sm.py @@ -894,6 +894,379 @@ def getNetworkSmProfiles(self, networkId: str, **kwargs): return self._session.get(metadata, resource, params) + def getNetworkSmScripts(self, networkId: str): + """ + **List the scripts for this network** + https://developer.cisco.com/meraki/api-v1/#!get-network-sm-scripts + + - networkId (string): Network ID + """ + + metadata = { + "tags": ["sm", "configure", "scripts"], + "operation": "getNetworkSmScripts", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sm/scripts" + + return self._session.get(metadata, resource) + + def createNetworkSmScript(self, networkId: str, name: str, platform: str, **kwargs): + """ + **Create a new script** + https://developer.cisco.com/meraki/api-v1/#!create-network-sm-script + + - networkId (string): Network ID + - name (string): Unique name to identify this script. + - platform (string): Platform that this script will run on. + - scope (string): The target scope of the script. (Either scope or targetGroupId must be present.) + - tags (array): The target tags of the script as an array of strings. Required if scope is one of withAny, withoutAny, withAll, withoutAll. + - targetGroupId (string): The tag target group ID that should be used to scope devices. Either scope or targetGroupId must be present. + - description (string): Description of this script. + - runAsUsername (string): Username that script should run as. + - externalSource (object): Properties for a script provided by a url instead of an upload + - upload (object): Properties for a script provided as an upload instead of a url + - schedule (object): When the script is intended to run + """ + + kwargs.update(locals()) + + if "platform" in kwargs and kwargs["platform"] is not None: + options = ["Windows", "macOS"] + assert kwargs["platform"] in options, ( + f'''"platform" cannot be "{kwargs["platform"]}", & must be set to one of: {options}''' + ) + if "scope" in kwargs: + options = ["all", "none", "withAll", "withAny", "withoutAll", "withoutAny"] + assert kwargs["scope"] in options, f'''"scope" cannot be "{kwargs["scope"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["sm", "configure", "scripts"], + "operation": "createNetworkSmScript", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sm/scripts" + + body_params = [ + "name", + "platform", + "scope", + "tags", + "targetGroupId", + "description", + "runAsUsername", + "externalSource", + "upload", + "schedule", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkSmScript: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def createNetworkSmScriptsJob(self, networkId: str, scriptId: str, **kwargs): + """ + **Create a job that will run a script on a set of devices** + https://developer.cisco.com/meraki/api-v1/#!create-network-sm-scripts-job + + - networkId (string): Network ID + - scriptId (string): ID of script that should be run on the matching devices + - deviceIds (array): List of device IDs to run that should run this script + - deviceFilter (string): Create job on all devices in-scope or devices that have failed to run this script + """ + + kwargs.update(locals()) + + if "deviceFilter" in kwargs: + options = ["All", "Failed"] + assert kwargs["deviceFilter"] in options, ( + f'''"deviceFilter" cannot be "{kwargs["deviceFilter"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["sm", "configure", "scripts", "jobs"], + "operation": "createNetworkSmScriptsJob", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sm/scripts/jobs" + + body_params = [ + "scriptId", + "deviceIds", + "deviceFilter", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkSmScriptsJob: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getNetworkSmScriptsJobsStatusesLatestByScriptByInterval(self, networkId: str, **kwargs): + """ + **List the latest script job statuses by script and by interval** + https://developer.cisco.com/meraki/api-v1/#!get-network-sm-scripts-jobs-statuses-latest-by-script-by-interval + + - networkId (string): Network ID + - scriptIds (array): List of script IDs to fetch statuses + - t0 (string): The beginning of the timespan for the data. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 180 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 180 days. The default is 1 day. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["sm", "configure", "scripts", "jobs", "statuses", "latest", "byScript", "byInterval"], + "operation": "getNetworkSmScriptsJobsStatusesLatestByScriptByInterval", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sm/scripts/jobs/statuses/latest/byScript/byInterval" + + query_params = [ + "scriptIds", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "scriptIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getNetworkSmScriptsJobsStatusesLatestByScriptByInterval: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getNetworkSmScriptsJobsStatusesLatestByScriptAndDevice( + self, networkId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List jobs for a given script and/or device** + https://developer.cisco.com/meraki/api-v1/#!get-network-sm-scripts-jobs-statuses-latest-by-script-and-device + + - networkId (string): Network 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 + - deviceId (string): Query parameter for filtering the list of script job statuses to those belonging to the specified deviceId. + - scriptId (string): Query parameter for filtering the list of script job statuses to those belonging to the specified script. + - inScopeOnly (boolean): If true, show only job statuses for scripts or devices that are in scope. This only applies when either deviceId or scriptId are given. + - status (string): Query parameter for filtering the list of job statuses to those having the specified status. + - sortOrder (string): Query parameter for specifying the direction of sorting to use for the given sortKey. This param is overridden if startingAfter or endingBefore is provided. + - sortKey (string): Query parameter to sort the script tasks by the value of the specified key. This param is overridden if startingAfter or endingBefore is provided. + - perPage (integer): Number of results to show per page. + - startingAfter (string): A statusId. Start the search cursor after the specified Status record. + - endingBefore (string): A statusId. Search backward with the cursor starting before the specified Status record. + """ + + kwargs.update(locals()) + + if "status" in kwargs: + options = [ + "cancelled", + "command failed", + "completed", + "created", + "enqueued", + "error", + "failed", + "pending", + "running", + "success", + "unknown", + ] + assert kwargs["status"] in options, ( + f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' + ) + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + if "sortKey" in kwargs: + options = ["completedAt", "createdAt", "enqueuedAt", "status", "updatedAt"] + assert kwargs["sortKey"] in options, ( + f'''"sortKey" cannot be "{kwargs["sortKey"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["sm", "configure", "scripts", "jobs", "statuses", "latest", "byScriptAndDevice"], + "operation": "getNetworkSmScriptsJobsStatusesLatestByScriptAndDevice", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sm/scripts/jobs/statuses/latest/byScriptAndDevice" + + query_params = [ + "deviceId", + "scriptId", + "inScopeOnly", + "status", + "sortOrder", + "sortKey", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getNetworkSmScriptsJobsStatusesLatestByScriptAndDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createNetworkSmScriptsUpload(self, networkId: str, size: str, **kwargs): + """ + **Creates an upload URL that can be used to upload a script** + https://developer.cisco.com/meraki/api-v1/#!create-network-sm-scripts-upload + + - networkId (string): Network ID + - size (string): Size of the file in bytes that will be uploaded. + """ + + kwargs = locals() + + metadata = { + "tags": ["sm", "configure", "scripts", "uploads"], + "operation": "createNetworkSmScriptsUpload", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/sm/scripts/uploads" + + body_params = [ + "size", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkSmScriptsUpload: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getNetworkSmScript(self, networkId: str, scriptId: str): + """ + **Return a script** + https://developer.cisco.com/meraki/api-v1/#!get-network-sm-script + + - networkId (string): Network ID + - scriptId (string): Script ID + """ + + metadata = { + "tags": ["sm", "configure", "scripts"], + "operation": "getNetworkSmScript", + } + networkId = urllib.parse.quote(str(networkId), safe="") + scriptId = urllib.parse.quote(str(scriptId), safe="") + resource = f"/networks/{networkId}/sm/scripts/{scriptId}" + + return self._session.get(metadata, resource) + + def updateNetworkSmScript(self, networkId: str, scriptId: str, **kwargs): + """ + **Update an existing script** + https://developer.cisco.com/meraki/api-v1/#!update-network-sm-script + + - networkId (string): Network ID + - scriptId (string): Script ID + - name (string): Unique name to identify this script. + - platform (string): Platform that this script will run on. + - scope (string): The target scope of the script. (Either scope or targetGroupId must be present.) + - tags (array): The target tags of the script as an array of strings. Required if scope is one of withAny, withoutAny, withAll, withoutAll. + - targetGroupId (string): The tag target group ID that should be used to scope devices. Either scope or targetGroupId must be present. + - description (string): Description of this script. + - runAsUsername (string): Username that script should run as. + - externalSource (object): Properties for a script provided by a url instead of an upload + - upload (object): Properties for a script provided as an upload instead of a url + - schedule (object): When the script is intended to run + """ + + kwargs.update(locals()) + + if "platform" in kwargs and kwargs["platform"] is not None: + options = ["Windows", "macOS"] + assert kwargs["platform"] in options, ( + f'''"platform" cannot be "{kwargs["platform"]}", & must be set to one of: {options}''' + ) + if "scope" in kwargs: + options = ["all", "none", "withAll", "withAny", "withoutAll", "withoutAny"] + assert kwargs["scope"] in options, f'''"scope" cannot be "{kwargs["scope"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["sm", "configure", "scripts"], + "operation": "updateNetworkSmScript", + } + networkId = urllib.parse.quote(str(networkId), safe="") + scriptId = urllib.parse.quote(str(scriptId), safe="") + resource = f"/networks/{networkId}/sm/scripts/{scriptId}" + + body_params = [ + "name", + "platform", + "scope", + "tags", + "targetGroupId", + "description", + "runAsUsername", + "externalSource", + "upload", + "schedule", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSmScript: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteNetworkSmScript(self, networkId: str, scriptId: str): + """ + **Delete a script** + https://developer.cisco.com/meraki/api-v1/#!delete-network-sm-script + + - networkId (string): Network ID + - scriptId (string): Script ID + """ + + metadata = { + "tags": ["sm", "configure", "scripts"], + "operation": "deleteNetworkSmScript", + } + networkId = urllib.parse.quote(str(networkId), safe="") + scriptId = urllib.parse.quote(str(scriptId), safe="") + resource = f"/networks/{networkId}/sm/scripts/{scriptId}" + + return self._session.delete(metadata, resource) + def getNetworkSmTargetGroups(self, networkId: str, **kwargs): """ **List the target groups in this network** diff --git a/meraki/api/switch.py b/meraki/api/switch.py index 58727fd2..ca432ea7 100644 --- a/meraki/api/switch.py +++ b/meraki/api/switch.py @@ -1515,6 +1515,7 @@ def createNetworkSwitchLinkAggregation(self, networkId: str, **kwargs): - networkId (string): Network ID - switchPorts (array): Array of switch or stack ports for creating aggregation group. Minimum 2 and maximum 8 ports are supported. - switchProfilePorts (array): Array of switch profile ports for creating aggregation group. Minimum 2 and maximum 8 ports are supported. + - esiMhPairId (string): ESI-MH pair ID. Required when creating a downstream aggregation across ESI-MH pair member switches. """ kwargs.update(locals()) @@ -1529,6 +1530,7 @@ def createNetworkSwitchLinkAggregation(self, networkId: str, **kwargs): body_params = [ "switchPorts", "switchProfilePorts", + "esiMhPairId", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/api/users.py b/meraki/api/users.py index 7efa68ec..f48c8b52 100644 --- a/meraki/api/users.py +++ b/meraki/api/users.py @@ -252,7 +252,7 @@ def createOrganizationIamUsersIdp(self, organizationId: str, name: str, type: st if "type" in kwargs: options = ["Azure AD"] assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' - if "syncType" in kwargs: + if "syncType" in kwargs and kwargs["syncType"] is not None: options = ["proactive"] assert kwargs["syncType"] in options, ( f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' @@ -688,7 +688,7 @@ def updateOrganizationIamUsersIdp(self, organizationId: str, id: str, **kwargs): kwargs.update(locals()) - if "syncType" in kwargs: + if "syncType" in kwargs and kwargs["syncType"] is not None: options = ["proactive"] assert kwargs["syncType"] in options, ( f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index e14d3eaa..e87ed421 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -3432,7 +3432,7 @@ def updateNetworkWirelessSsidOpenRoaming(self, networkId: str, number: str, **kw return self._session.put(metadata, resource, payload) - def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, number: str, static: dict, **kwargs): + def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, number: str, **kwargs): """ **Update the client exclusion status configuration for a given SSID** https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-policies-client-exclusion @@ -3440,9 +3440,10 @@ def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, numbe - networkId (string): Network ID - number (string): Number - static (object): Static client exclusion status + - dynamic (object): Dynamic client exclusion configuration """ - kwargs = locals() + kwargs.update(locals()) metadata = { "tags": ["wireless", "configure", "ssids", "policies", "clientExclusion"], @@ -3454,6 +3455,7 @@ def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, numbe body_params = [ "static", + "dynamic", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -3471,7 +3473,7 @@ def updateNetworkWirelessSsidPoliciesClientExclusionStaticExclusions( self, networkId: str, number: str, macs: list, **kwargs ): """ - **Set the static client exclusion list for the given SSID** + **Replace the static client exclusion list for the given SSID (use PUT /exclusions)** https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-policies-client-exclusion-static-exclusions - networkId (string): Network ID @@ -3508,7 +3510,7 @@ def createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkAdd( self, networkId: str, number: str, macs: list, **kwargs ): """ - **Add a list of MAC addresses to the static client exclusion list for the given SSID** + **Add MAC addresses to the existing static client exclusion list for the given SSID (use POST /bulkAdd)** https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ssid-policies-client-exclusion-static-exclusions-bulk-add - networkId (string): Network ID @@ -3545,7 +3547,7 @@ def createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkRemove( self, networkId: str, number: str, macs: list, **kwargs ): """ - **Delete a list of MAC addresses from the static client exclusion list for the given SSID** + **Remove MAC addresses from the existing static client exclusion list for the given SSID (use POST /bulkRemove)** https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ssid-policies-client-exclusion-static-exclusions-bulk-remove - networkId (string): Network ID @@ -6039,6 +6041,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. + - insights (string): Insights version to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6054,6 +6057,11 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) + if "insights" in kwargs: + options = ["1", "2"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "insights", "byNetwork"], @@ -6069,6 +6077,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor "bands", "contributor", "subContributor", + "insights", "t0", "t1", "timespan", @@ -6099,82 +6108,6 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsV2ByNetwork( - self, organizationId: str, total_pages=1, direction="next", **kwargs - ): - """ - **Provides root-cause diagnostics for wireless successful connects experience by network.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-successful-connects-insights-v-2-by-network - - - 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): Filter results by network. - - serials (array): Filter results by device serial. - - ssidNumbers (array): Filter results by SSID number. - - bands (array): Filter results by band. - - contributor (string): Restrict RCA to a single contributor (assoc, auth, dhcp, dns). If omitted, all contributors are considered. - - subContributor (string): Restrict RCA to a single sub-contributor (failure reason). If omitted, all sub-contributors are considered. - - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 10000. Default is 1000. - - 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()) - - if "contributor" in kwargs: - options = ["assoc", "auth", "dhcp", "dns"] - assert kwargs["contributor"] in options, ( - f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' - ) - - metadata = { - "tags": ["wireless", "configure", "experience", "successfulConnects", "insightsV2", "byNetwork"], - "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsV2ByNetwork", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/assurance/wireless/experience/successfulConnects/insightsV2/byNetwork" - - query_params = [ - "networkIds", - "serials", - "ssidNumbers", - "bands", - "contributor", - "subContributor", - "t0", - "t1", - "timespan", - "perPage", - "startingAfter", - "endingBefore", - ] - params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} - - array_params = [ - "networkIds", - "serials", - "ssidNumbers", - "bands", - ] - for k, v in kwargs.items(): - if k.strip() in array_params: - params[f"{k.strip()}[]"] = kwargs[f"{k}"] - params.pop(k.strip()) - - if self._session._validate_kwargs: - all_params = query_params + array_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning( - f"getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsV2ByNetwork: ignoring unrecognized kwargs: {invalid}" - ) - - return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): diff --git a/pyproject.toml b/pyproject.toml index 61c50c68..738b1a38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "3.1.0b2" +version = "3.1.0b3" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index 3d0791b4..299e347a 100644 --- a/uv.lock +++ b/uv.lock @@ -521,7 +521,7 @@ wheels = [ [[package]] name = "meraki" -version = "3.1.0b2" +version = "3.1.0b3" source = { editable = "." } dependencies = [ { name = "aiohttp" }, From a530d2fad550d79d5191bd0f2176e91bf10a1f7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 17:49:06 +0000 Subject: [PATCH 22/60] chore(deps-dev): bump ruff from 0.15.14 to 0.15.15 in the all-deps group (#382) Bumps the all-deps group with 1 update: [ruff](https://github.com/astral-sh/ruff). Updates `ruff` from 0.15.14 to 0.15.15 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.14...0.15.15) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.15 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/uv.lock b/uv.lock index 299e347a..9846dc39 100644 --- a/uv.lock +++ b/uv.lock @@ -931,27 +931,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.14" +version = "0.15.15" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/dc/8a/8bce2894573e9dae6ff4d77fe34ad727d79b9e6238ad288c5638990d90f6/ruff-0.15.14.tar.gz", hash = "sha256:48e866b165be4a9bdbf310f7d3c9a07edef2fe8cd63ffeb4e00bb590506ebf9f", size = 4700910, upload-time = "2026-05-21T14:34:55.177Z" } +sdist = { url = "https://files.pythonhosted.org/packages/84/6f/a76f7d96e5c962f5b69cee865e49c15c1116897c01990faa8a57edb62e7f/ruff-0.15.15.tar.gz", hash = "sha256:b8dff018130b46d8e5bf0f926ef6b60cf871d6d5ae45fc9334e09632daa741d6", size = 4706985, upload-time = "2026-05-28T14:16:57.784Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b9/c8/74a92c6ff9fcfb4f1f947126d3ebee8389276e161ecc85de5bda7cda51bd/ruff-0.15.14-py3-none-linux_armv6l.whl", hash = "sha256:8dd2db9416e487c8d4b01fa7056bb02c4d05969d4f8d17a08c229c2f4ff3c108", size = 10739177, upload-time = "2026-05-21T14:34:37.332Z" }, - { url = "https://files.pythonhosted.org/packages/45/91/254a35c20acc38a7223c9d2d594af12e794432464f2cdeb52af1dc4a892d/ruff-0.15.14-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:be4ff55af755bd71a00ab3dc6bd7ffc467bd76e0df6881e286c2e3d23e8fb43b", size = 11144969, upload-time = "2026-05-21T14:34:43.978Z" }, - { url = "https://files.pythonhosted.org/packages/56/9e/d13e40f83b8d0a94430e6778ce1d94a43b38cf2efe63278bdd2b4c65abbf/ruff-0.15.14-py3-none-macosx_11_0_arm64.whl", hash = "sha256:48d5909d7d06276ce7dde6d32bfa4b0d4cb2651145cd8ee4b440722cbc77832f", size = 10478207, upload-time = "2026-05-21T14:34:48.378Z" }, - { url = "https://files.pythonhosted.org/packages/8d/f1/b15a7839fa4f332f8acec78e20564f26bb2d866e3d21710b877fd0263000/ruff-0.15.14-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca8cbfa94c4f90984a67561978602746d4cd27103568f745fa90eee3f0d4107d", size = 10818459, upload-time = "2026-05-21T14:34:22.318Z" }, - { url = "https://files.pythonhosted.org/packages/45/33/53d651177f84f94b400a0e27f8824eeada3dddc9d5ee8aeb048f4352a520/ruff-0.15.14-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9a6bbc0333f1ab053423bcbf6226477d266ca7cec7738c4c8e3f55647803f3c4", size = 10541800, upload-time = "2026-05-21T14:34:20.209Z" }, - { url = "https://files.pythonhosted.org/packages/b8/a6/868f87e0bf9786ed24b5d0d0ad8676b8a94fd1912f42cddf9cfc7857818a/ruff-0.15.14-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8a24a4f7605d7003a6674d4387651effd939dead3fddd0f36561eb77a9a2e542", size = 11342149, upload-time = "2026-05-21T14:34:46.365Z" }, - { url = "https://files.pythonhosted.org/packages/a7/8b/38cd5c19faffdcc05a408d2b78edccc69492ab9720eadb49ea15ef80d768/ruff-0.15.14-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:049b5326e53ed80978f2fc041a280603f69dd6b0c95464342a2bb4572d9d9e2f", size = 12212563, upload-time = "2026-05-21T14:34:28.579Z" }, - { url = "https://files.pythonhosted.org/packages/3e/4d/a3c5b874a556d5731e3e657aaf04311bb76f0a5c3ec220ed43051be6b64b/ruff-0.15.14-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d4ed42e6696c8dfa5f06728e6441993901f548eb92d73bc472cb5a38d1395fbf", size = 11493299, upload-time = "2026-05-21T14:34:41.836Z" }, - { url = "https://files.pythonhosted.org/packages/1e/c0/56472c251d09858a53e51efbd485b09e1995d8731668b76d52e5dd6ee0f1/ruff-0.15.14-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:715c543cf450c4888251f91c52f1942a800541d9bddd7ac060aa4e6b77ae7cba", size = 11455931, upload-time = "2026-05-21T14:34:57.276Z" }, - { url = "https://files.pythonhosted.org/packages/2c/4a/e2e7b4d8dbf233d4eace59c75bc3435fa6d8bd3bae82d351d4e4300c0fd1/ruff-0.15.14-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:72ebab6013ec887d439d8b7593737a0a4ffb06d45d209d4e4bf2e92813082d3f", size = 11400794, upload-time = "2026-05-21T14:34:39.773Z" }, - { url = "https://files.pythonhosted.org/packages/97/c7/83c0539fe34c3e09136204d1e75d6052492364e0b3cb05e9465423f567d7/ruff-0.15.14-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:49072d36abdbe97a8dd7f480afe9c675699c0c495d4c84076e2c1203c4550581", size = 10804759, upload-time = "2026-05-21T14:34:31.045Z" }, - { url = "https://files.pythonhosted.org/packages/86/a6/18f2bfc095a2ab4a78745644e428205532ce6653a5d0fa8501572891534d/ruff-0.15.14-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:958522aee105068640c2c2ceae08f413ae44d922f52a1374ac13d6a96032fc93", size = 10539517, upload-time = "2026-05-21T14:34:53.064Z" }, - { url = "https://files.pythonhosted.org/packages/54/3a/5a8b3b69c654d4e4bf1d246ac5b49cbcdac6eaab6905925f8915f31e3b80/ruff-0.15.14-py3-none-musllinux_1_2_i686.whl", hash = "sha256:f3707da619a143a2e8830e2abab8224478d69ace2d28cb6c20543ae97c36bf61", size = 11065169, upload-time = "2026-05-21T14:34:24.484Z" }, - { url = "https://files.pythonhosted.org/packages/ed/c5/8864e4e7925b836ea354b31d57641ec03830564e281a8b6f061f8c3e0ec1/ruff-0.15.14-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:bb01d645694e3ec0102105d07ef2d53703970407d59c04e59d3ba0b7a1d53553", size = 11560214, upload-time = "2026-05-21T14:34:50.975Z" }, - { url = "https://files.pythonhosted.org/packages/36/38/012bf76752e1f89ed50b77b99532d90f3a3e287bc7918e1fc0948ac866ac/ruff-0.15.14-py3-none-win32.whl", hash = "sha256:6d0c1ad2a0ab718d39b6d8fd2217981ce4d625cd96a720095f798fb47d8b13e6", size = 10805548, upload-time = "2026-05-21T14:34:33.453Z" }, - { url = "https://files.pythonhosted.org/packages/d1/b7/4ea2c170f10ad760fff2a5250beb18897719dc8b52b53a24cddbb9dd3f19/ruff-0.15.14-py3-none-win_amd64.whl", hash = "sha256:802342981e056db3851a7836e5b070f8f15f67d4a685ae2a6160939d364b2902", size = 11939523, upload-time = "2026-05-21T14:34:18.077Z" }, - { url = "https://files.pythonhosted.org/packages/62/d5/bc97ff895ec35cf3925d4bd60f3b39d822f377a446906ec9bcc87405e59b/ruff-0.15.14-py3-none-win_arm64.whl", hash = "sha256:ff47b90a9ef6a40c9e2f3b479c1fb78531adf055b94c1eba0a7ba04b31951826", size = 11208607, upload-time = "2026-05-21T14:34:26.525Z" }, + { url = "https://files.pythonhosted.org/packages/fa/9d/3a45c05b8ab04b4705989de70a79008e27c8003296a0feaee9edc18dd7e9/ruff-0.15.15-py3-none-linux_armv6l.whl", hash = "sha256:cf93e5388f412e1b108b1f8b34a6e036b70fe8aff89393befad96fe48670311b", size = 10710652, upload-time = "2026-05-28T14:16:06.701Z" }, + { url = "https://files.pythonhosted.org/packages/05/66/da974431624bf3b49f6ee1f9543c02d929ff1cba78b0d5a79c38cf21f744/ruff-0.15.15-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ac5a646d1f6a7dadd5d50842dae2c1f9862ac887ef5d1b1375e02def791fde6e", size = 11096615, upload-time = "2026-05-28T14:16:23.313Z" }, + { url = "https://files.pythonhosted.org/packages/8c/09/7443452e5d290230a712103f2fdceeef7184f3ec99a2bd01c8be78aaceb5/ruff-0.15.15-py3-none-macosx_11_0_arm64.whl", hash = "sha256:77d955a431430c66f72dd94e379ad38a16daea3d25094872ac4edf9e797be530", size = 10436683, upload-time = "2026-05-28T14:16:40.974Z" }, + { url = "https://files.pythonhosted.org/packages/53/01/d330c26a57fa4f3943a14424904027428315b700fe4d14a84bb123a649e5/ruff-0.15.15-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7614ee79c69788cf6cedd568069ade9cecc22a1ad20494efe8d0c9ebb4b622d4", size = 10769064, upload-time = "2026-05-28T14:16:28.905Z" }, + { url = "https://files.pythonhosted.org/packages/1d/85/cc8770f8bdff541b1da8392d1634141fe4a0e3f4ee596605959b7906c27f/ruff-0.15.15-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3cdb1679e06a1f6b47bc384714ae96f6e2fb65ca441eb78c43d2ca554176ce1f", size = 10511987, upload-time = "2026-05-28T14:16:43.732Z" }, + { url = "https://files.pythonhosted.org/packages/7c/29/8c190c1472b63013583ba391f3342036e02010544c1270455ed8e519bdf3/ruff-0.15.15-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2728b93d7b23a603ea2c0ac6eb73d760bd38ec9de35f35fb41e18f7a3fee7622", size = 11275100, upload-time = "2026-05-28T14:16:55.244Z" }, + { url = "https://files.pythonhosted.org/packages/9f/6b/7e145ce2cc8e63d6834eca03d83a0e18d121def5c69f91b4cf4011ed4879/ruff-0.15.15-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:be582fcc0db438902c7792b08d6ddf6c9b9e21addaa10092c2c741cfb09e5a45", size = 12176903, upload-time = "2026-05-28T14:16:14.368Z" }, + { url = "https://files.pythonhosted.org/packages/80/a3/d5974637f68e451f7fadf015cf3101d1cd7d8ba5027cffe0b9e3826ebe6b/ruff-0.15.15-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7aa77465b8ecaf1a27bea098d696f7fed5e1eccbd10b321b682d6de586ae5627", size = 11404550, upload-time = "2026-05-28T14:16:20.138Z" }, + { url = "https://files.pythonhosted.org/packages/fe/1c/e6e5e568f22be4fb05d6244234aba384c06b451252453b821e1a529263cf/ruff-0.15.15-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48decfa11d740de4889de623be1463308346312f2409a56e24aa280c86162dc4", size = 11382027, upload-time = "2026-05-28T14:16:46.615Z" }, + { url = "https://files.pythonhosted.org/packages/1d/01/170921b49fcd2e8858825593f91cf7146c3e40a5c3e6df763e4bb0484dde/ruff-0.15.15-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a5015088452ca0081387063649ec67f06d3d1d6b8b936a1f836b5e9657ecd48c", size = 11366041, upload-time = "2026-05-28T14:16:26.247Z" }, + { url = "https://files.pythonhosted.org/packages/87/54/a7bad711d7de93254e15e06a4c375b89a03d18de45d3e5dcc86a4472fb1a/ruff-0.15.15-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f5294aab6356c81600fcdea3a62bb1b924dfd5e91767c12318d3f68f86af57cd", size = 10741795, upload-time = "2026-05-28T14:16:17.11Z" }, + { url = "https://files.pythonhosted.org/packages/c9/31/38c075963668f8b41c6914ee0f6f318727fbe30ab9145cb29e6df464c5fa/ruff-0.15.15-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:db5bd4d802415cca656dc1616070b725952d6ae95eb5d4831e49fbd94a38f75f", size = 10511117, upload-time = "2026-05-28T14:16:31.767Z" }, + { url = "https://files.pythonhosted.org/packages/9d/96/6ff689e1f7e375d1d97075eca022f74c2bab59554a432fe4d2e6f091986a/ruff-0.15.15-py3-none-musllinux_1_2_i686.whl", hash = "sha256:587a6278ed42059191c1a466e490bd7930fb50bd2e255398bc29616c895a61cb", size = 10994867, upload-time = "2026-05-28T14:16:35.149Z" }, + { url = "https://files.pythonhosted.org/packages/c3/c2/5dce0ab9f92a8d534fa62b9bf9caca3eddb8c1a81b616f5e195ada4f0d6e/ruff-0.15.15-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:df0c1c084f5f4be9812f61518a45c440d3c30d69ce4bf6c5270e66d38338f02a", size = 11482101, upload-time = "2026-05-28T14:16:49.598Z" }, + { url = "https://files.pythonhosted.org/packages/b1/c0/1003b60edd697c649faf61f1a34094b1abb38fb3d1181e3f895781250a08/ruff-0.15.15-py3-none-win32.whl", hash = "sha256:29428ea79694afbe756d45fd59b36f22b6b020dc0443cf7de0173046236964b9", size = 10716774, upload-time = "2026-05-28T14:16:52.337Z" }, + { url = "https://files.pythonhosted.org/packages/02/a8/1269eddd6945a06c23f055ef7848886e37cf9d6a8bebb386a3115f01470c/ruff-0.15.15-py3-none-win_amd64.whl", hash = "sha256:8df0323902e15e24bc4bf246da830573d3cf3352bd0b9a164eab335d111ff4a4", size = 11868463, upload-time = "2026-05-28T14:16:11.333Z" }, + { url = "https://files.pythonhosted.org/packages/4e/b2/920464c907b191e37469d477a1aa8bc048b8f36c4c1610dfa4ab87b39e18/ruff-0.15.15-py3-none-win_arm64.whl", hash = "sha256:3c8ceca6792f38196b8f589bc92eccd03eef286602da92e5dc05cc42ef6441b7", size = 11138498, upload-time = "2026-05-28T14:16:38.425Z" }, ] [[package]] From 6ae38c7e5dff976212227f193a8bacd5e58e1bad Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Fri, 29 May 2026 17:01:06 -0700 Subject: [PATCH 23/60] ci: gate dependabot auto-merge to patch/minor + dev deps Add dependabot/fetch-metadata (SHA-pinned) and only auto-merge version-update:semver-patch/minor or direct:development. Major bumps and direct production-dependency changes now require human review. Audit finding C1. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/dependabot-auto-merge.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 4c5d505e..8a639b5c 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -10,7 +10,19 @@ jobs: if: github.actor == 'dependabot[bot]' runs-on: ubuntu-latest steps: - - run: gh pr merge --squash --auto "$PR_URL" + - name: Fetch Dependabot metadata + id: meta + uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 # v2.3.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + # Only auto-merge patch/minor bumps and dev-dependency updates. Major + # bumps and direct production-dependency changes still require human review. + - name: Enable auto-merge for safe updates + if: >- + steps.meta.outputs.update-type == 'version-update:semver-patch' || + steps.meta.outputs.update-type == 'version-update:semver-minor' || + steps.meta.outputs.dependency-type == 'direct:development' + run: gh pr merge --squash --auto "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 2cf7274cd64aaf485e613f6f0e35ce743abc044e Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Fri, 29 May 2026 17:08:06 -0700 Subject: [PATCH 24/60] ci: least-privilege permissions + harden OpenAPI tag injection sink - add 'permissions: contents: read' to test-library, test-library-generator, test-pr, regenerate-library, create-release, watch-openapi-release, enable-early-access, v3-drift-detection (job-level contents:write on watch-openapi trigger jobs that push) - watch-openapi-release: validate upstream meraki/openapi release tag against a strict semver regex and bind it via env: instead of inline ${{ }} in run: blocks (script-injection guard) Audit findings C2, C3 (beta branch variants). Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/create-release.yml | 5 +++++ .github/workflows/enable-early-access.yml | 3 +++ .github/workflows/regenerate-library.yml | 5 +++++ .github/workflows/test-library-generator.yml | 3 +++ .github/workflows/test-library.yml | 3 +++ .github/workflows/test-pr.yml | 3 +++ .github/workflows/watch-openapi-release.yml | 22 +++++++++++++++++++- 7 files changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index fbfbf8a9..fc368a9f 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -12,6 +12,11 @@ on: types: [completed] branches: ['main', 'beta'] +# The release is created with a GitHub App token; the default token only needs +# read access for checkout and `gh release view`. +permissions: + contents: read + jobs: create-release: if: github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push') diff --git a/.github/workflows/enable-early-access.yml b/.github/workflows/enable-early-access.yml index d5fc84c6..2814c64f 100644 --- a/.github/workflows/enable-early-access.yml +++ b/.github/workflows/enable-early-access.yml @@ -5,6 +5,9 @@ on: schedule: - cron: '0 18 * * 3' +permissions: + contents: read + jobs: enable-early-access: runs-on: ubuntu-latest diff --git a/.github/workflows/regenerate-library.yml b/.github/workflows/regenerate-library.yml index 40825839..126def06 100644 --- a/.github/workflows/regenerate-library.yml +++ b/.github/workflows/regenerate-library.yml @@ -17,6 +17,11 @@ on: - beta - dev +# Writes (commit, PR, auto-merge) are performed with a GitHub App token, not +# GITHUB_TOKEN, so the default token only needs read access for checkout. +permissions: + contents: read + jobs: regenerate: runs-on: ubuntu-latest diff --git a/.github/workflows/test-library-generator.yml b/.github/workflows/test-library-generator.yml index 1ce54eaf..d3f4b379 100644 --- a/.github/workflows/test-library-generator.yml +++ b/.github/workflows/test-library-generator.yml @@ -17,6 +17,9 @@ on: - 'uv.lock' workflow_dispatch: +permissions: + contents: read + jobs: lint: runs-on: ubuntu-latest diff --git a/.github/workflows/test-library.yml b/.github/workflows/test-library.yml index 56c8090e..be480310 100644 --- a/.github/workflows/test-library.yml +++ b/.github/workflows/test-library.yml @@ -4,6 +4,9 @@ on: workflow_call: workflow_dispatch: +permissions: + contents: read + jobs: lint: runs-on: ubuntu-latest diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index ccc82fb8..d703d59e 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -18,6 +18,9 @@ on: - 'pyproject.toml' - 'uv.lock' +permissions: + contents: read + jobs: test: uses: ./.github/workflows/test-library.yml diff --git a/.github/workflows/watch-openapi-release.yml b/.github/workflows/watch-openapi-release.yml index 4e5840d2..7c3e25e9 100644 --- a/.github/workflows/watch-openapi-release.yml +++ b/.github/workflows/watch-openapi-release.yml @@ -5,6 +5,9 @@ on: - cron: '0 14 * * *' workflow_dispatch: +permissions: + contents: read + jobs: check-ga: runs-on: ubuntu-latest @@ -24,6 +27,12 @@ jobs: run: | LATEST=$(gh release list --repo meraki/openapi --exclude-pre-releases --limit 1 --json tagName -q '.[0].tagName') API_VERSION="${LATEST#v}" + # Reject anything that isn't a clean semver tag before it flows into + # downstream run: steps / workflow_dispatch inputs (script injection guard). + if ! [[ "$API_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$ ]]; then + echo "::error::Unexpected OpenAPI release tag: '$LATEST'" + exit 1 + fi echo "api_version=$API_VERSION" >> "$GITHUB_OUTPUT" LAST_PROCESSED=$(cat .github/.last-openapi-ga-release 2>/dev/null || echo "") @@ -66,6 +75,12 @@ jobs: fi API_VERSION="${LATEST#v}" + # Reject anything that isn't a clean semver tag before it flows into + # downstream run: steps / workflow_dispatch inputs (script injection guard). + if ! [[ "$API_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$ ]]; then + echo "::error::Unexpected OpenAPI release tag: '$LATEST'" + exit 1 + fi echo "api_version=$API_VERSION" >> "$GITHUB_OUTPUT" LAST_PROCESSED=$(cat .github/.last-openapi-beta-release 2>/dev/null || echo "") @@ -78,8 +93,9 @@ jobs: - name: Compute next SDK version if: steps.check.outputs.has_new_release == 'true' id: version + env: + API_VERSION: ${{ steps.check.outputs.api_version }} run: | - API_VERSION="${{ steps.check.outputs.api_version }}" CURRENT=$(git show "origin/beta:pyproject.toml" | grep '^version' | sed 's/version = "\(.*\)"/\1/') # Parse API version: e.g. "1.81.2-beta.3" -> minor=81, patch=2, beta=3 @@ -105,6 +121,8 @@ jobs: needs: check-ga if: needs.check-ga.outputs.has_new_release == 'true' runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v6 @@ -134,6 +152,8 @@ jobs: needs: [check-beta, trigger-ga] if: always() && needs.check-beta.outputs.has_new_release == 'true' runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v6 From 304cf0123f605f5a6bef996128164474da34b0b4 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Fri, 29 May 2026 17:31:28 -0700 Subject: [PATCH 25/60] ci: bump dependabot/fetch-metadata v2.3.0 -> v3.1.0 (Node 24) v2.3.0 runs on the Node 20 runtime (deprecated, forced off June 16 2026). v3.0.0+ requires/uses Node 24. SHA-pinned to 25dd0e3. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/dependabot-auto-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 8a639b5c..f9154948 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Fetch Dependabot metadata id: meta - uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 # v2.3.0 + uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} # Only auto-merge patch/minor bumps and dev-dependency updates. Major From 54de451ee3ca2333593310f50b8f10698c13bb4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 22:12:42 +0000 Subject: [PATCH 26/60] chore(deps): bump aiohttp from 3.13.5 to 3.14.0 in the all-deps group (#386) --- updated-dependencies: - dependency-name: aiohttp dependency-version: 3.14.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 190 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 103 insertions(+), 87 deletions(-) diff --git a/uv.lock b/uv.lock index 9846dc39..954d57ce 100644 --- a/uv.lock +++ b/uv.lock @@ -13,7 +13,7 @@ wheels = [ [[package]] name = "aiohttp" -version = "3.13.5" +version = "3.14.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiohappyeyeballs" }, @@ -22,95 +22,111 @@ dependencies = [ { name = "frozenlist" }, { name = "multidict" }, { name = "propcache" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, { name = "yarl" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/77/9a/152096d4808df8e4268befa55fba462f440f14beab85e8ad9bf990516918/aiohttp-3.13.5.tar.gz", hash = "sha256:9d98cc980ecc96be6eb4c1994ce35d28d8b1f5e5208a23b421187d1209dbb7d1", size = 7858271, upload-time = "2026-03-31T22:01:03.343Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ee/ab/93ce242f899b68c51b0578c027aafa791ab3614cb9345fa5d37b5f5c8e3e/aiohttp-3.14.0.tar.gz", hash = "sha256:2882de819734c715fd1b9c11c97e09fa020d14438203d1d354d8ed1702791c9b", size = 7940674, upload-time = "2026-06-01T19:41:02.763Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d6/f5/a20c4ac64aeaef1679e25c9983573618ff765d7aa829fa2b84ae7573169e/aiohttp-3.13.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7ab7229b6f9b5c1ba4910d6c41a9eb11f543eadb3f384df1b4c293f4e73d44d6", size = 757513, upload-time = "2026-03-31T21:57:02.146Z" }, - { url = "https://files.pythonhosted.org/packages/75/0a/39fa6c6b179b53fcb3e4b3d2b6d6cad0180854eda17060c7218540102bef/aiohttp-3.13.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8f14c50708bb156b3a3ca7230b3d820199d56a48e3af76fa21c2d6087190fe3d", size = 506748, upload-time = "2026-03-31T21:57:04.275Z" }, - { url = "https://files.pythonhosted.org/packages/87/ec/e38ce072e724fd7add6243613f8d1810da084f54175353d25ccf9f9c7e5a/aiohttp-3.13.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e7d2f8616f0ff60bd332022279011776c3ac0faa0f1b463f7bb12326fbc97a1c", size = 501673, upload-time = "2026-03-31T21:57:06.208Z" }, - { url = "https://files.pythonhosted.org/packages/ba/ba/3bc7525d7e2beaa11b309a70d48b0d3cfc3c2089ec6a7d0820d59c657053/aiohttp-3.13.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a2567b72e1ffc3ab25510db43f355b29eeada56c0a622e58dcdb19530eb0a3cb", size = 1763757, upload-time = "2026-03-31T21:57:07.882Z" }, - { url = "https://files.pythonhosted.org/packages/5e/ab/e87744cf18f1bd78263aba24924d4953b41086bd3a31d22452378e9028a0/aiohttp-3.13.5-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fb0540c854ac9c0c5ad495908fdfd3e332d553ec731698c0e29b1877ba0d2ec6", size = 1720152, upload-time = "2026-03-31T21:57:09.946Z" }, - { url = "https://files.pythonhosted.org/packages/6b/f3/ed17a6f2d742af17b50bae2d152315ed1b164b07a5fd5cc1754d99e4dfa5/aiohttp-3.13.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c9883051c6972f58bfc4ebb2116345ee2aa151178e99c3f2b2bbe2af712abd13", size = 1818010, upload-time = "2026-03-31T21:57:12.157Z" }, - { url = "https://files.pythonhosted.org/packages/53/06/ecbc63dc937192e2a5cb46df4d3edb21deb8225535818802f210a6ea5816/aiohttp-3.13.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2294172ce08a82fb7c7273485895de1fa1186cc8294cfeb6aef4af42ad261174", size = 1907251, upload-time = "2026-03-31T21:57:14.023Z" }, - { url = "https://files.pythonhosted.org/packages/7e/a5/0521aa32c1ddf3aa1e71dcc466be0b7db2771907a13f18cddaa45967d97b/aiohttp-3.13.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3a807cabd5115fb55af198b98178997a5e0e57dead43eb74a93d9c07d6d4a7dc", size = 1759969, upload-time = "2026-03-31T21:57:16.146Z" }, - { url = "https://files.pythonhosted.org/packages/f6/78/a38f8c9105199dd3b9706745865a8a59d0041b6be0ca0cc4b2ccf1bab374/aiohttp-3.13.5-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:aa6d0d932e0f39c02b80744273cd5c388a2d9bc07760a03164f229c8e02662f6", size = 1616871, upload-time = "2026-03-31T21:57:17.856Z" }, - { url = "https://files.pythonhosted.org/packages/6f/41/27392a61ead8ab38072105c71aa44ff891e71653fe53d576a7067da2b4e8/aiohttp-3.13.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:60869c7ac4aaabe7110f26499f3e6e5696eae98144735b12a9c3d9eae2b51a49", size = 1739844, upload-time = "2026-03-31T21:57:19.679Z" }, - { url = "https://files.pythonhosted.org/packages/6e/55/5564e7ae26d94f3214250009a0b1c65a0c6af4bf88924ccb6fdab901de28/aiohttp-3.13.5-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:26d2f8546f1dfa75efa50c3488215a903c0168d253b75fba4210f57ab77a0fb8", size = 1731969, upload-time = "2026-03-31T21:57:22.006Z" }, - { url = "https://files.pythonhosted.org/packages/6d/c5/705a3929149865fc941bcbdd1047b238e4a72bcb215a9b16b9d7a2e8d992/aiohttp-3.13.5-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1162a1492032c82f14271e831c8f4b49f2b6078f4f5fc74de2c912fa225d51d", size = 1795193, upload-time = "2026-03-31T21:57:24.256Z" }, - { url = "https://files.pythonhosted.org/packages/a6/19/edabed62f718d02cff7231ca0db4ef1c72504235bc467f7b67adb1679f48/aiohttp-3.13.5-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:8b14eb3262fad0dc2f89c1a43b13727e709504972186ff6a99a3ecaa77102b6c", size = 1606477, upload-time = "2026-03-31T21:57:26.364Z" }, - { url = "https://files.pythonhosted.org/packages/de/fc/76f80ef008675637d88d0b21584596dc27410a990b0918cb1e5776545b5b/aiohttp-3.13.5-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ca9ac61ac6db4eb6c2a0cd1d0f7e1357647b638ccc92f7e9d8d133e71ed3c6ac", size = 1813198, upload-time = "2026-03-31T21:57:28.316Z" }, - { url = "https://files.pythonhosted.org/packages/e5/67/5b3ac26b80adb20ea541c487f73730dc8fa107d632c998f25bbbab98fcda/aiohttp-3.13.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7996023b2ed59489ae4762256c8516df9820f751cf2c5da8ed2fb20ee50abab3", size = 1752321, upload-time = "2026-03-31T21:57:30.549Z" }, - { url = "https://files.pythonhosted.org/packages/88/06/e4a2e49255ea23fa4feeb5ab092d90240d927c15e47b5b5c48dff5a9ce29/aiohttp-3.13.5-cp311-cp311-win32.whl", hash = "sha256:77dfa48c9f8013271011e51c00f8ada19851f013cde2c48fca1ba5e0caf5bb06", size = 439069, upload-time = "2026-03-31T21:57:32.388Z" }, - { url = "https://files.pythonhosted.org/packages/c0/43/8c7163a596dab4f8be12c190cf467a1e07e4734cf90eebb39f7f5d53fc6a/aiohttp-3.13.5-cp311-cp311-win_amd64.whl", hash = "sha256:d3a4834f221061624b8887090637db9ad4f61752001eae37d56c52fddade2dc8", size = 462859, upload-time = "2026-03-31T21:57:34.455Z" }, - { url = "https://files.pythonhosted.org/packages/be/6f/353954c29e7dcce7cf00280a02c75f30e133c00793c7a2ed3776d7b2f426/aiohttp-3.13.5-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:023ecba036ddd840b0b19bf195bfae970083fd7024ce1ac22e9bba90464620e9", size = 748876, upload-time = "2026-03-31T21:57:36.319Z" }, - { url = "https://files.pythonhosted.org/packages/f5/1b/428a7c64687b3b2e9cd293186695affc0e1e54a445d0361743b231f11066/aiohttp-3.13.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:15c933ad7920b7d9a20de151efcd05a6e38302cbf0e10c9b2acb9a42210a2416", size = 499557, upload-time = "2026-03-31T21:57:38.236Z" }, - { url = "https://files.pythonhosted.org/packages/29/47/7be41556bfbb6917069d6a6634bb7dd5e163ba445b783a90d40f5ac7e3a7/aiohttp-3.13.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ab2899f9fa2f9f741896ebb6fa07c4c883bfa5c7f2ddd8cf2aafa86fa981b2d2", size = 500258, upload-time = "2026-03-31T21:57:39.923Z" }, - { url = "https://files.pythonhosted.org/packages/67/84/c9ecc5828cb0b3695856c07c0a6817a99d51e2473400f705275a2b3d9239/aiohttp-3.13.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a60eaa2d440cd4707696b52e40ed3e2b0f73f65be07fd0ef23b6b539c9c0b0b4", size = 1749199, upload-time = "2026-03-31T21:57:41.938Z" }, - { url = "https://files.pythonhosted.org/packages/f0/d3/3c6d610e66b495657622edb6ae7c7fd31b2e9086b4ec50b47897ad6042a9/aiohttp-3.13.5-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:55b3bdd3292283295774ab585160c4004f4f2f203946997f49aac032c84649e9", size = 1721013, upload-time = "2026-03-31T21:57:43.904Z" }, - { url = "https://files.pythonhosted.org/packages/49/a0/24409c12217456df0bae7babe3b014e460b0b38a8e60753d6cb339f6556d/aiohttp-3.13.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c2b2355dc094e5f7d45a7bb262fe7207aa0460b37a0d87027dcf21b5d890e7d5", size = 1781501, upload-time = "2026-03-31T21:57:46.285Z" }, - { url = "https://files.pythonhosted.org/packages/98/9d/b65ec649adc5bccc008b0957a9a9c691070aeac4e41cea18559fef49958b/aiohttp-3.13.5-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b38765950832f7d728297689ad78f5f2cf79ff82487131c4d26fe6ceecdc5f8e", size = 1878981, upload-time = "2026-03-31T21:57:48.734Z" }, - { url = "https://files.pythonhosted.org/packages/57/d8/8d44036d7eb7b6a8ec4c5494ea0c8c8b94fbc0ed3991c1a7adf230df03bf/aiohttp-3.13.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b18f31b80d5a33661e08c89e202edabf1986e9b49c42b4504371daeaa11b47c1", size = 1767934, upload-time = "2026-03-31T21:57:51.171Z" }, - { url = "https://files.pythonhosted.org/packages/31/04/d3f8211f273356f158e3464e9e45484d3fb8c4ce5eb2f6fe9405c3273983/aiohttp-3.13.5-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:33add2463dde55c4f2d9635c6ab33ce154e5ecf322bd26d09af95c5f81cfa286", size = 1566671, upload-time = "2026-03-31T21:57:53.326Z" }, - { url = "https://files.pythonhosted.org/packages/41/db/073e4ebe00b78e2dfcacff734291651729a62953b48933d765dc513bf798/aiohttp-3.13.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:327cc432fdf1356fb4fbc6fe833ad4e9f6aacb71a8acaa5f1855e4b25910e4a9", size = 1705219, upload-time = "2026-03-31T21:57:55.385Z" }, - { url = "https://files.pythonhosted.org/packages/48/45/7dfba71a2f9fd97b15c95c06819de7eb38113d2cdb6319669195a7d64270/aiohttp-3.13.5-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:7c35b0bf0b48a70b4cb4fc5d7bed9b932532728e124874355de1a0af8ec4bc88", size = 1743049, upload-time = "2026-03-31T21:57:57.341Z" }, - { url = "https://files.pythonhosted.org/packages/18/71/901db0061e0f717d226386a7f471bb59b19566f2cae5f0d93874b017271f/aiohttp-3.13.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:df23d57718f24badef8656c49743e11a89fd6f5358fa8a7b96e728fda2abf7d3", size = 1749557, upload-time = "2026-03-31T21:57:59.626Z" }, - { url = "https://files.pythonhosted.org/packages/08/d5/41eebd16066e59cd43728fe74bce953d7402f2b4ddfdfef2c0e9f17ca274/aiohttp-3.13.5-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:02e048037a6501a5ec1f6fc9736135aec6eb8a004ce48838cb951c515f32c80b", size = 1558931, upload-time = "2026-03-31T21:58:01.972Z" }, - { url = "https://files.pythonhosted.org/packages/30/e6/4a799798bf05740e66c3a1161079bda7a3dd8e22ca392481d7a7f9af82a6/aiohttp-3.13.5-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:31cebae8b26f8a615d2b546fee45d5ffb76852ae6450e2a03f42c9102260d6fe", size = 1774125, upload-time = "2026-03-31T21:58:04.007Z" }, - { url = "https://files.pythonhosted.org/packages/84/63/7749337c90f92bc2cb18f9560d67aa6258c7060d1397d21529b8004fcf6f/aiohttp-3.13.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:888e78eb5ca55a615d285c3c09a7a91b42e9dd6fc699b166ebd5dee87c9ccf14", size = 1732427, upload-time = "2026-03-31T21:58:06.337Z" }, - { url = "https://files.pythonhosted.org/packages/98/de/cf2f44ff98d307e72fb97d5f5bbae3bfcb442f0ea9790c0bf5c5c2331404/aiohttp-3.13.5-cp312-cp312-win32.whl", hash = "sha256:8bd3ec6376e68a41f9f95f5ed170e2fcf22d4eb27a1f8cb361d0508f6e0557f3", size = 433534, upload-time = "2026-03-31T21:58:08.712Z" }, - { url = "https://files.pythonhosted.org/packages/aa/ca/eadf6f9c8fa5e31d40993e3db153fb5ed0b11008ad5d9de98a95045bed84/aiohttp-3.13.5-cp312-cp312-win_amd64.whl", hash = "sha256:110e448e02c729bcebb18c60b9214a87ba33bac4a9fa5e9a5f139938b56c6cb1", size = 460446, upload-time = "2026-03-31T21:58:10.945Z" }, - { url = "https://files.pythonhosted.org/packages/78/e9/d76bf503005709e390122d34e15256b88f7008e246c4bdbe915cd4f1adce/aiohttp-3.13.5-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a5029cc80718bbd545123cd8fe5d15025eccaaaace5d0eeec6bd556ad6163d61", size = 742930, upload-time = "2026-03-31T21:58:13.155Z" }, - { url = "https://files.pythonhosted.org/packages/57/00/4b7b70223deaebd9bb85984d01a764b0d7bd6526fcdc73cca83bcbe7243e/aiohttp-3.13.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4bb6bf5811620003614076bdc807ef3b5e38244f9d25ca5fe888eaccea2a9832", size = 496927, upload-time = "2026-03-31T21:58:15.073Z" }, - { url = "https://files.pythonhosted.org/packages/9c/f5/0fb20fb49f8efdcdce6cd8127604ad2c503e754a8f139f5e02b01626523f/aiohttp-3.13.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a84792f8631bf5a94e52d9cc881c0b824ab42717165a5579c760b830d9392ac9", size = 497141, upload-time = "2026-03-31T21:58:17.009Z" }, - { url = "https://files.pythonhosted.org/packages/3b/86/b7c870053e36a94e8951b803cb5b909bfbc9b90ca941527f5fcafbf6b0fa/aiohttp-3.13.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:57653eac22c6a4c13eb22ecf4d673d64a12f266e72785ab1c8b8e5940d0e8090", size = 1732476, upload-time = "2026-03-31T21:58:18.925Z" }, - { url = "https://files.pythonhosted.org/packages/b5/e5/4e161f84f98d80c03a238671b4136e6530453d65262867d989bbe78244d0/aiohttp-3.13.5-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e5e5f7debc7a57af53fdf5c5009f9391d9f4c12867049d509bf7bb164a6e295b", size = 1706507, upload-time = "2026-03-31T21:58:21.094Z" }, - { url = "https://files.pythonhosted.org/packages/d4/56/ea11a9f01518bd5a2a2fcee869d248c4b8a0cfa0bb13401574fa31adf4d4/aiohttp-3.13.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c719f65bebcdf6716f10e9eff80d27567f7892d8988c06de12bbbd39307c6e3a", size = 1773465, upload-time = "2026-03-31T21:58:23.159Z" }, - { url = "https://files.pythonhosted.org/packages/eb/40/333ca27fb74b0383f17c90570c748f7582501507307350a79d9f9f3c6eb1/aiohttp-3.13.5-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d97f93fdae594d886c5a866636397e2bcab146fd7a132fd6bb9ce182224452f8", size = 1873523, upload-time = "2026-03-31T21:58:25.59Z" }, - { url = "https://files.pythonhosted.org/packages/f0/d2/e2f77eef1acb7111405433c707dc735e63f67a56e176e72e9e7a2cd3f493/aiohttp-3.13.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3df334e39d4c2f899a914f1dba283c1aadc311790733f705182998c6f7cae665", size = 1754113, upload-time = "2026-03-31T21:58:27.624Z" }, - { url = "https://files.pythonhosted.org/packages/fb/56/3f653d7f53c89669301ec9e42c95233e2a0c0a6dd051269e6e678db4fdb0/aiohttp-3.13.5-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fe6970addfea9e5e081401bcbadf865d2b6da045472f58af08427e108d618540", size = 1562351, upload-time = "2026-03-31T21:58:29.918Z" }, - { url = "https://files.pythonhosted.org/packages/ec/a6/9b3e91eb8ae791cce4ee736da02211c85c6f835f1bdfac0594a8a3b7018c/aiohttp-3.13.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7becdf835feff2f4f335d7477f121af787e3504b48b449ff737afb35869ba7bb", size = 1693205, upload-time = "2026-03-31T21:58:32.214Z" }, - { url = "https://files.pythonhosted.org/packages/98/fc/bfb437a99a2fcebd6b6eaec609571954de2ed424f01c352f4b5504371dd3/aiohttp-3.13.5-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:676e5651705ad5d8a70aeb8eb6936c436d8ebbd56e63436cb7dd9bb36d2a9a46", size = 1730618, upload-time = "2026-03-31T21:58:34.728Z" }, - { url = "https://files.pythonhosted.org/packages/e4/b6/c8534862126191a034f68153194c389addc285a0f1347d85096d349bbc15/aiohttp-3.13.5-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:9b16c653d38eb1a611cc898c41e76859ca27f119d25b53c12875fd0474ae31a8", size = 1745185, upload-time = "2026-03-31T21:58:36.909Z" }, - { url = "https://files.pythonhosted.org/packages/0b/93/4ca8ee2ef5236e2707e0fd5fecb10ce214aee1ff4ab307af9c558bda3b37/aiohttp-3.13.5-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:999802d5fa0389f58decd24b537c54aa63c01c3219ce17d1214cbda3c2b22d2d", size = 1557311, upload-time = "2026-03-31T21:58:39.38Z" }, - { url = "https://files.pythonhosted.org/packages/57/ae/76177b15f18c5f5d094f19901d284025db28eccc5ae374d1d254181d33f4/aiohttp-3.13.5-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:ec707059ee75732b1ba130ed5f9580fe10ff75180c812bc267ded039db5128c6", size = 1773147, upload-time = "2026-03-31T21:58:41.476Z" }, - { url = "https://files.pythonhosted.org/packages/01/a4/62f05a0a98d88af59d93b7fcac564e5f18f513cb7471696ac286db970d6a/aiohttp-3.13.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:2d6d44a5b48132053c2f6cd5c8cb14bc67e99a63594e336b0f2af81e94d5530c", size = 1730356, upload-time = "2026-03-31T21:58:44.049Z" }, - { url = "https://files.pythonhosted.org/packages/e4/85/fc8601f59dfa8c9523808281f2da571f8b4699685f9809a228adcc90838d/aiohttp-3.13.5-cp313-cp313-win32.whl", hash = "sha256:329f292ed14d38a6c4c435e465f48bebb47479fd676a0411936cc371643225cc", size = 432637, upload-time = "2026-03-31T21:58:46.167Z" }, - { url = "https://files.pythonhosted.org/packages/c0/1b/ac685a8882896acf0f6b31d689e3792199cfe7aba37969fa91da63a7fa27/aiohttp-3.13.5-cp313-cp313-win_amd64.whl", hash = "sha256:69f571de7500e0557801c0b51f4780482c0ec5fe2ac851af5a92cfce1af1cb83", size = 458896, upload-time = "2026-03-31T21:58:48.119Z" }, - { url = "https://files.pythonhosted.org/packages/5d/ce/46572759afc859e867a5bc8ec3487315869013f59281ce61764f76d879de/aiohttp-3.13.5-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:eb4639f32fd4a9904ab8fb45bf3383ba71137f3d9d4ba25b3b3f3109977c5b8c", size = 745721, upload-time = "2026-03-31T21:58:50.229Z" }, - { url = "https://files.pythonhosted.org/packages/13/fe/8a2efd7626dbe6049b2ef8ace18ffda8a4dfcbe1bcff3ac30c0c7575c20b/aiohttp-3.13.5-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:7e5dc4311bd5ac493886c63cbf76ab579dbe4641268e7c74e48e774c74b6f2be", size = 497663, upload-time = "2026-03-31T21:58:52.232Z" }, - { url = "https://files.pythonhosted.org/packages/9b/91/cc8cc78a111826c54743d88651e1687008133c37e5ee615fee9b57990fac/aiohttp-3.13.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:756c3c304d394977519824449600adaf2be0ccee76d206ee339c5e76b70ded25", size = 499094, upload-time = "2026-03-31T21:58:54.566Z" }, - { url = "https://files.pythonhosted.org/packages/0a/33/a8362cb15cf16a3af7e86ed11962d5cd7d59b449202dc576cdc731310bde/aiohttp-3.13.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ecc26751323224cf8186efcf7fbcbc30f4e1d8c7970659daf25ad995e4032a56", size = 1726701, upload-time = "2026-03-31T21:58:56.864Z" }, - { url = "https://files.pythonhosted.org/packages/45/0c/c091ac5c3a17114bd76cbf85d674650969ddf93387876cf67f754204bd77/aiohttp-3.13.5-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:10a75acfcf794edf9d8db50e5a7ec5fc818b2a8d3f591ce93bc7b1210df016d2", size = 1683360, upload-time = "2026-03-31T21:58:59.072Z" }, - { url = "https://files.pythonhosted.org/packages/23/73/bcee1c2b79bc275e964d1446c55c54441a461938e70267c86afaae6fba27/aiohttp-3.13.5-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0f7a18f258d124cd678c5fe072fe4432a4d5232b0657fca7c1847f599233c83a", size = 1773023, upload-time = "2026-03-31T21:59:01.776Z" }, - { url = "https://files.pythonhosted.org/packages/c7/ef/720e639df03004fee2d869f771799d8c23046dec47d5b81e396c7cda583a/aiohttp-3.13.5-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:df6104c009713d3a89621096f3e3e88cc323fd269dbd7c20afe18535094320be", size = 1853795, upload-time = "2026-03-31T21:59:04.568Z" }, - { url = "https://files.pythonhosted.org/packages/bd/c9/989f4034fb46841208de7aeeac2c6d8300745ab4f28c42f629ba77c2d916/aiohttp-3.13.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:241a94f7de7c0c3b616627aaad530fe2cb620084a8b144d3be7b6ecfe95bae3b", size = 1730405, upload-time = "2026-03-31T21:59:07.221Z" }, - { url = "https://files.pythonhosted.org/packages/ce/75/ee1fd286ca7dc599d824b5651dad7b3be7ff8d9a7e7b3fe9820d9180f7db/aiohttp-3.13.5-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c974fb66180e58709b6fc402846f13791240d180b74de81d23913abe48e96d94", size = 1558082, upload-time = "2026-03-31T21:59:09.484Z" }, - { url = "https://files.pythonhosted.org/packages/c3/20/1e9e6650dfc436340116b7aa89ff8cb2bbdf0abc11dfaceaad8f74273a10/aiohttp-3.13.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:6e27ea05d184afac78aabbac667450c75e54e35f62238d44463131bd3f96753d", size = 1692346, upload-time = "2026-03-31T21:59:12.068Z" }, - { url = "https://files.pythonhosted.org/packages/d8/40/8ebc6658d48ea630ac7903912fe0dd4e262f0e16825aa4c833c56c9f1f56/aiohttp-3.13.5-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:a79a6d399cef33a11b6f004c67bb07741d91f2be01b8d712d52c75711b1e07c7", size = 1698891, upload-time = "2026-03-31T21:59:14.552Z" }, - { url = "https://files.pythonhosted.org/packages/d8/78/ea0ae5ec8ba7a5c10bdd6e318f1ba5e76fcde17db8275188772afc7917a4/aiohttp-3.13.5-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:c632ce9c0b534fbe25b52c974515ed674937c5b99f549a92127c85f771a78772", size = 1742113, upload-time = "2026-03-31T21:59:17.068Z" }, - { url = "https://files.pythonhosted.org/packages/8a/66/9d308ed71e3f2491be1acb8769d96c6f0c47d92099f3bc9119cada27b357/aiohttp-3.13.5-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:fceedde51fbd67ee2bcc8c0b33d0126cc8b51ef3bbde2f86662bd6d5a6f10ec5", size = 1553088, upload-time = "2026-03-31T21:59:19.541Z" }, - { url = "https://files.pythonhosted.org/packages/da/a6/6cc25ed8dfc6e00c90f5c6d126a98e2cf28957ad06fa1036bd34b6f24a2c/aiohttp-3.13.5-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:f92995dfec9420bb69ae629abf422e516923ba79ba4403bc750d94fb4a6c68c1", size = 1757976, upload-time = "2026-03-31T21:59:22.311Z" }, - { url = "https://files.pythonhosted.org/packages/c1/2b/cce5b0ffe0de99c83e5e36d8f828e4161e415660a9f3e58339d07cce3006/aiohttp-3.13.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:20ae0ff08b1f2c8788d6fb85afcb798654ae6ba0b747575f8562de738078457b", size = 1712444, upload-time = "2026-03-31T21:59:24.635Z" }, - { url = "https://files.pythonhosted.org/packages/6c/cf/9e1795b4160c58d29421eafd1a69c6ce351e2f7c8d3c6b7e4ca44aea1a5b/aiohttp-3.13.5-cp314-cp314-win32.whl", hash = "sha256:b20df693de16f42b2472a9c485e1c948ee55524786a0a34345511afdd22246f3", size = 438128, upload-time = "2026-03-31T21:59:27.291Z" }, - { url = "https://files.pythonhosted.org/packages/22/4d/eaedff67fc805aeba4ba746aec891b4b24cebb1a7d078084b6300f79d063/aiohttp-3.13.5-cp314-cp314-win_amd64.whl", hash = "sha256:f85c6f327bf0b8c29da7d93b1cabb6363fb5e4e160a32fa241ed2dce21b73162", size = 464029, upload-time = "2026-03-31T21:59:29.429Z" }, - { url = "https://files.pythonhosted.org/packages/79/11/c27d9332ee20d68dd164dc12a6ecdef2e2e35ecc97ed6cf0d2442844624b/aiohttp-3.13.5-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:1efb06900858bb618ff5cee184ae2de5828896c448403d51fb633f09e109be0a", size = 778758, upload-time = "2026-03-31T21:59:31.547Z" }, - { url = "https://files.pythonhosted.org/packages/04/fb/377aead2e0a3ba5f09b7624f702a964bdf4f08b5b6728a9799830c80041e/aiohttp-3.13.5-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:fee86b7c4bd29bdaf0d53d14739b08a106fdda809ca5fe032a15f52fae5fe254", size = 512883, upload-time = "2026-03-31T21:59:34.098Z" }, - { url = "https://files.pythonhosted.org/packages/bb/a6/aa109a33671f7a5d3bd78b46da9d852797c5e665bfda7d6b373f56bff2ec/aiohttp-3.13.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:20058e23909b9e65f9da62b396b77dfa95965cbe840f8def6e572538b1d32e36", size = 516668, upload-time = "2026-03-31T21:59:36.497Z" }, - { url = "https://files.pythonhosted.org/packages/79/b3/ca078f9f2fa9563c36fb8ef89053ea2bb146d6f792c5104574d49d8acb63/aiohttp-3.13.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8cf20a8d6868cb15a73cab329ffc07291ba8c22b1b88176026106ae39aa6df0f", size = 1883461, upload-time = "2026-03-31T21:59:38.723Z" }, - { url = "https://files.pythonhosted.org/packages/b7/e3/a7ad633ca1ca497b852233a3cce6906a56c3225fb6d9217b5e5e60b7419d/aiohttp-3.13.5-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:330f5da04c987f1d5bdb8ae189137c77139f36bd1cb23779ca1a354a4b027800", size = 1747661, upload-time = "2026-03-31T21:59:41.187Z" }, - { url = "https://files.pythonhosted.org/packages/33/b9/cd6fe579bed34a906d3d783fe60f2fa297ef55b27bb4538438ee49d4dc41/aiohttp-3.13.5-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6f1cbf0c7926d315c3c26c2da41fd2b5d2fe01ac0e157b78caefc51a782196cf", size = 1863800, upload-time = "2026-03-31T21:59:43.84Z" }, - { url = "https://files.pythonhosted.org/packages/c0/3f/2c1e2f5144cefa889c8afd5cf431994c32f3b29da9961698ff4e3811b79a/aiohttp-3.13.5-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:53fc049ed6390d05423ba33103ded7281fe897cf97878f369a527070bd95795b", size = 1958382, upload-time = "2026-03-31T21:59:46.187Z" }, - { url = "https://files.pythonhosted.org/packages/66/1d/f31ec3f1013723b3babe3609e7f119c2c2fb6ef33da90061a705ef3e1bc8/aiohttp-3.13.5-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:898703aa2667e3c5ca4c54ca36cd73f58b7a38ef87a5606414799ebce4d3fd3a", size = 1803724, upload-time = "2026-03-31T21:59:48.656Z" }, - { url = "https://files.pythonhosted.org/packages/0e/b4/57712dfc6f1542f067daa81eb61da282fab3e6f1966fca25db06c4fc62d5/aiohttp-3.13.5-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0494a01ca9584eea1e5fbd6d748e61ecff218c51b576ee1999c23db7066417d8", size = 1640027, upload-time = "2026-03-31T21:59:51.284Z" }, - { url = "https://files.pythonhosted.org/packages/25/3c/734c878fb43ec083d8e31bf029daae1beafeae582d1b35da234739e82ee7/aiohttp-3.13.5-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:6cf81fe010b8c17b09495cbd15c1d35afbc8fb405c0c9cf4738e5ae3af1d65be", size = 1806644, upload-time = "2026-03-31T21:59:53.753Z" }, - { url = "https://files.pythonhosted.org/packages/20/a5/f671e5cbec1c21d044ff3078223f949748f3a7f86b14e34a365d74a5d21f/aiohttp-3.13.5-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:c564dd5f09ddc9d8f2c2d0a301cd30a79a2cc1b46dd1a73bef8f0038863d016b", size = 1791630, upload-time = "2026-03-31T21:59:56.239Z" }, - { url = "https://files.pythonhosted.org/packages/0b/63/fb8d0ad63a0b8a99be97deac8c04dacf0785721c158bdf23d679a87aa99e/aiohttp-3.13.5-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:2994be9f6e51046c4f864598fd9abeb4fba6e88f0b2152422c9666dcd4aea9c6", size = 1809403, upload-time = "2026-03-31T21:59:59.103Z" }, - { url = "https://files.pythonhosted.org/packages/59/0c/bfed7f30662fcf12206481c2aac57dedee43fe1c49275e85b3a1e1742294/aiohttp-3.13.5-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:157826e2fa245d2ef46c83ea8a5faf77ca19355d278d425c29fda0beb3318037", size = 1634924, upload-time = "2026-03-31T22:00:02.116Z" }, - { url = "https://files.pythonhosted.org/packages/17/d6/fd518d668a09fd5a3319ae5e984d4d80b9a4b3df4e21c52f02251ef5a32e/aiohttp-3.13.5-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:a8aca50daa9493e9e13c0f566201a9006f080e7c50e5e90d0b06f53146a54500", size = 1836119, upload-time = "2026-03-31T22:00:04.756Z" }, - { url = "https://files.pythonhosted.org/packages/78/b7/15fb7a9d52e112a25b621c67b69c167805cb1f2ab8f1708a5c490d1b52fe/aiohttp-3.13.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:3b13560160d07e047a93f23aaa30718606493036253d5430887514715b67c9d9", size = 1772072, upload-time = "2026-03-31T22:00:07.494Z" }, - { url = "https://files.pythonhosted.org/packages/7e/df/57ba7f0c4a553fc2bd8b6321df236870ec6fd64a2a473a8a13d4f733214e/aiohttp-3.13.5-cp314-cp314t-win32.whl", hash = "sha256:9a0f4474b6ea6818b41f82172d799e4b3d29e22c2c520ce4357856fced9af2f8", size = 471819, upload-time = "2026-03-31T22:00:10.277Z" }, - { url = "https://files.pythonhosted.org/packages/62/29/2f8418269e46454a26171bfdd6a055d74febf32234e474930f2f60a17145/aiohttp-3.13.5-cp314-cp314t-win_amd64.whl", hash = "sha256:18a2f6c1182c51baa1d28d68fea51513cb2a76612f038853c0ad3c145423d3d9", size = 505441, upload-time = "2026-03-31T22:00:12.791Z" }, + { url = "https://files.pythonhosted.org/packages/67/47/7727bfe8db93f8835a001bd4359d8480cc68d1259b8bce334668f8be97bd/aiohttp-3.14.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:54bf3522d6f7351e55f89a62d5c2bf138ad557b031670266c5df604ae88e0b5a", size = 759147, upload-time = "2026-06-01T19:37:12.918Z" }, + { url = "https://files.pythonhosted.org/packages/eb/f2/cd3fedff6fade73d71df9ec908c210cec518ef90fd00289250684b90aecf/aiohttp-3.14.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0746d9fb0ac4fdef643a84494efe3f06d50335dd8c7a530228b86448aae0a803", size = 513705, upload-time = "2026-06-01T19:37:14.633Z" }, + { url = "https://files.pythonhosted.org/packages/5a/fe/49746b6b610144a06323bebd8e1211a390310d8c69b98dd6d52df341bc3e/aiohttp-3.14.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9f3a96b6d39a4872222beee72e1df41d2ff886ae96152cf3e757ef8c5673ef0e", size = 509627, upload-time = "2026-06-01T19:37:16.385Z" }, + { url = "https://files.pythonhosted.org/packages/4c/3f/28f2f6cf3d5c0e7b01b27140d0e7873fd11fb341169ad3ce78ad04aba628/aiohttp-3.14.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d336820adbb914debbc90a1d8c1bfc4bea55996aecf64866a989d35d1f9fd903", size = 1769293, upload-time = "2026-06-01T19:37:18.067Z" }, + { url = "https://files.pythonhosted.org/packages/97/6f/2e5f1b525d5474b12b3c60abf733a755845f3bceff21542081ada515f837/aiohttp-3.14.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:71b2604c9bfc1b115547d63a094d5244b3f02799833513a99a68aaa7b167c4cb", size = 1732363, upload-time = "2026-06-01T19:37:20.138Z" }, + { url = "https://files.pythonhosted.org/packages/a8/ce/596120faa85ca7b19cd061e3f2f3be23aa8f11a0aedf9191db9e0da1bd76/aiohttp-3.14.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:610d68800435903e303ca0542b9d3e4eb72a12ff33a6d471a070c1d81eebd3c2", size = 1840375, upload-time = "2026-06-01T19:37:22.104Z" }, + { url = "https://files.pythonhosted.org/packages/72/3c/a7ffe05a757a4a7867643da69357ec41f506879fbd1b231d2ed90af246b2/aiohttp-3.14.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:514db9a79337068981ee2137310283a07b4b885c584991097a91a4da419bcb81", size = 1921484, upload-time = "2026-06-01T19:37:24.068Z" }, + { url = "https://files.pythonhosted.org/packages/93/fa/2c861170bbd4a491de93a69e081db1d971092569e0d593a98ef62c384dc1/aiohttp-3.14.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c452d17eeb95d563fc8b936f3050301dbd1d268126c4632d8b70ede9696202ee", size = 1774153, upload-time = "2026-06-01T19:37:26.256Z" }, + { url = "https://files.pythonhosted.org/packages/9d/da/1d2f5a165f47ec9b1f69d37b8b977fdc4d501aa72ffb7930db27bb9e49ea/aiohttp-3.14.0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ed94a81506e3d1bdbad5108f497a58f2a2354aedb4ca314d5326f07d1fd1ac2d", size = 1632569, upload-time = "2026-06-01T19:37:28.192Z" }, + { url = "https://files.pythonhosted.org/packages/46/1d/7a6e295c4257252f70f69e90864fdad74b6a1293054fb3f9e65a15de6d63/aiohttp-3.14.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1394dce36e0f0d260ac0b555a654de19cb989f3c1b8bdd24f505314dfea18a00", size = 1740325, upload-time = "2026-06-01T19:37:30.08Z" }, + { url = "https://files.pythonhosted.org/packages/f1/7e/e1899b1ca3ec62f1eab2a5cbde14039b97493f7f53eb88d9b668562ffa8d/aiohttp-3.14.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:d1467d1e7b48a73ca7237e0ee4335f3d02b923dbc27b82fd254bc301c97d4026", size = 1748691, upload-time = "2026-06-01T19:37:32.211Z" }, + { url = "https://files.pythonhosted.org/packages/ec/54/4e6b61c1fe7d3433f82bcc6bd7e4d7c683a742a10c9b12a025fd3695c047/aiohttp-3.14.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6a5f3532125233c261cf61f32df4059cfcf482eb793c7d3db8452e3142028b86", size = 1814477, upload-time = "2026-06-01T19:37:34.173Z" }, + { url = "https://files.pythonhosted.org/packages/9c/38/86fd51be2e08d8e45c83d879d255f10391903cd9fe2a16512f7591a15873/aiohttp-3.14.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:3ea81eb518a2ecb319d8ec6d1424a37c773f6634bd87d6985eb606b2faac419f", size = 1623393, upload-time = "2026-06-01T19:37:36.281Z" }, + { url = "https://files.pythonhosted.org/packages/78/49/466e947a42a88ee23c486d036e7e5d1b097f1bafd8084ad9c9a0a92f0f43/aiohttp-3.14.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:32e735c3182de7b64f6941a4ede48b38c7f47d9437bd615dd30b5bda8fa1bc93", size = 1824097, upload-time = "2026-06-01T19:37:38.421Z" }, + { url = "https://files.pythonhosted.org/packages/f3/89/35f3410bc284682338a1be6b6ea0c5abfa05f063942cfaa9256608440434/aiohttp-3.14.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c21ca9a1c63d4509158f478aeb9d02914dcc52adc68d1bc9dee2452284ee5996", size = 1764790, upload-time = "2026-06-01T19:37:40.755Z" }, + { url = "https://files.pythonhosted.org/packages/42/80/2d4291bd5724d3d17e5951aff5a3e02281483fb47295f0788276ee66cd73/aiohttp-3.14.0-cp311-cp311-win32.whl", hash = "sha256:19ca5fc84130675ba11c6ca5c7da5cb65f7bf8a32cdd2b616bf49cd334688aae", size = 454176, upload-time = "2026-06-01T19:37:42.837Z" }, + { url = "https://files.pythonhosted.org/packages/59/ed/41d0ad4f6ececffc32bdf1f7b494e5498f7ca5c849ea2e3cc9bbd1668251/aiohttp-3.14.0-cp311-cp311-win_amd64.whl", hash = "sha256:d488e6e9d3bb8ba5ae7066d5be885ae9670eba021b8c6ccb9a3a568e6b19d6e5", size = 479334, upload-time = "2026-06-01T19:37:44.776Z" }, + { url = "https://files.pythonhosted.org/packages/d1/86/c0b5e305c770053f8c3d069bb52b8196917ba91949d1962d52eb307fb0d2/aiohttp-3.14.0-cp311-cp311-win_arm64.whl", hash = "sha256:8b93618102caf12801638a01a2b478a55410ddd71bd41cfaf6f707953a49ac43", size = 450262, upload-time = "2026-06-01T19:37:46.461Z" }, + { url = "https://files.pythonhosted.org/packages/89/97/2b6889bfb6b6847520d50d95eb8c4307a45e28aaca39faf4a9454b3d1b2f/aiohttp-3.14.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:b29518c9c2ec7e373e68259206a137c7f4f5439c58baaec4b5ab3ab799850a4e", size = 750194, upload-time = "2026-06-01T19:37:48.164Z" }, + { url = "https://files.pythonhosted.org/packages/21/e2/62634b7fff918ed98c3c6b2f0e70d520f7f28846cb412d451b04354c6459/aiohttp-3.14.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:dbec68ce61b64cb73cab4d33df9433427b1713c8bcccb181dce695c1b6f8e87c", size = 506966, upload-time = "2026-06-01T19:37:50.014Z" }, + { url = "https://files.pythonhosted.org/packages/dd/fb/5ce075150828c797a5106f1c2fb26034e709d4289b9d2bf8b07f1e59fac6/aiohttp-3.14.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3cdf534aa455593e589302990c5097aa5c92c06c4262a20da22934f9186a5fff", size = 507527, upload-time = "2026-06-01T19:37:51.96Z" }, + { url = "https://files.pythonhosted.org/packages/01/d5/405a0ae4e6b081754a3609c1c97c63a950e000a2def16046f1e736933a0e/aiohttp-3.14.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cb6c657104393b5fbff01a5f59b2023db74058a8077d94475d6c25d03882a108", size = 1762420, upload-time = "2026-06-01T19:37:53.839Z" }, + { url = "https://files.pythonhosted.org/packages/ae/1d/e05a7c896b15a6bc6fb8fc5319eb437861c2c49c34559ef928add6590315/aiohttp-3.14.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:46fbbec4e4fab7428d4396a3823f9320e4560aa3113b89eeebce712c27c9ed5a", size = 1733672, upload-time = "2026-06-01T19:37:55.791Z" }, + { url = "https://files.pythonhosted.org/packages/cc/22/a72f7c459e195fa41bf4f7abd1f925b91fe91f8097e51c654229ba144a33/aiohttp-3.14.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2c2c7e05dd5335b298085abf45ddf98673934c3ee1c083d0b9ea13d4186ad500", size = 1805064, upload-time = "2026-06-01T19:37:57.931Z" }, + { url = "https://files.pythonhosted.org/packages/80/50/e85bdaba0be59ca4838005ebfef4048fcdd5f35a02b07057a9a123394440/aiohttp-3.14.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3c7139100fbaae76515b73051d8f0aa3a3ff02e415eec8a8eee8e2223d9ba955", size = 1902125, upload-time = "2026-06-01T19:38:00.225Z" }, + { url = "https://files.pythonhosted.org/packages/19/d8/51de5c6b971c27bb1ef620293b8d1ca611ec78736b34b3f6ccf68e4c8785/aiohttp-3.14.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:78d6f9286a629ce52728430afe18f8ed2b6c39a1fddb3802d7244b9983910ad2", size = 1783112, upload-time = "2026-06-01T19:38:02.641Z" }, + { url = "https://files.pythonhosted.org/packages/73/ae/b4402bfde77e43dfb1b6ccff83c7b7ab63ed06b50c4754f0c5423fb374fe/aiohttp-3.14.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cc3c3e12cdaeb92d7dcf13db00e9f6b1956b910e47256e696df1cfa946d02159", size = 1586356, upload-time = "2026-06-01T19:38:04.637Z" }, + { url = "https://files.pythonhosted.org/packages/bc/05/750a3265ca4dc54a460bd0cb1121a8f2ce9171fce4a135fb47ea7fd594d2/aiohttp-3.14.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4d6a998191f5ebe3b8c28463ff72bc030250008b3193c402464efadd08b5ca02", size = 1723119, upload-time = "2026-06-01T19:38:06.713Z" }, + { url = "https://files.pythonhosted.org/packages/37/01/8c0812c50b3b1b1c37b323bf170d6be8847a8f234060485b7d1e71953f60/aiohttp-3.14.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:0fc2b75ae8d169d853be2862d960be8550da6c5c65711d5476407eb3fdb006bd", size = 1757216, upload-time = "2026-06-01T19:38:08.736Z" }, + { url = "https://files.pythonhosted.org/packages/47/2a/50fb98028a26887cbe48dcc1df92a90825615bc73b5584301304090cded8/aiohttp-3.14.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:16eee56bcc72d04600bc56c1759982c2385ec0b41d3fd3521f836bf64a0957ef", size = 1770500, upload-time = "2026-06-01T19:38:11.111Z" }, + { url = "https://files.pythonhosted.org/packages/bd/32/0ffd598a2fa2b9a423daf242e700cfdabda35d6e602394ad9ae58972c1c7/aiohttp-3.14.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:5a2e7ca615c3ddc15b82687e05a624e5f5cba3f1d6c20cb81172d70ea498451e", size = 1576224, upload-time = "2026-06-01T19:38:13.391Z" }, + { url = "https://files.pythonhosted.org/packages/0b/f9/b9fc381dd9b66afb33f2634c40e229d106467be0afcabe79648631ab6712/aiohttp-3.14.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:f0b7b8bbbec3ce9467ee0ebe334622fd90624f593edd3136c567811453fc4fae", size = 1794252, upload-time = "2026-06-01T19:38:15.498Z" }, + { url = "https://files.pythonhosted.org/packages/a8/fb/05d9214c975f23225a8cd5c439325e338c7c377b315480ef3871db51f54e/aiohttp-3.14.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5ba10966d4f03dd96a14365be4b8e37c327c76f11c3ca867116966cdd9f98066", size = 1760193, upload-time = "2026-06-01T19:38:17.624Z" }, + { url = "https://files.pythonhosted.org/packages/d9/4b/02992fc4fb9e1b6673ee3f888a8e587a6447afda1f6f4aca776c148c2876/aiohttp-3.14.0-cp312-cp312-win32.whl", hash = "sha256:101df7779c80c0636014a6b2c6642acd3efb5b355d48347c9d7dfb720aee9430", size = 448650, upload-time = "2026-06-01T19:38:19.545Z" }, + { url = "https://files.pythonhosted.org/packages/39/e9/246532214c3abda518477cbaaf16d420295ad8effa5233844cbb38f299ab/aiohttp-3.14.0-cp312-cp312-win_amd64.whl", hash = "sha256:b0a5747586d4467efd1f932710b269131c9717a872dce082cd92a00c1c13123a", size = 476145, upload-time = "2026-06-01T19:38:21.505Z" }, + { url = "https://files.pythonhosted.org/packages/2b/c3/63f8c20090048915711598b0adf475b149216d736157961de06480a45b15/aiohttp-3.14.0-cp312-cp312-win_arm64.whl", hash = "sha256:5f1c5be60add78fabb4aacd13c5a348ae79d2fcbfc7fa78da8f1eb192273b370", size = 444250, upload-time = "2026-06-01T19:38:24.027Z" }, + { url = "https://files.pythonhosted.org/packages/21/61/d11f7d9a3144bffe825247d6367cd93053666da50b94707c9129c78868d5/aiohttp-3.14.0-cp313-cp313-android_21_arm64_v8a.whl", hash = "sha256:25400d710641a8040bf022a8a99f579e581ffa1c5bd42c33255d7d6f3957c127", size = 502399, upload-time = "2026-06-01T19:38:25.955Z" }, + { url = "https://files.pythonhosted.org/packages/4f/9b/a7e317625d36356844f8bb022cabd305b541f968856cc3c2e0b58e53ee6e/aiohttp-3.14.0-cp313-cp313-android_21_x86_64.whl", hash = "sha256:c5492b9929826e07cc3fcb9739ae87aab05dff6b5e67a9b73fd1700c6d008981", size = 510068, upload-time = "2026-06-01T19:38:27.828Z" }, + { url = "https://files.pythonhosted.org/packages/11/41/cc2d2cfbfbdc3126ba258f3cd27d1ac8a33492ae3c35a4583ee21f0ba7f1/aiohttp-3.14.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:3366751d68d237c621264233a32f3078bbc21b7904ab90a77e03d21390c742c6", size = 481670, upload-time = "2026-06-01T19:38:29.836Z" }, + { url = "https://files.pythonhosted.org/packages/3c/07/381f4023c3b08cb616e520f566d8c58957abad54e56441d41fe67cfb0195/aiohttp-3.14.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:57ea07d28695a7a40304d42251892a8df765e5588c10ee32afeddcd5df33c0a2", size = 487591, upload-time = "2026-06-01T19:38:31.704Z" }, + { url = "https://files.pythonhosted.org/packages/fb/4d/4506fdb7a022bdf70011a3bbb4ca00c5c570026ef6a3c5bd7bc70c39089c/aiohttp-3.14.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:076cb014191ae2e65d949e1ad01f1dcfe33e32789b5172510f3e79c79fc04d50", size = 496503, upload-time = "2026-06-01T19:38:33.6Z" }, + { url = "https://files.pythonhosted.org/packages/ef/7d/c814111e04894a45d9e2defc94443879a6f118d9633d5fedfe6e2e8af5f0/aiohttp-3.14.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2f3fc37054564dee64a855b5b092d87ec35dcddfaabf7dacb1c8a2b1f83dc0a9", size = 745870, upload-time = "2026-06-01T19:38:36.013Z" }, + { url = "https://files.pythonhosted.org/packages/c6/ee/80eee0efddfe187e7cd05027086b7ce1c0e492e82a4eda58f5c5543a44a0/aiohttp-3.14.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8fcaef74d2ab0f607d7ff85a0d15e21bb5a258c4a58df1908396eb50d7f4ed3c", size = 505588, upload-time = "2026-06-01T19:38:38.282Z" }, + { url = "https://files.pythonhosted.org/packages/d6/f8/0f28f04eef75d52fc9c715dde7ce9c0abb810fd20cfeb0fea7afd2ab1e98/aiohttp-3.14.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e4c01b0bfc6209590960e68eac083cd22d5d87c21f974dd6208cafa5d3542bc8", size = 504492, upload-time = "2026-06-01T19:38:40.611Z" }, + { url = "https://files.pythonhosted.org/packages/ff/db/44c755232085545065c94378dfce38641b1aee647f4939fcd32f5b32e719/aiohttp-3.14.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f12eb7896e81caf403a2b18c9406426f1207361e7239c057ab29c076d4257e83", size = 1752111, upload-time = "2026-06-01T19:38:42.682Z" }, + { url = "https://files.pythonhosted.org/packages/5e/6a/42e030a46743841414402a3b00cd3d78419055e86c66fb5822c14b5abfc6/aiohttp-3.14.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6c79a044cacf360ec46738d863d2f41c9300d2a06ef4a7402ea0df306a350e61", size = 1729674, upload-time = "2026-06-01T19:38:44.79Z" }, + { url = "https://files.pythonhosted.org/packages/34/26/3199beb415202e3108e7b83ecebe10914d806d33fb9860c3e4aa60a19be3/aiohttp-3.14.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:85e0675f47be4eff0636bf88c02140ea89168ae0df3ff1f3f464e9de9610d277", size = 1798808, upload-time = "2026-06-01T19:38:47.01Z" }, + { url = "https://files.pythonhosted.org/packages/bd/94/b9b6fcf0ee17c21d0d19fb8c22bf83ad18f82e702a9c3bd901a868f5e446/aiohttp-3.14.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7b33e751cab03fdc960095b1e326cb5a03f5ee577d6ded59f3d1c100f8668882", size = 1891921, upload-time = "2026-06-01T19:38:49.233Z" }, + { url = "https://files.pythonhosted.org/packages/c5/a3/3800dbd095cb2bb165a7ea5d94d790914677e27f45638c7d80e3f34c8945/aiohttp-3.14.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:26d9224c6dd7f5c749aba4f61315a894601448b28d94d12f4dea0903e26d2096", size = 1777241, upload-time = "2026-06-01T19:38:52.04Z" }, + { url = "https://files.pythonhosted.org/packages/21/2a/45be91ad1b860508557448d4cc2e165a2ee68dd865657b73bf66cc5a00fb/aiohttp-3.14.0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6281aecdf2732940f4fe06bd6adec5ae4d59b78b080b8e3a6b81467301010988", size = 1579554, upload-time = "2026-06-01T19:38:54.508Z" }, + { url = "https://files.pythonhosted.org/packages/b4/3d/dc94df99ed1511fdf28314f722643ed334112643cab00223577085e788c4/aiohttp-3.14.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:23e8314e7aed8576fbe33314d218bd81447a3adbc91dc36f1163bf583cd3084c", size = 1714864, upload-time = "2026-06-01T19:38:56.788Z" }, + { url = "https://files.pythonhosted.org/packages/ae/e4/1f1c8acbb3acd5c8f795473b92c9c3d44eb60a5692c6104256c8a1c83a0c/aiohttp-3.14.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3b54fbff46127aeafdd764cecd0d99fa2f24a0e37ea5c18a7c3a4ac450df1db3", size = 1749803, upload-time = "2026-06-01T19:38:59.367Z" }, + { url = "https://files.pythonhosted.org/packages/0b/c8/c45ea6e7ed84cebba939b9c334498a045ba19d79c61b0110df5f21580de3/aiohttp-3.14.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:b27d89af91a555f58e08e4902dbcbc48862fd40095720ca705990476bd93b7ac", size = 1765023, upload-time = "2026-06-01T19:39:01.651Z" }, + { url = "https://files.pythonhosted.org/packages/a8/a1/a932941784432962fe390e1066823aaef64b4e5ac9fa595df57b5fe472a9/aiohttp-3.14.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:25d2326a4967bf705a9f9913a13005e93b6020ad8a9f6bd6bd78850d5171332e", size = 1571671, upload-time = "2026-06-01T19:39:04.044Z" }, + { url = "https://files.pythonhosted.org/packages/b0/01/e1280feac522597a4d46eb67a0cdfa053cfae263033030b761ab146f29fb/aiohttp-3.14.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:a1d209375c503472b3c0a340cdf3c55fcd82e84b46dda7caeaced59faba373ec", size = 1789904, upload-time = "2026-06-01T19:39:06.294Z" }, + { url = "https://files.pythonhosted.org/packages/fa/10/ab28818262f4d26bdb47ed5f1fc7999b69e2fc6e0370b02d0f49011f45ea/aiohttp-3.14.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:666c7c5036df57b693026398b69b41874a1931ac5b3485fd910e57bfac253869", size = 1754516, upload-time = "2026-06-01T19:39:08.788Z" }, + { url = "https://files.pythonhosted.org/packages/af/cc/c122eabd7a1b7e0c9bbdd6be60e4715905b858399145d9df872bb94f1427/aiohttp-3.14.0-cp313-cp313-win32.whl", hash = "sha256:23f094a1ef64823fd35854ddf5c7a80a078162f37f9d2f7c6142b51a6affa456", size = 448656, upload-time = "2026-06-01T19:39:11.171Z" }, + { url = "https://files.pythonhosted.org/packages/41/a5/bab07d79848a00eedd8ed979ccb302aaea3ac6eb9fa16bd0ed87135869b4/aiohttp-3.14.0-cp313-cp313-win_amd64.whl", hash = "sha256:e03abdaa17d553f17e1d1d06bb266b3970106c78051d06795723e748d8e49d11", size = 475803, upload-time = "2026-06-01T19:39:13.439Z" }, + { url = "https://files.pythonhosted.org/packages/d1/a0/f03ade8566c153666a3871afccbedf6d99911da006325e1fc6cf72a2de99/aiohttp-3.14.0-cp313-cp313-win_arm64.whl", hash = "sha256:acdb400538cf4769543548bb5d1eb23d39bed4f96554a6078cb728c7cb2c268b", size = 443889, upload-time = "2026-06-01T19:39:15.945Z" }, + { url = "https://files.pythonhosted.org/packages/28/03/5f36ab196a88ba5e9648ae5643e6531e67a3a8c0e96f9c6510ff41540fec/aiohttp-3.14.0-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:363ef9e91014e7891679bfb2ac0a7c6ea93435dbbfd10ecf41b9f06fcf506c5f", size = 503330, upload-time = "2026-06-01T19:39:18.195Z" }, + { url = "https://files.pythonhosted.org/packages/2c/ce/8b49ec2f30f68e02f314f4832186cd45e583360a5a386058be36855d23b6/aiohttp-3.14.0-cp314-cp314-android_24_x86_64.whl", hash = "sha256:884a4edbdad77be9d0ef36142c8b504351b170df0bf62b51e784fadabf311c42", size = 509822, upload-time = "2026-06-01T19:39:20.396Z" }, + { url = "https://files.pythonhosted.org/packages/1a/fe/6edbf5d39bf29322b6816365b17ed8ede4dace164a3aea1abcd30110eb78/aiohttp-3.14.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:70ea956f6cc4a37620966b56c2e205d88ca3e6d85ec063277e414b1035cddad3", size = 483329, upload-time = "2026-06-01T19:39:22.607Z" }, + { url = "https://files.pythonhosted.org/packages/1b/5a/fae531bdbc6456fb6241f46b7b81e4d8a0dd3fc09118a0055dc7141ac1ec/aiohttp-3.14.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:ea3b9806c89f61da22fddf1f12dd524fb368e5e28f1261fbdafe5c3cd8ce893b", size = 489502, upload-time = "2026-06-01T19:39:24.881Z" }, + { url = "https://files.pythonhosted.org/packages/36/f4/48a7b0414db7fed77a03d5dde34508c026afd83510ab6bca08c313855776/aiohttp-3.14.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:a071be341c2bd9b0188e62d173509f024e0a35b1c342c53c50f8daaeda8c3bd8", size = 497357, upload-time = "2026-06-01T19:39:27.197Z" }, + { url = "https://files.pythonhosted.org/packages/75/75/e85a13a370acc007fca5feb1fd1b88ac2d8426e6dadd625479b7cadd55a3/aiohttp-3.14.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:198cfe61bf253b19da1fb3e0fa122249dc4f14c12709493fed8054aa0411cc76", size = 750898, upload-time = "2026-06-01T19:39:29.563Z" }, + { url = "https://files.pythonhosted.org/packages/9e/e4/3d637f800c724eff0e2bed64df72557444482366fd0a35b0cec0e6968f6c/aiohttp-3.14.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:9dc203d6ce6b9106d54e2a93f41dfdfebfbca2d99962ba503bfd3e5921a6549e", size = 506986, upload-time = "2026-06-01T19:39:31.872Z" }, + { url = "https://files.pythonhosted.org/packages/1d/df/35161f3598bf7501d2b2a805b41ab4f45a2e34150c421bcb4ef8c0d281a7/aiohttp-3.14.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:9e19d17ab02bf16832a2c8c0d55a486792c5b1645665652ee9531aebcc30cb72", size = 508033, upload-time = "2026-06-01T19:39:34.137Z" }, + { url = "https://files.pythonhosted.org/packages/e5/39/b36e5d3d31e850fb4691dd3e941684ac490a2559249f6fa634b6b0fdf020/aiohttp-3.14.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d925fba0c14d5b498a8028b0107beebdfd16c5d48d702ff54f879cb017aaaca3", size = 1746213, upload-time = "2026-06-01T19:39:36.654Z" }, + { url = "https://files.pythonhosted.org/packages/b1/28/24e1409e605a9aa5d84abe0e2acb365354b70ae56d40948101cabe3341ab/aiohttp-3.14.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d33e61021222ce7f9792bcac870d6f58d8adfceda33ab857b01264f4560f2c5f", size = 1705862, upload-time = "2026-06-01T19:39:38.968Z" }, + { url = "https://files.pythonhosted.org/packages/8c/d0/e5eb3ff1daeaf644c7e36a957517672494122628e067c38b263fa04eda77/aiohttp-3.14.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:44eca38755d0105bb32f47d085f5dd449846a449e1245fc105889e3279dcf8e3", size = 1798909, upload-time = "2026-06-01T19:39:41.334Z" }, + { url = "https://files.pythonhosted.org/packages/d3/ba/8943f906f0570342886ababb9a722a44e360f786a028c5e0b0e29e3f735b/aiohttp-3.14.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f13087e06f68fea4941c21a0c541c00553aa16e4f8fd7bbe2b198df761e964d6", size = 1868892, upload-time = "2026-06-01T19:39:43.807Z" }, + { url = "https://files.pythonhosted.org/packages/3a/05/27df32c844b2156e1675a8d8ec22d963e3c8ba469ed7ceb1863320c7b521/aiohttp-3.14.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ff82be7f1ef73634cb77890a770743239bc3d487b848669be1c599889336dc0a", size = 1751659, upload-time = "2026-06-01T19:39:46.398Z" }, + { url = "https://files.pythonhosted.org/packages/7f/62/da182e5910ab912b2e88aa919b61a16046a37a95714a5795b02eb57b2d18/aiohttp-3.14.0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a150c0875ac8fd87f1c398650841308a30d65facf7416b12dbdb9cfdcbe5a48c", size = 1578775, upload-time = "2026-06-01T19:39:48.902Z" }, + { url = "https://files.pythonhosted.org/packages/66/e3/53c67097e8a5ce98625e91e3fa7f43c9c6940de680345d03b3509a72a078/aiohttp-3.14.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:edc01ea4e1ec5a1649a28866262bf24195889ff7b27bdd947029a6086741de9b", size = 1710090, upload-time = "2026-06-01T19:39:51.392Z" }, + { url = "https://files.pythonhosted.org/packages/dd/55/0e2732ca598c7a4dfe8a775662376d0ca2977cb1030e48386d4da5d9a456/aiohttp-3.14.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:540632bf882ff8fc88f2e1697be0761578e89e0d79fb4a8a6d65dc5da7e729d4", size = 1715016, upload-time = "2026-06-01T19:39:53.807Z" }, + { url = "https://files.pythonhosted.org/packages/5a/96/f0b73730798c9ca525afc30b39f1f81bbe24e245d9654c54d3b39d63212d/aiohttp-3.14.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:860a86bc2c80237f5dff52edcf427e10a8d8352271fd84845429a3e60199e02c", size = 1763810, upload-time = "2026-06-01T19:39:56.31Z" }, + { url = "https://files.pythonhosted.org/packages/71/cc/11acb6c4518f448323405a7312b6f255d0f974a34373ad1db7633c4aadc8/aiohttp-3.14.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:5cbd50e6a50d6b99283a826b18cbdebf65b0797689a7535cb0e9dd37be0f63c3", size = 1573064, upload-time = "2026-06-01T19:39:58.718Z" }, + { url = "https://files.pythonhosted.org/packages/de/2d/28c31dde0a7dc98c0ee7d0da2ddcec3f7688c4fc131e5989e278d0c03c0a/aiohttp-3.14.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:20144819e99db593e22bbd2f3f2691a5e149f879142d6b8670254708853ff4fb", size = 1775765, upload-time = "2026-06-01T19:40:01.195Z" }, + { url = "https://files.pythonhosted.org/packages/b8/69/155c4ef3aec96417d47024800472b33b16c5d8a665371dcd044c2afdf25d/aiohttp-3.14.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:26b6d79aa54cb4ed50cc7d41ed14e99e0f1fc8e7c2d42f2e05b37aea897b2b52", size = 1733716, upload-time = "2026-06-01T19:40:03.631Z" }, + { url = "https://files.pythonhosted.org/packages/5f/44/6126116fd8a316b712bb615660b855c78466bb67ba1bb1742427eafcf7ac/aiohttp-3.14.0-cp314-cp314-win32.whl", hash = "sha256:106ed074a856f3e21d186b8579e2c8afb6da598e267cdaab01059e13db2fc44d", size = 453684, upload-time = "2026-06-01T19:40:06.277Z" }, + { url = "https://files.pythonhosted.org/packages/a2/d7/eff4c58a88c5cac5e38b55f44fb8a6d3929c3cbd77356e383e094d3220bd/aiohttp-3.14.0-cp314-cp314-win_amd64.whl", hash = "sha256:4f770846edae8f00ecc57af825bce811f787f87a7dcf0e90d191790efe5b31f7", size = 481758, upload-time = "2026-06-01T19:40:08.653Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ed/17b5bd9fbcb46e688f02e572f517754a9a75831e7b54702f027761dc4fa5/aiohttp-3.14.0-cp314-cp314-win_arm64.whl", hash = "sha256:acf1581c4f21ed4b80a2dded504d87b055a071a84d5737ea966435f768275ac6", size = 450557, upload-time = "2026-06-01T19:40:11.03Z" }, + { url = "https://files.pythonhosted.org/packages/12/34/6180103ce9aabc8ebff3f7bb55a1228ffe60f61042823031d9692cb7b101/aiohttp-3.14.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:6aa1a40f9cbb3da9f80714c5966b8946c21e6a2530d809b9498b33161e3c8733", size = 787878, upload-time = "2026-06-01T19:40:13.401Z" }, + { url = "https://files.pythonhosted.org/packages/92/e9/08954a40e8b7baa3d8beadd2b074b186e9b1e9c8ddabc288678a6265de50/aiohttp-3.14.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:b62af5a8cc96a194eaa01a9ed7b34a3ffa58d3d8daaa1a0d7a749353ad12d228", size = 524400, upload-time = "2026-06-01T19:40:15.972Z" }, + { url = "https://files.pythonhosted.org/packages/08/6a/b5965a634ac4d5ba99a463314cf4ab214ca073fcdc38a15e0294273701fc/aiohttp-3.14.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:6eb63b1417efaf7d1002a6ad034a40d44376afcc16508a57f8e74b49ad26a095", size = 527904, upload-time = "2026-06-01T19:40:18.28Z" }, + { url = "https://files.pythonhosted.org/packages/06/b4/932bcdd850c354d9bcca30f360e475d7852e30413fbbd44b182782ed5432/aiohttp-3.14.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c20b9ad156a79eb97be5cf9e069eec01d2f0dc8472ffbd75299a8b2d4c2cbbde", size = 1912162, upload-time = "2026-06-01T19:40:20.825Z" }, + { url = "https://files.pythonhosted.org/packages/c6/85/ce79bab0310d2e3fd2d7bc7e44412abeff7c8338f8a21dd0f2f1714989e5/aiohttp-3.14.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:40ae7b0642c25632c7eabc4a04754012691864d2a1b93becf7cddb76027b838a", size = 1778813, upload-time = "2026-06-01T19:40:23.726Z" }, + { url = "https://files.pythonhosted.org/packages/05/54/ba62ac2d1bc87e010aad23751e383b8794e45d931df67677313a2da78823/aiohttp-3.14.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:95f5217e76a046b9f228a101717ef8d42b1eb3d9d196d15202db5bf41df88936", size = 1899969, upload-time = "2026-06-01T19:40:26.406Z" }, + { url = "https://files.pythonhosted.org/packages/dc/82/7cc7907725d83a19f31551334061e1ab8e108b1d7ac52632a2a844a4acb5/aiohttp-3.14.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1a4a9f17e85b80878c176695c1998c790e83731d8271881e5d356488652a1f9e", size = 1991771, upload-time = "2026-06-01T19:40:29.061Z" }, + { url = "https://files.pythonhosted.org/packages/d0/1c/a57de71a4508c93a830b77c28af3d08cd97f606dedfc6b94275347744508/aiohttp-3.14.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:145262119b07d7f95abc1839add35ba2bfc84551d4b4660ca11542c0b215455b", size = 1868606, upload-time = "2026-06-01T19:40:31.843Z" }, + { url = "https://files.pythonhosted.org/packages/9c/ae/3839726cd49150a53ed340cc24ce5ba09d4c2117020ef9d45542bec5eb2f/aiohttp-3.14.0-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:49a33ded29b0b2fa7a367a02cf0fb89af602bb87542a16177ec8ce1c9c51d12a", size = 1665437, upload-time = "2026-06-01T19:40:35.01Z" }, + { url = "https://files.pythonhosted.org/packages/35/1e/c237923232c7da7f0392ea25d89fc5e60c0e93f685f4ebca8e7bcdd5271c/aiohttp-3.14.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:2cc736a9c9fc2bc4dd71fd404815741b6573df27c3f985948ec4076989ac57de", size = 1834090, upload-time = "2026-06-01T19:40:37.733Z" }, + { url = "https://files.pythonhosted.org/packages/98/02/a5a7a2524f92d3911761b405a7c067c751891942144adc13e2ad79611e39/aiohttp-3.14.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:b4141a3e5342ee3053a9cab54d25b64ed28289c1041e4c54b3d99839314d90ce", size = 1816907, upload-time = "2026-06-01T19:40:40.46Z" }, + { url = "https://files.pythonhosted.org/packages/fa/76/a8b9f0d09234d516af9f2d7dd715557f33b5da3b0b56ead41d1170e86e3c/aiohttp-3.14.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:e30871b2d58996cb81aac52d2b1d15ac05257131ef0f90f18c2115a380fbfe7c", size = 1840382, upload-time = "2026-06-01T19:40:43.48Z" }, + { url = "https://files.pythonhosted.org/packages/c9/8e/140e715a0a4bbc211979ea30ec8396ad2ed5bf90ab87d8058fc4668b1923/aiohttp-3.14.0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:667b881d083ccae3900ea5a241e17e5007ca78844c53ed389bb63d48f729d9c7", size = 1659497, upload-time = "2026-06-01T19:40:46.265Z" }, + { url = "https://files.pythonhosted.org/packages/10/c7/7ba5de8af9650b9767b063c675427b8685f43fa7ce563673a7bc3af60f08/aiohttp-3.14.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:b584dfe615d151e9b8f0a8ecb3aee6147f2927ec5b95ba25fe621f5377510928", size = 1870829, upload-time = "2026-06-01T19:40:49.583Z" }, + { url = "https://files.pythonhosted.org/packages/cc/bc/2aaab2f85cadb26ea59c091fa2b8e370d625154b5c14b478f1b489d07551/aiohttp-3.14.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6199707cc40e0e9cd39c36fbc97bec416c704e1d0ddce03412bb3b3e6a90ccd0", size = 1832281, upload-time = "2026-06-01T19:40:52.303Z" }, + { url = "https://files.pythonhosted.org/packages/39/98/31b9ad9fbc01f0075ee7221002df5fd2d10b647f451ca5f30edc802d9dd6/aiohttp-3.14.0-cp314-cp314t-win32.whl", hash = "sha256:a8d93334d4961c9d566b1f046c81dee475b7c21eb730728d38237bfa70d1c8e6", size = 490597, upload-time = "2026-06-01T19:40:54.937Z" }, + { url = "https://files.pythonhosted.org/packages/59/1f/299b21441c8de42ff70fddc7cfe65e92f810abcf740739a09b56f7835364/aiohttp-3.14.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2d2ffe9b614f50f069068b3b52e73414e4107fc10b7efc939a76acff9251fdd2", size = 525789, upload-time = "2026-06-01T19:40:57.306Z" }, + { url = "https://files.pythonhosted.org/packages/70/11/7f83fcba9ee05d4c54d61b3f8104da0d43a59adac44dd28effc0c9a10422/aiohttp-3.14.0-cp314-cp314t-win_arm64.whl", hash = "sha256:7a3fc4358e65826c515350f199c210de747cf669998211b1ee6c2e46de364b24", size = 467399, upload-time = "2026-06-01T19:40:59.993Z" }, ] [[package]] From 81cf4caee19ae7c9eec693cb33f42bcb7cb046f8 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Thu, 4 Jun 2026 00:02:58 -0700 Subject: [PATCH 27/60] ci: don't persist GITHUB_TOKEN in checkout for regenerate workflow The read-only GITHUB_TOKEN was persisted into git config by actions/checkout, overriding the GitHub App token used by add-and-commit and causing the push to fail with 403. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/regenerate-library.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/regenerate-library.yml b/.github/workflows/regenerate-library.yml index 126def06..8b41daaa 100644 --- a/.github/workflows/regenerate-library.yml +++ b/.github/workflows/regenerate-library.yml @@ -50,6 +50,9 @@ jobs: - uses: actions/checkout@v6 with: ref: ${{ steps.branches.outputs.checkout_branch }} + # Don't persist the read-only GITHUB_TOKEN in git config; otherwise it + # overrides the App token below and the push is rejected with 403. + persist-credentials: false - name: Install uv uses: astral-sh/setup-uv@v7 From 8eb5606bc33a944c530b4f05be5138088db4d312 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Thu, 4 Jun 2026 00:09:58 -0700 Subject: [PATCH 28/60] ci: persist App token via checkout so regenerate push authenticates EndBug/add-and-commit's github_token input only does GitHub API user lookups; it does not configure push authentication. The push relies on whatever credential actions/checkout persisted. Generate the App token before checkout and pass it as checkout's token so the App credential (with write access) is used for the push. Removes the misleading github_token input from add-and-commit. Fixes the regenerate workflow failing first with 403 (read-only GITHUB_TOKEN persisted) and then "could not read Username" (persist-credentials: false left no credential at all). Co-Authored-By: Claude Opus 4.8 # Conflicts: # .github/workflows/regenerate-library.yml --- .github/workflows/regenerate-library.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/regenerate-library.yml b/.github/workflows/regenerate-library.yml index 8b41daaa..9534bed2 100644 --- a/.github/workflows/regenerate-library.yml +++ b/.github/workflows/regenerate-library.yml @@ -47,12 +47,22 @@ jobs: ;; esac + # Generate the App token before checkout so checkout persists *it* (not the + # read-only GITHUB_TOKEN) as the git credential used for the later push. + - name: Generate app token + id: app-token + uses: actions/create-github-app-token@v3 + with: + app-id: ${{ secrets.RELEASE_APP_ID }} + private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} + - uses: actions/checkout@v6 with: ref: ${{ steps.branches.outputs.checkout_branch }} - # Don't persist the read-only GITHUB_TOKEN in git config; otherwise it - # overrides the App token below and the push is rejected with 403. - persist-credentials: false + # Persist the App token (write access) so EndBug/add-and-commit can push. + # add-and-commit does NOT set up push auth from its github_token input — + # it relies on whatever credential checkout wrote to git config. + token: ${{ steps.app-token.outputs.token }} - name: Install uv uses: astral-sh/setup-uv@v7 @@ -91,13 +101,6 @@ jobs: sed -i "s/^version = \".*\"/version = \"$LIBRARY_VERSION\"/" pyproject.toml uv lock - - name: Generate app token - id: app-token - uses: actions/create-github-app-token@v2 - with: - app-id: ${{ secrets.RELEASE_APP_ID }} - private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} - - name: Commit changes to new branch uses: EndBug/add-and-commit@v10 with: @@ -105,7 +108,6 @@ jobs: author_email: support@meraki.com message: Auto-generated library v${{ github.event.inputs.library_version }} for API v${{ github.event.inputs.api_version }}. new_branch: ${{ steps.branches.outputs.release_branch }} - github_token: ${{ steps.app-token.outputs.token }} - name: Create pull request env: From 57860d09e79c1c5580b7963c5f1a1efc8ed38c3e Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Thu, 4 Jun 2026 00:22:52 -0700 Subject: [PATCH 29/60] feat(generator): add assistant to supported scopes Co-Authored-By: Claude Opus 4.8 --- generator/generate_library.py | 1 + 1 file changed, 1 insertion(+) diff --git a/generator/generate_library.py b/generator/generate_library.py index 057b2dfa..d1d4268b 100644 --- a/generator/generate_library.py +++ b/generator/generate_library.py @@ -126,6 +126,7 @@ def generate_library( "nac", "users", "support", + "assistant", ] tags = spec["tags"] From 4faf2fa5e10e56deab6c73531f28b2ec7930cb97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 15:37:47 +0000 Subject: [PATCH 30/60] chore(deps-dev): bump ruff from 0.15.15 to 0.15.16 in the all-deps group (#392) Bumps the all-deps group with 1 update: [ruff](https://github.com/astral-sh/ruff). Updates `ruff` from 0.15.15 to 0.15.16 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.15...0.15.16) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.16 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/uv.lock b/uv.lock index 954d57ce..c1134121 100644 --- a/uv.lock +++ b/uv.lock @@ -947,27 +947,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.15" +version = "0.15.16" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/84/6f/a76f7d96e5c962f5b69cee865e49c15c1116897c01990faa8a57edb62e7f/ruff-0.15.15.tar.gz", hash = "sha256:b8dff018130b46d8e5bf0f926ef6b60cf871d6d5ae45fc9334e09632daa741d6", size = 4706985, upload-time = "2026-05-28T14:16:57.784Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a6/bd/5f7ec371001337d8fa61701c186ff8b613ecac1651848c5950f4c4d5f2e9/ruff-0.15.16.tar.gz", hash = "sha256:d05e78d38c78caf020b03789e25106c93017db5a0cb6e2819885018c61343b78", size = 4714267, upload-time = "2026-06-04T16:33:09.974Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fa/9d/3a45c05b8ab04b4705989de70a79008e27c8003296a0feaee9edc18dd7e9/ruff-0.15.15-py3-none-linux_armv6l.whl", hash = "sha256:cf93e5388f412e1b108b1f8b34a6e036b70fe8aff89393befad96fe48670311b", size = 10710652, upload-time = "2026-05-28T14:16:06.701Z" }, - { url = "https://files.pythonhosted.org/packages/05/66/da974431624bf3b49f6ee1f9543c02d929ff1cba78b0d5a79c38cf21f744/ruff-0.15.15-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ac5a646d1f6a7dadd5d50842dae2c1f9862ac887ef5d1b1375e02def791fde6e", size = 11096615, upload-time = "2026-05-28T14:16:23.313Z" }, - { url = "https://files.pythonhosted.org/packages/8c/09/7443452e5d290230a712103f2fdceeef7184f3ec99a2bd01c8be78aaceb5/ruff-0.15.15-py3-none-macosx_11_0_arm64.whl", hash = "sha256:77d955a431430c66f72dd94e379ad38a16daea3d25094872ac4edf9e797be530", size = 10436683, upload-time = "2026-05-28T14:16:40.974Z" }, - { url = "https://files.pythonhosted.org/packages/53/01/d330c26a57fa4f3943a14424904027428315b700fe4d14a84bb123a649e5/ruff-0.15.15-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7614ee79c69788cf6cedd568069ade9cecc22a1ad20494efe8d0c9ebb4b622d4", size = 10769064, upload-time = "2026-05-28T14:16:28.905Z" }, - { url = "https://files.pythonhosted.org/packages/1d/85/cc8770f8bdff541b1da8392d1634141fe4a0e3f4ee596605959b7906c27f/ruff-0.15.15-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3cdb1679e06a1f6b47bc384714ae96f6e2fb65ca441eb78c43d2ca554176ce1f", size = 10511987, upload-time = "2026-05-28T14:16:43.732Z" }, - { url = "https://files.pythonhosted.org/packages/7c/29/8c190c1472b63013583ba391f3342036e02010544c1270455ed8e519bdf3/ruff-0.15.15-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2728b93d7b23a603ea2c0ac6eb73d760bd38ec9de35f35fb41e18f7a3fee7622", size = 11275100, upload-time = "2026-05-28T14:16:55.244Z" }, - { url = "https://files.pythonhosted.org/packages/9f/6b/7e145ce2cc8e63d6834eca03d83a0e18d121def5c69f91b4cf4011ed4879/ruff-0.15.15-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:be582fcc0db438902c7792b08d6ddf6c9b9e21addaa10092c2c741cfb09e5a45", size = 12176903, upload-time = "2026-05-28T14:16:14.368Z" }, - { url = "https://files.pythonhosted.org/packages/80/a3/d5974637f68e451f7fadf015cf3101d1cd7d8ba5027cffe0b9e3826ebe6b/ruff-0.15.15-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7aa77465b8ecaf1a27bea098d696f7fed5e1eccbd10b321b682d6de586ae5627", size = 11404550, upload-time = "2026-05-28T14:16:20.138Z" }, - { url = "https://files.pythonhosted.org/packages/fe/1c/e6e5e568f22be4fb05d6244234aba384c06b451252453b821e1a529263cf/ruff-0.15.15-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48decfa11d740de4889de623be1463308346312f2409a56e24aa280c86162dc4", size = 11382027, upload-time = "2026-05-28T14:16:46.615Z" }, - { url = "https://files.pythonhosted.org/packages/1d/01/170921b49fcd2e8858825593f91cf7146c3e40a5c3e6df763e4bb0484dde/ruff-0.15.15-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a5015088452ca0081387063649ec67f06d3d1d6b8b936a1f836b5e9657ecd48c", size = 11366041, upload-time = "2026-05-28T14:16:26.247Z" }, - { url = "https://files.pythonhosted.org/packages/87/54/a7bad711d7de93254e15e06a4c375b89a03d18de45d3e5dcc86a4472fb1a/ruff-0.15.15-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f5294aab6356c81600fcdea3a62bb1b924dfd5e91767c12318d3f68f86af57cd", size = 10741795, upload-time = "2026-05-28T14:16:17.11Z" }, - { url = "https://files.pythonhosted.org/packages/c9/31/38c075963668f8b41c6914ee0f6f318727fbe30ab9145cb29e6df464c5fa/ruff-0.15.15-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:db5bd4d802415cca656dc1616070b725952d6ae95eb5d4831e49fbd94a38f75f", size = 10511117, upload-time = "2026-05-28T14:16:31.767Z" }, - { url = "https://files.pythonhosted.org/packages/9d/96/6ff689e1f7e375d1d97075eca022f74c2bab59554a432fe4d2e6f091986a/ruff-0.15.15-py3-none-musllinux_1_2_i686.whl", hash = "sha256:587a6278ed42059191c1a466e490bd7930fb50bd2e255398bc29616c895a61cb", size = 10994867, upload-time = "2026-05-28T14:16:35.149Z" }, - { url = "https://files.pythonhosted.org/packages/c3/c2/5dce0ab9f92a8d534fa62b9bf9caca3eddb8c1a81b616f5e195ada4f0d6e/ruff-0.15.15-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:df0c1c084f5f4be9812f61518a45c440d3c30d69ce4bf6c5270e66d38338f02a", size = 11482101, upload-time = "2026-05-28T14:16:49.598Z" }, - { url = "https://files.pythonhosted.org/packages/b1/c0/1003b60edd697c649faf61f1a34094b1abb38fb3d1181e3f895781250a08/ruff-0.15.15-py3-none-win32.whl", hash = "sha256:29428ea79694afbe756d45fd59b36f22b6b020dc0443cf7de0173046236964b9", size = 10716774, upload-time = "2026-05-28T14:16:52.337Z" }, - { url = "https://files.pythonhosted.org/packages/02/a8/1269eddd6945a06c23f055ef7848886e37cf9d6a8bebb386a3115f01470c/ruff-0.15.15-py3-none-win_amd64.whl", hash = "sha256:8df0323902e15e24bc4bf246da830573d3cf3352bd0b9a164eab335d111ff4a4", size = 11868463, upload-time = "2026-05-28T14:16:11.333Z" }, - { url = "https://files.pythonhosted.org/packages/4e/b2/920464c907b191e37469d477a1aa8bc048b8f36c4c1610dfa4ab87b39e18/ruff-0.15.15-py3-none-win_arm64.whl", hash = "sha256:3c8ceca6792f38196b8f589bc92eccd03eef286602da92e5dc05cc42ef6441b7", size = 11138498, upload-time = "2026-05-28T14:16:38.425Z" }, + { url = "https://files.pythonhosted.org/packages/0c/42/53ef1c3953f157956db9bf7861e3bc50b9b887ce93300aa48cdba8336fe6/ruff-0.15.16-py3-none-linux_armv6l.whl", hash = "sha256:6ac3c0b3969cc6cf6b158c4e2f8f682acb58e7d700d8a44b65ecdc72d66ab0b2", size = 10709025, upload-time = "2026-06-04T16:32:51.935Z" }, + { url = "https://files.pythonhosted.org/packages/93/9a/a79159346f19134a956607754e57d8d128f7a4c00f4ad2f7514d224c172c/ruff-0.15.16-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:197c207ed75ffba54a0dec23db4aa939a27a3053073e085e0042433cbdc58e4a", size = 11063550, upload-time = "2026-06-04T16:32:42.24Z" }, + { url = "https://files.pythonhosted.org/packages/bc/72/3ce2ac000a5299ec238e01f51397b3b653c93b077d9b1bfe8715bb895f20/ruff-0.15.16-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3a39fec45ab316cc23e7558f23fea4a70403ddb5648ea9a4a3854a16973d0071", size = 10421345, upload-time = "2026-06-04T16:32:37.251Z" }, + { url = "https://files.pythonhosted.org/packages/b0/c2/cc7fad3ec9169373f5b6a18f1917b91080feec40c3f9658334a1d28e2f03/ruff-0.15.16-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba93191d79003116b95128c9d306e045200fdbd0bccb782b110f3cd1d4abc5cf", size = 10757217, upload-time = "2026-06-04T16:32:54.722Z" }, + { url = "https://files.pythonhosted.org/packages/69/d2/3474009eaa0a65b31fa7152a2fad5e2f050c640ceb1e6b02ee6922e94c82/ruff-0.15.16-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c6ee4b90520630120ef032aa5cc10db483852dff950e78b1d717e2993a61ac8d", size = 10507035, upload-time = "2026-06-04T16:33:05.343Z" }, + { url = "https://files.pythonhosted.org/packages/ca/81/b7ae6ccbd11f0c8dc3d5d67fc4be9b57ff57ca86ba56152021378e1277f2/ruff-0.15.16-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e4215bc938bc3c8215c1472c1aa437e310fee20cd427335fec9d7e609563628", size = 11255291, upload-time = "2026-06-04T16:32:49.49Z" }, + { url = "https://files.pythonhosted.org/packages/d9/e1/46e526f1a7cc90857ce6ddf25fbb77eb6568651ac38d71b033af07076dd5/ruff-0.15.16-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7c8d26be963b090f10e29abc8b3e74a2a321f6fa34e02424e30b5af89350ecbb", size = 12124922, upload-time = "2026-06-04T16:33:07.821Z" }, + { url = "https://files.pythonhosted.org/packages/1a/da/5c791b088b596b24d0deb967fa28ae02ad751a140c0b9ea81c5ab915d6c0/ruff-0.15.16-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f198cf4123602a2280ed46c307bcbafe41758d6fee5b456b6b6058ca1514b3b4", size = 11332186, upload-time = "2026-06-04T16:33:02.971Z" }, + { url = "https://files.pythonhosted.org/packages/72/11/5da87abe20047c8962361473923ebb2f62b595250126aadfad8c20649c1e/ruff-0.15.16-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb27515fa6240fb586ae82b901a59e67d24acff86f2190b433dc542fe0435aeb", size = 11373541, upload-time = "2026-06-04T16:32:47.007Z" }, + { url = "https://files.pythonhosted.org/packages/fe/2a/8554754c23a854ae3fd6b507e36ad61ddb121e298c6d5d617dec94ed0f14/ruff-0.15.16-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a267c46ba1593fc26b8eecbea050b39d40c0b6bb7781ee11c90a02cd10032951", size = 11353014, upload-time = "2026-06-04T16:32:34.795Z" }, + { url = "https://files.pythonhosted.org/packages/62/25/62ea41529ec89f742ea3fed9cb1059c72877ec7cf9b9e99ac9cf3294d1d9/ruff-0.15.16-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:528c68f39a91498a8d50e91ff5985df3d105782bab49cc378e73ac26bff083e8", size = 10737467, upload-time = "2026-06-04T16:32:26.348Z" }, + { url = "https://files.pythonhosted.org/packages/90/17/334d3ad9de4d40f9dd58fdd09e35ce64553bb501e2f19a839e2fb6be14fc/ruff-0.15.16-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:7ed55c58950df60589a9a7a5d2f8fa5f54ebd287163be805adfe6ee95a9de123", size = 10521910, upload-time = "2026-06-04T16:32:32.54Z" }, + { url = "https://files.pythonhosted.org/packages/4d/bd/3ac7c6ae77a885c1004b3dda2446ea401768d24f851c14b4ad4b24f6639c/ruff-0.15.16-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d482feaf51512b50f9790ceb417a56a61dd1e9d9bf967662b9ed27c01b34f53a", size = 10979190, upload-time = "2026-06-04T16:32:57.492Z" }, + { url = "https://files.pythonhosted.org/packages/33/d7/609546e6a413c3f216fbf2a50c928f97c80939154f6a0503114094a86191/ruff-0.15.16-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:1e15bc8c94513dae2a40cc9ef07c94fdd4ecc9e29dabebeebe170f952322c9e3", size = 11477014, upload-time = "2026-06-04T16:32:44.687Z" }, + { url = "https://files.pythonhosted.org/packages/74/0d/f2cd247ad32633a5c36e97141a2c21b11c6279f7957bc2ff360b1e08fddd/ruff-0.15.16-py3-none-win32.whl", hash = "sha256:580378f7bd4aa25f72e74aa54948a9622f142b1e509521dd10902e886681cc1e", size = 10735541, upload-time = "2026-06-04T16:32:30.145Z" }, + { url = "https://files.pythonhosted.org/packages/8b/9e/02e845ef151b1dee585e55c4739f8e1734ae1d9f1221dff65761c162208b/ruff-0.15.16-py3-none-win_amd64.whl", hash = "sha256:408256017284eddf98fff77b29aa4fb30f586042d535b2d9befc6512f400aaec", size = 11843403, upload-time = "2026-06-04T16:32:39.76Z" }, + { url = "https://files.pythonhosted.org/packages/15/19/016553f86f207450aebebc2b2b5088d086b901cc8186c02ac4284db3bd88/ruff-0.15.16-py3-none-win_arm64.whl", hash = "sha256:8cd61783afb39638a7133ef0d2dfb1e91277593962f81b5a8423eb0b888a6121", size = 11134555, upload-time = "2026-06-04T16:33:00.136Z" }, ] [[package]] From 7fb4ed01e04fd0a2c0fbf1106b8effd532e8b3ac Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Wed, 10 Jun 2026 11:21:00 -0700 Subject: [PATCH 31/60] docs: add towncrier changelog management Cherry-pick of the changelog infra from main (#398) onto beta, so the branch gets towncrier without entangling unrelated generated-API spec drift. beta accumulates its own changelog.d/ fragments, consumed by towncrier at the next beta release. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/create-release.yml | 35 ++++++++++++++++++++-- .gitignore | 5 +++- CHANGELOG.md | 9 ++++++ CONTRIBUTING.md | 21 +++++++++++++ changelog.d/.gitignore | 1 + docs/releasing.md | 8 +++++ pyproject.toml | 44 ++++++++++++++++++++++++++++ uv.lock | 27 +++++++++++++++++ 8 files changed, 146 insertions(+), 4 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 changelog.d/.gitignore diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index fc368a9f..22749f99 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -12,10 +12,11 @@ on: types: [completed] branches: ['main', 'beta'] -# The release is created with a GitHub App token; the default token only needs -# read access for checkout and `gh release view`. +# The release is created with a GitHub App token. The "Build changelog" step +# commits the rendered CHANGELOG.md back to the release branch, so the default +# token needs write access to contents. permissions: - contents: read + contents: write jobs: create-release: @@ -61,6 +62,34 @@ jobs: exit 1 fi + # Render changelog.d/ fragments into CHANGELOG.md and commit before the + # release is cut. Reuses the version already read from pyproject.toml, so + # there is no separate towncrier version to keep in sync. --generate-notes + # below remains as a fallback for the GitHub release body. + - name: Build changelog + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + run: | + VERSION="${{ steps.version.outputs.version }}" + BRANCH="${{ inputs.branch || github.event.workflow_run.head_branch }}" + + # Nothing to do if there are no fragments to consume. + if ! ls changelog.d/*.md >/dev/null 2>&1; then + echo "No changelog fragments; skipping towncrier build." + exit 0 + fi + + pip install --quiet towncrier + towncrier build --yes --version "$VERSION" + + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add CHANGELOG.md changelog.d/ + if ! git diff --cached --quiet; then + git commit -m "docs: update changelog for $VERSION" + git push origin "HEAD:$BRANCH" + fi + - name: Create release env: GH_TOKEN: ${{ steps.app-token.outputs.token }} diff --git a/.gitignore b/.gitignore index 56e0d59b..261f6fac 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,7 @@ venv/ .DS_Store # Project -.scratch/ \ No newline at end of file +.scratch/ + +# Git worktrees +.worktrees/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..ef55270a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +All notable changes to this library are documented here. + +This file is maintained with [towncrier](https://towncrier.readthedocs.io/); +add a news fragment under `changelog.d/` for every user-facing change. See +[CONTRIBUTING.md](CONTRIBUTING.md) for the fragment format. + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 343ad828..f208d604 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,6 +39,27 @@ uv sync - Generated API scope files (`meraki/api/`, `meraki/aio/api/`) are auto-generated from the OpenAPI spec. Changes here will be overwritten. Fix the generator instead. - Do not vendor or bundle dependencies. +## Changelog Fragments + +Every user-facing change needs a news fragment in `changelog.d/`. Do not edit `CHANGELOG.md` by hand; towncrier builds it at release time. + +File name: `changelog.d/{issue}.{type}.md`. With no issue, use a slug prefixed with `+`: `changelog.d/+httpx-migration.changed.md`. + +Types: `added`, `changed`, `deprecated`, `removed`, `fixed`, `security`. + +```bash +# Issue-linked +echo "Retry on 429 now honors Retry-After." > changelog.d/1234.fixed.md + +# Or via towncrier +uv run towncrier create -c "Retry on 429 now honors Retry-After." 1234.fixed.md + +# Preview the rendered changelog without consuming fragments +uv run towncrier build --draft --version "$(grep '^version' pyproject.toml | sed 's/version = "\(.*\)"/\1/')" +``` + +One fragment per change. Multiple fragments per issue are fine (e.g. `1234.added.md` and `1234.fixed.md`). Fragments are not wiped by library regeneration; they survive until the next release build. + ## Running the Generator ```bash diff --git a/changelog.d/.gitignore b/changelog.d/.gitignore new file mode 100644 index 00000000..f935021a --- /dev/null +++ b/changelog.d/.gitignore @@ -0,0 +1 @@ +!.gitignore diff --git a/docs/releasing.md b/docs/releasing.md index 4de91678..76e0862c 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -46,6 +46,14 @@ Starting from `main` at `3.1.0`, `beta` at `3.1.0`, `httpx` at `4.0.0`: When a new prerelease is detected, the `enable-early-access.yml` workflow runs first (waited on synchronously). This enables early access features on the test organizations so the generated beta and dev SDKs can be tested against them. +## Changelog management + +`CHANGELOG.md` is generated by [towncrier](https://towncrier.readthedocs.io/) from news fragments in `changelog.d/`. Contributors add one fragment per user-facing change (see [CONTRIBUTING.md](../CONTRIBUTING.md) for the format); nobody edits `CHANGELOG.md` directly. + +The `create-release.yml` workflow runs `towncrier build --yes --version ` after version validation and before `gh release create`. The version comes from the same `pyproject.toml` read that drives the release tag, so there is no separate towncrier version to keep in sync. The build renders the fragments into `CHANGELOG.md`, deletes the consumed fragments, and commits both changes to the release branch before the GitHub release is cut. + +This runs only at release time, not during regeneration. `regenerate-library.yml` rewrites generated code under `meraki/` but never touches `changelog.d/` or `CHANGELOG.md`, so fragments added on `main`, `beta`, or `httpx` survive regeneration PRs and are consumed only by the next release on that branch. Each branch keeps its own fragments and accumulates them independently across the three-branch model. + ## Release branches and PRs | Stage | Source branch | Release branch | PR target | diff --git a/pyproject.toml b/pyproject.toml index 738b1a38..af806ef2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,7 @@ dev = [ "flake8>=7.0,<8", "pre-commit>=4.6.0", "ruff>=0.15.12", + "towncrier>=24.8.0", ] generator = ["jinja2==3.1.6"] @@ -63,3 +64,46 @@ omit = ["meraki/api/*", "meraki/aio/api/*", "meraki/aio/__init__.py"] fail_under = 90 show_missing = true exclude_lines = ["pragma: no cover", "if __name__"] + +[tool.towncrier] +directory = "changelog.d" +filename = "CHANGELOG.md" +name = "meraki" +title_format = "## {version} ({project_date})" +issue_format = "[#{issue}](https://github.com/meraki/dashboard-api-python/issues/{issue})" +start_string = "\n" +wrap = false +all_bullets = true + +# Version is passed via `--version` from a single source of truth (pyproject +# [project].version) at build time, so there is no version pinned here to drift. + +[[tool.towncrier.type]] +directory = "added" +name = "Added" +showcontent = true + +[[tool.towncrier.type]] +directory = "changed" +name = "Changed" +showcontent = true + +[[tool.towncrier.type]] +directory = "deprecated" +name = "Deprecated" +showcontent = true + +[[tool.towncrier.type]] +directory = "removed" +name = "Removed" +showcontent = true + +[[tool.towncrier.type]] +directory = "fixed" +name = "Fixed" +showcontent = true + +[[tool.towncrier.type]] +directory = "security" +name = "Security" +showcontent = true diff --git a/uv.lock b/uv.lock index c1134121..34ffad38 100644 --- a/uv.lock +++ b/uv.lock @@ -217,6 +217,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/20/94/c5790835a017658cbfabd07f3bfb549140c3ac458cfc196323996b10095a/charset_normalizer-3.4.2-py3-none-any.whl", hash = "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0", size = 52626, upload-time = "2025-05-02T08:34:40.053Z" }, ] +[[package]] +name = "click" +version = "8.4.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9b/98/518d8e5081007684232226f475082b30087d0f585e8457db087298259f49/click-8.4.1.tar.gz", hash = "sha256:918b5633eddf6b41c32d4f454bf0de810065c74e3f7dbf8ee5452f8be88d3e96", size = 353007, upload-time = "2026-05-22T04:08:37.769Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/0d/67e5b4109ea4a837e80daa87c2c696711955e40449a97e8926672534def2/click-8.4.1-py3-none-any.whl", hash = "sha256:482be17c6991b8c19c5429a1e995d9b0efdbb63172824c41f99965dc0ade8ec2", size = 116639, upload-time = "2026-05-22T04:08:35.26Z" }, +] + [[package]] name = "colorama" version = "0.4.6" @@ -553,6 +565,7 @@ dev = [ { name = "pytest-cov" }, { name = "responses" }, { name = "ruff" }, + { name = "towncrier" }, ] generator = [ { name = "jinja2" }, @@ -573,6 +586,7 @@ dev = [ { name = "pytest-cov", specifier = ">=7.1.0,<8" }, { name = "responses", specifier = ">=0.25,<1" }, { name = "ruff", specifier = ">=0.15.12" }, + { name = "towncrier", specifier = ">=24.8.0" }, ] generator = [{ name = "jinja2", specifier = "==3.1.6" }] @@ -1024,6 +1038,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl", hash = "sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe", size = 14583, upload-time = "2026-03-25T20:22:03.012Z" }, ] +[[package]] +name = "towncrier" +version = "25.8.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "jinja2" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c2/eb/5bf25a34123698d3bbab39c5bc5375f8f8bcbcc5a136964ade66935b8b9d/towncrier-25.8.0.tar.gz", hash = "sha256:eef16d29f831ad57abb3ae32a0565739866219f1ebfbdd297d32894eb9940eb1", size = 76322, upload-time = "2025-08-30T11:41:55.393Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/42/06/8ba22ec32c74ac1be3baa26116e3c28bc0e76a5387476921d20b6fdade11/towncrier-25.8.0-py3-none-any.whl", hash = "sha256:b953d133d98f9aeae9084b56a3563fd2519dfc6ec33f61c9cd2c61ff243fb513", size = 65101, upload-time = "2025-08-30T11:41:53.644Z" }, +] + [[package]] name = "typing-extensions" version = "4.13.2" From 3e930785f3249123918e3a63c3c44a7f072024e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 19:22:55 +0000 Subject: [PATCH 32/60] chore(deps): bump aiohttp from 3.14.0 to 3.14.1 in the all-deps group (#393) --- updated-dependencies: - dependency-name: aiohttp dependency-version: 3.14.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 204 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/uv.lock b/uv.lock index 34ffad38..34bbcff4 100644 --- a/uv.lock +++ b/uv.lock @@ -13,7 +13,7 @@ wheels = [ [[package]] name = "aiohttp" -version = "3.14.0" +version = "3.14.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiohappyeyeballs" }, @@ -25,108 +25,108 @@ dependencies = [ { name = "typing-extensions", marker = "python_full_version < '3.13'" }, { name = "yarl" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ee/ab/93ce242f899b68c51b0578c027aafa791ab3614cb9345fa5d37b5f5c8e3e/aiohttp-3.14.0.tar.gz", hash = "sha256:2882de819734c715fd1b9c11c97e09fa020d14438203d1d354d8ed1702791c9b", size = 7940674, upload-time = "2026-06-01T19:41:02.763Z" } +sdist = { url = "https://files.pythonhosted.org/packages/82/78/8ea7308cac6934de8c74a14f3d5f65d1c89287426688be79538d0e5c013d/aiohttp-3.14.1.tar.gz", hash = "sha256:307f2cff90a764d329e77040603fa032db89c5c24fdad50c4c15334cba744035", size = 7955794, upload-time = "2026-06-07T21:09:35.529Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/67/47/7727bfe8db93f8835a001bd4359d8480cc68d1259b8bce334668f8be97bd/aiohttp-3.14.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:54bf3522d6f7351e55f89a62d5c2bf138ad557b031670266c5df604ae88e0b5a", size = 759147, upload-time = "2026-06-01T19:37:12.918Z" }, - { url = "https://files.pythonhosted.org/packages/eb/f2/cd3fedff6fade73d71df9ec908c210cec518ef90fd00289250684b90aecf/aiohttp-3.14.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0746d9fb0ac4fdef643a84494efe3f06d50335dd8c7a530228b86448aae0a803", size = 513705, upload-time = "2026-06-01T19:37:14.633Z" }, - { url = "https://files.pythonhosted.org/packages/5a/fe/49746b6b610144a06323bebd8e1211a390310d8c69b98dd6d52df341bc3e/aiohttp-3.14.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9f3a96b6d39a4872222beee72e1df41d2ff886ae96152cf3e757ef8c5673ef0e", size = 509627, upload-time = "2026-06-01T19:37:16.385Z" }, - { url = "https://files.pythonhosted.org/packages/4c/3f/28f2f6cf3d5c0e7b01b27140d0e7873fd11fb341169ad3ce78ad04aba628/aiohttp-3.14.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d336820adbb914debbc90a1d8c1bfc4bea55996aecf64866a989d35d1f9fd903", size = 1769293, upload-time = "2026-06-01T19:37:18.067Z" }, - { url = "https://files.pythonhosted.org/packages/97/6f/2e5f1b525d5474b12b3c60abf733a755845f3bceff21542081ada515f837/aiohttp-3.14.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:71b2604c9bfc1b115547d63a094d5244b3f02799833513a99a68aaa7b167c4cb", size = 1732363, upload-time = "2026-06-01T19:37:20.138Z" }, - { url = "https://files.pythonhosted.org/packages/a8/ce/596120faa85ca7b19cd061e3f2f3be23aa8f11a0aedf9191db9e0da1bd76/aiohttp-3.14.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:610d68800435903e303ca0542b9d3e4eb72a12ff33a6d471a070c1d81eebd3c2", size = 1840375, upload-time = "2026-06-01T19:37:22.104Z" }, - { url = "https://files.pythonhosted.org/packages/72/3c/a7ffe05a757a4a7867643da69357ec41f506879fbd1b231d2ed90af246b2/aiohttp-3.14.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:514db9a79337068981ee2137310283a07b4b885c584991097a91a4da419bcb81", size = 1921484, upload-time = "2026-06-01T19:37:24.068Z" }, - { url = "https://files.pythonhosted.org/packages/93/fa/2c861170bbd4a491de93a69e081db1d971092569e0d593a98ef62c384dc1/aiohttp-3.14.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c452d17eeb95d563fc8b936f3050301dbd1d268126c4632d8b70ede9696202ee", size = 1774153, upload-time = "2026-06-01T19:37:26.256Z" }, - { url = "https://files.pythonhosted.org/packages/9d/da/1d2f5a165f47ec9b1f69d37b8b977fdc4d501aa72ffb7930db27bb9e49ea/aiohttp-3.14.0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ed94a81506e3d1bdbad5108f497a58f2a2354aedb4ca314d5326f07d1fd1ac2d", size = 1632569, upload-time = "2026-06-01T19:37:28.192Z" }, - { url = "https://files.pythonhosted.org/packages/46/1d/7a6e295c4257252f70f69e90864fdad74b6a1293054fb3f9e65a15de6d63/aiohttp-3.14.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1394dce36e0f0d260ac0b555a654de19cb989f3c1b8bdd24f505314dfea18a00", size = 1740325, upload-time = "2026-06-01T19:37:30.08Z" }, - { url = "https://files.pythonhosted.org/packages/f1/7e/e1899b1ca3ec62f1eab2a5cbde14039b97493f7f53eb88d9b668562ffa8d/aiohttp-3.14.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:d1467d1e7b48a73ca7237e0ee4335f3d02b923dbc27b82fd254bc301c97d4026", size = 1748691, upload-time = "2026-06-01T19:37:32.211Z" }, - { url = "https://files.pythonhosted.org/packages/ec/54/4e6b61c1fe7d3433f82bcc6bd7e4d7c683a742a10c9b12a025fd3695c047/aiohttp-3.14.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6a5f3532125233c261cf61f32df4059cfcf482eb793c7d3db8452e3142028b86", size = 1814477, upload-time = "2026-06-01T19:37:34.173Z" }, - { url = "https://files.pythonhosted.org/packages/9c/38/86fd51be2e08d8e45c83d879d255f10391903cd9fe2a16512f7591a15873/aiohttp-3.14.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:3ea81eb518a2ecb319d8ec6d1424a37c773f6634bd87d6985eb606b2faac419f", size = 1623393, upload-time = "2026-06-01T19:37:36.281Z" }, - { url = "https://files.pythonhosted.org/packages/78/49/466e947a42a88ee23c486d036e7e5d1b097f1bafd8084ad9c9a0a92f0f43/aiohttp-3.14.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:32e735c3182de7b64f6941a4ede48b38c7f47d9437bd615dd30b5bda8fa1bc93", size = 1824097, upload-time = "2026-06-01T19:37:38.421Z" }, - { url = "https://files.pythonhosted.org/packages/f3/89/35f3410bc284682338a1be6b6ea0c5abfa05f063942cfaa9256608440434/aiohttp-3.14.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c21ca9a1c63d4509158f478aeb9d02914dcc52adc68d1bc9dee2452284ee5996", size = 1764790, upload-time = "2026-06-01T19:37:40.755Z" }, - { url = "https://files.pythonhosted.org/packages/42/80/2d4291bd5724d3d17e5951aff5a3e02281483fb47295f0788276ee66cd73/aiohttp-3.14.0-cp311-cp311-win32.whl", hash = "sha256:19ca5fc84130675ba11c6ca5c7da5cb65f7bf8a32cdd2b616bf49cd334688aae", size = 454176, upload-time = "2026-06-01T19:37:42.837Z" }, - { url = "https://files.pythonhosted.org/packages/59/ed/41d0ad4f6ececffc32bdf1f7b494e5498f7ca5c849ea2e3cc9bbd1668251/aiohttp-3.14.0-cp311-cp311-win_amd64.whl", hash = "sha256:d488e6e9d3bb8ba5ae7066d5be885ae9670eba021b8c6ccb9a3a568e6b19d6e5", size = 479334, upload-time = "2026-06-01T19:37:44.776Z" }, - { url = "https://files.pythonhosted.org/packages/d1/86/c0b5e305c770053f8c3d069bb52b8196917ba91949d1962d52eb307fb0d2/aiohttp-3.14.0-cp311-cp311-win_arm64.whl", hash = "sha256:8b93618102caf12801638a01a2b478a55410ddd71bd41cfaf6f707953a49ac43", size = 450262, upload-time = "2026-06-01T19:37:46.461Z" }, - { url = "https://files.pythonhosted.org/packages/89/97/2b6889bfb6b6847520d50d95eb8c4307a45e28aaca39faf4a9454b3d1b2f/aiohttp-3.14.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:b29518c9c2ec7e373e68259206a137c7f4f5439c58baaec4b5ab3ab799850a4e", size = 750194, upload-time = "2026-06-01T19:37:48.164Z" }, - { url = "https://files.pythonhosted.org/packages/21/e2/62634b7fff918ed98c3c6b2f0e70d520f7f28846cb412d451b04354c6459/aiohttp-3.14.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:dbec68ce61b64cb73cab4d33df9433427b1713c8bcccb181dce695c1b6f8e87c", size = 506966, upload-time = "2026-06-01T19:37:50.014Z" }, - { url = "https://files.pythonhosted.org/packages/dd/fb/5ce075150828c797a5106f1c2fb26034e709d4289b9d2bf8b07f1e59fac6/aiohttp-3.14.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3cdf534aa455593e589302990c5097aa5c92c06c4262a20da22934f9186a5fff", size = 507527, upload-time = "2026-06-01T19:37:51.96Z" }, - { url = "https://files.pythonhosted.org/packages/01/d5/405a0ae4e6b081754a3609c1c97c63a950e000a2def16046f1e736933a0e/aiohttp-3.14.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cb6c657104393b5fbff01a5f59b2023db74058a8077d94475d6c25d03882a108", size = 1762420, upload-time = "2026-06-01T19:37:53.839Z" }, - { url = "https://files.pythonhosted.org/packages/ae/1d/e05a7c896b15a6bc6fb8fc5319eb437861c2c49c34559ef928add6590315/aiohttp-3.14.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:46fbbec4e4fab7428d4396a3823f9320e4560aa3113b89eeebce712c27c9ed5a", size = 1733672, upload-time = "2026-06-01T19:37:55.791Z" }, - { url = "https://files.pythonhosted.org/packages/cc/22/a72f7c459e195fa41bf4f7abd1f925b91fe91f8097e51c654229ba144a33/aiohttp-3.14.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2c2c7e05dd5335b298085abf45ddf98673934c3ee1c083d0b9ea13d4186ad500", size = 1805064, upload-time = "2026-06-01T19:37:57.931Z" }, - { url = "https://files.pythonhosted.org/packages/80/50/e85bdaba0be59ca4838005ebfef4048fcdd5f35a02b07057a9a123394440/aiohttp-3.14.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3c7139100fbaae76515b73051d8f0aa3a3ff02e415eec8a8eee8e2223d9ba955", size = 1902125, upload-time = "2026-06-01T19:38:00.225Z" }, - { url = "https://files.pythonhosted.org/packages/19/d8/51de5c6b971c27bb1ef620293b8d1ca611ec78736b34b3f6ccf68e4c8785/aiohttp-3.14.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:78d6f9286a629ce52728430afe18f8ed2b6c39a1fddb3802d7244b9983910ad2", size = 1783112, upload-time = "2026-06-01T19:38:02.641Z" }, - { url = "https://files.pythonhosted.org/packages/73/ae/b4402bfde77e43dfb1b6ccff83c7b7ab63ed06b50c4754f0c5423fb374fe/aiohttp-3.14.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cc3c3e12cdaeb92d7dcf13db00e9f6b1956b910e47256e696df1cfa946d02159", size = 1586356, upload-time = "2026-06-01T19:38:04.637Z" }, - { url = "https://files.pythonhosted.org/packages/bc/05/750a3265ca4dc54a460bd0cb1121a8f2ce9171fce4a135fb47ea7fd594d2/aiohttp-3.14.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4d6a998191f5ebe3b8c28463ff72bc030250008b3193c402464efadd08b5ca02", size = 1723119, upload-time = "2026-06-01T19:38:06.713Z" }, - { url = "https://files.pythonhosted.org/packages/37/01/8c0812c50b3b1b1c37b323bf170d6be8847a8f234060485b7d1e71953f60/aiohttp-3.14.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:0fc2b75ae8d169d853be2862d960be8550da6c5c65711d5476407eb3fdb006bd", size = 1757216, upload-time = "2026-06-01T19:38:08.736Z" }, - { url = "https://files.pythonhosted.org/packages/47/2a/50fb98028a26887cbe48dcc1df92a90825615bc73b5584301304090cded8/aiohttp-3.14.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:16eee56bcc72d04600bc56c1759982c2385ec0b41d3fd3521f836bf64a0957ef", size = 1770500, upload-time = "2026-06-01T19:38:11.111Z" }, - { url = "https://files.pythonhosted.org/packages/bd/32/0ffd598a2fa2b9a423daf242e700cfdabda35d6e602394ad9ae58972c1c7/aiohttp-3.14.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:5a2e7ca615c3ddc15b82687e05a624e5f5cba3f1d6c20cb81172d70ea498451e", size = 1576224, upload-time = "2026-06-01T19:38:13.391Z" }, - { url = "https://files.pythonhosted.org/packages/0b/f9/b9fc381dd9b66afb33f2634c40e229d106467be0afcabe79648631ab6712/aiohttp-3.14.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:f0b7b8bbbec3ce9467ee0ebe334622fd90624f593edd3136c567811453fc4fae", size = 1794252, upload-time = "2026-06-01T19:38:15.498Z" }, - { url = "https://files.pythonhosted.org/packages/a8/fb/05d9214c975f23225a8cd5c439325e338c7c377b315480ef3871db51f54e/aiohttp-3.14.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5ba10966d4f03dd96a14365be4b8e37c327c76f11c3ca867116966cdd9f98066", size = 1760193, upload-time = "2026-06-01T19:38:17.624Z" }, - { url = "https://files.pythonhosted.org/packages/d9/4b/02992fc4fb9e1b6673ee3f888a8e587a6447afda1f6f4aca776c148c2876/aiohttp-3.14.0-cp312-cp312-win32.whl", hash = "sha256:101df7779c80c0636014a6b2c6642acd3efb5b355d48347c9d7dfb720aee9430", size = 448650, upload-time = "2026-06-01T19:38:19.545Z" }, - { url = "https://files.pythonhosted.org/packages/39/e9/246532214c3abda518477cbaaf16d420295ad8effa5233844cbb38f299ab/aiohttp-3.14.0-cp312-cp312-win_amd64.whl", hash = "sha256:b0a5747586d4467efd1f932710b269131c9717a872dce082cd92a00c1c13123a", size = 476145, upload-time = "2026-06-01T19:38:21.505Z" }, - { url = "https://files.pythonhosted.org/packages/2b/c3/63f8c20090048915711598b0adf475b149216d736157961de06480a45b15/aiohttp-3.14.0-cp312-cp312-win_arm64.whl", hash = "sha256:5f1c5be60add78fabb4aacd13c5a348ae79d2fcbfc7fa78da8f1eb192273b370", size = 444250, upload-time = "2026-06-01T19:38:24.027Z" }, - { url = "https://files.pythonhosted.org/packages/21/61/d11f7d9a3144bffe825247d6367cd93053666da50b94707c9129c78868d5/aiohttp-3.14.0-cp313-cp313-android_21_arm64_v8a.whl", hash = "sha256:25400d710641a8040bf022a8a99f579e581ffa1c5bd42c33255d7d6f3957c127", size = 502399, upload-time = "2026-06-01T19:38:25.955Z" }, - { url = "https://files.pythonhosted.org/packages/4f/9b/a7e317625d36356844f8bb022cabd305b541f968856cc3c2e0b58e53ee6e/aiohttp-3.14.0-cp313-cp313-android_21_x86_64.whl", hash = "sha256:c5492b9929826e07cc3fcb9739ae87aab05dff6b5e67a9b73fd1700c6d008981", size = 510068, upload-time = "2026-06-01T19:38:27.828Z" }, - { url = "https://files.pythonhosted.org/packages/11/41/cc2d2cfbfbdc3126ba258f3cd27d1ac8a33492ae3c35a4583ee21f0ba7f1/aiohttp-3.14.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:3366751d68d237c621264233a32f3078bbc21b7904ab90a77e03d21390c742c6", size = 481670, upload-time = "2026-06-01T19:38:29.836Z" }, - { url = "https://files.pythonhosted.org/packages/3c/07/381f4023c3b08cb616e520f566d8c58957abad54e56441d41fe67cfb0195/aiohttp-3.14.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:57ea07d28695a7a40304d42251892a8df765e5588c10ee32afeddcd5df33c0a2", size = 487591, upload-time = "2026-06-01T19:38:31.704Z" }, - { url = "https://files.pythonhosted.org/packages/fb/4d/4506fdb7a022bdf70011a3bbb4ca00c5c570026ef6a3c5bd7bc70c39089c/aiohttp-3.14.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:076cb014191ae2e65d949e1ad01f1dcfe33e32789b5172510f3e79c79fc04d50", size = 496503, upload-time = "2026-06-01T19:38:33.6Z" }, - { url = "https://files.pythonhosted.org/packages/ef/7d/c814111e04894a45d9e2defc94443879a6f118d9633d5fedfe6e2e8af5f0/aiohttp-3.14.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2f3fc37054564dee64a855b5b092d87ec35dcddfaabf7dacb1c8a2b1f83dc0a9", size = 745870, upload-time = "2026-06-01T19:38:36.013Z" }, - { url = "https://files.pythonhosted.org/packages/c6/ee/80eee0efddfe187e7cd05027086b7ce1c0e492e82a4eda58f5c5543a44a0/aiohttp-3.14.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8fcaef74d2ab0f607d7ff85a0d15e21bb5a258c4a58df1908396eb50d7f4ed3c", size = 505588, upload-time = "2026-06-01T19:38:38.282Z" }, - { url = "https://files.pythonhosted.org/packages/d6/f8/0f28f04eef75d52fc9c715dde7ce9c0abb810fd20cfeb0fea7afd2ab1e98/aiohttp-3.14.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e4c01b0bfc6209590960e68eac083cd22d5d87c21f974dd6208cafa5d3542bc8", size = 504492, upload-time = "2026-06-01T19:38:40.611Z" }, - { url = "https://files.pythonhosted.org/packages/ff/db/44c755232085545065c94378dfce38641b1aee647f4939fcd32f5b32e719/aiohttp-3.14.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f12eb7896e81caf403a2b18c9406426f1207361e7239c057ab29c076d4257e83", size = 1752111, upload-time = "2026-06-01T19:38:42.682Z" }, - { url = "https://files.pythonhosted.org/packages/5e/6a/42e030a46743841414402a3b00cd3d78419055e86c66fb5822c14b5abfc6/aiohttp-3.14.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6c79a044cacf360ec46738d863d2f41c9300d2a06ef4a7402ea0df306a350e61", size = 1729674, upload-time = "2026-06-01T19:38:44.79Z" }, - { url = "https://files.pythonhosted.org/packages/34/26/3199beb415202e3108e7b83ecebe10914d806d33fb9860c3e4aa60a19be3/aiohttp-3.14.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:85e0675f47be4eff0636bf88c02140ea89168ae0df3ff1f3f464e9de9610d277", size = 1798808, upload-time = "2026-06-01T19:38:47.01Z" }, - { url = "https://files.pythonhosted.org/packages/bd/94/b9b6fcf0ee17c21d0d19fb8c22bf83ad18f82e702a9c3bd901a868f5e446/aiohttp-3.14.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7b33e751cab03fdc960095b1e326cb5a03f5ee577d6ded59f3d1c100f8668882", size = 1891921, upload-time = "2026-06-01T19:38:49.233Z" }, - { url = "https://files.pythonhosted.org/packages/c5/a3/3800dbd095cb2bb165a7ea5d94d790914677e27f45638c7d80e3f34c8945/aiohttp-3.14.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:26d9224c6dd7f5c749aba4f61315a894601448b28d94d12f4dea0903e26d2096", size = 1777241, upload-time = "2026-06-01T19:38:52.04Z" }, - { url = "https://files.pythonhosted.org/packages/21/2a/45be91ad1b860508557448d4cc2e165a2ee68dd865657b73bf66cc5a00fb/aiohttp-3.14.0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6281aecdf2732940f4fe06bd6adec5ae4d59b78b080b8e3a6b81467301010988", size = 1579554, upload-time = "2026-06-01T19:38:54.508Z" }, - { url = "https://files.pythonhosted.org/packages/b4/3d/dc94df99ed1511fdf28314f722643ed334112643cab00223577085e788c4/aiohttp-3.14.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:23e8314e7aed8576fbe33314d218bd81447a3adbc91dc36f1163bf583cd3084c", size = 1714864, upload-time = "2026-06-01T19:38:56.788Z" }, - { url = "https://files.pythonhosted.org/packages/ae/e4/1f1c8acbb3acd5c8f795473b92c9c3d44eb60a5692c6104256c8a1c83a0c/aiohttp-3.14.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3b54fbff46127aeafdd764cecd0d99fa2f24a0e37ea5c18a7c3a4ac450df1db3", size = 1749803, upload-time = "2026-06-01T19:38:59.367Z" }, - { url = "https://files.pythonhosted.org/packages/0b/c8/c45ea6e7ed84cebba939b9c334498a045ba19d79c61b0110df5f21580de3/aiohttp-3.14.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:b27d89af91a555f58e08e4902dbcbc48862fd40095720ca705990476bd93b7ac", size = 1765023, upload-time = "2026-06-01T19:39:01.651Z" }, - { url = "https://files.pythonhosted.org/packages/a8/a1/a932941784432962fe390e1066823aaef64b4e5ac9fa595df57b5fe472a9/aiohttp-3.14.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:25d2326a4967bf705a9f9913a13005e93b6020ad8a9f6bd6bd78850d5171332e", size = 1571671, upload-time = "2026-06-01T19:39:04.044Z" }, - { url = "https://files.pythonhosted.org/packages/b0/01/e1280feac522597a4d46eb67a0cdfa053cfae263033030b761ab146f29fb/aiohttp-3.14.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:a1d209375c503472b3c0a340cdf3c55fcd82e84b46dda7caeaced59faba373ec", size = 1789904, upload-time = "2026-06-01T19:39:06.294Z" }, - { url = "https://files.pythonhosted.org/packages/fa/10/ab28818262f4d26bdb47ed5f1fc7999b69e2fc6e0370b02d0f49011f45ea/aiohttp-3.14.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:666c7c5036df57b693026398b69b41874a1931ac5b3485fd910e57bfac253869", size = 1754516, upload-time = "2026-06-01T19:39:08.788Z" }, - { url = "https://files.pythonhosted.org/packages/af/cc/c122eabd7a1b7e0c9bbdd6be60e4715905b858399145d9df872bb94f1427/aiohttp-3.14.0-cp313-cp313-win32.whl", hash = "sha256:23f094a1ef64823fd35854ddf5c7a80a078162f37f9d2f7c6142b51a6affa456", size = 448656, upload-time = "2026-06-01T19:39:11.171Z" }, - { url = "https://files.pythonhosted.org/packages/41/a5/bab07d79848a00eedd8ed979ccb302aaea3ac6eb9fa16bd0ed87135869b4/aiohttp-3.14.0-cp313-cp313-win_amd64.whl", hash = "sha256:e03abdaa17d553f17e1d1d06bb266b3970106c78051d06795723e748d8e49d11", size = 475803, upload-time = "2026-06-01T19:39:13.439Z" }, - { url = "https://files.pythonhosted.org/packages/d1/a0/f03ade8566c153666a3871afccbedf6d99911da006325e1fc6cf72a2de99/aiohttp-3.14.0-cp313-cp313-win_arm64.whl", hash = "sha256:acdb400538cf4769543548bb5d1eb23d39bed4f96554a6078cb728c7cb2c268b", size = 443889, upload-time = "2026-06-01T19:39:15.945Z" }, - { url = "https://files.pythonhosted.org/packages/28/03/5f36ab196a88ba5e9648ae5643e6531e67a3a8c0e96f9c6510ff41540fec/aiohttp-3.14.0-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:363ef9e91014e7891679bfb2ac0a7c6ea93435dbbfd10ecf41b9f06fcf506c5f", size = 503330, upload-time = "2026-06-01T19:39:18.195Z" }, - { url = "https://files.pythonhosted.org/packages/2c/ce/8b49ec2f30f68e02f314f4832186cd45e583360a5a386058be36855d23b6/aiohttp-3.14.0-cp314-cp314-android_24_x86_64.whl", hash = "sha256:884a4edbdad77be9d0ef36142c8b504351b170df0bf62b51e784fadabf311c42", size = 509822, upload-time = "2026-06-01T19:39:20.396Z" }, - { url = "https://files.pythonhosted.org/packages/1a/fe/6edbf5d39bf29322b6816365b17ed8ede4dace164a3aea1abcd30110eb78/aiohttp-3.14.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:70ea956f6cc4a37620966b56c2e205d88ca3e6d85ec063277e414b1035cddad3", size = 483329, upload-time = "2026-06-01T19:39:22.607Z" }, - { url = "https://files.pythonhosted.org/packages/1b/5a/fae531bdbc6456fb6241f46b7b81e4d8a0dd3fc09118a0055dc7141ac1ec/aiohttp-3.14.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:ea3b9806c89f61da22fddf1f12dd524fb368e5e28f1261fbdafe5c3cd8ce893b", size = 489502, upload-time = "2026-06-01T19:39:24.881Z" }, - { url = "https://files.pythonhosted.org/packages/36/f4/48a7b0414db7fed77a03d5dde34508c026afd83510ab6bca08c313855776/aiohttp-3.14.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:a071be341c2bd9b0188e62d173509f024e0a35b1c342c53c50f8daaeda8c3bd8", size = 497357, upload-time = "2026-06-01T19:39:27.197Z" }, - { url = "https://files.pythonhosted.org/packages/75/75/e85a13a370acc007fca5feb1fd1b88ac2d8426e6dadd625479b7cadd55a3/aiohttp-3.14.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:198cfe61bf253b19da1fb3e0fa122249dc4f14c12709493fed8054aa0411cc76", size = 750898, upload-time = "2026-06-01T19:39:29.563Z" }, - { url = "https://files.pythonhosted.org/packages/9e/e4/3d637f800c724eff0e2bed64df72557444482366fd0a35b0cec0e6968f6c/aiohttp-3.14.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:9dc203d6ce6b9106d54e2a93f41dfdfebfbca2d99962ba503bfd3e5921a6549e", size = 506986, upload-time = "2026-06-01T19:39:31.872Z" }, - { url = "https://files.pythonhosted.org/packages/1d/df/35161f3598bf7501d2b2a805b41ab4f45a2e34150c421bcb4ef8c0d281a7/aiohttp-3.14.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:9e19d17ab02bf16832a2c8c0d55a486792c5b1645665652ee9531aebcc30cb72", size = 508033, upload-time = "2026-06-01T19:39:34.137Z" }, - { url = "https://files.pythonhosted.org/packages/e5/39/b36e5d3d31e850fb4691dd3e941684ac490a2559249f6fa634b6b0fdf020/aiohttp-3.14.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d925fba0c14d5b498a8028b0107beebdfd16c5d48d702ff54f879cb017aaaca3", size = 1746213, upload-time = "2026-06-01T19:39:36.654Z" }, - { url = "https://files.pythonhosted.org/packages/b1/28/24e1409e605a9aa5d84abe0e2acb365354b70ae56d40948101cabe3341ab/aiohttp-3.14.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d33e61021222ce7f9792bcac870d6f58d8adfceda33ab857b01264f4560f2c5f", size = 1705862, upload-time = "2026-06-01T19:39:38.968Z" }, - { url = "https://files.pythonhosted.org/packages/8c/d0/e5eb3ff1daeaf644c7e36a957517672494122628e067c38b263fa04eda77/aiohttp-3.14.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:44eca38755d0105bb32f47d085f5dd449846a449e1245fc105889e3279dcf8e3", size = 1798909, upload-time = "2026-06-01T19:39:41.334Z" }, - { url = "https://files.pythonhosted.org/packages/d3/ba/8943f906f0570342886ababb9a722a44e360f786a028c5e0b0e29e3f735b/aiohttp-3.14.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f13087e06f68fea4941c21a0c541c00553aa16e4f8fd7bbe2b198df761e964d6", size = 1868892, upload-time = "2026-06-01T19:39:43.807Z" }, - { url = "https://files.pythonhosted.org/packages/3a/05/27df32c844b2156e1675a8d8ec22d963e3c8ba469ed7ceb1863320c7b521/aiohttp-3.14.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ff82be7f1ef73634cb77890a770743239bc3d487b848669be1c599889336dc0a", size = 1751659, upload-time = "2026-06-01T19:39:46.398Z" }, - { url = "https://files.pythonhosted.org/packages/7f/62/da182e5910ab912b2e88aa919b61a16046a37a95714a5795b02eb57b2d18/aiohttp-3.14.0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a150c0875ac8fd87f1c398650841308a30d65facf7416b12dbdb9cfdcbe5a48c", size = 1578775, upload-time = "2026-06-01T19:39:48.902Z" }, - { url = "https://files.pythonhosted.org/packages/66/e3/53c67097e8a5ce98625e91e3fa7f43c9c6940de680345d03b3509a72a078/aiohttp-3.14.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:edc01ea4e1ec5a1649a28866262bf24195889ff7b27bdd947029a6086741de9b", size = 1710090, upload-time = "2026-06-01T19:39:51.392Z" }, - { url = "https://files.pythonhosted.org/packages/dd/55/0e2732ca598c7a4dfe8a775662376d0ca2977cb1030e48386d4da5d9a456/aiohttp-3.14.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:540632bf882ff8fc88f2e1697be0761578e89e0d79fb4a8a6d65dc5da7e729d4", size = 1715016, upload-time = "2026-06-01T19:39:53.807Z" }, - { url = "https://files.pythonhosted.org/packages/5a/96/f0b73730798c9ca525afc30b39f1f81bbe24e245d9654c54d3b39d63212d/aiohttp-3.14.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:860a86bc2c80237f5dff52edcf427e10a8d8352271fd84845429a3e60199e02c", size = 1763810, upload-time = "2026-06-01T19:39:56.31Z" }, - { url = "https://files.pythonhosted.org/packages/71/cc/11acb6c4518f448323405a7312b6f255d0f974a34373ad1db7633c4aadc8/aiohttp-3.14.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:5cbd50e6a50d6b99283a826b18cbdebf65b0797689a7535cb0e9dd37be0f63c3", size = 1573064, upload-time = "2026-06-01T19:39:58.718Z" }, - { url = "https://files.pythonhosted.org/packages/de/2d/28c31dde0a7dc98c0ee7d0da2ddcec3f7688c4fc131e5989e278d0c03c0a/aiohttp-3.14.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:20144819e99db593e22bbd2f3f2691a5e149f879142d6b8670254708853ff4fb", size = 1775765, upload-time = "2026-06-01T19:40:01.195Z" }, - { url = "https://files.pythonhosted.org/packages/b8/69/155c4ef3aec96417d47024800472b33b16c5d8a665371dcd044c2afdf25d/aiohttp-3.14.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:26b6d79aa54cb4ed50cc7d41ed14e99e0f1fc8e7c2d42f2e05b37aea897b2b52", size = 1733716, upload-time = "2026-06-01T19:40:03.631Z" }, - { url = "https://files.pythonhosted.org/packages/5f/44/6126116fd8a316b712bb615660b855c78466bb67ba1bb1742427eafcf7ac/aiohttp-3.14.0-cp314-cp314-win32.whl", hash = "sha256:106ed074a856f3e21d186b8579e2c8afb6da598e267cdaab01059e13db2fc44d", size = 453684, upload-time = "2026-06-01T19:40:06.277Z" }, - { url = "https://files.pythonhosted.org/packages/a2/d7/eff4c58a88c5cac5e38b55f44fb8a6d3929c3cbd77356e383e094d3220bd/aiohttp-3.14.0-cp314-cp314-win_amd64.whl", hash = "sha256:4f770846edae8f00ecc57af825bce811f787f87a7dcf0e90d191790efe5b31f7", size = 481758, upload-time = "2026-06-01T19:40:08.653Z" }, - { url = "https://files.pythonhosted.org/packages/d7/ed/17b5bd9fbcb46e688f02e572f517754a9a75831e7b54702f027761dc4fa5/aiohttp-3.14.0-cp314-cp314-win_arm64.whl", hash = "sha256:acf1581c4f21ed4b80a2dded504d87b055a071a84d5737ea966435f768275ac6", size = 450557, upload-time = "2026-06-01T19:40:11.03Z" }, - { url = "https://files.pythonhosted.org/packages/12/34/6180103ce9aabc8ebff3f7bb55a1228ffe60f61042823031d9692cb7b101/aiohttp-3.14.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:6aa1a40f9cbb3da9f80714c5966b8946c21e6a2530d809b9498b33161e3c8733", size = 787878, upload-time = "2026-06-01T19:40:13.401Z" }, - { url = "https://files.pythonhosted.org/packages/92/e9/08954a40e8b7baa3d8beadd2b074b186e9b1e9c8ddabc288678a6265de50/aiohttp-3.14.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:b62af5a8cc96a194eaa01a9ed7b34a3ffa58d3d8daaa1a0d7a749353ad12d228", size = 524400, upload-time = "2026-06-01T19:40:15.972Z" }, - { url = "https://files.pythonhosted.org/packages/08/6a/b5965a634ac4d5ba99a463314cf4ab214ca073fcdc38a15e0294273701fc/aiohttp-3.14.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:6eb63b1417efaf7d1002a6ad034a40d44376afcc16508a57f8e74b49ad26a095", size = 527904, upload-time = "2026-06-01T19:40:18.28Z" }, - { url = "https://files.pythonhosted.org/packages/06/b4/932bcdd850c354d9bcca30f360e475d7852e30413fbbd44b182782ed5432/aiohttp-3.14.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c20b9ad156a79eb97be5cf9e069eec01d2f0dc8472ffbd75299a8b2d4c2cbbde", size = 1912162, upload-time = "2026-06-01T19:40:20.825Z" }, - { url = "https://files.pythonhosted.org/packages/c6/85/ce79bab0310d2e3fd2d7bc7e44412abeff7c8338f8a21dd0f2f1714989e5/aiohttp-3.14.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:40ae7b0642c25632c7eabc4a04754012691864d2a1b93becf7cddb76027b838a", size = 1778813, upload-time = "2026-06-01T19:40:23.726Z" }, - { url = "https://files.pythonhosted.org/packages/05/54/ba62ac2d1bc87e010aad23751e383b8794e45d931df67677313a2da78823/aiohttp-3.14.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:95f5217e76a046b9f228a101717ef8d42b1eb3d9d196d15202db5bf41df88936", size = 1899969, upload-time = "2026-06-01T19:40:26.406Z" }, - { url = "https://files.pythonhosted.org/packages/dc/82/7cc7907725d83a19f31551334061e1ab8e108b1d7ac52632a2a844a4acb5/aiohttp-3.14.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1a4a9f17e85b80878c176695c1998c790e83731d8271881e5d356488652a1f9e", size = 1991771, upload-time = "2026-06-01T19:40:29.061Z" }, - { url = "https://files.pythonhosted.org/packages/d0/1c/a57de71a4508c93a830b77c28af3d08cd97f606dedfc6b94275347744508/aiohttp-3.14.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:145262119b07d7f95abc1839add35ba2bfc84551d4b4660ca11542c0b215455b", size = 1868606, upload-time = "2026-06-01T19:40:31.843Z" }, - { url = "https://files.pythonhosted.org/packages/9c/ae/3839726cd49150a53ed340cc24ce5ba09d4c2117020ef9d45542bec5eb2f/aiohttp-3.14.0-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:49a33ded29b0b2fa7a367a02cf0fb89af602bb87542a16177ec8ce1c9c51d12a", size = 1665437, upload-time = "2026-06-01T19:40:35.01Z" }, - { url = "https://files.pythonhosted.org/packages/35/1e/c237923232c7da7f0392ea25d89fc5e60c0e93f685f4ebca8e7bcdd5271c/aiohttp-3.14.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:2cc736a9c9fc2bc4dd71fd404815741b6573df27c3f985948ec4076989ac57de", size = 1834090, upload-time = "2026-06-01T19:40:37.733Z" }, - { url = "https://files.pythonhosted.org/packages/98/02/a5a7a2524f92d3911761b405a7c067c751891942144adc13e2ad79611e39/aiohttp-3.14.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:b4141a3e5342ee3053a9cab54d25b64ed28289c1041e4c54b3d99839314d90ce", size = 1816907, upload-time = "2026-06-01T19:40:40.46Z" }, - { url = "https://files.pythonhosted.org/packages/fa/76/a8b9f0d09234d516af9f2d7dd715557f33b5da3b0b56ead41d1170e86e3c/aiohttp-3.14.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:e30871b2d58996cb81aac52d2b1d15ac05257131ef0f90f18c2115a380fbfe7c", size = 1840382, upload-time = "2026-06-01T19:40:43.48Z" }, - { url = "https://files.pythonhosted.org/packages/c9/8e/140e715a0a4bbc211979ea30ec8396ad2ed5bf90ab87d8058fc4668b1923/aiohttp-3.14.0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:667b881d083ccae3900ea5a241e17e5007ca78844c53ed389bb63d48f729d9c7", size = 1659497, upload-time = "2026-06-01T19:40:46.265Z" }, - { url = "https://files.pythonhosted.org/packages/10/c7/7ba5de8af9650b9767b063c675427b8685f43fa7ce563673a7bc3af60f08/aiohttp-3.14.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:b584dfe615d151e9b8f0a8ecb3aee6147f2927ec5b95ba25fe621f5377510928", size = 1870829, upload-time = "2026-06-01T19:40:49.583Z" }, - { url = "https://files.pythonhosted.org/packages/cc/bc/2aaab2f85cadb26ea59c091fa2b8e370d625154b5c14b478f1b489d07551/aiohttp-3.14.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6199707cc40e0e9cd39c36fbc97bec416c704e1d0ddce03412bb3b3e6a90ccd0", size = 1832281, upload-time = "2026-06-01T19:40:52.303Z" }, - { url = "https://files.pythonhosted.org/packages/39/98/31b9ad9fbc01f0075ee7221002df5fd2d10b647f451ca5f30edc802d9dd6/aiohttp-3.14.0-cp314-cp314t-win32.whl", hash = "sha256:a8d93334d4961c9d566b1f046c81dee475b7c21eb730728d38237bfa70d1c8e6", size = 490597, upload-time = "2026-06-01T19:40:54.937Z" }, - { url = "https://files.pythonhosted.org/packages/59/1f/299b21441c8de42ff70fddc7cfe65e92f810abcf740739a09b56f7835364/aiohttp-3.14.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2d2ffe9b614f50f069068b3b52e73414e4107fc10b7efc939a76acff9251fdd2", size = 525789, upload-time = "2026-06-01T19:40:57.306Z" }, - { url = "https://files.pythonhosted.org/packages/70/11/7f83fcba9ee05d4c54d61b3f8104da0d43a59adac44dd28effc0c9a10422/aiohttp-3.14.0-cp314-cp314t-win_arm64.whl", hash = "sha256:7a3fc4358e65826c515350f199c210de747cf669998211b1ee6c2e46de364b24", size = 467399, upload-time = "2026-06-01T19:40:59.993Z" }, + { url = "https://files.pythonhosted.org/packages/26/dd/bf526e6f0a1120dd6f2df2e97bacfe4d358f13d17a0ff5847301a1375a51/aiohttp-3.14.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:aa00140699487bd435fde4342d85c94cb256b7cd3a5b9c3396c67f19922afda2", size = 765225, upload-time = "2026-06-07T21:06:07.957Z" }, + { url = "https://files.pythonhosted.org/packages/8f/e1/a2872aa55495a70f61310d411541c6ee23812d9a884e000c716e1bc3edbf/aiohttp-3.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1c1af67559445498b502030c35c59db59966f47041ca9de5b4e707f86bd10b5f", size = 518743, upload-time = "2026-06-07T21:06:09.749Z" }, + { url = "https://files.pythonhosted.org/packages/5b/e7/c60c7b209e509cc787de3cea0550a518538cfc08003e1c1e14c1c63fff71/aiohttp-3.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d44ec478e713ee7f29b439f7eb8dc2b9d4079e11ae114d2c2ac3d5daf30516c8", size = 514139, upload-time = "2026-06-07T21:06:11.26Z" }, + { url = "https://files.pythonhosted.org/packages/5b/8d/614ace2f579702c9840ab1e1447fd8509e35b0b904f7196418fa2f57b25d/aiohttp-3.14.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d3b1a184a9a8f548a6b73f1e26b96b052193e4b3175ed7342aaf1151a1f00a04", size = 1784088, upload-time = "2026-06-07T21:06:12.887Z" }, + { url = "https://files.pythonhosted.org/packages/49/e0/726e90f99542bf292f81a96a12cc4847deb86f3ccf62c6f4014a201f4d33/aiohttp-3.14.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5f2504bc0322437c9a1ff6d3333ca56c7477b727c995f036b976ae17b98372c8", size = 1737835, upload-time = "2026-06-07T21:06:14.564Z" }, + { url = "https://files.pythonhosted.org/packages/0b/4b/d176d5c4db9d33dacf0543102ea59503bc1d528af4cfd0b719949ca49389/aiohttp-3.14.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:73f05ea02013e02512c3bf42714f1208c57168c779cc6fe23516e4543089d0a6", size = 1842801, upload-time = "2026-06-07T21:06:16.228Z" }, + { url = "https://files.pythonhosted.org/packages/dc/d6/5a99b563690ea0cbed912ae94a2ce33993a5709a651a3a4fe761e7dd973a/aiohttp-3.14.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:797457503c2d426bee06eef808d07b31ede30b65e054444e7de64cad0061b7af", size = 1929992, upload-time = "2026-06-07T21:06:17.947Z" }, + { url = "https://files.pythonhosted.org/packages/76/7f/a987b14a3859094b3cea3f4825219c3e5536242564af6e3f9c2f6c994eb2/aiohttp-3.14.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b821a1f7dedf7e37450654e620038ac3b2e81e8fa6ea269337e97101978ec730", size = 1786989, upload-time = "2026-06-07T21:06:19.677Z" }, + { url = "https://files.pythonhosted.org/packages/f1/1a/420e5c85a3e73349372ed22ce0b6af86bfa6ce16a4b20a64a2e94608c781/aiohttp-3.14.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4cd96b5ba05d67ed0cf00b5b405c8cd99586d8e3481e8ee0a831057591af7621", size = 1640129, upload-time = "2026-06-07T21:06:22.558Z" }, + { url = "https://files.pythonhosted.org/packages/a7/80/18a592ed3be0a402cc03670bd72ee1f8563ddbe1d8d5542dbf868f274136/aiohttp-3.14.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d459b98a932296c6f0e94f87511a0b1b90a8a02c30a50e60a297619cd5a58ee", size = 1756576, upload-time = "2026-06-07T21:06:24.8Z" }, + { url = "https://files.pythonhosted.org/packages/ec/0b/8b3d5713373858ff71a617daf6e3b0e81ad63e79d09a3cf2f6b6b983939c/aiohttp-3.14.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:764457a7be60825fb770a644852ff717bcbb5042f189f2bd16df61a81b3f6573", size = 1754668, upload-time = "2026-06-07T21:06:26.528Z" }, + { url = "https://files.pythonhosted.org/packages/9f/49/fd564575cf225821d7ba5a117cb8bc27213d8a7e1811162afb43ae077039/aiohttp-3.14.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f7a16ef45b081454ef844502d87a848876c490c4cb5c650c230f6ec79ed2c1e7", size = 1817019, upload-time = "2026-06-07T21:06:28.297Z" }, + { url = "https://files.pythonhosted.org/packages/ed/1b/e850c9ae6fc91356552ae668bb6c51e93fa29c8aef13398a10b56678557f/aiohttp-3.14.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:2fbc3ed048b3475b9f0cbcb9978e9d2d3511acd91ead203af26ed9f0056004cf", size = 1631638, upload-time = "2026-06-07T21:06:30.242Z" }, + { url = "https://files.pythonhosted.org/packages/eb/94/3c337ba72451a89806ace6f75bddc92bafc5b8d53d90115a512858024b63/aiohttp-3.14.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:bedb0cd073cc2dc035e30aeb99444389d3cd2113afe4ef9fcd23d439f5bade85", size = 1835660, upload-time = "2026-06-07T21:06:31.943Z" }, + { url = "https://files.pythonhosted.org/packages/2b/9c/9c18cf367a0498212d9ba7daf990b504a5e8ae064cda4b504e2647c89c03/aiohttp-3.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b6feea921016eb3d4e04d65fc4e9ca402d1a3801f562aef94989f54694917af3", size = 1775698, upload-time = "2026-06-07T21:06:33.72Z" }, + { url = "https://files.pythonhosted.org/packages/b5/63/a251a9d2a6cb45065b2ddc0bde2b3dd10108740a9a42f632c66405a761a2/aiohttp-3.14.1-cp311-cp311-win32.whl", hash = "sha256:313701e488100074ce99850404ee36e741abf6330179fec908a1944ecf570126", size = 458386, upload-time = "2026-06-07T21:06:35.279Z" }, + { url = "https://files.pythonhosted.org/packages/17/ca/69274c51dcd6e8947d77b2806cf47a4a15f2c846e2cbeb1882547d3da283/aiohttp-3.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:03ab4530fdcb3a543a122ba4b65ac9919da9fe9f78a03d328a6e38ff962f7aa5", size = 483406, upload-time = "2026-06-07T21:06:36.824Z" }, + { url = "https://files.pythonhosted.org/packages/2c/8a/c25904f77690c3688ec140f87591ef11a0cfe36bf3d5c0f1f38056fb62b3/aiohttp-3.14.1-cp311-cp311-win_arm64.whl", hash = "sha256:486f7d16ed54c39c2cbd7ca71fd8ba2b8bb7860df65bd7b6ed640bab96a38a8b", size = 452987, upload-time = "2026-06-07T21:06:38.371Z" }, + { url = "https://files.pythonhosted.org/packages/1d/21/151624b51cd92553d95424daf4bf19f19ce9be9002d19253e7e7ce67197b/aiohttp-3.14.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:d35143e27778b4bb0fb189562d7f275bff79c62ab8e98459717c0ea617ff2480", size = 757402, upload-time = "2026-06-07T21:06:40.311Z" }, + { url = "https://files.pythonhosted.org/packages/c2/82/280619e0bd7bf2454987e19282616e84762255dd9c8468f62382e8c191f1/aiohttp-3.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:bcfb80a2cc36fba2534e5e5b5264dc7ae6fcd9bf15256da3e53d2f499e6fa29d", size = 512310, upload-time = "2026-06-07T21:06:42.207Z" }, + { url = "https://files.pythonhosted.org/packages/55/b2/2aac325583aaa1353045f96dffa586d8a34e8322e14a7ba49cffeb103ab4/aiohttp-3.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:27fd7c91e51729b4f7e1577865fa6d34c9adccbc39aabe9000285b48af9f0ec2", size = 512448, upload-time = "2026-06-07T21:06:43.813Z" }, + { url = "https://files.pythonhosted.org/packages/8a/72/a60607cb849faa8af8a356c9329ea2eb6f395d49e82cc82ccba1fd8deb8f/aiohttp-3.14.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:64c567bf9eaf664280116a8688f63016e6b32db2505908e2bdaca1b6438142f2", size = 1766854, upload-time = "2026-06-07T21:06:45.391Z" }, + { url = "https://files.pythonhosted.org/packages/b5/d3/d9fe1c9ec7557ab4d0d82bebaa728c6418f0b93295ec2f4ab015f7710cc7/aiohttp-3.14.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:f5e6ff2bdbb8f4cd3fbe41f99e25bbcd58e3bf9f13d3dd31a11e7917251cc77a", size = 1740884, upload-time = "2026-06-07T21:06:47.413Z" }, + { url = "https://files.pythonhosted.org/packages/c1/dc/f2cecfaf9337ba3e63f181500814ff502aa3d00d9c7ec93a9d23d10a27b2/aiohttp-3.14.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2f73e01dc37122325caf079982621262f96d74823c179038a82fddfc50359264", size = 1810034, upload-time = "2026-06-07T21:06:50.165Z" }, + { url = "https://files.pythonhosted.org/packages/66/d7/2ff65c5e65c0d7476daf7e15c032e0805e36811185b9623e3238ad6c763e/aiohttp-3.14.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bb2c0c80d431c0d03f2c7dbf125150fedd4f0de17366a7ca33f7ccb822391842", size = 1904054, upload-time = "2026-06-07T21:06:52.035Z" }, + { url = "https://files.pythonhosted.org/packages/20/9c/d445818389df371f56d141d881153ba23183c4735a03f7356ffb43f7757d/aiohttp-3.14.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3e6fc1a85fa7194a1a7d19f44e8609180f4a8eb5fa4c7ed8b4355f080fad235c", size = 1790278, upload-time = "2026-06-07T21:06:54.049Z" }, + { url = "https://files.pythonhosted.org/packages/4d/aa/bf04cb4d865fc6101c2229a294ad744973b72e513fdc5a6b791e6983d72a/aiohttp-3.14.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:686b6c0d3911ec387b444ddf5dc62fb7f7c0a7d5186a7861626496a5ab4aff95", size = 1591795, upload-time = "2026-06-07T21:06:55.911Z" }, + { url = "https://files.pythonhosted.org/packages/dc/b4/4dac0038960427ba832f6609dfb4ea5437d7fd80c72001b9e48f834f428b/aiohttp-3.14.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c6fa4dc7ad6f8109c70bb1499e589f76b0b792baf39f9b017eb92c8a81d0a199", size = 1728397, upload-time = "2026-06-07T21:06:57.777Z" }, + { url = "https://files.pythonhosted.org/packages/2b/f9/7cd4e8ad7aa3b75f17d56bb5498dd604a93d4e6eece822ba0568c413fff0/aiohttp-3.14.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:87a5eea1b2a5e21e1ebdbb33ad4165359189327e63fc4e4894693e7f821ac817", size = 1766504, upload-time = "2026-06-07T21:07:00.009Z" }, + { url = "https://files.pythonhosted.org/packages/f9/df/fc01d9fcad0f73fed3f3d361f1f94f975947b50dff82919f6dc2bf4316cc/aiohttp-3.14.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:1c1421eb01d4fd608d88cc8290211d177a58532b55ad94076fb349c5bf467f0a", size = 1777806, upload-time = "2026-06-07T21:07:02.064Z" }, + { url = "https://files.pythonhosted.org/packages/41/09/47e2d090bddcc8fb4ccb4c314aadc32d7c5d9bb55f50f6ad1c92fc15d501/aiohttp-3.14.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:34b257ec41345c1e8f2df68fa908a7952f5de932723871eb633ecbbff396c9a4", size = 1580707, upload-time = "2026-06-07T21:07:03.942Z" }, + { url = "https://files.pythonhosted.org/packages/3d/36/f1a4ce904ae0b6930cfe9afc96d0896f7ec1a620c400405d63783bb95a9c/aiohttp-3.14.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:de538791a80e5d862addbc183f70f0158ac9b9bb872bb147f1fd2a683691e087", size = 1798121, upload-time = "2026-06-07T21:07:05.987Z" }, + { url = "https://files.pythonhosted.org/packages/70/0a/e0075ce9ca0279ee1d4f0c0b85f54fea02ebc83c3007651a72bece658fec/aiohttp-3.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:6f71173be42d3241d428f760122febb748de0623f44308a6f120d0dd9ec572e3", size = 1767580, upload-time = "2026-06-07T21:07:07.873Z" }, + { url = "https://files.pythonhosted.org/packages/3e/61/a0c0a8f327a9c52095cdd8e312391b00d3ed64ab6c72bb5c33d8ec251cf7/aiohttp-3.14.1-cp312-cp312-win32.whl", hash = "sha256:ec8dc383ee57ea3e883477dcca3f11b65d58199f1080acaf4cd6ad9a99698be4", size = 452771, upload-time = "2026-06-07T21:07:09.669Z" }, + { url = "https://files.pythonhosted.org/packages/df/d9/ea367c75f16ac9c6cdc8febb25e8318fa21a2b1bc8d6514d4b2d890bface/aiohttp-3.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:2aa92c87868cd13674989f9ee83e5f9f7ea4237589b728048e1f0c8f6caa3271", size = 479873, upload-time = "2026-06-07T21:07:11.538Z" }, + { url = "https://files.pythonhosted.org/packages/03/64/8d96784a7851156db8a4c6c3f6f91042fdf39fb15a4cc38c8b3c14833c45/aiohttp-3.14.1-cp312-cp312-win_arm64.whl", hash = "sha256:2c840c90759922cb5e6dda94596e079a30fb5a5ba548e7e0dc00574703940847", size = 448073, upload-time = "2026-06-07T21:07:13.637Z" }, + { url = "https://files.pythonhosted.org/packages/bc/97/bd137012dd97e1649162b099135a80e1fd59aaa807b2430fc448d1029aff/aiohttp-3.14.1-cp313-cp313-android_21_arm64_v8a.whl", hash = "sha256:b3a03285a7f9c7b016324574a6d92a1c895da6b978cb8f1deee3ac72bc6da178", size = 506882, upload-time = "2026-06-07T21:07:15.501Z" }, + { url = "https://files.pythonhosted.org/packages/ef/79/e5cc690e9d922a66887ceeaca53a8ffd5a7b0be3816142b7abc433742d89/aiohttp-3.14.1-cp313-cp313-android_21_x86_64.whl", hash = "sha256:2a73f487ab8ef5abbb24b7aa9b73e98eaba9e9e031804ff2416f02eca315ccaf", size = 515270, upload-time = "2026-06-07T21:07:17.53Z" }, + { url = "https://files.pythonhosted.org/packages/fe/22/a73ccbf9dbd6e26dda0b24d5fd5db7da92ee3383a79f47677ffb834c5c5b/aiohttp-3.14.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:915fbb7b41b115192259f8c9ae58f3ddc444d2b5579917270211858e606a4afd", size = 485841, upload-time = "2026-06-07T21:07:19.555Z" }, + { url = "https://files.pythonhosted.org/packages/3b/b9/57ed8eaf596321c2ad747bd480fb1700dbd7177c60dfc9e4c187f629662e/aiohttp-3.14.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:7fb4bdf95b0561a79f259f9d28fbc109728c5ee7f27aff6391f0ca703a329abe", size = 492088, upload-time = "2026-06-07T21:07:21.581Z" }, + { url = "https://files.pythonhosted.org/packages/78/c0/5ebe5270a7c140d7c6f79dcb018640225f14d406c149e4eec04a7d82fe71/aiohttp-3.14.1-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:1b9748363260121d2927704f5d4fc498150669ca3ae93625986ee89c8f80dcd4", size = 501564, upload-time = "2026-06-07T21:07:23.388Z" }, + { url = "https://files.pythonhosted.org/packages/75/7f/8cdaa24fc7983865e0915153b96a9ac5bcdd3548d64c5a27d17cecccad2d/aiohttp-3.14.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:86a6dab78b0e43e2897a3bbe15745aa60dc5423ca437b7b0b164c069bf91b876", size = 751998, upload-time = "2026-06-07T21:07:25.046Z" }, + { url = "https://files.pythonhosted.org/packages/b2/f4/c4227aacfacc5cb0cc2d119b65301d177912a6842cd64e120c47af76064f/aiohttp-3.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4dfd6e47d3c44c2279907607f73a4240b88c69eb8b90da7e2441a8045dfd21da", size = 510918, upload-time = "2026-06-07T21:07:27.28Z" }, + { url = "https://files.pythonhosted.org/packages/ab/01/a2d5f96cd4e74424864d30bc0a7e44d0a12dacdcfa91b5b2d1bd3dca6bf3/aiohttp-3.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:317acd9f8602858dc7d59679812c376c7f0b97bcbbf16e0d6237f54141d8a8a6", size = 508657, upload-time = "2026-06-07T21:07:29.252Z" }, + { url = "https://files.pythonhosted.org/packages/e8/ed/3c0fb5c500fdd8e7ebc10d1889c04384fffa1a9163eac1356088ca9da1b1/aiohttp-3.14.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bd869c427324e5cb15195793de951295710db28be7d818247f3097b4ab5d4b96", size = 1757907, upload-time = "2026-06-07T21:07:31.03Z" }, + { url = "https://files.pythonhosted.org/packages/0b/ab/d4c924d9bd5be3050c226612413ce68cb54c70d2c31b661bfc8d9a5b6a70/aiohttp-3.14.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:93b032b5ec3255473c143627d21a69ac74ae12f7f33974cb587c564d11b1066f", size = 1737565, upload-time = "2026-06-07T21:07:33.031Z" }, + { url = "https://files.pythonhosted.org/packages/19/2a/37326821ff779084020cdc33224d20b19f42f4183a500ff92022a739eda7/aiohttp-3.14.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f234b4deb12f3ad59127e037bc57c40c21e45b45282df7d3a55a0f409f595296", size = 1799018, upload-time = "2026-06-07T21:07:35.003Z" }, + { url = "https://files.pythonhosted.org/packages/b3/4f/6e947ba73e4ce09070761c05ed3a8ceb7c21f5e46798671d8b2aac0e4626/aiohttp-3.14.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9af6779bfb46abf124068327abcdf9ce95c9ef8287a3e8da76ccf2d0f16c28fa", size = 1894416, upload-time = "2026-06-07T21:07:36.956Z" }, + { url = "https://files.pythonhosted.org/packages/9d/6e/dbf1d0625dc711fb2851f4f3c3055c39ed58bae92082d8c627dbe6013736/aiohttp-3.14.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:faccab372e66bc76d5731525e7f1143c922271725b9d38c9f97edcc66266b451", size = 1783881, upload-time = "2026-06-07T21:07:39.063Z" }, + { url = "https://files.pythonhosted.org/packages/44/c2/5e25098a67268ed369483ae7d1a58bd0a13d03aab860d2a0e4a6eb25b046/aiohttp-3.14.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f380468b09d2a81633ee863b0ec5648d364bd17bb8ecfb8c2f387f7ac1faf42c", size = 1587572, upload-time = "2026-06-07T21:07:41.058Z" }, + { url = "https://files.pythonhosted.org/packages/2a/bd/cf9cee17e140f942a3de73e658a543aa8fbf35a5fc67a9d2538d52d77f0b/aiohttp-3.14.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:97e704dcd26271f5bda3fa07c3ce0fb76d6d3f8659f4baa1a24442cc9ba177ca", size = 1722137, upload-time = "2026-06-07T21:07:43.014Z" }, + { url = "https://files.pythonhosted.org/packages/89/6d/5684f8c59045c96f81a18cefbc1fbbd79d25b88f1c622f2a5c5c08fcb632/aiohttp-3.14.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:269b76ac5394092b95bc4a098f4fc6c191c083c3bd12775d1e30e663132f6a09", size = 1755953, upload-time = "2026-06-07T21:07:45.933Z" }, + { url = "https://files.pythonhosted.org/packages/a8/40/35caf3170f8359760740a7d9aa0fff2e344bef98e1d1186f5a0f6dec17e6/aiohttp-3.14.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5c0b3e614340c889d575451696374c9d17affd54cd607ca0babed8f8c37b9397", size = 1766479, upload-time = "2026-06-07T21:07:48.047Z" }, + { url = "https://files.pythonhosted.org/packages/6d/a1/b0c61e7a137f0d81de49a82023a6df73c3c16d6fefb0f8e4a93d21639002/aiohttp-3.14.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:5663ee9257cfa1add7253a7da3035a02f31b6600ec48261585e1800a81533080", size = 1580077, upload-time = "2026-06-07T21:07:50.069Z" }, + { url = "https://files.pythonhosted.org/packages/0b/41/194ea4623693009fcefebef7aef63c141754f153e9cd0d39d3b9e36c175c/aiohttp-3.14.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:603a2c834142172ffddc054067f5ec0ca65d57a0aa98a71bc81952573208e345", size = 1791688, upload-time = "2026-06-07T21:07:52.106Z" }, + { url = "https://files.pythonhosted.org/packages/ba/45/4de841f005cfe1fd63e2a2fe011262c515e2a62aa6994b15947e7d717ac9/aiohttp-3.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:cb21957bb8aca671c1765e32f58164cf0c50e6bf41c0bbbd16da20732ecaf588", size = 1761094, upload-time = "2026-06-07T21:07:54.113Z" }, + { url = "https://files.pythonhosted.org/packages/e4/ae/dbce10533d3896d544d5053939ed75b7dc31a1b0973d959b1b5ae21028d6/aiohttp-3.14.1-cp313-cp313-win32.whl", hash = "sha256:e509a55f681e6158c20f70f102f9cf61fb20fbc382272bc6d94b7343f2582780", size = 452662, upload-time = "2026-06-07T21:07:56.06Z" }, + { url = "https://files.pythonhosted.org/packages/7b/d9/0bf1a19362c32f06229da5e7ddfcec91f93474d6307f7a2d3135e9c674dc/aiohttp-3.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:1ac8531b638959718e18c2207fbfe297819875da46a740b29dfa29beba64355a", size = 479748, upload-time = "2026-06-07T21:07:58.319Z" }, + { url = "https://files.pythonhosted.org/packages/22/0a/62e7232dc9484fbec112ceb32efb6a624cc7994ec6e2b019286f17c4e8f2/aiohttp-3.14.1-cp313-cp313-win_arm64.whl", hash = "sha256:250d14af67f6b6a1a4a811049b1afa69d61d617fca6bf33149b3ab1a6dbcf7b8", size = 447723, upload-time = "2026-06-07T21:08:00.154Z" }, + { url = "https://files.pythonhosted.org/packages/c4/a1/5fafa04e1ca91ddb47608699d60649c1c6db3cf41c99e78fc4056f9513db/aiohttp-3.14.1-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:7c106c26852ca1c2047c6b80384f17100b4e439af276f21ef3d4e2f450ae7e15", size = 508531, upload-time = "2026-06-07T21:08:02.093Z" }, + { url = "https://files.pythonhosted.org/packages/fa/2e/bfa02f699d87ffc86d5959270b28f1cb410add3ccaced8ed2e0b8a5238fc/aiohttp-3.14.1-cp314-cp314-android_24_x86_64.whl", hash = "sha256:20205f7f5ade7aaec9f4b500549bbc071b046453aed72f9c06dcab87896a83e8", size = 514718, upload-time = "2026-06-07T21:08:04.476Z" }, + { url = "https://files.pythonhosted.org/packages/85/a5/9594ad6289eebbc97d167c44213d557807f90e59115caad24de21ad2c3b1/aiohttp-3.14.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:62a759436b29e677181a9e76bab8b8f689a29cb9c535f45f7c48c9c830d3f8c3", size = 487918, upload-time = "2026-06-07T21:08:06.377Z" }, + { url = "https://files.pythonhosted.org/packages/b4/61/16a32c36c3c49edec122a3dc811f2057df2f94d3b14aa107c8017d981618/aiohttp-3.14.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:2964cbf553df4d7a57348da44d961d871895fc1ee4e8c322b2a95612c7b17fba", size = 494014, upload-time = "2026-06-07T21:08:08.263Z" }, + { url = "https://files.pythonhosted.org/packages/9b/89/3ebcf96ed99c05bec9c434aaac6963fd3cbab4a786ae739908a144d9ce44/aiohttp-3.14.1-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:237651caadc3a59badd39319c54642b5299e9cc98a3a194310e55d5bb9f5e397", size = 502398, upload-time = "2026-06-07T21:08:10.244Z" }, + { url = "https://files.pythonhosted.org/packages/fd/3d/b74870a0c2d40c355928cd5b96c7a11fa821b8a40fc41365e64479b151fb/aiohttp-3.14.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:896e12dfdbbab9d8f7e16d2b28c6769a60126fa92095d1ebf9473d02593a2448", size = 758018, upload-time = "2026-06-07T21:08:12.447Z" }, + { url = "https://files.pythonhosted.org/packages/d3/66/f42f5c984d99e49c6cff5f26f590750f2e2f7ef1fcfb99966ab5be1b632e/aiohttp-3.14.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d03f281ed22579314ba00821ce20115a7c0ac430660b4cc05704a3f818b3e004", size = 512462, upload-time = "2026-06-07T21:08:14.624Z" }, + { url = "https://files.pythonhosted.org/packages/e9/a7/248e1aebe0c7810b0271e021a0f2a5eb6e78a051885b3c9df49f42a5802d/aiohttp-3.14.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:07eabb979d236335fed927e137a928c9adfb7df3b9ec7aa31726f133a62be983", size = 512824, upload-time = "2026-06-07T21:08:16.572Z" }, + { url = "https://files.pythonhosted.org/packages/26/97/2aa0e5ba0727dc3bd5aaebb7ccbc510f7dfb7fb961ec87497cd496635ab1/aiohttp-3.14.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4fe1f1087cbadb280b5e1bb054a4f00d1423c74d6626c5e48400d871d34ecefe", size = 1749898, upload-time = "2026-06-07T21:08:18.635Z" }, + { url = "https://files.pythonhosted.org/packages/00/8d/e97f6c96c891d457c8479d92a514ba194d0412f981d72c70341ee18488ed/aiohttp-3.14.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:367a9314fdc79dab0fac96e216cb41dd73c85bdca85306ce8999118ba7e0f333", size = 1710114, upload-time = "2026-06-07T21:08:20.892Z" }, + { url = "https://files.pythonhosted.org/packages/6f/e6/aa8d7e863048c8fceb5cd6ce74017311cec3ead07847387e12265fb4444e/aiohttp-3.14.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a24f677ebe83749039e7bdf862ff0bbb16818ae4193d4ef96505e269375bcce0", size = 1802541, upload-time = "2026-06-07T21:08:23.044Z" }, + { url = "https://files.pythonhosted.org/packages/83/a8/72193137de57fda4ebfae4563182d082c8856e3b6e9871d0b46f028fb369/aiohttp-3.14.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c83afe0ba876be7e943d2e0ba645809ad441575d2840c895c21ee5de93b9377a", size = 1875776, upload-time = "2026-06-07T21:08:25.288Z" }, + { url = "https://files.pythonhosted.org/packages/a0/18/938441025db6769a3464596b2410af3afde0b21eb2f204c6f766f68af4bd/aiohttp-3.14.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:634e385930fb6d2d479cf3aa66515955863b77a5e3c2b5894ca259a25b308602", size = 1760329, upload-time = "2026-06-07T21:08:27.363Z" }, + { url = "https://files.pythonhosted.org/packages/60/29/bf2496b4065e76e09fe48015aaffe5ce161d8f089b06ac6982070f653076/aiohttp-3.14.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:eeea07c4397bbc57719c4eed8f9c284874d4f175f9b6d57f7a1546b976d455ca", size = 1587293, upload-time = "2026-06-07T21:08:29.805Z" }, + { url = "https://files.pythonhosted.org/packages/49/a2/2136674d52123b1354bd05dd5753c318db47dc0c927cc70b27bab3755456/aiohttp-3.14.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:335c0cc3e3545ce98dcb9cfcb836f40c3411f43fa03dab757597d80c89af8a35", size = 1714756, upload-time = "2026-06-07T21:08:32.094Z" }, + { url = "https://files.pythonhosted.org/packages/a7/b9/e5fd2e6f915503081c0f9b1e8540947037929c70c191da2e4d54b31a21a1/aiohttp-3.14.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:ae6be797afdef264e8a84864a85b196ca06045586481b3df8a967322fd2fa844", size = 1721052, upload-time = "2026-06-07T21:08:34.167Z" }, + { url = "https://files.pythonhosted.org/packages/63/5a/2833e324a2263e104e31e2e91bc5bbee81bc499afd32203faee048a883f0/aiohttp-3.14.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:8560b4d712474335d08907db7973f71912d3a9a8f1dee992ec06b5d2fe359496", size = 1766888, upload-time = "2026-06-07T21:08:36.95Z" }, + { url = "https://files.pythonhosted.org/packages/57/fa/dea6511870913162f3b2e8c42a7614eb203a4540b8c2da43e0bfb0548f3c/aiohttp-3.14.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7edd08e0a5deb1e8564a2fcd8f4561014a3f05252334671bbf55ddd47db0e5", size = 1581679, upload-time = "2026-06-07T21:08:39.292Z" }, + { url = "https://files.pythonhosted.org/packages/14/bd/3cf0d55e71784b33534e9710a67d382d900598b4787fbce6cc7317f8c42a/aiohttp-3.14.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:b6ff7fcee63287ae57b5df3e4f5957ce032122802509246dec1a5bcc55904c95", size = 1782021, upload-time = "2026-06-07T21:08:41.407Z" }, + { url = "https://files.pythonhosted.org/packages/c1/af/14bb5843eccbe234f4dfb78ab73e549d99727247e62ae5d62cbd22eaf5b0/aiohttp-3.14.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6ffbb2f4ec1ceaff7e07d43922954da26b223d188bf30658e561b98e23089444", size = 1742574, upload-time = "2026-06-07T21:08:43.795Z" }, + { url = "https://files.pythonhosted.org/packages/f2/1e/fbeb7af9210a67ac0f9c9bec0f8f4568497924e33137a3d5b48e1cf85f3f/aiohttp-3.14.1-cp314-cp314-win32.whl", hash = "sha256:a9875b46d910cff3ea2f5962f9d266b465459fe634e22556ab9bd6fc1192eea0", size = 457773, upload-time = "2026-06-07T21:08:46.168Z" }, + { url = "https://files.pythonhosted.org/packages/f0/2b/13e8d741a9ec5db7d900c060554cf8352ab85e44e2a4469ebb9d377bda17/aiohttp-3.14.1-cp314-cp314-win_amd64.whl", hash = "sha256:af8b4b81a960eeaf1234971ac3cd0ba5901f3cd42eae42a46b4d089a8b492719", size = 485001, upload-time = "2026-06-07T21:08:48.401Z" }, + { url = "https://files.pythonhosted.org/packages/df/30/491acfa2c4d6c3ff59c49a14fc1b50be3241e25bbb0c84c09e2da4d11395/aiohttp-3.14.1-cp314-cp314-win_arm64.whl", hash = "sha256:cf4491381b1b57425c315a56a439251b1bdac07b2275f19a8c44bc57744532ec", size = 453809, upload-time = "2026-06-07T21:08:50.7Z" }, + { url = "https://files.pythonhosted.org/packages/34/e3/19dbe1a1f4cc6230eb9e314de7fe68053b0992f9302b27d12141a0b5db53/aiohttp-3.14.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:819c054312f1af92947e6a55883d1b66feefab11531a7fc45e0fb9b63880b5c2", size = 793320, upload-time = "2026-06-07T21:08:52.775Z" }, + { url = "https://files.pythonhosted.org/packages/7f/20/1b7182219ba1b108430d6e4dc53d25ae02dcfcf5a045b33af4e8c5167527/aiohttp-3.14.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:10ee9c1753a8f706345b22496c79fbddb5be0599e0823f3738b1534058e25340", size = 529077, upload-time = "2026-06-07T21:08:55Z" }, + { url = "https://files.pythonhosted.org/packages/b9/c8/14ce60ec31a2e5f5274bb17d383a6f7a3aabca31ac04eee05585bbadab16/aiohttp-3.14.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1601cc37baf5750ccacae618ec2daf020769581695550e3b654a911f859c563d", size = 532476, upload-time = "2026-06-07T21:08:57.176Z" }, + { url = "https://files.pythonhosted.org/packages/7e/02/9ac85e081e53da2e061b02fa7758fe0a12d17b8ce2d1f5e6c7cb76730328/aiohttp-3.14.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4d6e0ac9da31c9c04c84e1c0182ad8d6df35965a85cae29cd71d089621b3ae94", size = 1922347, upload-time = "2026-06-07T21:08:59.563Z" }, + { url = "https://files.pythonhosted.org/packages/c0/3e/d3ba07a0ab38b5389e10bec4362d21e10a4f667cba2d79ba30837b3a5059/aiohttp-3.14.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9e8f2d660c350b3d0e259c7a7e3d9b7fc8b41210cbcc3d4a7076ff0a5e5c2fdc", size = 1786465, upload-time = "2026-06-07T21:09:01.909Z" }, + { url = "https://files.pythonhosted.org/packages/0b/cb/e2ee978a00cfb2df829704a69528b18154eba5939f45bc1efa8f33aee4c5/aiohttp-3.14.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4691802dda97be727f79d86818acaad7eb8e9252626a1d6b519fedbb92d5e251", size = 1909423, upload-time = "2026-06-07T21:09:04.357Z" }, + { url = "https://files.pythonhosted.org/packages/73/5d/1430334858b1022b58ae50399a918f0bd6fe8fa7fa183598d657ff61e040/aiohttp-3.14.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c389c482a7e9b9dc3ee2701ac46c4125297a3818875b9c305ddb603c04828fd1", size = 2001906, upload-time = "2026-06-07T21:09:06.722Z" }, + { url = "https://files.pythonhosted.org/packages/66/4e/560c7472d3d198a23aa5c8b19a5115bf6a9b77b7d3e4bb363da320430ad2/aiohttp-3.14.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fc0cacab7ba4e56f0f81c82a98c09bed2f39c940107b03a34b168bdf7597edd3", size = 1877095, upload-time = "2026-06-07T21:09:09.011Z" }, + { url = "https://files.pythonhosted.org/packages/0d/f1/4745806578d447db4a784a8591e2dae3afdfc2bcb96f8f81271b13df6543/aiohttp-3.14.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:979ed4717f59b8bb12e3963378fa285d93d367e15bcd66c721311826d3c44a6c", size = 1676222, upload-time = "2026-06-07T21:09:11.461Z" }, + { url = "https://files.pythonhosted.org/packages/6a/c9/48255813cca749a229ef0ab476004ec623728ad79a9c0840616f6c076325/aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:38e1e7daaea81df51c952e18483f323d878499a1e2bfe564790e0f9701d6f203", size = 1842922, upload-time = "2026-06-07T21:09:14.118Z" }, + { url = "https://files.pythonhosted.org/packages/3d/c0/bbd054e2bee909f529523a5af3891052606af5143c09f5f183ec3b234676/aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:4132e72c608fe9fecb8f409113567605915b83e9bdd3ea56538d2f9cd35002f1", size = 1825035, upload-time = "2026-06-07T21:09:16.447Z" }, + { url = "https://files.pythonhosted.org/packages/a8/ae/90395d4376deceb74e09ec26b6adf7d2015a6f8802d6d84446af860fef04/aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:eefd9cc9b6d4a2db5f00a26bc3e4f9acf71926a6ec557cd56c9c6f27c290b665", size = 1849512, upload-time = "2026-06-07T21:09:18.742Z" }, + { url = "https://files.pythonhosted.org/packages/93/bd/fb25f3049957553d4ce0ba6ae480aa2f592a6985497fca590837d16c1be0/aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:b165790117eea512d7f3fb22f1f6dad3d55a7189571993eb015591c1401276d1", size = 1668571, upload-time = "2026-06-07T21:09:21.458Z" }, + { url = "https://files.pythonhosted.org/packages/3f/22/7f73303d64dd567ff3addca90b556690ed1233a47b8f55d242fb90af3681/aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:ed09c7eb1c391271c2ed0314a51903e72a3acb653d5ccfc264cdf3ef11f8269d", size = 1881159, upload-time = "2026-06-07T21:09:23.813Z" }, + { url = "https://files.pythonhosted.org/packages/44/be/0474c5a8b5640e1e4aa1923430a91f4151be82e511373fe764189b89aef5/aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:99abd37084b82f5830c635fddd0b4993b9742a66eb746dacf433c8590e8f9e3c", size = 1841409, upload-time = "2026-06-07T21:09:26.207Z" }, + { url = "https://files.pythonhosted.org/packages/7b/3c/bb4a7cba26956cb3da4553cc2056cf67be5b5ff6e6d8fa4fbdff73bfb7ae/aiohttp-3.14.1-cp314-cp314t-win32.whl", hash = "sha256:47ddf841cdecc810749921d25606dee45857d12d2ad5ddb7b5bd7eab12e4b365", size = 494166, upload-time = "2026-06-07T21:09:28.505Z" }, + { url = "https://files.pythonhosted.org/packages/8a/84/ec80c2c1f66a952555a9f86df6b33af65108a6febfa0471b69013a12f807/aiohttp-3.14.1-cp314-cp314t-win_amd64.whl", hash = "sha256:5e78b522b7a6e27e0b25d19b247b75039ac4c94f99823e3c9e53ae1603a9f7e9", size = 530255, upload-time = "2026-06-07T21:09:30.843Z" }, + { url = "https://files.pythonhosted.org/packages/2a/71/6e22be134a4061ada85a92951b842f2657f17d926b727f3f94c56ae963d6/aiohttp-3.14.1-cp314-cp314t-win_arm64.whl", hash = "sha256:90d53f1609c29ccc2193945ef732428382a28f78d0456ae4d3daf0d48b74f0f6", size = 469640, upload-time = "2026-06-07T21:09:33.028Z" }, ] [[package]] From 16bc38feb71a24d11663508a6bf516d837354cc5 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Wed, 10 Jun 2026 12:29:17 -0700 Subject: [PATCH 33/60] test(integration): treat batch 'network not found' as successful delete test_delete_network retries createOrganizationActionBatch up to 5 times, but action batches are asynchronous: a prior attempt's batch can finish deleting the network after the test stops polling. The next attempt then hits 400 "Network not found", flaking the suite (#393, #394, #395). A delete is idempotent, so a 400 not-found on the create call means the network is already gone, which is the desired end state. Catch it and return success in both the sync and async lifecycle tests. Co-Authored-By: Claude Opus 4.8 --- .../test_client_crud_lifecycle_async.py | 22 ++++++++++++++----- .../test_client_crud_lifecycle_sync.py | 22 ++++++++++++++----- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/tests/integration/test_client_crud_lifecycle_async.py b/tests/integration/test_client_crud_lifecycle_async.py index 7bcad546..f471453f 100644 --- a/tests/integration/test_client_crud_lifecycle_async.py +++ b/tests/integration/test_client_crud_lifecycle_async.py @@ -201,6 +201,7 @@ async def test_delete_policy_objects(dashboard, org_id, version_salt): async def test_delete_network(dashboard, org_id, network): import asyncio from meraki.api.batch.networks import ActionBatchNetworks + from meraki.exceptions import AsyncAPIError action = ActionBatchNetworks().deleteNetwork(network["id"]) max_attempts = 5 @@ -209,12 +210,21 @@ async def test_delete_network(dashboard, org_id, network): delay = 2**attempt await asyncio.sleep(delay) - batch = await dashboard.organizations.createOrganizationActionBatch( - organizationId=org_id, - actions=[action], - confirmed=False, - synchronous=False, - ) + try: + batch = await dashboard.organizations.createOrganizationActionBatch( + organizationId=org_id, + actions=[action], + confirmed=False, + synchronous=False, + ) + except AsyncAPIError as e: + # Action batches are asynchronous: a prior attempt's batch can + # finish deleting the network after we stopped observing it. The + # network being gone is the desired end state, so a "not found" + # here means the delete already succeeded. + if e.status == 400 and "not found" in str(e.message).lower(): + return + raise assert batch is not None assert batch["id"] diff --git a/tests/integration/test_client_crud_lifecycle_sync.py b/tests/integration/test_client_crud_lifecycle_sync.py index 20e8bf75..9f003b67 100644 --- a/tests/integration/test_client_crud_lifecycle_sync.py +++ b/tests/integration/test_client_crud_lifecycle_sync.py @@ -208,6 +208,7 @@ def test_delete_policy_objects(dashboard, org_id, version_salt): def test_delete_network(dashboard, org_id, network): import time from meraki.api.batch.networks import ActionBatchNetworks + from meraki.exceptions import APIError action = ActionBatchNetworks().deleteNetwork(network["id"]) max_attempts = 5 @@ -216,12 +217,21 @@ def test_delete_network(dashboard, org_id, network): delay = 2**attempt time.sleep(delay) - batch = dashboard.organizations.createOrganizationActionBatch( - organizationId=org_id, - actions=[action], - confirmed=False, - synchronous=False, - ) + try: + batch = dashboard.organizations.createOrganizationActionBatch( + organizationId=org_id, + actions=[action], + confirmed=False, + synchronous=False, + ) + except APIError as e: + # Action batches are asynchronous: a prior attempt's batch can + # finish deleting the network after we stopped observing it. The + # network being gone is the desired end state, so a "not found" + # here means the delete already succeeded. + if e.status == 400 and "not found" in str(e.message).lower(): + return + raise assert batch is not None assert batch["id"] From d7ce9df867e36bff66e91da7fb3dc87a769a599e Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 19:49:57 +0000 Subject: [PATCH 34/60] Auto-generated library v3.1.0b1 for API v1.71.0-beta.1. (#400) Co-authored-by: GitHub Action --- docs/generation-report.md | 6 + meraki/__init__.py | 2 +- meraki/_version.py | 2 +- meraki/aio/api/appliance.py | 2 +- meraki/aio/api/assistant.py | 471 ++++++++++++++++++++++++++++++ meraki/aio/api/devices.py | 120 ++++---- meraki/aio/api/organizations.py | 251 +++------------- meraki/aio/api/wireless.py | 55 +++- meraki/api/appliance.py | 2 +- meraki/api/assistant.py | 471 ++++++++++++++++++++++++++++++ meraki/api/batch/assistant.py | 3 + meraki/api/batch/devices.py | 69 ++--- meraki/api/batch/organizations.py | 20 +- meraki/api/batch/switch.py | 2 +- meraki/api/batch/wireless.py | 2 +- meraki/api/devices.py | 120 ++++---- meraki/api/organizations.py | 251 +++------------- meraki/api/wireless.py | 55 +++- pyproject.toml | 2 +- uv.lock | 2 +- 20 files changed, 1262 insertions(+), 646 deletions(-) create mode 100644 meraki/aio/api/assistant.py create mode 100644 meraki/api/assistant.py create mode 100644 meraki/api/batch/assistant.py diff --git a/docs/generation-report.md b/docs/generation-report.md index d9a22bcb..69f0096d 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,11 @@ # Generation Report +## 2026-06-10 | Library v3.1.0b1 | API 1.71.0-beta.1 + + +No Python keyword parameter conflicts detected. + + ## 2026-05-27 | Library v3.1.0b3 | API 1.70.0-beta.3 diff --git a/meraki/__init__.py b/meraki/__init__.py index 77505a4a..a3484af4 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -52,7 +52,7 @@ from meraki._version import __version__ # noqa: F401 from datetime import datetime -__api_version__ = "1.70.0-beta.3" +__api_version__ = "1.71.0-beta.1" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index ae9bf830..f17b01a6 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "3.1.0b3" +__version__ = "3.1.0b1" diff --git a/meraki/aio/api/appliance.py b/meraki/aio/api/appliance.py index a6a6e853..6212717b 100644 --- a/meraki/aio/api/appliance.py +++ b/meraki/aio/api/appliance.py @@ -2815,7 +2815,7 @@ def getNetworkApplianceUplinksUsageHistory(self, networkId: str, **kwargs): https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-uplinks-usage-history - networkId (string): Network 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 31 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 31 days. The default is 10 minutes. - resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 60, 300, 600, 1800, 3600, 86400. The default is 60. diff --git a/meraki/aio/api/assistant.py b/meraki/aio/api/assistant.py new file mode 100644 index 00000000..b34084b2 --- /dev/null +++ b/meraki/aio/api/assistant.py @@ -0,0 +1,471 @@ +import urllib + + +class AsyncAssistant: + def __init__(self, session): + super().__init__() + self._session = session + + def getOrganizationAssistantCapabilities(self, organizationId: str): + """ + **List the AI assistant's available capabilities and agents for this organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-capabilities + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["assistant", "configure", "capabilities"], + "operation": "getOrganizationAssistantCapabilities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/capabilities" + + return self._session.get(metadata, resource) + + def createOrganizationAssistantChatCompletion(self, organizationId: str, **kwargs): + """ + **Create a chat completion with the AI assistant** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-completion + + - organizationId (string): Organization ID + - query (string): Simple text question or instruction to send to the AI assistant. Provide either 'query' for text-only requests or 'content' for multi-modal input. + - content (array): List of multi-modal content blocks. Use instead of 'query' to send text or images. Supports text and image types only; for audio and file support, use the messages endpoint. Maximum 8 parts. + - threadId (string): An existing thread ID to continue a conversation. If omitted, a new thread is created. + - networkId (string): Optional network ID to scope the query to a specific network. Defaults to the user's last visited network. + - platform (string): Platform identifier. Defaults to MERAKI when omitted. Case-insensitive. + - language (string): Optional language override. Defaults to the user's preferred language. + - country (string): Optional country override. Defaults to the user's country. + """ + + kwargs.update(locals()) + + if "platform" in kwargs: + options = ["DIGITAL_TWIN", "DNAC", "MERAKI", "digital_twin", "dnac", "meraki"] + assert kwargs["platform"] in options, ( + f'''"platform" cannot be "{kwargs["platform"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["assistant", "configure", "chat", "completions"], + "operation": "createOrganizationAssistantChatCompletion", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/completions" + + body_params = [ + "query", + "content", + "threadId", + "networkId", + "platform", + "language", + "country", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatCompletion: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationAssistantChatThreads(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List all active conversation threads for the authenticated user.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-threads + + - 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 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. + - sort (string): Field to sort results by. Defaults to dateModified. + - sortOrder (string): Sort direction for results. Defaults to desc. + - from (string): Filter threads modified after this timestamp. + - to (string): Filter threads modified before this timestamp. + """ + + kwargs.update(locals()) + + if "sort" in kwargs: + options = ["dateModified", "id", "name"] + assert kwargs["sort"] in options, f'''"sort" cannot be "{kwargs["sort"]}", & must be set to one of: {options}''' + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "getOrganizationAssistantChatThreads", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads" + + query_params = [ + "perPage", + "sort", + "sortOrder", + "from", + "to", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationAssistantChatThreads: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationAssistantChatThread(self, organizationId: str, **kwargs): + """ + **Create a new conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadName (string): Display name for the new thread. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "createOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads" + + body_params = [ + "threadName", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatThread: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationAssistantChatThread(self, organizationId: str, threadId: str): + """ + **Return a single conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadId (string): Thread ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "getOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}" + + return self._session.get(metadata, resource) + + def updateOrganizationAssistantChatThread(self, organizationId: str, threadId: str, threadName: str, **kwargs): + """ + **Update the name of a conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - threadName (string): New display name for the thread. + """ + + kwargs = locals() + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "updateOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}" + + body_params = [ + "threadName", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationAssistantChatThread: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationAssistantChatThread(self, organizationId: str, threadId: str): + """ + **Delete a conversation thread and all its messages.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadId (string): Thread ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "deleteOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}" + + return self._session.delete(metadata, resource) + + def getOrganizationAssistantChatThreadMessages( + self, organizationId: str, threadId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List messages in a conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-messages + + - organizationId (string): Organization ID + - threadId (string): Thread 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 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. + - sortOrder (string): Sort direction for results by timestamp. Defaults to asc. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "getOrganizationAssistantChatThreadMessages", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages" + + query_params = [ + "perPage", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssistantChatThreadMessages: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationAssistantChatThreadMessage(self, organizationId: str, threadId: str, content: list, **kwargs): + """ + **Create a new chat message in a thread.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread-message + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - content (array): List of message content parts. Supports text, image, audio, and file types. Maximum 8 parts. + - networkName (string): Name of the target network. + - networkId (string): Optional Meraki network ID for thread context. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "createOrganizationAssistantChatThreadMessage", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages" + + body_params = [ + "content", + "networkName", + "networkId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatThreadMessage: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationAssistantChatThreadMessage(self, organizationId: str, threadId: str, messageId: str): + """ + **Return a single message in a conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "getOrganizationAssistantChatThreadMessage", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}" + + return self._session.get(metadata, resource) + + def getOrganizationAssistantChatThreadMessageArtifacts(self, organizationId: str, threadId: str, messageId: str): + """ + **List artifacts attached to a specific message** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message-artifacts + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "artifacts"], + "operation": "getOrganizationAssistantChatThreadMessageArtifacts", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/artifacts" + + return self._session.get(metadata, resource) + + def getOrganizationAssistantChatThreadMessageArtifact( + self, organizationId: str, threadId: str, messageId: str, artifactId: str + ): + """ + **Return a single artifact with its full content.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message-artifact + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + - artifactId (string): Artifact ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "artifacts"], + "operation": "getOrganizationAssistantChatThreadMessageArtifact", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + artifactId = urllib.parse.quote(str(artifactId), safe="") + resource = ( + f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/artifacts/{artifactId}" + ) + + return self._session.get(metadata, resource) + + def getOrganizationAssistantChatThreadMessageFeedback(self, organizationId: str, threadId: str, messageId: str): + """ + **Return all feedback entries previously submitted for a specific message in a thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message-feedback + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "feedback"], + "operation": "getOrganizationAssistantChatThreadMessageFeedback", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/feedback" + + return self._session.get(metadata, resource) + + def createOrganizationAssistantChatThreadMessageFeedback( + self, organizationId: str, threadId: str, messageId: str, vote: bool, **kwargs + ): + """ + **Submit or replace feedback for a specific assistant message.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread-message-feedback + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + - vote (boolean): True for positive, false for negative. + - reason (string): Optional free-text reason for the feedback (e.g., 'inaccurate', 'incomplete', 'helpful'). Not constrained to a fixed set of values. + - comment (string): Optional free-text comment providing additional detail. + - message (string): The assistant message text the feedback refers to. Captured for analytics; not required. + - prompt (string): The user prompt that produced the assistant message. Captured for analytics; not required. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "feedback"], + "operation": "createOrganizationAssistantChatThreadMessageFeedback", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/feedback" + + body_params = [ + "vote", + "reason", + "comment", + "message", + "prompt", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatThreadMessageFeedback: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationAssistantQueryLimits(self, organizationId: str): + """ + **Get query limits for the AI assistant for this organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-query-limits + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["assistant", "configure", "queryLimits"], + "operation": "getOrganizationAssistantQueryLimits", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/queryLimits" + + return self._session.get(metadata, resource) diff --git a/meraki/aio/api/devices.py b/meraki/aio/api/devices.py index 1b778161..8bf80c64 100644 --- a/meraki/aio/api/devices.py +++ b/meraki/aio/api/devices.py @@ -160,7 +160,7 @@ def updateDeviceCellularSims(self, serial: str, **kwargs): - serial (string): Serial - sims (array): List of SIMs. If a SIM was previously configured and not specified in this request, it will remain unchanged. - - simOrdering (array): Specifies the ordering of all SIMs for an MG: primary, secondary, and not-in-use (when applicable). It's required for devices with 3 or more SIMs and can be used in place of 'isPrimary' for dual-SIM devices. To indicate eSIM, use 'sim3'. Sim failover will occur only between primary and secondary sim slots. + - simOrdering (array): Specifies the ordering of all SIMs for an MG: primary, secondary, and not-in-use (when applicable). It's required for devices with 3 or more SIMs and can be used in place of 'isPrimary' for dual-SIM devices. Use the raw eSIM slot value for the device, such as 'sim2' or 'sim3'. Sim failover will occur only between primary and secondary sim slots. - simFailover (object): SIM Failover settings. """ @@ -196,7 +196,7 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty - serial (string): Serial - slot (string): Required parameter for the SIM slot to update the cellular band mask for - type (string): Required parameter for the signal type to update the cellular band mask for - - masked (array): Required parameter for the band identifiers to mask for the given SIM slot and signal type. For LTE use bands identifiers like '30' and for 5G use band identifiers like 'n30'. Maximum 256 bands. + - masked (array): Required parameter for the band identifiers to mask for the given SIM slot and signal type. For LTE use bands identifiers like '30', for 5G use band identifiers like 'n30', or use 'all' to mask all bands for that signal type. Maximum 256 bands. """ kwargs = locals() @@ -232,72 +232,6 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty return self._session.post(metadata, resource, payload) - def updateDeviceCliConfigFavorite(self, serial: str, configId: str, favorite: bool, **kwargs): - """ - **Favorite or unfavorite a configuration for an IOS-XE device** - https://developer.cisco.com/meraki/api-v1/#!update-device-cli-config-favorite - - - serial (string): Serial - - configId (string): Config ID - - favorite (boolean): Whether the config should be favorited - """ - - kwargs = locals() - - metadata = { - "tags": ["devices", "configure", "cli", "configs"], - "operation": "updateDeviceCliConfigFavorite", - } - serial = urllib.parse.quote(str(serial), safe="") - configId = urllib.parse.quote(str(configId), safe="") - resource = f"/devices/{serial}/cli/configs/{configId}" - - body_params = [ - "favorite", - ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} - - if self._session._validate_kwargs: - all_params = [] + body_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning(f"updateDeviceCliConfigFavorite: ignoring unrecognized kwargs: {invalid}") - - return self._session.put(metadata, resource, payload) - - def createDeviceConfigRestore(self, serial: str, configId: str, **kwargs): - """ - **Create a restore request for a specific config history record** - https://developer.cisco.com/meraki/api-v1/#!create-device-config-restore - - - serial (string): Serial - - configId (string): Config ID - - scheduledFor (string): Requested ISO 8601 UTC timestamp for when the restore should be scheduled - """ - - kwargs.update(locals()) - - metadata = { - "tags": ["devices", "configure", "cli", "configs"], - "operation": "createDeviceConfigRestore", - } - serial = urllib.parse.quote(str(serial), safe="") - configId = urllib.parse.quote(str(configId), safe="") - resource = f"/devices/{serial}/cli/configs/{configId}/restores" - - body_params = [ - "scheduledFor", - ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} - - if self._session._validate_kwargs: - all_params = [] + body_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning(f"createDeviceConfigRestore: ignoring unrecognized kwargs: {invalid}") - - return self._session.post(metadata, resource, payload) - def getDeviceClients(self, serial: str, **kwargs): """ **List the clients of a device, up to a maximum of a month ago** @@ -964,6 +898,56 @@ def getDeviceLiveToolsPortsStatus(self, serial: str, jobId: str): return self._session.get(metadata, resource) + def createDeviceLiveToolsPowerUsage(self, serial: str, **kwargs): + """ + **Enqueues a live tool job that retrieves details about a device's overall power usage** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-power-usage + + - 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", "power", "usage"], + "operation": "createDeviceLiveToolsPowerUsage", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/power/usage" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsPowerUsage: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsPowerUsage(self, serial: str, jobId: str): + """ + **Retrieve the status and results of a previously created live tool job fetching details about a device's overall power usage.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-power-usage + + - serial (string): Serial + - jobId (string): Job ID + """ + + metadata = { + "tags": ["devices", "liveTools", "power", "usage"], + "operation": "getDeviceLiveToolsPowerUsage", + } + serial = urllib.parse.quote(str(serial), safe="") + jobId = urllib.parse.quote(str(jobId), safe="") + resource = f"/devices/{serial}/liveTools/power/usage/{jobId}" + + return self._session.get(metadata, resource) + def createDeviceLiveToolsReboot(self, serial: str, **kwargs): """ **Enqueue a job to reboot a device** diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 9be8b7ae..39da08d3 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -98,6 +98,7 @@ def updateOrganization(self, organizationId: str, **kwargs): - name (string): The name of the organization - management (object): Information about the organization's management system - api (object): API-specific settings + - privacy (object): Privacy-related settings for the organization. """ kwargs.update(locals()) @@ -113,6 +114,7 @@ def updateOrganization(self, organizationId: str, **kwargs): "name", "management", "api", + "privacy", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1923,7 +1925,7 @@ def dismissOrganizationAssuranceAlerts(self, organizationId: str, alertIds: list https://developer.cisco.com/meraki/api-v1/#!dismiss-organization-assurance-alerts - organizationId (string): Organization ID - - alertIds (array): Array of alert IDs to dismiss + - alertIds (array): Array of alert IDs in this organization to dismiss. Missing or inaccessible alert IDs return 404. """ kwargs = locals() @@ -2284,7 +2286,7 @@ def restoreOrganizationAssuranceAlerts(self, organizationId: str, alertIds: list https://developer.cisco.com/meraki/api-v1/#!restore-organization-assurance-alerts - organizationId (string): Organization ID - - alertIds (array): Array of alert IDs to restore + - alertIds (array): Array of alert IDs in this organization to restore. Missing or inaccessible alert IDs return 404. """ kwargs = locals() @@ -2369,6 +2371,9 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s - organizationId (string): Organization ID - networkId (string): Network ID to query. + - serials (array): A list of serials of AP devices + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - ssidNumbers (array): Filter results by SSID number - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 8 hours. If interval is provided, the timespan will be autocalculated. @@ -2386,6 +2391,9 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s query_params = [ "networkId", + "serials", + "bands", + "ssidNumbers", "t0", "t1", "timespan", @@ -2393,8 +2401,18 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + array_params = [ + "serials", + "bands", + "ssidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + if self._session._validate_kwargs: - all_params = query_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( @@ -5420,147 +5438,6 @@ def getOrganizationDevicesCellularUplinksTowersByDevice( return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationDevicesCliConfigs(self, organizationId: str, serials: list, total_pages=1, direction="next", **kwargs): - """ - **Retrieve the history of running configurations for IOS-XE devices** - https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-cli-configs - - - organizationId (string): Organization ID - - serials (array): Device serials to include in the response - - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 20. - - 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. - - isFavorite (boolean): Whether to return only favorited configs - """ - - kwargs.update(locals()) - - metadata = { - "tags": ["organizations", "configure", "devices", "cli", "configs"], - "operation": "getOrganizationDevicesCliConfigs", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/devices/cli/configs" - - query_params = [ - "perPage", - "startingAfter", - "endingBefore", - "serials", - "isFavorite", - ] - 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()) - - if self._session._validate_kwargs: - all_params = query_params + array_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationDevicesCliConfigs: ignoring unrecognized kwargs: {invalid}") - - return self._session.get_pages(metadata, resource, params, total_pages, direction) - - def getOrganizationDevicesCliConfigsDetails( - self, organizationId: str, configId: str, serials: list, total_pages=1, direction="next", **kwargs - ): - """ - **Retrieve the full contents for a given IOS-XE device configuration** - https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-cli-configs-details - - - organizationId (string): Organization ID - - configId (string): Config ID - - serials (array): Device serials to use when locating the config record - - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5. Default is 5. - - 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": ["organizations", "configure", "devices", "cli", "configs", "details"], - "operation": "getOrganizationDevicesCliConfigsDetails", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/devices/cli/configs/details" - - query_params = [ - "perPage", - "startingAfter", - "endingBefore", - "configId", - "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()) - - if self._session._validate_kwargs: - all_params = query_params + array_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning( - f"getOrganizationDevicesCliConfigsDetails: ignoring unrecognized kwargs: {invalid}" - ) - - return self._session.get_pages(metadata, resource, params, total_pages, direction) - - def getDeviceConfigRestores(self, organizationId: str, serials: list, **kwargs): - """ - **Return restore status entries for IOS-XE device configurations** - https://developer.cisco.com/meraki/api-v1/#!get-device-config-restores - - - organizationId (string): Organization ID - - serials (array): Device serial numbers - """ - - kwargs = locals() - - metadata = { - "tags": ["organizations", "configure", "devices", "cli", "configs", "restores"], - "operation": "getDeviceConfigRestores", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/devices/cli/configs/restores" - - 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()) - - if self._session._validate_kwargs: - all_params = query_params + array_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning(f"getDeviceConfigRestores: ignoring unrecognized kwargs: {invalid}") - - return self._session.get(metadata, resource, params) - def createOrganizationDevicesControllerMigration(self, organizationId: str, serials: list, target: str, **kwargs): """ **Migrate devices to another controller or management mode** @@ -8752,6 +8629,7 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs): - enforceTwoFactorAuth (boolean): Boolean indicating whether users in this organization will be required to use an extra verification code when logging in to Dashboard. This code will be sent to their mobile phone via SMS, or can be generated by the authenticator application. - enforceLoginIpRanges (boolean): Boolean indicating whether organization will restrict access to Dashboard (including the API) from certain IP addresses. - loginIpRanges (array): List of acceptable IP ranges. Entries can be single IP addresses, IP address ranges, and CIDR subnets. + - enforceLockedIpSessions (boolean): Boolean indicating whether Dashboard sessions are locked to the IP address from which they were established. Only applicable to organizations that support locked-IP sessions; otherwise the parameter is ignored. - apiAuthentication (object): Details for indicating whether organization will restrict access to API (but not Dashboard) to certain IP addresses. """ @@ -8778,6 +8656,7 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs): "enforceTwoFactorAuth", "enforceLoginIpRanges", "loginIpRanges", + "enforceLockedIpSessions", "apiAuthentication", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -10184,22 +10063,26 @@ def getOrganizationPolicyObjects(self, organizationId: str, total_pages=1, direc def createOrganizationPolicyObject(self, organizationId: str, name: str, category: str, type: str, **kwargs): """ - **Creates a new Policy Object.** + **Creates a new Policy Object** https://developer.cisco.com/meraki/api-v1/#!create-organization-policy-object - organizationId (string): Organization ID - name (string): Name of a policy object, unique within the organization (alphanumeric, space, dash, or underscore characters only) - category (string): Category of a policy object (one of: adaptivePolicy, network) - - type (string): Type of a policy object (one of: adaptivePolicyIpv4Cidr, cidr, fqdn, ipAndMask) + - type (string): Type of a policy object (one of: adaptivePolicyIpv4Cidr, cidr, fqdn). DEPRECATED: `ipAndMask` is deprecated and will be removed in a future release. Use `cidr` instead. - cidr (string): CIDR Value of a policy object (e.g. 10.11.12.1/24") - fqdn (string): Fully qualified domain name of policy object (e.g. "example.com") - - mask (string): Mask of a policy object (e.g. "255.255.0.0") - - ip (string): IP Address of a policy object (e.g. "1.2.3.4") + - mask (string): Mask of a policy object (e.g. "255.255.0.0"). Used only with deprecated `type=ipAndMask`. + - ip (string): IP Address of a policy object (e.g. "1.2.3.4"). Used only with deprecated `type=ipAndMask`. - groupIds (array): The IDs of policy object groups the policy object belongs to """ kwargs.update(locals()) + if "type" in kwargs: + options = ["adaptivePolicyIpv4Cidr", "cidr", "fqdn"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + metadata = { "tags": ["organizations", "configure", "policyObjects"], "operation": "createOrganizationPolicyObject", @@ -10393,7 +10276,7 @@ def getOrganizationPolicyObject(self, organizationId: str, policyObjectId: str): def updateOrganizationPolicyObject(self, organizationId: str, policyObjectId: str, **kwargs): """ - **Updates a Policy Object.** + **Updates a Policy Object** https://developer.cisco.com/meraki/api-v1/#!update-organization-policy-object - organizationId (string): Organization ID @@ -10401,8 +10284,8 @@ def updateOrganizationPolicyObject(self, organizationId: str, policyObjectId: st - name (string): Name of a policy object, unique within the organization (alphanumeric, space, dash, or underscore characters only) - cidr (string): CIDR Value of a policy object (e.g. 10.11.12.1/24") - fqdn (string): Fully qualified domain name of policy object (e.g. "example.com") - - mask (string): Mask of a policy object (e.g. "255.255.0.0") - - ip (string): IP Address of a policy object (e.g. "1.2.3.4") + - mask (string): Mask of a policy object (e.g. "255.255.0.0"). Used only with deprecated `type=ipAndMask`. + - ip (string): IP Address of a policy object (e.g. "1.2.3.4"). Used only with deprecated `type=ipAndMask`. - groupIds (array): The IDs of policy object groups the policy object belongs to """ @@ -10940,72 +10823,6 @@ def deleteOrganizationSamlRole(self, organizationId: str, samlRoleId: str): return self._session.delete(metadata, resource) - def getOrganizationSaseBatch(self, organizationId: str, batchId: str): - """ - **Retrieves a batch summary with aggregated job status counts** - https://developer.cisco.com/meraki/api-v1/#!get-organization-sase-batch - - - organizationId (string): Organization ID - - batchId (string): Batch ID - """ - - metadata = { - "tags": ["organizations", "configure", "sase", "batches"], - "operation": "getOrganizationSaseBatch", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - batchId = urllib.parse.quote(str(batchId), safe="") - resource = f"/organizations/{organizationId}/sase/batches/{batchId}" - - return self._session.get(metadata, resource) - - def getOrganizationSaseBatchJobs(self, organizationId: str, batchId: str, total_pages=1, direction="next", **kwargs): - """ - **List jobs within a batch, with optional status filtering** - https://developer.cisco.com/meraki/api-v1/#!get-organization-sase-batch-jobs - - - organizationId (string): Organization ID - - batchId (string): Batch 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. - - 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. - - status (string): If provided, filters jobs by status - """ - - kwargs.update(locals()) - - if "status" in kwargs: - options = ["complete", "deferred", "failed", "new", "ready", "running", "scheduled"] - assert kwargs["status"] in options, ( - f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' - ) - - metadata = { - "tags": ["organizations", "configure", "sase", "batches", "jobs"], - "operation": "getOrganizationSaseBatchJobs", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - batchId = urllib.parse.quote(str(batchId), safe="") - resource = f"/organizations/{organizationId}/sase/batches/{batchId}/jobs" - - query_params = [ - "perPage", - "startingAfter", - "endingBefore", - "status", - ] - params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} - - if self._session._validate_kwargs: - all_params = query_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationSaseBatchJobs: ignoring unrecognized kwargs: {invalid}") - - return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationSaseConnectors(self, organizationId: str): """ **List SSE Connectors for an organization** diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index d33b5d8a..2f796375 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -2686,7 +2686,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - radiusServerTimeout (integer): The amount of time for which a RADIUS client waits for a reply from the RADIUS server (must be between 1-10 seconds). - radiusServerAttemptsLimit (integer): The maximum number of transmit attempts after which a RADIUS server is failed over (must be between 1-5). - radiusFallbackEnabled (boolean): Whether or not higher priority RADIUS servers should be retried after 60 seconds. - - radiusRadsec (object): The current settings for RADIUS RADSec + - radiusRadsec (object): The current settings for RADIUS RadSec - radiusCoaEnabled (boolean): If true, Meraki devices will act as a RADIUS Dynamic Authorization Server and will respond to RADIUS Change-of-Authorization and Disconnect messages sent by the RADIUS server. - radiusFailoverPolicy (string): This policy determines how authentication requests should be handled in the event that all of the configured RADIUS servers are unreachable ('Deny access' or 'Allow access') - radiusLoadBalancingPolicy (string): This policy determines which RADIUS server will be contacted first in an authentication attempt and the ordering of any necessary retry attempts ('Strict priority order' or 'Round robin') @@ -5429,6 +5429,49 @@ def getOrganizationAssuranceWirelessExperienceMetricsOverviewHistoryByNetwork( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAssuranceWirelessExperienceMostImpactedNetworks(self, organizationId: str, **kwargs): + """ + **Returns the most impacted wireless experience networks and the top failure contributor for each network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-most-impacted-networks + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - limit (integer): Number of most impacted networks to return. Default is 5. Maximum is 10. + """ + + kwargs.update(locals()) + + if "limit" in kwargs: + options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + assert kwargs["limit"] in options, f'''"limit" cannot be "{kwargs["limit"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["wireless", "configure", "experience", "mostImpactedNetworks"], + "operation": "getOrganizationAssuranceWirelessExperienceMostImpactedNetworks", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/mostImpactedNetworks" + + query_params = [ + "t0", + "t1", + "timespan", + "limit", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceMostImpactedNetworks: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -8759,7 +8802,7 @@ def getOrganizationWirelessDevicesProvisioningRecommendationsTags(self, organiza def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): """ - **Query for details on the organization's RADSEC device Certificate Authority certificates (CAs)** + **Query for details on the organization's RadSec device Certificate Authority certificates (CAs)** https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities - organizationId (string): Organization ID @@ -8800,7 +8843,7 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizati def updateOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): """ - **Update an organization's RADSEC device Certificate Authority (CA) state** + **Update an organization's RadSec device Certificate Authority (CA) state** https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-devices-radsec-certificates-authorities - organizationId (string): Organization ID @@ -8835,7 +8878,7 @@ def updateOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organiz def createOrganizationWirelessDevicesRadsecCertificatesAuthority(self, organizationId: str): """ - **Create an organization's RADSEC device Certificate Authority (CA)** + **Create an organization's RadSec device Certificate Authority (CA)** https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-radsec-certificates-authority - organizationId (string): Organization ID @@ -8852,7 +8895,7 @@ def createOrganizationWirelessDevicesRadsecCertificatesAuthority(self, organizat def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organizationId: str, **kwargs): """ - **Query for certificate revocation list (CRL) for the organization's RADSEC device Certificate Authorities (CAs).** + **Query for certificate revocation list (CRL) for the organization's RadSec device Certificate Authorities (CAs).** https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls - organizationId (string): Organization ID @@ -8893,7 +8936,7 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organi def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas(self, organizationId: str, **kwargs): """ - **Query for all delta certificate revocation list (CRL) for the organization's RADSEC device Certificate Authority (CA) with the given id.** + **Query for all delta certificate revocation list (CRL) for the organization's RadSec device Certificate Authority (CA) with the given id.** https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls-deltas - organizationId (string): Organization ID diff --git a/meraki/api/appliance.py b/meraki/api/appliance.py index f20e932a..15bca41a 100644 --- a/meraki/api/appliance.py +++ b/meraki/api/appliance.py @@ -2815,7 +2815,7 @@ def getNetworkApplianceUplinksUsageHistory(self, networkId: str, **kwargs): https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-uplinks-usage-history - networkId (string): Network 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 31 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 31 days. The default is 10 minutes. - resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 60, 300, 600, 1800, 3600, 86400. The default is 60. diff --git a/meraki/api/assistant.py b/meraki/api/assistant.py new file mode 100644 index 00000000..9923c9d8 --- /dev/null +++ b/meraki/api/assistant.py @@ -0,0 +1,471 @@ +import urllib + + +class Assistant(object): + def __init__(self, session): + super(Assistant, self).__init__() + self._session = session + + def getOrganizationAssistantCapabilities(self, organizationId: str): + """ + **List the AI assistant's available capabilities and agents for this organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-capabilities + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["assistant", "configure", "capabilities"], + "operation": "getOrganizationAssistantCapabilities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/capabilities" + + return self._session.get(metadata, resource) + + def createOrganizationAssistantChatCompletion(self, organizationId: str, **kwargs): + """ + **Create a chat completion with the AI assistant** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-completion + + - organizationId (string): Organization ID + - query (string): Simple text question or instruction to send to the AI assistant. Provide either 'query' for text-only requests or 'content' for multi-modal input. + - content (array): List of multi-modal content blocks. Use instead of 'query' to send text or images. Supports text and image types only; for audio and file support, use the messages endpoint. Maximum 8 parts. + - threadId (string): An existing thread ID to continue a conversation. If omitted, a new thread is created. + - networkId (string): Optional network ID to scope the query to a specific network. Defaults to the user's last visited network. + - platform (string): Platform identifier. Defaults to MERAKI when omitted. Case-insensitive. + - language (string): Optional language override. Defaults to the user's preferred language. + - country (string): Optional country override. Defaults to the user's country. + """ + + kwargs.update(locals()) + + if "platform" in kwargs: + options = ["DIGITAL_TWIN", "DNAC", "MERAKI", "digital_twin", "dnac", "meraki"] + assert kwargs["platform"] in options, ( + f'''"platform" cannot be "{kwargs["platform"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["assistant", "configure", "chat", "completions"], + "operation": "createOrganizationAssistantChatCompletion", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/completions" + + body_params = [ + "query", + "content", + "threadId", + "networkId", + "platform", + "language", + "country", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatCompletion: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationAssistantChatThreads(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List all active conversation threads for the authenticated user.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-threads + + - 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 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. + - sort (string): Field to sort results by. Defaults to dateModified. + - sortOrder (string): Sort direction for results. Defaults to desc. + - from (string): Filter threads modified after this timestamp. + - to (string): Filter threads modified before this timestamp. + """ + + kwargs.update(locals()) + + if "sort" in kwargs: + options = ["dateModified", "id", "name"] + assert kwargs["sort"] in options, f'''"sort" cannot be "{kwargs["sort"]}", & must be set to one of: {options}''' + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "getOrganizationAssistantChatThreads", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads" + + query_params = [ + "perPage", + "sort", + "sortOrder", + "from", + "to", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationAssistantChatThreads: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationAssistantChatThread(self, organizationId: str, **kwargs): + """ + **Create a new conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadName (string): Display name for the new thread. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "createOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads" + + body_params = [ + "threadName", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatThread: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationAssistantChatThread(self, organizationId: str, threadId: str): + """ + **Return a single conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadId (string): Thread ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "getOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}" + + return self._session.get(metadata, resource) + + def updateOrganizationAssistantChatThread(self, organizationId: str, threadId: str, threadName: str, **kwargs): + """ + **Update the name of a conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - threadName (string): New display name for the thread. + """ + + kwargs = locals() + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "updateOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}" + + body_params = [ + "threadName", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationAssistantChatThread: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationAssistantChatThread(self, organizationId: str, threadId: str): + """ + **Delete a conversation thread and all its messages.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadId (string): Thread ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "deleteOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}" + + return self._session.delete(metadata, resource) + + def getOrganizationAssistantChatThreadMessages( + self, organizationId: str, threadId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List messages in a conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-messages + + - organizationId (string): Organization ID + - threadId (string): Thread 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 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. + - sortOrder (string): Sort direction for results by timestamp. Defaults to asc. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "getOrganizationAssistantChatThreadMessages", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages" + + query_params = [ + "perPage", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssistantChatThreadMessages: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationAssistantChatThreadMessage(self, organizationId: str, threadId: str, content: list, **kwargs): + """ + **Create a new chat message in a thread.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread-message + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - content (array): List of message content parts. Supports text, image, audio, and file types. Maximum 8 parts. + - networkName (string): Name of the target network. + - networkId (string): Optional Meraki network ID for thread context. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "createOrganizationAssistantChatThreadMessage", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages" + + body_params = [ + "content", + "networkName", + "networkId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatThreadMessage: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationAssistantChatThreadMessage(self, organizationId: str, threadId: str, messageId: str): + """ + **Return a single message in a conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "getOrganizationAssistantChatThreadMessage", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}" + + return self._session.get(metadata, resource) + + def getOrganizationAssistantChatThreadMessageArtifacts(self, organizationId: str, threadId: str, messageId: str): + """ + **List artifacts attached to a specific message** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message-artifacts + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "artifacts"], + "operation": "getOrganizationAssistantChatThreadMessageArtifacts", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/artifacts" + + return self._session.get(metadata, resource) + + def getOrganizationAssistantChatThreadMessageArtifact( + self, organizationId: str, threadId: str, messageId: str, artifactId: str + ): + """ + **Return a single artifact with its full content.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message-artifact + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + - artifactId (string): Artifact ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "artifacts"], + "operation": "getOrganizationAssistantChatThreadMessageArtifact", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + artifactId = urllib.parse.quote(str(artifactId), safe="") + resource = ( + f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/artifacts/{artifactId}" + ) + + return self._session.get(metadata, resource) + + def getOrganizationAssistantChatThreadMessageFeedback(self, organizationId: str, threadId: str, messageId: str): + """ + **Return all feedback entries previously submitted for a specific message in a thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message-feedback + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "feedback"], + "operation": "getOrganizationAssistantChatThreadMessageFeedback", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/feedback" + + return self._session.get(metadata, resource) + + def createOrganizationAssistantChatThreadMessageFeedback( + self, organizationId: str, threadId: str, messageId: str, vote: bool, **kwargs + ): + """ + **Submit or replace feedback for a specific assistant message.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread-message-feedback + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + - vote (boolean): True for positive, false for negative. + - reason (string): Optional free-text reason for the feedback (e.g., 'inaccurate', 'incomplete', 'helpful'). Not constrained to a fixed set of values. + - comment (string): Optional free-text comment providing additional detail. + - message (string): The assistant message text the feedback refers to. Captured for analytics; not required. + - prompt (string): The user prompt that produced the assistant message. Captured for analytics; not required. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "feedback"], + "operation": "createOrganizationAssistantChatThreadMessageFeedback", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/feedback" + + body_params = [ + "vote", + "reason", + "comment", + "message", + "prompt", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatThreadMessageFeedback: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationAssistantQueryLimits(self, organizationId: str): + """ + **Get query limits for the AI assistant for this organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-query-limits + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["assistant", "configure", "queryLimits"], + "operation": "getOrganizationAssistantQueryLimits", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/queryLimits" + + return self._session.get(metadata, resource) diff --git a/meraki/api/batch/assistant.py b/meraki/api/batch/assistant.py new file mode 100644 index 00000000..31bf6782 --- /dev/null +++ b/meraki/api/batch/assistant.py @@ -0,0 +1,3 @@ +class ActionBatchAssistant(object): + def __init__(self): + super(ActionBatchAssistant, self).__init__() diff --git a/meraki/api/batch/devices.py b/meraki/api/batch/devices.py index c3c5b134..faf0d038 100644 --- a/meraki/api/batch/devices.py +++ b/meraki/api/batch/devices.py @@ -79,7 +79,7 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty - serial (string): Serial - slot (string): Required parameter for the SIM slot to update the cellular band mask for - type (string): Required parameter for the signal type to update the cellular band mask for - - masked (array): Required parameter for the band identifiers to mask for the given SIM slot and signal type. For LTE use bands identifiers like '30' and for 5G use band identifiers like 'n30'. Maximum 256 bands. + - masked (array): Required parameter for the band identifiers to mask for the given SIM slot and signal type. For LTE use bands identifiers like '30', for 5G use band identifiers like 'n30', or use 'all' to mask all bands for that signal type. Maximum 256 bands. """ kwargs = locals() @@ -107,91 +107,62 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty } return action - def updateDeviceCliConfigFavorite(self, serial: str, configId: str, favorite: bool, **kwargs): - """ - **Favorite or unfavorite a configuration for an IOS-XE device** - https://developer.cisco.com/meraki/api-v1/#!update-device-cli-config-favorite - - - serial (string): Serial - - configId (string): Config ID - - favorite (boolean): Whether the config should be favorited - """ - - kwargs = locals() - - serial = urllib.parse.quote(serial, safe="") - configId = urllib.parse.quote(configId, safe="") - resource = f"/devices/{serial}/cli/configs/{configId}" - - body_params = [ - "favorite", - ] - 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 createDeviceConfigRestore(self, serial: str, configId: str, **kwargs): + def createDeviceLiveToolsLedsBlink(self, serial: str, duration: int, **kwargs): """ - **Create a restore request for a specific config history record** - https://developer.cisco.com/meraki/api-v1/#!create-device-config-restore + **Enqueue a job to blink LEDs on a device. This endpoint has a rate limit of one request every 10 seconds.** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-leds-blink - serial (string): Serial - - configId (string): Config ID - - scheduledFor (string): Requested ISO 8601 UTC timestamp for when the restore should be scheduled + - duration (integer): The duration in seconds to blink LEDs. + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ kwargs.update(locals()) serial = urllib.parse.quote(serial, safe="") - configId = urllib.parse.quote(configId, safe="") - resource = f"/devices/{serial}/cli/configs/{configId}/restores" + resource = f"/devices/{serial}/liveTools/leds/blink" body_params = [ - "scheduledFor", + "duration", + "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { "resource": resource, - "operation": "restore", + "operation": "blink", "body": payload, } return action - def createDeviceLiveToolsLedsBlink(self, serial: str, duration: int, **kwargs): + def createDeviceLiveToolsPortsStatus(self, serial: str, **kwargs): """ - **Enqueue a job to blink LEDs on a device. This endpoint has a rate limit of one request every 10 seconds.** - https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-leds-blink + **Enqueue a job to retrieve port status for a device. This endpoint has a sustained rate limit of one request every five seconds per device, with an allowed burst of five requests.** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-ports-status - serial (string): Serial - - duration (integer): The duration in seconds to blink LEDs. - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ kwargs.update(locals()) serial = urllib.parse.quote(serial, safe="") - resource = f"/devices/{serial}/liveTools/leds/blink" + resource = f"/devices/{serial}/liveTools/ports/status" body_params = [ - "duration", "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { "resource": resource, - "operation": "blink", + "operation": "status", "body": payload, } return action - def createDeviceLiveToolsPortsStatus(self, serial: str, **kwargs): + def createDeviceLiveToolsPowerUsage(self, serial: str, **kwargs): """ - **Enqueue a job to retrieve port status for a device. This endpoint has a sustained rate limit of one request every five seconds per device, with an allowed burst of five requests.** - https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-ports-status + **Enqueues a live tool job that retrieves details about a device's overall power usage. This endpoint has a sustained rate limit of one request every five seconds per device, with an allowed burst of five requests.** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-power-usage - serial (string): Serial - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret @@ -200,7 +171,7 @@ def createDeviceLiveToolsPortsStatus(self, serial: str, **kwargs): kwargs.update(locals()) serial = urllib.parse.quote(serial, safe="") - resource = f"/devices/{serial}/liveTools/ports/status" + resource = f"/devices/{serial}/liveTools/power/usage" body_params = [ "callback", @@ -208,7 +179,7 @@ def createDeviceLiveToolsPortsStatus(self, serial: str, **kwargs): payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { "resource": resource, - "operation": "status", + "operation": "job", "body": payload, } return action diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index 202a0cc1..cfca5a40 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -1737,6 +1737,7 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs): - enforceTwoFactorAuth (boolean): Boolean indicating whether users in this organization will be required to use an extra verification code when logging in to Dashboard. This code will be sent to their mobile phone via SMS, or can be generated by the authenticator application. - enforceLoginIpRanges (boolean): Boolean indicating whether organization will restrict access to Dashboard (including the API) from certain IP addresses. - loginIpRanges (array): List of acceptable IP ranges. Entries can be single IP addresses, IP address ranges, and CIDR subnets. + - enforceLockedIpSessions (boolean): Boolean indicating whether Dashboard sessions are locked to the IP address from which they were established. Only applicable to organizations that support locked-IP sessions; otherwise the parameter is ignored. - apiAuthentication (object): Details for indicating whether organization will restrict access to API (but not Dashboard) to certain IP addresses. """ @@ -1759,6 +1760,7 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs): "enforceTwoFactorAuth", "enforceLoginIpRanges", "loginIpRanges", + "enforceLockedIpSessions", "apiAuthentication", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2389,22 +2391,26 @@ def deleteOrganizationPoliciesGlobalGroupPolicy(self, organizationId: str, polic def createOrganizationPolicyObject(self, organizationId: str, name: str, category: str, type: str, **kwargs): """ - **Creates a new Policy Object.** + **Creates a new Policy Object. Note: type `ipAndMask` is deprecated; use `cidr`.** https://developer.cisco.com/meraki/api-v1/#!create-organization-policy-object - organizationId (string): Organization ID - name (string): Name of a policy object, unique within the organization (alphanumeric, space, dash, or underscore characters only) - category (string): Category of a policy object (one of: adaptivePolicy, network) - - type (string): Type of a policy object (one of: adaptivePolicyIpv4Cidr, cidr, fqdn, ipAndMask) + - type (string): Type of a policy object (one of: adaptivePolicyIpv4Cidr, cidr, fqdn). DEPRECATED: `ipAndMask` is deprecated and will be removed in a future release. Use `cidr` instead. - cidr (string): CIDR Value of a policy object (e.g. 10.11.12.1/24") - fqdn (string): Fully qualified domain name of policy object (e.g. "example.com") - - mask (string): Mask of a policy object (e.g. "255.255.0.0") - - ip (string): IP Address of a policy object (e.g. "1.2.3.4") + - mask (string): Mask of a policy object (e.g. "255.255.0.0"). Used only with deprecated `type=ipAndMask`. + - ip (string): IP Address of a policy object (e.g. "1.2.3.4"). Used only with deprecated `type=ipAndMask`. - groupIds (array): The IDs of policy object groups the policy object belongs to """ kwargs.update(locals()) + if "type" in kwargs: + options = ["adaptivePolicyIpv4Cidr", "cidr", "fqdn"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + organizationId = urllib.parse.quote(organizationId, safe="") resource = f"/organizations/{organizationId}/policyObjects" @@ -2505,7 +2511,7 @@ def deleteOrganizationPolicyObjectsGroup(self, organizationId: str, policyObject def updateOrganizationPolicyObject(self, organizationId: str, policyObjectId: str, **kwargs): """ - **Updates a Policy Object.** + **Updates a Policy Object. Note: type `ipAndMask` is deprecated; use `cidr`.** https://developer.cisco.com/meraki/api-v1/#!update-organization-policy-object - organizationId (string): Organization ID @@ -2513,8 +2519,8 @@ def updateOrganizationPolicyObject(self, organizationId: str, policyObjectId: st - name (string): Name of a policy object, unique within the organization (alphanumeric, space, dash, or underscore characters only) - cidr (string): CIDR Value of a policy object (e.g. 10.11.12.1/24") - fqdn (string): Fully qualified domain name of policy object (e.g. "example.com") - - mask (string): Mask of a policy object (e.g. "255.255.0.0") - - ip (string): IP Address of a policy object (e.g. "1.2.3.4") + - mask (string): Mask of a policy object (e.g. "255.255.0.0"). Used only with deprecated `type=ipAndMask`. + - ip (string): IP Address of a policy object (e.g. "1.2.3.4"). Used only with deprecated `type=ipAndMask`. - groupIds (array): The IDs of policy object groups the policy object belongs to """ diff --git a/meraki/api/batch/switch.py b/meraki/api/batch/switch.py index 71d35164..f27d9fa6 100644 --- a/meraki/api/batch/switch.py +++ b/meraki/api/batch/switch.py @@ -1235,7 +1235,7 @@ def updateNetworkSwitchRoutingMulticast(self, networkId: str, **kwargs): payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { "resource": resource, - "operation": "update", + "operation": "ms/multicast/actions/update", "body": payload, } return action diff --git a/meraki/api/batch/wireless.py b/meraki/api/batch/wireless.py index ca73d367..cfd2accc 100644 --- a/meraki/api/batch/wireless.py +++ b/meraki/api/batch/wireless.py @@ -869,7 +869,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - radiusServerTimeout (integer): The amount of time for which a RADIUS client waits for a reply from the RADIUS server (must be between 1-10 seconds). - radiusServerAttemptsLimit (integer): The maximum number of transmit attempts after which a RADIUS server is failed over (must be between 1-5). - radiusFallbackEnabled (boolean): Whether or not higher priority RADIUS servers should be retried after 60 seconds. - - radiusRadsec (object): The current settings for RADIUS RADSec + - radiusRadsec (object): The current settings for RADIUS RadSec - radiusCoaEnabled (boolean): If true, Meraki devices will act as a RADIUS Dynamic Authorization Server and will respond to RADIUS Change-of-Authorization and Disconnect messages sent by the RADIUS server. - radiusFailoverPolicy (string): This policy determines how authentication requests should be handled in the event that all of the configured RADIUS servers are unreachable ('Deny access' or 'Allow access') - radiusLoadBalancingPolicy (string): This policy determines which RADIUS server will be contacted first in an authentication attempt and the ordering of any necessary retry attempts ('Strict priority order' or 'Round robin') diff --git a/meraki/api/devices.py b/meraki/api/devices.py index e1f59096..b888ca6b 100644 --- a/meraki/api/devices.py +++ b/meraki/api/devices.py @@ -160,7 +160,7 @@ def updateDeviceCellularSims(self, serial: str, **kwargs): - serial (string): Serial - sims (array): List of SIMs. If a SIM was previously configured and not specified in this request, it will remain unchanged. - - simOrdering (array): Specifies the ordering of all SIMs for an MG: primary, secondary, and not-in-use (when applicable). It's required for devices with 3 or more SIMs and can be used in place of 'isPrimary' for dual-SIM devices. To indicate eSIM, use 'sim3'. Sim failover will occur only between primary and secondary sim slots. + - simOrdering (array): Specifies the ordering of all SIMs for an MG: primary, secondary, and not-in-use (when applicable). It's required for devices with 3 or more SIMs and can be used in place of 'isPrimary' for dual-SIM devices. Use the raw eSIM slot value for the device, such as 'sim2' or 'sim3'. Sim failover will occur only between primary and secondary sim slots. - simFailover (object): SIM Failover settings. """ @@ -196,7 +196,7 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty - serial (string): Serial - slot (string): Required parameter for the SIM slot to update the cellular band mask for - type (string): Required parameter for the signal type to update the cellular band mask for - - masked (array): Required parameter for the band identifiers to mask for the given SIM slot and signal type. For LTE use bands identifiers like '30' and for 5G use band identifiers like 'n30'. Maximum 256 bands. + - masked (array): Required parameter for the band identifiers to mask for the given SIM slot and signal type. For LTE use bands identifiers like '30', for 5G use band identifiers like 'n30', or use 'all' to mask all bands for that signal type. Maximum 256 bands. """ kwargs = locals() @@ -232,72 +232,6 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty return self._session.post(metadata, resource, payload) - def updateDeviceCliConfigFavorite(self, serial: str, configId: str, favorite: bool, **kwargs): - """ - **Favorite or unfavorite a configuration for an IOS-XE device** - https://developer.cisco.com/meraki/api-v1/#!update-device-cli-config-favorite - - - serial (string): Serial - - configId (string): Config ID - - favorite (boolean): Whether the config should be favorited - """ - - kwargs = locals() - - metadata = { - "tags": ["devices", "configure", "cli", "configs"], - "operation": "updateDeviceCliConfigFavorite", - } - serial = urllib.parse.quote(str(serial), safe="") - configId = urllib.parse.quote(str(configId), safe="") - resource = f"/devices/{serial}/cli/configs/{configId}" - - body_params = [ - "favorite", - ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} - - if self._session._validate_kwargs: - all_params = [] + body_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning(f"updateDeviceCliConfigFavorite: ignoring unrecognized kwargs: {invalid}") - - return self._session.put(metadata, resource, payload) - - def createDeviceConfigRestore(self, serial: str, configId: str, **kwargs): - """ - **Create a restore request for a specific config history record** - https://developer.cisco.com/meraki/api-v1/#!create-device-config-restore - - - serial (string): Serial - - configId (string): Config ID - - scheduledFor (string): Requested ISO 8601 UTC timestamp for when the restore should be scheduled - """ - - kwargs.update(locals()) - - metadata = { - "tags": ["devices", "configure", "cli", "configs"], - "operation": "createDeviceConfigRestore", - } - serial = urllib.parse.quote(str(serial), safe="") - configId = urllib.parse.quote(str(configId), safe="") - resource = f"/devices/{serial}/cli/configs/{configId}/restores" - - body_params = [ - "scheduledFor", - ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} - - if self._session._validate_kwargs: - all_params = [] + body_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning(f"createDeviceConfigRestore: ignoring unrecognized kwargs: {invalid}") - - return self._session.post(metadata, resource, payload) - def getDeviceClients(self, serial: str, **kwargs): """ **List the clients of a device, up to a maximum of a month ago** @@ -964,6 +898,56 @@ def getDeviceLiveToolsPortsStatus(self, serial: str, jobId: str): return self._session.get(metadata, resource) + def createDeviceLiveToolsPowerUsage(self, serial: str, **kwargs): + """ + **Enqueues a live tool job that retrieves details about a device's overall power usage** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-power-usage + + - 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", "power", "usage"], + "operation": "createDeviceLiveToolsPowerUsage", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/power/usage" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsPowerUsage: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsPowerUsage(self, serial: str, jobId: str): + """ + **Retrieve the status and results of a previously created live tool job fetching details about a device's overall power usage.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-power-usage + + - serial (string): Serial + - jobId (string): Job ID + """ + + metadata = { + "tags": ["devices", "liveTools", "power", "usage"], + "operation": "getDeviceLiveToolsPowerUsage", + } + serial = urllib.parse.quote(str(serial), safe="") + jobId = urllib.parse.quote(str(jobId), safe="") + resource = f"/devices/{serial}/liveTools/power/usage/{jobId}" + + return self._session.get(metadata, resource) + def createDeviceLiveToolsReboot(self, serial: str, **kwargs): """ **Enqueue a job to reboot a device** diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index 080ddf3d..372995b6 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -98,6 +98,7 @@ def updateOrganization(self, organizationId: str, **kwargs): - name (string): The name of the organization - management (object): Information about the organization's management system - api (object): API-specific settings + - privacy (object): Privacy-related settings for the organization. """ kwargs.update(locals()) @@ -113,6 +114,7 @@ def updateOrganization(self, organizationId: str, **kwargs): "name", "management", "api", + "privacy", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1923,7 +1925,7 @@ def dismissOrganizationAssuranceAlerts(self, organizationId: str, alertIds: list https://developer.cisco.com/meraki/api-v1/#!dismiss-organization-assurance-alerts - organizationId (string): Organization ID - - alertIds (array): Array of alert IDs to dismiss + - alertIds (array): Array of alert IDs in this organization to dismiss. Missing or inaccessible alert IDs return 404. """ kwargs = locals() @@ -2284,7 +2286,7 @@ def restoreOrganizationAssuranceAlerts(self, organizationId: str, alertIds: list https://developer.cisco.com/meraki/api-v1/#!restore-organization-assurance-alerts - organizationId (string): Organization ID - - alertIds (array): Array of alert IDs to restore + - alertIds (array): Array of alert IDs in this organization to restore. Missing or inaccessible alert IDs return 404. """ kwargs = locals() @@ -2369,6 +2371,9 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s - organizationId (string): Organization ID - networkId (string): Network ID to query. + - serials (array): A list of serials of AP devices + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - ssidNumbers (array): Filter results by SSID number - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 8 hours. If interval is provided, the timespan will be autocalculated. @@ -2386,6 +2391,9 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s query_params = [ "networkId", + "serials", + "bands", + "ssidNumbers", "t0", "t1", "timespan", @@ -2393,8 +2401,18 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + array_params = [ + "serials", + "bands", + "ssidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + if self._session._validate_kwargs: - all_params = query_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( @@ -5420,147 +5438,6 @@ def getOrganizationDevicesCellularUplinksTowersByDevice( return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationDevicesCliConfigs(self, organizationId: str, serials: list, total_pages=1, direction="next", **kwargs): - """ - **Retrieve the history of running configurations for IOS-XE devices** - https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-cli-configs - - - organizationId (string): Organization ID - - serials (array): Device serials to include in the response - - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 20. Default is 20. - - 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. - - isFavorite (boolean): Whether to return only favorited configs - """ - - kwargs.update(locals()) - - metadata = { - "tags": ["organizations", "configure", "devices", "cli", "configs"], - "operation": "getOrganizationDevicesCliConfigs", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/devices/cli/configs" - - query_params = [ - "perPage", - "startingAfter", - "endingBefore", - "serials", - "isFavorite", - ] - 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()) - - if self._session._validate_kwargs: - all_params = query_params + array_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationDevicesCliConfigs: ignoring unrecognized kwargs: {invalid}") - - return self._session.get_pages(metadata, resource, params, total_pages, direction) - - def getOrganizationDevicesCliConfigsDetails( - self, organizationId: str, configId: str, serials: list, total_pages=1, direction="next", **kwargs - ): - """ - **Retrieve the full contents for a given IOS-XE device configuration** - https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-cli-configs-details - - - organizationId (string): Organization ID - - configId (string): Config ID - - serials (array): Device serials to use when locating the config record - - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 5. Default is 5. - - 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": ["organizations", "configure", "devices", "cli", "configs", "details"], - "operation": "getOrganizationDevicesCliConfigsDetails", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/devices/cli/configs/details" - - query_params = [ - "perPage", - "startingAfter", - "endingBefore", - "configId", - "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()) - - if self._session._validate_kwargs: - all_params = query_params + array_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning( - f"getOrganizationDevicesCliConfigsDetails: ignoring unrecognized kwargs: {invalid}" - ) - - return self._session.get_pages(metadata, resource, params, total_pages, direction) - - def getDeviceConfigRestores(self, organizationId: str, serials: list, **kwargs): - """ - **Return restore status entries for IOS-XE device configurations** - https://developer.cisco.com/meraki/api-v1/#!get-device-config-restores - - - organizationId (string): Organization ID - - serials (array): Device serial numbers - """ - - kwargs = locals() - - metadata = { - "tags": ["organizations", "configure", "devices", "cli", "configs", "restores"], - "operation": "getDeviceConfigRestores", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/devices/cli/configs/restores" - - 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()) - - if self._session._validate_kwargs: - all_params = query_params + array_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning(f"getDeviceConfigRestores: ignoring unrecognized kwargs: {invalid}") - - return self._session.get(metadata, resource, params) - def createOrganizationDevicesControllerMigration(self, organizationId: str, serials: list, target: str, **kwargs): """ **Migrate devices to another controller or management mode** @@ -8752,6 +8629,7 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs): - enforceTwoFactorAuth (boolean): Boolean indicating whether users in this organization will be required to use an extra verification code when logging in to Dashboard. This code will be sent to their mobile phone via SMS, or can be generated by the authenticator application. - enforceLoginIpRanges (boolean): Boolean indicating whether organization will restrict access to Dashboard (including the API) from certain IP addresses. - loginIpRanges (array): List of acceptable IP ranges. Entries can be single IP addresses, IP address ranges, and CIDR subnets. + - enforceLockedIpSessions (boolean): Boolean indicating whether Dashboard sessions are locked to the IP address from which they were established. Only applicable to organizations that support locked-IP sessions; otherwise the parameter is ignored. - apiAuthentication (object): Details for indicating whether organization will restrict access to API (but not Dashboard) to certain IP addresses. """ @@ -8778,6 +8656,7 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs): "enforceTwoFactorAuth", "enforceLoginIpRanges", "loginIpRanges", + "enforceLockedIpSessions", "apiAuthentication", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -10184,22 +10063,26 @@ def getOrganizationPolicyObjects(self, organizationId: str, total_pages=1, direc def createOrganizationPolicyObject(self, organizationId: str, name: str, category: str, type: str, **kwargs): """ - **Creates a new Policy Object.** + **Creates a new Policy Object** https://developer.cisco.com/meraki/api-v1/#!create-organization-policy-object - organizationId (string): Organization ID - name (string): Name of a policy object, unique within the organization (alphanumeric, space, dash, or underscore characters only) - category (string): Category of a policy object (one of: adaptivePolicy, network) - - type (string): Type of a policy object (one of: adaptivePolicyIpv4Cidr, cidr, fqdn, ipAndMask) + - type (string): Type of a policy object (one of: adaptivePolicyIpv4Cidr, cidr, fqdn). DEPRECATED: `ipAndMask` is deprecated and will be removed in a future release. Use `cidr` instead. - cidr (string): CIDR Value of a policy object (e.g. 10.11.12.1/24") - fqdn (string): Fully qualified domain name of policy object (e.g. "example.com") - - mask (string): Mask of a policy object (e.g. "255.255.0.0") - - ip (string): IP Address of a policy object (e.g. "1.2.3.4") + - mask (string): Mask of a policy object (e.g. "255.255.0.0"). Used only with deprecated `type=ipAndMask`. + - ip (string): IP Address of a policy object (e.g. "1.2.3.4"). Used only with deprecated `type=ipAndMask`. - groupIds (array): The IDs of policy object groups the policy object belongs to """ kwargs.update(locals()) + if "type" in kwargs: + options = ["adaptivePolicyIpv4Cidr", "cidr", "fqdn"] + assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' + metadata = { "tags": ["organizations", "configure", "policyObjects"], "operation": "createOrganizationPolicyObject", @@ -10393,7 +10276,7 @@ def getOrganizationPolicyObject(self, organizationId: str, policyObjectId: str): def updateOrganizationPolicyObject(self, organizationId: str, policyObjectId: str, **kwargs): """ - **Updates a Policy Object.** + **Updates a Policy Object** https://developer.cisco.com/meraki/api-v1/#!update-organization-policy-object - organizationId (string): Organization ID @@ -10401,8 +10284,8 @@ def updateOrganizationPolicyObject(self, organizationId: str, policyObjectId: st - name (string): Name of a policy object, unique within the organization (alphanumeric, space, dash, or underscore characters only) - cidr (string): CIDR Value of a policy object (e.g. 10.11.12.1/24") - fqdn (string): Fully qualified domain name of policy object (e.g. "example.com") - - mask (string): Mask of a policy object (e.g. "255.255.0.0") - - ip (string): IP Address of a policy object (e.g. "1.2.3.4") + - mask (string): Mask of a policy object (e.g. "255.255.0.0"). Used only with deprecated `type=ipAndMask`. + - ip (string): IP Address of a policy object (e.g. "1.2.3.4"). Used only with deprecated `type=ipAndMask`. - groupIds (array): The IDs of policy object groups the policy object belongs to """ @@ -10940,72 +10823,6 @@ def deleteOrganizationSamlRole(self, organizationId: str, samlRoleId: str): return self._session.delete(metadata, resource) - def getOrganizationSaseBatch(self, organizationId: str, batchId: str): - """ - **Retrieves a batch summary with aggregated job status counts** - https://developer.cisco.com/meraki/api-v1/#!get-organization-sase-batch - - - organizationId (string): Organization ID - - batchId (string): Batch ID - """ - - metadata = { - "tags": ["organizations", "configure", "sase", "batches"], - "operation": "getOrganizationSaseBatch", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - batchId = urllib.parse.quote(str(batchId), safe="") - resource = f"/organizations/{organizationId}/sase/batches/{batchId}" - - return self._session.get(metadata, resource) - - def getOrganizationSaseBatchJobs(self, organizationId: str, batchId: str, total_pages=1, direction="next", **kwargs): - """ - **List jobs within a batch, with optional status filtering** - https://developer.cisco.com/meraki/api-v1/#!get-organization-sase-batch-jobs - - - organizationId (string): Organization ID - - batchId (string): Batch 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. - - 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. - - status (string): If provided, filters jobs by status - """ - - kwargs.update(locals()) - - if "status" in kwargs: - options = ["complete", "deferred", "failed", "new", "ready", "running", "scheduled"] - assert kwargs["status"] in options, ( - f'''"status" cannot be "{kwargs["status"]}", & must be set to one of: {options}''' - ) - - metadata = { - "tags": ["organizations", "configure", "sase", "batches", "jobs"], - "operation": "getOrganizationSaseBatchJobs", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - batchId = urllib.parse.quote(str(batchId), safe="") - resource = f"/organizations/{organizationId}/sase/batches/{batchId}/jobs" - - query_params = [ - "perPage", - "startingAfter", - "endingBefore", - "status", - ] - params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} - - if self._session._validate_kwargs: - all_params = query_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning(f"getOrganizationSaseBatchJobs: ignoring unrecognized kwargs: {invalid}") - - return self._session.get_pages(metadata, resource, params, total_pages, direction) - def getOrganizationSaseConnectors(self, organizationId: str): """ **List SSE Connectors for an organization** diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index e87ed421..fba8a5d1 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -2686,7 +2686,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - radiusServerTimeout (integer): The amount of time for which a RADIUS client waits for a reply from the RADIUS server (must be between 1-10 seconds). - radiusServerAttemptsLimit (integer): The maximum number of transmit attempts after which a RADIUS server is failed over (must be between 1-5). - radiusFallbackEnabled (boolean): Whether or not higher priority RADIUS servers should be retried after 60 seconds. - - radiusRadsec (object): The current settings for RADIUS RADSec + - radiusRadsec (object): The current settings for RADIUS RadSec - radiusCoaEnabled (boolean): If true, Meraki devices will act as a RADIUS Dynamic Authorization Server and will respond to RADIUS Change-of-Authorization and Disconnect messages sent by the RADIUS server. - radiusFailoverPolicy (string): This policy determines how authentication requests should be handled in the event that all of the configured RADIUS servers are unreachable ('Deny access' or 'Allow access') - radiusLoadBalancingPolicy (string): This policy determines which RADIUS server will be contacted first in an authentication attempt and the ordering of any necessary retry attempts ('Strict priority order' or 'Round robin') @@ -5429,6 +5429,49 @@ def getOrganizationAssuranceWirelessExperienceMetricsOverviewHistoryByNetwork( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAssuranceWirelessExperienceMostImpactedNetworks(self, organizationId: str, **kwargs): + """ + **Returns the most impacted wireless experience networks and the top failure contributor for each network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-most-impacted-networks + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - limit (integer): Number of most impacted networks to return. Default is 5. Maximum is 10. + """ + + kwargs.update(locals()) + + if "limit" in kwargs: + options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + assert kwargs["limit"] in options, f'''"limit" cannot be "{kwargs["limit"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["wireless", "configure", "experience", "mostImpactedNetworks"], + "operation": "getOrganizationAssuranceWirelessExperienceMostImpactedNetworks", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/mostImpactedNetworks" + + query_params = [ + "t0", + "t1", + "timespan", + "limit", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceMostImpactedNetworks: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -8759,7 +8802,7 @@ def getOrganizationWirelessDevicesProvisioningRecommendationsTags(self, organiza def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): """ - **Query for details on the organization's RADSEC device Certificate Authority certificates (CAs)** + **Query for details on the organization's RadSec device Certificate Authority certificates (CAs)** https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities - organizationId (string): Organization ID @@ -8800,7 +8843,7 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizati def updateOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): """ - **Update an organization's RADSEC device Certificate Authority (CA) state** + **Update an organization's RadSec device Certificate Authority (CA) state** https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-devices-radsec-certificates-authorities - organizationId (string): Organization ID @@ -8835,7 +8878,7 @@ def updateOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organiz def createOrganizationWirelessDevicesRadsecCertificatesAuthority(self, organizationId: str): """ - **Create an organization's RADSEC device Certificate Authority (CA)** + **Create an organization's RadSec device Certificate Authority (CA)** https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-radsec-certificates-authority - organizationId (string): Organization ID @@ -8852,7 +8895,7 @@ def createOrganizationWirelessDevicesRadsecCertificatesAuthority(self, organizat def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organizationId: str, **kwargs): """ - **Query for certificate revocation list (CRL) for the organization's RADSEC device Certificate Authorities (CAs).** + **Query for certificate revocation list (CRL) for the organization's RadSec device Certificate Authorities (CAs).** https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls - organizationId (string): Organization ID @@ -8893,7 +8936,7 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organi def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas(self, organizationId: str, **kwargs): """ - **Query for all delta certificate revocation list (CRL) for the organization's RADSEC device Certificate Authority (CA) with the given id.** + **Query for all delta certificate revocation list (CRL) for the organization's RadSec device Certificate Authority (CA) with the given id.** https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls-deltas - organizationId (string): Organization ID diff --git a/pyproject.toml b/pyproject.toml index af806ef2..a8c01a42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "3.1.0b3" +version = "3.1.0b1" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index 34bbcff4..9808ba78 100644 --- a/uv.lock +++ b/uv.lock @@ -549,7 +549,7 @@ wheels = [ [[package]] name = "meraki" -version = "3.1.0b3" +version = "3.1.0b1" source = { editable = "." } dependencies = [ { name = "aiohttp" }, From c4207ee323ef194f87993dca0f3585b63a342c50 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Wed, 10 Jun 2026 13:22:58 -0700 Subject: [PATCH 35/60] fix(ci): build changelog in regeneration PR, not via protected-branch push (#402) (#403) create-release.yml's "Build changelog" step rendered CHANGELOG.md and pushed the commit straight to the release branch (main/beta/httpx). Those branches require status checks, and a bot commit pushed directly has none, so the push was rejected with GH013 (run 27302232244): remote: error: GH013: Repository rule violations found for refs/heads/httpx - 9 of 9 required status checks are expected. The step also ran unconditionally, so it fired even when the release already existed and "Create release" was skipped. The changelog edit never fails the checks; it just never reached them. Move the towncrier build into regenerate-library.yml, right after the version bump, so the rendered CHANGELOG.md and consumed fragments ride the regeneration PR through its required checks (towncrier is in the dev group, already synced). Drop the push step from create-release.yml; the changelog is on the branch before the release is cut. Co-authored-by: Claude Opus 4.8 (1M context) --- .github/workflows/create-release.yml | 34 +++++------------------- .github/workflows/regenerate-library.yml | 14 ++++++++++ 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 22749f99..9c17bb14 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -62,34 +62,12 @@ jobs: exit 1 fi - # Render changelog.d/ fragments into CHANGELOG.md and commit before the - # release is cut. Reuses the version already read from pyproject.toml, so - # there is no separate towncrier version to keep in sync. --generate-notes - # below remains as a fallback for the GitHub release body. - - name: Build changelog - env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} - run: | - VERSION="${{ steps.version.outputs.version }}" - BRANCH="${{ inputs.branch || github.event.workflow_run.head_branch }}" - - # Nothing to do if there are no fragments to consume. - if ! ls changelog.d/*.md >/dev/null 2>&1; then - echo "No changelog fragments; skipping towncrier build." - exit 0 - fi - - pip install --quiet towncrier - towncrier build --yes --version "$VERSION" - - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add CHANGELOG.md changelog.d/ - if ! git diff --cached --quiet; then - git commit -m "docs: update changelog for $VERSION" - git push origin "HEAD:$BRANCH" - fi - + # CHANGELOG.md is rendered from changelog.d/ fragments inside the + # regeneration PR (see regenerate-library.yml), so it is already on the + # branch by the time the release is cut. Committing/pushing here would + # bypass the branch's required status checks and be rejected by the + # ruleset, so no git write happens in this workflow. --generate-notes + # below produces the GitHub release body. - name: Create release env: GH_TOKEN: ${{ steps.app-token.outputs.token }} diff --git a/.github/workflows/regenerate-library.yml b/.github/workflows/regenerate-library.yml index 9534bed2..4b73b6c5 100644 --- a/.github/workflows/regenerate-library.yml +++ b/.github/workflows/regenerate-library.yml @@ -101,6 +101,20 @@ jobs: sed -i "s/^version = \".*\"/version = \"$LIBRARY_VERSION\"/" pyproject.toml uv lock + # Render changelog.d/ fragments into CHANGELOG.md here so the update rides + # the regeneration PR (and its required checks) instead of being pushed + # straight to a protected branch later. towncrier is in the dev group, so + # `uv sync --group generator` (default-groups = dev) already installed it. + - name: Build changelog + env: + LIBRARY_VERSION: ${{ github.event.inputs.library_version }} + run: | + if ls changelog.d/*.md >/dev/null 2>&1; then + uv run towncrier build --yes --version "$LIBRARY_VERSION" + else + echo "No changelog fragments; skipping towncrier build." + fi + - name: Commit changes to new branch uses: EndBug/add-and-commit@v10 with: From b84e6b7d05b27077af1d4b377b099a5b1d6db454 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Wed, 10 Jun 2026 13:25:52 -0700 Subject: [PATCH 36/60] docs(ci): correct create-release header and drop unused write permission The "Build changelog" step that pushed to the branch was removed in #402, so this workflow no longer writes to contents. Update the stale header comment and lower permissions from contents: write to contents: read (checkout + the gh release view read are read-only; the release itself uses the App token). Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/create-release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 9c17bb14..dadab623 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -12,11 +12,11 @@ on: types: [completed] branches: ['main', 'beta'] -# The release is created with a GitHub App token. The "Build changelog" step -# commits the rendered CHANGELOG.md back to the release branch, so the default -# token needs write access to contents. +# The release is created with a GitHub App token. This workflow no longer +# commits anything back to the branch (the changelog is rendered in the +# regeneration PR), so the default token only needs read access for checkout. permissions: - contents: write + contents: read jobs: create-release: From d00aea4f4aa3ea9379f2afb2f04e30a2f91d88ca Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Wed, 10 Jun 2026 13:37:20 -0700 Subject: [PATCH 37/60] ci: sync create-release.yml to main (idempotency guard, app-token@v3) (#405) beta's copy had drifted behind main: missing the 'release already exists' short-circuit, pinned create-github-app-token@v2 instead of @v3, and a narrower workflow_run branch list. Sync to main's exact content so a workflow_dispatch against beta runs identical release logic. File-level sync only (no spec/library changes). Co-authored-by: Claude Opus 4.8 (1M context) --- .github/workflows/create-release.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index dadab623..26c511b1 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -10,7 +10,7 @@ on: workflow_run: workflows: ['Test PR'] types: [completed] - branches: ['main', 'beta'] + branches: ['main', 'beta', 'httpx'] # The release is created with a GitHub App token. This workflow no longer # commits anything back to the branch (the changelog is rendered in the @@ -29,7 +29,7 @@ jobs: - name: Generate app token id: app-token - uses: actions/create-github-app-token@v2 + uses: actions/create-github-app-token@v3 with: app-id: ${{ secrets.RELEASE_APP_ID }} private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} @@ -46,7 +46,21 @@ jobs: echo "prerelease=false" >> "$GITHUB_OUTPUT" fi + - name: Check if release already exists + id: check-release + env: + GH_TOKEN: ${{ github.token }} + run: | + VERSION="${{ steps.version.outputs.version }}" + if gh release view "$VERSION" > /dev/null 2>&1; then + echo "Release $VERSION already exists, skipping." + echo "exists=true" >> "$GITHUB_OUTPUT" + else + echo "exists=false" >> "$GITHUB_OUTPUT" + fi + - name: Validate version matches branch + if: steps.check-release.outputs.exists == 'false' run: | BRANCH="${{ inputs.branch || github.event.workflow_run.head_branch }}" VERSION="${{ steps.version.outputs.version }}" @@ -57,6 +71,11 @@ jobs: exit 1 fi + if [[ "$BRANCH" == "httpx" && "$PRERELEASE" == "false" ]]; then + echo "::error::httpx branch must have a prerelease version (e.g. 4.0.0b1), got '$VERSION'" + exit 1 + fi + if [[ "$BRANCH" == "main" && "$PRERELEASE" == "true" ]]; then echo "::error::Main branch must not have a prerelease version, got '$VERSION'" exit 1 @@ -69,6 +88,7 @@ jobs: # ruleset, so no git write happens in this workflow. --generate-notes # below produces the GitHub release body. - name: Create release + if: steps.check-release.outputs.exists == 'false' env: GH_TOKEN: ${{ steps.app-token.outputs.token }} run: | From db0ddfe349983d45e0078be05de37ce06177d196 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Wed, 10 Jun 2026 14:03:04 -0700 Subject: [PATCH 38/60] ci: remove unreachable release/orchestration workflows from beta (#407) These workflows are only ever executed from the default branch (main): - create-release.yml (workflow_run + dispatch; workflow_run always uses main's copy, and dispatch automation passes no --ref so it also runs main's) - regenerate-library.yml (dispatch only; main's copy is the sole orchestrator and checks out beta via ref:) - publish-release.yml (release + dispatch; release event uses main's copy) - watch-openapi-release.yml (schedule + dispatch; schedule only fires on the default branch) - enable-early-access.yml (schedule + dispatch; same) Their beta copies could never fire from automation and had drifted into a stale, superseded architecture (e.g. watch-openapi's old 3-job graph writing deprecated repo variables), making a manual dispatch actively harmful. Single-source them on main. Branch-scoped workflows (test-pr, test-library, test-library-generator, dependabot-auto-merge) are kept. Co-authored-by: Claude Opus 4.8 (1M context) --- .github/workflows/create-release.yml | 104 ---------- .github/workflows/enable-early-access.yml | 39 ---- .github/workflows/publish-release.yml | 34 ---- .github/workflows/regenerate-library.yml | 141 -------------- .github/workflows/watch-openapi-release.yml | 198 -------------------- 5 files changed, 516 deletions(-) delete mode 100644 .github/workflows/create-release.yml delete mode 100644 .github/workflows/enable-early-access.yml delete mode 100644 .github/workflows/publish-release.yml delete mode 100644 .github/workflows/regenerate-library.yml delete mode 100644 .github/workflows/watch-openapi-release.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml deleted file mode 100644 index 26c511b1..00000000 --- a/.github/workflows/create-release.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: Create GitHub Release - -on: - workflow_dispatch: - inputs: - branch: - description: 'Branch to release from' - required: true - default: 'beta' - workflow_run: - workflows: ['Test PR'] - types: [completed] - branches: ['main', 'beta', 'httpx'] - -# The release is created with a GitHub App token. This workflow no longer -# commits anything back to the branch (the changelog is rendered in the -# regeneration PR), so the default token only needs read access for checkout. -permissions: - contents: read - -jobs: - create-release: - if: github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - with: - ref: ${{ inputs.branch || github.event.workflow_run.head_branch }} - - - name: Generate app token - id: app-token - uses: actions/create-github-app-token@v3 - with: - app-id: ${{ secrets.RELEASE_APP_ID }} - private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} - - - name: Read version - id: version - run: | - VERSION=$(grep '^version' pyproject.toml | sed 's/version = "\(.*\)"/\1/') - echo "version=$VERSION" >> "$GITHUB_OUTPUT" - - if [[ "$VERSION" == *"b"* || "$VERSION" == *"rc"* || "$VERSION" == *"a"* ]]; then - echo "prerelease=true" >> "$GITHUB_OUTPUT" - else - echo "prerelease=false" >> "$GITHUB_OUTPUT" - fi - - - name: Check if release already exists - id: check-release - env: - GH_TOKEN: ${{ github.token }} - run: | - VERSION="${{ steps.version.outputs.version }}" - if gh release view "$VERSION" > /dev/null 2>&1; then - echo "Release $VERSION already exists, skipping." - echo "exists=true" >> "$GITHUB_OUTPUT" - else - echo "exists=false" >> "$GITHUB_OUTPUT" - fi - - - name: Validate version matches branch - if: steps.check-release.outputs.exists == 'false' - run: | - BRANCH="${{ inputs.branch || github.event.workflow_run.head_branch }}" - VERSION="${{ steps.version.outputs.version }}" - PRERELEASE="${{ steps.version.outputs.prerelease }}" - - if [[ "$BRANCH" == "beta" && "$PRERELEASE" == "false" ]]; then - echo "::error::Beta branch must have a prerelease version (e.g. 3.1.0b0), got '$VERSION'" - exit 1 - fi - - if [[ "$BRANCH" == "httpx" && "$PRERELEASE" == "false" ]]; then - echo "::error::httpx branch must have a prerelease version (e.g. 4.0.0b1), got '$VERSION'" - exit 1 - fi - - if [[ "$BRANCH" == "main" && "$PRERELEASE" == "true" ]]; then - echo "::error::Main branch must not have a prerelease version, got '$VERSION'" - exit 1 - fi - - # CHANGELOG.md is rendered from changelog.d/ fragments inside the - # regeneration PR (see regenerate-library.yml), so it is already on the - # branch by the time the release is cut. Committing/pushing here would - # bypass the branch's required status checks and be rejected by the - # ruleset, so no git write happens in this workflow. --generate-notes - # below produces the GitHub release body. - - name: Create release - if: steps.check-release.outputs.exists == 'false' - env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} - run: | - FLAGS="" - if [ "${{ steps.version.outputs.prerelease }}" = "true" ]; then - FLAGS="--prerelease" - fi - - gh release create "${{ steps.version.outputs.version }}" \ - --target "${{ inputs.branch || github.event.workflow_run.head_branch }}" \ - --title "${{ steps.version.outputs.version }}" \ - --generate-notes \ - $FLAGS diff --git a/.github/workflows/enable-early-access.yml b/.github/workflows/enable-early-access.yml deleted file mode 100644 index 2814c64f..00000000 --- a/.github/workflows/enable-early-access.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Enable early access features - -on: - workflow_dispatch: - schedule: - - cron: '0 18 * * 3' - -permissions: - contents: read - -jobs: - enable-early-access: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Install uv - uses: astral-sh/setup-uv@v7 - with: - enable-cache: true - - - name: Set up Python - run: uv python install 3.13 - - - name: Install dependencies - run: uv sync --python 3.13 - - - name: Enable all early access features - env: - MERAKI_DASHBOARD_API_KEY: ${{ secrets.TEST_ORG_API_KEY }} - EA_ORG_0: ${{ secrets.TEST_ORG_BETA_00_ID }} - EA_ORG_1: ${{ secrets.TEST_ORG_BETA_01_ID }} - EA_ORG_2: ${{ secrets.TEST_ORG_BETA_02_ID }} - EA_ORG_3: ${{ secrets.TEST_ORG_BETA_03_ID }} - EA_ORG_4: ${{ secrets.TEST_ORG_DEV_00_ID }} - EA_ORG_5: ${{ secrets.TEST_ORG_DEV_01_ID }} - EA_ORG_6: ${{ secrets.TEST_ORG_DEV_02_ID }} - EA_ORG_7: ${{ secrets.TEST_ORG_DEV_03_ID }} - run: uv run python examples/ci/enable_all_early_access.py diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml deleted file mode 100644 index fabf50c7..00000000 --- a/.github/workflows/publish-release.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Publish release to PyPI -on: - release: - types: [created] - workflow_dispatch: - inputs: - tag: - description: 'Release tag to publish (e.g. 3.1.0b0)' - required: true - -permissions: - id-token: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - with: - ref: ${{ inputs.tag || github.event.release.tag_name }} - - - name: Install uv - uses: astral-sh/setup-uv@v7 - with: - enable-cache: true - - - name: Set up Python - run: uv python install 3.13 - - - name: Build package - run: uv build - - - name: Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/regenerate-library.yml b/.github/workflows/regenerate-library.yml deleted file mode 100644 index 4b73b6c5..00000000 --- a/.github/workflows/regenerate-library.yml +++ /dev/null @@ -1,141 +0,0 @@ -name: Regenerate Python Library -on: - workflow_dispatch: - inputs: - library_version: - description: 'The version of the new library' - required: true - api_version: - description: 'The corresponding version of the API' - required: true - release_stage: - description: 'Release stage' - required: true - type: choice - options: - - ga - - beta - - dev - -# Writes (commit, PR, auto-merge) are performed with a GitHub App token, not -# GITHUB_TOKEN, so the default token only needs read access for checkout. -permissions: - contents: read - -jobs: - regenerate: - runs-on: ubuntu-latest - steps: - - name: Resolve branches - id: branches - run: | - case "${{ github.event.inputs.release_stage }}" in - dev) - echo "checkout_branch=httpx" >> "$GITHUB_OUTPUT" - echo "release_branch=httpx-release" >> "$GITHUB_OUTPUT" - echo "pr_base=httpx" >> "$GITHUB_OUTPUT" - ;; - beta) - echo "checkout_branch=beta" >> "$GITHUB_OUTPUT" - echo "release_branch=beta-release" >> "$GITHUB_OUTPUT" - echo "pr_base=beta" >> "$GITHUB_OUTPUT" - ;; - ga) - echo "checkout_branch=main" >> "$GITHUB_OUTPUT" - echo "release_branch=release" >> "$GITHUB_OUTPUT" - echo "pr_base=main" >> "$GITHUB_OUTPUT" - ;; - esac - - # Generate the App token before checkout so checkout persists *it* (not the - # read-only GITHUB_TOKEN) as the git credential used for the later push. - - name: Generate app token - id: app-token - uses: actions/create-github-app-token@v3 - with: - app-id: ${{ secrets.RELEASE_APP_ID }} - private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} - - - uses: actions/checkout@v6 - with: - ref: ${{ steps.branches.outputs.checkout_branch }} - # Persist the App token (write access) so EndBug/add-and-commit can push. - # add-and-commit does NOT set up push auth from its github_token input — - # it relies on whatever credential checkout wrote to git config. - token: ${{ steps.app-token.outputs.token }} - - - name: Install uv - uses: astral-sh/setup-uv@v7 - with: - enable-cache: true - - - name: Set up Python - run: uv python install 3.13 - - - name: Install dependencies - run: uv sync --group generator - - - name: Delete folder - run: rm -rf meraki - - - name: Regenerate Python Library - env: - LIBRARY_VERSION: ${{ github.event.inputs.library_version }} - API_VERSION: ${{ github.event.inputs.api_version }} - MERAKI_DASHBOARD_API_KEY: ${{ (github.event.inputs.release_stage == 'beta' || github.event.inputs.release_stage == 'dev') && secrets.TEST_ORG_API_KEY || '' }} - BETA_ORG_ID: ${{ (github.event.inputs.release_stage == 'beta' || github.event.inputs.release_stage == 'dev') && secrets.TEST_ORG_BETA_00_ID || '' }} - run: | - ARGS="-g true -v $LIBRARY_VERSION -a $API_VERSION" - if [ "${{ github.event.inputs.release_stage }}" = "dev" ]; then - ARGS="$ARGS -b httpx" - fi - if [ -n "$BETA_ORG_ID" ]; then - ARGS="$ARGS -o $BETA_ORG_ID" - fi - uv run python generator/generate_library.py $ARGS - - - name: Set new version - env: - LIBRARY_VERSION: ${{ github.event.inputs.library_version }} - run: | - sed -i "s/^version = \".*\"/version = \"$LIBRARY_VERSION\"/" pyproject.toml - uv lock - - # Render changelog.d/ fragments into CHANGELOG.md here so the update rides - # the regeneration PR (and its required checks) instead of being pushed - # straight to a protected branch later. towncrier is in the dev group, so - # `uv sync --group generator` (default-groups = dev) already installed it. - - name: Build changelog - env: - LIBRARY_VERSION: ${{ github.event.inputs.library_version }} - run: | - if ls changelog.d/*.md >/dev/null 2>&1; then - uv run towncrier build --yes --version "$LIBRARY_VERSION" - else - echo "No changelog fragments; skipping towncrier build." - fi - - - name: Commit changes to new branch - uses: EndBug/add-and-commit@v10 - with: - author_name: GitHub Action - author_email: support@meraki.com - message: Auto-generated library v${{ github.event.inputs.library_version }} for API v${{ github.event.inputs.api_version }}. - new_branch: ${{ steps.branches.outputs.release_branch }} - - - name: Create pull request - env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} - run: | - gh pr create \ - --base "${{ steps.branches.outputs.pr_base }}" \ - --head "${{ steps.branches.outputs.release_branch }}" \ - --title "Release v${{ github.event.inputs.library_version }} (API v${{ github.event.inputs.api_version }})" \ - --body "Auto-generated library v${{ github.event.inputs.library_version }} for API v${{ github.event.inputs.api_version }}." - - - name: Enable auto-merge - env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} - run: | - gh pr merge "${{ steps.branches.outputs.release_branch }}" \ - --auto --squash diff --git a/.github/workflows/watch-openapi-release.yml b/.github/workflows/watch-openapi-release.yml deleted file mode 100644 index 7c3e25e9..00000000 --- a/.github/workflows/watch-openapi-release.yml +++ /dev/null @@ -1,198 +0,0 @@ -name: Watch OpenAPI Releases - -on: - schedule: - - cron: '0 14 * * *' - workflow_dispatch: - -permissions: - contents: read - -jobs: - check-ga: - runs-on: ubuntu-latest - outputs: - has_new_release: ${{ steps.check.outputs.has_new_release }} - api_version: ${{ steps.check.outputs.api_version }} - new_sdk_version: ${{ steps.version.outputs.new_sdk_version }} - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Get latest GA release - id: check - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - LATEST=$(gh release list --repo meraki/openapi --exclude-pre-releases --limit 1 --json tagName -q '.[0].tagName') - API_VERSION="${LATEST#v}" - # Reject anything that isn't a clean semver tag before it flows into - # downstream run: steps / workflow_dispatch inputs (script injection guard). - if ! [[ "$API_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$ ]]; then - echo "::error::Unexpected OpenAPI release tag: '$LATEST'" - exit 1 - fi - echo "api_version=$API_VERSION" >> "$GITHUB_OUTPUT" - - LAST_PROCESSED=$(cat .github/.last-openapi-ga-release 2>/dev/null || echo "") - if [ "$LATEST" = "$LAST_PROCESSED" ]; then - echo "has_new_release=false" >> "$GITHUB_OUTPUT" - else - echo "has_new_release=true" >> "$GITHUB_OUTPUT" - fi - - - name: Compute next SDK version - if: steps.check.outputs.has_new_release == 'true' - id: version - run: | - CURRENT=$(git show "origin/main:pyproject.toml" | grep '^version' | sed 's/version = "\(.*\)"/\1/') - BASE=$(echo "$CURRENT" | sed 's/\(a\|b\|rc\).*//') - IFS='.' read -r MAJOR MINOR PATCH <<< "$BASE" - NEW_VERSION="${MAJOR}.$((MINOR + 1)).0" - echo "new_sdk_version=$NEW_VERSION" >> "$GITHUB_OUTPUT" - - check-beta: - runs-on: ubuntu-latest - outputs: - has_new_release: ${{ steps.check.outputs.has_new_release }} - api_version: ${{ steps.check.outputs.api_version }} - new_sdk_version: ${{ steps.version.outputs.new_sdk_version }} - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Get latest beta release - id: check - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - LATEST=$(gh release list --repo meraki/openapi --limit 20 --json tagName,isPrerelease -q '[.[] | select(.isPrerelease)] | .[0].tagName') - if [ -z "$LATEST" ]; then - echo "has_new_release=false" >> "$GITHUB_OUTPUT" - exit 0 - fi - - API_VERSION="${LATEST#v}" - # Reject anything that isn't a clean semver tag before it flows into - # downstream run: steps / workflow_dispatch inputs (script injection guard). - if ! [[ "$API_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$ ]]; then - echo "::error::Unexpected OpenAPI release tag: '$LATEST'" - exit 1 - fi - echo "api_version=$API_VERSION" >> "$GITHUB_OUTPUT" - - LAST_PROCESSED=$(cat .github/.last-openapi-beta-release 2>/dev/null || echo "") - if [ "$LATEST" = "$LAST_PROCESSED" ]; then - echo "has_new_release=false" >> "$GITHUB_OUTPUT" - else - echo "has_new_release=true" >> "$GITHUB_OUTPUT" - fi - - - name: Compute next SDK version - if: steps.check.outputs.has_new_release == 'true' - id: version - env: - API_VERSION: ${{ steps.check.outputs.api_version }} - run: | - CURRENT=$(git show "origin/beta:pyproject.toml" | grep '^version' | sed 's/version = "\(.*\)"/\1/') - - # Parse API version: e.g. "1.81.2-beta.3" -> minor=81, patch=2, beta=3 - API_MINOR=$(echo "$API_VERSION" | cut -d. -f2) - API_PATCH=$(echo "$API_VERSION" | cut -d. -f3 | sed 's/-.*//') - API_BETA=$(echo "$API_VERSION" | sed 's/.*beta\.\?//') - - LAST_TAG=$(cat .github/.last-openapi-beta-release 2>/dev/null || echo "") - LAST_API_MINOR=$(echo "$LAST_TAG" | sed 's/^v//' | cut -d. -f2) - - # Determine library minor: bump if API minor changed - BASE=$(echo "$CURRENT" | sed 's/\(a\|b\|rc\).*//') - IFS='.' read -r MAJOR LIB_MINOR LIB_PATCH <<< "$BASE" - - if [ "$API_MINOR" != "$LAST_API_MINOR" ]; then - LIB_MINOR=$((LIB_MINOR + 1)) - fi - - NEW_VERSION="${MAJOR}.${LIB_MINOR}.${API_PATCH}b${API_BETA}" - echo "new_sdk_version=$NEW_VERSION" >> "$GITHUB_OUTPUT" - - trigger-ga: - needs: check-ga - if: needs.check-ga.outputs.has_new_release == 'true' - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: actions/checkout@v6 - - - name: Record processed release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - API_VERSION: ${{ needs.check-ga.outputs.api_version }} - run: | - echo "v$API_VERSION" > .github/.last-openapi-ga-release - git config user.name "GitHub Action" - git config user.email "support@meraki.com" - git add .github/.last-openapi-ga-release - git commit -m "Record processed GA release v$API_VERSION" - git push - - - name: Trigger regeneration - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh workflow run regenerate-library.yml \ - -f library_version="${{ needs.check-ga.outputs.new_sdk_version }}" \ - -f api_version="${{ needs.check-ga.outputs.api_version }}" \ - -f branch_name="release" \ - -f target_branch="main" - - trigger-beta: - needs: [check-beta, trigger-ga] - if: always() && needs.check-beta.outputs.has_new_release == 'true' - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: actions/checkout@v6 - - - name: Record processed release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - API_VERSION: ${{ needs.check-beta.outputs.api_version }} - run: | - echo "v$API_VERSION" > .github/.last-openapi-beta-release - git config user.name "GitHub Action" - git config user.email "support@meraki.com" - git add .github/.last-openapi-beta-release - git commit -m "Record processed beta release v$API_VERSION" - git push - - - name: Enable early access - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - BEFORE_ID=$(gh run list --workflow=enable-early-access.yml --limit=1 --json databaseId -q '.[0].databaseId') - gh workflow run enable-early-access.yml - - for i in $(seq 1 30); do - sleep 10 - NEW_ID=$(gh run list --workflow=enable-early-access.yml --limit=1 --json databaseId -q '.[0].databaseId') - if [ "$NEW_ID" != "$BEFORE_ID" ]; then - gh run watch "$NEW_ID" - exit 0 - fi - done - echo "Timed out waiting for enable-early-access run to appear" - exit 1 - - - name: Trigger regeneration - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh workflow run regenerate-library.yml \ - -f library_version="${{ needs.check-beta.outputs.new_sdk_version }}" \ - -f api_version="${{ needs.check-beta.outputs.api_version }}" \ - -f branch_name="beta-release" \ - -f target_branch="beta" From 35055b7bb9cafb12f63b0783bc256fce0b36dd80 Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 21:08:49 +0000 Subject: [PATCH 39/60] Auto-generated library v3.2.0b1 for API v1.71.0-beta.1. (#409) Co-authored-by: GitHub Action --- docs/generation-report.md | 6 + meraki/_version.py | 2 +- meraki/aio/api/devices.py | 50 +++++ meraki/aio/api/organizations.py | 295 ++++++++++++++++++++++++++++++ meraki/api/batch/devices.py | 44 +++++ meraki/api/batch/organizations.py | 96 ++++++++++ meraki/api/devices.py | 50 +++++ meraki/api/organizations.py | 295 ++++++++++++++++++++++++++++++ pyproject.toml | 2 +- uv.lock | 2 +- 10 files changed, 839 insertions(+), 3 deletions(-) diff --git a/docs/generation-report.md b/docs/generation-report.md index 69f0096d..27290d05 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,11 @@ # Generation Report +## 2026-06-10 | Library v3.2.0b1 | API 1.71.0-beta.1 + + +No Python keyword parameter conflicts detected. + + ## 2026-06-10 | Library v3.1.0b1 | API 1.71.0-beta.1 diff --git a/meraki/_version.py b/meraki/_version.py index f17b01a6..724a186f 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "3.1.0b1" +__version__ = "3.2.0b1" diff --git a/meraki/aio/api/devices.py b/meraki/aio/api/devices.py index 8bf80c64..b89a8156 100644 --- a/meraki/aio/api/devices.py +++ b/meraki/aio/api/devices.py @@ -232,6 +232,56 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty return self._session.post(metadata, resource, payload) + def revokeDeviceCertificate(self, serial: str, certificateSerial: str, **kwargs): + """ + **Revoke a device certificate** + https://developer.cisco.com/meraki/api-v1/#!revoke-device-certificate + + - serial (string): Serial + - certificateSerial (string): Certificate serial + - reason (string): Revocation reason per RFC 5280; omit to use `unspecified` + """ + + kwargs.update(locals()) + + if "reason" in kwargs: + options = [ + "aACompromise", + "affiliationChanged", + "cACompromise", + "certificateHold", + "cessationOfOperation", + "keyCompromise", + "privilegeWithdrawn", + "removeFromCRL", + "superseded", + "unspecified", + ] + assert kwargs["reason"] in options, ( + f'''"reason" cannot be "{kwargs["reason"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["devices", "configure", "certificates"], + "operation": "revokeDeviceCertificate", + } + serial = urllib.parse.quote(str(serial), safe="") + certificateSerial = urllib.parse.quote(str(certificateSerial), safe="") + resource = f"/devices/{serial}/certificates/{certificateSerial}/revoke" + + body_params = [ + "reason", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"revokeDeviceCertificate: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + def getDeviceClients(self, serial: str, **kwargs): """ **List the clients of a device, up to a maximum of a month ago** diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 39da08d3..74945077 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -3962,6 +3962,202 @@ def getOrganizationCertificates(self, organizationId: str, **kwargs): return self._session.get(metadata, resource, params) + def getOrganizationCertificatesAuthorities(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List certificate authorities for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-certificates-authorities + + - 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 + - authorityIds (array): Feature certificate authority IDs to filter by (exact match on each id; duplicates are ignored) + - sortBy (string): Field to sort by (default: authorityId) + - 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()) + + if "sortBy" in kwargs: + options = ["authorityId", "featureType", "status"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "certificates", "authorities"], + "operation": "getOrganizationCertificatesAuthorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/authorities" + + query_params = [ + "authorityIds", + "sortBy", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "authorityIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationCertificatesAuthority(self, organizationId: str, featureType: str, **kwargs): + """ + **Create a certificate authority for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-certificates-authority + + - organizationId (string): Organization ID + - featureType (string): Feature this CA serves (e.g., radsec, openroaming, zigbee) + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "certificates", "authorities"], + "operation": "createOrganizationCertificatesAuthority", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/authorities" + + body_params = [ + "featureType", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationCertificatesAuthority: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationCertificatesAuthorities(self, organizationId: str, authorityId: str, **kwargs): + """ + **Trust a newly created certificate authority (transition from untrusted to trusted).** + https://developer.cisco.com/meraki/api-v1/#!update-organization-certificates-authorities + + - organizationId (string): Organization ID + - authorityId (string): ID of the certificate authority to trust. The CA must currently be untrusted. + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "certificates", "authorities"], + "operation": "updateOrganizationCertificatesAuthorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/authorities" + + body_params = [ + "authorityId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationCertificatesAuthorities(self, organizationId: str, authorityId: str, name: str): + """ + **Delete a certificate authority** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-certificates-authorities + + - organizationId (string): Organization ID + - authorityId (string): ID of the certificate authority to delete + - name (string): Certificate authority name + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "certificates", "authorities"], + "operation": "deleteOrganizationCertificatesAuthorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/authorities" + + return self._session.delete(metadata, resource) + + def getOrganizationCertificatesAuthoritiesJob(self, organizationId: str, jobId: str): + """ + **Return the status and result of a certificate authority job.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-certificates-authorities-job + + - organizationId (string): Organization ID + - jobId (string): Job ID + """ + + metadata = { + "tags": ["organizations", "configure", "certificates", "authorities", "jobs"], + "operation": "getOrganizationCertificatesAuthoritiesJob", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + jobId = urllib.parse.quote(str(jobId), safe="") + resource = f"/organizations/{organizationId}/certificates/authorities/jobs/{jobId}" + + return self._session.get(metadata, resource) + + def revokeOrganizationCertificatesAuthorities(self, organizationId: str, authorityId: str, **kwargs): + """ + **Revoke a trusted feature certificate authority.** + https://developer.cisco.com/meraki/api-v1/#!revoke-organization-certificates-authorities + + - organizationId (string): Organization ID + - authorityId (string): ID of the feature certificate authority to revoke + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "certificates", "authorities"], + "operation": "revokeOrganizationCertificatesAuthorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/authorities/revoke" + + body_params = [ + "authorityId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"revokeOrganizationCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def importOrganizationCertificates(self, organizationId: str, managedBy: str, contents: str, description: str, **kwargs): """ **Import certificate for this organization** @@ -4020,6 +4216,47 @@ def getOrganizationCertificatesMerakiAuthContents(self, organizationId: str): return self._session.get(metadata, resource) + def getOrganizationCertificatesRevocationLists(self, organizationId: str, **kwargs): + """ + **Return full certificate revocation lists (CRLs) for the organization's certificate authorities** + https://developer.cisco.com/meraki/api-v1/#!get-organization-certificates-revocation-lists + + - organizationId (string): Organization ID + - certificateAuthorityIds (array): Optional filter: feature certificate authority IDs (base-10 integers). Every value must exist for this organization; otherwise the request fails. Omit to return CRLs for all feature CAs in the organization. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "certificates", "revocationLists"], + "operation": "getOrganizationCertificatesRevocationLists", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/revocationLists" + + query_params = [ + "certificateAuthorityIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "certificateAuthorityIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCertificatesRevocationLists: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def deleteOrganizationCertificate(self, organizationId: str, certificateId: str): """ **Delete a certificate for an organization** @@ -5438,6 +5675,64 @@ def getOrganizationDevicesCellularUplinksTowersByDevice( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesCertificates(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List device certificates for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-certificates + + - 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 + - serials (array): Device serial numbers to filter by (exact match; duplicates are ignored) + - featureTypes (array): Feature types these device certificates serve (exact match; e.g., radsec, openroaming, zigbee) + - sortBy (string): Field to sort by (default: authorityId) + - 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()) + + if "sortBy" in kwargs: + options = ["authorityId", "featureType", "status"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "devices", "certificates"], + "operation": "getOrganizationDevicesCertificates", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/certificates" + + query_params = [ + "serials", + "featureTypes", + "sortBy", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "serials", + "featureTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationDevicesCertificates: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def createOrganizationDevicesControllerMigration(self, organizationId: str, serials: list, target: str, **kwargs): """ **Migrate devices to another controller or management mode** diff --git a/meraki/api/batch/devices.py b/meraki/api/batch/devices.py index faf0d038..daaa4661 100644 --- a/meraki/api/batch/devices.py +++ b/meraki/api/batch/devices.py @@ -107,6 +107,50 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty } return action + def revokeDeviceCertificate(self, serial: str, certificateSerial: str, **kwargs): + """ + **Revoke a device certificate. The device and certificate are identified by the path parameters. You may supply a revocation reason in the request body; if omitted, a default reason is applied.** + https://developer.cisco.com/meraki/api-v1/#!revoke-device-certificate + + - serial (string): Serial + - certificateSerial (string): Certificate serial + - reason (string): Revocation reason per RFC 5280; omit to use `unspecified` + """ + + kwargs.update(locals()) + + if "reason" in kwargs: + options = [ + "aACompromise", + "affiliationChanged", + "cACompromise", + "certificateHold", + "cessationOfOperation", + "keyCompromise", + "privilegeWithdrawn", + "removeFromCRL", + "superseded", + "unspecified", + ] + assert kwargs["reason"] in options, ( + f'''"reason" cannot be "{kwargs["reason"]}", & must be set to one of: {options}''' + ) + + serial = urllib.parse.quote(serial, safe="") + certificateSerial = urllib.parse.quote(certificateSerial, safe="") + resource = f"/devices/{serial}/certificates/{certificateSerial}/revoke" + + body_params = [ + "reason", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "revoke", + "body": payload, + } + return action + def createDeviceLiveToolsLedsBlink(self, serial: str, duration: int, **kwargs): """ **Enqueue a job to blink LEDs on a device. This endpoint has a rate limit of one request every 10 seconds.** diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index cfca5a40..a59b6c39 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -790,6 +790,102 @@ def deleteOrganizationBrandingPolicy(self, organizationId: str, brandingPolicyId } return action + def createOrganizationCertificatesAuthority(self, organizationId: str, featureType: str, **kwargs): + """ + **Create a certificate authority for an organization. The response includes job information for tracking progress.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-certificates-authority + + - organizationId (string): Organization ID + - featureType (string): Feature this CA serves (e.g., radsec, openroaming, zigbee) + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/certificates/authorities" + + body_params = [ + "featureType", + ] + 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 updateOrganizationCertificatesAuthorities(self, organizationId: str, authorityId: str, **kwargs): + """ + **Trust a newly created certificate authority (transition from untrusted to trusted).** + https://developer.cisco.com/meraki/api-v1/#!update-organization-certificates-authorities + + - organizationId (string): Organization ID + - authorityId (string): ID of the certificate authority to trust. The CA must currently be untrusted. + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/certificates/authorities" + + body_params = [ + "authorityId", + ] + 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 deleteOrganizationCertificatesAuthorities(self, organizationId: str, authorityId: str, name: str): + """ + **Delete a certificate authority. The feature CA must be untrusted or revoked. Deletion takes effect immediately and the response confirms the deleted authority.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-certificates-authorities + + - organizationId (string): Organization ID + - authorityId (string): ID of the certificate authority to delete + - name (string): Certificate authority name + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/certificates/authorities" + + action = { + "resource": resource, + "operation": "delete", + } + return action + + def revokeOrganizationCertificatesAuthorities(self, organizationId: str, authorityId: str, **kwargs): + """ + **Revoke a trusted feature certificate authority.** + https://developer.cisco.com/meraki/api-v1/#!revoke-organization-certificates-authorities + + - organizationId (string): Organization ID + - authorityId (string): ID of the feature certificate authority to revoke + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/certificates/authorities/revoke" + + body_params = [ + "authorityId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "revoke", + "body": payload, + } + return action + def importOrganizationCertificates(self, organizationId: str, managedBy: str, contents: str, description: str, **kwargs): """ **Import certificate for this organization** diff --git a/meraki/api/devices.py b/meraki/api/devices.py index b888ca6b..5a6e0757 100644 --- a/meraki/api/devices.py +++ b/meraki/api/devices.py @@ -232,6 +232,56 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty return self._session.post(metadata, resource, payload) + def revokeDeviceCertificate(self, serial: str, certificateSerial: str, **kwargs): + """ + **Revoke a device certificate** + https://developer.cisco.com/meraki/api-v1/#!revoke-device-certificate + + - serial (string): Serial + - certificateSerial (string): Certificate serial + - reason (string): Revocation reason per RFC 5280; omit to use `unspecified` + """ + + kwargs.update(locals()) + + if "reason" in kwargs: + options = [ + "aACompromise", + "affiliationChanged", + "cACompromise", + "certificateHold", + "cessationOfOperation", + "keyCompromise", + "privilegeWithdrawn", + "removeFromCRL", + "superseded", + "unspecified", + ] + assert kwargs["reason"] in options, ( + f'''"reason" cannot be "{kwargs["reason"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["devices", "configure", "certificates"], + "operation": "revokeDeviceCertificate", + } + serial = urllib.parse.quote(str(serial), safe="") + certificateSerial = urllib.parse.quote(str(certificateSerial), safe="") + resource = f"/devices/{serial}/certificates/{certificateSerial}/revoke" + + body_params = [ + "reason", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"revokeDeviceCertificate: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + def getDeviceClients(self, serial: str, **kwargs): """ **List the clients of a device, up to a maximum of a month ago** diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index 372995b6..f15cdfdc 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -3962,6 +3962,202 @@ def getOrganizationCertificates(self, organizationId: str, **kwargs): return self._session.get(metadata, resource, params) + def getOrganizationCertificatesAuthorities(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List certificate authorities for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-certificates-authorities + + - 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 + - authorityIds (array): Feature certificate authority IDs to filter by (exact match on each id; duplicates are ignored) + - sortBy (string): Field to sort by (default: authorityId) + - 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()) + + if "sortBy" in kwargs: + options = ["authorityId", "featureType", "status"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "certificates", "authorities"], + "operation": "getOrganizationCertificatesAuthorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/authorities" + + query_params = [ + "authorityIds", + "sortBy", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "authorityIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationCertificatesAuthority(self, organizationId: str, featureType: str, **kwargs): + """ + **Create a certificate authority for an organization** + https://developer.cisco.com/meraki/api-v1/#!create-organization-certificates-authority + + - organizationId (string): Organization ID + - featureType (string): Feature this CA serves (e.g., radsec, openroaming, zigbee) + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "certificates", "authorities"], + "operation": "createOrganizationCertificatesAuthority", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/authorities" + + body_params = [ + "featureType", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationCertificatesAuthority: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationCertificatesAuthorities(self, organizationId: str, authorityId: str, **kwargs): + """ + **Trust a newly created certificate authority (transition from untrusted to trusted).** + https://developer.cisco.com/meraki/api-v1/#!update-organization-certificates-authorities + + - organizationId (string): Organization ID + - authorityId (string): ID of the certificate authority to trust. The CA must currently be untrusted. + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "certificates", "authorities"], + "operation": "updateOrganizationCertificatesAuthorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/authorities" + + body_params = [ + "authorityId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationCertificatesAuthorities(self, organizationId: str, authorityId: str, name: str): + """ + **Delete a certificate authority** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-certificates-authorities + + - organizationId (string): Organization ID + - authorityId (string): ID of the certificate authority to delete + - name (string): Certificate authority name + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "certificates", "authorities"], + "operation": "deleteOrganizationCertificatesAuthorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/authorities" + + return self._session.delete(metadata, resource) + + def getOrganizationCertificatesAuthoritiesJob(self, organizationId: str, jobId: str): + """ + **Return the status and result of a certificate authority job.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-certificates-authorities-job + + - organizationId (string): Organization ID + - jobId (string): Job ID + """ + + metadata = { + "tags": ["organizations", "configure", "certificates", "authorities", "jobs"], + "operation": "getOrganizationCertificatesAuthoritiesJob", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + jobId = urllib.parse.quote(str(jobId), safe="") + resource = f"/organizations/{organizationId}/certificates/authorities/jobs/{jobId}" + + return self._session.get(metadata, resource) + + def revokeOrganizationCertificatesAuthorities(self, organizationId: str, authorityId: str, **kwargs): + """ + **Revoke a trusted feature certificate authority.** + https://developer.cisco.com/meraki/api-v1/#!revoke-organization-certificates-authorities + + - organizationId (string): Organization ID + - authorityId (string): ID of the feature certificate authority to revoke + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "certificates", "authorities"], + "operation": "revokeOrganizationCertificatesAuthorities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/authorities/revoke" + + body_params = [ + "authorityId", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"revokeOrganizationCertificatesAuthorities: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def importOrganizationCertificates(self, organizationId: str, managedBy: str, contents: str, description: str, **kwargs): """ **Import certificate for this organization** @@ -4020,6 +4216,47 @@ def getOrganizationCertificatesMerakiAuthContents(self, organizationId: str): return self._session.get(metadata, resource) + def getOrganizationCertificatesRevocationLists(self, organizationId: str, **kwargs): + """ + **Return full certificate revocation lists (CRLs) for the organization's certificate authorities** + https://developer.cisco.com/meraki/api-v1/#!get-organization-certificates-revocation-lists + + - organizationId (string): Organization ID + - certificateAuthorityIds (array): Optional filter: feature certificate authority IDs (base-10 integers). Every value must exist for this organization; otherwise the request fails. Omit to return CRLs for all feature CAs in the organization. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "certificates", "revocationLists"], + "operation": "getOrganizationCertificatesRevocationLists", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/certificates/revocationLists" + + query_params = [ + "certificateAuthorityIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "certificateAuthorityIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCertificatesRevocationLists: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def deleteOrganizationCertificate(self, organizationId: str, certificateId: str): """ **Delete a certificate for an organization** @@ -5438,6 +5675,64 @@ def getOrganizationDevicesCellularUplinksTowersByDevice( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesCertificates(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List device certificates for the organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-certificates + + - 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 + - serials (array): Device serial numbers to filter by (exact match; duplicates are ignored) + - featureTypes (array): Feature types these device certificates serve (exact match; e.g., radsec, openroaming, zigbee) + - sortBy (string): Field to sort by (default: authorityId) + - 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()) + + if "sortBy" in kwargs: + options = ["authorityId", "featureType", "status"] + assert kwargs["sortBy"] in options, ( + f'''"sortBy" cannot be "{kwargs["sortBy"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "devices", "certificates"], + "operation": "getOrganizationDevicesCertificates", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/certificates" + + query_params = [ + "serials", + "featureTypes", + "sortBy", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "serials", + "featureTypes", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationDevicesCertificates: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def createOrganizationDevicesControllerMigration(self, organizationId: str, serials: list, target: str, **kwargs): """ **Migrate devices to another controller or management mode** diff --git a/pyproject.toml b/pyproject.toml index a8c01a42..82296475 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "3.1.0b1" +version = "3.2.0b1" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index 9808ba78..7179ee1a 100644 --- a/uv.lock +++ b/uv.lock @@ -549,7 +549,7 @@ wheels = [ [[package]] name = "meraki" -version = "3.1.0b1" +version = "3.2.0b1" source = { editable = "." } dependencies = [ { name = "aiohttp" }, From 25ea1b910cbaa986d6e2b7e0b09b8d9f89e6c0cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 15:38:02 +0000 Subject: [PATCH 40/60] chore(deps-dev): bump ruff from 0.15.16 to 0.15.17 in the all-deps group (#413) Bumps the all-deps group with 1 update: [ruff](https://github.com/astral-sh/ruff). Updates `ruff` from 0.15.16 to 0.15.17 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.16...0.15.17) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.17 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/uv.lock b/uv.lock index 7179ee1a..703bc44a 100644 --- a/uv.lock +++ b/uv.lock @@ -961,27 +961,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.16" +version = "0.15.17" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a6/bd/5f7ec371001337d8fa61701c186ff8b613ecac1651848c5950f4c4d5f2e9/ruff-0.15.16.tar.gz", hash = "sha256:d05e78d38c78caf020b03789e25106c93017db5a0cb6e2819885018c61343b78", size = 4714267, upload-time = "2026-06-04T16:33:09.974Z" } +sdist = { url = "https://files.pythonhosted.org/packages/8c/a9/3abdf488f1bf3d24c699415e454ed554a6350d5d89ce183be1ee0a3361ac/ruff-0.15.17.tar.gz", hash = "sha256:2ec446937fd16c8c4de2674a209cc5af64d9c6f17d21fbf1151054fa0bcf5219", size = 4743346, upload-time = "2026-06-11T17:54:47.663Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0c/42/53ef1c3953f157956db9bf7861e3bc50b9b887ce93300aa48cdba8336fe6/ruff-0.15.16-py3-none-linux_armv6l.whl", hash = "sha256:6ac3c0b3969cc6cf6b158c4e2f8f682acb58e7d700d8a44b65ecdc72d66ab0b2", size = 10709025, upload-time = "2026-06-04T16:32:51.935Z" }, - { url = "https://files.pythonhosted.org/packages/93/9a/a79159346f19134a956607754e57d8d128f7a4c00f4ad2f7514d224c172c/ruff-0.15.16-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:197c207ed75ffba54a0dec23db4aa939a27a3053073e085e0042433cbdc58e4a", size = 11063550, upload-time = "2026-06-04T16:32:42.24Z" }, - { url = "https://files.pythonhosted.org/packages/bc/72/3ce2ac000a5299ec238e01f51397b3b653c93b077d9b1bfe8715bb895f20/ruff-0.15.16-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3a39fec45ab316cc23e7558f23fea4a70403ddb5648ea9a4a3854a16973d0071", size = 10421345, upload-time = "2026-06-04T16:32:37.251Z" }, - { url = "https://files.pythonhosted.org/packages/b0/c2/cc7fad3ec9169373f5b6a18f1917b91080feec40c3f9658334a1d28e2f03/ruff-0.15.16-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba93191d79003116b95128c9d306e045200fdbd0bccb782b110f3cd1d4abc5cf", size = 10757217, upload-time = "2026-06-04T16:32:54.722Z" }, - { url = "https://files.pythonhosted.org/packages/69/d2/3474009eaa0a65b31fa7152a2fad5e2f050c640ceb1e6b02ee6922e94c82/ruff-0.15.16-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c6ee4b90520630120ef032aa5cc10db483852dff950e78b1d717e2993a61ac8d", size = 10507035, upload-time = "2026-06-04T16:33:05.343Z" }, - { url = "https://files.pythonhosted.org/packages/ca/81/b7ae6ccbd11f0c8dc3d5d67fc4be9b57ff57ca86ba56152021378e1277f2/ruff-0.15.16-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e4215bc938bc3c8215c1472c1aa437e310fee20cd427335fec9d7e609563628", size = 11255291, upload-time = "2026-06-04T16:32:49.49Z" }, - { url = "https://files.pythonhosted.org/packages/d9/e1/46e526f1a7cc90857ce6ddf25fbb77eb6568651ac38d71b033af07076dd5/ruff-0.15.16-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7c8d26be963b090f10e29abc8b3e74a2a321f6fa34e02424e30b5af89350ecbb", size = 12124922, upload-time = "2026-06-04T16:33:07.821Z" }, - { url = "https://files.pythonhosted.org/packages/1a/da/5c791b088b596b24d0deb967fa28ae02ad751a140c0b9ea81c5ab915d6c0/ruff-0.15.16-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f198cf4123602a2280ed46c307bcbafe41758d6fee5b456b6b6058ca1514b3b4", size = 11332186, upload-time = "2026-06-04T16:33:02.971Z" }, - { url = "https://files.pythonhosted.org/packages/72/11/5da87abe20047c8962361473923ebb2f62b595250126aadfad8c20649c1e/ruff-0.15.16-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb27515fa6240fb586ae82b901a59e67d24acff86f2190b433dc542fe0435aeb", size = 11373541, upload-time = "2026-06-04T16:32:47.007Z" }, - { url = "https://files.pythonhosted.org/packages/fe/2a/8554754c23a854ae3fd6b507e36ad61ddb121e298c6d5d617dec94ed0f14/ruff-0.15.16-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a267c46ba1593fc26b8eecbea050b39d40c0b6bb7781ee11c90a02cd10032951", size = 11353014, upload-time = "2026-06-04T16:32:34.795Z" }, - { url = "https://files.pythonhosted.org/packages/62/25/62ea41529ec89f742ea3fed9cb1059c72877ec7cf9b9e99ac9cf3294d1d9/ruff-0.15.16-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:528c68f39a91498a8d50e91ff5985df3d105782bab49cc378e73ac26bff083e8", size = 10737467, upload-time = "2026-06-04T16:32:26.348Z" }, - { url = "https://files.pythonhosted.org/packages/90/17/334d3ad9de4d40f9dd58fdd09e35ce64553bb501e2f19a839e2fb6be14fc/ruff-0.15.16-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:7ed55c58950df60589a9a7a5d2f8fa5f54ebd287163be805adfe6ee95a9de123", size = 10521910, upload-time = "2026-06-04T16:32:32.54Z" }, - { url = "https://files.pythonhosted.org/packages/4d/bd/3ac7c6ae77a885c1004b3dda2446ea401768d24f851c14b4ad4b24f6639c/ruff-0.15.16-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d482feaf51512b50f9790ceb417a56a61dd1e9d9bf967662b9ed27c01b34f53a", size = 10979190, upload-time = "2026-06-04T16:32:57.492Z" }, - { url = "https://files.pythonhosted.org/packages/33/d7/609546e6a413c3f216fbf2a50c928f97c80939154f6a0503114094a86191/ruff-0.15.16-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:1e15bc8c94513dae2a40cc9ef07c94fdd4ecc9e29dabebeebe170f952322c9e3", size = 11477014, upload-time = "2026-06-04T16:32:44.687Z" }, - { url = "https://files.pythonhosted.org/packages/74/0d/f2cd247ad32633a5c36e97141a2c21b11c6279f7957bc2ff360b1e08fddd/ruff-0.15.16-py3-none-win32.whl", hash = "sha256:580378f7bd4aa25f72e74aa54948a9622f142b1e509521dd10902e886681cc1e", size = 10735541, upload-time = "2026-06-04T16:32:30.145Z" }, - { url = "https://files.pythonhosted.org/packages/8b/9e/02e845ef151b1dee585e55c4739f8e1734ae1d9f1221dff65761c162208b/ruff-0.15.16-py3-none-win_amd64.whl", hash = "sha256:408256017284eddf98fff77b29aa4fb30f586042d535b2d9befc6512f400aaec", size = 11843403, upload-time = "2026-06-04T16:32:39.76Z" }, - { url = "https://files.pythonhosted.org/packages/15/19/016553f86f207450aebebc2b2b5088d086b901cc8186c02ac4284db3bd88/ruff-0.15.16-py3-none-win_arm64.whl", hash = "sha256:8cd61783afb39638a7133ef0d2dfb1e91277593962f81b5a8423eb0b888a6121", size = 11134555, upload-time = "2026-06-04T16:33:00.136Z" }, + { url = "https://files.pythonhosted.org/packages/db/4d/e11259f5da07cb6afb2d074c31bf09da9671993f7329d4f15d2fdc458301/ruff-0.15.17-py3-none-linux_armv6l.whl", hash = "sha256:d9feddb927fc68bd295f5eebc587a7e42cfaf9b65f60ca4a2386febff575da8f", size = 10856677, upload-time = "2026-06-11T17:54:49.533Z" }, + { url = "https://files.pythonhosted.org/packages/29/3e/772d679e1a0dc058e58875bd2c0cb713a0530877b4a76fee3c7966df0d49/ruff-0.15.17-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:25805a226d741c47d274a35ad5c10a7dde175fcddfa511d7cf3da0a21eb3eab7", size = 11223443, upload-time = "2026-06-11T17:55:00.573Z" }, + { url = "https://files.pythonhosted.org/packages/68/58/bd41f7688b2fd5623012605130ed70e60aa7f2244baa3d5066bdd61530c8/ruff-0.15.17-py3-none-macosx_11_0_arm64.whl", hash = "sha256:f6ad73b14c2d18a3bf8ad7cb6974294d7f613a7898604826058e6ac64918ef4d", size = 10566458, upload-time = "2026-06-11T17:55:07.52Z" }, + { url = "https://files.pythonhosted.org/packages/d8/5b/733371013fcf1ec339e477ece6ab42bfe10bdd9bba8ee88a9516aa56bfc0/ruff-0.15.17-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ba0c1e4f95bcb3869d0d30cbd5917071ef2e28665abfec970cdab0492c713ed", size = 10914483, upload-time = "2026-06-11T17:55:05.501Z" }, + { url = "https://files.pythonhosted.org/packages/bd/cc/6f24251cc0252f7239391ccb85833f320efad14ebe5b443943f37ced6332/ruff-0.15.17-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:81647960f10bff57d2e51cadd0c3950fe598400c852863a038720ef5b8cca91e", size = 10647497, upload-time = "2026-06-11T17:54:57.733Z" }, + { url = "https://files.pythonhosted.org/packages/68/dd/0d10c17ce1a1624d6fc3156309c3f834fdb5dfaad026ec90c85684f3990e/ruff-0.15.17-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0e01a84ddbc8c16c23055ba3924476850f1bbc1917cebbb9376665a63e74260d", size = 11416967, upload-time = "2026-06-11T17:54:51.461Z" }, + { url = "https://files.pythonhosted.org/packages/2f/91/556bfb156f6144f355e831c23db00b2fc4120f86b3ce81cc5f7fd2df51f3/ruff-0.15.17-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84fe9f653152f8f294f9f7e03bf3a453d8b4a27f7a59c78c8666167f2b17b96c", size = 12335770, upload-time = "2026-06-11T17:54:45.793Z" }, + { url = "https://files.pythonhosted.org/packages/88/82/8b5999aa13355e926f06d9f42a32dcca862f623bf0363785ff89d607dffd/ruff-0.15.17-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c0fe88a7676e7a05b73174d4d4a59cb2ac21ff8263583f87a81a6018475a978", size = 11575441, upload-time = "2026-06-11T17:54:32.661Z" }, + { url = "https://files.pythonhosted.org/packages/11/93/f10377bb04109ca0e8cbc483ff1982c54b6d418210041776f93e8cdc7fa9/ruff-0.15.17-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ecfc3c7878fff94633ab0348524e093f9ce3243080416dd7d14f8ba400174719", size = 11557614, upload-time = "2026-06-11T17:54:34.698Z" }, + { url = "https://files.pythonhosted.org/packages/c7/a6/eeeae7f7d5493df41649ab3db92f086b2d0a30199e4efdf8e3dd7a033f24/ruff-0.15.17-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:b8461180b22420b1bdc289909410930761629fddf2a5aaf60fae1ab26cedc4c4", size = 11544450, upload-time = "2026-06-11T17:54:39.042Z" }, + { url = "https://files.pythonhosted.org/packages/32/88/5991ce565129a24dd4a00db1254b3b5db2e53018cbe4018ea5a89738e727/ruff-0.15.17-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:6eccbe50a038b503e7140b441aa9c7fc8c1f36edf23ebef9f4165c2f28f568b7", size = 10892524, upload-time = "2026-06-11T17:55:09.432Z" }, + { url = "https://files.pythonhosted.org/packages/f5/1d/0fdd248313425f55223968af04b0a42125466a8d88d21c1d99c6af0a51e8/ruff-0.15.17-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:382fc0521025f5a8ad447d8bdd523545d0d7646adb718eb1c2dac5065ec27c0f", size = 10659573, upload-time = "2026-06-11T17:54:36.824Z" }, + { url = "https://files.pythonhosted.org/packages/9e/0e/072e8260deb9461062ce9311ced27a8e541229a6ffd483013dd37661e43e/ruff-0.15.17-py3-none-musllinux_1_2_i686.whl", hash = "sha256:456d41fcd1b2777ad63f09a6e7121d43f7b688bbc76a800c10f7f8fb1f912c3f", size = 11127818, upload-time = "2026-06-11T17:55:03.124Z" }, + { url = "https://files.pythonhosted.org/packages/ab/b4/55060a34163121498014696b5f656db5b8c6963768f227dbf0d76b311073/ruff-0.15.17-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b1a04bcc94ae6194e9db05d16ad31f298a7194bfbcb08258bbe589cee1d587b8", size = 11655901, upload-time = "2026-06-11T17:54:53.562Z" }, + { url = "https://files.pythonhosted.org/packages/49/71/9b29d6b87cef468d697f43c6a91e3fae4a80185779d7d5a4ef27d173439f/ruff-0.15.17-py3-none-win32.whl", hash = "sha256:596065960ab1ff593f744220c9fe6580eda00a95003cffa9f4048bb5b1bf0392", size = 10925574, upload-time = "2026-06-11T17:54:55.723Z" }, + { url = "https://files.pythonhosted.org/packages/3d/b2/8fc77f3723228836fa5d12497eb71c808f83782e10d058d2b15cfa14640b/ruff-0.15.17-py3-none-win_amd64.whl", hash = "sha256:6769e5fa1710b179b92e0bfa5a51735b35baea9013dadb06d5f44cbcf9547084", size = 12058788, upload-time = "2026-06-11T17:54:41.042Z" }, + { url = "https://files.pythonhosted.org/packages/2d/c7/c53e8dbff9c9dc4b7928773421ae294a5d28fcb8dcda1a089579d3a7e510/ruff-0.15.17-py3-none-win_arm64.whl", hash = "sha256:f3be1fbb34bcdfd146240d8fb92a709d4c2c8191348580a3c044ec60fa0b4456", size = 11355275, upload-time = "2026-06-11T17:54:43.635Z" }, ] [[package]] From 94197280392017dcc800881f7aefe9ac2b4402fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 15:40:25 +0000 Subject: [PATCH 41/60] chore(deps-dev): bump pytest from 9.0.3 to 9.1.0 in the all-deps group (#415) Bumps the all-deps group with 1 update: [pytest](https://github.com/pytest-dev/pytest). Updates `pytest` from 9.0.3 to 9.1.0 - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/9.0.3...9.1.0) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.1.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uv.lock b/uv.lock index 703bc44a..334b0f0b 100644 --- a/uv.lock +++ b/uv.lock @@ -821,7 +821,7 @@ wheels = [ [[package]] name = "pytest" -version = "9.0.3" +version = "9.1.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, @@ -830,9 +830,9 @@ dependencies = [ { name = "pluggy" }, { name = "pygments" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz", hash = "sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c", size = 1572165, upload-time = "2026-04-07T17:16:18.027Z" } +sdist = { url = "https://files.pythonhosted.org/packages/84/0e/b5858858d74958632c49b72cb25a3976ff9f632397626715be71c89d3971/pytest-9.1.0.tar.gz", hash = "sha256:41dd9148c08072446394cefd3d79701701335a9f4cae69ba92e39f6c7f5c061c", size = 1634181, upload-time = "2026-06-13T18:52:45.983Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl", hash = "sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9", size = 375249, upload-time = "2026-04-07T17:16:16.13Z" }, + { url = "https://files.pythonhosted.org/packages/8b/5a/ba30a81239b909821b3153e303e7def45178bf353da4f72380e6c5e8793b/pytest-9.1.0-py3-none-any.whl", hash = "sha256:8ebb0e7888bdf2bdfc602ec51f8f62d50200af37356c74e503c79a94f5c81f32", size = 386453, upload-time = "2026-06-13T18:52:44.045Z" }, ] [[package]] From 3f39e348903966fea6b1da19c7cc83e800d853ef Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 15:16:02 +0000 Subject: [PATCH 42/60] Auto-generated library v3.2.0b2 for API v1.71.0-beta.2. (#418) Co-authored-by: GitHub Action --- docs/generation-report.md | 6 +++ meraki/__init__.py | 2 +- meraki/_version.py | 2 +- meraki/aio/api/appliance.py | 2 +- meraki/aio/api/wireless.py | 56 ++++++++++++++++++++++ meraki/api/appliance.py | 2 +- meraki/api/batch/organizations.py | 79 +++++++++++++++++++++++++++++++ meraki/api/batch/wireless.py | 4 ++ meraki/api/wireless.py | 56 ++++++++++++++++++++++ pyproject.toml | 2 +- uv.lock | 2 +- 11 files changed, 207 insertions(+), 6 deletions(-) diff --git a/docs/generation-report.md b/docs/generation-report.md index 27290d05..1c4bcb1f 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,11 @@ # Generation Report +## 2026-06-17 | Library v3.2.0b2 | API 1.71.0-beta.2 + + +No Python keyword parameter conflicts detected. + + ## 2026-06-10 | Library v3.2.0b1 | API 1.71.0-beta.1 diff --git a/meraki/__init__.py b/meraki/__init__.py index a3484af4..ef645eca 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -52,7 +52,7 @@ from meraki._version import __version__ # noqa: F401 from datetime import datetime -__api_version__ = "1.71.0-beta.1" +__api_version__ = "1.71.0-beta.2" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index 724a186f..5360bbc3 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "3.2.0b1" +__version__ = "3.2.0b2" diff --git a/meraki/aio/api/appliance.py b/meraki/aio/api/appliance.py index 6212717b..a7099f2a 100644 --- a/meraki/aio/api/appliance.py +++ b/meraki/aio/api/appliance.py @@ -131,7 +131,7 @@ def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs def getDeviceAppliancePerformance(self, serial: str, **kwargs): """ - **Return the performance score for a single MX** + **Return the performance score for a single Secure Appliance or Secure Router** https://developer.cisco.com/meraki/api-v1/#!get-device-appliance-performance - serial (string): Serial diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index 2f796375..1e10213a 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -2344,6 +2344,7 @@ def createNetworkWirelessRfProfile(self, networkId: str, name: str, bandSelectio - transmission (object): Settings related to radio transmission. - perSsidSettings (object): Per-SSID radio settings by number. - flexRadios (object): Flex radio settings. + - dot11be (object): 802.11be settings """ kwargs.update(locals()) @@ -2378,6 +2379,7 @@ def createNetworkWirelessRfProfile(self, networkId: str, name: str, bandSelectio "transmission", "perSsidSettings", "flexRadios", + "dot11be", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2409,6 +2411,7 @@ def updateNetworkWirelessRfProfile(self, networkId: str, rfProfileId: str, **kwa - transmission (object): Settings related to radio transmission. - perSsidSettings (object): Per-SSID radio settings by number. - flexRadios (object): Flex radio settings. + - dot11be (object): 802.11be settings """ kwargs.update(locals()) @@ -2446,6 +2449,7 @@ def updateNetworkWirelessRfProfile(self, networkId: str, rfProfileId: str, **kwa "transmission", "perSsidSettings", "flexRadios", + "dot11be", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -5472,6 +5476,49 @@ def getOrganizationAssuranceWirelessExperienceMostImpactedNetworks(self, organiz return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWirelessExperienceMostImpactedXMs(self, organizationId: str, **kwargs): + """ + **Returns the most impacted wireless experience metrics and the top failure contributor for each metric/network pair.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-most-impacted-x-ms + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - limit (integer): Number of most impacted XMs to return. Default is 5. Maximum is 10. + """ + + kwargs.update(locals()) + + if "limit" in kwargs: + options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + assert kwargs["limit"] in options, f'''"limit" cannot be "{kwargs["limit"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["wireless", "configure", "experience", "mostImpactedXMs"], + "operation": "getOrganizationAssuranceWirelessExperienceMostImpactedXMs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/mostImpactedXMs" + + query_params = [ + "t0", + "t1", + "timespan", + "limit", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceMostImpactedXMs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -6762,6 +6809,8 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. + - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. + - insights (string): Insights version to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6777,6 +6826,11 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) + if "insights" in kwargs: + options = ["1", "2"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "insights", "byNetwork"], @@ -6791,6 +6845,8 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( "ssidNumbers", "bands", "contributor", + "subContributor", + "insights", "t0", "t1", "timespan", diff --git a/meraki/api/appliance.py b/meraki/api/appliance.py index 15bca41a..2886703d 100644 --- a/meraki/api/appliance.py +++ b/meraki/api/appliance.py @@ -131,7 +131,7 @@ def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs def getDeviceAppliancePerformance(self, serial: str, **kwargs): """ - **Return the performance score for a single MX** + **Return the performance score for a single Secure Appliance or Secure Router** https://developer.cisco.com/meraki/api-v1/#!get-device-appliance-performance - serial (string): Serial diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index a59b6c39..23f140a0 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -5,6 +5,37 @@ class ActionBatchOrganizations(object): def __init__(self): super(ActionBatchOrganizations, self).__init__() + def updateOrganization(self, organizationId: str, **kwargs): + """ + **Update an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization + + - organizationId (string): Organization ID + - name (string): The name of the organization + - management (object): Information about the organization's management system + - api (object): API-specific settings + - privacy (object): Privacy-related settings for the organization. + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}" + + body_params = [ + "name", + "management", + "api", + "privacy", + ] + 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 createOrganizationAdaptivePolicyAcl(self, organizationId: str, name: str, rules: list, ipVersion: str, **kwargs): """ **Creates new adaptive policy ACL** @@ -2999,6 +3030,54 @@ def updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs) } return action + def updateOrganizationSnmp(self, organizationId: str, **kwargs): + """ + **Update the SNMP settings for an organization** + https://developer.cisco.com/meraki/api-v1/#!update-organization-snmp + + - organizationId (string): Organization ID + - v2cEnabled (boolean): Boolean indicating whether SNMP version 2c is enabled for the organization. + - v3Enabled (boolean): Boolean indicating whether SNMP version 3 is enabled for the organization. + - v3AuthMode (string): The SNMP version 3 authentication mode. Can be either 'MD5' or 'SHA'. + - v3AuthPass (string): The SNMP version 3 authentication password. Must be at least 8 characters if specified. + - v3PrivMode (string): The SNMP version 3 privacy mode. Can be either 'DES' or 'AES128'. + - v3PrivPass (string): The SNMP version 3 privacy password. Must be at least 8 characters if specified. + - peerIps (array): The list of IPv4 addresses that are allowed to access the SNMP server. + """ + + kwargs.update(locals()) + + if "v3AuthMode" in kwargs: + options = ["MD5", "SHA"] + assert kwargs["v3AuthMode"] in options, ( + f'''"v3AuthMode" cannot be "{kwargs["v3AuthMode"]}", & must be set to one of: {options}''' + ) + if "v3PrivMode" in kwargs: + options = ["AES128", "DES"] + assert kwargs["v3PrivMode"] in options, ( + f'''"v3PrivMode" cannot be "{kwargs["v3PrivMode"]}", & must be set to one of: {options}''' + ) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/snmp" + + body_params = [ + "v2cEnabled", + "v3Enabled", + "v3AuthMode", + "v3AuthPass", + "v3PrivMode", + "v3PrivPass", + "peerIps", + ] + 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 deleteOrganizationSplashAsset(self, organizationId: str, id: str): """ **Delete a Splash Theme Asset** diff --git a/meraki/api/batch/wireless.py b/meraki/api/batch/wireless.py index cfd2accc..df63b44e 100644 --- a/meraki/api/batch/wireless.py +++ b/meraki/api/batch/wireless.py @@ -672,6 +672,7 @@ def createNetworkWirelessRfProfile(self, networkId: str, name: str, bandSelectio - transmission (object): Settings related to radio transmission. - perSsidSettings (object): Per-SSID radio settings by number. - flexRadios (object): Flex radio settings. + - dot11be (object): 802.11be settings """ kwargs.update(locals()) @@ -702,6 +703,7 @@ def createNetworkWirelessRfProfile(self, networkId: str, name: str, bandSelectio "transmission", "perSsidSettings", "flexRadios", + "dot11be", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -731,6 +733,7 @@ def updateNetworkWirelessRfProfile(self, networkId: str, rfProfileId: str, **kwa - transmission (object): Settings related to radio transmission. - perSsidSettings (object): Per-SSID radio settings by number. - flexRadios (object): Flex radio settings. + - dot11be (object): 802.11be settings """ kwargs.update(locals()) @@ -764,6 +767,7 @@ def updateNetworkWirelessRfProfile(self, networkId: str, rfProfileId: str, **kwa "transmission", "perSsidSettings", "flexRadios", + "dot11be", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index fba8a5d1..79d1bdd6 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -2344,6 +2344,7 @@ def createNetworkWirelessRfProfile(self, networkId: str, name: str, bandSelectio - transmission (object): Settings related to radio transmission. - perSsidSettings (object): Per-SSID radio settings by number. - flexRadios (object): Flex radio settings. + - dot11be (object): 802.11be settings """ kwargs.update(locals()) @@ -2378,6 +2379,7 @@ def createNetworkWirelessRfProfile(self, networkId: str, name: str, bandSelectio "transmission", "perSsidSettings", "flexRadios", + "dot11be", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2409,6 +2411,7 @@ def updateNetworkWirelessRfProfile(self, networkId: str, rfProfileId: str, **kwa - transmission (object): Settings related to radio transmission. - perSsidSettings (object): Per-SSID radio settings by number. - flexRadios (object): Flex radio settings. + - dot11be (object): 802.11be settings """ kwargs.update(locals()) @@ -2446,6 +2449,7 @@ def updateNetworkWirelessRfProfile(self, networkId: str, rfProfileId: str, **kwa "transmission", "perSsidSettings", "flexRadios", + "dot11be", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -5472,6 +5476,49 @@ def getOrganizationAssuranceWirelessExperienceMostImpactedNetworks(self, organiz return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWirelessExperienceMostImpactedXMs(self, organizationId: str, **kwargs): + """ + **Returns the most impacted wireless experience metrics and the top failure contributor for each metric/network pair.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-most-impacted-x-ms + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - limit (integer): Number of most impacted XMs to return. Default is 5. Maximum is 10. + """ + + kwargs.update(locals()) + + if "limit" in kwargs: + options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + assert kwargs["limit"] in options, f'''"limit" cannot be "{kwargs["limit"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["wireless", "configure", "experience", "mostImpactedXMs"], + "operation": "getOrganizationAssuranceWirelessExperienceMostImpactedXMs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/mostImpactedXMs" + + query_params = [ + "t0", + "t1", + "timespan", + "limit", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceMostImpactedXMs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -6762,6 +6809,8 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. + - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. + - insights (string): Insights version to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6777,6 +6826,11 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) + if "insights" in kwargs: + options = ["1", "2"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "insights", "byNetwork"], @@ -6791,6 +6845,8 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( "ssidNumbers", "bands", "contributor", + "subContributor", + "insights", "t0", "t1", "timespan", diff --git a/pyproject.toml b/pyproject.toml index 82296475..208afb54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "3.2.0b1" +version = "3.2.0b2" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index 334b0f0b..5b9f66c9 100644 --- a/uv.lock +++ b/uv.lock @@ -549,7 +549,7 @@ wheels = [ [[package]] name = "meraki" -version = "3.2.0b1" +version = "3.2.0b2" source = { editable = "." } dependencies = [ { name = "aiohttp" }, From 61ff7b190684f25510ad6a1c13312706f1fab7cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jun 2026 15:38:51 +0000 Subject: [PATCH 43/60] chore(deps-dev): bump the all-deps group with 2 updates (#422) Bumps the all-deps group with 2 updates: [pytest](https://github.com/pytest-dev/pytest) and [ruff](https://github.com/astral-sh/ruff). Updates `pytest` from 9.1.0 to 9.1.1 - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/9.1.0...9.1.1) Updates `ruff` from 0.15.17 to 0.15.18 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.17...0.15.18) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.1.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-deps - dependency-name: ruff dependency-version: 0.15.18 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/uv.lock b/uv.lock index 5b9f66c9..c02870a8 100644 --- a/uv.lock +++ b/uv.lock @@ -821,7 +821,7 @@ wheels = [ [[package]] name = "pytest" -version = "9.1.0" +version = "9.1.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, @@ -830,9 +830,9 @@ dependencies = [ { name = "pluggy" }, { name = "pygments" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/84/0e/b5858858d74958632c49b72cb25a3976ff9f632397626715be71c89d3971/pytest-9.1.0.tar.gz", hash = "sha256:41dd9148c08072446394cefd3d79701701335a9f4cae69ba92e39f6c7f5c061c", size = 1634181, upload-time = "2026-06-13T18:52:45.983Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369, upload-time = "2026-06-19T10:58:32.857Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8b/5a/ba30a81239b909821b3153e303e7def45178bf353da4f72380e6c5e8793b/pytest-9.1.0-py3-none-any.whl", hash = "sha256:8ebb0e7888bdf2bdfc602ec51f8f62d50200af37356c74e503c79a94f5c81f32", size = 386453, upload-time = "2026-06-13T18:52:44.045Z" }, + { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, ] [[package]] @@ -961,27 +961,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.17" +version = "0.15.18" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/8c/a9/3abdf488f1bf3d24c699415e454ed554a6350d5d89ce183be1ee0a3361ac/ruff-0.15.17.tar.gz", hash = "sha256:2ec446937fd16c8c4de2674a209cc5af64d9c6f17d21fbf1151054fa0bcf5219", size = 4743346, upload-time = "2026-06-11T17:54:47.663Z" } +sdist = { url = "https://files.pythonhosted.org/packages/74/98/1295ad5a5aa9bc85bdcdfa5d82fe7b49c61af5657df4f227637ff9de0da6/ruff-0.15.18.tar.gz", hash = "sha256:2698a964c70e8bf402dcb99c8810472d270d141e7aa8c4e13599fd52033a2f33", size = 4761437, upload-time = "2026-06-18T18:25:39.224Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/db/4d/e11259f5da07cb6afb2d074c31bf09da9671993f7329d4f15d2fdc458301/ruff-0.15.17-py3-none-linux_armv6l.whl", hash = "sha256:d9feddb927fc68bd295f5eebc587a7e42cfaf9b65f60ca4a2386febff575da8f", size = 10856677, upload-time = "2026-06-11T17:54:49.533Z" }, - { url = "https://files.pythonhosted.org/packages/29/3e/772d679e1a0dc058e58875bd2c0cb713a0530877b4a76fee3c7966df0d49/ruff-0.15.17-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:25805a226d741c47d274a35ad5c10a7dde175fcddfa511d7cf3da0a21eb3eab7", size = 11223443, upload-time = "2026-06-11T17:55:00.573Z" }, - { url = "https://files.pythonhosted.org/packages/68/58/bd41f7688b2fd5623012605130ed70e60aa7f2244baa3d5066bdd61530c8/ruff-0.15.17-py3-none-macosx_11_0_arm64.whl", hash = "sha256:f6ad73b14c2d18a3bf8ad7cb6974294d7f613a7898604826058e6ac64918ef4d", size = 10566458, upload-time = "2026-06-11T17:55:07.52Z" }, - { url = "https://files.pythonhosted.org/packages/d8/5b/733371013fcf1ec339e477ece6ab42bfe10bdd9bba8ee88a9516aa56bfc0/ruff-0.15.17-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ba0c1e4f95bcb3869d0d30cbd5917071ef2e28665abfec970cdab0492c713ed", size = 10914483, upload-time = "2026-06-11T17:55:05.501Z" }, - { url = "https://files.pythonhosted.org/packages/bd/cc/6f24251cc0252f7239391ccb85833f320efad14ebe5b443943f37ced6332/ruff-0.15.17-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:81647960f10bff57d2e51cadd0c3950fe598400c852863a038720ef5b8cca91e", size = 10647497, upload-time = "2026-06-11T17:54:57.733Z" }, - { url = "https://files.pythonhosted.org/packages/68/dd/0d10c17ce1a1624d6fc3156309c3f834fdb5dfaad026ec90c85684f3990e/ruff-0.15.17-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0e01a84ddbc8c16c23055ba3924476850f1bbc1917cebbb9376665a63e74260d", size = 11416967, upload-time = "2026-06-11T17:54:51.461Z" }, - { url = "https://files.pythonhosted.org/packages/2f/91/556bfb156f6144f355e831c23db00b2fc4120f86b3ce81cc5f7fd2df51f3/ruff-0.15.17-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84fe9f653152f8f294f9f7e03bf3a453d8b4a27f7a59c78c8666167f2b17b96c", size = 12335770, upload-time = "2026-06-11T17:54:45.793Z" }, - { url = "https://files.pythonhosted.org/packages/88/82/8b5999aa13355e926f06d9f42a32dcca862f623bf0363785ff89d607dffd/ruff-0.15.17-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c0fe88a7676e7a05b73174d4d4a59cb2ac21ff8263583f87a81a6018475a978", size = 11575441, upload-time = "2026-06-11T17:54:32.661Z" }, - { url = "https://files.pythonhosted.org/packages/11/93/f10377bb04109ca0e8cbc483ff1982c54b6d418210041776f93e8cdc7fa9/ruff-0.15.17-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ecfc3c7878fff94633ab0348524e093f9ce3243080416dd7d14f8ba400174719", size = 11557614, upload-time = "2026-06-11T17:54:34.698Z" }, - { url = "https://files.pythonhosted.org/packages/c7/a6/eeeae7f7d5493df41649ab3db92f086b2d0a30199e4efdf8e3dd7a033f24/ruff-0.15.17-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:b8461180b22420b1bdc289909410930761629fddf2a5aaf60fae1ab26cedc4c4", size = 11544450, upload-time = "2026-06-11T17:54:39.042Z" }, - { url = "https://files.pythonhosted.org/packages/32/88/5991ce565129a24dd4a00db1254b3b5db2e53018cbe4018ea5a89738e727/ruff-0.15.17-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:6eccbe50a038b503e7140b441aa9c7fc8c1f36edf23ebef9f4165c2f28f568b7", size = 10892524, upload-time = "2026-06-11T17:55:09.432Z" }, - { url = "https://files.pythonhosted.org/packages/f5/1d/0fdd248313425f55223968af04b0a42125466a8d88d21c1d99c6af0a51e8/ruff-0.15.17-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:382fc0521025f5a8ad447d8bdd523545d0d7646adb718eb1c2dac5065ec27c0f", size = 10659573, upload-time = "2026-06-11T17:54:36.824Z" }, - { url = "https://files.pythonhosted.org/packages/9e/0e/072e8260deb9461062ce9311ced27a8e541229a6ffd483013dd37661e43e/ruff-0.15.17-py3-none-musllinux_1_2_i686.whl", hash = "sha256:456d41fcd1b2777ad63f09a6e7121d43f7b688bbc76a800c10f7f8fb1f912c3f", size = 11127818, upload-time = "2026-06-11T17:55:03.124Z" }, - { url = "https://files.pythonhosted.org/packages/ab/b4/55060a34163121498014696b5f656db5b8c6963768f227dbf0d76b311073/ruff-0.15.17-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b1a04bcc94ae6194e9db05d16ad31f298a7194bfbcb08258bbe589cee1d587b8", size = 11655901, upload-time = "2026-06-11T17:54:53.562Z" }, - { url = "https://files.pythonhosted.org/packages/49/71/9b29d6b87cef468d697f43c6a91e3fae4a80185779d7d5a4ef27d173439f/ruff-0.15.17-py3-none-win32.whl", hash = "sha256:596065960ab1ff593f744220c9fe6580eda00a95003cffa9f4048bb5b1bf0392", size = 10925574, upload-time = "2026-06-11T17:54:55.723Z" }, - { url = "https://files.pythonhosted.org/packages/3d/b2/8fc77f3723228836fa5d12497eb71c808f83782e10d058d2b15cfa14640b/ruff-0.15.17-py3-none-win_amd64.whl", hash = "sha256:6769e5fa1710b179b92e0bfa5a51735b35baea9013dadb06d5f44cbcf9547084", size = 12058788, upload-time = "2026-06-11T17:54:41.042Z" }, - { url = "https://files.pythonhosted.org/packages/2d/c7/c53e8dbff9c9dc4b7928773421ae294a5d28fcb8dcda1a089579d3a7e510/ruff-0.15.17-py3-none-win_arm64.whl", hash = "sha256:f3be1fbb34bcdfd146240d8fb92a709d4c2c8191348580a3c044ec60fa0b4456", size = 11355275, upload-time = "2026-06-11T17:54:43.635Z" }, + { url = "https://files.pythonhosted.org/packages/b9/d0/686e984941269621e2be72612d5c1e461f8f7b38415a2a7d7a81c8ae6715/ruff-0.15.18-py3-none-linux_armv6l.whl", hash = "sha256:8b6850172348c8381b8b3084c5915a4393c2373b9b54cd5b5e1ea15812bc10df", size = 10887308, upload-time = "2026-06-18T18:25:03.062Z" }, + { url = "https://files.pythonhosted.org/packages/ed/21/bc4123e3f5515ee99f8ce1eb93a14a0628fe4d1678663cd08f933ac16931/ruff-0.15.18-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:3fccc153a85417dcd976883160cacce486997b0a0058dd18f54b8aaaac7d1ce2", size = 11281305, upload-time = "2026-06-18T18:25:30.026Z" }, + { url = "https://files.pythonhosted.org/packages/51/93/4769464c25cf7ab2acb3c7dda9cad3d867eb41c59565b3e2a9d17249c90c/ruff-0.15.18-py3-none-macosx_11_0_arm64.whl", hash = "sha256:08d4c86a68f2c3ec2c9d56380a71fb4a4f65373055cbb8caabd645e9102f38d4", size = 10641215, upload-time = "2026-06-18T18:25:15.802Z" }, + { url = "https://files.pythonhosted.org/packages/6c/42/56926d17120db2c208d76bf60a1a019644dd9e91dc27f0f95c9caddb1366/ruff-0.15.18-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37e5108745c2c0705da916d7d4de533ddf547051ef45f62888c31bae73f66318", size = 10957224, upload-time = "2026-06-18T18:25:36.955Z" }, + { url = "https://files.pythonhosted.org/packages/22/4f/d43fab8d8189afde803103022d000a8ef9f230616d436d52a8b2b8d63b50/ruff-0.15.18-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:56949a6ce8b3abde54c0bcb22cebfe57e8771cadc84b407ae8b8eaf67ebdcd43", size = 10699024, upload-time = "2026-06-18T18:25:05.707Z" }, + { url = "https://files.pythonhosted.org/packages/63/42/1e3e4c68bd408b9768cf3e439acbe2c78245225faef253f7028a0cdb63e0/ruff-0.15.18-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01a754cd6a1b630d3f97e33eb452cf7a98040482318e870f8bc52a5a30e62657", size = 11491458, upload-time = "2026-06-18T18:25:20.275Z" }, + { url = "https://files.pythonhosted.org/packages/20/77/47a3484bea8521e14a203d98c389c5c97846675e4f02734672da4a69b52a/ruff-0.15.18-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6ba7a07e03a44dbf10bb086ee06705b173625014ec99f73a7e6836a5e5590a0c", size = 12383752, upload-time = "2026-06-18T18:25:22.535Z" }, + { url = "https://files.pythonhosted.org/packages/0a/ca/054159590787023d83b658a1a1819c4c8910114e7015069340b71c0961cb/ruff-0.15.18-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a2c40a41a4cadbcf5897b548ab29dfe248b20c540961c0247d98a3973c70403", size = 11577923, upload-time = "2026-06-18T18:25:10.702Z" }, + { url = "https://files.pythonhosted.org/packages/6d/ff/d353d6b7bbd73cc0ec37f4463d7540e45e894338abdd9964eee0de332708/ruff-0.15.18-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f0480ce690cbb6c4db6e5d08f19fce98e10ba131a8b60c1bcdac42771e3ae2d", size = 11583925, upload-time = "2026-06-18T18:25:32.391Z" }, + { url = "https://files.pythonhosted.org/packages/c1/4a/891f89b9c296ed3e5f3ece1a5629badc989d9a8fdaa30431aaf4774bc1c2/ruff-0.15.18-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:2330215f1f393fa8733f55edce04fcf94c36a2c460fcde31f78cc84e4951e9b1", size = 11582834, upload-time = "2026-06-18T18:25:27.309Z" }, + { url = "https://files.pythonhosted.org/packages/32/a3/ed9e370154bf85de360b93c03026157f02d4943b2d01ff4945f4429f8e8a/ruff-0.15.18-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a6aa6a3d979e48ae617578183674bf264fbe7d0114a796a26bd678d67963c7ff", size = 10927328, upload-time = "2026-06-18T18:25:34.676Z" }, + { url = "https://files.pythonhosted.org/packages/f5/d1/5cf5909329fedb5d39d555ee818ba5cf4638e1a301b89785d34f2905bfcb/ruff-0.15.18-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a81beadbbff2c9c245561ae3f77b16709d87f35eec650d0501679239d3449b22", size = 10693187, upload-time = "2026-06-18T18:25:08.245Z" }, + { url = "https://files.pythonhosted.org/packages/fd/44/ff6c635cf2c4f4e7b618b6640da057376baa36014695487d88aed4794268/ruff-0.15.18-py3-none-musllinux_1_2_i686.whl", hash = "sha256:2186d9e940ae332ab293623a75b5f4fe49565f449954d50a72a046683aa6b809", size = 11208721, upload-time = "2026-06-18T18:25:41.327Z" }, + { url = "https://files.pythonhosted.org/packages/88/d9/5baa2a30861adfb7022cf33c1e35b2fc18085b08c16f83eff4c7b99a5f48/ruff-0.15.18-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5c2abf140438032bc77b2284a6c9944ecd8a19e5f1c7b52b1b8e4a0a80d19a7a", size = 11678599, upload-time = "2026-06-18T18:25:13.607Z" }, + { url = "https://files.pythonhosted.org/packages/c3/1a/0725a7cfdc32ff769efb96ee782bec882e16448c5d9e3be947ec4c04ce27/ruff-0.15.18-py3-none-win32.whl", hash = "sha256:02299e6e9fa5b297a3f6d5d10d7bcd655c925b028bb8b9d4588214549c6b9ec4", size = 10901903, upload-time = "2026-06-18T18:25:24.755Z" }, + { url = "https://files.pythonhosted.org/packages/f3/51/805d9f6fb7970505c3504794a5ec350f605361b807fef4dcf214ebd35e72/ruff-0.15.18-py3-none-win_amd64.whl", hash = "sha256:dac80dc8d26b2257dbefabed62f5d255c3937b4ccb122da1fc634794fa3578b3", size = 12041189, upload-time = "2026-06-18T18:25:17.915Z" }, + { url = "https://files.pythonhosted.org/packages/29/4c/67bb45e41609eb4726f1bfeb59e083cf91d14c696d4bd14c234a980be93d/ruff-0.15.18-py3-none-win_arm64.whl", hash = "sha256:b2c9257fcbd4a3e5b977a1904e6facca016bafe2edc17df24db67cfaee03b4e4", size = 11329958, upload-time = "2026-06-18T18:25:43.686Z" }, ] [[package]] From c2d667cd5c84d99978ae67d3c2489b2bd0d14219 Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 15:08:19 +0000 Subject: [PATCH 44/60] Auto-generated library v3.2.0b3 for API v1.71.0-beta.3. (#428) Co-authored-by: GitHub Action --- docs/generation-report.md | 6 + meraki/__init__.py | 2 +- meraki/_version.py | 2 +- meraki/aio/api/appliance.py | 782 +++++++++++++++++++++++++++++- meraki/aio/api/assistant.py | 24 +- meraki/aio/api/organizations.py | 268 ++++++++-- meraki/aio/api/switch.py | 4 +- meraki/aio/api/wireless.py | 16 + meraki/aio/rest_session.py | 11 +- meraki/api/appliance.py | 782 +++++++++++++++++++++++++++++- meraki/api/assistant.py | 24 +- meraki/api/batch/appliance.py | 336 ++++++++++++- meraki/api/batch/organizations.py | 106 ++-- meraki/api/batch/switch.py | 6 +- meraki/api/organizations.py | 268 ++++++++-- meraki/api/switch.py | 4 +- meraki/api/wireless.py | 16 + meraki/rest_session.py | 10 +- pyproject.toml | 2 +- uv.lock | 2 +- 20 files changed, 2548 insertions(+), 123 deletions(-) diff --git a/docs/generation-report.md b/docs/generation-report.md index 1c4bcb1f..aa911585 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,11 @@ # Generation Report +## 2026-06-24 | Library v3.2.0b3 | API 1.71.0-beta.3 + + +No Python keyword parameter conflicts detected. + + ## 2026-06-17 | Library v3.2.0b2 | API 1.71.0-beta.2 diff --git a/meraki/__init__.py b/meraki/__init__.py index ef645eca..69432ccd 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -52,7 +52,7 @@ from meraki._version import __version__ # noqa: F401 from datetime import datetime -__api_version__ = "1.71.0-beta.2" +__api_version__ = "1.71.0-beta.3" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index 5360bbc3..4f543ac4 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "3.2.0b2" +__version__ = "3.2.0b3" diff --git a/meraki/aio/api/appliance.py b/meraki/aio/api/appliance.py index a7099f2a..7d7f83ed 100644 --- a/meraki/aio/api/appliance.py +++ b/meraki/aio/api/appliance.py @@ -1152,6 +1152,7 @@ def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwarg - networkId (string): Network ID - ipv4 (object): IPv4 configuration - port (object): Port configuration + - vrf (object): VRF assignment for the L3 interface """ kwargs.update(locals()) @@ -1166,6 +1167,7 @@ def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwarg body_params = [ "port", "ipv4", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1186,6 +1188,7 @@ def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, * - interfaceId (string): Interface ID - port (object): Port configuration - ipv4 (object): IPv4 configuration + - vrf (object): VRF assignment for the L3 interface """ kwargs.update(locals()) @@ -1201,6 +1204,7 @@ def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, * body_params = [ "port", "ipv4", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1687,6 +1691,7 @@ def updateNetworkApplianceSecurityIntrusion(self, networkId: str, **kwargs): - networkId (string): Network ID - mode (string): Set mode to 'disabled'/'detection'/'prevention' (optional - omitting will leave current config unchanged) - idsRulesets (string): Set the detection ruleset 'connectivity'/'balanced'/'security' (optional - omitting will leave current config unchanged). Default value is 'balanced' if none currently saved + - policy (object): Set a custom intrusion policy by id (optional - omitting will leave current config unchanged) - protectedNetworks (object): Set the included/excluded networks from the intrusion engine (optional - omitting will leave current config unchanged). This is available only in 'passthrough' mode """ @@ -1711,6 +1716,7 @@ def updateNetworkApplianceSecurityIntrusion(self, networkId: str, **kwargs): body_params = [ "mode", "idsRulesets", + "policy", "protectedNetworks", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1873,7 +1879,7 @@ def updateNetworkApplianceSingleLan(self, networkId: str, **kwargs): - applianceIp (string): The appliance IP address of the single LAN - ipv6 (object): IPv6 configuration on the VLAN - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this LAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above - - vrf (object): VRF configuration on the Single LAN + - vrf (object): VRF configuration on the Single LAN. Omit this field to preserve the current VRF. """ kwargs.update(locals()) @@ -3159,12 +3165,22 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): - enabled (boolean): Boolean value to enable or disable the BGP configuration. When BGP is enabled, the asNumber (ASN) will be autopopulated with the preconfigured ASN at other Hubs or a default value if there is no ASN configured. - asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512. - ibgpHoldTimer (integer): The iBGP holdtimer in seconds. The iBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240. + - ipv6 (object): Settings for IPv6 configurations on the organization. + - tunnelDownTermination (object): Settings for tunnel down termination on the organization. + - vpnAsNumber (integer): Network specific number of the Autonomous System to which the appliance belongs. + - priorityRoute (string): Sets the priority route between eBGP and Auto VPN. - routerId (string): The router ID of the appliance - neighbors (array): List of BGP neighbors. This list replaces the existing set of neighbors. When absent, this field is not updated. """ kwargs.update(locals()) + if "priorityRoute" in kwargs and kwargs["priorityRoute"] is not None: + options = ["Auto VPN", "eBGP"] + assert kwargs["priorityRoute"] in options, ( + f'''"priorityRoute" cannot be "{kwargs["priorityRoute"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["appliance", "configure", "vpn", "bgp"], "operation": "updateNetworkApplianceVpnBgp", @@ -3176,6 +3192,10 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): "enabled", "asNumber", "ibgpHoldTimer", + "ipv6", + "tunnelDownTermination", + "vpnAsNumber", + "priorityRoute", "routerId", "neighbors", ] @@ -4564,6 +4584,766 @@ def updateOrganizationApplianceSecurityIntrusion(self, organizationId: str, allo return self._session.put(metadata, resource, payload) + def getOrganizationApplianceSecurityIntrusionPolicies( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the intrusion policies configured for an organization along with base policies.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-policies + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 25. + - 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. + - mode (string): Controls which policy set is returned. + - policyIds (array): Identifiers of policies to filter + - search (string): Filter policies by case-insensitive partial match on name or description. + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["base", "intrusion"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies"], + "operation": "getOrganizationApplianceSecurityIntrusionPolicies", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "mode", + "policyIds", + "search", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionPolicies: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationApplianceSecurityIntrusionPolicy(self, organizationId: str, **kwargs): + """ + **Create a new intrusion policy for the organization.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-appliance-security-intrusion-policy + + - organizationId (string): Organization ID + - policy (object): Attributes for the intrusion policy + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies"], + "operation": "createOrganizationApplianceSecurityIntrusionPolicy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies" + + body_params = [ + "policy", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationApplianceSecurityIntrusionPolicy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationApplianceSecurityIntrusionPoliciesOverviews( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List counts for the intrusion and base policies configured for an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-policies-overviews + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 25. + - 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. + - policyIds (array): Identifiers of policies to filter + - search (string): Filter policy overviews by case-insensitive partial match on policy name or description. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "overviews"], + "operation": "getOrganizationApplianceSecurityIntrusionPoliciesOverviews", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/overviews" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "policyIds", + "search", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionPoliciesOverviews: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def updateOrganizationApplianceSecurityIntrusionPolicy(self, organizationId: str, policyId: str, policy: dict, **kwargs): + """ + **Update a single intrusion policy for the organization.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-security-intrusion-policy + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - policy (object): Attributes for the intrusion policy + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies"], + "operation": "updateOrganizationApplianceSecurityIntrusionPolicy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}" + + body_params = [ + "policy", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationApplianceSecurityIntrusionPolicy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationApplianceSecurityIntrusionPolicy(self, organizationId: str, policyId: str): + """ + **Delete a single intrusion policy for the organization.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-appliance-security-intrusion-policy + + - organizationId (string): Organization ID + - policyId (string): Policy ID + """ + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies"], + "operation": "deleteOrganizationApplianceSecurityIntrusionPolicy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}" + + return self._session.delete(metadata, resource) + + def declareOrganizationApplianceSecurityIntrusionPolicyRuleGroupsOverrides( + self, organizationId: str, policyId: str, items: list, **kwargs + ): + """ + **Declare the desired rule group overrides for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!declare-organization-appliance-security-intrusion-policy-rule-groups-overrides + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - items (array): Desired overrides state + - mode (string): Controls how the configuration payload in the request body is applied to the resource. This parameter dictates the declarative mode: + + * **`complete`**: The request body represents the entire desired configuration for this resource. Any existing configurations that are not included in the payload will be removed. + * **`partial` (default)**: The request body contains only the configurations to be created or modified. Existing configurations that are not specified in the payload will be preserved. + + - recursive (boolean): Controls how the configuration payload in the request body applies to the rule group hierarchy. When true, the API applies each declared override to the rule group itself and its descendants unless the payload explicitly sets a descendant override. When false (default), the API applies overrides only to the rule groups listed in the payload. + + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["complete", "partial"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "ruleGroups", "overrides"], + "operation": "declareOrganizationApplianceSecurityIntrusionPolicyRuleGroupsOverrides", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + resource = ( + f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/ruleGroups/overrides/declare" + ) + + body_params = [ + "mode", + "recursive", + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"declareOrganizationApplianceSecurityIntrusionPolicyRuleGroupsOverrides: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def createOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride( + self, organizationId: str, policyId: str, ruleGroupId: str, override: dict, **kwargs + ): + """ + **Create a rule group override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-appliance-security-intrusion-policy-rule-group-override + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleGroupId (string): Rule group ID + - override (object): Attributes for the override for a rule group in a intrusion policy + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "ruleGroups", "override"], + "operation": "createOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + ruleGroupId = urllib.parse.quote(str(ruleGroupId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/ruleGroups/{ruleGroupId}/override" + + body_params = [ + "override", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride( + self, organizationId: str, policyId: str, ruleGroupId: str, override: dict, **kwargs + ): + """ + **Update a rule group override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-security-intrusion-policy-rule-group-override + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleGroupId (string): Rule group ID + - override (object): Attributes for the override for a rule group in a intrusion policy + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "ruleGroups", "override"], + "operation": "updateOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + ruleGroupId = urllib.parse.quote(str(ruleGroupId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/ruleGroups/{ruleGroupId}/override" + + body_params = [ + "override", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def declareOrganizationApplianceSecurityIntrusionPolicyRulesOverrides( + self, organizationId: str, policyId: str, items: list, **kwargs + ): + """ + **Declare the desired rule overrides for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!declare-organization-appliance-security-intrusion-policy-rules-overrides + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - items (array): Desired overrides state + - mode (string): Controls how the configuration payload in the request body is applied to the resource. This parameter dictates the declarative mode: + + * **`complete`**: The request body represents the entire desired configuration for this resource. Any existing configurations that are not included in the payload will be removed. This effectively performs a full replacement or overwrite of the resource's configuration. + * **`partial` (default)**: The request body contains only the configurations to be created or modified. Existing configurations that are not specified in the payload will be preserved. This performs a merge or partial update, applying only the changes specified. + + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["complete", "partial"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "rules", "overrides"], + "operation": "declareOrganizationApplianceSecurityIntrusionPolicyRulesOverrides", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/rules/overrides/declare" + + body_params = [ + "mode", + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"declareOrganizationApplianceSecurityIntrusionPolicyRulesOverrides: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def createOrganizationApplianceSecurityIntrusionPolicyRuleOverride( + self, organizationId: str, policyId: str, ruleId: str, override: dict, **kwargs + ): + """ + **Create a rule override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-appliance-security-intrusion-policy-rule-override + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleId (string): Rule ID + - override (object): Rule override to create + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "rules", "override"], + "operation": "createOrganizationApplianceSecurityIntrusionPolicyRuleOverride", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + ruleId = urllib.parse.quote(str(ruleId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/rules/{ruleId}/override" + + body_params = [ + "override", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationApplianceSecurityIntrusionPolicyRuleOverride: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationApplianceSecurityIntrusionPolicyRuleOverride( + self, organizationId: str, policyId: str, ruleId: str, override: dict, **kwargs + ): + """ + **Update a rule override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-security-intrusion-policy-rule-override + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleId (string): Rule ID + - override (object): Override attributes + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "rules", "override"], + "operation": "updateOrganizationApplianceSecurityIntrusionPolicyRuleOverride", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + ruleId = urllib.parse.quote(str(ruleId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/rules/{ruleId}/override" + + body_params = [ + "override", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationApplianceSecurityIntrusionPolicyRuleOverride: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def getOrganizationApplianceSecurityIntrusionRuleGroups( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the rule groups that belong to a security policy.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-rule-groups + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. 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. + - policyIds (array): Collection of base or intrusion policy identifiers to filter results by + - parentRuleGroupIds (array): Filter results to rule groups whose parent matches any of the provided identifiers + - search (string): Case-insensitive text filter applied to rule group name and description + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "ruleGroups"], + "operation": "getOrganizationApplianceSecurityIntrusionRuleGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/ruleGroups" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "policyIds", + "parentRuleGroupIds", + "search", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + "parentRuleGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionRuleGroups: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationApplianceSecurityIntrusionRuleGroupsOverrides( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the rule group overrides configured for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-rule-groups-overrides + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 25. + - 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. + - policyIds (array): Collection of intrusion policy identifiers to filter the overrides by. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "ruleGroups", "overrides"], + "operation": "getOrganizationApplianceSecurityIntrusionRuleGroupsOverrides", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/ruleGroups/overrides" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "policyIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionRuleGroupsOverrides: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationApplianceSecurityIntrusionRuleGroupsOverride(self, organizationId: str, overrideId: str): + """ + **Delete a rule group override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-appliance-security-intrusion-rule-groups-override + + - organizationId (string): Organization ID + - overrideId (string): Override ID + """ + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "ruleGroups", "overrides"], + "operation": "deleteOrganizationApplianceSecurityIntrusionRuleGroupsOverride", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + overrideId = urllib.parse.quote(str(overrideId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/ruleGroups/overrides/{overrideId}" + + return self._session.delete(metadata, resource) + + def getOrganizationApplianceSecurityIntrusionRuleGroupsOverviews( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List counts for the child rule groups and rules for each rule group in a security policy.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-rule-groups-overviews + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. 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. + - policyIds (array): Collection of base or intrusion policy identifiers to filter results by + - parentRuleGroupIds (array): Filter results to rule groups whose parent matches any of the provided identifiers + - search (string): Case-insensitive text filter applied to rule group name and description + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "ruleGroups", "overviews"], + "operation": "getOrganizationApplianceSecurityIntrusionRuleGroupsOverviews", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/ruleGroups/overviews" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "policyIds", + "parentRuleGroupIds", + "search", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + "parentRuleGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionRuleGroupsOverviews: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationApplianceSecurityIntrusionRules(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the rules that belong to a security policy.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-rules + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. 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. + - policyIds (array): Identifiers of the base or intrusion policies to query + - parentRuleGroupIds (array): Filter results to rules that belong to any of the specified rule groups + - search (string): Case-insensitive text filter applied to rule name and description + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "rules"], + "operation": "getOrganizationApplianceSecurityIntrusionRules", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/rules" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "policyIds", + "parentRuleGroupIds", + "search", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + "parentRuleGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionRules: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationApplianceSecurityIntrusionRulesOverrides( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the rule overrides configured for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-rules-overrides + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 25. + - 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. + - policyIds (array): Identifiers of intrusion policies to filter + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "rules", "overrides"], + "operation": "getOrganizationApplianceSecurityIntrusionRulesOverrides", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/rules/overrides" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "policyIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionRulesOverrides: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationApplianceSecurityIntrusionRulesOverride(self, organizationId: str, overrideId: str): + """ + **Delete a rule override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-appliance-security-intrusion-rules-override + + - organizationId (string): Organization ID + - overrideId (string): Override ID + """ + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "rules", "overrides"], + "operation": "deleteOrganizationApplianceSecurityIntrusionRulesOverride", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + overrideId = urllib.parse.quote(str(overrideId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/rules/overrides/{overrideId}" + + return self._session.delete(metadata, resource) + def getOrganizationApplianceTrafficShapingVpnExclusionsByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): diff --git a/meraki/aio/api/assistant.py b/meraki/aio/api/assistant.py index b34084b2..3dfece69 100644 --- a/meraki/aio/api/assistant.py +++ b/meraki/aio/api/assistant.py @@ -359,7 +359,7 @@ def getOrganizationAssistantChatThreadMessageArtifacts(self, organizationId: str return self._session.get(metadata, resource) def getOrganizationAssistantChatThreadMessageArtifact( - self, organizationId: str, threadId: str, messageId: str, artifactId: str + self, organizationId: str, threadId: str, messageId: str, artifactId: str, total_pages=1, direction="next", **kwargs ): """ **Return a single artifact with its full content.** @@ -369,8 +369,14 @@ def getOrganizationAssistantChatThreadMessageArtifact( - threadId (string): Thread ID - messageId (string): Message ID - artifactId (string): Artifact 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 + - page (integer): Page number for paginated artifact content, defaulting to 1 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. """ + kwargs.update(locals()) + metadata = { "tags": ["assistant", "configure", "chat", "threads", "messages", "artifacts"], "operation": "getOrganizationAssistantChatThreadMessageArtifact", @@ -383,7 +389,21 @@ def getOrganizationAssistantChatThreadMessageArtifact( f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/artifacts/{artifactId}" ) - return self._session.get(metadata, resource) + query_params = [ + "page", + "perPage", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssistantChatThreadMessageArtifact: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) def getOrganizationAssistantChatThreadMessageFeedback(self, organizationId: str, threadId: str, messageId: str): """ diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 74945077..bc8629ed 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -1350,18 +1350,29 @@ def getOrganizationApiPushTopics(self, organizationId: str): return self._session.get(metadata, resource) - def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwargs): + def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **List pipeline IDs for the organization, with optional status and timespan filtering** + **List pipelines with operation and status metadata, sorted by pipeline ID** https://developer.cisco.com/meraki/api-v1/#!get-organization-api-rest-provisioning-pipelines - organizationId (string): Organization ID - - status (string): If provided, filters pipelines by status. If omitted, pipelines of all statuses are returned. + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - sortOrder (string): Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'descending'. + - status (string): If provided, filters pipelines by status. If omitted, pipelines of all statuses are returned. `pending` pipelines have not started, `active` pipelines have started but not finished, `success` pipelines completed successfully, and `error` pipelines failed. - timespan (integer): Created-at lookback for matching pipelines, in seconds. Defaults to 7200 seconds. The maximum is 30 days. """ kwargs.update(locals()) + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) if "status" in kwargs: options = ["active", "error", "pending", "success"] assert kwargs["status"] in options, ( @@ -1376,6 +1387,10 @@ def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwa resource = f"/organizations/{organizationId}/api/rest/provisioning/pipelines" query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "sortOrder", "status", "timespan", ] @@ -1389,7 +1404,7 @@ def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwa f"getOrganizationApiRestProvisioningPipelines: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get(metadata, resource, params) + return self._session.get_pages(metadata, resource, params, total_pages, direction) def getOrganizationApiRestProvisioningPipelinesJobs(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ @@ -2371,9 +2386,10 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s - organizationId (string): Organization ID - networkId (string): Network ID to query. - - serials (array): A list of serials of AP devices + - serials (array): A list of serials of wireless AP or wired switch devices - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. - ssidNumbers (array): Filter results by SSID number + - deviceType (string): Filter connected client counts by device type. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 8 hours. If interval is provided, the timespan will be autocalculated. @@ -2382,6 +2398,12 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s kwargs.update(locals()) + if "deviceType" in kwargs: + options = ["access_point", "switch"] + assert kwargs["deviceType"] in options, ( + f'''"deviceType" cannot be "{kwargs["deviceType"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["organizations", "monitor", "clients", "connectedCountHistory"], "operation": "getOrganizationAssuranceClientsConnectedCountHistory", @@ -2394,6 +2416,7 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s "serials", "bands", "ssidNumbers", + "deviceType", "t0", "t1", "timespan", @@ -4546,6 +4569,208 @@ def getOrganizationCloudConnectivityRequirements(self, organizationId: str): return self._session.get(metadata, resource) + def getOrganizationComputeApplicationDeployments(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the Application Deployment agent configurations for all hosts under this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-compute-application-deployments + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - developerNames (array): Filters deployments by application developer name + - applicationNames (array): Filters deployments by application name + - enabled (boolean): Filters deployments by their enabled status + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "compute", "application", "deployments"], + "operation": "getOrganizationComputeApplicationDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/compute/application/deployments" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "developerNames", + "applicationNames", + "enabled", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "developerNames", + "applicationNames", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationComputeApplicationDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationComputeApplicationDeploymentsBulkCreate( + self, organizationId: str, hosts: list, application: dict, enabled: bool, **kwargs + ): + """ + **Add Application Deployment agents for a list of hosts** + https://developer.cisco.com/meraki/api-v1/#!create-organization-compute-application-deployments-bulk-create + + - organizationId (string): Organization ID + - hosts (array): List of hosts to deploy applications on + - application (object): Application information + - enabled (boolean): Whether the deployment should be enabled + - applicationConfiguration (object): Optional: Generic object for application-specific configuration + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "compute", "application", "deployments", "bulkCreate"], + "operation": "createOrganizationComputeApplicationDeploymentsBulkCreate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/compute/application/deployments/bulkCreate" + + body_params = [ + "hosts", + "application", + "enabled", + "applicationConfiguration", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationComputeApplicationDeploymentsBulkCreate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationComputeApplicationDeployment(self, organizationId: str, deploymentId: str, enabled: bool, **kwargs): + """ + **Update a Deployment agent configuration** + https://developer.cisco.com/meraki/api-v1/#!update-organization-compute-application-deployment + + - organizationId (string): Organization ID + - deploymentId (string): Deployment ID + - enabled (boolean): Whether or not the Application Deployment agent is enabled for the host. + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "compute", "application", "deployments"], + "operation": "updateOrganizationComputeApplicationDeployment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + deploymentId = urllib.parse.quote(str(deploymentId), safe="") + resource = f"/organizations/{organizationId}/compute/application/deployments/{deploymentId}" + + body_params = [ + "enabled", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationComputeApplicationDeployment: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationComputeApplicationDeployment(self, organizationId: str, deploymentId: str): + """ + **Delete a Application Deployment agent from the host** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-compute-application-deployment + + - organizationId (string): Organization ID + - deploymentId (string): Deployment ID + """ + + metadata = { + "tags": ["organizations", "configure", "compute", "application", "deployments"], + "operation": "deleteOrganizationComputeApplicationDeployment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + deploymentId = urllib.parse.quote(str(deploymentId), safe="") + resource = f"/organizations/{organizationId}/compute/application/deployments/{deploymentId}" + + return self._session.delete(metadata, resource) + + def getOrganizationComputeHosts( + self, organizationId: str, developerName: str, applicationName: str, total_pages=1, direction="next", **kwargs + ): + """ + **Retrieves a list of compute hosts eligible for application deployment within a given organization, filtered by the specified application developer and application name, with optional network ID filtering.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-compute-hosts + + - organizationId (string): Organization ID + - developerName (string): Filters hosts by application developer name + - applicationName (string): Filters hosts by application name + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - networkIds (array): Filters hosts by the network ID they belong to + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "compute", "hosts"], + "operation": "getOrganizationComputeHosts", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/compute/hosts" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "developerName", + "applicationName", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationComputeHosts: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationConfigTemplates(self, organizationId: str): """ **List the configuration templates for this organization** @@ -11456,39 +11681,6 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): return self._session.delete(metadata, resource) - def enrollOrganizationSaseSites(self, organizationId: str, **kwargs): - """ - **Enroll sites in this organization to Secure Access** - https://developer.cisco.com/meraki/api-v1/#!enroll-organization-sase-sites - - - organizationId (string): Organization ID - - items (array): List of Meraki SD-WAN sites with the associated regions to be enrolled. - - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret - """ - - kwargs.update(locals()) - - metadata = { - "tags": ["organizations", "configure", "sase", "sites"], - "operation": "enrollOrganizationSaseSites", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/sase/sites/enroll" - - body_params = [ - "items", - "callback", - ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} - - if self._session._validate_kwargs: - all_params = [] + body_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning(f"enrollOrganizationSaseSites: ignoring unrecognized kwargs: {invalid}") - - return self._session.post(metadata, resource, payload) - def updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs): """ **Update the configuration for a site** diff --git a/meraki/aio/api/switch.py b/meraki/aio/api/switch.py index 746bbcaa..e4436722 100644 --- a/meraki/aio/api/switch.py +++ b/meraki/aio/api/switch.py @@ -2553,8 +2553,8 @@ def updateNetworkSwitchStack(self, networkId: str, switchStackId: str, **kwargs) - networkId (string): Network ID - switchStackId (string): Switch stack ID - - name (string): The name of the stack - - members (array): The list of switches that should be in the stack + - name (string): The name of the switch stack + - members (array): The complete list of switches that should be in the stack. Minimum 2 and maximum 8 members. Omitting this field leaves stack membership unchanged. """ kwargs.update(locals()) diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index 1e10213a..8085bb2d 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -4630,6 +4630,7 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. + - insights (string): Insights version to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -4645,6 +4646,11 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) + if "insights" in kwargs: + options = ["1", "2"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) metadata = { "tags": ["wireless", "configure", "experience", "channelAvailability", "insights", "byNetwork"], @@ -4660,6 +4666,7 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo "bands", "contributor", "subContributor", + "insights", "t0", "t1", "timespan", @@ -5317,6 +5324,8 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. + - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. + - insights (string): Insights version to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5332,6 +5341,11 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) + if "insights" in kwargs: + options = ["1", "2"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) metadata = { "tags": ["wireless", "configure", "experience", "coverage", "insights", "byNetwork"], @@ -5346,6 +5360,8 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( "ssidNumbers", "bands", "contributor", + "subContributor", + "insights", "t0", "t1", "timespan", diff --git a/meraki/aio/rest_session.py b/meraki/aio/rest_session.py index 9eb35572..aba94507 100644 --- a/meraki/aio/rest_session.py +++ b/meraki/aio/rest_session.py @@ -230,8 +230,17 @@ async def _request(self, metadata, method, url, **kwargs): await asyncio.sleep(wait) # 5XX errors elif status >= 500: + request_id = response.headers.get("X-Request-Id") or "none" if self._logger: - self._logger.warning(f"{tag}, {operation} > {abs_url} - {status} {reason}, retrying in 1 second") + self._logger.warning( + f"{tag}, {operation} > {abs_url} - {status} {reason} " + f"(X-Request-Id: {request_id}), retrying in 1 second" + ) + if _attempt == retries - 1: + self._logger.error( + f"{tag}, {operation} > {abs_url} - {status} {reason} failed after retries. " + f"Provide this X-Request-Id to Meraki for log lookup: {request_id}" + ) await asyncio.sleep(1) # 4XX errors else: diff --git a/meraki/api/appliance.py b/meraki/api/appliance.py index 2886703d..fa7b1fdb 100644 --- a/meraki/api/appliance.py +++ b/meraki/api/appliance.py @@ -1152,6 +1152,7 @@ def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwarg - networkId (string): Network ID - ipv4 (object): IPv4 configuration - port (object): Port configuration + - vrf (object): VRF assignment for the L3 interface """ kwargs.update(locals()) @@ -1166,6 +1167,7 @@ def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwarg body_params = [ "port", "ipv4", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1186,6 +1188,7 @@ def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, * - interfaceId (string): Interface ID - port (object): Port configuration - ipv4 (object): IPv4 configuration + - vrf (object): VRF assignment for the L3 interface """ kwargs.update(locals()) @@ -1201,6 +1204,7 @@ def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, * body_params = [ "port", "ipv4", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1687,6 +1691,7 @@ def updateNetworkApplianceSecurityIntrusion(self, networkId: str, **kwargs): - networkId (string): Network ID - mode (string): Set mode to 'disabled'/'detection'/'prevention' (optional - omitting will leave current config unchanged) - idsRulesets (string): Set the detection ruleset 'connectivity'/'balanced'/'security' (optional - omitting will leave current config unchanged). Default value is 'balanced' if none currently saved + - policy (object): Set a custom intrusion policy by id (optional - omitting will leave current config unchanged) - protectedNetworks (object): Set the included/excluded networks from the intrusion engine (optional - omitting will leave current config unchanged). This is available only in 'passthrough' mode """ @@ -1711,6 +1716,7 @@ def updateNetworkApplianceSecurityIntrusion(self, networkId: str, **kwargs): body_params = [ "mode", "idsRulesets", + "policy", "protectedNetworks", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1873,7 +1879,7 @@ def updateNetworkApplianceSingleLan(self, networkId: str, **kwargs): - applianceIp (string): The appliance IP address of the single LAN - ipv6 (object): IPv6 configuration on the VLAN - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this LAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above - - vrf (object): VRF configuration on the Single LAN + - vrf (object): VRF configuration on the Single LAN. Omit this field to preserve the current VRF. """ kwargs.update(locals()) @@ -3159,12 +3165,22 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): - enabled (boolean): Boolean value to enable or disable the BGP configuration. When BGP is enabled, the asNumber (ASN) will be autopopulated with the preconfigured ASN at other Hubs or a default value if there is no ASN configured. - asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512. - ibgpHoldTimer (integer): The iBGP holdtimer in seconds. The iBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240. + - ipv6 (object): Settings for IPv6 configurations on the organization. + - tunnelDownTermination (object): Settings for tunnel down termination on the organization. + - vpnAsNumber (integer): Network specific number of the Autonomous System to which the appliance belongs. + - priorityRoute (string): Sets the priority route between eBGP and Auto VPN. - routerId (string): The router ID of the appliance - neighbors (array): List of BGP neighbors. This list replaces the existing set of neighbors. When absent, this field is not updated. """ kwargs.update(locals()) + if "priorityRoute" in kwargs and kwargs["priorityRoute"] is not None: + options = ["Auto VPN", "eBGP"] + assert kwargs["priorityRoute"] in options, ( + f'''"priorityRoute" cannot be "{kwargs["priorityRoute"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["appliance", "configure", "vpn", "bgp"], "operation": "updateNetworkApplianceVpnBgp", @@ -3176,6 +3192,10 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): "enabled", "asNumber", "ibgpHoldTimer", + "ipv6", + "tunnelDownTermination", + "vpnAsNumber", + "priorityRoute", "routerId", "neighbors", ] @@ -4564,6 +4584,766 @@ def updateOrganizationApplianceSecurityIntrusion(self, organizationId: str, allo return self._session.put(metadata, resource, payload) + def getOrganizationApplianceSecurityIntrusionPolicies( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the intrusion policies configured for an organization along with base policies.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-policies + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 25. + - 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. + - mode (string): Controls which policy set is returned. + - policyIds (array): Identifiers of policies to filter + - search (string): Filter policies by case-insensitive partial match on name or description. + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["base", "intrusion"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies"], + "operation": "getOrganizationApplianceSecurityIntrusionPolicies", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "mode", + "policyIds", + "search", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionPolicies: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationApplianceSecurityIntrusionPolicy(self, organizationId: str, **kwargs): + """ + **Create a new intrusion policy for the organization.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-appliance-security-intrusion-policy + + - organizationId (string): Organization ID + - policy (object): Attributes for the intrusion policy + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies"], + "operation": "createOrganizationApplianceSecurityIntrusionPolicy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies" + + body_params = [ + "policy", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationApplianceSecurityIntrusionPolicy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getOrganizationApplianceSecurityIntrusionPoliciesOverviews( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List counts for the intrusion and base policies configured for an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-policies-overviews + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 25. + - 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. + - policyIds (array): Identifiers of policies to filter + - search (string): Filter policy overviews by case-insensitive partial match on policy name or description. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "overviews"], + "operation": "getOrganizationApplianceSecurityIntrusionPoliciesOverviews", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/overviews" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "policyIds", + "search", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionPoliciesOverviews: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def updateOrganizationApplianceSecurityIntrusionPolicy(self, organizationId: str, policyId: str, policy: dict, **kwargs): + """ + **Update a single intrusion policy for the organization.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-security-intrusion-policy + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - policy (object): Attributes for the intrusion policy + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies"], + "operation": "updateOrganizationApplianceSecurityIntrusionPolicy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}" + + body_params = [ + "policy", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationApplianceSecurityIntrusionPolicy: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationApplianceSecurityIntrusionPolicy(self, organizationId: str, policyId: str): + """ + **Delete a single intrusion policy for the organization.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-appliance-security-intrusion-policy + + - organizationId (string): Organization ID + - policyId (string): Policy ID + """ + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies"], + "operation": "deleteOrganizationApplianceSecurityIntrusionPolicy", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}" + + return self._session.delete(metadata, resource) + + def declareOrganizationApplianceSecurityIntrusionPolicyRuleGroupsOverrides( + self, organizationId: str, policyId: str, items: list, **kwargs + ): + """ + **Declare the desired rule group overrides for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!declare-organization-appliance-security-intrusion-policy-rule-groups-overrides + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - items (array): Desired overrides state + - mode (string): Controls how the configuration payload in the request body is applied to the resource. This parameter dictates the declarative mode: + + * **`complete`**: The request body represents the entire desired configuration for this resource. Any existing configurations that are not included in the payload will be removed. + * **`partial` (default)**: The request body contains only the configurations to be created or modified. Existing configurations that are not specified in the payload will be preserved. + + - recursive (boolean): Controls how the configuration payload in the request body applies to the rule group hierarchy. When true, the API applies each declared override to the rule group itself and its descendants unless the payload explicitly sets a descendant override. When false (default), the API applies overrides only to the rule groups listed in the payload. + + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["complete", "partial"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "ruleGroups", "overrides"], + "operation": "declareOrganizationApplianceSecurityIntrusionPolicyRuleGroupsOverrides", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + resource = ( + f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/ruleGroups/overrides/declare" + ) + + body_params = [ + "mode", + "recursive", + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"declareOrganizationApplianceSecurityIntrusionPolicyRuleGroupsOverrides: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def createOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride( + self, organizationId: str, policyId: str, ruleGroupId: str, override: dict, **kwargs + ): + """ + **Create a rule group override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-appliance-security-intrusion-policy-rule-group-override + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleGroupId (string): Rule group ID + - override (object): Attributes for the override for a rule group in a intrusion policy + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "ruleGroups", "override"], + "operation": "createOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + ruleGroupId = urllib.parse.quote(str(ruleGroupId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/ruleGroups/{ruleGroupId}/override" + + body_params = [ + "override", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride( + self, organizationId: str, policyId: str, ruleGroupId: str, override: dict, **kwargs + ): + """ + **Update a rule group override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-security-intrusion-policy-rule-group-override + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleGroupId (string): Rule group ID + - override (object): Attributes for the override for a rule group in a intrusion policy + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "ruleGroups", "override"], + "operation": "updateOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + ruleGroupId = urllib.parse.quote(str(ruleGroupId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/ruleGroups/{ruleGroupId}/override" + + body_params = [ + "override", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def declareOrganizationApplianceSecurityIntrusionPolicyRulesOverrides( + self, organizationId: str, policyId: str, items: list, **kwargs + ): + """ + **Declare the desired rule overrides for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!declare-organization-appliance-security-intrusion-policy-rules-overrides + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - items (array): Desired overrides state + - mode (string): Controls how the configuration payload in the request body is applied to the resource. This parameter dictates the declarative mode: + + * **`complete`**: The request body represents the entire desired configuration for this resource. Any existing configurations that are not included in the payload will be removed. This effectively performs a full replacement or overwrite of the resource's configuration. + * **`partial` (default)**: The request body contains only the configurations to be created or modified. Existing configurations that are not specified in the payload will be preserved. This performs a merge or partial update, applying only the changes specified. + + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["complete", "partial"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "rules", "overrides"], + "operation": "declareOrganizationApplianceSecurityIntrusionPolicyRulesOverrides", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/rules/overrides/declare" + + body_params = [ + "mode", + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"declareOrganizationApplianceSecurityIntrusionPolicyRulesOverrides: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def createOrganizationApplianceSecurityIntrusionPolicyRuleOverride( + self, organizationId: str, policyId: str, ruleId: str, override: dict, **kwargs + ): + """ + **Create a rule override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-appliance-security-intrusion-policy-rule-override + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleId (string): Rule ID + - override (object): Rule override to create + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "rules", "override"], + "operation": "createOrganizationApplianceSecurityIntrusionPolicyRuleOverride", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + ruleId = urllib.parse.quote(str(ruleId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/rules/{ruleId}/override" + + body_params = [ + "override", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationApplianceSecurityIntrusionPolicyRuleOverride: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationApplianceSecurityIntrusionPolicyRuleOverride( + self, organizationId: str, policyId: str, ruleId: str, override: dict, **kwargs + ): + """ + **Update a rule override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-security-intrusion-policy-rule-override + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleId (string): Rule ID + - override (object): Override attributes + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "policies", "rules", "override"], + "operation": "updateOrganizationApplianceSecurityIntrusionPolicyRuleOverride", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") + ruleId = urllib.parse.quote(str(ruleId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/rules/{ruleId}/override" + + body_params = [ + "override", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationApplianceSecurityIntrusionPolicyRuleOverride: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def getOrganizationApplianceSecurityIntrusionRuleGroups( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the rule groups that belong to a security policy.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-rule-groups + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. 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. + - policyIds (array): Collection of base or intrusion policy identifiers to filter results by + - parentRuleGroupIds (array): Filter results to rule groups whose parent matches any of the provided identifiers + - search (string): Case-insensitive text filter applied to rule group name and description + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "ruleGroups"], + "operation": "getOrganizationApplianceSecurityIntrusionRuleGroups", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/ruleGroups" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "policyIds", + "parentRuleGroupIds", + "search", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + "parentRuleGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionRuleGroups: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationApplianceSecurityIntrusionRuleGroupsOverrides( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the rule group overrides configured for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-rule-groups-overrides + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 25. + - 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. + - policyIds (array): Collection of intrusion policy identifiers to filter the overrides by. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "ruleGroups", "overrides"], + "operation": "getOrganizationApplianceSecurityIntrusionRuleGroupsOverrides", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/ruleGroups/overrides" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "policyIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionRuleGroupsOverrides: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationApplianceSecurityIntrusionRuleGroupsOverride(self, organizationId: str, overrideId: str): + """ + **Delete a rule group override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-appliance-security-intrusion-rule-groups-override + + - organizationId (string): Organization ID + - overrideId (string): Override ID + """ + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "ruleGroups", "overrides"], + "operation": "deleteOrganizationApplianceSecurityIntrusionRuleGroupsOverride", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + overrideId = urllib.parse.quote(str(overrideId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/ruleGroups/overrides/{overrideId}" + + return self._session.delete(metadata, resource) + + def getOrganizationApplianceSecurityIntrusionRuleGroupsOverviews( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List counts for the child rule groups and rules for each rule group in a security policy.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-rule-groups-overviews + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. 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. + - policyIds (array): Collection of base or intrusion policy identifiers to filter results by + - parentRuleGroupIds (array): Filter results to rule groups whose parent matches any of the provided identifiers + - search (string): Case-insensitive text filter applied to rule group name and description + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "ruleGroups", "overviews"], + "operation": "getOrganizationApplianceSecurityIntrusionRuleGroupsOverviews", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/ruleGroups/overviews" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "policyIds", + "parentRuleGroupIds", + "search", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + "parentRuleGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionRuleGroupsOverviews: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationApplianceSecurityIntrusionRules(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the rules that belong to a security policy.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-rules + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. 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. + - policyIds (array): Identifiers of the base or intrusion policies to query + - parentRuleGroupIds (array): Filter results to rules that belong to any of the specified rule groups + - search (string): Case-insensitive text filter applied to rule name and description + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "rules"], + "operation": "getOrganizationApplianceSecurityIntrusionRules", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/rules" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "policyIds", + "parentRuleGroupIds", + "search", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + "parentRuleGroupIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionRules: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationApplianceSecurityIntrusionRulesOverrides( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List the rule overrides configured for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion-rules-overrides + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 25. + - 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. + - policyIds (array): Identifiers of intrusion policies to filter + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "rules", "overrides"], + "operation": "getOrganizationApplianceSecurityIntrusionRulesOverrides", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/rules/overrides" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "policyIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "policyIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceSecurityIntrusionRulesOverrides: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def deleteOrganizationApplianceSecurityIntrusionRulesOverride(self, organizationId: str, overrideId: str): + """ + **Delete a rule override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-appliance-security-intrusion-rules-override + + - organizationId (string): Organization ID + - overrideId (string): Override ID + """ + + metadata = { + "tags": ["appliance", "configure", "security", "intrusion", "rules", "overrides"], + "operation": "deleteOrganizationApplianceSecurityIntrusionRulesOverride", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + overrideId = urllib.parse.quote(str(overrideId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/rules/overrides/{overrideId}" + + return self._session.delete(metadata, resource) + def getOrganizationApplianceTrafficShapingVpnExclusionsByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): diff --git a/meraki/api/assistant.py b/meraki/api/assistant.py index 9923c9d8..e76b269f 100644 --- a/meraki/api/assistant.py +++ b/meraki/api/assistant.py @@ -359,7 +359,7 @@ def getOrganizationAssistantChatThreadMessageArtifacts(self, organizationId: str return self._session.get(metadata, resource) def getOrganizationAssistantChatThreadMessageArtifact( - self, organizationId: str, threadId: str, messageId: str, artifactId: str + self, organizationId: str, threadId: str, messageId: str, artifactId: str, total_pages=1, direction="next", **kwargs ): """ **Return a single artifact with its full content.** @@ -369,8 +369,14 @@ def getOrganizationAssistantChatThreadMessageArtifact( - threadId (string): Thread ID - messageId (string): Message ID - artifactId (string): Artifact 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 + - page (integer): Page number for paginated artifact content, defaulting to 1 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. """ + kwargs.update(locals()) + metadata = { "tags": ["assistant", "configure", "chat", "threads", "messages", "artifacts"], "operation": "getOrganizationAssistantChatThreadMessageArtifact", @@ -383,7 +389,21 @@ def getOrganizationAssistantChatThreadMessageArtifact( f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/artifacts/{artifactId}" ) - return self._session.get(metadata, resource) + query_params = [ + "page", + "perPage", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssistantChatThreadMessageArtifact: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) def getOrganizationAssistantChatThreadMessageFeedback(self, organizationId: str, threadId: str, messageId: str): """ diff --git a/meraki/api/batch/appliance.py b/meraki/api/batch/appliance.py index eac132da..ea27fc94 100644 --- a/meraki/api/batch/appliance.py +++ b/meraki/api/batch/appliance.py @@ -303,6 +303,7 @@ def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwarg - networkId (string): Network ID - ipv4 (object): IPv4 configuration - port (object): Port configuration + - vrf (object): VRF assignment for the L3 interface """ kwargs.update(locals()) @@ -313,6 +314,7 @@ def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwarg body_params = [ "port", "ipv4", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -331,6 +333,7 @@ def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, * - interfaceId (string): Interface ID - port (object): Port configuration - ipv4 (object): IPv4 configuration + - vrf (object): VRF assignment for the L3 interface """ kwargs.update(locals()) @@ -342,6 +345,7 @@ def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, * body_params = [ "port", "ipv4", + "vrf", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -650,7 +654,7 @@ def updateNetworkApplianceSingleLan(self, networkId: str, **kwargs): - applianceIp (string): The appliance IP address of the single LAN - ipv6 (object): IPv6 configuration on the VLAN - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this LAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above - - vrf (object): VRF configuration on the Single LAN + - vrf (object): VRF configuration on the Single LAN. Omit this field to preserve the current VRF. """ kwargs.update(locals()) @@ -1389,12 +1393,22 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): - enabled (boolean): Boolean value to enable or disable the BGP configuration. When BGP is enabled, the asNumber (ASN) will be autopopulated with the preconfigured ASN at other Hubs or a default value if there is no ASN configured. - asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512. - ibgpHoldTimer (integer): The iBGP holdtimer in seconds. The iBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240. + - ipv6 (object): Settings for IPv6 configurations on the organization. + - tunnelDownTermination (object): Settings for tunnel down termination on the organization. + - vpnAsNumber (integer): Network specific number of the Autonomous System to which the appliance belongs. + - priorityRoute (string): Sets the priority route between eBGP and Auto VPN. - routerId (string): The router ID of the appliance - neighbors (array): List of BGP neighbors. This list replaces the existing set of neighbors. When absent, this field is not updated. """ kwargs.update(locals()) + if "priorityRoute" in kwargs and kwargs["priorityRoute"] is not None: + options = ["Auto VPN", "eBGP"] + assert kwargs["priorityRoute"] in options, ( + f'''"priorityRoute" cannot be "{kwargs["priorityRoute"]}", & must be set to one of: {options}''' + ) + networkId = urllib.parse.quote(networkId, safe="") resource = f"/networks/{networkId}/appliance/vpn/bgp" @@ -1402,6 +1416,10 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): "enabled", "asNumber", "ibgpHoldTimer", + "ipv6", + "tunnelDownTermination", + "vpnAsNumber", + "priorityRoute", "routerId", "neighbors", ] @@ -1889,6 +1907,322 @@ def updateOrganizationApplianceRoutingVrfsSettings(self, organizationId: str, en } return action + def createOrganizationApplianceSecurityIntrusionPolicy(self, organizationId: str, **kwargs): + """ + **Create a new intrusion policy for the organization.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-appliance-security-intrusion-policy + + - organizationId (string): Organization ID + - policy (object): Attributes for the intrusion policy + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies" + + body_params = [ + "policy", + ] + 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 updateOrganizationApplianceSecurityIntrusionPolicy(self, organizationId: str, policyId: str, policy: dict, **kwargs): + """ + **Update a single intrusion policy for the organization.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-security-intrusion-policy + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - policy (object): Attributes for the intrusion policy + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + policyId = urllib.parse.quote(policyId, safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}" + + body_params = [ + "policy", + ] + 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 deleteOrganizationApplianceSecurityIntrusionPolicy(self, organizationId: str, policyId: str): + """ + **Delete a single intrusion policy for the organization.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-appliance-security-intrusion-policy + + - organizationId (string): Organization ID + - policyId (string): Policy ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + policyId = urllib.parse.quote(policyId, safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def declareOrganizationApplianceSecurityIntrusionPolicyRuleGroupsOverrides( + self, organizationId: str, policyId: str, items: list, **kwargs + ): + """ + **Declare the desired rule group overrides for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!declare-organization-appliance-security-intrusion-policy-rule-groups-overrides + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - items (array): Desired overrides state + - mode (string): Controls how the configuration payload in the request body is applied to the resource. This parameter dictates the declarative mode: + + * **`complete`**: The request body represents the entire desired configuration for this resource. Any existing configurations that are not included in the payload will be removed. + * **`partial` (default)**: The request body contains only the configurations to be created or modified. Existing configurations that are not specified in the payload will be preserved. + + - recursive (boolean): Controls how the configuration payload in the request body applies to the rule group hierarchy. When true, the API applies each declared override to the rule group itself and its descendants unless the payload explicitly sets a descendant override. When false (default), the API applies overrides only to the rule groups listed in the payload. + + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["complete", "partial"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + organizationId = urllib.parse.quote(organizationId, safe="") + policyId = urllib.parse.quote(policyId, safe="") + resource = ( + f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/ruleGroups/overrides/declare" + ) + + body_params = [ + "mode", + "recursive", + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "declare", + "body": payload, + } + return action + + def createOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride( + self, organizationId: str, policyId: str, ruleGroupId: str, override: dict, **kwargs + ): + """ + **Create a rule group override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-appliance-security-intrusion-policy-rule-group-override + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleGroupId (string): Rule group ID + - override (object): Attributes for the override for a rule group in a intrusion policy + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + policyId = urllib.parse.quote(policyId, safe="") + ruleGroupId = urllib.parse.quote(ruleGroupId, safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/ruleGroups/{ruleGroupId}/override" + + body_params = [ + "override", + ] + 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 updateOrganizationApplianceSecurityIntrusionPolicyRuleGroupOverride( + self, organizationId: str, policyId: str, ruleGroupId: str, override: dict, **kwargs + ): + """ + **Update a rule group override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-security-intrusion-policy-rule-group-override + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleGroupId (string): Rule group ID + - override (object): Attributes for the override for a rule group in a intrusion policy + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + policyId = urllib.parse.quote(policyId, safe="") + ruleGroupId = urllib.parse.quote(ruleGroupId, safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/ruleGroups/{ruleGroupId}/override" + + body_params = [ + "override", + ] + 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 declareOrganizationApplianceSecurityIntrusionPolicyRulesOverrides( + self, organizationId: str, policyId: str, items: list, **kwargs + ): + """ + **Declare the desired rule overrides for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!declare-organization-appliance-security-intrusion-policy-rules-overrides + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - items (array): Desired overrides state + - mode (string): Controls how the configuration payload in the request body is applied to the resource. This parameter dictates the declarative mode: + + * **`complete`**: The request body represents the entire desired configuration for this resource. Any existing configurations that are not included in the payload will be removed. This effectively performs a full replacement or overwrite of the resource's configuration. + * **`partial` (default)**: The request body contains only the configurations to be created or modified. Existing configurations that are not specified in the payload will be preserved. This performs a merge or partial update, applying only the changes specified. + + """ + + kwargs.update(locals()) + + if "mode" in kwargs: + options = ["complete", "partial"] + assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' + + organizationId = urllib.parse.quote(organizationId, safe="") + policyId = urllib.parse.quote(policyId, safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/rules/overrides/declare" + + body_params = [ + "mode", + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "declare", + "body": payload, + } + return action + + def createOrganizationApplianceSecurityIntrusionPolicyRuleOverride( + self, organizationId: str, policyId: str, ruleId: str, override: dict, **kwargs + ): + """ + **Create a rule override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-appliance-security-intrusion-policy-rule-override + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleId (string): Rule ID + - override (object): Rule override to create + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + policyId = urllib.parse.quote(policyId, safe="") + ruleId = urllib.parse.quote(ruleId, safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/rules/{ruleId}/override" + + body_params = [ + "override", + ] + 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 updateOrganizationApplianceSecurityIntrusionPolicyRuleOverride( + self, organizationId: str, policyId: str, ruleId: str, override: dict, **kwargs + ): + """ + **Update a rule override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-security-intrusion-policy-rule-override + + - organizationId (string): Organization ID + - policyId (string): Policy ID + - ruleId (string): Rule ID + - override (object): Override attributes + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + policyId = urllib.parse.quote(policyId, safe="") + ruleId = urllib.parse.quote(ruleId, safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/policies/{policyId}/rules/{ruleId}/override" + + body_params = [ + "override", + ] + 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 deleteOrganizationApplianceSecurityIntrusionRuleGroupsOverride(self, organizationId: str, overrideId: str): + """ + **Delete a rule group override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-appliance-security-intrusion-rule-groups-override + + - organizationId (string): Organization ID + - overrideId (string): Override ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + overrideId = urllib.parse.quote(overrideId, safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/ruleGroups/overrides/{overrideId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + def deleteOrganizationApplianceSecurityIntrusionRulesOverride(self, organizationId: str, overrideId: str): + """ + **Delete a rule override for an intrusion policy.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-appliance-security-intrusion-rules-override + + - organizationId (string): Organization ID + - overrideId (string): Override ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + overrideId = urllib.parse.quote(overrideId, safe="") + resource = f"/organizations/{organizationId}/appliance/security/intrusion/rules/overrides/{overrideId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def updateOrganizationApplianceVpnSiteToSiteIpsecPeersSlas(self, organizationId: str, **kwargs): """ **Update the IPsec SLA policies for an organization** diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index 23f140a0..e77db320 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -952,6 +952,85 @@ def importOrganizationCertificates(self, organizationId: str, managedBy: str, co } return action + def createOrganizationComputeApplicationDeploymentsBulkCreate( + self, organizationId: str, hosts: list, application: dict, enabled: bool, **kwargs + ): + """ + **Add Application Deployment agents for a list of hosts. Only valid for hosts with access to Meraki Insight.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-compute-application-deployments-bulk-create + + - organizationId (string): Organization ID + - hosts (array): List of hosts to deploy applications on + - application (object): Application information + - enabled (boolean): Whether the deployment should be enabled + - applicationConfiguration (object): Optional: Generic object for application-specific configuration + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/compute/application/deployments/bulkCreate" + + body_params = [ + "hosts", + "application", + "enabled", + "applicationConfiguration", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "action", + "body": payload, + } + return action + + def updateOrganizationComputeApplicationDeployment(self, organizationId: str, deploymentId: str, enabled: bool, **kwargs): + """ + **Update a Deployment agent configuration. Only valid for hosts with access to Meraki Insight.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-compute-application-deployment + + - organizationId (string): Organization ID + - deploymentId (string): Deployment ID + - enabled (boolean): Whether or not the Application Deployment agent is enabled for the host. + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + deploymentId = urllib.parse.quote(deploymentId, safe="") + resource = f"/organizations/{organizationId}/compute/application/deployments/{deploymentId}" + + body_params = [ + "enabled", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "action", + "body": payload, + } + return action + + def deleteOrganizationComputeApplicationDeployment(self, organizationId: str, deploymentId: str): + """ + **Delete a Application Deployment agent from the host. Only valid for host with access to Meraki Insight.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-compute-application-deployment + + - organizationId (string): Organization ID + - deploymentId (string): Deployment ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + deploymentId = urllib.parse.quote(deploymentId, safe="") + resource = f"/organizations/{organizationId}/compute/application/deployments/{deploymentId}" + + action = { + "resource": resource, + "operation": "action", + } + return action + def createOrganizationConfigTemplate(self, organizationId: str, name: str, **kwargs): """ **Create a new configuration template** @@ -2975,33 +3054,6 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): } return action - def enrollOrganizationSaseSites(self, organizationId: str, **kwargs): - """ - **Enroll sites in this organization to Secure Access. For an organization, a maximum of 2500 sites can be enrolled if they are in spoke mode or a maximum of 10 sites can be enrolled in hub mode.** - https://developer.cisco.com/meraki/api-v1/#!enroll-organization-sase-sites - - - organizationId (string): Organization ID - - items (array): List of Meraki SD-WAN sites with the associated regions to be enrolled. - - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret - """ - - kwargs.update(locals()) - - organizationId = urllib.parse.quote(organizationId, safe="") - resource = f"/organizations/{organizationId}/sase/sites/enroll" - - body_params = [ - "items", - "callback", - ] - 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 updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs): """ **Update the configuration for a site. Currently, only supports updating default route enablement.** diff --git a/meraki/api/batch/switch.py b/meraki/api/batch/switch.py index f27d9fa6..f69cd322 100644 --- a/meraki/api/batch/switch.py +++ b/meraki/api/batch/switch.py @@ -1433,13 +1433,13 @@ def updateNetworkSwitchSpanningTree(self, networkId: str, **kwargs): def updateNetworkSwitchStack(self, networkId: str, switchStackId: str, **kwargs): """ - **Update a switch stack** + **Update a switch stack. At least one of 'name' or 'members' must be provided. If 'members' is provided, it replaces the entire stack membership.** https://developer.cisco.com/meraki/api-v1/#!update-network-switch-stack - networkId (string): Network ID - switchStackId (string): Switch stack ID - - name (string): The name of the stack - - members (array): The list of switches that should be in the stack + - name (string): The name of the switch stack + - members (array): The complete list of switches that should be in the stack. Minimum 2 and maximum 8 members. Omitting this field leaves stack membership unchanged. """ kwargs.update(locals()) diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index f15cdfdc..73619214 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -1350,18 +1350,29 @@ def getOrganizationApiPushTopics(self, organizationId: str): return self._session.get(metadata, resource) - def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwargs): + def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ - **List pipeline IDs for the organization, with optional status and timespan filtering** + **List pipelines with operation and status metadata, sorted by pipeline ID** https://developer.cisco.com/meraki/api-v1/#!get-organization-api-rest-provisioning-pipelines - organizationId (string): Organization ID - - status (string): If provided, filters pipelines by status. If omitted, pipelines of all statuses are returned. + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - sortOrder (string): Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'descending'. + - status (string): If provided, filters pipelines by status. If omitted, pipelines of all statuses are returned. `pending` pipelines have not started, `active` pipelines have started but not finished, `success` pipelines completed successfully, and `error` pipelines failed. - timespan (integer): Created-at lookback for matching pipelines, in seconds. Defaults to 7200 seconds. The maximum is 30 days. """ kwargs.update(locals()) + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) if "status" in kwargs: options = ["active", "error", "pending", "success"] assert kwargs["status"] in options, ( @@ -1376,6 +1387,10 @@ def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwa resource = f"/organizations/{organizationId}/api/rest/provisioning/pipelines" query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "sortOrder", "status", "timespan", ] @@ -1389,7 +1404,7 @@ def getOrganizationApiRestProvisioningPipelines(self, organizationId: str, **kwa f"getOrganizationApiRestProvisioningPipelines: ignoring unrecognized kwargs: {invalid}" ) - return self._session.get(metadata, resource, params) + return self._session.get_pages(metadata, resource, params, total_pages, direction) def getOrganizationApiRestProvisioningPipelinesJobs(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ @@ -2371,9 +2386,10 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s - organizationId (string): Organization ID - networkId (string): Network ID to query. - - serials (array): A list of serials of AP devices + - serials (array): A list of serials of wireless AP or wired switch devices - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. - ssidNumbers (array): Filter results by SSID number + - deviceType (string): Filter connected client counts by device type. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 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 7 days. The default is 8 hours. If interval is provided, the timespan will be autocalculated. @@ -2382,6 +2398,12 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s kwargs.update(locals()) + if "deviceType" in kwargs: + options = ["access_point", "switch"] + assert kwargs["deviceType"] in options, ( + f'''"deviceType" cannot be "{kwargs["deviceType"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["organizations", "monitor", "clients", "connectedCountHistory"], "operation": "getOrganizationAssuranceClientsConnectedCountHistory", @@ -2394,6 +2416,7 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s "serials", "bands", "ssidNumbers", + "deviceType", "t0", "t1", "timespan", @@ -4546,6 +4569,208 @@ def getOrganizationCloudConnectivityRequirements(self, organizationId: str): return self._session.get(metadata, resource) + def getOrganizationComputeApplicationDeployments(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **List the Application Deployment agent configurations for all hosts under this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-compute-application-deployments + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - developerNames (array): Filters deployments by application developer name + - applicationNames (array): Filters deployments by application name + - enabled (boolean): Filters deployments by their enabled status + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "compute", "application", "deployments"], + "operation": "getOrganizationComputeApplicationDeployments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/compute/application/deployments" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "developerNames", + "applicationNames", + "enabled", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "developerNames", + "applicationNames", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationComputeApplicationDeployments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createOrganizationComputeApplicationDeploymentsBulkCreate( + self, organizationId: str, hosts: list, application: dict, enabled: bool, **kwargs + ): + """ + **Add Application Deployment agents for a list of hosts** + https://developer.cisco.com/meraki/api-v1/#!create-organization-compute-application-deployments-bulk-create + + - organizationId (string): Organization ID + - hosts (array): List of hosts to deploy applications on + - application (object): Application information + - enabled (boolean): Whether the deployment should be enabled + - applicationConfiguration (object): Optional: Generic object for application-specific configuration + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "compute", "application", "deployments", "bulkCreate"], + "operation": "createOrganizationComputeApplicationDeploymentsBulkCreate", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/compute/application/deployments/bulkCreate" + + body_params = [ + "hosts", + "application", + "enabled", + "applicationConfiguration", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationComputeApplicationDeploymentsBulkCreate: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationComputeApplicationDeployment(self, organizationId: str, deploymentId: str, enabled: bool, **kwargs): + """ + **Update a Deployment agent configuration** + https://developer.cisco.com/meraki/api-v1/#!update-organization-compute-application-deployment + + - organizationId (string): Organization ID + - deploymentId (string): Deployment ID + - enabled (boolean): Whether or not the Application Deployment agent is enabled for the host. + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "compute", "application", "deployments"], + "operation": "updateOrganizationComputeApplicationDeployment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + deploymentId = urllib.parse.quote(str(deploymentId), safe="") + resource = f"/organizations/{organizationId}/compute/application/deployments/{deploymentId}" + + body_params = [ + "enabled", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationComputeApplicationDeployment: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationComputeApplicationDeployment(self, organizationId: str, deploymentId: str): + """ + **Delete a Application Deployment agent from the host** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-compute-application-deployment + + - organizationId (string): Organization ID + - deploymentId (string): Deployment ID + """ + + metadata = { + "tags": ["organizations", "configure", "compute", "application", "deployments"], + "operation": "deleteOrganizationComputeApplicationDeployment", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + deploymentId = urllib.parse.quote(str(deploymentId), safe="") + resource = f"/organizations/{organizationId}/compute/application/deployments/{deploymentId}" + + return self._session.delete(metadata, resource) + + def getOrganizationComputeHosts( + self, organizationId: str, developerName: str, applicationName: str, total_pages=1, direction="next", **kwargs + ): + """ + **Retrieves a list of compute hosts eligible for application deployment within a given organization, filtered by the specified application developer and application name, with optional network ID filtering.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-compute-hosts + + - organizationId (string): Organization ID + - developerName (string): Filters hosts by application developer name + - applicationName (string): Filters hosts by application name + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. + - 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. + - networkIds (array): Filters hosts by the network ID they belong to + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "compute", "hosts"], + "operation": "getOrganizationComputeHosts", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/compute/hosts" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "developerName", + "applicationName", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getOrganizationComputeHosts: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationConfigTemplates(self, organizationId: str): """ **List the configuration templates for this organization** @@ -11456,39 +11681,6 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): return self._session.delete(metadata, resource) - def enrollOrganizationSaseSites(self, organizationId: str, **kwargs): - """ - **Enroll sites in this organization to Secure Access** - https://developer.cisco.com/meraki/api-v1/#!enroll-organization-sase-sites - - - organizationId (string): Organization ID - - items (array): List of Meraki SD-WAN sites with the associated regions to be enrolled. - - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret - """ - - kwargs.update(locals()) - - metadata = { - "tags": ["organizations", "configure", "sase", "sites"], - "operation": "enrollOrganizationSaseSites", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/sase/sites/enroll" - - body_params = [ - "items", - "callback", - ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} - - if self._session._validate_kwargs: - all_params = [] + body_params - invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] - if invalid and self._session._logger: - self._session._logger.warning(f"enrollOrganizationSaseSites: ignoring unrecognized kwargs: {invalid}") - - return self._session.post(metadata, resource, payload) - def updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs): """ **Update the configuration for a site** diff --git a/meraki/api/switch.py b/meraki/api/switch.py index ca432ea7..327f942b 100644 --- a/meraki/api/switch.py +++ b/meraki/api/switch.py @@ -2553,8 +2553,8 @@ def updateNetworkSwitchStack(self, networkId: str, switchStackId: str, **kwargs) - networkId (string): Network ID - switchStackId (string): Switch stack ID - - name (string): The name of the stack - - members (array): The list of switches that should be in the stack + - name (string): The name of the switch stack + - members (array): The complete list of switches that should be in the stack. Minimum 2 and maximum 8 members. Omitting this field leaves stack membership unchanged. """ kwargs.update(locals()) diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index 79d1bdd6..c4c50887 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -4630,6 +4630,7 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. + - insights (string): Insights version to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -4645,6 +4646,11 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) + if "insights" in kwargs: + options = ["1", "2"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) metadata = { "tags": ["wireless", "configure", "experience", "channelAvailability", "insights", "byNetwork"], @@ -4660,6 +4666,7 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo "bands", "contributor", "subContributor", + "insights", "t0", "t1", "timespan", @@ -5317,6 +5324,8 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. + - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. + - insights (string): Insights version to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5332,6 +5341,11 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) + if "insights" in kwargs: + options = ["1", "2"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) metadata = { "tags": ["wireless", "configure", "experience", "coverage", "insights", "byNetwork"], @@ -5346,6 +5360,8 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( "ssidNumbers", "bands", "contributor", + "subContributor", + "insights", "t0", "t1", "timespan", diff --git a/meraki/rest_session.py b/meraki/rest_session.py index 889f6693..0832410e 100644 --- a/meraki/rest_session.py +++ b/meraki/rest_session.py @@ -306,11 +306,19 @@ def request(self, metadata, method, url, **kwargs): raise APIError(metadata, response) # Handle 5xx errors case status if 500 <= status: + request_id = response.headers.get("X-Request-Id") or "none" if self._logger: - self._logger.warning(f"{tag}, {operation} - {status} {reason}, retrying in 1 second") + self._logger.warning( + f"{tag}, {operation} - {status} {reason} (X-Request-Id: {request_id}), retrying in 1 second" + ) time.sleep(1) retries -= 1 if retries == 0: + if self._logger: + self._logger.error( + f"{tag}, {operation} - {status} {reason} failed after retries. " + f"Provide this X-Request-Id to Meraki for log lookup: {request_id}" + ) raise APIError(metadata, response) # Handle other 4xx errors case status if status != 429 and 400 <= status < 500: diff --git a/pyproject.toml b/pyproject.toml index 208afb54..d4ac457b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "3.2.0b2" +version = "3.2.0b3" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index c02870a8..276428e5 100644 --- a/uv.lock +++ b/uv.lock @@ -549,7 +549,7 @@ wheels = [ [[package]] name = "meraki" -version = "3.2.0b2" +version = "3.2.0b3" source = { editable = "." } dependencies = [ { name = "aiohttp" }, From 5e5c39cf1e7780779dba305f34546e6ef2950675 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 15:37:43 +0000 Subject: [PATCH 45/60] chore(deps-dev): bump ruff from 0.15.18 to 0.15.19 in the all-deps group (#431) Bumps the all-deps group with 1 update: [ruff](https://github.com/astral-sh/ruff). Updates `ruff` from 0.15.18 to 0.15.19 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.18...0.15.19) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.19 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/uv.lock b/uv.lock index 276428e5..58768ca0 100644 --- a/uv.lock +++ b/uv.lock @@ -961,27 +961,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.18" +version = "0.15.19" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/74/98/1295ad5a5aa9bc85bdcdfa5d82fe7b49c61af5657df4f227637ff9de0da6/ruff-0.15.18.tar.gz", hash = "sha256:2698a964c70e8bf402dcb99c8810472d270d141e7aa8c4e13599fd52033a2f33", size = 4761437, upload-time = "2026-06-18T18:25:39.224Z" } +sdist = { url = "https://files.pythonhosted.org/packages/d5/e6/15800dfde183a1a106594016c912b4c12d050a301989d1aca6cb63759fe8/ruff-0.15.19.tar.gz", hash = "sha256:edc27f7172a93b32b102687009d6a588508815072141543ae603a8b9b0823063", size = 4772071, upload-time = "2026-06-24T01:10:46.942Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b9/d0/686e984941269621e2be72612d5c1e461f8f7b38415a2a7d7a81c8ae6715/ruff-0.15.18-py3-none-linux_armv6l.whl", hash = "sha256:8b6850172348c8381b8b3084c5915a4393c2373b9b54cd5b5e1ea15812bc10df", size = 10887308, upload-time = "2026-06-18T18:25:03.062Z" }, - { url = "https://files.pythonhosted.org/packages/ed/21/bc4123e3f5515ee99f8ce1eb93a14a0628fe4d1678663cd08f933ac16931/ruff-0.15.18-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:3fccc153a85417dcd976883160cacce486997b0a0058dd18f54b8aaaac7d1ce2", size = 11281305, upload-time = "2026-06-18T18:25:30.026Z" }, - { url = "https://files.pythonhosted.org/packages/51/93/4769464c25cf7ab2acb3c7dda9cad3d867eb41c59565b3e2a9d17249c90c/ruff-0.15.18-py3-none-macosx_11_0_arm64.whl", hash = "sha256:08d4c86a68f2c3ec2c9d56380a71fb4a4f65373055cbb8caabd645e9102f38d4", size = 10641215, upload-time = "2026-06-18T18:25:15.802Z" }, - { url = "https://files.pythonhosted.org/packages/6c/42/56926d17120db2c208d76bf60a1a019644dd9e91dc27f0f95c9caddb1366/ruff-0.15.18-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37e5108745c2c0705da916d7d4de533ddf547051ef45f62888c31bae73f66318", size = 10957224, upload-time = "2026-06-18T18:25:36.955Z" }, - { url = "https://files.pythonhosted.org/packages/22/4f/d43fab8d8189afde803103022d000a8ef9f230616d436d52a8b2b8d63b50/ruff-0.15.18-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:56949a6ce8b3abde54c0bcb22cebfe57e8771cadc84b407ae8b8eaf67ebdcd43", size = 10699024, upload-time = "2026-06-18T18:25:05.707Z" }, - { url = "https://files.pythonhosted.org/packages/63/42/1e3e4c68bd408b9768cf3e439acbe2c78245225faef253f7028a0cdb63e0/ruff-0.15.18-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01a754cd6a1b630d3f97e33eb452cf7a98040482318e870f8bc52a5a30e62657", size = 11491458, upload-time = "2026-06-18T18:25:20.275Z" }, - { url = "https://files.pythonhosted.org/packages/20/77/47a3484bea8521e14a203d98c389c5c97846675e4f02734672da4a69b52a/ruff-0.15.18-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6ba7a07e03a44dbf10bb086ee06705b173625014ec99f73a7e6836a5e5590a0c", size = 12383752, upload-time = "2026-06-18T18:25:22.535Z" }, - { url = "https://files.pythonhosted.org/packages/0a/ca/054159590787023d83b658a1a1819c4c8910114e7015069340b71c0961cb/ruff-0.15.18-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a2c40a41a4cadbcf5897b548ab29dfe248b20c540961c0247d98a3973c70403", size = 11577923, upload-time = "2026-06-18T18:25:10.702Z" }, - { url = "https://files.pythonhosted.org/packages/6d/ff/d353d6b7bbd73cc0ec37f4463d7540e45e894338abdd9964eee0de332708/ruff-0.15.18-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f0480ce690cbb6c4db6e5d08f19fce98e10ba131a8b60c1bcdac42771e3ae2d", size = 11583925, upload-time = "2026-06-18T18:25:32.391Z" }, - { url = "https://files.pythonhosted.org/packages/c1/4a/891f89b9c296ed3e5f3ece1a5629badc989d9a8fdaa30431aaf4774bc1c2/ruff-0.15.18-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:2330215f1f393fa8733f55edce04fcf94c36a2c460fcde31f78cc84e4951e9b1", size = 11582834, upload-time = "2026-06-18T18:25:27.309Z" }, - { url = "https://files.pythonhosted.org/packages/32/a3/ed9e370154bf85de360b93c03026157f02d4943b2d01ff4945f4429f8e8a/ruff-0.15.18-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a6aa6a3d979e48ae617578183674bf264fbe7d0114a796a26bd678d67963c7ff", size = 10927328, upload-time = "2026-06-18T18:25:34.676Z" }, - { url = "https://files.pythonhosted.org/packages/f5/d1/5cf5909329fedb5d39d555ee818ba5cf4638e1a301b89785d34f2905bfcb/ruff-0.15.18-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a81beadbbff2c9c245561ae3f77b16709d87f35eec650d0501679239d3449b22", size = 10693187, upload-time = "2026-06-18T18:25:08.245Z" }, - { url = "https://files.pythonhosted.org/packages/fd/44/ff6c635cf2c4f4e7b618b6640da057376baa36014695487d88aed4794268/ruff-0.15.18-py3-none-musllinux_1_2_i686.whl", hash = "sha256:2186d9e940ae332ab293623a75b5f4fe49565f449954d50a72a046683aa6b809", size = 11208721, upload-time = "2026-06-18T18:25:41.327Z" }, - { url = "https://files.pythonhosted.org/packages/88/d9/5baa2a30861adfb7022cf33c1e35b2fc18085b08c16f83eff4c7b99a5f48/ruff-0.15.18-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5c2abf140438032bc77b2284a6c9944ecd8a19e5f1c7b52b1b8e4a0a80d19a7a", size = 11678599, upload-time = "2026-06-18T18:25:13.607Z" }, - { url = "https://files.pythonhosted.org/packages/c3/1a/0725a7cfdc32ff769efb96ee782bec882e16448c5d9e3be947ec4c04ce27/ruff-0.15.18-py3-none-win32.whl", hash = "sha256:02299e6e9fa5b297a3f6d5d10d7bcd655c925b028bb8b9d4588214549c6b9ec4", size = 10901903, upload-time = "2026-06-18T18:25:24.755Z" }, - { url = "https://files.pythonhosted.org/packages/f3/51/805d9f6fb7970505c3504794a5ec350f605361b807fef4dcf214ebd35e72/ruff-0.15.18-py3-none-win_amd64.whl", hash = "sha256:dac80dc8d26b2257dbefabed62f5d255c3937b4ccb122da1fc634794fa3578b3", size = 12041189, upload-time = "2026-06-18T18:25:17.915Z" }, - { url = "https://files.pythonhosted.org/packages/29/4c/67bb45e41609eb4726f1bfeb59e083cf91d14c696d4bd14c234a980be93d/ruff-0.15.18-py3-none-win_arm64.whl", hash = "sha256:b2c9257fcbd4a3e5b977a1904e6facca016bafe2edc17df24db67cfaee03b4e4", size = 11329958, upload-time = "2026-06-18T18:25:43.686Z" }, + { url = "https://files.pythonhosted.org/packages/88/4c/9ded7626c39a0440c575bf69e2bf500d443388272c842662c59852ee7fcd/ruff-0.15.19-py3-none-linux_armv6l.whl", hash = "sha256:922d1eb283161564759bd49f507e91dc6112c15da8bd5b84ed714e086243cf86", size = 10950859, upload-time = "2026-06-24T01:10:38.491Z" }, + { url = "https://files.pythonhosted.org/packages/fb/ef/c211505ece1d00ef493d58e54e3b6383c946a21e9874774eb531f2512cf3/ruff-0.15.19-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:4d190d8f62a0b94aba8f721116538a9ee29b1e74d26650846ba9b99f0ae21c40", size = 11294529, upload-time = "2026-06-24T01:10:36.481Z" }, + { url = "https://files.pythonhosted.org/packages/fe/93/78d462e7d39968e58094dc57be7d09ffb14ce37da5b68ed70338a35a1f21/ruff-0.15.19-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5a2c86ba6870dd415a9d9eb8be94d7924ebec6a26ffc7958ec7ca29d4bff967d", size = 10641416, upload-time = "2026-06-24T01:10:48.923Z" }, + { url = "https://files.pythonhosted.org/packages/76/c4/5cb66cfd1f865d5cca908b86c93ac785e7f572193d3c7426079ca6643e24/ruff-0.15.19-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82b432bc087264aea70fd25ac198918b70bd9e2aa0db4297b0bb91bbfbbc63ce", size = 11015582, upload-time = "2026-06-24T01:10:30.089Z" }, + { url = "https://files.pythonhosted.org/packages/51/9f/8ecfaec10cf5eecd28fbc00ff4fb867db90a1be54bf3d39ebf93f893cd52/ruff-0.15.19-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8530a09d03b3a8c994f8b559a7dcdabc690bcd3f78ef276c38c83166798ebf56", size = 10744059, upload-time = "2026-06-24T01:10:32.48Z" }, + { url = "https://files.pythonhosted.org/packages/35/6b/983249d04562bc2d590edd75f32455cdb473affb3ba4bc8d883e939c697d/ruff-0.15.19-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87bf21fb3875fe69f0eacc825411657e2e85589cce633c35c0adf1113649c62b", size = 11568461, upload-time = "2026-06-24T01:10:17.435Z" }, + { url = "https://files.pythonhosted.org/packages/eb/39/bc7794f127b18f492a3b4ee82bba5a900c985ff13b72b46f46e3c171ba34/ruff-0.15.19-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f9b229cb3ef56ecc2c1c8ebeca64b7a7740ccaef40a9eb097e78dde5a8560b83", size = 12429690, upload-time = "2026-06-24T01:10:40.638Z" }, + { url = "https://files.pythonhosted.org/packages/0a/3b/0de6859e698ed11c8a49e765196c8d333599b6a546c0715df39b6ba1aa2e/ruff-0.15.19-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6c754515be7b76afe6e7e62df7776709571bcfc1631183828afcf3bafa869e3", size = 11693067, upload-time = "2026-06-24T01:10:25.681Z" }, + { url = "https://files.pythonhosted.org/packages/89/3d/0b1f30f84bee9ae6ae8d349c2ba8b6f4b040966744efdd3acc804ae7c024/ruff-0.15.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6a498f82e0f4d8904c4e0aea5139cdfac1f39d19a3c51d491292f63a36e83b2e", size = 11616911, upload-time = "2026-06-24T01:10:44.809Z" }, + { url = "https://files.pythonhosted.org/packages/4d/eb/c90bd3dfc12eed9032c2c1bfe05105b93a1b2c8bce555db6308315b853ce/ruff-0.15.19-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:d48caa34488fb521fd0ef4aea2b0e8fe758298df044138f0d67b687a6a0d07ed", size = 11649343, upload-time = "2026-06-24T01:10:23.472Z" }, + { url = "https://files.pythonhosted.org/packages/82/91/01caa13602a2f12fae5edbe8caf78b3c1e6db1293132aee6959eecce095c/ruff-0.15.19-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4171b6613effa9363cd46dd4f75bd1827b6d1b946b5e278ed0c600d305379445", size = 10977610, upload-time = "2026-06-24T01:10:50.892Z" }, + { url = "https://files.pythonhosted.org/packages/3c/51/acb817922feab9ecbb3201377d4dbe7a25f1395e46545820061973f03468/ruff-0.15.19-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:27c15b2a241dd4d995557949a094fe78b8ad99122a38ccae1595849bcc947b3f", size = 10744900, upload-time = "2026-06-24T01:10:42.726Z" }, + { url = "https://files.pythonhosted.org/packages/84/bc/5c8ca46b8a7a3f2b16cfbec88721d772b1c93912904e8f8c2e49470fea63/ruff-0.15.19-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ed03b7862d68f0a8771d50ee129980cbf1b113f96e250b73954bc292f689e0bb", size = 11293560, upload-time = "2026-06-24T01:10:21.262Z" }, + { url = "https://files.pythonhosted.org/packages/81/e0/4a888cbe4d5523b3f77a2b1fa043f46cfeba1b32eac35dcfadee0578fa8a/ruff-0.15.19-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:08143f0685ae278b30727ea72e90c61e5bd9c31b91aac4f5bb989538f73d24b8", size = 11696533, upload-time = "2026-06-24T01:10:53.046Z" }, + { url = "https://files.pythonhosted.org/packages/98/43/c34b2fcd79262a85161764a97aaca89c3e4f574340ab61430cefa2bdd2c1/ruff-0.15.19-py3-none-win32.whl", hash = "sha256:8f47f0f92952af2557212bb10cf3e695cd4cf28b2c6e42cdb18ec6c9ebfa19da", size = 10986299, upload-time = "2026-06-24T01:10:55.185Z" }, + { url = "https://files.pythonhosted.org/packages/22/e8/15fd23e02b2442b56b2026b455977bc3057aa34b26e6323d1e99e8531a9f/ruff-0.15.19-py3-none-win_amd64.whl", hash = "sha256:efeca47ee3f9d4a7162655a3b8e6ee4a878646044233978d4d2c1ff8cdd914f0", size = 12123473, upload-time = "2026-06-24T01:10:27.74Z" }, + { url = "https://files.pythonhosted.org/packages/30/66/9a73695e31eaee04f35d8475998bf8ab354465f9c638936d76111603dcc5/ruff-0.15.19-py3-none-win_arm64.whl", hash = "sha256:6c6b607466e47349332eb1d9be52fb1467423fc07c217341af41cd0f3f0573be", size = 11376779, upload-time = "2026-06-24T01:10:34.465Z" }, ] [[package]] From 89976db9e7d3a5b66efa99a8339fd161c3303b71 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jun 2026 15:37:21 +0000 Subject: [PATCH 46/60] chore(deps-dev): bump ruff from 0.15.19 to 0.15.20 in the all-deps group (#433) Bumps the all-deps group with 1 update: [ruff](https://github.com/astral-sh/ruff). Updates `ruff` from 0.15.19 to 0.15.20 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.19...0.15.20) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.20 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/uv.lock b/uv.lock index 58768ca0..336eda5c 100644 --- a/uv.lock +++ b/uv.lock @@ -961,27 +961,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.19" +version = "0.15.20" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d5/e6/15800dfde183a1a106594016c912b4c12d050a301989d1aca6cb63759fe8/ruff-0.15.19.tar.gz", hash = "sha256:edc27f7172a93b32b102687009d6a588508815072141543ae603a8b9b0823063", size = 4772071, upload-time = "2026-06-24T01:10:46.942Z" } +sdist = { url = "https://files.pythonhosted.org/packages/43/dc/35b341fc554ba02f217fc10da57d1a75168cfbcf75b0ef2202176d4c4f2d/ruff-0.15.20.tar.gz", hash = "sha256:1416eb04349192646b54de98f146c4f59afe37d0decfc02c3cbbf396f3a28566", size = 4755489, upload-time = "2026-06-25T17:20:37.578Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/88/4c/9ded7626c39a0440c575bf69e2bf500d443388272c842662c59852ee7fcd/ruff-0.15.19-py3-none-linux_armv6l.whl", hash = "sha256:922d1eb283161564759bd49f507e91dc6112c15da8bd5b84ed714e086243cf86", size = 10950859, upload-time = "2026-06-24T01:10:38.491Z" }, - { url = "https://files.pythonhosted.org/packages/fb/ef/c211505ece1d00ef493d58e54e3b6383c946a21e9874774eb531f2512cf3/ruff-0.15.19-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:4d190d8f62a0b94aba8f721116538a9ee29b1e74d26650846ba9b99f0ae21c40", size = 11294529, upload-time = "2026-06-24T01:10:36.481Z" }, - { url = "https://files.pythonhosted.org/packages/fe/93/78d462e7d39968e58094dc57be7d09ffb14ce37da5b68ed70338a35a1f21/ruff-0.15.19-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5a2c86ba6870dd415a9d9eb8be94d7924ebec6a26ffc7958ec7ca29d4bff967d", size = 10641416, upload-time = "2026-06-24T01:10:48.923Z" }, - { url = "https://files.pythonhosted.org/packages/76/c4/5cb66cfd1f865d5cca908b86c93ac785e7f572193d3c7426079ca6643e24/ruff-0.15.19-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82b432bc087264aea70fd25ac198918b70bd9e2aa0db4297b0bb91bbfbbc63ce", size = 11015582, upload-time = "2026-06-24T01:10:30.089Z" }, - { url = "https://files.pythonhosted.org/packages/51/9f/8ecfaec10cf5eecd28fbc00ff4fb867db90a1be54bf3d39ebf93f893cd52/ruff-0.15.19-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8530a09d03b3a8c994f8b559a7dcdabc690bcd3f78ef276c38c83166798ebf56", size = 10744059, upload-time = "2026-06-24T01:10:32.48Z" }, - { url = "https://files.pythonhosted.org/packages/35/6b/983249d04562bc2d590edd75f32455cdb473affb3ba4bc8d883e939c697d/ruff-0.15.19-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87bf21fb3875fe69f0eacc825411657e2e85589cce633c35c0adf1113649c62b", size = 11568461, upload-time = "2026-06-24T01:10:17.435Z" }, - { url = "https://files.pythonhosted.org/packages/eb/39/bc7794f127b18f492a3b4ee82bba5a900c985ff13b72b46f46e3c171ba34/ruff-0.15.19-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f9b229cb3ef56ecc2c1c8ebeca64b7a7740ccaef40a9eb097e78dde5a8560b83", size = 12429690, upload-time = "2026-06-24T01:10:40.638Z" }, - { url = "https://files.pythonhosted.org/packages/0a/3b/0de6859e698ed11c8a49e765196c8d333599b6a546c0715df39b6ba1aa2e/ruff-0.15.19-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6c754515be7b76afe6e7e62df7776709571bcfc1631183828afcf3bafa869e3", size = 11693067, upload-time = "2026-06-24T01:10:25.681Z" }, - { url = "https://files.pythonhosted.org/packages/89/3d/0b1f30f84bee9ae6ae8d349c2ba8b6f4b040966744efdd3acc804ae7c024/ruff-0.15.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6a498f82e0f4d8904c4e0aea5139cdfac1f39d19a3c51d491292f63a36e83b2e", size = 11616911, upload-time = "2026-06-24T01:10:44.809Z" }, - { url = "https://files.pythonhosted.org/packages/4d/eb/c90bd3dfc12eed9032c2c1bfe05105b93a1b2c8bce555db6308315b853ce/ruff-0.15.19-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:d48caa34488fb521fd0ef4aea2b0e8fe758298df044138f0d67b687a6a0d07ed", size = 11649343, upload-time = "2026-06-24T01:10:23.472Z" }, - { url = "https://files.pythonhosted.org/packages/82/91/01caa13602a2f12fae5edbe8caf78b3c1e6db1293132aee6959eecce095c/ruff-0.15.19-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4171b6613effa9363cd46dd4f75bd1827b6d1b946b5e278ed0c600d305379445", size = 10977610, upload-time = "2026-06-24T01:10:50.892Z" }, - { url = "https://files.pythonhosted.org/packages/3c/51/acb817922feab9ecbb3201377d4dbe7a25f1395e46545820061973f03468/ruff-0.15.19-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:27c15b2a241dd4d995557949a094fe78b8ad99122a38ccae1595849bcc947b3f", size = 10744900, upload-time = "2026-06-24T01:10:42.726Z" }, - { url = "https://files.pythonhosted.org/packages/84/bc/5c8ca46b8a7a3f2b16cfbec88721d772b1c93912904e8f8c2e49470fea63/ruff-0.15.19-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ed03b7862d68f0a8771d50ee129980cbf1b113f96e250b73954bc292f689e0bb", size = 11293560, upload-time = "2026-06-24T01:10:21.262Z" }, - { url = "https://files.pythonhosted.org/packages/81/e0/4a888cbe4d5523b3f77a2b1fa043f46cfeba1b32eac35dcfadee0578fa8a/ruff-0.15.19-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:08143f0685ae278b30727ea72e90c61e5bd9c31b91aac4f5bb989538f73d24b8", size = 11696533, upload-time = "2026-06-24T01:10:53.046Z" }, - { url = "https://files.pythonhosted.org/packages/98/43/c34b2fcd79262a85161764a97aaca89c3e4f574340ab61430cefa2bdd2c1/ruff-0.15.19-py3-none-win32.whl", hash = "sha256:8f47f0f92952af2557212bb10cf3e695cd4cf28b2c6e42cdb18ec6c9ebfa19da", size = 10986299, upload-time = "2026-06-24T01:10:55.185Z" }, - { url = "https://files.pythonhosted.org/packages/22/e8/15fd23e02b2442b56b2026b455977bc3057aa34b26e6323d1e99e8531a9f/ruff-0.15.19-py3-none-win_amd64.whl", hash = "sha256:efeca47ee3f9d4a7162655a3b8e6ee4a878646044233978d4d2c1ff8cdd914f0", size = 12123473, upload-time = "2026-06-24T01:10:27.74Z" }, - { url = "https://files.pythonhosted.org/packages/30/66/9a73695e31eaee04f35d8475998bf8ab354465f9c638936d76111603dcc5/ruff-0.15.19-py3-none-win_arm64.whl", hash = "sha256:6c6b607466e47349332eb1d9be52fb1467423fc07c217341af41cd0f3f0573be", size = 11376779, upload-time = "2026-06-24T01:10:34.465Z" }, + { url = "https://files.pythonhosted.org/packages/94/d9/2d5014f0253ba541d2061d9fa7193f48e941c8b21bb88a7ff9bbe0bd0596/ruff-0.15.20-py3-none-linux_armv6l.whl", hash = "sha256:00e188c53e499c3c1637f73c91dcf2fb56d576cab76ce1be50a27c4e80e37078", size = 10839665, upload-time = "2026-06-25T17:19:44.702Z" }, + { url = "https://files.pythonhosted.org/packages/c6/d3/ac1798ba64f670698867fcfc591d50e7e421bef137db564858f619a30fcf/ruff-0.15.20-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:9ebd1fd9b9c95fc0bd7b2761aebec1f030013d2e193a2901b224af68fe47251b", size = 11208649, upload-time = "2026-06-25T17:19:48.787Z" }, + { url = "https://files.pythonhosted.org/packages/47/47/d3ac899991202095dfcf3d5176be4272642be3cf981a2f1a30f72a2afb95/ruff-0.15.20-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c5b16cdd67ca108185cd36dce98c576350c03b1660a751de725fb049193a0632", size = 10622638, upload-time = "2026-06-25T17:19:51.354Z" }, + { url = "https://files.pythonhosted.org/packages/33/13/4e043fe30aa94d4ff5213a9881fc296d12960f5971b234a5263fdc225312/ruff-0.15.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3413bb3c3d2ca6a8208f1f4809cd2dca3c6de6d0b491c0e70847672bde6e6efd", size = 10984227, upload-time = "2026-06-25T17:19:54.044Z" }, + { url = "https://files.pythonhosted.org/packages/76/e6/92e7bf40388bc5800073b96564f56264f7e48bfd1a498f5ced6ae6d5a769/ruff-0.15.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bd7ec42b3bb3da066488db093308a69c4ac5ee6d2af333a86ba6e2eb2e7dd44b", size = 10622882, upload-time = "2026-06-25T17:19:57.037Z" }, + { url = "https://files.pythonhosted.org/packages/13/7a/43460be3f24495a3aa46d4b16873e2c4941b3b5f0b00cf88c03b7b94b339/ruff-0.15.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1a36ad0eb77fba9aabfb69ede54de6f376d04ac18ebea022847046d340a8267", size = 11474808, upload-time = "2026-06-25T17:20:00.357Z" }, + { url = "https://files.pythonhosted.org/packages/27/a0/f37077884873221c6b33b4ab49eb18f9f88e54a16a25a5bca59bef46dd66/ruff-0.15.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b6df3b1e4610432f0386dba04d853b5f08cbbc903410c6fcc02f620f05aff53c", size = 12293094, upload-time = "2026-06-25T17:20:03.446Z" }, + { url = "https://files.pythonhosted.org/packages/a6/74/165545b60256a9704c21ac0ec4a0d07933b320812f9584836c9f4aca4292/ruff-0.15.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e89f198a1ea6ef0d727c1cf16088bc91a6cb0ab947dedc966715691647186eae", size = 11526176, upload-time = "2026-06-25T17:20:06.301Z" }, + { url = "https://files.pythonhosted.org/packages/86/b1/a976a136d40ade83ce743578399865f57001003a409acadc0ecbb3051082/ruff-0.15.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309809086c2acb67624950a3c8133e80f32d0d3e27106c0cd60ff26657c9f24b", size = 11520767, upload-time = "2026-06-25T17:20:09.191Z" }, + { url = "https://files.pythonhosted.org/packages/19/0f/f032696cb01c9b54c0263fa393474d7758f1cdc021a01b04e3cbc2500999/ruff-0.15.20-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:2d2374caa2f2c2f9e2b7da0a50802cfb8b79f55a9b5e49379f564544fbf56487", size = 11500132, upload-time = "2026-06-25T17:20:13.602Z" }, + { url = "https://files.pythonhosted.org/packages/4b/f4/51b1a14bc69e8c224b15dab9cce8e99b425e0455d462caa2b3c9be2b6a8e/ruff-0.15.20-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a1ed17b65293e0c2f22fc387bc13198a5de94bf4429589b0ff6946b0feaf21a3", size = 10943828, upload-time = "2026-06-25T17:20:16.635Z" }, + { url = "https://files.pythonhosted.org/packages/71/4b/fe267640783cd02bf6c5cc290b1df1051be2ec294c678b5c15fe19e52343/ruff-0.15.20-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:f701305e66b38ea6c91882490eb73459796808e4c6362a1b765255e0cdcd4053", size = 10645418, upload-time = "2026-06-25T17:20:19.4Z" }, + { url = "https://files.pythonhosted.org/packages/b0/c0/a65aa4ec2f5e87a1df32dc3ec1fede434fe3dfd5cbcf3b503cafc676ab54/ruff-0.15.20-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5b9c0c367ad8e5d0d5b5b8537864c469a0a0e55417aadfbeca41fa61333be9f4", size = 11211770, upload-time = "2026-06-25T17:20:22.033Z" }, + { url = "https://files.pythonhosted.org/packages/5a/a4/0caa331d954ae2723d729d351c989cb4ca8b6077d5c6c2cb6de75e98c041/ruff-0.15.20-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:01cc00dd58f0df339d0e902219dd53990ea99996a0344e5d9cc8d45d5307e460", size = 11618698, upload-time = "2026-06-25T17:20:25.259Z" }, + { url = "https://files.pythonhosted.org/packages/10/9b/5f14927848d2fd4aa891fd88d883788c5a7baba561c7874732364045708c/ruff-0.15.20-py3-none-win32.whl", hash = "sha256:ed65ef510e43a137207e0f01cfcf998aeddb1aeeda5c9d35023e910284d7cf21", size = 10857322, upload-time = "2026-06-25T17:20:28.612Z" }, + { url = "https://files.pythonhosted.org/packages/fa/f0/fe47c501f9dea92a26d788ff98bb5d92ed4cb4c88792c5c88af6b697dc8e/ruff-0.15.20-py3-none-win_amd64.whl", hash = "sha256:a525c81c70fb0380344dd1d8745d8cc1c890b7fc94a58d5a07bd8eb9557b8415", size = 11993274, upload-time = "2026-06-25T17:20:31.871Z" }, + { url = "https://files.pythonhosted.org/packages/d7/2b/9555445e1201d92b3195f45cdb153a0b68f24e0a4273f6e3d5ab46e212bb/ruff-0.15.20-py3-none-win_arm64.whl", hash = "sha256:2f5b2a6d614e8700388806a14996c40fab2c47b819ef57d790a34878858ed9ca", size = 11343498, upload-time = "2026-06-25T17:20:35.03Z" }, ] [[package]] From 6efe60fb760a16a19f33b175b726d8d16087aa91 Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2026 15:12:03 +0000 Subject: [PATCH 47/60] Auto-generated library v3.3.0b0 for API v1.72.0-beta.0. (#436) Co-authored-by: GitHub Action --- docs/generation-report.md | 6 ++ meraki/__init__.py | 2 +- meraki/_version.py | 2 +- meraki/aio/api/appliance.py | 60 ++++++++++- meraki/aio/api/organizations.py | 141 ++++++++++++++++++++++++- meraki/aio/api/wireless.py | 166 +++++++++++++++++++++++++++++- meraki/api/appliance.py | 60 ++++++++++- meraki/api/batch/appliance.py | 8 +- meraki/api/batch/organizations.py | 3 - meraki/api/organizations.py | 141 ++++++++++++++++++++++++- meraki/api/wireless.py | 166 +++++++++++++++++++++++++++++- pyproject.toml | 2 +- uv.lock | 2 +- 13 files changed, 726 insertions(+), 33 deletions(-) diff --git a/docs/generation-report.md b/docs/generation-report.md index aa911585..6f79003a 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,11 @@ # Generation Report +## 2026-07-01 | Library v3.3.0b0 | API 1.72.0-beta.0 + + +No Python keyword parameter conflicts detected. + + ## 2026-06-24 | Library v3.2.0b3 | API 1.71.0-beta.3 diff --git a/meraki/__init__.py b/meraki/__init__.py index 69432ccd..638c5be8 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -52,7 +52,7 @@ from meraki._version import __version__ # noqa: F401 from datetime import datetime -__api_version__ = "1.71.0-beta.3" +__api_version__ = "1.72.0-beta.0" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index 4f543ac4..17196fdd 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "3.2.0b3" +__version__ = "3.3.0b0" diff --git a/meraki/aio/api/appliance.py b/meraki/aio/api/appliance.py index 7d7f83ed..d3dcfdb7 100644 --- a/meraki/aio/api/appliance.py +++ b/meraki/aio/api/appliance.py @@ -2896,7 +2896,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg - dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties. - adaptivePolicyGroupId (string): Adaptive policy group ID this VLAN is assigned to. - sgt (object): Security Group Tag settings for the VLAN. - - vrf (object): VRF configuration on the VLAN + - vrf (object): VRF configuration on the VLAN. - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -3054,7 +3054,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this VLAN is assigned to. - sgt (object): Security Group Tag settings for the VLAN. - - vrf (object): VRF configuration on the VLAN + - vrf (object): VRF configuration on the VLAN. - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -3163,11 +3163,11 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): - networkId (string): Network ID - enabled (boolean): Boolean value to enable or disable the BGP configuration. When BGP is enabled, the asNumber (ASN) will be autopopulated with the preconfigured ASN at other Hubs or a default value if there is no ASN configured. - - asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512. + - asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain and is only configurable for Auto VPN BGP networks. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512. - ibgpHoldTimer (integer): The iBGP holdtimer in seconds. The iBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240. - ipv6 (object): Settings for IPv6 configurations on the organization. - tunnelDownTermination (object): Settings for tunnel down termination on the organization. - - vpnAsNumber (integer): Network specific number of the Autonomous System to which the appliance belongs. + - vpnAsNumber (integer): Network specific number of the Autonomous System to which the appliance belongs. This field is only configurable for Independent BGP networks. - priorityRoute (string): Sets the priority route between eBGP and Auto VPN. - routerId (string): The router ID of the appliance - neighbors (array): List of BGP neighbors. This list replaces the existing set of neighbors. When absent, this field is not updated. @@ -4534,6 +4534,58 @@ def getOrganizationApplianceSecurityEvents(self, organizationId: str, total_page return self._session.get_pages(metadata, resource, params, total_pages, direction) + def httpsiOrganizationApplianceSecurity(self, organizationId: str): + """ + **Retrieve the HTTPS Inspection state for all security appliances in an organization.** + https://developer.cisco.com/meraki/api-v1/#!httpsi-organization-appliance-security + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["appliance", "configure", "security"], + "operation": "httpsiOrganizationApplianceSecurity", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/httpsi" + + return self._session.get(metadata, resource) + + def certificatesOrganizationApplianceSecurityHttpsi(self, organizationId: str, contents: str, serials: list, **kwargs): + """ + **Upload an HTTPS Inspection certificate to MX devices in the same organization** + https://developer.cisco.com/meraki/api-v1/#!certificates-organization-appliance-security-httpsi + + - organizationId (string): Organization ID + - contents (string): The private key and certificate used to inspect HTTPS traffic. The certificate must be in .pem format. + - serials (array): Serial numbers of the security appliances that will receive the new HTTPS certificate for HTTPS Inspection + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "security", "httpsi"], + "operation": "certificatesOrganizationApplianceSecurityHttpsi", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/httpsi/certificates" + + body_params = [ + "contents", + "serials", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"certificatesOrganizationApplianceSecurityHttpsi: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def getOrganizationApplianceSecurityIntrusion(self, organizationId: str): """ **Returns all supported intrusion settings for an organization** diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index bc8629ed..037fd5a9 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -3505,6 +3505,56 @@ def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByInter return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByServer(self, organizationId: str, **kwargs): + """ + **Summarizes wired connection successes and failures by server.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network-by-server + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "wired", "experience", "successfulConnections", "byNetwork", "byServer"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork/byServer" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByServer: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWorkflows(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **Return workflows filtered by organization ID, network ID, type, and category** @@ -7137,6 +7187,94 @@ def getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesSoftwareVersions(self, organizationId: str, releaseType: str, **kwargs): + """ + **List the available software upgrade versions for an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-software-versions + + - organizationId (string): Organization ID + - releaseType (string): Filter by release type + """ + + kwargs = locals() + + if "releaseType" in kwargs: + options = ["beta", "generallyAvailable", "recommended"] + assert kwargs["releaseType"] in options, ( + f'''"releaseType" cannot be "{kwargs["releaseType"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "devices", "software", "versions"], + "operation": "getOrganizationDevicesSoftwareVersions", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/software/versions" + + query_params = [ + "releaseType", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesSoftwareVersions: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationDevicesSoftwareVersionsChangelogs(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Provide changelogs for specified versions or, if unspecified, for all versions in the organization, including reference to the last and next versions.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-software-versions-changelogs + + - 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 + - versionIds (array): Array of version IDs for filtering + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 30. + - 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": ["organizations", "configure", "devices", "software", "versions", "changelogs"], + "operation": "getOrganizationDevicesSoftwareVersionsChangelogs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/software/versions/changelogs" + + query_params = [ + "versionIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "versionIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesSoftwareVersionsChangelogs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesStatuses(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the status of every Meraki device in the organization** @@ -11574,7 +11712,6 @@ def attachOrganizationSaseSites(self, organizationId: str, **kwargs): - organizationId (string): Organization ID - items (array): List of Meraki SD-WAN sites with the associated regions to be attached. - - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ kwargs.update(locals()) @@ -11588,7 +11725,6 @@ def attachOrganizationSaseSites(self, organizationId: str, **kwargs): body_params = [ "items", - "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -11667,7 +11803,6 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): - organizationId (string): Organization ID - items (array): List of Secure Access sites to be detached. - - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ kwargs.update(locals()) diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index 8085bb2d..756d9819 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -4630,7 +4630,7 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. + - insights (string): Insights version to use. Defaults to 2. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5325,7 +5325,7 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. + - insights (string): Insights version to use. Defaults to 2. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5549,6 +5549,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5559,6 +5560,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork", @@ -5571,6 +5578,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -5615,6 +5623,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5625,6 +5634,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byBand"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand", @@ -5637,6 +5652,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -5681,6 +5697,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5691,6 +5708,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byClient"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClient", @@ -5703,6 +5726,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -5747,6 +5771,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5757,6 +5782,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byClientOs"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientOs", @@ -5769,6 +5800,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -5813,6 +5845,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5823,6 +5856,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byClientType"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientType", @@ -5835,6 +5874,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -5879,6 +5919,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevic - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5889,6 +5930,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevic kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byDevice"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevice", @@ -5901,6 +5948,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevic "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -5945,6 +5993,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInter - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. @@ -5956,6 +6005,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInter kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "monitor", "experience", "successfulConnects", "byNetwork", "byInterval"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInterval", @@ -5968,6 +6023,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInter "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6013,6 +6069,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServe - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6023,6 +6080,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServe kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byServer"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServer", @@ -6035,6 +6098,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServe "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6079,6 +6143,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6089,6 +6154,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "bySsid"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid", @@ -6101,6 +6172,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6147,7 +6219,8 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. + - insights (string): Insights version to use. Defaults to 2. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6168,6 +6241,11 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor assert kwargs["insights"] in options, ( f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' ) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "insights", "byNetwork"], @@ -6184,6 +6262,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor "contributor", "subContributor", "insights", + "variant", "t0", "t1", "timespan", @@ -6228,6 +6307,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6238,6 +6318,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork", @@ -6250,6 +6336,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6294,6 +6381,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6304,6 +6392,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byBand"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand", @@ -6316,6 +6410,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6360,6 +6455,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6370,6 +6466,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byClient"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient", @@ -6382,6 +6484,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6426,6 +6529,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6436,6 +6540,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byClientOs"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs", @@ -6448,6 +6558,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6492,6 +6603,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6502,6 +6614,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byClientType"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType", @@ -6514,6 +6632,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6558,6 +6677,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6568,6 +6688,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byDevice"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice", @@ -6580,6 +6706,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6624,6 +6751,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. @@ -6635,6 +6763,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "monitor", "experience", "timeToConnect", "byNetwork", "byInterval"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval", @@ -6647,6 +6781,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6692,6 +6827,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6702,6 +6838,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byServer"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer", @@ -6714,6 +6856,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6758,6 +6901,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6768,6 +6912,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "bySsid"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid", @@ -6780,6 +6930,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6826,7 +6977,8 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. + - insights (string): Insights version to use. Defaults to 2. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6847,6 +6999,11 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( assert kwargs["insights"] in options, ( f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' ) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "insights", "byNetwork"], @@ -6863,6 +7020,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( "contributor", "subContributor", "insights", + "variant", "t0", "t1", "timespan", diff --git a/meraki/api/appliance.py b/meraki/api/appliance.py index fa7b1fdb..7b122133 100644 --- a/meraki/api/appliance.py +++ b/meraki/api/appliance.py @@ -2896,7 +2896,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg - dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties. - adaptivePolicyGroupId (string): Adaptive policy group ID this VLAN is assigned to. - sgt (object): Security Group Tag settings for the VLAN. - - vrf (object): VRF configuration on the VLAN + - vrf (object): VRF configuration on the VLAN. - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -3054,7 +3054,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this VLAN is assigned to. - sgt (object): Security Group Tag settings for the VLAN. - - vrf (object): VRF configuration on the VLAN + - vrf (object): VRF configuration on the VLAN. - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -3163,11 +3163,11 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): - networkId (string): Network ID - enabled (boolean): Boolean value to enable or disable the BGP configuration. When BGP is enabled, the asNumber (ASN) will be autopopulated with the preconfigured ASN at other Hubs or a default value if there is no ASN configured. - - asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512. + - asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain and is only configurable for Auto VPN BGP networks. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512. - ibgpHoldTimer (integer): The iBGP holdtimer in seconds. The iBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240. - ipv6 (object): Settings for IPv6 configurations on the organization. - tunnelDownTermination (object): Settings for tunnel down termination on the organization. - - vpnAsNumber (integer): Network specific number of the Autonomous System to which the appliance belongs. + - vpnAsNumber (integer): Network specific number of the Autonomous System to which the appliance belongs. This field is only configurable for Independent BGP networks. - priorityRoute (string): Sets the priority route between eBGP and Auto VPN. - routerId (string): The router ID of the appliance - neighbors (array): List of BGP neighbors. This list replaces the existing set of neighbors. When absent, this field is not updated. @@ -4534,6 +4534,58 @@ def getOrganizationApplianceSecurityEvents(self, organizationId: str, total_page return self._session.get_pages(metadata, resource, params, total_pages, direction) + def httpsiOrganizationApplianceSecurity(self, organizationId: str): + """ + **Retrieve the HTTPS Inspection state for all security appliances in an organization.** + https://developer.cisco.com/meraki/api-v1/#!httpsi-organization-appliance-security + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["appliance", "configure", "security"], + "operation": "httpsiOrganizationApplianceSecurity", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/httpsi" + + return self._session.get(metadata, resource) + + def certificatesOrganizationApplianceSecurityHttpsi(self, organizationId: str, contents: str, serials: list, **kwargs): + """ + **Upload an HTTPS Inspection certificate to MX devices in the same organization** + https://developer.cisco.com/meraki/api-v1/#!certificates-organization-appliance-security-httpsi + + - organizationId (string): Organization ID + - contents (string): The private key and certificate used to inspect HTTPS traffic. The certificate must be in .pem format. + - serials (array): Serial numbers of the security appliances that will receive the new HTTPS certificate for HTTPS Inspection + """ + + kwargs = locals() + + metadata = { + "tags": ["appliance", "configure", "security", "httpsi"], + "operation": "certificatesOrganizationApplianceSecurityHttpsi", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/security/httpsi/certificates" + + body_params = [ + "contents", + "serials", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"certificatesOrganizationApplianceSecurityHttpsi: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def getOrganizationApplianceSecurityIntrusion(self, organizationId: str): """ **Returns all supported intrusion settings for an organization** diff --git a/meraki/api/batch/appliance.py b/meraki/api/batch/appliance.py index ea27fc94..be960b51 100644 --- a/meraki/api/batch/appliance.py +++ b/meraki/api/batch/appliance.py @@ -1195,7 +1195,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg - dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties. - adaptivePolicyGroupId (string): Adaptive policy group ID this VLAN is assigned to. - sgt (object): Security Group Tag settings for the VLAN. - - vrf (object): VRF configuration on the VLAN + - vrf (object): VRF configuration on the VLAN. - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -1305,7 +1305,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): - mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this VLAN is assigned to. - sgt (object): Security Group Tag settings for the VLAN. - - vrf (object): VRF configuration on the VLAN + - vrf (object): VRF configuration on the VLAN. - uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions. """ @@ -1391,11 +1391,11 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): - networkId (string): Network ID - enabled (boolean): Boolean value to enable or disable the BGP configuration. When BGP is enabled, the asNumber (ASN) will be autopopulated with the preconfigured ASN at other Hubs or a default value if there is no ASN configured. - - asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512. + - asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain and is only configurable for Auto VPN BGP networks. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512. - ibgpHoldTimer (integer): The iBGP holdtimer in seconds. The iBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240. - ipv6 (object): Settings for IPv6 configurations on the organization. - tunnelDownTermination (object): Settings for tunnel down termination on the organization. - - vpnAsNumber (integer): Network specific number of the Autonomous System to which the appliance belongs. + - vpnAsNumber (integer): Network specific number of the Autonomous System to which the appliance belongs. This field is only configurable for Independent BGP networks. - priorityRoute (string): Sets the priority route between eBGP and Auto VPN. - routerId (string): The router ID of the appliance - neighbors (array): List of BGP neighbors. This list replaces the existing set of neighbors. When absent, this field is not updated. diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index e77db320..e3ec14e5 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -3013,7 +3013,6 @@ def attachOrganizationSaseSites(self, organizationId: str, **kwargs): - organizationId (string): Organization ID - items (array): List of Meraki SD-WAN sites with the associated regions to be attached. - - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ kwargs.update(locals()) @@ -3023,7 +3022,6 @@ def attachOrganizationSaseSites(self, organizationId: str, **kwargs): body_params = [ "items", - "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -3040,7 +3038,6 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): - organizationId (string): Organization ID - items (array): List of Secure Access sites to be detached. - - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ kwargs.update(locals()) diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index 73619214..f1cfa538 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -3505,6 +3505,56 @@ def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByInter return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByServer(self, organizationId: str, **kwargs): + """ + **Summarizes wired connection successes and failures by server.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-by-network-by-server + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "wired", "experience", "successfulConnections", "byNetwork", "byServer"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByServer", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/byNetwork/byServer" + + query_params = [ + "networkIds", + "serials", + "t0", + "t1", + "timespan", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serials", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByServer: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWorkflows(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **Return workflows filtered by organization ID, network ID, type, and category** @@ -7137,6 +7187,94 @@ def getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesSoftwareVersions(self, organizationId: str, releaseType: str, **kwargs): + """ + **List the available software upgrade versions for an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-software-versions + + - organizationId (string): Organization ID + - releaseType (string): Filter by release type + """ + + kwargs = locals() + + if "releaseType" in kwargs: + options = ["beta", "generallyAvailable", "recommended"] + assert kwargs["releaseType"] in options, ( + f'''"releaseType" cannot be "{kwargs["releaseType"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "configure", "devices", "software", "versions"], + "operation": "getOrganizationDevicesSoftwareVersions", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/software/versions" + + query_params = [ + "releaseType", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesSoftwareVersions: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + + def getOrganizationDevicesSoftwareVersionsChangelogs(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Provide changelogs for specified versions or, if unspecified, for all versions in the organization, including reference to the last and next versions.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-software-versions-changelogs + + - 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 + - versionIds (array): Array of version IDs for filtering + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 30. + - 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": ["organizations", "configure", "devices", "software", "versions", "changelogs"], + "operation": "getOrganizationDevicesSoftwareVersionsChangelogs", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/devices/software/versions/changelogs" + + query_params = [ + "versionIds", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "versionIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationDevicesSoftwareVersionsChangelogs: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationDevicesStatuses(self, organizationId: str, total_pages=1, direction="next", **kwargs): """ **List the status of every Meraki device in the organization** @@ -11574,7 +11712,6 @@ def attachOrganizationSaseSites(self, organizationId: str, **kwargs): - organizationId (string): Organization ID - items (array): List of Meraki SD-WAN sites with the associated regions to be attached. - - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ kwargs.update(locals()) @@ -11588,7 +11725,6 @@ def attachOrganizationSaseSites(self, organizationId: str, **kwargs): body_params = [ "items", - "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -11667,7 +11803,6 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): - organizationId (string): Organization ID - items (array): List of Secure Access sites to be detached. - - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ kwargs.update(locals()) diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index c4c50887..cc0c21d8 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -4630,7 +4630,7 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. + - insights (string): Insights version to use. Defaults to 2. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5325,7 +5325,7 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. + - insights (string): Insights version to use. Defaults to 2. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5549,6 +5549,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5559,6 +5560,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork", @@ -5571,6 +5578,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -5615,6 +5623,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5625,6 +5634,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byBand"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand", @@ -5637,6 +5652,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByBand( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -5681,6 +5697,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5691,6 +5708,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byClient"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClient", @@ -5703,6 +5726,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -5747,6 +5771,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5757,6 +5782,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byClientOs"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientOs", @@ -5769,6 +5800,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -5813,6 +5845,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5823,6 +5856,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byClientType"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClientType", @@ -5835,6 +5874,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByClien "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -5879,6 +5919,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevic - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5889,6 +5930,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevic kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byDevice"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevice", @@ -5901,6 +5948,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByDevic "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -5945,6 +5993,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInter - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. @@ -5956,6 +6005,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInter kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "monitor", "experience", "successfulConnects", "byNetwork", "byInterval"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInterval", @@ -5968,6 +6023,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByInter "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6013,6 +6069,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServe - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6023,6 +6080,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServe kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "byServer"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServer", @@ -6035,6 +6098,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkByServe "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6079,6 +6143,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6089,6 +6154,12 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "byNetwork", "bySsid"], "operation": "getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid", @@ -6101,6 +6172,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetworkBySsid( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6147,7 +6219,8 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. + - insights (string): Insights version to use. Defaults to 2. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6168,6 +6241,11 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor assert kwargs["insights"] in options, ( f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' ) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) metadata = { "tags": ["wireless", "configure", "experience", "successfulConnects", "insights", "byNetwork"], @@ -6184,6 +6262,7 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor "contributor", "subContributor", "insights", + "variant", "t0", "t1", "timespan", @@ -6228,6 +6307,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6238,6 +6318,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork", @@ -6250,6 +6336,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetwork( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6294,6 +6381,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6304,6 +6392,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byBand"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand", @@ -6316,6 +6410,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByBand( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6360,6 +6455,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6370,6 +6466,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byClient"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient", @@ -6382,6 +6484,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClient( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6426,6 +6529,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6436,6 +6540,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byClientOs"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs", @@ -6448,6 +6558,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientOs( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6492,6 +6603,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6502,6 +6614,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byClientType"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType", @@ -6514,6 +6632,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByClientType "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6558,6 +6677,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6568,6 +6688,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byDevice"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice", @@ -6580,6 +6706,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByDevice( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6624,6 +6751,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 2 hours. If interval is provided, the timespan will be autocalculated. @@ -6635,6 +6763,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "monitor", "experience", "timeToConnect", "byNetwork", "byInterval"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval", @@ -6647,6 +6781,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByInterval( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6692,6 +6827,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6702,6 +6838,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "byServer"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer", @@ -6714,6 +6856,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkByServer( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6758,6 +6901,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6768,6 +6912,12 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid( kwargs.update(locals()) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "byNetwork", "bySsid"], "operation": "getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid", @@ -6780,6 +6930,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectByNetworkBySsid( "serials", "ssidNumbers", "bands", + "variant", "t0", "t1", "timespan", @@ -6826,7 +6977,8 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. + - insights (string): Insights version to use. Defaults to 2. + - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -6847,6 +6999,11 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( assert kwargs["insights"] in options, ( f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' ) + if "variant" in kwargs: + options = ["A", "B"] + assert kwargs["variant"] in options, ( + f'''"variant" cannot be "{kwargs["variant"]}", & must be set to one of: {options}''' + ) metadata = { "tags": ["wireless", "configure", "experience", "timeToConnect", "insights", "byNetwork"], @@ -6863,6 +7020,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( "contributor", "subContributor", "insights", + "variant", "t0", "t1", "timespan", diff --git a/pyproject.toml b/pyproject.toml index d4ac457b..86edde73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "3.2.0b3" +version = "3.3.0b0" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index 336eda5c..cf6c2f82 100644 --- a/uv.lock +++ b/uv.lock @@ -549,7 +549,7 @@ wheels = [ [[package]] name = "meraki" -version = "3.2.0b3" +version = "3.3.0b0" source = { editable = "." } dependencies = [ { name = "aiohttp" }, From e21579fbd599e5bbb4392a679bdc8d78dc76bda6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 15:38:51 +0000 Subject: [PATCH 48/60] chore(deps-dev): bump responses in the all-deps group (#440) Bumps the all-deps group with 1 update: [responses](https://github.com/getsentry/responses). Updates `responses` from 0.26.1 to 0.26.2 - [Release notes](https://github.com/getsentry/responses/releases) - [Changelog](https://github.com/getsentry/responses/blob/master/CHANGES) - [Commits](https://github.com/getsentry/responses/compare/0.26.1...0.26.2) --- updated-dependencies: - dependency-name: responses dependency-version: 0.26.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uv.lock b/uv.lock index cf6c2f82..9f95c9e6 100644 --- a/uv.lock +++ b/uv.lock @@ -947,16 +947,16 @@ wheels = [ [[package]] name = "responses" -version = "0.26.1" +version = "0.26.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pyyaml" }, { name = "requests" }, { name = "urllib3" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c2/58/1fb6de3503428196df78638f991ec8095274f1ee9723e272ee4d9ff0092b/responses-0.26.1.tar.gz", hash = "sha256:2eb3218553cc8f79b57d257bac23af5e1bf381f5b9390b1767816f0843e01dc2", size = 83088, upload-time = "2026-05-21T19:56:39.747Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f0/1a/4af3e6d659394b809838490b144e4ab8d7ed3b9fecc7ca78f5d2f79b1a3d/responses-0.26.2.tar.gz", hash = "sha256:9c9259b46a8349197edebf43cfa68a87e1a2802ef503ff8b2fecbabc0b45afd8", size = 84030, upload-time = "2026-07-03T16:44:50.325Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3a/31/6a620b4427d546b9e7cca8b3b8c5f0559d9cef2bb9eedcda7f73c1473c19/responses-0.26.1-py3-none-any.whl", hash = "sha256:8aacc4586eb08fb2208ef64a9eb4258d9b0c6e6f4260845f2f018ab847495345", size = 35502, upload-time = "2026-05-21T19:56:38.046Z" }, + { url = "https://files.pythonhosted.org/packages/7c/28/693e1d9ebf72baa062ded80d837a035b86ce75eda5a269379e9e2b1008a8/responses-0.26.2-py3-none-any.whl", hash = "sha256:6fdfeabd58e5ec473b98dfe02e6d46d3173bd8dd573eff2ccccf1a05a5135364", size = 35609, upload-time = "2026-07-03T16:44:49.1Z" }, ] [[package]] From 027b54ba5c8a30f77081efd0116cfb73c0cd3607 Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Wed, 8 Jul 2026 14:56:25 +0000 Subject: [PATCH 49/60] Auto-generated library v3.3.0b1 for API v1.72.0-beta.1. (#442) Co-authored-by: GitHub Action --- docs/generation-report.md | 6 ++++ meraki/__init__.py | 2 +- meraki/_version.py | 2 +- meraki/aio/api/devices.py | 4 +++ meraki/aio/api/organizations.py | 50 ++++++++++++++++++++++++++++--- meraki/api/batch/organizations.py | 33 ++++++++++++++++++-- meraki/api/devices.py | 4 +++ meraki/api/organizations.py | 50 ++++++++++++++++++++++++++++--- pyproject.toml | 2 +- uv.lock | 2 +- 10 files changed, 141 insertions(+), 14 deletions(-) diff --git a/docs/generation-report.md b/docs/generation-report.md index 6f79003a..7ddfb0c3 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,11 @@ # Generation Report +## 2026-07-08 | Library v3.3.0b1 | API 1.72.0-beta.1 + + +No Python keyword parameter conflicts detected. + + ## 2026-07-01 | Library v3.3.0b0 | API 1.72.0-beta.0 diff --git a/meraki/__init__.py b/meraki/__init__.py index 638c5be8..fc6ca710 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -52,7 +52,7 @@ from meraki._version import __version__ # noqa: F401 from datetime import datetime -__api_version__ = "1.72.0-beta.0" +__api_version__ = "1.72.0-beta.1" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index 17196fdd..df5a0b7d 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "3.3.0b0" +__version__ = "3.3.0b1" diff --git a/meraki/aio/api/devices.py b/meraki/aio/api/devices.py index b89a8156..3e24199b 100644 --- a/meraki/aio/api/devices.py +++ b/meraki/aio/api/devices.py @@ -594,6 +594,7 @@ def createDeviceLiveToolsMacTable(self, serial: str, **kwargs): https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-mac-table - serial (string): Serial + - mac (string): Optional parameter to filter MAC table entries by MAC address. Must be a colon-delimited six-octet MAC address, for example '00:11:22:a0:b1:c2'. Matching is case-insensitive. - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ @@ -607,6 +608,7 @@ def createDeviceLiveToolsMacTable(self, serial: str, **kwargs): resource = f"/devices/{serial}/liveTools/macTable" body_params = [ + "mac", "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1054,6 +1056,7 @@ def createDeviceLiveToolsRoutingTable(self, serial: str, **kwargs): https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table - serial (string): Serial + - destination (object): Optional destination filter used to return routes containing the supplied destination. - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ @@ -1067,6 +1070,7 @@ def createDeviceLiveToolsRoutingTable(self, serial: str, **kwargs): resource = f"/devices/{serial}/liveTools/routingTable" body_params = [ + "destination", "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 037fd5a9..178a9e7d 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -7616,7 +7616,7 @@ def getOrganizationDevicesTopologyL2Links(self, organizationId: str, total_pages - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. Default is 500. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. """ @@ -7655,7 +7655,7 @@ def getOrganizationDevicesTopologyNodesDiscovered(self, organizationId: str, tot - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. Default is 500. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. """ @@ -9934,6 +9934,7 @@ def getOrganizationPoliciesGlobalFirewallRulesets(self, organizationId: str, tot - direction (string): direction to paginate, either "next" (default) or "prev" page - rulesetIds (array): Filter rulesets by IDs - name (string): Filter rulesets by name (partial match, case-insensitive). If multiple instances are provided, only the last one is used. + - excludedPolicyIds (array): Filter out rulesets that are associated with the specified policy IDs - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 100. - 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. @@ -9951,6 +9952,7 @@ def getOrganizationPoliciesGlobalFirewallRulesets(self, organizationId: str, tot query_params = [ "rulesetIds", "name", + "excludedPolicyIds", "perPage", "startingAfter", "endingBefore", @@ -9959,6 +9961,7 @@ def getOrganizationPoliciesGlobalFirewallRulesets(self, organizationId: str, tot array_params = [ "rulesetIds", + "excludedPolicyIds", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -10479,6 +10482,7 @@ def getOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignments( - rulesetIds (array): Filter assignments by ruleset IDs - policyIds (array): Filter assignments by policy IDs - assignmentIds (array): Filter assignments by assignment IDs + - staged (boolean): Filter assignments by whether or not they are staged - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 100. - 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. @@ -10497,6 +10501,7 @@ def getOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignments( "rulesetIds", "policyIds", "assignmentIds", + "staged", "perPage", "startingAfter", "endingBefore", @@ -10534,6 +10539,7 @@ def createOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( - rulesetId (string): ID of the ruleset to assign - policyId (string): ID of the policy to assign the ruleset to - priority (integer): Priority of the ruleset assignment (lower numbers = higher priority) + - staged (boolean): Stage an assignment without applying it immediately to the policy """ kwargs.update(locals()) @@ -10549,6 +10555,7 @@ def createOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( "rulesetId", "policyId", "priority", + "staged", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -10562,6 +10569,41 @@ def createOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( return self._session.post(metadata, resource, payload) + def commitOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignments( + self, organizationId: str, policy: dict, **kwargs + ): + """ + **Commit staged Organization-Wide Policy Ruleset Assignments** + https://developer.cisco.com/meraki/api-v1/#!commit-organization-policies-global-group-policies-firewall-rulesets-assignments + + - organizationId (string): Organization ID + - policy (object): Policy in which all staged rulesets will be committed + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "policies", "global", "group", "firewall", "rulesets", "assignments"], + "operation": "commitOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/policies/global/group/policies/firewall/rulesets/assignments/commit" + + body_params = [ + "policy", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"commitOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def updateOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( self, organizationId: str, assignmentId: str, **kwargs ): @@ -11705,7 +11747,7 @@ def getOrganizationSaseSites(self, organizationId: str, total_pages=1, direction return self._session.get_pages(metadata, resource, params, total_pages, direction) - def attachOrganizationSaseSites(self, organizationId: str, **kwargs): + def attachOrganizationSaseSites(self, organizationId: str, items: list, **kwargs): """ **Attach sites in this organization to Secure Access** https://developer.cisco.com/meraki/api-v1/#!attach-organization-sase-sites @@ -11714,7 +11756,7 @@ def attachOrganizationSaseSites(self, organizationId: str, **kwargs): - items (array): List of Meraki SD-WAN sites with the associated regions to be attached. """ - kwargs.update(locals()) + kwargs = locals() metadata = { "tags": ["organizations", "configure", "sase", "sites"], diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index e3ec14e5..425b1124 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -2471,6 +2471,7 @@ def createOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( - rulesetId (string): ID of the ruleset to assign - policyId (string): ID of the policy to assign the ruleset to - priority (integer): Priority of the ruleset assignment (lower numbers = higher priority) + - staged (boolean): Stage an assignment without applying it immediately to the policy """ kwargs.update(locals()) @@ -2482,6 +2483,7 @@ def createOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( "rulesetId", "policyId", "priority", + "staged", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -2491,6 +2493,33 @@ def createOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( } return action + def commitOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignments( + self, organizationId: str, policy: dict, **kwargs + ): + """ + **Commit staged Organization-Wide Policy Ruleset Assignments** + https://developer.cisco.com/meraki/api-v1/#!commit-organization-policies-global-group-policies-firewall-rulesets-assignments + + - organizationId (string): Organization ID + - policy (object): Policy in which all staged rulesets will be committed + """ + + kwargs = locals() + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/policies/global/group/policies/firewall/rulesets/assignments/commit" + + body_params = [ + "policy", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "commit", + "body": payload, + } + return action + def updateOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( self, organizationId: str, assignmentId: str, **kwargs ): @@ -3006,7 +3035,7 @@ def deleteOrganizationSaseIntegration(self, organizationId: str, integrationId: } return action - def attachOrganizationSaseSites(self, organizationId: str, **kwargs): + def attachOrganizationSaseSites(self, organizationId: str, items: list, **kwargs): """ **Attach sites in this organization to Secure Access. For an organization, a maximum of 2500 sites can be attached if they are in spoke mode or a maximum of 10 sites can be attached in hub mode.** https://developer.cisco.com/meraki/api-v1/#!attach-organization-sase-sites @@ -3015,7 +3044,7 @@ def attachOrganizationSaseSites(self, organizationId: str, **kwargs): - items (array): List of Meraki SD-WAN sites with the associated regions to be attached. """ - kwargs.update(locals()) + kwargs = locals() organizationId = urllib.parse.quote(organizationId, safe="") resource = f"/organizations/{organizationId}/sase/sites/attach" diff --git a/meraki/api/devices.py b/meraki/api/devices.py index 5a6e0757..8a436051 100644 --- a/meraki/api/devices.py +++ b/meraki/api/devices.py @@ -594,6 +594,7 @@ def createDeviceLiveToolsMacTable(self, serial: str, **kwargs): https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-mac-table - serial (string): Serial + - mac (string): Optional parameter to filter MAC table entries by MAC address. Must be a colon-delimited six-octet MAC address, for example '00:11:22:a0:b1:c2'. Matching is case-insensitive. - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ @@ -607,6 +608,7 @@ def createDeviceLiveToolsMacTable(self, serial: str, **kwargs): resource = f"/devices/{serial}/liveTools/macTable" body_params = [ + "mac", "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1054,6 +1056,7 @@ def createDeviceLiveToolsRoutingTable(self, serial: str, **kwargs): https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-routing-table - serial (string): Serial + - destination (object): Optional destination filter used to return routes containing the supplied destination. - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ @@ -1067,6 +1070,7 @@ def createDeviceLiveToolsRoutingTable(self, serial: str, **kwargs): resource = f"/devices/{serial}/liveTools/routingTable" body_params = [ + "destination", "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index f1cfa538..31229248 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -7616,7 +7616,7 @@ def getOrganizationDevicesTopologyL2Links(self, organizationId: str, total_pages - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. Default is 500. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. """ @@ -7655,7 +7655,7 @@ def getOrganizationDevicesTopologyNodesDiscovered(self, organizationId: str, tot - 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 - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 500. Default is 500. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - 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. """ @@ -9934,6 +9934,7 @@ def getOrganizationPoliciesGlobalFirewallRulesets(self, organizationId: str, tot - direction (string): direction to paginate, either "next" (default) or "prev" page - rulesetIds (array): Filter rulesets by IDs - name (string): Filter rulesets by name (partial match, case-insensitive). If multiple instances are provided, only the last one is used. + - excludedPolicyIds (array): Filter out rulesets that are associated with the specified policy IDs - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 100. - 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. @@ -9951,6 +9952,7 @@ def getOrganizationPoliciesGlobalFirewallRulesets(self, organizationId: str, tot query_params = [ "rulesetIds", "name", + "excludedPolicyIds", "perPage", "startingAfter", "endingBefore", @@ -9959,6 +9961,7 @@ def getOrganizationPoliciesGlobalFirewallRulesets(self, organizationId: str, tot array_params = [ "rulesetIds", + "excludedPolicyIds", ] for k, v in kwargs.items(): if k.strip() in array_params: @@ -10479,6 +10482,7 @@ def getOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignments( - rulesetIds (array): Filter assignments by ruleset IDs - policyIds (array): Filter assignments by policy IDs - assignmentIds (array): Filter assignments by assignment IDs + - staged (boolean): Filter assignments by whether or not they are staged - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 100. - 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. @@ -10497,6 +10501,7 @@ def getOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignments( "rulesetIds", "policyIds", "assignmentIds", + "staged", "perPage", "startingAfter", "endingBefore", @@ -10534,6 +10539,7 @@ def createOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( - rulesetId (string): ID of the ruleset to assign - policyId (string): ID of the policy to assign the ruleset to - priority (integer): Priority of the ruleset assignment (lower numbers = higher priority) + - staged (boolean): Stage an assignment without applying it immediately to the policy """ kwargs.update(locals()) @@ -10549,6 +10555,7 @@ def createOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( "rulesetId", "policyId", "priority", + "staged", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -10562,6 +10569,41 @@ def createOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( return self._session.post(metadata, resource, payload) + def commitOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignments( + self, organizationId: str, policy: dict, **kwargs + ): + """ + **Commit staged Organization-Wide Policy Ruleset Assignments** + https://developer.cisco.com/meraki/api-v1/#!commit-organization-policies-global-group-policies-firewall-rulesets-assignments + + - organizationId (string): Organization ID + - policy (object): Policy in which all staged rulesets will be committed + """ + + kwargs = locals() + + metadata = { + "tags": ["organizations", "configure", "policies", "global", "group", "firewall", "rulesets", "assignments"], + "operation": "commitOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/policies/global/group/policies/firewall/rulesets/assignments/commit" + + body_params = [ + "policy", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"commitOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + def updateOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( self, organizationId: str, assignmentId: str, **kwargs ): @@ -11705,7 +11747,7 @@ def getOrganizationSaseSites(self, organizationId: str, total_pages=1, direction return self._session.get_pages(metadata, resource, params, total_pages, direction) - def attachOrganizationSaseSites(self, organizationId: str, **kwargs): + def attachOrganizationSaseSites(self, organizationId: str, items: list, **kwargs): """ **Attach sites in this organization to Secure Access** https://developer.cisco.com/meraki/api-v1/#!attach-organization-sase-sites @@ -11714,7 +11756,7 @@ def attachOrganizationSaseSites(self, organizationId: str, **kwargs): - items (array): List of Meraki SD-WAN sites with the associated regions to be attached. """ - kwargs.update(locals()) + kwargs = locals() metadata = { "tags": ["organizations", "configure", "sase", "sites"], diff --git a/pyproject.toml b/pyproject.toml index 86edde73..368e010a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "3.3.0b0" +version = "3.3.0b1" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index 9f95c9e6..31ef1b75 100644 --- a/uv.lock +++ b/uv.lock @@ -549,7 +549,7 @@ wheels = [ [[package]] name = "meraki" -version = "3.3.0b0" +version = "3.3.0b1" source = { editable = "." } dependencies = [ { name = "aiohttp" }, From 7fd69d578ca4eddb79e4618b5f4c571fecbefcfa Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Wed, 8 Jul 2026 16:37:28 -0700 Subject: [PATCH 50/60] ci: restore publish-release.yml (release trigger runs from tag tree) PRs #407/#408 deleted this workflow from beta/httpx as unreachable orchestration, but it triggers on 'release: [created]', which runs the workflow file from the TAGGED COMMIT's tree, not the default branch. Every beta/dev release cut after 2026-06-10 created a GitHub Release but never published to PyPI. Restoring it here so releases from this branch publish again. create-release/watch/regenerate/enable-early-access stay single-sourced on main (workflow_run/schedule/dispatch triggers use main's copy). Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/publish-release.yml | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/publish-release.yml diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 00000000..fabf50c7 --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,34 @@ +name: Publish release to PyPI +on: + release: + types: [created] + workflow_dispatch: + inputs: + tag: + description: 'Release tag to publish (e.g. 3.1.0b0)' + required: true + +permissions: + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + ref: ${{ inputs.tag || github.event.release.tag_name }} + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + + - name: Set up Python + run: uv python install 3.13 + + - name: Build package + run: uv build + + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From a31e12c012b257a5cc65d5c2c114b7fbb26fe9c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 15:37:41 +0000 Subject: [PATCH 51/60] chore(deps-dev): bump ruff from 0.15.20 to 0.15.21 in the all-deps group (#449) Bumps the all-deps group with 1 update: [ruff](https://github.com/astral-sh/ruff). Updates `ruff` from 0.15.20 to 0.15.21 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.20...0.15.21) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.21 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/uv.lock b/uv.lock index 31ef1b75..f24ddc5e 100644 --- a/uv.lock +++ b/uv.lock @@ -961,27 +961,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.20" +version = "0.15.21" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/dc/35b341fc554ba02f217fc10da57d1a75168cfbcf75b0ef2202176d4c4f2d/ruff-0.15.20.tar.gz", hash = "sha256:1416eb04349192646b54de98f146c4f59afe37d0decfc02c3cbbf396f3a28566", size = 4755489, upload-time = "2026-06-25T17:20:37.578Z" } +sdist = { url = "https://files.pythonhosted.org/packages/0f/36/6f65aa9989acdec45d417192d8f4e7921931d8a6cf87ac74bce3eed98a8e/ruff-0.15.21.tar.gz", hash = "sha256:d0cfc841c572283c36548f82664a54ce6565567f1b0d5b4cf2caac693d8b7500", size = 4769401, upload-time = "2026-07-09T20:01:34.005Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/94/d9/2d5014f0253ba541d2061d9fa7193f48e941c8b21bb88a7ff9bbe0bd0596/ruff-0.15.20-py3-none-linux_armv6l.whl", hash = "sha256:00e188c53e499c3c1637f73c91dcf2fb56d576cab76ce1be50a27c4e80e37078", size = 10839665, upload-time = "2026-06-25T17:19:44.702Z" }, - { url = "https://files.pythonhosted.org/packages/c6/d3/ac1798ba64f670698867fcfc591d50e7e421bef137db564858f619a30fcf/ruff-0.15.20-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:9ebd1fd9b9c95fc0bd7b2761aebec1f030013d2e193a2901b224af68fe47251b", size = 11208649, upload-time = "2026-06-25T17:19:48.787Z" }, - { url = "https://files.pythonhosted.org/packages/47/47/d3ac899991202095dfcf3d5176be4272642be3cf981a2f1a30f72a2afb95/ruff-0.15.20-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c5b16cdd67ca108185cd36dce98c576350c03b1660a751de725fb049193a0632", size = 10622638, upload-time = "2026-06-25T17:19:51.354Z" }, - { url = "https://files.pythonhosted.org/packages/33/13/4e043fe30aa94d4ff5213a9881fc296d12960f5971b234a5263fdc225312/ruff-0.15.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3413bb3c3d2ca6a8208f1f4809cd2dca3c6de6d0b491c0e70847672bde6e6efd", size = 10984227, upload-time = "2026-06-25T17:19:54.044Z" }, - { url = "https://files.pythonhosted.org/packages/76/e6/92e7bf40388bc5800073b96564f56264f7e48bfd1a498f5ced6ae6d5a769/ruff-0.15.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bd7ec42b3bb3da066488db093308a69c4ac5ee6d2af333a86ba6e2eb2e7dd44b", size = 10622882, upload-time = "2026-06-25T17:19:57.037Z" }, - { url = "https://files.pythonhosted.org/packages/13/7a/43460be3f24495a3aa46d4b16873e2c4941b3b5f0b00cf88c03b7b94b339/ruff-0.15.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1a36ad0eb77fba9aabfb69ede54de6f376d04ac18ebea022847046d340a8267", size = 11474808, upload-time = "2026-06-25T17:20:00.357Z" }, - { url = "https://files.pythonhosted.org/packages/27/a0/f37077884873221c6b33b4ab49eb18f9f88e54a16a25a5bca59bef46dd66/ruff-0.15.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b6df3b1e4610432f0386dba04d853b5f08cbbc903410c6fcc02f620f05aff53c", size = 12293094, upload-time = "2026-06-25T17:20:03.446Z" }, - { url = "https://files.pythonhosted.org/packages/a6/74/165545b60256a9704c21ac0ec4a0d07933b320812f9584836c9f4aca4292/ruff-0.15.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e89f198a1ea6ef0d727c1cf16088bc91a6cb0ab947dedc966715691647186eae", size = 11526176, upload-time = "2026-06-25T17:20:06.301Z" }, - { url = "https://files.pythonhosted.org/packages/86/b1/a976a136d40ade83ce743578399865f57001003a409acadc0ecbb3051082/ruff-0.15.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309809086c2acb67624950a3c8133e80f32d0d3e27106c0cd60ff26657c9f24b", size = 11520767, upload-time = "2026-06-25T17:20:09.191Z" }, - { url = "https://files.pythonhosted.org/packages/19/0f/f032696cb01c9b54c0263fa393474d7758f1cdc021a01b04e3cbc2500999/ruff-0.15.20-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:2d2374caa2f2c2f9e2b7da0a50802cfb8b79f55a9b5e49379f564544fbf56487", size = 11500132, upload-time = "2026-06-25T17:20:13.602Z" }, - { url = "https://files.pythonhosted.org/packages/4b/f4/51b1a14bc69e8c224b15dab9cce8e99b425e0455d462caa2b3c9be2b6a8e/ruff-0.15.20-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a1ed17b65293e0c2f22fc387bc13198a5de94bf4429589b0ff6946b0feaf21a3", size = 10943828, upload-time = "2026-06-25T17:20:16.635Z" }, - { url = "https://files.pythonhosted.org/packages/71/4b/fe267640783cd02bf6c5cc290b1df1051be2ec294c678b5c15fe19e52343/ruff-0.15.20-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:f701305e66b38ea6c91882490eb73459796808e4c6362a1b765255e0cdcd4053", size = 10645418, upload-time = "2026-06-25T17:20:19.4Z" }, - { url = "https://files.pythonhosted.org/packages/b0/c0/a65aa4ec2f5e87a1df32dc3ec1fede434fe3dfd5cbcf3b503cafc676ab54/ruff-0.15.20-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5b9c0c367ad8e5d0d5b5b8537864c469a0a0e55417aadfbeca41fa61333be9f4", size = 11211770, upload-time = "2026-06-25T17:20:22.033Z" }, - { url = "https://files.pythonhosted.org/packages/5a/a4/0caa331d954ae2723d729d351c989cb4ca8b6077d5c6c2cb6de75e98c041/ruff-0.15.20-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:01cc00dd58f0df339d0e902219dd53990ea99996a0344e5d9cc8d45d5307e460", size = 11618698, upload-time = "2026-06-25T17:20:25.259Z" }, - { url = "https://files.pythonhosted.org/packages/10/9b/5f14927848d2fd4aa891fd88d883788c5a7baba561c7874732364045708c/ruff-0.15.20-py3-none-win32.whl", hash = "sha256:ed65ef510e43a137207e0f01cfcf998aeddb1aeeda5c9d35023e910284d7cf21", size = 10857322, upload-time = "2026-06-25T17:20:28.612Z" }, - { url = "https://files.pythonhosted.org/packages/fa/f0/fe47c501f9dea92a26d788ff98bb5d92ed4cb4c88792c5c88af6b697dc8e/ruff-0.15.20-py3-none-win_amd64.whl", hash = "sha256:a525c81c70fb0380344dd1d8745d8cc1c890b7fc94a58d5a07bd8eb9557b8415", size = 11993274, upload-time = "2026-06-25T17:20:31.871Z" }, - { url = "https://files.pythonhosted.org/packages/d7/2b/9555445e1201d92b3195f45cdb153a0b68f24e0a4273f6e3d5ab46e212bb/ruff-0.15.20-py3-none-win_arm64.whl", hash = "sha256:2f5b2a6d614e8700388806a14996c40fab2c47b819ef57d790a34878858ed9ca", size = 11343498, upload-time = "2026-06-25T17:20:35.03Z" }, + { url = "https://files.pythonhosted.org/packages/d0/c6/ede15cac6839f3dbce52565c8f5164a8210e669c7bc4decb03e5bdf47d0d/ruff-0.15.21-py3-none-linux_armv6l.whl", hash = "sha256:63ea0e965e5d73c90e95b2434beeafc70820536717f561b32ab6e777cb9bdf5d", size = 10854342, upload-time = "2026-07-09T20:00:53.998Z" }, + { url = "https://files.pythonhosted.org/packages/28/9d/d825b07ee7ea9e2d61df92a860033c94e06e7300d50a1c2653aac27d24fe/ruff-0.15.21-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:0f212c5d7d54c01bbfe6dcab02b724a39300f3e34ed7acbe995ccb320a2c58bd", size = 11139539, upload-time = "2026-07-09T20:00:57.809Z" }, + { url = "https://files.pythonhosted.org/packages/f5/de/3b107712e642f063c7a9e0887c427b22cb44097de5aab36c05f2e280670c/ruff-0.15.21-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e6312e41bc96791299614995ea3a977c5857c3b5662b1ecef6755b02b87cb646", size = 10595437, upload-time = "2026-07-09T20:01:00.006Z" }, + { url = "https://files.pythonhosted.org/packages/9a/6f/b4523cc90ba239ede441447a19d0c968846a3012e5a0b0c5b62831a3d5e3/ruff-0.15.21-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01d65b4831c6b2a4ba8ee6faa84049d44d982b7a706e622c4094c509e51673be", size = 10990053, upload-time = "2026-07-09T20:01:02.187Z" }, + { url = "https://files.pythonhosted.org/packages/92/cc/c6a9872a5375f0628875481cf2f66b13d7d865bf3ca2e57f91c7e762d976/ruff-0.15.21-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2c5a913a589120ce67933d5d05fd6ddbcc2481c6a054980ee767f7414c72b4fd", size = 10666096, upload-time = "2026-07-09T20:01:04.299Z" }, + { url = "https://files.pythonhosted.org/packages/ab/97/c621f7a17e097f1790fa3af6374138823b330b2d03fc38337945daca212c/ruff-0.15.21-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef04b681d02ad4dc9620f00f83ac5c22f652d0e9a9cfe431d219b16ad5ccc41", size = 11537011, upload-time = "2026-07-09T20:01:06.771Z" }, + { url = "https://files.pythonhosted.org/packages/ea/51/d928727e476e25ccc57c6f449ffd80241a651a973ad949d39cfb2a771d28/ruff-0.15.21-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:16d090c0740916594157e75b80d666eab8e78083b39b3b0e1d698f4670a17b86", size = 12347101, upload-time = "2026-07-09T20:01:08.859Z" }, + { url = "https://files.pythonhosted.org/packages/1e/88/8cd62026802b16018ad06931d87997cf795ba2a6239ab659606c87d96bf0/ruff-0.15.21-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3a10e74757dd65004d779b73e2f3c5210156d9980b41224d50d2ebcf1db51e67", size = 11572001, upload-time = "2026-07-09T20:01:11.092Z" }, + { url = "https://files.pythonhosted.org/packages/b2/97/f63084cf55444fc110e8cb985ebfcc592af47f597d44453d778cb81bc156/ruff-0.15.21-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bab0905d2f29e0d9fbc3c373ed23db0095edaa3f71f1f4f519ec15134d9e85c8", size = 11549239, upload-time = "2026-07-09T20:01:13.27Z" }, + { url = "https://files.pythonhosted.org/packages/9d/77/f107da4a2874b7715914b03f09ba9c54424de3ff8a1cc5d015d3ee2ce0ac/ruff-0.15.21-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:00eca240af5789fec6fe7df74c088cc1f9644ed83027113468efba7c92b94075", size = 11535340, upload-time = "2026-07-09T20:01:15.206Z" }, + { url = "https://files.pythonhosted.org/packages/d5/e9/601deb322d3303a7bf212b0100ead6f2ee3f6a044d89c30f2f92bf83c731/ruff-0.15.21-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:262ab31557a75141325e32d3357f3597645a7f084e732b6b054dde428ecd9341", size = 10964048, upload-time = "2026-07-09T20:01:17.723Z" }, + { url = "https://files.pythonhosted.org/packages/ea/2e/0f2176d1e99c15192caea19c8c3a0a955246b4cb4de795042eeb616345cd/ruff-0.15.21-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:659c4e7a4212f83306045ec7c5e5a356d16d9a6ef4ae0c7a4d872914fc655d9d", size = 10667055, upload-time = "2026-07-09T20:01:19.73Z" }, + { url = "https://files.pythonhosted.org/packages/48/60/abd74a02e0c4214f12a68becfd30af7165cfdcb0e661ecdc60bbb949c09a/ruff-0.15.21-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9e866eab611a5f959d36df2d10e446973a3610bc42b0c15b31dc27977d59c233", size = 11242043, upload-time = "2026-07-09T20:01:21.947Z" }, + { url = "https://files.pythonhosted.org/packages/b2/c6/583075d8ccabb4b229345edcaf1545eb3d8d6be90f686a479d7e94088bbf/ruff-0.15.21-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:e89bc93c0d3803ba870b55c29671bad9dc6d94bb1eb181b056b52eb05b52854f", size = 11648064, upload-time = "2026-07-09T20:01:24.023Z" }, + { url = "https://files.pythonhosted.org/packages/3a/3c/37d0ecb729a7cc2d393ea7dce316fc585680f35d93b8d62139d7d0a3700c/ruff-0.15.21-py3-none-win32.whl", hash = "sha256:01f8d5be84823c172b389e123174f781f9daf86d6c58719d603f941932195cdd", size = 10896555, upload-time = "2026-07-09T20:01:26.941Z" }, + { url = "https://files.pythonhosted.org/packages/c0/b8/e43466b2a6067ce91e669068f6e28d6c719a920f014b070d5c8731725de3/ruff-0.15.21-py3-none-win_amd64.whl", hash = "sha256:d4b8d9a2f0f12b816b50447f6eccb9f4bb01a6b82c86b50fb3b5354b458dc6d3", size = 12038772, upload-time = "2026-07-09T20:01:29.497Z" }, + { url = "https://files.pythonhosted.org/packages/dd/75/e90ab9aeece218a9fc5a5bc3ec97d0ee6bb3c4ff95869463c1de58e29a1c/ruff-0.15.21-py3-none-win_arm64.whl", hash = "sha256:6e83115d4b9377c1cbc13abf0e051f069fab0ef815ea0504a8a008cee24dd0a8", size = 11375265, upload-time = "2026-07-09T20:01:31.772Z" }, ] [[package]] From 98f4c04cbe925884ac881646e4ee95ece37822a0 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Wed, 15 Jul 2026 18:00:17 -0700 Subject: [PATCH 52/60] fix(generator): support local sources on beta --- generator/generate_library.py | 35 +++++++++++++++++---- tests/generator/test_generate_library_v3.py | 22 +++++++++++++ 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/generator/generate_library.py b/generator/generate_library.py index d1d4268b..7a1edec4 100644 --- a/generator/generate_library.py +++ b/generator/generate_library.py @@ -99,7 +99,12 @@ def _write_generation_report(version_number: str, api_version_number: str, is_gi def generate_library( - spec: dict, version_number: str, api_version_number: str, is_github_action: bool, generate_stubs: bool = False + spec: dict, + version_number: str, + api_version_number: str, + is_github_action: bool, + generate_stubs: bool = False, + local_source: bool = False, ): # Clear parser cache at entry clear_cache() @@ -182,11 +187,19 @@ def generate_library( "aio/api/__init__.py", "api/batch/__init__.py", ] - base_url = "https://raw.githubusercontent.com/meraki/dashboard-api-python/master/meraki/" + if local_source: + repo_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + local_meraki = os.environ.get("MERAKI_SOURCE_DIR") or os.path.join(repo_root, "meraki") + else: + base_url = "https://raw.githubusercontent.com/meraki/dashboard-api-python/master/meraki/" for file in non_generated: - response = requests.get(f"{base_url}{file}") - with open(f"meraki/{file}", "w+", encoding="utf-8", newline=None) as fp: + if local_source: + with open(os.path.join(local_meraki, file), encoding="utf-8") as src: + contents = src.read() + else: + response = requests.get(f"{base_url}{file}") contents = response.text + with open(f"meraki/{file}", "w+", encoding="utf-8", newline=None) as fp: if file == "_version.py": # replace library version start = contents.find("__version__ = ") @@ -720,9 +733,10 @@ def main(inputs): api_version_number = "custom" is_github_action = False generate_stubs_flag = False + local_source = False try: - opts, args = getopt.getopt(inputs, "ho:k:v:a:g:s") + opts, args = getopt.getopt(inputs, "ho:k:v:a:g:sl") except getopt.GetoptError: print_help() sys.exit(2) @@ -743,6 +757,8 @@ def main(inputs): is_github_action = True elif opt == "-s": generate_stubs_flag = True + elif opt == "-l": + local_source = True check_python_version() @@ -774,7 +790,14 @@ def main(inputs): "If this continues for more than an hour, please contact Meraki support." ) - generate_library(spec, version_number, api_version_number, is_github_action, generate_stubs=generate_stubs_flag) + generate_library( + spec, + version_number, + api_version_number, + is_github_action, + generate_stubs=generate_stubs_flag, + local_source=local_source, + ) if __name__ == "__main__": diff --git a/tests/generator/test_generate_library_v3.py b/tests/generator/test_generate_library_v3.py index c4ddb721..437e5e69 100644 --- a/tests/generator/test_generate_library_v3.py +++ b/tests/generator/test_generate_library_v3.py @@ -134,6 +134,28 @@ def test_accepts_all_v2_flags(self): assert "-a" in flags assert "-g" in flags + def test_local_source_flag_uses_configured_directory(self, v3_spec, output_dir, monkeypatch): + import generate_library as gen_v3 + + source_dir = output_dir / "source" + shutil.copytree(GENERATOR_DIR.parent / "meraki", source_dir) + config = source_dir / "config.py" + config.write_text(config.read_text() + "\n# local source\n") + monkeypatch.setenv("MERAKI_SOURCE_DIR", str(source_dir)) + + mock_response = MagicMock(ok=True) + mock_response.json.return_value = v3_spec + original_cwd = os.getcwd() + try: + os.chdir(output_dir) + with patch("generate_library.requests.get", return_value=mock_response) as mock_get: + gen_v3.main(["-l", "-v", "0.0.0-test", "-a", "v1"]) + finally: + os.chdir(original_cwd) + + assert mock_get.call_count == 1 + assert "# local source" in (output_dir / "meraki" / "config.py").read_text() + def test_spec_fetch_uses_version_3(self): """GEN-05: Spec fetch includes ?version=3.""" import generate_library as gen_v3 From 3e6a0e94842f406e29ade878d45daba91c9769a5 Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 01:08:51 +0000 Subject: [PATCH 53/60] Auto-generated library v4.3.1b0 for API v1.72.0. (#454) Co-authored-by: GitHub Action --- docs/generation-report.md | 6 ++++++ meraki/__init__.py | 2 +- meraki/_version.py | 2 +- meraki/aio/api/assistant.py | 8 ++++---- meraki/aio/api/organizations.py | 18 +++++++++--------- meraki/aio/api/wireless.py | 28 ---------------------------- meraki/api/assistant.py | 8 ++++---- meraki/api/batch/organizations.py | 12 ++++++------ meraki/api/organizations.py | 18 +++++++++--------- meraki/api/wireless.py | 28 ---------------------------- pyproject.toml | 2 +- uv.lock | 2 +- 12 files changed, 42 insertions(+), 92 deletions(-) diff --git a/docs/generation-report.md b/docs/generation-report.md index 7ddfb0c3..3d74f3be 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,11 @@ # Generation Report +## 2026-07-16 | Library v4.3.1b0 | API 1.72.0 + + +No Python keyword parameter conflicts detected. + + ## 2026-07-08 | Library v3.3.0b1 | API 1.72.0-beta.1 diff --git a/meraki/__init__.py b/meraki/__init__.py index fc6ca710..83fc9508 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -52,7 +52,7 @@ from meraki._version import __version__ # noqa: F401 from datetime import datetime -__api_version__ = "1.72.0-beta.1" +__api_version__ = "1.72.0" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index df5a0b7d..2f8beec5 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "3.3.0b1" +__version__ = "4.3.1b0" diff --git a/meraki/aio/api/assistant.py b/meraki/aio/api/assistant.py index 3dfece69..2f6c0de3 100644 --- a/meraki/aio/api/assistant.py +++ b/meraki/aio/api/assistant.py @@ -25,13 +25,13 @@ def getOrganizationAssistantCapabilities(self, organizationId: str): def createOrganizationAssistantChatCompletion(self, organizationId: str, **kwargs): """ - **Create a chat completion with the AI assistant** + **Create a synchronous AI assistant chat completion** https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-completion - organizationId (string): Organization ID - query (string): Simple text question or instruction to send to the AI assistant. Provide either 'query' for text-only requests or 'content' for multi-modal input. - content (array): List of multi-modal content blocks. Use instead of 'query' to send text or images. Supports text and image types only; for audio and file support, use the messages endpoint. Maximum 8 parts. - - threadId (string): An existing thread ID to continue a conversation. If omitted, a new thread is created. + - threadId (string): Existing persisted thread ID to continue synchronously. If omitted, the request is handled as a one-off invocation and the response will not include a reusable thread ID. - networkId (string): Optional network ID to scope the query to a specific network. Defaults to the user's last visited network. - platform (string): Platform identifier. Defaults to MERAKI when omitted. Case-insensitive. - language (string): Optional language override. Defaults to the user's preferred language. @@ -126,7 +126,7 @@ def getOrganizationAssistantChatThreads(self, organizationId: str, total_pages=1 def createOrganizationAssistantChatThread(self, organizationId: str, **kwargs): """ - **Create a new conversation thread.** + **Create a conversation thread for multi-turn AI assistant interactions.** https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread - organizationId (string): Organization ID @@ -279,7 +279,7 @@ def getOrganizationAssistantChatThreadMessages( def createOrganizationAssistantChatThreadMessage(self, organizationId: str, threadId: str, content: list, **kwargs): """ - **Create a new chat message in a thread.** + **Create a new chat message in an existing thread.** https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread-message - organizationId (string): Organization ID diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 178a9e7d..149f00ef 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -1085,7 +1085,7 @@ def deleteOrganizationAlertsProfile(self, organizationId: str, alertConfigId: st def getOrganizationApiPushProfiles(self, organizationId: str, **kwargs): """ - **List the push profiles in the organization** + **List the Push API profiles in an organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-api-push-profiles - organizationId (string): Organization ID @@ -1124,7 +1124,7 @@ def getOrganizationApiPushProfiles(self, organizationId: str, **kwargs): def createOrganizationApiPushProfile(self, organizationId: str, iname: str, topic: dict, receiver: dict, **kwargs): """ - **Create a new push profile** + **Create a Push API profile to subscribe to a topic and send its messages to a receiver profile.** https://developer.cisco.com/meraki/api-v1/#!create-organization-api-push-profile - organizationId (string): Organization ID @@ -1163,7 +1163,7 @@ def createOrganizationApiPushProfile(self, organizationId: str, iname: str, topi def updateOrganizationApiPushProfile(self, organizationId: str, iname: str, **kwargs): """ - **Update a push profile** + **Update a Push API profile's name, description, topic, receiver profile or other configuration.** https://developer.cisco.com/meraki/api-v1/#!update-organization-api-push-profile - organizationId (string): Organization ID @@ -1202,7 +1202,7 @@ def updateOrganizationApiPushProfile(self, organizationId: str, iname: str, **kw def deleteOrganizationApiPushProfile(self, organizationId: str, iname: str): """ - **Delete a push profile** + **Delete a Push API profile to unsubscribe from a topic, ending that topic's message delivery to a receiver profile.** https://developer.cisco.com/meraki/api-v1/#!delete-organization-api-push-profile - organizationId (string): Organization ID @@ -1221,7 +1221,7 @@ def deleteOrganizationApiPushProfile(self, organizationId: str, iname: str): def getOrganizationApiPushReceiversProfiles(self, organizationId: str): """ - **List the push receiver profiles in the organization** + **List the Push API receiver profiles in an organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-api-push-receivers-profiles - organizationId (string): Organization ID @@ -1238,7 +1238,7 @@ def getOrganizationApiPushReceiversProfiles(self, organizationId: str): def createOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str, receiver: dict, **kwargs): """ - **Create a new push receiver profile** + **Create a Push API receiver profile to define an external receiver for Push API messages** https://developer.cisco.com/meraki/api-v1/#!create-organization-api-push-receivers-profile - organizationId (string): Organization ID @@ -1277,7 +1277,7 @@ def createOrganizationApiPushReceiversProfile(self, organizationId: str, iname: def deleteOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str): """ - **Delete a push receiver profile** + **Delete a Push API receiver profile.** https://developer.cisco.com/meraki/api-v1/#!delete-organization-api-push-receivers-profile - organizationId (string): Organization ID @@ -1296,7 +1296,7 @@ def deleteOrganizationApiPushReceiversProfile(self, organizationId: str, iname: def updateOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str, **kwargs): """ - **Update a push receiver profile** + **Update a Push API receiver profile's name, description, or receiver configuration.** https://developer.cisco.com/meraki/api-v1/#!update-organization-api-push-receivers-profile - organizationId (string): Organization ID @@ -1335,7 +1335,7 @@ def updateOrganizationApiPushReceiversProfile(self, organizationId: str, iname: def getOrganizationApiPushTopics(self, organizationId: str): """ - **List of push topics** + **List the topics in an organization that are eligible for message delivery via Push API.** https://developer.cisco.com/meraki/api-v1/#!get-organization-api-push-topics - organizationId (string): Organization ID diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index 756d9819..aea304c7 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -4630,7 +4630,6 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. Defaults to 2. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -4646,11 +4645,6 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) - if "insights" in kwargs: - options = ["1", "2"] - assert kwargs["insights"] in options, ( - f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' - ) metadata = { "tags": ["wireless", "configure", "experience", "channelAvailability", "insights", "byNetwork"], @@ -4666,7 +4660,6 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo "bands", "contributor", "subContributor", - "insights", "t0", "t1", "timespan", @@ -5325,7 +5318,6 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. Defaults to 2. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5341,11 +5333,6 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) - if "insights" in kwargs: - options = ["1", "2"] - assert kwargs["insights"] in options, ( - f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' - ) metadata = { "tags": ["wireless", "configure", "experience", "coverage", "insights", "byNetwork"], @@ -5361,7 +5348,6 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( "bands", "contributor", "subContributor", - "insights", "t0", "t1", "timespan", @@ -6219,7 +6205,6 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. Defaults to 2. - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 14 days after t0. @@ -6236,11 +6221,6 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) - if "insights" in kwargs: - options = ["1", "2"] - assert kwargs["insights"] in options, ( - f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' - ) if "variant" in kwargs: options = ["A", "B"] assert kwargs["variant"] in options, ( @@ -6261,7 +6241,6 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor "bands", "contributor", "subContributor", - "insights", "variant", "t0", "t1", @@ -6977,7 +6956,6 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. Defaults to 2. - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 14 days after t0. @@ -6994,11 +6972,6 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) - if "insights" in kwargs: - options = ["1", "2"] - assert kwargs["insights"] in options, ( - f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' - ) if "variant" in kwargs: options = ["A", "B"] assert kwargs["variant"] in options, ( @@ -7019,7 +6992,6 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( "bands", "contributor", "subContributor", - "insights", "variant", "t0", "t1", diff --git a/meraki/api/assistant.py b/meraki/api/assistant.py index e76b269f..45c79123 100644 --- a/meraki/api/assistant.py +++ b/meraki/api/assistant.py @@ -25,13 +25,13 @@ def getOrganizationAssistantCapabilities(self, organizationId: str): def createOrganizationAssistantChatCompletion(self, organizationId: str, **kwargs): """ - **Create a chat completion with the AI assistant** + **Create a synchronous AI assistant chat completion** https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-completion - organizationId (string): Organization ID - query (string): Simple text question or instruction to send to the AI assistant. Provide either 'query' for text-only requests or 'content' for multi-modal input. - content (array): List of multi-modal content blocks. Use instead of 'query' to send text or images. Supports text and image types only; for audio and file support, use the messages endpoint. Maximum 8 parts. - - threadId (string): An existing thread ID to continue a conversation. If omitted, a new thread is created. + - threadId (string): Existing persisted thread ID to continue synchronously. If omitted, the request is handled as a one-off invocation and the response will not include a reusable thread ID. - networkId (string): Optional network ID to scope the query to a specific network. Defaults to the user's last visited network. - platform (string): Platform identifier. Defaults to MERAKI when omitted. Case-insensitive. - language (string): Optional language override. Defaults to the user's preferred language. @@ -126,7 +126,7 @@ def getOrganizationAssistantChatThreads(self, organizationId: str, total_pages=1 def createOrganizationAssistantChatThread(self, organizationId: str, **kwargs): """ - **Create a new conversation thread.** + **Create a conversation thread for multi-turn AI assistant interactions.** https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread - organizationId (string): Organization ID @@ -279,7 +279,7 @@ def getOrganizationAssistantChatThreadMessages( def createOrganizationAssistantChatThreadMessage(self, organizationId: str, threadId: str, content: list, **kwargs): """ - **Create a new chat message in a thread.** + **Create a new chat message in an existing thread.** https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread-message - organizationId (string): Organization ID diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index 425b1124..83e98edf 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -453,7 +453,7 @@ def deleteOrganizationAlertsProfile(self, organizationId: str, alertConfigId: st def createOrganizationApiPushProfile(self, organizationId: str, iname: str, topic: dict, receiver: dict, **kwargs): """ - **Create a new push profile** + **Create a Push API profile to subscribe to a topic and send its messages to a receiver profile.** https://developer.cisco.com/meraki/api-v1/#!create-organization-api-push-profile - organizationId (string): Organization ID @@ -486,7 +486,7 @@ def createOrganizationApiPushProfile(self, organizationId: str, iname: str, topi def updateOrganizationApiPushProfile(self, organizationId: str, iname: str, **kwargs): """ - **Update a push profile** + **Update a Push API profile's name, description, topic, receiver profile or other configuration.** https://developer.cisco.com/meraki/api-v1/#!update-organization-api-push-profile - organizationId (string): Organization ID @@ -519,7 +519,7 @@ def updateOrganizationApiPushProfile(self, organizationId: str, iname: str, **kw def deleteOrganizationApiPushProfile(self, organizationId: str, iname: str): """ - **Delete a push profile** + **Delete a Push API profile to unsubscribe from a topic, ending that topic's message delivery to a receiver profile.** https://developer.cisco.com/meraki/api-v1/#!delete-organization-api-push-profile - organizationId (string): Organization ID @@ -538,7 +538,7 @@ def deleteOrganizationApiPushProfile(self, organizationId: str, iname: str): def createOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str, receiver: dict, **kwargs): """ - **Create a new push receiver profile** + **Create a Push API receiver profile to define an external receiver for Push API messages. You may re-use an existing organization-wide webhook receiver.** https://developer.cisco.com/meraki/api-v1/#!create-organization-api-push-receivers-profile - organizationId (string): Organization ID @@ -569,7 +569,7 @@ def createOrganizationApiPushReceiversProfile(self, organizationId: str, iname: def deleteOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str): """ - **Delete a push receiver profile** + **Delete a Push API receiver profile.** https://developer.cisco.com/meraki/api-v1/#!delete-organization-api-push-receivers-profile - organizationId (string): Organization ID @@ -588,7 +588,7 @@ def deleteOrganizationApiPushReceiversProfile(self, organizationId: str, iname: def updateOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str, **kwargs): """ - **Update a push receiver profile** + **Update a Push API receiver profile's name, description, or receiver configuration.** https://developer.cisco.com/meraki/api-v1/#!update-organization-api-push-receivers-profile - organizationId (string): Organization ID diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index 31229248..34eb2ca0 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -1085,7 +1085,7 @@ def deleteOrganizationAlertsProfile(self, organizationId: str, alertConfigId: st def getOrganizationApiPushProfiles(self, organizationId: str, **kwargs): """ - **List the push profiles in the organization** + **List the Push API profiles in an organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-api-push-profiles - organizationId (string): Organization ID @@ -1124,7 +1124,7 @@ def getOrganizationApiPushProfiles(self, organizationId: str, **kwargs): def createOrganizationApiPushProfile(self, organizationId: str, iname: str, topic: dict, receiver: dict, **kwargs): """ - **Create a new push profile** + **Create a Push API profile to subscribe to a topic and send its messages to a receiver profile.** https://developer.cisco.com/meraki/api-v1/#!create-organization-api-push-profile - organizationId (string): Organization ID @@ -1163,7 +1163,7 @@ def createOrganizationApiPushProfile(self, organizationId: str, iname: str, topi def updateOrganizationApiPushProfile(self, organizationId: str, iname: str, **kwargs): """ - **Update a push profile** + **Update a Push API profile's name, description, topic, receiver profile or other configuration.** https://developer.cisco.com/meraki/api-v1/#!update-organization-api-push-profile - organizationId (string): Organization ID @@ -1202,7 +1202,7 @@ def updateOrganizationApiPushProfile(self, organizationId: str, iname: str, **kw def deleteOrganizationApiPushProfile(self, organizationId: str, iname: str): """ - **Delete a push profile** + **Delete a Push API profile to unsubscribe from a topic, ending that topic's message delivery to a receiver profile.** https://developer.cisco.com/meraki/api-v1/#!delete-organization-api-push-profile - organizationId (string): Organization ID @@ -1221,7 +1221,7 @@ def deleteOrganizationApiPushProfile(self, organizationId: str, iname: str): def getOrganizationApiPushReceiversProfiles(self, organizationId: str): """ - **List the push receiver profiles in the organization** + **List the Push API receiver profiles in an organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-api-push-receivers-profiles - organizationId (string): Organization ID @@ -1238,7 +1238,7 @@ def getOrganizationApiPushReceiversProfiles(self, organizationId: str): def createOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str, receiver: dict, **kwargs): """ - **Create a new push receiver profile** + **Create a Push API receiver profile to define an external receiver for Push API messages** https://developer.cisco.com/meraki/api-v1/#!create-organization-api-push-receivers-profile - organizationId (string): Organization ID @@ -1277,7 +1277,7 @@ def createOrganizationApiPushReceiversProfile(self, organizationId: str, iname: def deleteOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str): """ - **Delete a push receiver profile** + **Delete a Push API receiver profile.** https://developer.cisco.com/meraki/api-v1/#!delete-organization-api-push-receivers-profile - organizationId (string): Organization ID @@ -1296,7 +1296,7 @@ def deleteOrganizationApiPushReceiversProfile(self, organizationId: str, iname: def updateOrganizationApiPushReceiversProfile(self, organizationId: str, iname: str, **kwargs): """ - **Update a push receiver profile** + **Update a Push API receiver profile's name, description, or receiver configuration.** https://developer.cisco.com/meraki/api-v1/#!update-organization-api-push-receivers-profile - organizationId (string): Organization ID @@ -1335,7 +1335,7 @@ def updateOrganizationApiPushReceiversProfile(self, organizationId: str, iname: def getOrganizationApiPushTopics(self, organizationId: str): """ - **List of push topics** + **List the topics in an organization that are eligible for message delivery via Push API.** https://developer.cisco.com/meraki/api-v1/#!get-organization-api-push-topics - organizationId (string): Organization ID diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index cc0c21d8..dbad8dfa 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -4630,7 +4630,6 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. Defaults to 2. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -4646,11 +4645,6 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) - if "insights" in kwargs: - options = ["1", "2"] - assert kwargs["insights"] in options, ( - f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' - ) metadata = { "tags": ["wireless", "configure", "experience", "channelAvailability", "insights", "byNetwork"], @@ -4666,7 +4660,6 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo "bands", "contributor", "subContributor", - "insights", "t0", "t1", "timespan", @@ -5325,7 +5318,6 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. Defaults to 2. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 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 greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. @@ -5341,11 +5333,6 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) - if "insights" in kwargs: - options = ["1", "2"] - assert kwargs["insights"] in options, ( - f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' - ) metadata = { "tags": ["wireless", "configure", "experience", "coverage", "insights", "byNetwork"], @@ -5361,7 +5348,6 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( "bands", "contributor", "subContributor", - "insights", "t0", "t1", "timespan", @@ -6219,7 +6205,6 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. Defaults to 2. - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 14 days after t0. @@ -6236,11 +6221,6 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) - if "insights" in kwargs: - options = ["1", "2"] - assert kwargs["insights"] in options, ( - f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' - ) if "variant" in kwargs: options = ["A", "B"] assert kwargs["variant"] in options, ( @@ -6261,7 +6241,6 @@ def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsInsightsByNetwor "bands", "contributor", "subContributor", - "insights", "variant", "t0", "t1", @@ -6977,7 +6956,6 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( - bands (array): Filter results by band. - contributor (string): Contributor for which to retrieve insights. If not specified, returns overall insights. - subContributor (string): Sub-contributor for which to retrieve insights. If not specified, returns all sub contributor insights. - - insights (string): Insights version to use. Defaults to 2. - variant (string): Wireless State Machine variant to use. - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 14 days after t0. @@ -6994,11 +6972,6 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( assert kwargs["contributor"] in options, ( f'''"contributor" cannot be "{kwargs["contributor"]}", & must be set to one of: {options}''' ) - if "insights" in kwargs: - options = ["1", "2"] - assert kwargs["insights"] in options, ( - f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' - ) if "variant" in kwargs: options = ["A", "B"] assert kwargs["variant"] in options, ( @@ -7019,7 +6992,6 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( "bands", "contributor", "subContributor", - "insights", "variant", "t0", "t1", diff --git a/pyproject.toml b/pyproject.toml index 368e010a..dce1a499 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "3.3.0b1" +version = "4.3.1b0" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index f24ddc5e..308c6dca 100644 --- a/uv.lock +++ b/uv.lock @@ -549,7 +549,7 @@ wheels = [ [[package]] name = "meraki" -version = "3.3.0b1" +version = "4.3.1b0" source = { editable = "." } dependencies = [ { name = "aiohttp" }, From 4a008b473a7a7a48eabad03c8e8a1475c6b37d98 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 15:37:51 +0000 Subject: [PATCH 54/60] chore(deps-dev): bump ruff from 0.15.21 to 0.15.22 in the all-deps group (#456) Bumps the all-deps group with 1 update: [ruff](https://github.com/astral-sh/ruff). Updates `ruff` from 0.15.21 to 0.15.22 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.21...0.15.22) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.22 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/uv.lock b/uv.lock index 308c6dca..6b5c2e56 100644 --- a/uv.lock +++ b/uv.lock @@ -961,27 +961,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.21" +version = "0.15.22" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/0f/36/6f65aa9989acdec45d417192d8f4e7921931d8a6cf87ac74bce3eed98a8e/ruff-0.15.21.tar.gz", hash = "sha256:d0cfc841c572283c36548f82664a54ce6565567f1b0d5b4cf2caac693d8b7500", size = 4769401, upload-time = "2026-07-09T20:01:34.005Z" } +sdist = { url = "https://files.pythonhosted.org/packages/3a/06/ae069393fc66e8ff33036d4b368003833bf6e88ccf182e17e7a2f1c754fd/ruff-0.15.22.tar.gz", hash = "sha256:3f15175b1fb580126f58285a5dae6b2ea89000136d980c64499211f116b54809", size = 4785063, upload-time = "2026-07-16T15:14:13.244Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d0/c6/ede15cac6839f3dbce52565c8f5164a8210e669c7bc4decb03e5bdf47d0d/ruff-0.15.21-py3-none-linux_armv6l.whl", hash = "sha256:63ea0e965e5d73c90e95b2434beeafc70820536717f561b32ab6e777cb9bdf5d", size = 10854342, upload-time = "2026-07-09T20:00:53.998Z" }, - { url = "https://files.pythonhosted.org/packages/28/9d/d825b07ee7ea9e2d61df92a860033c94e06e7300d50a1c2653aac27d24fe/ruff-0.15.21-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:0f212c5d7d54c01bbfe6dcab02b724a39300f3e34ed7acbe995ccb320a2c58bd", size = 11139539, upload-time = "2026-07-09T20:00:57.809Z" }, - { url = "https://files.pythonhosted.org/packages/f5/de/3b107712e642f063c7a9e0887c427b22cb44097de5aab36c05f2e280670c/ruff-0.15.21-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e6312e41bc96791299614995ea3a977c5857c3b5662b1ecef6755b02b87cb646", size = 10595437, upload-time = "2026-07-09T20:01:00.006Z" }, - { url = "https://files.pythonhosted.org/packages/9a/6f/b4523cc90ba239ede441447a19d0c968846a3012e5a0b0c5b62831a3d5e3/ruff-0.15.21-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01d65b4831c6b2a4ba8ee6faa84049d44d982b7a706e622c4094c509e51673be", size = 10990053, upload-time = "2026-07-09T20:01:02.187Z" }, - { url = "https://files.pythonhosted.org/packages/92/cc/c6a9872a5375f0628875481cf2f66b13d7d865bf3ca2e57f91c7e762d976/ruff-0.15.21-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2c5a913a589120ce67933d5d05fd6ddbcc2481c6a054980ee767f7414c72b4fd", size = 10666096, upload-time = "2026-07-09T20:01:04.299Z" }, - { url = "https://files.pythonhosted.org/packages/ab/97/c621f7a17e097f1790fa3af6374138823b330b2d03fc38337945daca212c/ruff-0.15.21-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef04b681d02ad4dc9620f00f83ac5c22f652d0e9a9cfe431d219b16ad5ccc41", size = 11537011, upload-time = "2026-07-09T20:01:06.771Z" }, - { url = "https://files.pythonhosted.org/packages/ea/51/d928727e476e25ccc57c6f449ffd80241a651a973ad949d39cfb2a771d28/ruff-0.15.21-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:16d090c0740916594157e75b80d666eab8e78083b39b3b0e1d698f4670a17b86", size = 12347101, upload-time = "2026-07-09T20:01:08.859Z" }, - { url = "https://files.pythonhosted.org/packages/1e/88/8cd62026802b16018ad06931d87997cf795ba2a6239ab659606c87d96bf0/ruff-0.15.21-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3a10e74757dd65004d779b73e2f3c5210156d9980b41224d50d2ebcf1db51e67", size = 11572001, upload-time = "2026-07-09T20:01:11.092Z" }, - { url = "https://files.pythonhosted.org/packages/b2/97/f63084cf55444fc110e8cb985ebfcc592af47f597d44453d778cb81bc156/ruff-0.15.21-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bab0905d2f29e0d9fbc3c373ed23db0095edaa3f71f1f4f519ec15134d9e85c8", size = 11549239, upload-time = "2026-07-09T20:01:13.27Z" }, - { url = "https://files.pythonhosted.org/packages/9d/77/f107da4a2874b7715914b03f09ba9c54424de3ff8a1cc5d015d3ee2ce0ac/ruff-0.15.21-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:00eca240af5789fec6fe7df74c088cc1f9644ed83027113468efba7c92b94075", size = 11535340, upload-time = "2026-07-09T20:01:15.206Z" }, - { url = "https://files.pythonhosted.org/packages/d5/e9/601deb322d3303a7bf212b0100ead6f2ee3f6a044d89c30f2f92bf83c731/ruff-0.15.21-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:262ab31557a75141325e32d3357f3597645a7f084e732b6b054dde428ecd9341", size = 10964048, upload-time = "2026-07-09T20:01:17.723Z" }, - { url = "https://files.pythonhosted.org/packages/ea/2e/0f2176d1e99c15192caea19c8c3a0a955246b4cb4de795042eeb616345cd/ruff-0.15.21-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:659c4e7a4212f83306045ec7c5e5a356d16d9a6ef4ae0c7a4d872914fc655d9d", size = 10667055, upload-time = "2026-07-09T20:01:19.73Z" }, - { url = "https://files.pythonhosted.org/packages/48/60/abd74a02e0c4214f12a68becfd30af7165cfdcb0e661ecdc60bbb949c09a/ruff-0.15.21-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9e866eab611a5f959d36df2d10e446973a3610bc42b0c15b31dc27977d59c233", size = 11242043, upload-time = "2026-07-09T20:01:21.947Z" }, - { url = "https://files.pythonhosted.org/packages/b2/c6/583075d8ccabb4b229345edcaf1545eb3d8d6be90f686a479d7e94088bbf/ruff-0.15.21-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:e89bc93c0d3803ba870b55c29671bad9dc6d94bb1eb181b056b52eb05b52854f", size = 11648064, upload-time = "2026-07-09T20:01:24.023Z" }, - { url = "https://files.pythonhosted.org/packages/3a/3c/37d0ecb729a7cc2d393ea7dce316fc585680f35d93b8d62139d7d0a3700c/ruff-0.15.21-py3-none-win32.whl", hash = "sha256:01f8d5be84823c172b389e123174f781f9daf86d6c58719d603f941932195cdd", size = 10896555, upload-time = "2026-07-09T20:01:26.941Z" }, - { url = "https://files.pythonhosted.org/packages/c0/b8/e43466b2a6067ce91e669068f6e28d6c719a920f014b070d5c8731725de3/ruff-0.15.21-py3-none-win_amd64.whl", hash = "sha256:d4b8d9a2f0f12b816b50447f6eccb9f4bb01a6b82c86b50fb3b5354b458dc6d3", size = 12038772, upload-time = "2026-07-09T20:01:29.497Z" }, - { url = "https://files.pythonhosted.org/packages/dd/75/e90ab9aeece218a9fc5a5bc3ec97d0ee6bb3c4ff95869463c1de58e29a1c/ruff-0.15.21-py3-none-win_arm64.whl", hash = "sha256:6e83115d4b9377c1cbc13abf0e051f069fab0ef815ea0504a8a008cee24dd0a8", size = 11375265, upload-time = "2026-07-09T20:01:31.772Z" }, + { url = "https://files.pythonhosted.org/packages/23/18/ee54b7ae1e121be7a28ea6da4b67564ebb0530e183a54415ab7e3bcd2c4e/ruff-0.15.22-py3-none-linux_armv6l.whl", hash = "sha256:44423e73493737f5e7c5b41d475483898ff37afcdae38bc3da5085e29af1c2d8", size = 10781258, upload-time = "2026-07-16T15:13:19.452Z" }, + { url = "https://files.pythonhosted.org/packages/2f/d2/2520cb14761ddbeaf57642a76942fc36adcbdbe53b4532241995f6fc485c/ruff-0.15.22-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b82c6482946e9eda7ff2e091d25b8bad3f718684e1916d41bd56873cee05b697", size = 10999477, upload-time = "2026-07-16T15:13:23.318Z" }, + { url = "https://files.pythonhosted.org/packages/c9/10/74e53572aa758dfaa678c2a2646b5c5515d884b7ca56be4d2ce03ca4b560/ruff-0.15.22-py3-none-macosx_11_0_arm64.whl", hash = "sha256:11c1c715af53a09f714e011106bffc419751ec8232fcb5da42173284ea3fec6f", size = 10466716, upload-time = "2026-07-16T15:13:26.162Z" }, + { url = "https://files.pythonhosted.org/packages/1e/cc/44eaaf0844e028182f2d0a8f2190d0f359159aed0a9e5ab861d892f1ae2a/ruff-0.15.22-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:742a29cf29bddb7c8327895d6a10e0e6c5b38a96dd407af9b5d0857f809c0576", size = 10892644, upload-time = "2026-07-16T15:13:29.229Z" }, + { url = "https://files.pythonhosted.org/packages/9f/21/8edf559014d2b0f82beea19cfb713993ad802ccda16868769979c6090a84/ruff-0.15.22-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72af58b951b0ae395935ae79763dc349bc0eb706319d28f7a33ad2cfb3cfc178", size = 10576719, upload-time = "2026-07-16T15:13:32.35Z" }, + { url = "https://files.pythonhosted.org/packages/bf/1e/3a13abd392a3b50b62e5938a831f9ab6e588358cacad5c18545b716d2182/ruff-0.15.22-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62d425005c1835eb24e2ee4161cb90e8db263415f4a71c8c72c33abaa6c0c224", size = 11376494, upload-time = "2026-07-16T15:13:35.958Z" }, + { url = "https://files.pythonhosted.org/packages/bf/3e/422d3d95bcf04dd78e1aeac22184d4f9a8fb2c01865d39d44618484a0317/ruff-0.15.22-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8b9b3f8779a4f08c969defc3c8c35abffaa757e601ed5ae66d6d1db6519969a", size = 12208370, upload-time = "2026-07-16T15:13:39.185Z" }, + { url = "https://files.pythonhosted.org/packages/1e/91/5d065a0e0a02bf4813f5119ad278462eed081d2b832eb7c021ade0ec9e65/ruff-0.15.22-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e0dd1b2e4d3d585f897a0d137cbf4eaf6223bef4e8ce34d6bb12556c5f9249e", size = 11581098, upload-time = "2026-07-16T15:13:42.132Z" }, + { url = "https://files.pythonhosted.org/packages/f6/f9/a0d4871d12fae702eb1f41b686caf05f1f8b124dc6db6f784f53d74918fa/ruff-0.15.22-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:365523eb91d9224e1bcb03b022fbf0facb8f9e23792a2c53d9d4b3924bdbdebb", size = 11399422, upload-time = "2026-07-16T15:13:45.2Z" }, + { url = "https://files.pythonhosted.org/packages/18/80/c843a5176cddbceb0b7e8dd41cf9993490796c1c469348d384f5a5c13c56/ruff-0.15.22-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:fabfd168afdf29fee5be98b831efa9683c94d7c5a3b58b9ce5a2e38444589a74", size = 11381683, upload-time = "2026-07-16T15:13:48.46Z" }, + { url = "https://files.pythonhosted.org/packages/d4/00/8485de0ae92239438a36cfc51350db9b9e85c9ebdfaea91b18e422706662/ruff-0.15.22-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:225dbf095a87f1d9f90f5fd7924d2613ee452a75a4308c63a8f50f761787aa7c", size = 10850295, upload-time = "2026-07-16T15:13:51.655Z" }, + { url = "https://files.pythonhosted.org/packages/fa/91/24977ec2ec72eaf15e4394ace2959fdff2dd1e14f03e005e838023407169/ruff-0.15.22-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:1877d63b9d24ed278744f1523fd11b85540566d54641f97c566d7d9dc5ca5296", size = 10579640, upload-time = "2026-07-16T15:13:54.79Z" }, + { url = "https://files.pythonhosted.org/packages/9c/47/9b51216951974df1f263ac19da550d34252e0ed7218c25f10c5ef9ed7517/ruff-0.15.22-py3-none-musllinux_1_2_i686.whl", hash = "sha256:a1606c510bd7215680d32efab38965f7cdec3ef69f5170a3f4791404ffdd5262", size = 11105077, upload-time = "2026-07-16T15:13:57.915Z" }, + { url = "https://files.pythonhosted.org/packages/c2/47/20e9d4a3b8016778acea5fc32bb50d35d207500a17ddb529ffa6996feef8/ruff-0.15.22-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:630479b18625f5ffc373f77603a22a9f8ac0acd7ff0501178b5db28ec71e9c64", size = 11490980, upload-time = "2026-07-16T15:14:01.032Z" }, + { url = "https://files.pythonhosted.org/packages/4d/76/3f72d8fc38c1cb77b38c56a70da9d0c17700cc1cc50f9649c9d3c8f5ba71/ruff-0.15.22-py3-none-win32.whl", hash = "sha256:e5ba0e4a13fd14abbed2a77b517a3911290c6c6c59ef67784328d1668fab76cf", size = 10789165, upload-time = "2026-07-16T15:14:04.16Z" }, + { url = "https://files.pythonhosted.org/packages/cb/46/4965251734c2b6fcdca1b1b187d20bcac3af0ee5b083b89c910bb961ce3a/ruff-0.15.22-py3-none-win_amd64.whl", hash = "sha256:9be63ba1eb936acd2d1342fb8337c356353706fce233b2a15a09a97037e6acde", size = 11938297, upload-time = "2026-07-16T15:14:07.316Z" }, + { url = "https://files.pythonhosted.org/packages/57/c9/e69b1ff4c8b69093ef08b8919ab767af0569666865b39c30a8795d88d3c6/ruff-0.15.22-py3-none-win_arm64.whl", hash = "sha256:e1168075b72158510839f250027659cdd78476f40507dd517892304c41318661", size = 11298172, upload-time = "2026-07-16T15:14:10.51Z" }, ] [[package]] From 0fe1ba376360ba54187141deb944eab4371cb6f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 15:38:22 +0000 Subject: [PATCH 55/60] chore(deps): bump aiohttp from 3.14.1 to 3.14.2 in the all-deps group (#458) Bumps the all-deps group with 1 update: [aiohttp](https://github.com/aio-libs/aiohttp). Updates `aiohttp` from 3.14.1 to 3.14.2 - [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst) - [Commits](https://github.com/aio-libs/aiohttp/compare/v3.14.1...v3.14.2) --- updated-dependencies: - dependency-name: aiohttp dependency-version: 3.14.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 204 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/uv.lock b/uv.lock index 6b5c2e56..2bf7ca85 100644 --- a/uv.lock +++ b/uv.lock @@ -13,7 +13,7 @@ wheels = [ [[package]] name = "aiohttp" -version = "3.14.1" +version = "3.14.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiohappyeyeballs" }, @@ -25,108 +25,108 @@ dependencies = [ { name = "typing-extensions", marker = "python_full_version < '3.13'" }, { name = "yarl" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/82/78/8ea7308cac6934de8c74a14f3d5f65d1c89287426688be79538d0e5c013d/aiohttp-3.14.1.tar.gz", hash = "sha256:307f2cff90a764d329e77040603fa032db89c5c24fdad50c4c15334cba744035", size = 7955794, upload-time = "2026-06-07T21:09:35.529Z" } +sdist = { url = "https://files.pythonhosted.org/packages/1d/cc/58f26f118d8099f84e009ce560b9148a3f803e63fa8473b57feb67241875/aiohttp-3.14.2.tar.gz", hash = "sha256:f96821eb2ae2f12b0dfa799eafbf221f5621a9220b457b4744a269a63a5f3a6c", size = 7969860, upload-time = "2026-07-20T19:53:26.881Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/26/dd/bf526e6f0a1120dd6f2df2e97bacfe4d358f13d17a0ff5847301a1375a51/aiohttp-3.14.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:aa00140699487bd435fde4342d85c94cb256b7cd3a5b9c3396c67f19922afda2", size = 765225, upload-time = "2026-06-07T21:06:07.957Z" }, - { url = "https://files.pythonhosted.org/packages/8f/e1/a2872aa55495a70f61310d411541c6ee23812d9a884e000c716e1bc3edbf/aiohttp-3.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1c1af67559445498b502030c35c59db59966f47041ca9de5b4e707f86bd10b5f", size = 518743, upload-time = "2026-06-07T21:06:09.749Z" }, - { url = "https://files.pythonhosted.org/packages/5b/e7/c60c7b209e509cc787de3cea0550a518538cfc08003e1c1e14c1c63fff71/aiohttp-3.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d44ec478e713ee7f29b439f7eb8dc2b9d4079e11ae114d2c2ac3d5daf30516c8", size = 514139, upload-time = "2026-06-07T21:06:11.26Z" }, - { url = "https://files.pythonhosted.org/packages/5b/8d/614ace2f579702c9840ab1e1447fd8509e35b0b904f7196418fa2f57b25d/aiohttp-3.14.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d3b1a184a9a8f548a6b73f1e26b96b052193e4b3175ed7342aaf1151a1f00a04", size = 1784088, upload-time = "2026-06-07T21:06:12.887Z" }, - { url = "https://files.pythonhosted.org/packages/49/e0/726e90f99542bf292f81a96a12cc4847deb86f3ccf62c6f4014a201f4d33/aiohttp-3.14.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5f2504bc0322437c9a1ff6d3333ca56c7477b727c995f036b976ae17b98372c8", size = 1737835, upload-time = "2026-06-07T21:06:14.564Z" }, - { url = "https://files.pythonhosted.org/packages/0b/4b/d176d5c4db9d33dacf0543102ea59503bc1d528af4cfd0b719949ca49389/aiohttp-3.14.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:73f05ea02013e02512c3bf42714f1208c57168c779cc6fe23516e4543089d0a6", size = 1842801, upload-time = "2026-06-07T21:06:16.228Z" }, - { url = "https://files.pythonhosted.org/packages/dc/d6/5a99b563690ea0cbed912ae94a2ce33993a5709a651a3a4fe761e7dd973a/aiohttp-3.14.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:797457503c2d426bee06eef808d07b31ede30b65e054444e7de64cad0061b7af", size = 1929992, upload-time = "2026-06-07T21:06:17.947Z" }, - { url = "https://files.pythonhosted.org/packages/76/7f/a987b14a3859094b3cea3f4825219c3e5536242564af6e3f9c2f6c994eb2/aiohttp-3.14.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b821a1f7dedf7e37450654e620038ac3b2e81e8fa6ea269337e97101978ec730", size = 1786989, upload-time = "2026-06-07T21:06:19.677Z" }, - { url = "https://files.pythonhosted.org/packages/f1/1a/420e5c85a3e73349372ed22ce0b6af86bfa6ce16a4b20a64a2e94608c781/aiohttp-3.14.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4cd96b5ba05d67ed0cf00b5b405c8cd99586d8e3481e8ee0a831057591af7621", size = 1640129, upload-time = "2026-06-07T21:06:22.558Z" }, - { url = "https://files.pythonhosted.org/packages/a7/80/18a592ed3be0a402cc03670bd72ee1f8563ddbe1d8d5542dbf868f274136/aiohttp-3.14.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d459b98a932296c6f0e94f87511a0b1b90a8a02c30a50e60a297619cd5a58ee", size = 1756576, upload-time = "2026-06-07T21:06:24.8Z" }, - { url = "https://files.pythonhosted.org/packages/ec/0b/8b3d5713373858ff71a617daf6e3b0e81ad63e79d09a3cf2f6b6b983939c/aiohttp-3.14.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:764457a7be60825fb770a644852ff717bcbb5042f189f2bd16df61a81b3f6573", size = 1754668, upload-time = "2026-06-07T21:06:26.528Z" }, - { url = "https://files.pythonhosted.org/packages/9f/49/fd564575cf225821d7ba5a117cb8bc27213d8a7e1811162afb43ae077039/aiohttp-3.14.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f7a16ef45b081454ef844502d87a848876c490c4cb5c650c230f6ec79ed2c1e7", size = 1817019, upload-time = "2026-06-07T21:06:28.297Z" }, - { url = "https://files.pythonhosted.org/packages/ed/1b/e850c9ae6fc91356552ae668bb6c51e93fa29c8aef13398a10b56678557f/aiohttp-3.14.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:2fbc3ed048b3475b9f0cbcb9978e9d2d3511acd91ead203af26ed9f0056004cf", size = 1631638, upload-time = "2026-06-07T21:06:30.242Z" }, - { url = "https://files.pythonhosted.org/packages/eb/94/3c337ba72451a89806ace6f75bddc92bafc5b8d53d90115a512858024b63/aiohttp-3.14.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:bedb0cd073cc2dc035e30aeb99444389d3cd2113afe4ef9fcd23d439f5bade85", size = 1835660, upload-time = "2026-06-07T21:06:31.943Z" }, - { url = "https://files.pythonhosted.org/packages/2b/9c/9c18cf367a0498212d9ba7daf990b504a5e8ae064cda4b504e2647c89c03/aiohttp-3.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b6feea921016eb3d4e04d65fc4e9ca402d1a3801f562aef94989f54694917af3", size = 1775698, upload-time = "2026-06-07T21:06:33.72Z" }, - { url = "https://files.pythonhosted.org/packages/b5/63/a251a9d2a6cb45065b2ddc0bde2b3dd10108740a9a42f632c66405a761a2/aiohttp-3.14.1-cp311-cp311-win32.whl", hash = "sha256:313701e488100074ce99850404ee36e741abf6330179fec908a1944ecf570126", size = 458386, upload-time = "2026-06-07T21:06:35.279Z" }, - { url = "https://files.pythonhosted.org/packages/17/ca/69274c51dcd6e8947d77b2806cf47a4a15f2c846e2cbeb1882547d3da283/aiohttp-3.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:03ab4530fdcb3a543a122ba4b65ac9919da9fe9f78a03d328a6e38ff962f7aa5", size = 483406, upload-time = "2026-06-07T21:06:36.824Z" }, - { url = "https://files.pythonhosted.org/packages/2c/8a/c25904f77690c3688ec140f87591ef11a0cfe36bf3d5c0f1f38056fb62b3/aiohttp-3.14.1-cp311-cp311-win_arm64.whl", hash = "sha256:486f7d16ed54c39c2cbd7ca71fd8ba2b8bb7860df65bd7b6ed640bab96a38a8b", size = 452987, upload-time = "2026-06-07T21:06:38.371Z" }, - { url = "https://files.pythonhosted.org/packages/1d/21/151624b51cd92553d95424daf4bf19f19ce9be9002d19253e7e7ce67197b/aiohttp-3.14.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:d35143e27778b4bb0fb189562d7f275bff79c62ab8e98459717c0ea617ff2480", size = 757402, upload-time = "2026-06-07T21:06:40.311Z" }, - { url = "https://files.pythonhosted.org/packages/c2/82/280619e0bd7bf2454987e19282616e84762255dd9c8468f62382e8c191f1/aiohttp-3.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:bcfb80a2cc36fba2534e5e5b5264dc7ae6fcd9bf15256da3e53d2f499e6fa29d", size = 512310, upload-time = "2026-06-07T21:06:42.207Z" }, - { url = "https://files.pythonhosted.org/packages/55/b2/2aac325583aaa1353045f96dffa586d8a34e8322e14a7ba49cffeb103ab4/aiohttp-3.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:27fd7c91e51729b4f7e1577865fa6d34c9adccbc39aabe9000285b48af9f0ec2", size = 512448, upload-time = "2026-06-07T21:06:43.813Z" }, - { url = "https://files.pythonhosted.org/packages/8a/72/a60607cb849faa8af8a356c9329ea2eb6f395d49e82cc82ccba1fd8deb8f/aiohttp-3.14.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:64c567bf9eaf664280116a8688f63016e6b32db2505908e2bdaca1b6438142f2", size = 1766854, upload-time = "2026-06-07T21:06:45.391Z" }, - { url = "https://files.pythonhosted.org/packages/b5/d3/d9fe1c9ec7557ab4d0d82bebaa728c6418f0b93295ec2f4ab015f7710cc7/aiohttp-3.14.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:f5e6ff2bdbb8f4cd3fbe41f99e25bbcd58e3bf9f13d3dd31a11e7917251cc77a", size = 1740884, upload-time = "2026-06-07T21:06:47.413Z" }, - { url = "https://files.pythonhosted.org/packages/c1/dc/f2cecfaf9337ba3e63f181500814ff502aa3d00d9c7ec93a9d23d10a27b2/aiohttp-3.14.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2f73e01dc37122325caf079982621262f96d74823c179038a82fddfc50359264", size = 1810034, upload-time = "2026-06-07T21:06:50.165Z" }, - { url = "https://files.pythonhosted.org/packages/66/d7/2ff65c5e65c0d7476daf7e15c032e0805e36811185b9623e3238ad6c763e/aiohttp-3.14.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bb2c0c80d431c0d03f2c7dbf125150fedd4f0de17366a7ca33f7ccb822391842", size = 1904054, upload-time = "2026-06-07T21:06:52.035Z" }, - { url = "https://files.pythonhosted.org/packages/20/9c/d445818389df371f56d141d881153ba23183c4735a03f7356ffb43f7757d/aiohttp-3.14.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3e6fc1a85fa7194a1a7d19f44e8609180f4a8eb5fa4c7ed8b4355f080fad235c", size = 1790278, upload-time = "2026-06-07T21:06:54.049Z" }, - { url = "https://files.pythonhosted.org/packages/4d/aa/bf04cb4d865fc6101c2229a294ad744973b72e513fdc5a6b791e6983d72a/aiohttp-3.14.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:686b6c0d3911ec387b444ddf5dc62fb7f7c0a7d5186a7861626496a5ab4aff95", size = 1591795, upload-time = "2026-06-07T21:06:55.911Z" }, - { url = "https://files.pythonhosted.org/packages/dc/b4/4dac0038960427ba832f6609dfb4ea5437d7fd80c72001b9e48f834f428b/aiohttp-3.14.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c6fa4dc7ad6f8109c70bb1499e589f76b0b792baf39f9b017eb92c8a81d0a199", size = 1728397, upload-time = "2026-06-07T21:06:57.777Z" }, - { url = "https://files.pythonhosted.org/packages/2b/f9/7cd4e8ad7aa3b75f17d56bb5498dd604a93d4e6eece822ba0568c413fff0/aiohttp-3.14.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:87a5eea1b2a5e21e1ebdbb33ad4165359189327e63fc4e4894693e7f821ac817", size = 1766504, upload-time = "2026-06-07T21:07:00.009Z" }, - { url = "https://files.pythonhosted.org/packages/f9/df/fc01d9fcad0f73fed3f3d361f1f94f975947b50dff82919f6dc2bf4316cc/aiohttp-3.14.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:1c1421eb01d4fd608d88cc8290211d177a58532b55ad94076fb349c5bf467f0a", size = 1777806, upload-time = "2026-06-07T21:07:02.064Z" }, - { url = "https://files.pythonhosted.org/packages/41/09/47e2d090bddcc8fb4ccb4c314aadc32d7c5d9bb55f50f6ad1c92fc15d501/aiohttp-3.14.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:34b257ec41345c1e8f2df68fa908a7952f5de932723871eb633ecbbff396c9a4", size = 1580707, upload-time = "2026-06-07T21:07:03.942Z" }, - { url = "https://files.pythonhosted.org/packages/3d/36/f1a4ce904ae0b6930cfe9afc96d0896f7ec1a620c400405d63783bb95a9c/aiohttp-3.14.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:de538791a80e5d862addbc183f70f0158ac9b9bb872bb147f1fd2a683691e087", size = 1798121, upload-time = "2026-06-07T21:07:05.987Z" }, - { url = "https://files.pythonhosted.org/packages/70/0a/e0075ce9ca0279ee1d4f0c0b85f54fea02ebc83c3007651a72bece658fec/aiohttp-3.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:6f71173be42d3241d428f760122febb748de0623f44308a6f120d0dd9ec572e3", size = 1767580, upload-time = "2026-06-07T21:07:07.873Z" }, - { url = "https://files.pythonhosted.org/packages/3e/61/a0c0a8f327a9c52095cdd8e312391b00d3ed64ab6c72bb5c33d8ec251cf7/aiohttp-3.14.1-cp312-cp312-win32.whl", hash = "sha256:ec8dc383ee57ea3e883477dcca3f11b65d58199f1080acaf4cd6ad9a99698be4", size = 452771, upload-time = "2026-06-07T21:07:09.669Z" }, - { url = "https://files.pythonhosted.org/packages/df/d9/ea367c75f16ac9c6cdc8febb25e8318fa21a2b1bc8d6514d4b2d890bface/aiohttp-3.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:2aa92c87868cd13674989f9ee83e5f9f7ea4237589b728048e1f0c8f6caa3271", size = 479873, upload-time = "2026-06-07T21:07:11.538Z" }, - { url = "https://files.pythonhosted.org/packages/03/64/8d96784a7851156db8a4c6c3f6f91042fdf39fb15a4cc38c8b3c14833c45/aiohttp-3.14.1-cp312-cp312-win_arm64.whl", hash = "sha256:2c840c90759922cb5e6dda94596e079a30fb5a5ba548e7e0dc00574703940847", size = 448073, upload-time = "2026-06-07T21:07:13.637Z" }, - { url = "https://files.pythonhosted.org/packages/bc/97/bd137012dd97e1649162b099135a80e1fd59aaa807b2430fc448d1029aff/aiohttp-3.14.1-cp313-cp313-android_21_arm64_v8a.whl", hash = "sha256:b3a03285a7f9c7b016324574a6d92a1c895da6b978cb8f1deee3ac72bc6da178", size = 506882, upload-time = "2026-06-07T21:07:15.501Z" }, - { url = "https://files.pythonhosted.org/packages/ef/79/e5cc690e9d922a66887ceeaca53a8ffd5a7b0be3816142b7abc433742d89/aiohttp-3.14.1-cp313-cp313-android_21_x86_64.whl", hash = "sha256:2a73f487ab8ef5abbb24b7aa9b73e98eaba9e9e031804ff2416f02eca315ccaf", size = 515270, upload-time = "2026-06-07T21:07:17.53Z" }, - { url = "https://files.pythonhosted.org/packages/fe/22/a73ccbf9dbd6e26dda0b24d5fd5db7da92ee3383a79f47677ffb834c5c5b/aiohttp-3.14.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:915fbb7b41b115192259f8c9ae58f3ddc444d2b5579917270211858e606a4afd", size = 485841, upload-time = "2026-06-07T21:07:19.555Z" }, - { url = "https://files.pythonhosted.org/packages/3b/b9/57ed8eaf596321c2ad747bd480fb1700dbd7177c60dfc9e4c187f629662e/aiohttp-3.14.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:7fb4bdf95b0561a79f259f9d28fbc109728c5ee7f27aff6391f0ca703a329abe", size = 492088, upload-time = "2026-06-07T21:07:21.581Z" }, - { url = "https://files.pythonhosted.org/packages/78/c0/5ebe5270a7c140d7c6f79dcb018640225f14d406c149e4eec04a7d82fe71/aiohttp-3.14.1-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:1b9748363260121d2927704f5d4fc498150669ca3ae93625986ee89c8f80dcd4", size = 501564, upload-time = "2026-06-07T21:07:23.388Z" }, - { url = "https://files.pythonhosted.org/packages/75/7f/8cdaa24fc7983865e0915153b96a9ac5bcdd3548d64c5a27d17cecccad2d/aiohttp-3.14.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:86a6dab78b0e43e2897a3bbe15745aa60dc5423ca437b7b0b164c069bf91b876", size = 751998, upload-time = "2026-06-07T21:07:25.046Z" }, - { url = "https://files.pythonhosted.org/packages/b2/f4/c4227aacfacc5cb0cc2d119b65301d177912a6842cd64e120c47af76064f/aiohttp-3.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4dfd6e47d3c44c2279907607f73a4240b88c69eb8b90da7e2441a8045dfd21da", size = 510918, upload-time = "2026-06-07T21:07:27.28Z" }, - { url = "https://files.pythonhosted.org/packages/ab/01/a2d5f96cd4e74424864d30bc0a7e44d0a12dacdcfa91b5b2d1bd3dca6bf3/aiohttp-3.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:317acd9f8602858dc7d59679812c376c7f0b97bcbbf16e0d6237f54141d8a8a6", size = 508657, upload-time = "2026-06-07T21:07:29.252Z" }, - { url = "https://files.pythonhosted.org/packages/e8/ed/3c0fb5c500fdd8e7ebc10d1889c04384fffa1a9163eac1356088ca9da1b1/aiohttp-3.14.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bd869c427324e5cb15195793de951295710db28be7d818247f3097b4ab5d4b96", size = 1757907, upload-time = "2026-06-07T21:07:31.03Z" }, - { url = "https://files.pythonhosted.org/packages/0b/ab/d4c924d9bd5be3050c226612413ce68cb54c70d2c31b661bfc8d9a5b6a70/aiohttp-3.14.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:93b032b5ec3255473c143627d21a69ac74ae12f7f33974cb587c564d11b1066f", size = 1737565, upload-time = "2026-06-07T21:07:33.031Z" }, - { url = "https://files.pythonhosted.org/packages/19/2a/37326821ff779084020cdc33224d20b19f42f4183a500ff92022a739eda7/aiohttp-3.14.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f234b4deb12f3ad59127e037bc57c40c21e45b45282df7d3a55a0f409f595296", size = 1799018, upload-time = "2026-06-07T21:07:35.003Z" }, - { url = "https://files.pythonhosted.org/packages/b3/4f/6e947ba73e4ce09070761c05ed3a8ceb7c21f5e46798671d8b2aac0e4626/aiohttp-3.14.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9af6779bfb46abf124068327abcdf9ce95c9ef8287a3e8da76ccf2d0f16c28fa", size = 1894416, upload-time = "2026-06-07T21:07:36.956Z" }, - { url = "https://files.pythonhosted.org/packages/9d/6e/dbf1d0625dc711fb2851f4f3c3055c39ed58bae92082d8c627dbe6013736/aiohttp-3.14.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:faccab372e66bc76d5731525e7f1143c922271725b9d38c9f97edcc66266b451", size = 1783881, upload-time = "2026-06-07T21:07:39.063Z" }, - { url = "https://files.pythonhosted.org/packages/44/c2/5e25098a67268ed369483ae7d1a58bd0a13d03aab860d2a0e4a6eb25b046/aiohttp-3.14.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f380468b09d2a81633ee863b0ec5648d364bd17bb8ecfb8c2f387f7ac1faf42c", size = 1587572, upload-time = "2026-06-07T21:07:41.058Z" }, - { url = "https://files.pythonhosted.org/packages/2a/bd/cf9cee17e140f942a3de73e658a543aa8fbf35a5fc67a9d2538d52d77f0b/aiohttp-3.14.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:97e704dcd26271f5bda3fa07c3ce0fb76d6d3f8659f4baa1a24442cc9ba177ca", size = 1722137, upload-time = "2026-06-07T21:07:43.014Z" }, - { url = "https://files.pythonhosted.org/packages/89/6d/5684f8c59045c96f81a18cefbc1fbbd79d25b88f1c622f2a5c5c08fcb632/aiohttp-3.14.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:269b76ac5394092b95bc4a098f4fc6c191c083c3bd12775d1e30e663132f6a09", size = 1755953, upload-time = "2026-06-07T21:07:45.933Z" }, - { url = "https://files.pythonhosted.org/packages/a8/40/35caf3170f8359760740a7d9aa0fff2e344bef98e1d1186f5a0f6dec17e6/aiohttp-3.14.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5c0b3e614340c889d575451696374c9d17affd54cd607ca0babed8f8c37b9397", size = 1766479, upload-time = "2026-06-07T21:07:48.047Z" }, - { url = "https://files.pythonhosted.org/packages/6d/a1/b0c61e7a137f0d81de49a82023a6df73c3c16d6fefb0f8e4a93d21639002/aiohttp-3.14.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:5663ee9257cfa1add7253a7da3035a02f31b6600ec48261585e1800a81533080", size = 1580077, upload-time = "2026-06-07T21:07:50.069Z" }, - { url = "https://files.pythonhosted.org/packages/0b/41/194ea4623693009fcefebef7aef63c141754f153e9cd0d39d3b9e36c175c/aiohttp-3.14.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:603a2c834142172ffddc054067f5ec0ca65d57a0aa98a71bc81952573208e345", size = 1791688, upload-time = "2026-06-07T21:07:52.106Z" }, - { url = "https://files.pythonhosted.org/packages/ba/45/4de841f005cfe1fd63e2a2fe011262c515e2a62aa6994b15947e7d717ac9/aiohttp-3.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:cb21957bb8aca671c1765e32f58164cf0c50e6bf41c0bbbd16da20732ecaf588", size = 1761094, upload-time = "2026-06-07T21:07:54.113Z" }, - { url = "https://files.pythonhosted.org/packages/e4/ae/dbce10533d3896d544d5053939ed75b7dc31a1b0973d959b1b5ae21028d6/aiohttp-3.14.1-cp313-cp313-win32.whl", hash = "sha256:e509a55f681e6158c20f70f102f9cf61fb20fbc382272bc6d94b7343f2582780", size = 452662, upload-time = "2026-06-07T21:07:56.06Z" }, - { url = "https://files.pythonhosted.org/packages/7b/d9/0bf1a19362c32f06229da5e7ddfcec91f93474d6307f7a2d3135e9c674dc/aiohttp-3.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:1ac8531b638959718e18c2207fbfe297819875da46a740b29dfa29beba64355a", size = 479748, upload-time = "2026-06-07T21:07:58.319Z" }, - { url = "https://files.pythonhosted.org/packages/22/0a/62e7232dc9484fbec112ceb32efb6a624cc7994ec6e2b019286f17c4e8f2/aiohttp-3.14.1-cp313-cp313-win_arm64.whl", hash = "sha256:250d14af67f6b6a1a4a811049b1afa69d61d617fca6bf33149b3ab1a6dbcf7b8", size = 447723, upload-time = "2026-06-07T21:08:00.154Z" }, - { url = "https://files.pythonhosted.org/packages/c4/a1/5fafa04e1ca91ddb47608699d60649c1c6db3cf41c99e78fc4056f9513db/aiohttp-3.14.1-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:7c106c26852ca1c2047c6b80384f17100b4e439af276f21ef3d4e2f450ae7e15", size = 508531, upload-time = "2026-06-07T21:08:02.093Z" }, - { url = "https://files.pythonhosted.org/packages/fa/2e/bfa02f699d87ffc86d5959270b28f1cb410add3ccaced8ed2e0b8a5238fc/aiohttp-3.14.1-cp314-cp314-android_24_x86_64.whl", hash = "sha256:20205f7f5ade7aaec9f4b500549bbc071b046453aed72f9c06dcab87896a83e8", size = 514718, upload-time = "2026-06-07T21:08:04.476Z" }, - { url = "https://files.pythonhosted.org/packages/85/a5/9594ad6289eebbc97d167c44213d557807f90e59115caad24de21ad2c3b1/aiohttp-3.14.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:62a759436b29e677181a9e76bab8b8f689a29cb9c535f45f7c48c9c830d3f8c3", size = 487918, upload-time = "2026-06-07T21:08:06.377Z" }, - { url = "https://files.pythonhosted.org/packages/b4/61/16a32c36c3c49edec122a3dc811f2057df2f94d3b14aa107c8017d981618/aiohttp-3.14.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:2964cbf553df4d7a57348da44d961d871895fc1ee4e8c322b2a95612c7b17fba", size = 494014, upload-time = "2026-06-07T21:08:08.263Z" }, - { url = "https://files.pythonhosted.org/packages/9b/89/3ebcf96ed99c05bec9c434aaac6963fd3cbab4a786ae739908a144d9ce44/aiohttp-3.14.1-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:237651caadc3a59badd39319c54642b5299e9cc98a3a194310e55d5bb9f5e397", size = 502398, upload-time = "2026-06-07T21:08:10.244Z" }, - { url = "https://files.pythonhosted.org/packages/fd/3d/b74870a0c2d40c355928cd5b96c7a11fa821b8a40fc41365e64479b151fb/aiohttp-3.14.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:896e12dfdbbab9d8f7e16d2b28c6769a60126fa92095d1ebf9473d02593a2448", size = 758018, upload-time = "2026-06-07T21:08:12.447Z" }, - { url = "https://files.pythonhosted.org/packages/d3/66/f42f5c984d99e49c6cff5f26f590750f2e2f7ef1fcfb99966ab5be1b632e/aiohttp-3.14.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d03f281ed22579314ba00821ce20115a7c0ac430660b4cc05704a3f818b3e004", size = 512462, upload-time = "2026-06-07T21:08:14.624Z" }, - { url = "https://files.pythonhosted.org/packages/e9/a7/248e1aebe0c7810b0271e021a0f2a5eb6e78a051885b3c9df49f42a5802d/aiohttp-3.14.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:07eabb979d236335fed927e137a928c9adfb7df3b9ec7aa31726f133a62be983", size = 512824, upload-time = "2026-06-07T21:08:16.572Z" }, - { url = "https://files.pythonhosted.org/packages/26/97/2aa0e5ba0727dc3bd5aaebb7ccbc510f7dfb7fb961ec87497cd496635ab1/aiohttp-3.14.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4fe1f1087cbadb280b5e1bb054a4f00d1423c74d6626c5e48400d871d34ecefe", size = 1749898, upload-time = "2026-06-07T21:08:18.635Z" }, - { url = "https://files.pythonhosted.org/packages/00/8d/e97f6c96c891d457c8479d92a514ba194d0412f981d72c70341ee18488ed/aiohttp-3.14.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:367a9314fdc79dab0fac96e216cb41dd73c85bdca85306ce8999118ba7e0f333", size = 1710114, upload-time = "2026-06-07T21:08:20.892Z" }, - { url = "https://files.pythonhosted.org/packages/6f/e6/aa8d7e863048c8fceb5cd6ce74017311cec3ead07847387e12265fb4444e/aiohttp-3.14.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a24f677ebe83749039e7bdf862ff0bbb16818ae4193d4ef96505e269375bcce0", size = 1802541, upload-time = "2026-06-07T21:08:23.044Z" }, - { url = "https://files.pythonhosted.org/packages/83/a8/72193137de57fda4ebfae4563182d082c8856e3b6e9871d0b46f028fb369/aiohttp-3.14.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c83afe0ba876be7e943d2e0ba645809ad441575d2840c895c21ee5de93b9377a", size = 1875776, upload-time = "2026-06-07T21:08:25.288Z" }, - { url = "https://files.pythonhosted.org/packages/a0/18/938441025db6769a3464596b2410af3afde0b21eb2f204c6f766f68af4bd/aiohttp-3.14.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:634e385930fb6d2d479cf3aa66515955863b77a5e3c2b5894ca259a25b308602", size = 1760329, upload-time = "2026-06-07T21:08:27.363Z" }, - { url = "https://files.pythonhosted.org/packages/60/29/bf2496b4065e76e09fe48015aaffe5ce161d8f089b06ac6982070f653076/aiohttp-3.14.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:eeea07c4397bbc57719c4eed8f9c284874d4f175f9b6d57f7a1546b976d455ca", size = 1587293, upload-time = "2026-06-07T21:08:29.805Z" }, - { url = "https://files.pythonhosted.org/packages/49/a2/2136674d52123b1354bd05dd5753c318db47dc0c927cc70b27bab3755456/aiohttp-3.14.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:335c0cc3e3545ce98dcb9cfcb836f40c3411f43fa03dab757597d80c89af8a35", size = 1714756, upload-time = "2026-06-07T21:08:32.094Z" }, - { url = "https://files.pythonhosted.org/packages/a7/b9/e5fd2e6f915503081c0f9b1e8540947037929c70c191da2e4d54b31a21a1/aiohttp-3.14.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:ae6be797afdef264e8a84864a85b196ca06045586481b3df8a967322fd2fa844", size = 1721052, upload-time = "2026-06-07T21:08:34.167Z" }, - { url = "https://files.pythonhosted.org/packages/63/5a/2833e324a2263e104e31e2e91bc5bbee81bc499afd32203faee048a883f0/aiohttp-3.14.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:8560b4d712474335d08907db7973f71912d3a9a8f1dee992ec06b5d2fe359496", size = 1766888, upload-time = "2026-06-07T21:08:36.95Z" }, - { url = "https://files.pythonhosted.org/packages/57/fa/dea6511870913162f3b2e8c42a7614eb203a4540b8c2da43e0bfb0548f3c/aiohttp-3.14.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7edd08e0a5deb1e8564a2fcd8f4561014a3f05252334671bbf55ddd47db0e5", size = 1581679, upload-time = "2026-06-07T21:08:39.292Z" }, - { url = "https://files.pythonhosted.org/packages/14/bd/3cf0d55e71784b33534e9710a67d382d900598b4787fbce6cc7317f8c42a/aiohttp-3.14.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:b6ff7fcee63287ae57b5df3e4f5957ce032122802509246dec1a5bcc55904c95", size = 1782021, upload-time = "2026-06-07T21:08:41.407Z" }, - { url = "https://files.pythonhosted.org/packages/c1/af/14bb5843eccbe234f4dfb78ab73e549d99727247e62ae5d62cbd22eaf5b0/aiohttp-3.14.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6ffbb2f4ec1ceaff7e07d43922954da26b223d188bf30658e561b98e23089444", size = 1742574, upload-time = "2026-06-07T21:08:43.795Z" }, - { url = "https://files.pythonhosted.org/packages/f2/1e/fbeb7af9210a67ac0f9c9bec0f8f4568497924e33137a3d5b48e1cf85f3f/aiohttp-3.14.1-cp314-cp314-win32.whl", hash = "sha256:a9875b46d910cff3ea2f5962f9d266b465459fe634e22556ab9bd6fc1192eea0", size = 457773, upload-time = "2026-06-07T21:08:46.168Z" }, - { url = "https://files.pythonhosted.org/packages/f0/2b/13e8d741a9ec5db7d900c060554cf8352ab85e44e2a4469ebb9d377bda17/aiohttp-3.14.1-cp314-cp314-win_amd64.whl", hash = "sha256:af8b4b81a960eeaf1234971ac3cd0ba5901f3cd42eae42a46b4d089a8b492719", size = 485001, upload-time = "2026-06-07T21:08:48.401Z" }, - { url = "https://files.pythonhosted.org/packages/df/30/491acfa2c4d6c3ff59c49a14fc1b50be3241e25bbb0c84c09e2da4d11395/aiohttp-3.14.1-cp314-cp314-win_arm64.whl", hash = "sha256:cf4491381b1b57425c315a56a439251b1bdac07b2275f19a8c44bc57744532ec", size = 453809, upload-time = "2026-06-07T21:08:50.7Z" }, - { url = "https://files.pythonhosted.org/packages/34/e3/19dbe1a1f4cc6230eb9e314de7fe68053b0992f9302b27d12141a0b5db53/aiohttp-3.14.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:819c054312f1af92947e6a55883d1b66feefab11531a7fc45e0fb9b63880b5c2", size = 793320, upload-time = "2026-06-07T21:08:52.775Z" }, - { url = "https://files.pythonhosted.org/packages/7f/20/1b7182219ba1b108430d6e4dc53d25ae02dcfcf5a045b33af4e8c5167527/aiohttp-3.14.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:10ee9c1753a8f706345b22496c79fbddb5be0599e0823f3738b1534058e25340", size = 529077, upload-time = "2026-06-07T21:08:55Z" }, - { url = "https://files.pythonhosted.org/packages/b9/c8/14ce60ec31a2e5f5274bb17d383a6f7a3aabca31ac04eee05585bbadab16/aiohttp-3.14.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1601cc37baf5750ccacae618ec2daf020769581695550e3b654a911f859c563d", size = 532476, upload-time = "2026-06-07T21:08:57.176Z" }, - { url = "https://files.pythonhosted.org/packages/7e/02/9ac85e081e53da2e061b02fa7758fe0a12d17b8ce2d1f5e6c7cb76730328/aiohttp-3.14.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4d6e0ac9da31c9c04c84e1c0182ad8d6df35965a85cae29cd71d089621b3ae94", size = 1922347, upload-time = "2026-06-07T21:08:59.563Z" }, - { url = "https://files.pythonhosted.org/packages/c0/3e/d3ba07a0ab38b5389e10bec4362d21e10a4f667cba2d79ba30837b3a5059/aiohttp-3.14.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9e8f2d660c350b3d0e259c7a7e3d9b7fc8b41210cbcc3d4a7076ff0a5e5c2fdc", size = 1786465, upload-time = "2026-06-07T21:09:01.909Z" }, - { url = "https://files.pythonhosted.org/packages/0b/cb/e2ee978a00cfb2df829704a69528b18154eba5939f45bc1efa8f33aee4c5/aiohttp-3.14.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4691802dda97be727f79d86818acaad7eb8e9252626a1d6b519fedbb92d5e251", size = 1909423, upload-time = "2026-06-07T21:09:04.357Z" }, - { url = "https://files.pythonhosted.org/packages/73/5d/1430334858b1022b58ae50399a918f0bd6fe8fa7fa183598d657ff61e040/aiohttp-3.14.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c389c482a7e9b9dc3ee2701ac46c4125297a3818875b9c305ddb603c04828fd1", size = 2001906, upload-time = "2026-06-07T21:09:06.722Z" }, - { url = "https://files.pythonhosted.org/packages/66/4e/560c7472d3d198a23aa5c8b19a5115bf6a9b77b7d3e4bb363da320430ad2/aiohttp-3.14.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fc0cacab7ba4e56f0f81c82a98c09bed2f39c940107b03a34b168bdf7597edd3", size = 1877095, upload-time = "2026-06-07T21:09:09.011Z" }, - { url = "https://files.pythonhosted.org/packages/0d/f1/4745806578d447db4a784a8591e2dae3afdfc2bcb96f8f81271b13df6543/aiohttp-3.14.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:979ed4717f59b8bb12e3963378fa285d93d367e15bcd66c721311826d3c44a6c", size = 1676222, upload-time = "2026-06-07T21:09:11.461Z" }, - { url = "https://files.pythonhosted.org/packages/6a/c9/48255813cca749a229ef0ab476004ec623728ad79a9c0840616f6c076325/aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:38e1e7daaea81df51c952e18483f323d878499a1e2bfe564790e0f9701d6f203", size = 1842922, upload-time = "2026-06-07T21:09:14.118Z" }, - { url = "https://files.pythonhosted.org/packages/3d/c0/bbd054e2bee909f529523a5af3891052606af5143c09f5f183ec3b234676/aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:4132e72c608fe9fecb8f409113567605915b83e9bdd3ea56538d2f9cd35002f1", size = 1825035, upload-time = "2026-06-07T21:09:16.447Z" }, - { url = "https://files.pythonhosted.org/packages/a8/ae/90395d4376deceb74e09ec26b6adf7d2015a6f8802d6d84446af860fef04/aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:eefd9cc9b6d4a2db5f00a26bc3e4f9acf71926a6ec557cd56c9c6f27c290b665", size = 1849512, upload-time = "2026-06-07T21:09:18.742Z" }, - { url = "https://files.pythonhosted.org/packages/93/bd/fb25f3049957553d4ce0ba6ae480aa2f592a6985497fca590837d16c1be0/aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:b165790117eea512d7f3fb22f1f6dad3d55a7189571993eb015591c1401276d1", size = 1668571, upload-time = "2026-06-07T21:09:21.458Z" }, - { url = "https://files.pythonhosted.org/packages/3f/22/7f73303d64dd567ff3addca90b556690ed1233a47b8f55d242fb90af3681/aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:ed09c7eb1c391271c2ed0314a51903e72a3acb653d5ccfc264cdf3ef11f8269d", size = 1881159, upload-time = "2026-06-07T21:09:23.813Z" }, - { url = "https://files.pythonhosted.org/packages/44/be/0474c5a8b5640e1e4aa1923430a91f4151be82e511373fe764189b89aef5/aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:99abd37084b82f5830c635fddd0b4993b9742a66eb746dacf433c8590e8f9e3c", size = 1841409, upload-time = "2026-06-07T21:09:26.207Z" }, - { url = "https://files.pythonhosted.org/packages/7b/3c/bb4a7cba26956cb3da4553cc2056cf67be5b5ff6e6d8fa4fbdff73bfb7ae/aiohttp-3.14.1-cp314-cp314t-win32.whl", hash = "sha256:47ddf841cdecc810749921d25606dee45857d12d2ad5ddb7b5bd7eab12e4b365", size = 494166, upload-time = "2026-06-07T21:09:28.505Z" }, - { url = "https://files.pythonhosted.org/packages/8a/84/ec80c2c1f66a952555a9f86df6b33af65108a6febfa0471b69013a12f807/aiohttp-3.14.1-cp314-cp314t-win_amd64.whl", hash = "sha256:5e78b522b7a6e27e0b25d19b247b75039ac4c94f99823e3c9e53ae1603a9f7e9", size = 530255, upload-time = "2026-06-07T21:09:30.843Z" }, - { url = "https://files.pythonhosted.org/packages/2a/71/6e22be134a4061ada85a92951b842f2657f17d926b727f3f94c56ae963d6/aiohttp-3.14.1-cp314-cp314t-win_arm64.whl", hash = "sha256:90d53f1609c29ccc2193945ef732428382a28f78d0456ae4d3daf0d48b74f0f6", size = 469640, upload-time = "2026-06-07T21:09:33.028Z" }, + { url = "https://files.pythonhosted.org/packages/f6/4a/a6c1426d2fb3cddd901575436803733caaaeb7ac0a49aa72d1930d2e3ab6/aiohttp-3.14.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:56432ee8f7abe47c97717cfbf5c32430463ea8a7138e12a87b7891fa6084c8ff", size = 764168, upload-time = "2026-07-20T19:50:07.389Z" }, + { url = "https://files.pythonhosted.org/packages/0c/62/88ae65afc3590719788cbff3b2e0f56e6850f53ca34114cbb371e677c543/aiohttp-3.14.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6c244f7a65cbec04c830a301aae443c529d4dbca5fddfd4b19e5a179d896adfd", size = 516255, upload-time = "2026-07-20T19:50:08.84Z" }, + { url = "https://files.pythonhosted.org/packages/8f/bc/ad9b767785b014f2f57497a2ccf67e3d4316d153f7ed1c7715fbbd7573fe/aiohttp-3.14.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1c05afdd28ecacce5a1f63275a2e3dce09efddd3a63d143ee9799fda83989c8d", size = 514670, upload-time = "2026-07-20T19:50:10.325Z" }, + { url = "https://files.pythonhosted.org/packages/48/94/697aef63f15ef354f64723eaac6ccfb289d59b99699b3b7cb1ff663b2045/aiohttp-3.14.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a57f39d6ec155932853b6b0f130cbbafab3208240fa807f29a2c96ea52b77ae1", size = 1780650, upload-time = "2026-07-20T19:50:11.676Z" }, + { url = "https://files.pythonhosted.org/packages/99/f9/6a1994c1bf138403cf10171cb618571a330ae5683a5803b1ef29b5723d7f/aiohttp-3.14.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1fc31339824ec922cb7424d624b5b6c11d8942d077b2585e5bd602ca1a1e27ed", size = 1737710, upload-time = "2026-07-20T19:50:13.401Z" }, + { url = "https://files.pythonhosted.org/packages/8b/ba/abe8d5015148b2cd7189473789461058dcf88ae202d4cf1cbecaf291a7ef/aiohttp-3.14.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d93854e215dcc7c88e4f530827193c1a594e2662931d8dbe7cca3abf52a7082d", size = 1845568, upload-time = "2026-07-20T19:50:15.168Z" }, + { url = "https://files.pythonhosted.org/packages/c2/89/98a2688810f469f19f2d02a298426a37b6e1cc420230a8cc7d6c85af7a01/aiohttp-3.14.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:87c9b03be0c18c3b3587be979149830381e37ac4a6ca8557dbe72e44fcad66c3", size = 1928485, upload-time = "2026-07-20T19:50:16.922Z" }, + { url = "https://files.pythonhosted.org/packages/5a/fd/c980f64f5e5bff22f07968bcc6af1b64167dfd21dbbffda86f2d153fc802/aiohttp-3.14.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bc1a0793dce8fa9bb6906411e57fb18a2f1c31357b04172541b92b30337362a7", size = 1786216, upload-time = "2026-07-20T19:50:18.598Z" }, + { url = "https://files.pythonhosted.org/packages/da/80/c710ce9c7f22fcbb83366aa64a5ccf03dced35ab09a6e37545656a6df01e/aiohttp-3.14.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:2f1b9540d2d0f2f95590528a1effd0ba5370f6ec189ac925e70b5eecae02dc77", size = 1636921, upload-time = "2026-07-20T19:50:20.201Z" }, + { url = "https://files.pythonhosted.org/packages/e1/b2/56ce1b0c535d188ef94c05bccbf3f5b1aaea1231fcb073318977bdd917e9/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c0a968b04fecf7c94e502015860ad1e2e112c6b761e97b6fdf65fbb374e22b73", size = 1753040, upload-time = "2026-07-20T19:50:21.857Z" }, + { url = "https://files.pythonhosted.org/packages/86/61/4318a947139a21d4e1a40e7f5a92799d0fe28feffaca6640a4a165e62b0e/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:2d2eedae227cd5cbd0bccc5e759f71e1af2cd77b7f74ce413bb9a2b87f94a272", size = 1760811, upload-time = "2026-07-20T19:50:23.623Z" }, + { url = "https://files.pythonhosted.org/packages/81/b0/2012165377d029ceb925c9e5f42b0b30a39d89cf7e494c4100f3ab8d27c6/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:9d3f4c68b2c2cd282b65e558cebf4b27c8b440ab511f2b938a643d3598df2ddb", size = 1819760, upload-time = "2026-07-20T19:50:25.34Z" }, + { url = "https://files.pythonhosted.org/packages/16/e5/1de93ba3bc18edb87f71594326bedafdc38fe725da8118b7d36fd56610f8/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:d32a70b8bf8836fd80d4169d9e34eb032cd2a7cbccb0b9cf00eac1f40732467c", size = 1628145, upload-time = "2026-07-20T19:50:26.992Z" }, + { url = "https://files.pythonhosted.org/packages/66/8f/adc9e8592449ee08f72fcce94b7f3f1a9bbf0591a46026e4d322e5a70d7a/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:386ce4e709b4cc40f9ef9a132ad8e672d2d164a65451305672df656e7794c68e", size = 1832577, upload-time = "2026-07-20T19:50:28.546Z" }, + { url = "https://files.pythonhosted.org/packages/9b/7f/700500700513b1b63967a24c4e189aad377e18f9d67b7387b3418d6213cb/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bc0ed30b942c3bd755583d74bb00b90248c067d20b1f8301e4489a53a33aa65f", size = 1774814, upload-time = "2026-07-20T19:50:30.144Z" }, + { url = "https://files.pythonhosted.org/packages/a5/d6/580f9b2ab4c78d9fbf9d56c85fb7f7d4d22d667b27df8032ab9bf7140e37/aiohttp-3.14.2-cp311-cp311-win32.whl", hash = "sha256:b5ed2c7dacebf4950d6b4a1b22548e4d709bb15e0287e064a7cdb32ada65893a", size = 455968, upload-time = "2026-07-20T19:50:31.722Z" }, + { url = "https://files.pythonhosted.org/packages/96/76/33665ae48e24e01c6dfa15ed14d9d9eec1349577cef497f3b26210621f0a/aiohttp-3.14.2-cp311-cp311-win_amd64.whl", hash = "sha256:bf7951959a8e89f2d4a1e719e60d3ea4e8fc26f011ee3aed09598ad786b112f7", size = 480978, upload-time = "2026-07-20T19:50:33.299Z" }, + { url = "https://files.pythonhosted.org/packages/5e/19/00963031da42bd23716032f57b2a8414c5355eb1abc41805b2b41173040c/aiohttp-3.14.2-cp311-cp311-win_arm64.whl", hash = "sha256:c167127a3b6089ef78ac2e33582c38040d51688ee28474b5053acf55f192187b", size = 452900, upload-time = "2026-07-20T19:50:35.049Z" }, + { url = "https://files.pythonhosted.org/packages/e0/99/8737b10b6fa447371541a3b2cdbf9703c31ecf3afff4998f2f0633646a57/aiohttp-3.14.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:30e41662123806e4590a0440585122ac33c89a2465a8be81cc1b50656ca0e432", size = 754562, upload-time = "2026-07-20T19:50:36.672Z" }, + { url = "https://files.pythonhosted.org/packages/7c/e5/fd624b8b46d99dfd8f7f75111569b5ee21850539e914eed04ce39e4455ea/aiohttp-3.14.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:dbc45e2773c66d14fbd337754e9bf23932beef539bd539716a721f5b5f372034", size = 509386, upload-time = "2026-07-20T19:50:38.268Z" }, + { url = "https://files.pythonhosted.org/packages/6d/a8/473db85d08b862724c506b51af2b9c6327e9e95cbd297c4c6f33968be1a8/aiohttp-3.14.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:476cf7fac10619ad6d08e1df0225d07b5a8d57c04963a171ad845d5a349d47ef", size = 511905, upload-time = "2026-07-20T19:50:39.862Z" }, + { url = "https://files.pythonhosted.org/packages/c1/e8/aa5ebff13ac5e39ffae8add143757e936d1c2ceb726b82786e5f5cb9912c/aiohttp-3.14.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:40bedff39ea83185f3f98a41155dd9da28b365c432e5bd90e7be140bcef0b7f3", size = 1764968, upload-time = "2026-07-20T19:50:41.559Z" }, + { url = "https://files.pythonhosted.org/packages/f4/22/23ec6d3d3f24f5961c7be73d5127481c992d6c92ca213f336ed8f0ff1453/aiohttp-3.14.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a26f14006883fc7662e21041b4311eac1acbc977a5c43aacb27ff17f8a4c28b2", size = 1740635, upload-time = "2026-07-20T19:50:43.363Z" }, + { url = "https://files.pythonhosted.org/packages/a0/7b/f8966d2d08f0582525ef02d5af007d2d2467cb733abf1d1f7849a02a6b98/aiohttp-3.14.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:673217cbc9370ebf8cd048b0889d7cbe922b7bb48f4e4c02d31cfefa140bd946", size = 1810447, upload-time = "2026-07-20T19:50:45.258Z" }, + { url = "https://files.pythonhosted.org/packages/39/f5/239f2a828b033ac244237074db7b560ad3279bb1e934bb462dbde19f3877/aiohttp-3.14.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b39dbdbe30a44958d63f3f8baa2af68f24ec8a631dcd18a33dd76dfa2a0eb917", size = 1905896, upload-time = "2026-07-20T19:50:47.022Z" }, + { url = "https://files.pythonhosted.org/packages/6c/6e/fb84b8dafc521026355aadbeed484fc1ec44a05aae927de309f204c1f0af/aiohttp-3.14.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d15f618255fcbe5f54689403aa4c2a90b6f2e6ebc96b295b1cb0e868c1c12384", size = 1792052, upload-time = "2026-07-20T19:50:48.683Z" }, + { url = "https://files.pythonhosted.org/packages/ba/c4/25b199009f164ee02599b9b0962d22e6533d212418e49df9f4fdb37fe2eb/aiohttp-3.14.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7ae767b7dffd316cc2d0abf3e1f90132b4c1a2819a32d8bcb1ba749800ea6273", size = 1590939, upload-time = "2026-07-20T19:50:50.702Z" }, + { url = "https://files.pythonhosted.org/packages/ad/f5/96d7540a52620433db3822267008a1697fc816979c109a4f535855ac893c/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3ec4b6501a076b2f73844256da17d6b7acb15bb74ee0e908a67feb9412371166", size = 1725039, upload-time = "2026-07-20T19:50:52.506Z" }, + { url = "https://files.pythonhosted.org/packages/f6/50/1a06abbeec14a2bcb46124ca6e281ed4ccb3e9006542ded6bc89a0ce5224/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:7e328d02fb46b9a8dbfa070d98967e8b7eaa1d9ee10ae03fb664bdf30d58ccf0", size = 1764748, upload-time = "2026-07-20T19:50:54.336Z" }, + { url = "https://files.pythonhosted.org/packages/70/5d/b8821b362306627ea8ca11fe49ec47cba18e7c75d975fa5f6710ad93845c/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c0c7f2e5fe10910d5ab76438f269cc41bb7e499fd48ded978e926360ab1790c8", size = 1777119, upload-time = "2026-07-20T19:50:56.306Z" }, + { url = "https://files.pythonhosted.org/packages/81/e5/805d9d49e66c6358574ad70dd731031585d18fe95ae65b857bc378bccc9a/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:66de80888db2176655f8df0b705b817f5ae3834e6566cc2caa89360871d90195", size = 1580047, upload-time = "2026-07-20T19:50:58.316Z" }, + { url = "https://files.pythonhosted.org/packages/c6/fa/1536f272d5ad93bf8b75043b02b94c24bf4e6b55a849d3287553ad6da97e/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:f2f9950b2dd0fc896ab520ea2366b7df6484d3d164a65d5e9f28f7b0e5742d8a", size = 1796861, upload-time = "2026-07-20T19:51:00.373Z" }, + { url = "https://files.pythonhosted.org/packages/e6/f3/86dfd6152bb706351cf5c6b45f0f6a1818a4e559d1e88d899c4c673c23a8/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:cc4435b16dc246c5dfa7f2f8ee71b10a30765018a090ee36e99f356b1e9b75cc", size = 1768687, upload-time = "2026-07-20T19:51:02.214Z" }, + { url = "https://files.pythonhosted.org/packages/57/af/14b98e07fcd1a2b37ebb2f950309821eaa56e0eac3d32fc23dc55227e49b/aiohttp-3.14.2-cp312-cp312-win32.whl", hash = "sha256:4ca802547f1128008addfc21b24959f5cbf30a8952d365e7daa078a0d884b242", size = 451437, upload-time = "2026-07-20T19:51:03.954Z" }, + { url = "https://files.pythonhosted.org/packages/38/20/8478c05702a369b6d0800e40e0c5f9a289ff482d0921faec1eb17727339d/aiohttp-3.14.2-cp312-cp312-win_amd64.whl", hash = "sha256:e5efff8bfd27c44ce1bfdf92ce838362d9316ed8b2ed2f89f581dbe0bbe05acf", size = 476776, upload-time = "2026-07-20T19:51:05.705Z" }, + { url = "https://files.pythonhosted.org/packages/d0/d0/e550bb1cb4fc82de3bdbe2add061cc0cedb34f2e7f01ada78fba94493ca1/aiohttp-3.14.2-cp312-cp312-win_arm64.whl", hash = "sha256:0eb1c9fd51f231ac8dc9d5824d5c2efc45337d429db0123fa9d4c20f570fdfc3", size = 447928, upload-time = "2026-07-20T19:51:07.523Z" }, + { url = "https://files.pythonhosted.org/packages/96/3a/8b8779f8e813d3a33cf16bc836a7ea7bf3c27b6588d42efa36b0c32fcb58/aiohttp-3.14.2-cp313-cp313-android_21_arm64_v8a.whl", hash = "sha256:17eecd6ee9bfc8e31b6003137d74f349f0ac3797111a2df87e23acb4a7a912ea", size = 506205, upload-time = "2026-07-20T19:51:09.215Z" }, + { url = "https://files.pythonhosted.org/packages/d1/73/2f45204b37ecc4ce2c54b8b67254d70a8ea3b629c4083d58f3e2d27991cb/aiohttp-3.14.2-cp313-cp313-android_21_x86_64.whl", hash = "sha256:ce8dfb58f012f76258f29951d38935ac928b32ae24a480f30761f2ed5036fa78", size = 515116, upload-time = "2026-07-20T19:51:10.914Z" }, + { url = "https://files.pythonhosted.org/packages/f0/22/8f4424de1f50df4fbb74ea32006f9cff798ae0d346ffa6be7b6f0caca719/aiohttp-3.14.2-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:4181d72e0e6d1735c1fae56381193c6ae211d584d06413980c00775b9b2a176a", size = 486244, upload-time = "2026-07-20T19:51:12.878Z" }, + { url = "https://files.pythonhosted.org/packages/c2/53/60de022260f5d2d31976bc5f50db708e10671f0ac5da515402adcc6b4d4d/aiohttp-3.14.2-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:0e56babe35076f69ec9327833b71439eeccd10f51fe56c1a533da8f24923f014", size = 492260, upload-time = "2026-07-20T19:51:14.555Z" }, + { url = "https://files.pythonhosted.org/packages/b2/6f/d3ccc31c15cd33888670b8f1bf1dc06f3239b4edd156fc818078e87ae628/aiohttp-3.14.2-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:6b63709e259e3b3d7922b235606564e91ed4c224e777cc0ca4cae04f5f559206", size = 502174, upload-time = "2026-07-20T19:51:16.3Z" }, + { url = "https://files.pythonhosted.org/packages/40/20/52d21e485652f4708015ce27dd3029e63140e0bdb0dcc7bf72dc0bc3f4ad/aiohttp-3.14.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f7c10c4d0b33888a68c192d883d1390d4596c116a59bf689e6d352c6739b7940", size = 750878, upload-time = "2026-07-20T19:51:18.013Z" }, + { url = "https://files.pythonhosted.org/packages/2e/49/1220bdc73d568431cc3856667405d78c2e95eb57fed2b9ffa5e825932ab2/aiohttp-3.14.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8f7b19e27b78a3a927b1932af93af7645806153e8f541cee8fe856426142503f", size = 508459, upload-time = "2026-07-20T19:51:19.876Z" }, + { url = "https://files.pythonhosted.org/packages/ed/f1/39177406ce0ae5cb2782b35e848c0edf6e09d6e082df636eeacdbdfa70bd/aiohttp-3.14.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:18fcc3a5cc7dde1d8f7903e309055294c28894c9434588645817e374f3b83d03", size = 509179, upload-time = "2026-07-20T19:51:21.719Z" }, + { url = "https://files.pythonhosted.org/packages/87/f7/6d081c2ee838458492c7ae1062399bdd68f149811d257d4502e79a25b306/aiohttp-3.14.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:09d1b0deec698d1198eb0b8f910dd9432d856985abbfea3f06be8b296a6619b4", size = 1761346, upload-time = "2026-07-20T19:51:23.437Z" }, + { url = "https://files.pythonhosted.org/packages/1d/ed/0befea4ae533f09c3a60f0d10b923cd4a90027a1bf49dfafaa24eeee08b8/aiohttp-3.14.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:cabaaecb4c6888bd9abafac151051377534dad4c3859a386b6325f39d3732f99", size = 1735057, upload-time = "2026-07-20T19:51:25.512Z" }, + { url = "https://files.pythonhosted.org/packages/de/03/c1d89fcd94907f93a08d4aadbb4e1d9bd3d7d6c9f94bc9c17689de38107b/aiohttp-3.14.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:114299c08cce8ad4ebb21fafe766378864109e88ad8cf63cf6acb384ff844a57", size = 1800389, upload-time = "2026-07-20T19:51:27.585Z" }, + { url = "https://files.pythonhosted.org/packages/3a/8b/edbac4d1a1cde3571588a1e5b40637df5acee43158efdf3ae9a161fde8ab/aiohttp-3.14.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6bea8451e26cd67645d9b2ee18232e438ddfc36cea35feecb4537f2359fc7030", size = 1895342, upload-time = "2026-07-20T19:51:29.794Z" }, + { url = "https://files.pythonhosted.org/packages/0c/31/2e9ca3b21c07ea8a001e2b142cb01401fd34fd07b248a0b95a04c3ebc4ec/aiohttp-3.14.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:46b8887aa303075c1e5b24123f314a1a7bbfa03d0213dff8bb70503b2148c853", size = 1789175, upload-time = "2026-07-20T19:51:31.744Z" }, + { url = "https://files.pythonhosted.org/packages/6f/91/b57d3d13a80fbf765b19ae0c38d783a3a23f35b1cb82ae3b22f91abe6c24/aiohttp-3.14.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:de3b04a3f7b40ad7f1bcd3540dd447cf9bd93d57a49969bca522cbcf01290f08", size = 1586845, upload-time = "2026-07-20T19:51:33.571Z" }, + { url = "https://files.pythonhosted.org/packages/69/e8/a2f5f9f6219cd21190e9b50e2cbc978d12a2aab748d0aa7c6ee930db15c3/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:42372e1f1a8dca0dcd5daf922849004ec1120042d0e24f14c926f97d2275ca79", size = 1724839, upload-time = "2026-07-20T19:51:35.518Z" }, + { url = "https://files.pythonhosted.org/packages/de/d4/a2b9442336051714dd8dbd419b9f4a1003c45bb850ee0f3af87f2743e867/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:7871c94f3400358530ac4906dd7a526c5a24099cd5c48f53ffc4b1cb5037d7d7", size = 1756306, upload-time = "2026-07-20T19:51:37.459Z" }, + { url = "https://files.pythonhosted.org/packages/ab/93/22c94a599b2c4ea6ab88f1b912d90883f1fba5235b587ea9f13b148e9a0f/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f8f371794319a8185e61e15ba5e1be8407b986ebce1ade11856c02d24e090577", size = 1769133, upload-time = "2026-07-20T19:51:39.9Z" }, + { url = "https://files.pythonhosted.org/packages/fe/db/a4e4c207f7023e83c281a7cf3579f227bade48f1899cb6588c0ed6ae54de/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:af63ac06bad85191e6a0c4a733cb3c55adb99f8105bc7ce9913391561159a49a", size = 1578671, upload-time = "2026-07-20T19:51:42.418Z" }, + { url = "https://files.pythonhosted.org/packages/8d/6f/33746ba4947b8193652fc7ed0533e09f93b118e39777228f3029e5677c17/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:8c2cdb684c153f377157e856257ee8535c75d8478343e4bb1e83ca73bdfa3d31", size = 1791778, upload-time = "2026-07-20T19:51:44.298Z" }, + { url = "https://files.pythonhosted.org/packages/06/41/323856cb0ec9076b1f9a135eb0684f5f984dd97989a087873768aa34ca2f/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ceff4f84c1d928654faa6bcb0437ed095b279baae2a35fcfe5a3cbe0d8b9725d", size = 1768490, upload-time = "2026-07-20T19:51:46.279Z" }, + { url = "https://files.pythonhosted.org/packages/39/f0/09e29e457b6fb49253cbb61354ed2541fdf23ac192bddbb57bb34bc93d9c/aiohttp-3.14.2-cp313-cp313-win32.whl", hash = "sha256:15292b08ce7dd45e268fce542228894b4735102e8ee77163bd665b35fc2b5598", size = 451064, upload-time = "2026-07-20T19:51:48.194Z" }, + { url = "https://files.pythonhosted.org/packages/0b/76/b44703eafcfe1446f4f975be1ef2406042955425eaf56450e71b50506c49/aiohttp-3.14.2-cp313-cp313-win_amd64.whl", hash = "sha256:fc2d8e7373ceba7e1c7e9dc00adac854c2701a6d443fd21d4af2e49342d727bd", size = 476140, upload-time = "2026-07-20T19:51:50.285Z" }, + { url = "https://files.pythonhosted.org/packages/72/48/b095935c9e72a253439f80ec757b91d4733e0a9a98b63e108d84aaf39b08/aiohttp-3.14.2-cp313-cp313-win_arm64.whl", hash = "sha256:70570f50bda5037b416db8fcba595cf808ecf0fdce12d64e850b5ae1db7f64d4", size = 447585, upload-time = "2026-07-20T19:51:52.333Z" }, + { url = "https://files.pythonhosted.org/packages/4f/ca/716f720dccc3032e40dc80d0ab2d87a7365270a714976a85bdff73bc7254/aiohttp-3.14.2-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:7719cef2a9dc5e10cd5f476ec1744b25c5ac4da733a9a687d91c42de7d4afe30", size = 508899, upload-time = "2026-07-20T19:51:54.165Z" }, + { url = "https://files.pythonhosted.org/packages/f5/80/786166589e71b3f3cfce56b414170fe5008462d0bff100bd8837285632f6/aiohttp-3.14.2-cp314-cp314-android_24_x86_64.whl", hash = "sha256:3523ec0cc524a413699f25ec8340f3da368484bc9d5f2a1bf87f233ac20599bf", size = 514722, upload-time = "2026-07-20T19:51:56.208Z" }, + { url = "https://files.pythonhosted.org/packages/eb/b7/539961cf3e3d3f179ea4b20d456cbdb67d1163c68f2e95bf220438a5afd5/aiohttp-3.14.2-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:c8ab295ee58332ef8fbd62727df90540836dfcf7a61f545d0f2771223b80bf25", size = 488082, upload-time = "2026-07-20T19:51:58.293Z" }, + { url = "https://files.pythonhosted.org/packages/60/34/c7708eac8edacca9c049a0d6f5fa610005ac3c5634c9ea4751134263bf4e/aiohttp-3.14.2-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:71501bc03ede681401269c569e6f9306c761c1c7d4296675e8e78dd07147070f", size = 494140, upload-time = "2026-07-20T19:52:00.158Z" }, + { url = "https://files.pythonhosted.org/packages/d8/e1/076b88de36b4ebea62d1c0b225e32bc8a452ee71b2aded82878fa5fa7c9e/aiohttp-3.14.2-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:052478c7d01035d805302db50c2ef626b1c1ba0fe2f6d4a22ae6eaeb43bf2316", size = 502670, upload-time = "2026-07-20T19:52:02.097Z" }, + { url = "https://files.pythonhosted.org/packages/a9/71/7b7720ffe7e521aaa79a853ebff4c17937f4b5a3a586e9d13b0f38050b35/aiohttp-3.14.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:b0d49be9d9a210b2c993bf32b1eda03f949f7bcda68fc4f718ae8085ae3fb4b8", size = 756406, upload-time = "2026-07-20T19:52:04.082Z" }, + { url = "https://files.pythonhosted.org/packages/b9/9a/c67c7e22fff7d7b17387e718451b30eb89f55df6b8d13d2d7f91daba6505/aiohttp-3.14.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:5fe25c4c44ea5b56fd4512e2065e09384987fc8cc98e41bc8749efe12f653abb", size = 510106, upload-time = "2026-07-20T19:52:06.001Z" }, + { url = "https://files.pythonhosted.org/packages/27/2a/3caebd640229663263585d4d31898331a3937752f2e1f5ec0af509fa31be/aiohttp-3.14.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:7e254b0d636957174a03ca210289e867a62bb9502081e1b44a8c2bb1f6266ecd", size = 512876, upload-time = "2026-07-20T19:52:08.036Z" }, + { url = "https://files.pythonhosted.org/packages/27/04/86945210e491493f5cd025efe5e6d8fc8a9e8aaf36f943c40f52c34eda7e/aiohttp-3.14.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a6b0ce033d49dd3c6a2566b387e322a9f9029110d67902f0d64571c0fd4b73d8", size = 1750050, upload-time = "2026-07-20T19:52:09.998Z" }, + { url = "https://files.pythonhosted.org/packages/11/d8/356c62552b4db60af5ad8cddeafa6f837788918201f1b5f2466565c986b5/aiohttp-3.14.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:41b5b66b1ac2c48b61e420691eb9741d17d9068f2bc23b5ee3e750faa564bc8f", size = 1707177, upload-time = "2026-07-20T19:52:12.39Z" }, + { url = "https://files.pythonhosted.org/packages/77/2d/41bb20bed3df1d6dc7fc231ca4ffb72177fd151bf4205a4ade7a93e03501/aiohttp-3.14.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:30a5ed81f752f182961237414a3cd0af209c0f74f06d66f66f9fcb8964f4978d", size = 1803795, upload-time = "2026-07-20T19:52:14.705Z" }, + { url = "https://files.pythonhosted.org/packages/63/21/ad9fe6786a1d2758bcfdae4dbc1d6869ffc7b1e0571530a508de3cdde09b/aiohttp-3.14.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1b9251f43d78ff675c0ddfcd53ba61abecc1f74eedc6287bb6657f6c6a033fe7", size = 1876539, upload-time = "2026-07-20T19:52:16.965Z" }, + { url = "https://files.pythonhosted.org/packages/0e/cb/d213f4fd7af279d82c4b46d30de22db93a01296d77a8d8e535289637da54/aiohttp-3.14.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cf7930e83a12801b2e253d41cc8bf5553f61c0cfabef182a72ae13472cc81803", size = 1761130, upload-time = "2026-07-20T19:52:19.127Z" }, + { url = "https://files.pythonhosted.org/packages/46/4f/0792fe1a24c2b4b506d07350e980b0626c149fe73e68dd37dfb30ed89813/aiohttp-3.14.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:abb33120daba5e5643a757790ece44d638a5a11eb0598312e6e7ec2f1bd1a5a3", size = 1583576, upload-time = "2026-07-20T19:52:21.465Z" }, + { url = "https://files.pythonhosted.org/packages/46/ad/551c302f534f9cd6105bd16902e69dc64c726aa729127203f47ed4bddb2a/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:983a68048a48f35ed08aadfcc1ba55de9a121aa91be48a764965c9ec532b94b5", size = 1714139, upload-time = "2026-07-20T19:52:23.636Z" }, + { url = "https://files.pythonhosted.org/packages/e3/cf/a3be8601d2e80ccf7bd4f79807629cede5425d72c02636f06b1ad6a8290a/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:fef094bfc2f4e991a998af066fc6e3956a409ef799f5cbad2365175357181f2e", size = 1724352, upload-time = "2026-07-20T19:52:26.043Z" }, + { url = "https://files.pythonhosted.org/packages/c8/b1/6b55f6448b43a3338749f37fc6a14e7ac7dad121d2d585f22c1dd3d324fe/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:2f7ca81d936d820ae479971a6b6214b1b867420b5b58e54a1e7157716a943754", size = 1770749, upload-time = "2026-07-20T19:52:28.467Z" }, + { url = "https://files.pythonhosted.org/packages/39/58/b3f1cf6af47fa0b0d51c6e2b98b2bf0326b44a932d74915f3c0874413ea8/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:da4f142fa078fedbdb3f88d0542ad9315656224e167502ae274cbba818b90c90", size = 1577547, upload-time = "2026-07-20T19:52:30.658Z" }, + { url = "https://files.pythonhosted.org/packages/d4/e2/1d79f1ab35593d70dabed98936ae842ac90d12847c9a62bba4a19d6005a4/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:3d4238e50a378f5ac69a1e0162715c676bd082dede2e5c4f67ca7fd0014cb09d", size = 1781840, upload-time = "2026-07-20T19:52:33.021Z" }, + { url = "https://files.pythonhosted.org/packages/01/73/770be856c6fc861563999081a5fe2d44e16b4255f5fd94b2217a2349ca65/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:03330676d8caa28bb33fa7104b0d542d9aac93350abcd91bf68e64abd531c320", size = 1745757, upload-time = "2026-07-20T19:52:35.541Z" }, + { url = "https://files.pythonhosted.org/packages/bc/0b/861fdbe3ff90b503a4d0a12276623f4afbe54c237ca876fc560125c270a3/aiohttp-3.14.2-cp314-cp314-win32.whl", hash = "sha256:43387429e4f2ec4047aaf9f935db003d4aa1268ea9021164877fd6b012b6396a", size = 455863, upload-time = "2026-07-20T19:52:37.634Z" }, + { url = "https://files.pythonhosted.org/packages/f7/03/cc8234d0f06fe4b0e1777c7ed313cc9014f078f72a9a0cbdc144965d1bd7/aiohttp-3.14.2-cp314-cp314-win_amd64.whl", hash = "sha256:e3a6302f47518dbf2ffd3cd518f02a1fbf53f85ffeed41a224fa4a6f6a62673b", size = 480986, upload-time = "2026-07-20T19:52:39.665Z" }, + { url = "https://files.pythonhosted.org/packages/2e/b0/ae17dd629e22160f453b9041a4aee80a8a917ba2f44d5b3e252cc501ed2c/aiohttp-3.14.2-cp314-cp314-win_arm64.whl", hash = "sha256:8d1f3802887f0e0dc07387a081dca3ad0b5758e32bdf5fb619b12ac22b8e9b56", size = 453588, upload-time = "2026-07-20T19:52:41.634Z" }, + { url = "https://files.pythonhosted.org/packages/30/54/4bbcc00f04dbc380103ee669a56df30dea127c3686c8dc2ab86b05a1387b/aiohttp-3.14.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:9094262ae4f2902c7291c14ba915960db5567276690ef9195cdefe8b7cbb3acb", size = 791337, upload-time = "2026-07-20T19:52:43.821Z" }, + { url = "https://files.pythonhosted.org/packages/e7/37/4f95edc1488580c63c0b5baaef429afbacadc7ccd9c47431cdcce90d9e5a/aiohttp-3.14.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:165b0dcc65960ffc9c99aa4ba1c3c76dbc7a34845c3c23a0bd3fbf33b3d12569", size = 526335, upload-time = "2026-07-20T19:52:45.903Z" }, + { url = "https://files.pythonhosted.org/packages/c3/ed/1d7ae73764d135638797a427cb637ae3d98f1fd61208c25891a9f26cdd67/aiohttp-3.14.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f518d75c03cd3f7f125eca1baadb56f8b94db94602278d2d0d19af6e177650a7", size = 532102, upload-time = "2026-07-20T19:52:47.994Z" }, + { url = "https://files.pythonhosted.org/packages/e3/12/da9816eee0d81506560259e7c0af93a4aa7df98acd0fe276958abd42d7c3/aiohttp-3.14.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9b937d7864ca68f1e8a1c3a4eb2bac1de86a992f86d36492da10a135a482fab6", size = 1922727, upload-time = "2026-07-20T19:52:50.224Z" }, + { url = "https://files.pythonhosted.org/packages/2f/b9/d7ccbcde223a72c7b8f3458bdb08c2bacf5fc268a1fdd5cc29861eb0e4e2/aiohttp-3.14.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b155df7f572c73c6c4108b67be302c8639b96ae56fb02787eeae8cad0a1baf26", size = 1787202, upload-time = "2026-07-20T19:52:52.825Z" }, + { url = "https://files.pythonhosted.org/packages/c2/7c/39174069b7df18ea22b23a0fa9abffe4c091f0f86d53af83ddcbb5f44c8f/aiohttp-3.14.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0bfea68a48c8071d49aabdf5cd9a6939dcb246db65730e8dc76295fe02f7c73c", size = 1912574, upload-time = "2026-07-20T19:52:55.007Z" }, + { url = "https://files.pythonhosted.org/packages/21/ff/bd2b7473510caf352aef3f52a3d4fe10184ec22747df74ab658b4402020f/aiohttp-3.14.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8241ee6c7fff3ebb1e6b237bccc1d90b46d07c06cf978e9f2ecad43e29dac67a", size = 2005478, upload-time = "2026-07-20T19:52:57.401Z" }, + { url = "https://files.pythonhosted.org/packages/c8/ee/db26af0acc994350b653b3a73dddf9ee9886bf2fdb68b23fc98705e76442/aiohttp-3.14.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ec64d1c4605d689ed537ba1e572138e2d4ff603a0cb2bbbfe61d4552c73d19e1", size = 1879709, upload-time = "2026-07-20T19:52:59.778Z" }, + { url = "https://files.pythonhosted.org/packages/6a/4d/592451fd40edca73fcb099d8718668cea36dc1dde873dd0f8e91a4081051/aiohttp-3.14.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0fb26fcc5ebf765095fe0c6ab7501574d3108c57fca9a0d462be15a65c9deb8d", size = 1675699, upload-time = "2026-07-20T19:53:02.11Z" }, + { url = "https://files.pythonhosted.org/packages/2a/3e/c1ce4aa13fd1f910e437684843ea6cf6e0041f91d89a1b0389dce247ee59/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ef710fbb770aefa4def5484eeddb606e70ab3492aa37390def61b35652f6820a", size = 1843542, upload-time = "2026-07-20T19:53:04.385Z" }, + { url = "https://files.pythonhosted.org/packages/aa/a4/3f9e22fda714cc38ef558166ff3326cd2f6f65c33da92ba00e3641cbea54/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:d813f54560b9e5bce170fff7b0adde54d88253928e4add447c36792f27f92125", size = 1827505, upload-time = "2026-07-20T19:53:07.072Z" }, + { url = "https://files.pythonhosted.org/packages/37/9d/260c7b8a25c7cd74bee63ce957556a2d25839a321e9107a089d4da3a51af/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:1aa4f3b44563a88da4407cef8a13438e9e386967720a826a10a633493f69208f", size = 1853751, upload-time = "2026-07-20T19:53:10.012Z" }, + { url = "https://files.pythonhosted.org/packages/f8/d6/7c3cfa191e666bf7b48b4346815900b35b85b43ffff783fd0be52e45fe09/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:4610638d3135afaefadf179bffd1bbf3434d3dc7a5d0a4c4219b99fa976e944d", size = 1668850, upload-time = "2026-07-20T19:53:12.362Z" }, + { url = "https://files.pythonhosted.org/packages/c4/af/d9b8353aee9506dace04ca22c3c4e93b7375d9343c4780c8b512972fc6f9/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:6e30743bd3ab6ad98e9abbad6ccb39c52bcf6f11f9e3d4b6df97afffe8df53f3", size = 1883642, upload-time = "2026-07-20T19:53:14.664Z" }, + { url = "https://files.pythonhosted.org/packages/ed/29/ed64c0a013322570a02e5b0e359df2cfd30ae58ba045748dc78175f15826/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:68a6f7cd8d2c70869a2a5fe97a16e86a4e13a6ed6f0d9e6029aef7573e344cd6", size = 1844092, upload-time = "2026-07-20T19:53:16.995Z" }, + { url = "https://files.pythonhosted.org/packages/3c/74/ce6f229510fdd46ee7365fbb759ffaa3004e0bcc59fbd0ec51d8a8efc775/aiohttp-3.14.2-cp314-cp314t-win32.whl", hash = "sha256:205181d896f73436ac60cf6644e545544c759ab1c3ec8c34cc1e044689611361", size = 474098, upload-time = "2026-07-20T19:53:19.645Z" }, + { url = "https://files.pythonhosted.org/packages/72/4c/877c07a6d97a1a0e5e25a06bab76dd7449b533ff8bb6c281c5af8b09c8d9/aiohttp-3.14.2-cp314-cp314t-win_amd64.whl", hash = "sha256:312d414c294a1e26aa12888e8fd37cd2e1131e9c48ddcf2a4c6b590290d52a49", size = 500480, upload-time = "2026-07-20T19:53:22.227Z" }, + { url = "https://files.pythonhosted.org/packages/42/d8/d4c74bb7990da2ee6116fe262ace41cf376ebc6b0bda694c77eeaab5a509/aiohttp-3.14.2-cp314-cp314t-win_arm64.whl", hash = "sha256:63b840c03979732ec92e570f0bd6beb6311e2b5d19cacbfcd8cc7f6dd2693900", size = 469248, upload-time = "2026-07-20T19:53:24.622Z" }, ] [[package]] From 683ade16e35ca6228b250ba9da99af86686d7c93 Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 14:49:24 +0000 Subject: [PATCH 56/60] Auto-generated library v4.3.0b3 for API v1.72.0-beta.3. (#460) Co-authored-by: GitHub Action --- docs/generation-report.md | 6 + meraki/__init__.py | 2 +- meraki/_version.py | 2 +- meraki/aio/api/appliance.py | 204 ++++++++++++++++++++ meraki/aio/api/assistant.py | 305 ++++++++++++++++++++++++++++-- meraki/aio/api/nac.py | 2 +- meraki/aio/api/organizations.py | 179 ++++++++++++++++++ meraki/aio/api/sm.py | 14 +- meraki/aio/api/switch.py | 8 +- meraki/aio/api/wireless.py | 84 +++++++- meraki/api/appliance.py | 204 ++++++++++++++++++++ meraki/api/assistant.py | 305 ++++++++++++++++++++++++++++-- meraki/api/batch/appliance.py | 83 ++++++++ meraki/api/batch/organizations.py | 91 +++++++++ meraki/api/batch/switch.py | 8 +- meraki/api/batch/wireless.py | 25 +++ meraki/api/nac.py | 2 +- meraki/api/organizations.py | 179 ++++++++++++++++++ meraki/api/sm.py | 14 +- meraki/api/switch.py | 8 +- meraki/api/wireless.py | 84 +++++++- pyproject.toml | 2 +- uv.lock | 2 +- 23 files changed, 1754 insertions(+), 59 deletions(-) diff --git a/docs/generation-report.md b/docs/generation-report.md index 3d74f3be..dd1b334a 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,11 @@ # Generation Report +## 2026-07-22 | Library v4.3.0b3 | API 1.72.0-beta.3 + + +No Python keyword parameter conflicts detected. + + ## 2026-07-16 | Library v4.3.1b0 | API 1.72.0 diff --git a/meraki/__init__.py b/meraki/__init__.py index 83fc9508..eda76d0b 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -52,7 +52,7 @@ from meraki._version import __version__ # noqa: F401 from datetime import datetime -__api_version__ = "1.72.0" +__api_version__ = "1.72.0-beta.3" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index 2f8beec5..31595a63 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "4.3.1b0" +__version__ = "4.3.0b3" diff --git a/meraki/aio/api/appliance.py b/meraki/aio/api/appliance.py index d3dcfdb7..d3557fc0 100644 --- a/meraki/aio/api/appliance.py +++ b/meraki/aio/api/appliance.py @@ -36,6 +36,7 @@ def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): - downlink (object): The port's VLAN settings when in LAN mode - speed (string): Link speed for the port, in Mbps - duplex (string): Duplex configuration for the port + - profile (object): The optional LAN port's profile which it inherits from """ kwargs.update(locals()) @@ -64,6 +65,7 @@ def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): "downlink", "speed", "duplex", + "profile", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -90,6 +92,7 @@ def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs - downlink (object): The port's VLAN settings when in LAN mode - speed (string): Link speed for the port, in Mbps - duplex (string): Duplex configuration for the port + - profile (object): The optional LAN port's profile which it inherits from """ kwargs.update(locals()) @@ -118,6 +121,7 @@ def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs "downlink", "speed", "duplex", + "profile", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1252,6 +1256,101 @@ def getNetworkAppliancePorts(self, networkId: str): return self._session.get(metadata, resource) + def createNetworkAppliancePortsRadiusServer(self, networkId: str, **kwargs): + """ + **Create a shared MX port RADIUS server for a network** + https://developer.cisco.com/meraki/api-v1/#!create-network-appliance-ports-radius-server + + - networkId (string): Network ID + - host (string): IPv4 address or FQDN of the RADIUS server + - port (integer): UDP port the RADIUS server listens on for Access-Requests. Must be between 1 and 65535 + - secret (object): Write-only RADIUS shared secret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "ports", "radius", "servers"], + "operation": "createNetworkAppliancePortsRadiusServer", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/ports/radius/servers" + + body_params = [ + "host", + "port", + "secret", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createNetworkAppliancePortsRadiusServer: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateNetworkAppliancePortsRadiusServer(self, networkId: str, serverId: str, **kwargs): + """ + **Update a shared MX port RADIUS server for a network** + https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-ports-radius-server + + - networkId (string): Network ID + - serverId (string): Server ID + - host (string): IPv4 address or FQDN of the RADIUS server + - port (integer): UDP port the RADIUS server listens on for Access-Requests. Must be between 1 and 65535 + - secret (object): Write-only RADIUS shared secret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "ports", "radius", "servers"], + "operation": "updateNetworkAppliancePortsRadiusServer", + } + networkId = urllib.parse.quote(str(networkId), safe="") + serverId = urllib.parse.quote(str(serverId), safe="") + resource = f"/networks/{networkId}/appliance/ports/radius/servers/{serverId}" + + body_params = [ + "host", + "port", + "secret", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateNetworkAppliancePortsRadiusServer: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteNetworkAppliancePortsRadiusServer(self, networkId: str, serverId: str): + """ + **Delete a network-owned shared MX port RADIUS server** + https://developer.cisco.com/meraki/api-v1/#!delete-network-appliance-ports-radius-server + + - networkId (string): Network ID + - serverId (string): Server ID + """ + + metadata = { + "tags": ["appliance", "configure", "ports", "radius", "servers"], + "operation": "deleteNetworkAppliancePortsRadiusServer", + } + networkId = urllib.parse.quote(str(networkId), safe="") + serverId = urllib.parse.quote(str(serverId), safe="") + resource = f"/networks/{networkId}/appliance/ports/radius/servers/{serverId}" + + return self._session.delete(metadata, resource) + def getNetworkAppliancePort(self, networkId: str, portId: str): """ **Return per-port VLAN settings for a single secure router or security appliance port.** @@ -3479,6 +3578,57 @@ def getOrganizationApplianceDevicesInterfacesPortsByDevice(self, organizationId: return self._session.get(metadata, resource, params) + def getOrganizationApplianceDevicesInterfacesPortsProfilesAssignments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns MX port profile assignments** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-interfaces-ports-profiles-assignments + + - 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 + - serials (array): Optional device serials to filter by. Results include assignments whose device serial is an exact match for any provided serial. If some requested serials are inaccessible, only accessible matches are returned. Maximum: 50 serials per request. + - 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": ["appliance", "configure", "devices", "interfaces", "ports", "profiles", "assignments"], + "operation": "getOrganizationApplianceDevicesInterfacesPortsProfilesAssignments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/devices/interfaces/ports/profiles/assignments" + + query_params = [ + "serials", + "perPage", + "startingAfter", + "endingBefore", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceDevicesInterfacesPortsProfilesAssignments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceDevicesPortsTransceiversReadingsHistoryByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -4382,6 +4532,60 @@ def getOrganizationApplianceInterfacesPacketsOverviewsByDevice( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAppliancePortsRadiusServersByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List shared MX port RADIUS servers by network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-ports-radius-servers-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - networkIds (array): Optional parameter to filter the results by network IDs. Matches are exact. Maximum array size is 100 + - serverIds (array): Optional parameter to filter the results by RADIUS server IDs. Matches are exact. Maximum array size is 100 + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "ports", "radius", "servers", "byNetwork"], + "operation": "getOrganizationAppliancePortsRadiusServersByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/ports/radius/servers/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serverIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serverIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAppliancePortsRadiusServersByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceRoutingVrfsSettings(self, organizationId: str): """ **Return the VRF setting for an organization.** diff --git a/meraki/aio/api/assistant.py b/meraki/aio/api/assistant.py index 2f6c0de3..ab6c50d0 100644 --- a/meraki/aio/api/assistant.py +++ b/meraki/aio/api/assistant.py @@ -6,6 +6,294 @@ def __init__(self, session): super().__init__() self._session = session + def createAdministeredAssistantChatCompletion(self, **kwargs): + """ + **Create a synchronous AI assistant chat completion for user-wide threads** + https://developer.cisco.com/meraki/api-v1/#!create-administered-assistant-chat-completion + + - query (string): Simple text question or instruction to send to the AI assistant. Provide either 'query' for text-only requests or 'content' for multi-modal input. + - content (array): List of multi-modal content blocks. Use instead of 'query' to send text or images. Supports text and image types only; for audio and file support, use the messages endpoint. Maximum 8 parts. + - threadId (string): Existing persisted thread ID to continue synchronously. If omitted, the request is handled as a one-off invocation and the response will not include a reusable thread ID. + - platform (string): Platform identifier. Defaults to MERAKI when omitted. Case-insensitive. + - language (string): Optional language override. Defaults to the user's preferred language. + - country (string): Optional country override. Defaults to the user's country. + """ + + kwargs.update(locals()) + + if "platform" in kwargs: + options = ["DIGITAL_TWIN", "DNAC", "MERAKI", "digital_twin", "dnac", "meraki"] + assert kwargs["platform"] in options, ( + f'''"platform" cannot be "{kwargs["platform"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["assistant", "configure", "chat", "completions"], + "operation": "createAdministeredAssistantChatCompletion", + } + resource = "/administered/assistant/chat/completions" + + body_params = [ + "query", + "content", + "threadId", + "platform", + "language", + "country", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createAdministeredAssistantChatCompletion: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getAdministeredAssistantChatThreads(self, total_pages=1, direction="next", **kwargs): + """ + **List all active user-wide conversation threads for the authenticated user.** + https://developer.cisco.com/meraki/api-v1/#!get-administered-assistant-chat-threads + + - 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 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. + - sort (string): Field to sort results by. Defaults to dateModified. + - sortOrder (string): Sort direction for results. Defaults to desc. + - from (string): Filter threads modified after this timestamp. + - to (string): Filter threads modified before this timestamp. + """ + + kwargs.update(locals()) + + if "sort" in kwargs: + options = ["dateModified", "id", "name"] + assert kwargs["sort"] in options, f'''"sort" cannot be "{kwargs["sort"]}", & must be set to one of: {options}''' + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "getAdministeredAssistantChatThreads", + } + resource = "/administered/assistant/chat/threads" + + query_params = [ + "perPage", + "sort", + "sortOrder", + "from", + "to", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getAdministeredAssistantChatThreads: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createAdministeredAssistantChatThread(self, **kwargs): + """ + **Create a user-wide conversation thread for multi-turn AI assistant interactions.** + https://developer.cisco.com/meraki/api-v1/#!create-administered-assistant-chat-thread + + - threadName (string): Display name for the new thread. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "createAdministeredAssistantChatThread", + } + resource = "/administered/assistant/chat/threads" + + body_params = [ + "threadName", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createAdministeredAssistantChatThread: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getAdministeredAssistantChatThread(self, threadId: str): + """ + **Return a single user-wide conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-administered-assistant-chat-thread + + - threadId (string): Thread ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "getAdministeredAssistantChatThread", + } + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/administered/assistant/chat/threads/{threadId}" + + return self._session.get(metadata, resource) + + def updateAdministeredAssistantChatThread(self, threadId: str, threadName: str, **kwargs): + """ + **Update the name of a user-wide conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!update-administered-assistant-chat-thread + + - threadId (string): Thread ID + - threadName (string): New display name for the thread. + """ + + kwargs = locals() + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "updateAdministeredAssistantChatThread", + } + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/administered/assistant/chat/threads/{threadId}" + + body_params = [ + "threadName", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateAdministeredAssistantChatThread: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteAdministeredAssistantChatThread(self, threadId: str): + """ + **Delete a user-wide conversation thread and all its messages.** + https://developer.cisco.com/meraki/api-v1/#!delete-administered-assistant-chat-thread + + - threadId (string): Thread ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "deleteAdministeredAssistantChatThread", + } + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/administered/assistant/chat/threads/{threadId}" + + return self._session.delete(metadata, resource) + + def getAdministeredAssistantChatThreadMessages(self, threadId: str, total_pages=1, direction="next", **kwargs): + """ + **List messages in a user-wide conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-administered-assistant-chat-thread-messages + + - threadId (string): Thread 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 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. + - sortOrder (string): Sort direction for results by timestamp. Defaults to asc. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "getAdministeredAssistantChatThreadMessages", + } + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/administered/assistant/chat/threads/{threadId}/messages" + + query_params = [ + "perPage", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getAdministeredAssistantChatThreadMessages: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createAdministeredAssistantChatThreadMessage(self, threadId: str, content: list, **kwargs): + """ + **Create a new chat message in an existing user-wide thread.** + https://developer.cisco.com/meraki/api-v1/#!create-administered-assistant-chat-thread-message + + - threadId (string): Thread ID + - content (array): List of message content parts. Supports text, image, audio, and file types. Maximum 8 parts. + """ + + kwargs = locals() + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "createAdministeredAssistantChatThreadMessage", + } + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/administered/assistant/chat/threads/{threadId}/messages" + + body_params = [ + "content", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createAdministeredAssistantChatThreadMessage: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getAdministeredAssistantChatThreadMessage(self, threadId: str, messageId: str): + """ + **Return a single message in a user-wide conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-administered-assistant-chat-thread-message + + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "getAdministeredAssistantChatThreadMessage", + } + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/administered/assistant/chat/threads/{threadId}/messages/{messageId}" + + return self._session.get(metadata, resource) + def getOrganizationAssistantCapabilities(self, organizationId: str): """ **List the AI assistant's available capabilities and agents for this organization.** @@ -472,20 +760,3 @@ def createOrganizationAssistantChatThreadMessageFeedback( ) return self._session.post(metadata, resource, payload) - - def getOrganizationAssistantQueryLimits(self, organizationId: str): - """ - **Get query limits for the AI assistant for this organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-query-limits - - - organizationId (string): Organization ID - """ - - metadata = { - "tags": ["assistant", "configure", "queryLimits"], - "operation": "getOrganizationAssistantQueryLimits", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/assistant/queryLimits" - - return self._session.get(metadata, resource) diff --git a/meraki/aio/api/nac.py b/meraki/aio/api/nac.py index 0dcad5ca..fdaef7ce 100644 --- a/meraki/aio/api/nac.py +++ b/meraki/aio/api/nac.py @@ -725,7 +725,7 @@ def getOrganizationNacClientsGroups(self, organizationId: str, total_pages=1, di - direction (string): direction to paginate, either "next" (default) or "prev" page - sortOrder (string): Query parameter for specifying the direction of sorting to use for the given sortKey. - sortKey (string): Query parameter to sort the client groups by the value of the specified key. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 3000. Default is 1000. - 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. - search (string): Optional parameter to fuzzy search on client groups. diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 149f00ef..839704d5 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -2295,6 +2295,130 @@ def getOrganizationAssuranceAlertsOverviewHistorical( return self._session.get(metadata, resource, params) + def getOrganizationAssuranceAlertsProfiles(self, organizationId: str): + """ + **List the alert profiles for this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-alerts-profiles + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "alerts", "profiles"], + "operation": "getOrganizationAssuranceAlertsProfiles", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/alerts/profiles" + + return self._session.get(metadata, resource) + + def createOrganizationAssuranceAlertsProfile( + self, organizationId: str, name: str, networkIds: list, alertTypes: list, configuration: dict, **kwargs + ): + """ + **Create an alert profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assurance-alerts-profile + + - organizationId (string): Organization ID + - name (string): Name of the alert profile + - networkIds (array): Networks associated with this alert profile + - alertTypes (array): Alert types associated with this alert profile + - configuration (object): Alert configuration for this profile + - alertScheduleId (string): ID of the alert schedule associated with this profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "alerts", "profiles"], + "operation": "createOrganizationAssuranceAlertsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/alerts/profiles" + + body_params = [ + "name", + "networkIds", + "alertTypes", + "alertScheduleId", + "configuration", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssuranceAlertsProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationAssuranceAlertsProfile( + self, organizationId: str, profileId: str, name: str, networkIds: list, alertTypes: list, configuration: dict, **kwargs + ): + """ + **Update an alert profile** + https://developer.cisco.com/meraki/api-v1/#!update-organization-assurance-alerts-profile + + - organizationId (string): Organization ID + - profileId (string): Profile ID + - name (string): Name of the alert profile + - networkIds (array): Networks associated with this alert profile + - alertTypes (array): Alert types associated with this alert profile + - configuration (object): Alert configuration for this profile + - alertScheduleId (string): ID of the alert schedule associated with this profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "alerts", "profiles"], + "operation": "updateOrganizationAssuranceAlertsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") + resource = f"/organizations/{organizationId}/assurance/alerts/profiles/{profileId}" + + body_params = [ + "name", + "networkIds", + "alertTypes", + "alertScheduleId", + "configuration", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationAssuranceAlertsProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationAssuranceAlertsProfile(self, organizationId: str, profileId: str): + """ + **Delete an alert profile for this organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-assurance-alerts-profile + + - organizationId (string): Organization ID + - profileId (string): Profile ID + """ + + metadata = { + "tags": ["organizations", "configure", "alerts", "profiles"], + "operation": "deleteOrganizationAssuranceAlertsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") + resource = f"/organizations/{organizationId}/assurance/alerts/profiles/{profileId}" + + return self._session.delete(metadata, resource) + def restoreOrganizationAssuranceAlerts(self, organizationId: str, alertIds: list, **kwargs): """ **Restore health alerts from dismissed** @@ -8449,6 +8573,61 @@ def getOrganizationAccessGroups(self, organizationId: str, total_pages=1, direct return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationIamAdminsAdministratorsLoginsHistory( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List administrator login attempts for the organization (Dashboard Login Attempts)** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-admins-administrators-logins-history + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. + - perPage (integer): The number of entries per page returned. Acceptable range is 10 - 1000. Default is 100. + - 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. + - sortOrder (string): Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'descending'. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "monitor", "iam", "admins", "administrators", "logins", "history"], + "operation": "getOrganizationIamAdminsAdministratorsLoginsHistory", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/admins/administrators/logins/history" + + query_params = [ + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationIamAdminsAdministratorsLoginsHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def resolveOrganizationIamAdminsAdministratorsMePermissions( self, organizationId: str, total_pages=1, direction="next", **kwargs ): diff --git a/meraki/aio/api/sm.py b/meraki/aio/api/sm.py index 263da776..0fc01f3f 100644 --- a/meraki/aio/api/sm.py +++ b/meraki/aio/api/sm.py @@ -855,12 +855,17 @@ def getNetworkSmDeviceWlanLists(self, networkId: str, deviceId: str): return self._session.get(metadata, resource) - def getNetworkSmProfiles(self, networkId: str, **kwargs): + def getNetworkSmProfiles(self, networkId: str, total_pages=1, direction="next", **kwargs): """ - **List all profiles in a network** + **List profiles in a network** https://developer.cisco.com/meraki/api-v1/#!get-network-sm-profiles - networkId (string): Network 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. 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. - payloadTypes (array): Filter by payload types """ @@ -874,6 +879,9 @@ def getNetworkSmProfiles(self, networkId: str, **kwargs): resource = f"/networks/{networkId}/sm/profiles" query_params = [ + "perPage", + "startingAfter", + "endingBefore", "payloadTypes", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} @@ -892,7 +900,7 @@ def getNetworkSmProfiles(self, networkId: str, **kwargs): if invalid and self._session._logger: self._session._logger.warning(f"getNetworkSmProfiles: ignoring unrecognized kwargs: {invalid}") - return self._session.get(metadata, resource, params) + return self._session.get_pages(metadata, resource, params, total_pages, direction) def getNetworkSmScripts(self, networkId: str): """ diff --git a/meraki/aio/api/switch.py b/meraki/aio/api/switch.py index e4436722..0c0166e2 100644 --- a/meraki/aio/api/switch.py +++ b/meraki/aio/api/switch.py @@ -3861,17 +3861,19 @@ def getOrganizationSwitchClientsConnectionsSwitchPortStatusByClient(self, organi return self._session.get(metadata, resource, params) - def cloneOrganizationSwitchProfilesToTemplateNetwork(self, organizationId: str, **kwargs): + def cloneOrganizationSwitchProfilesToTemplateNetwork( + self, organizationId: str, profileIds: list, templateNodeGroupId: str, **kwargs + ): """ **Clone existing switch templates into a destination template network.** https://developer.cisco.com/meraki/api-v1/#!clone-organization-switch-profiles-to-template-network - organizationId (string): Organization ID - profileIds (array): Switch profile IDs to clone - - templateNodeGroupId (string): Destination template network ID + - templateNodeGroupId (string): Canonical destination configuration template ID, as returned by getOrganizationConfigTemplates. Legacy numeric switch node group IDs are also accepted """ - kwargs.update(locals()) + kwargs = locals() metadata = { "tags": ["switch", "configure"], diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index aea304c7..f28394ea 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -2639,6 +2639,37 @@ def getNetworkWirelessSsids(self, networkId: str): return self._session.get(metadata, resource) + def updateNetworkWirelessSsidsOwe(self, networkId: str, transitions: list, **kwargs): + """ + **Update the OWE transition pairs for a network** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssids-owe + + - networkId (string): Network ID + - transitions (array): Array of OWE transition pairs + """ + + kwargs = locals() + + metadata = { + "tags": ["wireless", "configure", "ssids", "owe"], + "operation": "updateNetworkWirelessSsidsOwe", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/ssids/owe" + + body_params = [ + "transitions", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkWirelessSsidsOwe: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkWirelessSsid(self, networkId: str, number: str): """ **Return a single MR SSID** @@ -10790,6 +10821,55 @@ def getOrganizationWirelessSsidsOpenRoamingByNetwork(self, organizationId: str, return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationWirelessSsidsOweByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns an array of objects, each containing OWE transition pairs for the corresponding network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-owe-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter OWE transition configuration by Network Id. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "ssids", "owe", "byNetwork"], + "operation": "getOrganizationWirelessSsidsOweByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/owe/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessSsidsOweByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationWirelessSsidsPoliciesClientExclusionBySsid( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -10805,7 +10885,7 @@ def getOrganizationWirelessSsidsPoliciesClientExclusionBySsid( - 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. - networkIds (array): Optional parameter to filter by Network ID. - includeDisabledSsids (boolean): Optional parameter to include disabled SSID's. - - ssidNumbers (array): Optional parameter to filter by SSID numbers. + - ssidNumbers (array): Optional parameter to filter by SSID numbers. Valid values are 0-14. Maximum 15 SSID numbers. """ kwargs.update(locals()) @@ -10861,7 +10941,7 @@ def getOrganizationWirelessSsidsPoliciesClientExclusionStaticExclusionsBySsid( - 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. - networkIds (array): Optional parameter to filter Network ID. - includeDisabledSsids (boolean): Optional parameter to include disabled SSID's. - - ssidNumbers (array): Optional parameter to filter by SSID numbers. + - ssidNumbers (array): Optional parameter to filter by SSID numbers. Valid values are 0-14. Maximum 15 SSID numbers. """ kwargs.update(locals()) diff --git a/meraki/api/appliance.py b/meraki/api/appliance.py index 7b122133..87c69779 100644 --- a/meraki/api/appliance.py +++ b/meraki/api/appliance.py @@ -36,6 +36,7 @@ def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): - downlink (object): The port's VLAN settings when in LAN mode - speed (string): Link speed for the port, in Mbps - duplex (string): Duplex configuration for the port + - profile (object): The optional LAN port's profile which it inherits from """ kwargs.update(locals()) @@ -64,6 +65,7 @@ def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): "downlink", "speed", "duplex", + "profile", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -90,6 +92,7 @@ def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs - downlink (object): The port's VLAN settings when in LAN mode - speed (string): Link speed for the port, in Mbps - duplex (string): Duplex configuration for the port + - profile (object): The optional LAN port's profile which it inherits from """ kwargs.update(locals()) @@ -118,6 +121,7 @@ def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs "downlink", "speed", "duplex", + "profile", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1252,6 +1256,101 @@ def getNetworkAppliancePorts(self, networkId: str): return self._session.get(metadata, resource) + def createNetworkAppliancePortsRadiusServer(self, networkId: str, **kwargs): + """ + **Create a shared MX port RADIUS server for a network** + https://developer.cisco.com/meraki/api-v1/#!create-network-appliance-ports-radius-server + + - networkId (string): Network ID + - host (string): IPv4 address or FQDN of the RADIUS server + - port (integer): UDP port the RADIUS server listens on for Access-Requests. Must be between 1 and 65535 + - secret (object): Write-only RADIUS shared secret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "ports", "radius", "servers"], + "operation": "createNetworkAppliancePortsRadiusServer", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/appliance/ports/radius/servers" + + body_params = [ + "host", + "port", + "secret", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createNetworkAppliancePortsRadiusServer: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateNetworkAppliancePortsRadiusServer(self, networkId: str, serverId: str, **kwargs): + """ + **Update a shared MX port RADIUS server for a network** + https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-ports-radius-server + + - networkId (string): Network ID + - serverId (string): Server ID + - host (string): IPv4 address or FQDN of the RADIUS server + - port (integer): UDP port the RADIUS server listens on for Access-Requests. Must be between 1 and 65535 + - secret (object): Write-only RADIUS shared secret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "ports", "radius", "servers"], + "operation": "updateNetworkAppliancePortsRadiusServer", + } + networkId = urllib.parse.quote(str(networkId), safe="") + serverId = urllib.parse.quote(str(serverId), safe="") + resource = f"/networks/{networkId}/appliance/ports/radius/servers/{serverId}" + + body_params = [ + "host", + "port", + "secret", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateNetworkAppliancePortsRadiusServer: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteNetworkAppliancePortsRadiusServer(self, networkId: str, serverId: str): + """ + **Delete a network-owned shared MX port RADIUS server** + https://developer.cisco.com/meraki/api-v1/#!delete-network-appliance-ports-radius-server + + - networkId (string): Network ID + - serverId (string): Server ID + """ + + metadata = { + "tags": ["appliance", "configure", "ports", "radius", "servers"], + "operation": "deleteNetworkAppliancePortsRadiusServer", + } + networkId = urllib.parse.quote(str(networkId), safe="") + serverId = urllib.parse.quote(str(serverId), safe="") + resource = f"/networks/{networkId}/appliance/ports/radius/servers/{serverId}" + + return self._session.delete(metadata, resource) + def getNetworkAppliancePort(self, networkId: str, portId: str): """ **Return per-port VLAN settings for a single secure router or security appliance port.** @@ -3479,6 +3578,57 @@ def getOrganizationApplianceDevicesInterfacesPortsByDevice(self, organizationId: return self._session.get(metadata, resource, params) + def getOrganizationApplianceDevicesInterfacesPortsProfilesAssignments( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns MX port profile assignments** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-devices-interfaces-ports-profiles-assignments + + - 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 + - serials (array): Optional device serials to filter by. Results include assignments whose device serial is an exact match for any provided serial. If some requested serials are inaccessible, only accessible matches are returned. Maximum: 50 serials per request. + - 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": ["appliance", "configure", "devices", "interfaces", "ports", "profiles", "assignments"], + "operation": "getOrganizationApplianceDevicesInterfacesPortsProfilesAssignments", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/devices/interfaces/ports/profiles/assignments" + + query_params = [ + "serials", + "perPage", + "startingAfter", + "endingBefore", + ] + 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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationApplianceDevicesInterfacesPortsProfilesAssignments: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceDevicesPortsTransceiversReadingsHistoryByDevice( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -4382,6 +4532,60 @@ def getOrganizationApplianceInterfacesPacketsOverviewsByDevice( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAppliancePortsRadiusServersByNetwork( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List shared MX port RADIUS servers by network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-ports-radius-servers-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. + - 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. + - networkIds (array): Optional parameter to filter the results by network IDs. Matches are exact. Maximum array size is 100 + - serverIds (array): Optional parameter to filter the results by RADIUS server IDs. Matches are exact. Maximum array size is 100 + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["appliance", "configure", "ports", "radius", "servers", "byNetwork"], + "operation": "getOrganizationAppliancePortsRadiusServersByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/appliance/ports/radius/servers/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "networkIds", + "serverIds", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "serverIds", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAppliancePortsRadiusServersByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationApplianceRoutingVrfsSettings(self, organizationId: str): """ **Return the VRF setting for an organization.** diff --git a/meraki/api/assistant.py b/meraki/api/assistant.py index 45c79123..eed478e8 100644 --- a/meraki/api/assistant.py +++ b/meraki/api/assistant.py @@ -6,6 +6,294 @@ def __init__(self, session): super(Assistant, self).__init__() self._session = session + def createAdministeredAssistantChatCompletion(self, **kwargs): + """ + **Create a synchronous AI assistant chat completion for user-wide threads** + https://developer.cisco.com/meraki/api-v1/#!create-administered-assistant-chat-completion + + - query (string): Simple text question or instruction to send to the AI assistant. Provide either 'query' for text-only requests or 'content' for multi-modal input. + - content (array): List of multi-modal content blocks. Use instead of 'query' to send text or images. Supports text and image types only; for audio and file support, use the messages endpoint. Maximum 8 parts. + - threadId (string): Existing persisted thread ID to continue synchronously. If omitted, the request is handled as a one-off invocation and the response will not include a reusable thread ID. + - platform (string): Platform identifier. Defaults to MERAKI when omitted. Case-insensitive. + - language (string): Optional language override. Defaults to the user's preferred language. + - country (string): Optional country override. Defaults to the user's country. + """ + + kwargs.update(locals()) + + if "platform" in kwargs: + options = ["DIGITAL_TWIN", "DNAC", "MERAKI", "digital_twin", "dnac", "meraki"] + assert kwargs["platform"] in options, ( + f'''"platform" cannot be "{kwargs["platform"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["assistant", "configure", "chat", "completions"], + "operation": "createAdministeredAssistantChatCompletion", + } + resource = "/administered/assistant/chat/completions" + + body_params = [ + "query", + "content", + "threadId", + "platform", + "language", + "country", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createAdministeredAssistantChatCompletion: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getAdministeredAssistantChatThreads(self, total_pages=1, direction="next", **kwargs): + """ + **List all active user-wide conversation threads for the authenticated user.** + https://developer.cisco.com/meraki/api-v1/#!get-administered-assistant-chat-threads + + - 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 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. + - sort (string): Field to sort results by. Defaults to dateModified. + - sortOrder (string): Sort direction for results. Defaults to desc. + - from (string): Filter threads modified after this timestamp. + - to (string): Filter threads modified before this timestamp. + """ + + kwargs.update(locals()) + + if "sort" in kwargs: + options = ["dateModified", "id", "name"] + assert kwargs["sort"] in options, f'''"sort" cannot be "{kwargs["sort"]}", & must be set to one of: {options}''' + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "getAdministeredAssistantChatThreads", + } + resource = "/administered/assistant/chat/threads" + + query_params = [ + "perPage", + "sort", + "sortOrder", + "from", + "to", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"getAdministeredAssistantChatThreads: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createAdministeredAssistantChatThread(self, **kwargs): + """ + **Create a user-wide conversation thread for multi-turn AI assistant interactions.** + https://developer.cisco.com/meraki/api-v1/#!create-administered-assistant-chat-thread + + - threadName (string): Display name for the new thread. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "createAdministeredAssistantChatThread", + } + resource = "/administered/assistant/chat/threads" + + body_params = [ + "threadName", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createAdministeredAssistantChatThread: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getAdministeredAssistantChatThread(self, threadId: str): + """ + **Return a single user-wide conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-administered-assistant-chat-thread + + - threadId (string): Thread ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "getAdministeredAssistantChatThread", + } + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/administered/assistant/chat/threads/{threadId}" + + return self._session.get(metadata, resource) + + def updateAdministeredAssistantChatThread(self, threadId: str, threadName: str, **kwargs): + """ + **Update the name of a user-wide conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!update-administered-assistant-chat-thread + + - threadId (string): Thread ID + - threadName (string): New display name for the thread. + """ + + kwargs = locals() + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "updateAdministeredAssistantChatThread", + } + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/administered/assistant/chat/threads/{threadId}" + + body_params = [ + "threadName", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateAdministeredAssistantChatThread: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteAdministeredAssistantChatThread(self, threadId: str): + """ + **Delete a user-wide conversation thread and all its messages.** + https://developer.cisco.com/meraki/api-v1/#!delete-administered-assistant-chat-thread + + - threadId (string): Thread ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "deleteAdministeredAssistantChatThread", + } + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/administered/assistant/chat/threads/{threadId}" + + return self._session.delete(metadata, resource) + + def getAdministeredAssistantChatThreadMessages(self, threadId: str, total_pages=1, direction="next", **kwargs): + """ + **List messages in a user-wide conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-administered-assistant-chat-thread-messages + + - threadId (string): Thread 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 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. + - sortOrder (string): Sort direction for results by timestamp. Defaults to asc. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["asc", "desc"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "getAdministeredAssistantChatThreadMessages", + } + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/administered/assistant/chat/threads/{threadId}/messages" + + query_params = [ + "perPage", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getAdministeredAssistantChatThreadMessages: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def createAdministeredAssistantChatThreadMessage(self, threadId: str, content: list, **kwargs): + """ + **Create a new chat message in an existing user-wide thread.** + https://developer.cisco.com/meraki/api-v1/#!create-administered-assistant-chat-thread-message + + - threadId (string): Thread ID + - content (array): List of message content parts. Supports text, image, audio, and file types. Maximum 8 parts. + """ + + kwargs = locals() + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "createAdministeredAssistantChatThreadMessage", + } + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/administered/assistant/chat/threads/{threadId}/messages" + + body_params = [ + "content", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createAdministeredAssistantChatThreadMessage: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def getAdministeredAssistantChatThreadMessage(self, threadId: str, messageId: str): + """ + **Return a single message in a user-wide conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-administered-assistant-chat-thread-message + + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "getAdministeredAssistantChatThreadMessage", + } + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/administered/assistant/chat/threads/{threadId}/messages/{messageId}" + + return self._session.get(metadata, resource) + def getOrganizationAssistantCapabilities(self, organizationId: str): """ **List the AI assistant's available capabilities and agents for this organization.** @@ -472,20 +760,3 @@ def createOrganizationAssistantChatThreadMessageFeedback( ) return self._session.post(metadata, resource, payload) - - def getOrganizationAssistantQueryLimits(self, organizationId: str): - """ - **Get query limits for the AI assistant for this organization.** - https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-query-limits - - - organizationId (string): Organization ID - """ - - metadata = { - "tags": ["assistant", "configure", "queryLimits"], - "operation": "getOrganizationAssistantQueryLimits", - } - organizationId = urllib.parse.quote(str(organizationId), safe="") - resource = f"/organizations/{organizationId}/assistant/queryLimits" - - return self._session.get(metadata, resource) diff --git a/meraki/api/batch/appliance.py b/meraki/api/batch/appliance.py index be960b51..ff7f9697 100644 --- a/meraki/api/batch/appliance.py +++ b/meraki/api/batch/appliance.py @@ -18,6 +18,7 @@ def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): - downlink (object): The port's VLAN settings when in LAN mode - speed (string): Link speed for the port, in Mbps - duplex (string): Duplex configuration for the port + - profile (object): The optional LAN port's profile which it inherits from """ kwargs.update(locals()) @@ -42,6 +43,7 @@ def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): "downlink", "speed", "duplex", + "profile", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -64,6 +66,7 @@ def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs - downlink (object): The port's VLAN settings when in LAN mode - speed (string): Link speed for the port, in Mbps - duplex (string): Duplex configuration for the port + - profile (object): The optional LAN port's profile which it inherits from """ kwargs.update(locals()) @@ -88,6 +91,7 @@ def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs "downlink", "speed", "duplex", + "profile", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { @@ -374,6 +378,85 @@ def deleteNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str): } return action + def createNetworkAppliancePortsRadiusServer(self, networkId: str, **kwargs): + """ + **Create a shared MX port RADIUS server for a network. These network-owned servers are shared by all MX ports in the network using '802.1X', 'MAC RADIUS' (MAC-based RADIUS authentication), or 'hybrid' (802.1X authentication with MAC-based RADIUS fallback) access policies. A network can have at most 3 shared servers. This beta operation is available only to organizations with beta API access and may change before GA.** + https://developer.cisco.com/meraki/api-v1/#!create-network-appliance-ports-radius-server + + - networkId (string): Network ID + - host (string): IPv4 address or FQDN of the RADIUS server + - port (integer): UDP port the RADIUS server listens on for Access-Requests. Must be between 1 and 65535 + - secret (object): Write-only RADIUS shared secret + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/appliance/ports/radius/servers" + + body_params = [ + "host", + "port", + "secret", + ] + 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 updateNetworkAppliancePortsRadiusServer(self, networkId: str, serverId: str, **kwargs): + """ + **Update a shared MX port RADIUS server for a network. These network-owned servers are shared by all MX ports in the network using '802.1X', 'MAC RADIUS' (MAC-based RADIUS authentication), or 'hybrid' (802.1X authentication with MAC-based RADIUS fallback) access policies. Omitted attributes are left unchanged. This beta operation is available only to organizations with beta API access and may change before GA.** + https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-ports-radius-server + + - networkId (string): Network ID + - serverId (string): Server ID + - host (string): IPv4 address or FQDN of the RADIUS server + - port (integer): UDP port the RADIUS server listens on for Access-Requests. Must be between 1 and 65535 + - secret (object): Write-only RADIUS shared secret + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + serverId = urllib.parse.quote(serverId, safe="") + resource = f"/networks/{networkId}/appliance/ports/radius/servers/{serverId}" + + body_params = [ + "host", + "port", + "secret", + ] + 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 deleteNetworkAppliancePortsRadiusServer(self, networkId: str, serverId: str): + """ + **Delete a network-owned shared MX port RADIUS server. This beta operation is available only to organizations with beta API access and may change before GA.** + https://developer.cisco.com/meraki/api-v1/#!delete-network-appliance-ports-radius-server + + - networkId (string): Network ID + - serverId (string): Server ID + """ + + networkId = urllib.parse.quote(networkId, safe="") + serverId = urllib.parse.quote(serverId, safe="") + resource = f"/networks/{networkId}/appliance/ports/radius/servers/{serverId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): """ **Update the per-port VLAN settings for a single secure router or security appliance port.** diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index 83e98edf..5f259fa0 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -617,6 +617,97 @@ def updateOrganizationApiPushReceiversProfile(self, organizationId: str, iname: } return action + def createOrganizationAssuranceAlertsProfile( + self, organizationId: str, name: str, networkIds: list, alertTypes: list, configuration: dict, **kwargs + ): + """ + **Create an alert profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assurance-alerts-profile + + - organizationId (string): Organization ID + - name (string): Name of the alert profile + - networkIds (array): Networks associated with this alert profile + - alertTypes (array): Alert types associated with this alert profile + - configuration (object): Alert configuration for this profile + - alertScheduleId (string): ID of the alert schedule associated with this profile + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + resource = f"/organizations/{organizationId}/assurance/alerts/profiles" + + body_params = [ + "name", + "networkIds", + "alertTypes", + "alertScheduleId", + "configuration", + ] + 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 updateOrganizationAssuranceAlertsProfile( + self, organizationId: str, profileId: str, name: str, networkIds: list, alertTypes: list, configuration: dict, **kwargs + ): + """ + **Update an alert profile** + https://developer.cisco.com/meraki/api-v1/#!update-organization-assurance-alerts-profile + + - organizationId (string): Organization ID + - profileId (string): Profile ID + - name (string): Name of the alert profile + - networkIds (array): Networks associated with this alert profile + - alertTypes (array): Alert types associated with this alert profile + - configuration (object): Alert configuration for this profile + - alertScheduleId (string): ID of the alert schedule associated with this profile + """ + + kwargs.update(locals()) + + organizationId = urllib.parse.quote(organizationId, safe="") + profileId = urllib.parse.quote(profileId, safe="") + resource = f"/organizations/{organizationId}/assurance/alerts/profiles/{profileId}" + + body_params = [ + "name", + "networkIds", + "alertTypes", + "alertScheduleId", + "configuration", + ] + 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 deleteOrganizationAssuranceAlertsProfile(self, organizationId: str, profileId: str): + """ + **Delete an alert profile for this organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-assurance-alerts-profile + + - organizationId (string): Organization ID + - profileId (string): Profile ID + """ + + organizationId = urllib.parse.quote(organizationId, safe="") + profileId = urllib.parse.quote(profileId, safe="") + resource = f"/organizations/{organizationId}/assurance/alerts/profiles/{profileId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def createOrganizationAuthRadiusServer(self, organizationId: str, address: str, secret: str, **kwargs): """ **Add an organization-wide RADIUS server** diff --git a/meraki/api/batch/switch.py b/meraki/api/batch/switch.py index f69cd322..9c2b27f8 100644 --- a/meraki/api/batch/switch.py +++ b/meraki/api/batch/switch.py @@ -2037,17 +2037,19 @@ def updateOrganizationConfigTemplateSwitchProfilePort( } return action - def cloneOrganizationSwitchProfilesToTemplateNetwork(self, organizationId: str, **kwargs): + def cloneOrganizationSwitchProfilesToTemplateNetwork( + self, organizationId: str, profileIds: list, templateNodeGroupId: str, **kwargs + ): """ **Clone existing switch templates into a destination template network.** https://developer.cisco.com/meraki/api-v1/#!clone-organization-switch-profiles-to-template-network - organizationId (string): Organization ID - profileIds (array): Switch profile IDs to clone - - templateNodeGroupId (string): Destination template network ID + - templateNodeGroupId (string): Canonical destination configuration template ID, as returned by getOrganizationConfigTemplates. Legacy numeric switch node group IDs are also accepted """ - kwargs.update(locals()) + kwargs = locals() organizationId = urllib.parse.quote(organizationId, safe="") resource = f"/organizations/{organizationId}/switch/cloneProfilesToTemplateNetwork" diff --git a/meraki/api/batch/wireless.py b/meraki/api/batch/wireless.py index df63b44e..6a4e9ce8 100644 --- a/meraki/api/batch/wireless.py +++ b/meraki/api/batch/wireless.py @@ -841,6 +841,31 @@ def updateNetworkWirelessSettings(self, networkId: str, **kwargs): } return action + def updateNetworkWirelessSsidsOwe(self, networkId: str, transitions: list, **kwargs): + """ + **Update the OWE transition pairs for a network** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssids-owe + + - networkId (string): Network ID + - transitions (array): Array of OWE transition pairs + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/wireless/ssids/owe" + + body_params = [ + "transitions", + ] + 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 updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): """ **Update the attributes of an MR SSID** diff --git a/meraki/api/nac.py b/meraki/api/nac.py index 067cc48e..09bd2070 100644 --- a/meraki/api/nac.py +++ b/meraki/api/nac.py @@ -725,7 +725,7 @@ def getOrganizationNacClientsGroups(self, organizationId: str, total_pages=1, di - direction (string): direction to paginate, either "next" (default) or "prev" page - sortOrder (string): Query parameter for specifying the direction of sorting to use for the given sortKey. - sortKey (string): Query parameter to sort the client groups by the value of the specified key. - - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 3000. Default is 1000. - 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. - search (string): Optional parameter to fuzzy search on client groups. diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index 34eb2ca0..1b009e3c 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -2295,6 +2295,130 @@ def getOrganizationAssuranceAlertsOverviewHistorical( return self._session.get(metadata, resource, params) + def getOrganizationAssuranceAlertsProfiles(self, organizationId: str): + """ + **List the alert profiles for this organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-alerts-profiles + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["organizations", "configure", "alerts", "profiles"], + "operation": "getOrganizationAssuranceAlertsProfiles", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/alerts/profiles" + + return self._session.get(metadata, resource) + + def createOrganizationAssuranceAlertsProfile( + self, organizationId: str, name: str, networkIds: list, alertTypes: list, configuration: dict, **kwargs + ): + """ + **Create an alert profile** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assurance-alerts-profile + + - organizationId (string): Organization ID + - name (string): Name of the alert profile + - networkIds (array): Networks associated with this alert profile + - alertTypes (array): Alert types associated with this alert profile + - configuration (object): Alert configuration for this profile + - alertScheduleId (string): ID of the alert schedule associated with this profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "alerts", "profiles"], + "operation": "createOrganizationAssuranceAlertsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/alerts/profiles" + + body_params = [ + "name", + "networkIds", + "alertTypes", + "alertScheduleId", + "configuration", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssuranceAlertsProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + def updateOrganizationAssuranceAlertsProfile( + self, organizationId: str, profileId: str, name: str, networkIds: list, alertTypes: list, configuration: dict, **kwargs + ): + """ + **Update an alert profile** + https://developer.cisco.com/meraki/api-v1/#!update-organization-assurance-alerts-profile + + - organizationId (string): Organization ID + - profileId (string): Profile ID + - name (string): Name of the alert profile + - networkIds (array): Networks associated with this alert profile + - alertTypes (array): Alert types associated with this alert profile + - configuration (object): Alert configuration for this profile + - alertScheduleId (string): ID of the alert schedule associated with this profile + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "alerts", "profiles"], + "operation": "updateOrganizationAssuranceAlertsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") + resource = f"/organizations/{organizationId}/assurance/alerts/profiles/{profileId}" + + body_params = [ + "name", + "networkIds", + "alertTypes", + "alertScheduleId", + "configuration", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationAssuranceAlertsProfile: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + def deleteOrganizationAssuranceAlertsProfile(self, organizationId: str, profileId: str): + """ + **Delete an alert profile for this organization** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-assurance-alerts-profile + + - organizationId (string): Organization ID + - profileId (string): Profile ID + """ + + metadata = { + "tags": ["organizations", "configure", "alerts", "profiles"], + "operation": "deleteOrganizationAssuranceAlertsProfile", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") + resource = f"/organizations/{organizationId}/assurance/alerts/profiles/{profileId}" + + return self._session.delete(metadata, resource) + def restoreOrganizationAssuranceAlerts(self, organizationId: str, alertIds: list, **kwargs): """ **Restore health alerts from dismissed** @@ -8449,6 +8573,61 @@ def getOrganizationAccessGroups(self, organizationId: str, total_pages=1, direct return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationIamAdminsAdministratorsLoginsHistory( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List administrator login attempts for the organization (Dashboard Login Attempts)** + https://developer.cisco.com/meraki/api-v1/#!get-organization-iam-admins-administrators-logins-history + + - 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 + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 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 90 days. The default is 7 days. + - perPage (integer): The number of entries per page returned. Acceptable range is 10 - 1000. Default is 100. + - 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. + - sortOrder (string): Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'descending'. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ["ascending", "descending"] + assert kwargs["sortOrder"] in options, ( + f'''"sortOrder" cannot be "{kwargs["sortOrder"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["organizations", "monitor", "iam", "admins", "administrators", "logins", "history"], + "operation": "getOrganizationIamAdminsAdministratorsLoginsHistory", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/iam/admins/administrators/logins/history" + + query_params = [ + "t0", + "t1", + "timespan", + "perPage", + "startingAfter", + "endingBefore", + "sortOrder", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationIamAdminsAdministratorsLoginsHistory: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def resolveOrganizationIamAdminsAdministratorsMePermissions( self, organizationId: str, total_pages=1, direction="next", **kwargs ): diff --git a/meraki/api/sm.py b/meraki/api/sm.py index e4f811c1..26a01905 100644 --- a/meraki/api/sm.py +++ b/meraki/api/sm.py @@ -855,12 +855,17 @@ def getNetworkSmDeviceWlanLists(self, networkId: str, deviceId: str): return self._session.get(metadata, resource) - def getNetworkSmProfiles(self, networkId: str, **kwargs): + def getNetworkSmProfiles(self, networkId: str, total_pages=1, direction="next", **kwargs): """ - **List all profiles in a network** + **List profiles in a network** https://developer.cisco.com/meraki/api-v1/#!get-network-sm-profiles - networkId (string): Network 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. 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. - payloadTypes (array): Filter by payload types """ @@ -874,6 +879,9 @@ def getNetworkSmProfiles(self, networkId: str, **kwargs): resource = f"/networks/{networkId}/sm/profiles" query_params = [ + "perPage", + "startingAfter", + "endingBefore", "payloadTypes", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} @@ -892,7 +900,7 @@ def getNetworkSmProfiles(self, networkId: str, **kwargs): if invalid and self._session._logger: self._session._logger.warning(f"getNetworkSmProfiles: ignoring unrecognized kwargs: {invalid}") - return self._session.get(metadata, resource, params) + return self._session.get_pages(metadata, resource, params, total_pages, direction) def getNetworkSmScripts(self, networkId: str): """ diff --git a/meraki/api/switch.py b/meraki/api/switch.py index 327f942b..487d2810 100644 --- a/meraki/api/switch.py +++ b/meraki/api/switch.py @@ -3861,17 +3861,19 @@ def getOrganizationSwitchClientsConnectionsSwitchPortStatusByClient(self, organi return self._session.get(metadata, resource, params) - def cloneOrganizationSwitchProfilesToTemplateNetwork(self, organizationId: str, **kwargs): + def cloneOrganizationSwitchProfilesToTemplateNetwork( + self, organizationId: str, profileIds: list, templateNodeGroupId: str, **kwargs + ): """ **Clone existing switch templates into a destination template network.** https://developer.cisco.com/meraki/api-v1/#!clone-organization-switch-profiles-to-template-network - organizationId (string): Organization ID - profileIds (array): Switch profile IDs to clone - - templateNodeGroupId (string): Destination template network ID + - templateNodeGroupId (string): Canonical destination configuration template ID, as returned by getOrganizationConfigTemplates. Legacy numeric switch node group IDs are also accepted """ - kwargs.update(locals()) + kwargs = locals() metadata = { "tags": ["switch", "configure"], diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index dbad8dfa..fe83ddef 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -2639,6 +2639,37 @@ def getNetworkWirelessSsids(self, networkId: str): return self._session.get(metadata, resource) + def updateNetworkWirelessSsidsOwe(self, networkId: str, transitions: list, **kwargs): + """ + **Update the OWE transition pairs for a network** + https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssids-owe + + - networkId (string): Network ID + - transitions (array): Array of OWE transition pairs + """ + + kwargs = locals() + + metadata = { + "tags": ["wireless", "configure", "ssids", "owe"], + "operation": "updateNetworkWirelessSsidsOwe", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/wireless/ssids/owe" + + body_params = [ + "transitions", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkWirelessSsidsOwe: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + def getNetworkWirelessSsid(self, networkId: str, number: str): """ **Return a single MR SSID** @@ -10790,6 +10821,55 @@ def getOrganizationWirelessSsidsOpenRoamingByNetwork(self, organizationId: str, return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationWirelessSsidsOweByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns an array of objects, each containing OWE transition pairs for the corresponding network** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-ssids-owe-by-network + + - 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 + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. + - 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. + - networkIds (array): Optional parameter to filter OWE transition configuration by Network Id. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["wireless", "configure", "ssids", "owe", "byNetwork"], + "operation": "getOrganizationWirelessSsidsOweByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/ssids/owe/byNetwork" + + query_params = [ + "perPage", + "startingAfter", + "endingBefore", + "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()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessSsidsOweByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationWirelessSsidsPoliciesClientExclusionBySsid( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -10805,7 +10885,7 @@ def getOrganizationWirelessSsidsPoliciesClientExclusionBySsid( - 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. - networkIds (array): Optional parameter to filter by Network ID. - includeDisabledSsids (boolean): Optional parameter to include disabled SSID's. - - ssidNumbers (array): Optional parameter to filter by SSID numbers. + - ssidNumbers (array): Optional parameter to filter by SSID numbers. Valid values are 0-14. Maximum 15 SSID numbers. """ kwargs.update(locals()) @@ -10861,7 +10941,7 @@ def getOrganizationWirelessSsidsPoliciesClientExclusionStaticExclusionsBySsid( - 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. - networkIds (array): Optional parameter to filter Network ID. - includeDisabledSsids (boolean): Optional parameter to include disabled SSID's. - - ssidNumbers (array): Optional parameter to filter by SSID numbers. + - ssidNumbers (array): Optional parameter to filter by SSID numbers. Valid values are 0-14. Maximum 15 SSID numbers. """ kwargs.update(locals()) diff --git a/pyproject.toml b/pyproject.toml index dce1a499..22c03dac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "4.3.1b0" +version = "4.3.0b3" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index 2bf7ca85..ecef2086 100644 --- a/uv.lock +++ b/uv.lock @@ -549,7 +549,7 @@ wheels = [ [[package]] name = "meraki" -version = "4.3.1b0" +version = "4.3.0b3" source = { editable = "." } dependencies = [ { name = "aiohttp" }, From 27768af078645a4cc89a3d94d7ead8ef99b29931 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 15:39:01 +0000 Subject: [PATCH 57/60] chore(deps-dev): bump pre-commit in the all-deps group (#461) Bumps the all-deps group with 1 update: [pre-commit](https://github.com/pre-commit/pre-commit). Updates `pre-commit` from 4.6.0 to 4.6.1 - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v4.6.0...v4.6.1) --- updated-dependencies: - dependency-name: pre-commit dependency-version: 4.6.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uv.lock b/uv.lock index ecef2086..c444afc1 100644 --- a/uv.lock +++ b/uv.lock @@ -705,7 +705,7 @@ wheels = [ [[package]] name = "pre-commit" -version = "4.6.0" +version = "4.6.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cfgv" }, @@ -714,9 +714,9 @@ dependencies = [ { name = "pyyaml" }, { name = "virtualenv" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/8e/22/2de9408ac81acbb8a7d05d4cc064a152ccf33b3d480ebe0cd292153db239/pre_commit-4.6.0.tar.gz", hash = "sha256:718d2208cef53fdc38206e40524a6d4d9576d103eb16f0fec11c875e7716e9d9", size = 198525, upload-time = "2026-04-21T20:31:41.613Z" } +sdist = { url = "https://files.pythonhosted.org/packages/25/3a/ddb78f32a0814e66b18a099377a106a2dcdce92d86a034d69d65df9b256e/pre_commit-4.6.1.tar.gz", hash = "sha256:03e809865c7d178b9979d06c761fcbfe6808fdaded8581a745bb110e52050421", size = 198646, upload-time = "2026-07-21T20:56:58.225Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/80/6e/4b28b62ecb6aae56769c34a8ff1d661473ec1e9519e2d5f8b2c150086b26/pre_commit-4.6.0-py2.py3-none-any.whl", hash = "sha256:e2cf246f7299edcabcf15f9b0571fdce06058527f0a06535068a86d38089f29b", size = 226472, upload-time = "2026-04-21T20:31:40.092Z" }, + { url = "https://files.pythonhosted.org/packages/fb/49/bc925106abcdac498074f2cbe6137e94e09f418dd2b7775df5b577dc0313/pre_commit-4.6.1-py2.py3-none-any.whl", hash = "sha256:0e3b2942510d1fb34eec167a3ec57331bf8442122f1153a9fb8b58f5c49b2717", size = 226186, upload-time = "2026-07-21T20:56:57.064Z" }, ] [[package]] From 5402cbe94b1ff5472dfcd80aa912998827ca3858 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 15:38:00 +0000 Subject: [PATCH 58/60] chore(deps): bump aiohttp from 3.14.2 to 3.14.3 in the all-deps group (#464) Bumps the all-deps group with 1 update: [aiohttp](https://github.com/aio-libs/aiohttp). Updates `aiohttp` from 3.14.2 to 3.14.3 - [Changelog](https://github.com/aio-libs/aiohttp/blob/v3.14.3/CHANGES.rst) - [Commits](https://github.com/aio-libs/aiohttp/compare/v3.14.2...v3.14.3) --- updated-dependencies: - dependency-name: aiohttp dependency-version: 3.14.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 204 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/uv.lock b/uv.lock index c444afc1..7c709e2a 100644 --- a/uv.lock +++ b/uv.lock @@ -13,7 +13,7 @@ wheels = [ [[package]] name = "aiohttp" -version = "3.14.2" +version = "3.14.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiohappyeyeballs" }, @@ -25,108 +25,108 @@ dependencies = [ { name = "typing-extensions", marker = "python_full_version < '3.13'" }, { name = "yarl" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/1d/cc/58f26f118d8099f84e009ce560b9148a3f803e63fa8473b57feb67241875/aiohttp-3.14.2.tar.gz", hash = "sha256:f96821eb2ae2f12b0dfa799eafbf221f5621a9220b457b4744a269a63a5f3a6c", size = 7969860, upload-time = "2026-07-20T19:53:26.881Z" } +sdist = { url = "https://files.pythonhosted.org/packages/58/d9/22ce5786ac0c1653ae8b6c23bded02c1686d11f0dbb45b31ce128e0df985/aiohttp-3.14.3.tar.gz", hash = "sha256:9491196535a88924a60afd5b5f434b5b203b6cc616250878dbdb223a8f7844bc", size = 7971213, upload-time = "2026-07-23T01:57:27.037Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f6/4a/a6c1426d2fb3cddd901575436803733caaaeb7ac0a49aa72d1930d2e3ab6/aiohttp-3.14.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:56432ee8f7abe47c97717cfbf5c32430463ea8a7138e12a87b7891fa6084c8ff", size = 764168, upload-time = "2026-07-20T19:50:07.389Z" }, - { url = "https://files.pythonhosted.org/packages/0c/62/88ae65afc3590719788cbff3b2e0f56e6850f53ca34114cbb371e677c543/aiohttp-3.14.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6c244f7a65cbec04c830a301aae443c529d4dbca5fddfd4b19e5a179d896adfd", size = 516255, upload-time = "2026-07-20T19:50:08.84Z" }, - { url = "https://files.pythonhosted.org/packages/8f/bc/ad9b767785b014f2f57497a2ccf67e3d4316d153f7ed1c7715fbbd7573fe/aiohttp-3.14.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1c05afdd28ecacce5a1f63275a2e3dce09efddd3a63d143ee9799fda83989c8d", size = 514670, upload-time = "2026-07-20T19:50:10.325Z" }, - { url = "https://files.pythonhosted.org/packages/48/94/697aef63f15ef354f64723eaac6ccfb289d59b99699b3b7cb1ff663b2045/aiohttp-3.14.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a57f39d6ec155932853b6b0f130cbbafab3208240fa807f29a2c96ea52b77ae1", size = 1780650, upload-time = "2026-07-20T19:50:11.676Z" }, - { url = "https://files.pythonhosted.org/packages/99/f9/6a1994c1bf138403cf10171cb618571a330ae5683a5803b1ef29b5723d7f/aiohttp-3.14.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1fc31339824ec922cb7424d624b5b6c11d8942d077b2585e5bd602ca1a1e27ed", size = 1737710, upload-time = "2026-07-20T19:50:13.401Z" }, - { url = "https://files.pythonhosted.org/packages/8b/ba/abe8d5015148b2cd7189473789461058dcf88ae202d4cf1cbecaf291a7ef/aiohttp-3.14.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d93854e215dcc7c88e4f530827193c1a594e2662931d8dbe7cca3abf52a7082d", size = 1845568, upload-time = "2026-07-20T19:50:15.168Z" }, - { url = "https://files.pythonhosted.org/packages/c2/89/98a2688810f469f19f2d02a298426a37b6e1cc420230a8cc7d6c85af7a01/aiohttp-3.14.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:87c9b03be0c18c3b3587be979149830381e37ac4a6ca8557dbe72e44fcad66c3", size = 1928485, upload-time = "2026-07-20T19:50:16.922Z" }, - { url = "https://files.pythonhosted.org/packages/5a/fd/c980f64f5e5bff22f07968bcc6af1b64167dfd21dbbffda86f2d153fc802/aiohttp-3.14.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bc1a0793dce8fa9bb6906411e57fb18a2f1c31357b04172541b92b30337362a7", size = 1786216, upload-time = "2026-07-20T19:50:18.598Z" }, - { url = "https://files.pythonhosted.org/packages/da/80/c710ce9c7f22fcbb83366aa64a5ccf03dced35ab09a6e37545656a6df01e/aiohttp-3.14.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:2f1b9540d2d0f2f95590528a1effd0ba5370f6ec189ac925e70b5eecae02dc77", size = 1636921, upload-time = "2026-07-20T19:50:20.201Z" }, - { url = "https://files.pythonhosted.org/packages/e1/b2/56ce1b0c535d188ef94c05bccbf3f5b1aaea1231fcb073318977bdd917e9/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c0a968b04fecf7c94e502015860ad1e2e112c6b761e97b6fdf65fbb374e22b73", size = 1753040, upload-time = "2026-07-20T19:50:21.857Z" }, - { url = "https://files.pythonhosted.org/packages/86/61/4318a947139a21d4e1a40e7f5a92799d0fe28feffaca6640a4a165e62b0e/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:2d2eedae227cd5cbd0bccc5e759f71e1af2cd77b7f74ce413bb9a2b87f94a272", size = 1760811, upload-time = "2026-07-20T19:50:23.623Z" }, - { url = "https://files.pythonhosted.org/packages/81/b0/2012165377d029ceb925c9e5f42b0b30a39d89cf7e494c4100f3ab8d27c6/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:9d3f4c68b2c2cd282b65e558cebf4b27c8b440ab511f2b938a643d3598df2ddb", size = 1819760, upload-time = "2026-07-20T19:50:25.34Z" }, - { url = "https://files.pythonhosted.org/packages/16/e5/1de93ba3bc18edb87f71594326bedafdc38fe725da8118b7d36fd56610f8/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:d32a70b8bf8836fd80d4169d9e34eb032cd2a7cbccb0b9cf00eac1f40732467c", size = 1628145, upload-time = "2026-07-20T19:50:26.992Z" }, - { url = "https://files.pythonhosted.org/packages/66/8f/adc9e8592449ee08f72fcce94b7f3f1a9bbf0591a46026e4d322e5a70d7a/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:386ce4e709b4cc40f9ef9a132ad8e672d2d164a65451305672df656e7794c68e", size = 1832577, upload-time = "2026-07-20T19:50:28.546Z" }, - { url = "https://files.pythonhosted.org/packages/9b/7f/700500700513b1b63967a24c4e189aad377e18f9d67b7387b3418d6213cb/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bc0ed30b942c3bd755583d74bb00b90248c067d20b1f8301e4489a53a33aa65f", size = 1774814, upload-time = "2026-07-20T19:50:30.144Z" }, - { url = "https://files.pythonhosted.org/packages/a5/d6/580f9b2ab4c78d9fbf9d56c85fb7f7d4d22d667b27df8032ab9bf7140e37/aiohttp-3.14.2-cp311-cp311-win32.whl", hash = "sha256:b5ed2c7dacebf4950d6b4a1b22548e4d709bb15e0287e064a7cdb32ada65893a", size = 455968, upload-time = "2026-07-20T19:50:31.722Z" }, - { url = "https://files.pythonhosted.org/packages/96/76/33665ae48e24e01c6dfa15ed14d9d9eec1349577cef497f3b26210621f0a/aiohttp-3.14.2-cp311-cp311-win_amd64.whl", hash = "sha256:bf7951959a8e89f2d4a1e719e60d3ea4e8fc26f011ee3aed09598ad786b112f7", size = 480978, upload-time = "2026-07-20T19:50:33.299Z" }, - { url = "https://files.pythonhosted.org/packages/5e/19/00963031da42bd23716032f57b2a8414c5355eb1abc41805b2b41173040c/aiohttp-3.14.2-cp311-cp311-win_arm64.whl", hash = "sha256:c167127a3b6089ef78ac2e33582c38040d51688ee28474b5053acf55f192187b", size = 452900, upload-time = "2026-07-20T19:50:35.049Z" }, - { url = "https://files.pythonhosted.org/packages/e0/99/8737b10b6fa447371541a3b2cdbf9703c31ecf3afff4998f2f0633646a57/aiohttp-3.14.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:30e41662123806e4590a0440585122ac33c89a2465a8be81cc1b50656ca0e432", size = 754562, upload-time = "2026-07-20T19:50:36.672Z" }, - { url = "https://files.pythonhosted.org/packages/7c/e5/fd624b8b46d99dfd8f7f75111569b5ee21850539e914eed04ce39e4455ea/aiohttp-3.14.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:dbc45e2773c66d14fbd337754e9bf23932beef539bd539716a721f5b5f372034", size = 509386, upload-time = "2026-07-20T19:50:38.268Z" }, - { url = "https://files.pythonhosted.org/packages/6d/a8/473db85d08b862724c506b51af2b9c6327e9e95cbd297c4c6f33968be1a8/aiohttp-3.14.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:476cf7fac10619ad6d08e1df0225d07b5a8d57c04963a171ad845d5a349d47ef", size = 511905, upload-time = "2026-07-20T19:50:39.862Z" }, - { url = "https://files.pythonhosted.org/packages/c1/e8/aa5ebff13ac5e39ffae8add143757e936d1c2ceb726b82786e5f5cb9912c/aiohttp-3.14.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:40bedff39ea83185f3f98a41155dd9da28b365c432e5bd90e7be140bcef0b7f3", size = 1764968, upload-time = "2026-07-20T19:50:41.559Z" }, - { url = "https://files.pythonhosted.org/packages/f4/22/23ec6d3d3f24f5961c7be73d5127481c992d6c92ca213f336ed8f0ff1453/aiohttp-3.14.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a26f14006883fc7662e21041b4311eac1acbc977a5c43aacb27ff17f8a4c28b2", size = 1740635, upload-time = "2026-07-20T19:50:43.363Z" }, - { url = "https://files.pythonhosted.org/packages/a0/7b/f8966d2d08f0582525ef02d5af007d2d2467cb733abf1d1f7849a02a6b98/aiohttp-3.14.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:673217cbc9370ebf8cd048b0889d7cbe922b7bb48f4e4c02d31cfefa140bd946", size = 1810447, upload-time = "2026-07-20T19:50:45.258Z" }, - { url = "https://files.pythonhosted.org/packages/39/f5/239f2a828b033ac244237074db7b560ad3279bb1e934bb462dbde19f3877/aiohttp-3.14.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b39dbdbe30a44958d63f3f8baa2af68f24ec8a631dcd18a33dd76dfa2a0eb917", size = 1905896, upload-time = "2026-07-20T19:50:47.022Z" }, - { url = "https://files.pythonhosted.org/packages/6c/6e/fb84b8dafc521026355aadbeed484fc1ec44a05aae927de309f204c1f0af/aiohttp-3.14.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d15f618255fcbe5f54689403aa4c2a90b6f2e6ebc96b295b1cb0e868c1c12384", size = 1792052, upload-time = "2026-07-20T19:50:48.683Z" }, - { url = "https://files.pythonhosted.org/packages/ba/c4/25b199009f164ee02599b9b0962d22e6533d212418e49df9f4fdb37fe2eb/aiohttp-3.14.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7ae767b7dffd316cc2d0abf3e1f90132b4c1a2819a32d8bcb1ba749800ea6273", size = 1590939, upload-time = "2026-07-20T19:50:50.702Z" }, - { url = "https://files.pythonhosted.org/packages/ad/f5/96d7540a52620433db3822267008a1697fc816979c109a4f535855ac893c/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3ec4b6501a076b2f73844256da17d6b7acb15bb74ee0e908a67feb9412371166", size = 1725039, upload-time = "2026-07-20T19:50:52.506Z" }, - { url = "https://files.pythonhosted.org/packages/f6/50/1a06abbeec14a2bcb46124ca6e281ed4ccb3e9006542ded6bc89a0ce5224/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:7e328d02fb46b9a8dbfa070d98967e8b7eaa1d9ee10ae03fb664bdf30d58ccf0", size = 1764748, upload-time = "2026-07-20T19:50:54.336Z" }, - { url = "https://files.pythonhosted.org/packages/70/5d/b8821b362306627ea8ca11fe49ec47cba18e7c75d975fa5f6710ad93845c/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c0c7f2e5fe10910d5ab76438f269cc41bb7e499fd48ded978e926360ab1790c8", size = 1777119, upload-time = "2026-07-20T19:50:56.306Z" }, - { url = "https://files.pythonhosted.org/packages/81/e5/805d9d49e66c6358574ad70dd731031585d18fe95ae65b857bc378bccc9a/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:66de80888db2176655f8df0b705b817f5ae3834e6566cc2caa89360871d90195", size = 1580047, upload-time = "2026-07-20T19:50:58.316Z" }, - { url = "https://files.pythonhosted.org/packages/c6/fa/1536f272d5ad93bf8b75043b02b94c24bf4e6b55a849d3287553ad6da97e/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:f2f9950b2dd0fc896ab520ea2366b7df6484d3d164a65d5e9f28f7b0e5742d8a", size = 1796861, upload-time = "2026-07-20T19:51:00.373Z" }, - { url = "https://files.pythonhosted.org/packages/e6/f3/86dfd6152bb706351cf5c6b45f0f6a1818a4e559d1e88d899c4c673c23a8/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:cc4435b16dc246c5dfa7f2f8ee71b10a30765018a090ee36e99f356b1e9b75cc", size = 1768687, upload-time = "2026-07-20T19:51:02.214Z" }, - { url = "https://files.pythonhosted.org/packages/57/af/14b98e07fcd1a2b37ebb2f950309821eaa56e0eac3d32fc23dc55227e49b/aiohttp-3.14.2-cp312-cp312-win32.whl", hash = "sha256:4ca802547f1128008addfc21b24959f5cbf30a8952d365e7daa078a0d884b242", size = 451437, upload-time = "2026-07-20T19:51:03.954Z" }, - { url = "https://files.pythonhosted.org/packages/38/20/8478c05702a369b6d0800e40e0c5f9a289ff482d0921faec1eb17727339d/aiohttp-3.14.2-cp312-cp312-win_amd64.whl", hash = "sha256:e5efff8bfd27c44ce1bfdf92ce838362d9316ed8b2ed2f89f581dbe0bbe05acf", size = 476776, upload-time = "2026-07-20T19:51:05.705Z" }, - { url = "https://files.pythonhosted.org/packages/d0/d0/e550bb1cb4fc82de3bdbe2add061cc0cedb34f2e7f01ada78fba94493ca1/aiohttp-3.14.2-cp312-cp312-win_arm64.whl", hash = "sha256:0eb1c9fd51f231ac8dc9d5824d5c2efc45337d429db0123fa9d4c20f570fdfc3", size = 447928, upload-time = "2026-07-20T19:51:07.523Z" }, - { url = "https://files.pythonhosted.org/packages/96/3a/8b8779f8e813d3a33cf16bc836a7ea7bf3c27b6588d42efa36b0c32fcb58/aiohttp-3.14.2-cp313-cp313-android_21_arm64_v8a.whl", hash = "sha256:17eecd6ee9bfc8e31b6003137d74f349f0ac3797111a2df87e23acb4a7a912ea", size = 506205, upload-time = "2026-07-20T19:51:09.215Z" }, - { url = "https://files.pythonhosted.org/packages/d1/73/2f45204b37ecc4ce2c54b8b67254d70a8ea3b629c4083d58f3e2d27991cb/aiohttp-3.14.2-cp313-cp313-android_21_x86_64.whl", hash = "sha256:ce8dfb58f012f76258f29951d38935ac928b32ae24a480f30761f2ed5036fa78", size = 515116, upload-time = "2026-07-20T19:51:10.914Z" }, - { url = "https://files.pythonhosted.org/packages/f0/22/8f4424de1f50df4fbb74ea32006f9cff798ae0d346ffa6be7b6f0caca719/aiohttp-3.14.2-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:4181d72e0e6d1735c1fae56381193c6ae211d584d06413980c00775b9b2a176a", size = 486244, upload-time = "2026-07-20T19:51:12.878Z" }, - { url = "https://files.pythonhosted.org/packages/c2/53/60de022260f5d2d31976bc5f50db708e10671f0ac5da515402adcc6b4d4d/aiohttp-3.14.2-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:0e56babe35076f69ec9327833b71439eeccd10f51fe56c1a533da8f24923f014", size = 492260, upload-time = "2026-07-20T19:51:14.555Z" }, - { url = "https://files.pythonhosted.org/packages/b2/6f/d3ccc31c15cd33888670b8f1bf1dc06f3239b4edd156fc818078e87ae628/aiohttp-3.14.2-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:6b63709e259e3b3d7922b235606564e91ed4c224e777cc0ca4cae04f5f559206", size = 502174, upload-time = "2026-07-20T19:51:16.3Z" }, - { url = "https://files.pythonhosted.org/packages/40/20/52d21e485652f4708015ce27dd3029e63140e0bdb0dcc7bf72dc0bc3f4ad/aiohttp-3.14.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f7c10c4d0b33888a68c192d883d1390d4596c116a59bf689e6d352c6739b7940", size = 750878, upload-time = "2026-07-20T19:51:18.013Z" }, - { url = "https://files.pythonhosted.org/packages/2e/49/1220bdc73d568431cc3856667405d78c2e95eb57fed2b9ffa5e825932ab2/aiohttp-3.14.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8f7b19e27b78a3a927b1932af93af7645806153e8f541cee8fe856426142503f", size = 508459, upload-time = "2026-07-20T19:51:19.876Z" }, - { url = "https://files.pythonhosted.org/packages/ed/f1/39177406ce0ae5cb2782b35e848c0edf6e09d6e082df636eeacdbdfa70bd/aiohttp-3.14.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:18fcc3a5cc7dde1d8f7903e309055294c28894c9434588645817e374f3b83d03", size = 509179, upload-time = "2026-07-20T19:51:21.719Z" }, - { url = "https://files.pythonhosted.org/packages/87/f7/6d081c2ee838458492c7ae1062399bdd68f149811d257d4502e79a25b306/aiohttp-3.14.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:09d1b0deec698d1198eb0b8f910dd9432d856985abbfea3f06be8b296a6619b4", size = 1761346, upload-time = "2026-07-20T19:51:23.437Z" }, - { url = "https://files.pythonhosted.org/packages/1d/ed/0befea4ae533f09c3a60f0d10b923cd4a90027a1bf49dfafaa24eeee08b8/aiohttp-3.14.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:cabaaecb4c6888bd9abafac151051377534dad4c3859a386b6325f39d3732f99", size = 1735057, upload-time = "2026-07-20T19:51:25.512Z" }, - { url = "https://files.pythonhosted.org/packages/de/03/c1d89fcd94907f93a08d4aadbb4e1d9bd3d7d6c9f94bc9c17689de38107b/aiohttp-3.14.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:114299c08cce8ad4ebb21fafe766378864109e88ad8cf63cf6acb384ff844a57", size = 1800389, upload-time = "2026-07-20T19:51:27.585Z" }, - { url = "https://files.pythonhosted.org/packages/3a/8b/edbac4d1a1cde3571588a1e5b40637df5acee43158efdf3ae9a161fde8ab/aiohttp-3.14.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6bea8451e26cd67645d9b2ee18232e438ddfc36cea35feecb4537f2359fc7030", size = 1895342, upload-time = "2026-07-20T19:51:29.794Z" }, - { url = "https://files.pythonhosted.org/packages/0c/31/2e9ca3b21c07ea8a001e2b142cb01401fd34fd07b248a0b95a04c3ebc4ec/aiohttp-3.14.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:46b8887aa303075c1e5b24123f314a1a7bbfa03d0213dff8bb70503b2148c853", size = 1789175, upload-time = "2026-07-20T19:51:31.744Z" }, - { url = "https://files.pythonhosted.org/packages/6f/91/b57d3d13a80fbf765b19ae0c38d783a3a23f35b1cb82ae3b22f91abe6c24/aiohttp-3.14.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:de3b04a3f7b40ad7f1bcd3540dd447cf9bd93d57a49969bca522cbcf01290f08", size = 1586845, upload-time = "2026-07-20T19:51:33.571Z" }, - { url = "https://files.pythonhosted.org/packages/69/e8/a2f5f9f6219cd21190e9b50e2cbc978d12a2aab748d0aa7c6ee930db15c3/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:42372e1f1a8dca0dcd5daf922849004ec1120042d0e24f14c926f97d2275ca79", size = 1724839, upload-time = "2026-07-20T19:51:35.518Z" }, - { url = "https://files.pythonhosted.org/packages/de/d4/a2b9442336051714dd8dbd419b9f4a1003c45bb850ee0f3af87f2743e867/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:7871c94f3400358530ac4906dd7a526c5a24099cd5c48f53ffc4b1cb5037d7d7", size = 1756306, upload-time = "2026-07-20T19:51:37.459Z" }, - { url = "https://files.pythonhosted.org/packages/ab/93/22c94a599b2c4ea6ab88f1b912d90883f1fba5235b587ea9f13b148e9a0f/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f8f371794319a8185e61e15ba5e1be8407b986ebce1ade11856c02d24e090577", size = 1769133, upload-time = "2026-07-20T19:51:39.9Z" }, - { url = "https://files.pythonhosted.org/packages/fe/db/a4e4c207f7023e83c281a7cf3579f227bade48f1899cb6588c0ed6ae54de/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:af63ac06bad85191e6a0c4a733cb3c55adb99f8105bc7ce9913391561159a49a", size = 1578671, upload-time = "2026-07-20T19:51:42.418Z" }, - { url = "https://files.pythonhosted.org/packages/8d/6f/33746ba4947b8193652fc7ed0533e09f93b118e39777228f3029e5677c17/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:8c2cdb684c153f377157e856257ee8535c75d8478343e4bb1e83ca73bdfa3d31", size = 1791778, upload-time = "2026-07-20T19:51:44.298Z" }, - { url = "https://files.pythonhosted.org/packages/06/41/323856cb0ec9076b1f9a135eb0684f5f984dd97989a087873768aa34ca2f/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ceff4f84c1d928654faa6bcb0437ed095b279baae2a35fcfe5a3cbe0d8b9725d", size = 1768490, upload-time = "2026-07-20T19:51:46.279Z" }, - { url = "https://files.pythonhosted.org/packages/39/f0/09e29e457b6fb49253cbb61354ed2541fdf23ac192bddbb57bb34bc93d9c/aiohttp-3.14.2-cp313-cp313-win32.whl", hash = "sha256:15292b08ce7dd45e268fce542228894b4735102e8ee77163bd665b35fc2b5598", size = 451064, upload-time = "2026-07-20T19:51:48.194Z" }, - { url = "https://files.pythonhosted.org/packages/0b/76/b44703eafcfe1446f4f975be1ef2406042955425eaf56450e71b50506c49/aiohttp-3.14.2-cp313-cp313-win_amd64.whl", hash = "sha256:fc2d8e7373ceba7e1c7e9dc00adac854c2701a6d443fd21d4af2e49342d727bd", size = 476140, upload-time = "2026-07-20T19:51:50.285Z" }, - { url = "https://files.pythonhosted.org/packages/72/48/b095935c9e72a253439f80ec757b91d4733e0a9a98b63e108d84aaf39b08/aiohttp-3.14.2-cp313-cp313-win_arm64.whl", hash = "sha256:70570f50bda5037b416db8fcba595cf808ecf0fdce12d64e850b5ae1db7f64d4", size = 447585, upload-time = "2026-07-20T19:51:52.333Z" }, - { url = "https://files.pythonhosted.org/packages/4f/ca/716f720dccc3032e40dc80d0ab2d87a7365270a714976a85bdff73bc7254/aiohttp-3.14.2-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:7719cef2a9dc5e10cd5f476ec1744b25c5ac4da733a9a687d91c42de7d4afe30", size = 508899, upload-time = "2026-07-20T19:51:54.165Z" }, - { url = "https://files.pythonhosted.org/packages/f5/80/786166589e71b3f3cfce56b414170fe5008462d0bff100bd8837285632f6/aiohttp-3.14.2-cp314-cp314-android_24_x86_64.whl", hash = "sha256:3523ec0cc524a413699f25ec8340f3da368484bc9d5f2a1bf87f233ac20599bf", size = 514722, upload-time = "2026-07-20T19:51:56.208Z" }, - { url = "https://files.pythonhosted.org/packages/eb/b7/539961cf3e3d3f179ea4b20d456cbdb67d1163c68f2e95bf220438a5afd5/aiohttp-3.14.2-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:c8ab295ee58332ef8fbd62727df90540836dfcf7a61f545d0f2771223b80bf25", size = 488082, upload-time = "2026-07-20T19:51:58.293Z" }, - { url = "https://files.pythonhosted.org/packages/60/34/c7708eac8edacca9c049a0d6f5fa610005ac3c5634c9ea4751134263bf4e/aiohttp-3.14.2-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:71501bc03ede681401269c569e6f9306c761c1c7d4296675e8e78dd07147070f", size = 494140, upload-time = "2026-07-20T19:52:00.158Z" }, - { url = "https://files.pythonhosted.org/packages/d8/e1/076b88de36b4ebea62d1c0b225e32bc8a452ee71b2aded82878fa5fa7c9e/aiohttp-3.14.2-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:052478c7d01035d805302db50c2ef626b1c1ba0fe2f6d4a22ae6eaeb43bf2316", size = 502670, upload-time = "2026-07-20T19:52:02.097Z" }, - { url = "https://files.pythonhosted.org/packages/a9/71/7b7720ffe7e521aaa79a853ebff4c17937f4b5a3a586e9d13b0f38050b35/aiohttp-3.14.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:b0d49be9d9a210b2c993bf32b1eda03f949f7bcda68fc4f718ae8085ae3fb4b8", size = 756406, upload-time = "2026-07-20T19:52:04.082Z" }, - { url = "https://files.pythonhosted.org/packages/b9/9a/c67c7e22fff7d7b17387e718451b30eb89f55df6b8d13d2d7f91daba6505/aiohttp-3.14.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:5fe25c4c44ea5b56fd4512e2065e09384987fc8cc98e41bc8749efe12f653abb", size = 510106, upload-time = "2026-07-20T19:52:06.001Z" }, - { url = "https://files.pythonhosted.org/packages/27/2a/3caebd640229663263585d4d31898331a3937752f2e1f5ec0af509fa31be/aiohttp-3.14.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:7e254b0d636957174a03ca210289e867a62bb9502081e1b44a8c2bb1f6266ecd", size = 512876, upload-time = "2026-07-20T19:52:08.036Z" }, - { url = "https://files.pythonhosted.org/packages/27/04/86945210e491493f5cd025efe5e6d8fc8a9e8aaf36f943c40f52c34eda7e/aiohttp-3.14.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a6b0ce033d49dd3c6a2566b387e322a9f9029110d67902f0d64571c0fd4b73d8", size = 1750050, upload-time = "2026-07-20T19:52:09.998Z" }, - { url = "https://files.pythonhosted.org/packages/11/d8/356c62552b4db60af5ad8cddeafa6f837788918201f1b5f2466565c986b5/aiohttp-3.14.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:41b5b66b1ac2c48b61e420691eb9741d17d9068f2bc23b5ee3e750faa564bc8f", size = 1707177, upload-time = "2026-07-20T19:52:12.39Z" }, - { url = "https://files.pythonhosted.org/packages/77/2d/41bb20bed3df1d6dc7fc231ca4ffb72177fd151bf4205a4ade7a93e03501/aiohttp-3.14.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:30a5ed81f752f182961237414a3cd0af209c0f74f06d66f66f9fcb8964f4978d", size = 1803795, upload-time = "2026-07-20T19:52:14.705Z" }, - { url = "https://files.pythonhosted.org/packages/63/21/ad9fe6786a1d2758bcfdae4dbc1d6869ffc7b1e0571530a508de3cdde09b/aiohttp-3.14.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1b9251f43d78ff675c0ddfcd53ba61abecc1f74eedc6287bb6657f6c6a033fe7", size = 1876539, upload-time = "2026-07-20T19:52:16.965Z" }, - { url = "https://files.pythonhosted.org/packages/0e/cb/d213f4fd7af279d82c4b46d30de22db93a01296d77a8d8e535289637da54/aiohttp-3.14.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cf7930e83a12801b2e253d41cc8bf5553f61c0cfabef182a72ae13472cc81803", size = 1761130, upload-time = "2026-07-20T19:52:19.127Z" }, - { url = "https://files.pythonhosted.org/packages/46/4f/0792fe1a24c2b4b506d07350e980b0626c149fe73e68dd37dfb30ed89813/aiohttp-3.14.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:abb33120daba5e5643a757790ece44d638a5a11eb0598312e6e7ec2f1bd1a5a3", size = 1583576, upload-time = "2026-07-20T19:52:21.465Z" }, - { url = "https://files.pythonhosted.org/packages/46/ad/551c302f534f9cd6105bd16902e69dc64c726aa729127203f47ed4bddb2a/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:983a68048a48f35ed08aadfcc1ba55de9a121aa91be48a764965c9ec532b94b5", size = 1714139, upload-time = "2026-07-20T19:52:23.636Z" }, - { url = "https://files.pythonhosted.org/packages/e3/cf/a3be8601d2e80ccf7bd4f79807629cede5425d72c02636f06b1ad6a8290a/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:fef094bfc2f4e991a998af066fc6e3956a409ef799f5cbad2365175357181f2e", size = 1724352, upload-time = "2026-07-20T19:52:26.043Z" }, - { url = "https://files.pythonhosted.org/packages/c8/b1/6b55f6448b43a3338749f37fc6a14e7ac7dad121d2d585f22c1dd3d324fe/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:2f7ca81d936d820ae479971a6b6214b1b867420b5b58e54a1e7157716a943754", size = 1770749, upload-time = "2026-07-20T19:52:28.467Z" }, - { url = "https://files.pythonhosted.org/packages/39/58/b3f1cf6af47fa0b0d51c6e2b98b2bf0326b44a932d74915f3c0874413ea8/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:da4f142fa078fedbdb3f88d0542ad9315656224e167502ae274cbba818b90c90", size = 1577547, upload-time = "2026-07-20T19:52:30.658Z" }, - { url = "https://files.pythonhosted.org/packages/d4/e2/1d79f1ab35593d70dabed98936ae842ac90d12847c9a62bba4a19d6005a4/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:3d4238e50a378f5ac69a1e0162715c676bd082dede2e5c4f67ca7fd0014cb09d", size = 1781840, upload-time = "2026-07-20T19:52:33.021Z" }, - { url = "https://files.pythonhosted.org/packages/01/73/770be856c6fc861563999081a5fe2d44e16b4255f5fd94b2217a2349ca65/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:03330676d8caa28bb33fa7104b0d542d9aac93350abcd91bf68e64abd531c320", size = 1745757, upload-time = "2026-07-20T19:52:35.541Z" }, - { url = "https://files.pythonhosted.org/packages/bc/0b/861fdbe3ff90b503a4d0a12276623f4afbe54c237ca876fc560125c270a3/aiohttp-3.14.2-cp314-cp314-win32.whl", hash = "sha256:43387429e4f2ec4047aaf9f935db003d4aa1268ea9021164877fd6b012b6396a", size = 455863, upload-time = "2026-07-20T19:52:37.634Z" }, - { url = "https://files.pythonhosted.org/packages/f7/03/cc8234d0f06fe4b0e1777c7ed313cc9014f078f72a9a0cbdc144965d1bd7/aiohttp-3.14.2-cp314-cp314-win_amd64.whl", hash = "sha256:e3a6302f47518dbf2ffd3cd518f02a1fbf53f85ffeed41a224fa4a6f6a62673b", size = 480986, upload-time = "2026-07-20T19:52:39.665Z" }, - { url = "https://files.pythonhosted.org/packages/2e/b0/ae17dd629e22160f453b9041a4aee80a8a917ba2f44d5b3e252cc501ed2c/aiohttp-3.14.2-cp314-cp314-win_arm64.whl", hash = "sha256:8d1f3802887f0e0dc07387a081dca3ad0b5758e32bdf5fb619b12ac22b8e9b56", size = 453588, upload-time = "2026-07-20T19:52:41.634Z" }, - { url = "https://files.pythonhosted.org/packages/30/54/4bbcc00f04dbc380103ee669a56df30dea127c3686c8dc2ab86b05a1387b/aiohttp-3.14.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:9094262ae4f2902c7291c14ba915960db5567276690ef9195cdefe8b7cbb3acb", size = 791337, upload-time = "2026-07-20T19:52:43.821Z" }, - { url = "https://files.pythonhosted.org/packages/e7/37/4f95edc1488580c63c0b5baaef429afbacadc7ccd9c47431cdcce90d9e5a/aiohttp-3.14.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:165b0dcc65960ffc9c99aa4ba1c3c76dbc7a34845c3c23a0bd3fbf33b3d12569", size = 526335, upload-time = "2026-07-20T19:52:45.903Z" }, - { url = "https://files.pythonhosted.org/packages/c3/ed/1d7ae73764d135638797a427cb637ae3d98f1fd61208c25891a9f26cdd67/aiohttp-3.14.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f518d75c03cd3f7f125eca1baadb56f8b94db94602278d2d0d19af6e177650a7", size = 532102, upload-time = "2026-07-20T19:52:47.994Z" }, - { url = "https://files.pythonhosted.org/packages/e3/12/da9816eee0d81506560259e7c0af93a4aa7df98acd0fe276958abd42d7c3/aiohttp-3.14.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9b937d7864ca68f1e8a1c3a4eb2bac1de86a992f86d36492da10a135a482fab6", size = 1922727, upload-time = "2026-07-20T19:52:50.224Z" }, - { url = "https://files.pythonhosted.org/packages/2f/b9/d7ccbcde223a72c7b8f3458bdb08c2bacf5fc268a1fdd5cc29861eb0e4e2/aiohttp-3.14.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b155df7f572c73c6c4108b67be302c8639b96ae56fb02787eeae8cad0a1baf26", size = 1787202, upload-time = "2026-07-20T19:52:52.825Z" }, - { url = "https://files.pythonhosted.org/packages/c2/7c/39174069b7df18ea22b23a0fa9abffe4c091f0f86d53af83ddcbb5f44c8f/aiohttp-3.14.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0bfea68a48c8071d49aabdf5cd9a6939dcb246db65730e8dc76295fe02f7c73c", size = 1912574, upload-time = "2026-07-20T19:52:55.007Z" }, - { url = "https://files.pythonhosted.org/packages/21/ff/bd2b7473510caf352aef3f52a3d4fe10184ec22747df74ab658b4402020f/aiohttp-3.14.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8241ee6c7fff3ebb1e6b237bccc1d90b46d07c06cf978e9f2ecad43e29dac67a", size = 2005478, upload-time = "2026-07-20T19:52:57.401Z" }, - { url = "https://files.pythonhosted.org/packages/c8/ee/db26af0acc994350b653b3a73dddf9ee9886bf2fdb68b23fc98705e76442/aiohttp-3.14.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ec64d1c4605d689ed537ba1e572138e2d4ff603a0cb2bbbfe61d4552c73d19e1", size = 1879709, upload-time = "2026-07-20T19:52:59.778Z" }, - { url = "https://files.pythonhosted.org/packages/6a/4d/592451fd40edca73fcb099d8718668cea36dc1dde873dd0f8e91a4081051/aiohttp-3.14.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0fb26fcc5ebf765095fe0c6ab7501574d3108c57fca9a0d462be15a65c9deb8d", size = 1675699, upload-time = "2026-07-20T19:53:02.11Z" }, - { url = "https://files.pythonhosted.org/packages/2a/3e/c1ce4aa13fd1f910e437684843ea6cf6e0041f91d89a1b0389dce247ee59/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ef710fbb770aefa4def5484eeddb606e70ab3492aa37390def61b35652f6820a", size = 1843542, upload-time = "2026-07-20T19:53:04.385Z" }, - { url = "https://files.pythonhosted.org/packages/aa/a4/3f9e22fda714cc38ef558166ff3326cd2f6f65c33da92ba00e3641cbea54/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:d813f54560b9e5bce170fff7b0adde54d88253928e4add447c36792f27f92125", size = 1827505, upload-time = "2026-07-20T19:53:07.072Z" }, - { url = "https://files.pythonhosted.org/packages/37/9d/260c7b8a25c7cd74bee63ce957556a2d25839a321e9107a089d4da3a51af/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:1aa4f3b44563a88da4407cef8a13438e9e386967720a826a10a633493f69208f", size = 1853751, upload-time = "2026-07-20T19:53:10.012Z" }, - { url = "https://files.pythonhosted.org/packages/f8/d6/7c3cfa191e666bf7b48b4346815900b35b85b43ffff783fd0be52e45fe09/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:4610638d3135afaefadf179bffd1bbf3434d3dc7a5d0a4c4219b99fa976e944d", size = 1668850, upload-time = "2026-07-20T19:53:12.362Z" }, - { url = "https://files.pythonhosted.org/packages/c4/af/d9b8353aee9506dace04ca22c3c4e93b7375d9343c4780c8b512972fc6f9/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:6e30743bd3ab6ad98e9abbad6ccb39c52bcf6f11f9e3d4b6df97afffe8df53f3", size = 1883642, upload-time = "2026-07-20T19:53:14.664Z" }, - { url = "https://files.pythonhosted.org/packages/ed/29/ed64c0a013322570a02e5b0e359df2cfd30ae58ba045748dc78175f15826/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:68a6f7cd8d2c70869a2a5fe97a16e86a4e13a6ed6f0d9e6029aef7573e344cd6", size = 1844092, upload-time = "2026-07-20T19:53:16.995Z" }, - { url = "https://files.pythonhosted.org/packages/3c/74/ce6f229510fdd46ee7365fbb759ffaa3004e0bcc59fbd0ec51d8a8efc775/aiohttp-3.14.2-cp314-cp314t-win32.whl", hash = "sha256:205181d896f73436ac60cf6644e545544c759ab1c3ec8c34cc1e044689611361", size = 474098, upload-time = "2026-07-20T19:53:19.645Z" }, - { url = "https://files.pythonhosted.org/packages/72/4c/877c07a6d97a1a0e5e25a06bab76dd7449b533ff8bb6c281c5af8b09c8d9/aiohttp-3.14.2-cp314-cp314t-win_amd64.whl", hash = "sha256:312d414c294a1e26aa12888e8fd37cd2e1131e9c48ddcf2a4c6b590290d52a49", size = 500480, upload-time = "2026-07-20T19:53:22.227Z" }, - { url = "https://files.pythonhosted.org/packages/42/d8/d4c74bb7990da2ee6116fe262ace41cf376ebc6b0bda694c77eeaab5a509/aiohttp-3.14.2-cp314-cp314t-win_arm64.whl", hash = "sha256:63b840c03979732ec92e570f0bd6beb6311e2b5d19cacbfcd8cc7f6dd2693900", size = 469248, upload-time = "2026-07-20T19:53:24.622Z" }, + { url = "https://files.pythonhosted.org/packages/f8/5c/b3e4ff8ad43a8afef9602c5e90285936da1beaea8b029016b793891f03c3/aiohttp-3.14.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e568e14940c09955aa51f4e645b6daa18a581c5dcfcd73744dcc86a856e3ced3", size = 764250, upload-time = "2026-07-23T01:52:48.525Z" }, + { url = "https://files.pythonhosted.org/packages/0e/da/f1b384465e51449d844056b75070461da03a9a23e6c1747003695bf4172a/aiohttp-3.14.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:54cfcdee2770dac994417cbb0ee1f3eb0e7cb6b30c79bf44f2c02ff79ec5124a", size = 516281, upload-time = "2026-07-23T01:52:51.047Z" }, + { url = "https://files.pythonhosted.org/packages/b9/3f/01264f820ee2e3712a827892b1cd6ff80f3300c1fcbffbb45714a915d47a/aiohttp-3.14.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:21c016079415ed3fd676963e9793700a566d85dbbd6bfc564b9b2d209147dcc8", size = 514742, upload-time = "2026-07-23T01:52:53.779Z" }, + { url = "https://files.pythonhosted.org/packages/9e/8d/a71c6f2db52ac1ed142b133f7feddaa6b70539c3f4de24d7e226c95b794c/aiohttp-3.14.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d6088ec9894113802bddb3c09e974929aed2c7b3a8c456219b8aab4481f1a239", size = 1780613, upload-time = "2026-07-23T01:52:56.948Z" }, + { url = "https://files.pythonhosted.org/packages/a5/11/3dd9b3fb3a170f6ec9011b5291d876a6fab4086714c9e158600edf01b4fd/aiohttp-3.14.3-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:16ea7e24c309fb7c0bbd505d149abe4fe4dccfb8db911db7dbec0921bc889a6f", size = 1737688, upload-time = "2026-07-23T01:52:59.294Z" }, + { url = "https://files.pythonhosted.org/packages/6d/3e/834c26918be7d88068822b40e0db30fca50b5f4fe79104aa16a93f1d74e6/aiohttp-3.14.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:56f355e79f71aef2a85c80305cc915f894b170dba76de5fe84f6351939b83c06", size = 1845742, upload-time = "2026-07-23T01:53:01.641Z" }, + { url = "https://files.pythonhosted.org/packages/cc/c9/49ab8572df7d66bc13d11e31f781292badb04180dd87ba98733066c6aed7/aiohttp-3.14.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:18c441d0a8fca6de8d1f546849b9f0ab20d435993e2c5b59562b2fae6be2f929", size = 1928412, upload-time = "2026-07-23T01:53:04.018Z" }, + { url = "https://files.pythonhosted.org/packages/a5/b9/2b8f0c0ce09c87a1daf80fd483431b56b1435d3f62789bc86f572e1245de/aiohttp-3.14.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:53e7b4ce82b54a8bcc71b3b67a5cbd177ca1d7f592cbc92cd38b7349f73482db", size = 1786220, upload-time = "2026-07-23T01:53:06.481Z" }, + { url = "https://files.pythonhosted.org/packages/85/00/9c45f81de11710460edfa1dc81317b6e882703b160926c879a9d20da9fcc/aiohttp-3.14.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f55119f7bf25f49ed210f6096090715da24f2943c62102448915fde3c62877ce", size = 1637231, upload-time = "2026-07-23T01:53:10.258Z" }, + { url = "https://files.pythonhosted.org/packages/19/ce/967d628e910756f3539c6107cb7844a1b69440dcb3029a5ee7871b09ab63/aiohttp-3.14.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9aa6e61fdf20105c4144e755bd586008ff450791d67b1c8146fdc15959c4d51c", size = 1753161, upload-time = "2026-07-23T01:53:13.817Z" }, + { url = "https://files.pythonhosted.org/packages/11/b2/0c3d4114f0aee4f580f5b3b4eb71b24d7a23b834ea506a4dfebe76513f35/aiohttp-3.14.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:ccd4893707b3e2a13e39c90d43cf80edf2e4d0457935bcc103bf2346214c3f15", size = 1756356, upload-time = "2026-07-23T01:53:16.211Z" }, + { url = "https://files.pythonhosted.org/packages/63/5d/99e7d91c82f1399d1ae2a854e080bd1493fbc31e5e959dbc4ec33dac3bec/aiohttp-3.14.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:b2466434105a4e03113c36ec775cc2ebe6676b62eae326fa670bb607ef788c1c", size = 1819846, upload-time = "2026-07-23T01:53:18.289Z" }, + { url = "https://files.pythonhosted.org/packages/ad/05/d5e1cb6480eeffd3f901d40a2c5e2d1e7effdc797837da3b490272699f13/aiohttp-3.14.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:ba59d59aba08ac02fc03b0c8983ccd5ee39a199d0552ce9e6d2b4845b34d59ae", size = 1628531, upload-time = "2026-07-23T01:53:23.86Z" }, + { url = "https://files.pythonhosted.org/packages/c9/90/b934682bcaefae18a9e04f3dff5b68522ba810906358ae5029b68110ea3b/aiohttp-3.14.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ed099d105449c4f9e84f24af203cd131349d4761d8813fa7e02c32e7128cd910", size = 1832712, upload-time = "2026-07-23T01:53:27.551Z" }, + { url = "https://files.pythonhosted.org/packages/21/df/6061679faaf81fac746e7307c7adb71e858071a5d34c27583afefc64f543/aiohttp-3.14.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:152516815ef926786a0b6ae2b8f1fd2e0c71582dee0b435636865316fd4891b7", size = 1775014, upload-time = "2026-07-23T01:53:30.223Z" }, + { url = "https://files.pythonhosted.org/packages/8a/1d/f854878bbc69b88faefe924b619a34a6f59ec05fd387c77690667eaa75eb/aiohttp-3.14.3-cp311-cp311-win32.whl", hash = "sha256:a4af35c443e0b1a1bd6a8af3f3485d7fda15c142751a00f3ff8090f0b93346fa", size = 456006, upload-time = "2026-07-23T01:53:34.97Z" }, + { url = "https://files.pythonhosted.org/packages/73/0c/2af9d1674baccd1dbd47282a93d660a22e57ef6167c856deb24b4214fbab/aiohttp-3.14.3-cp311-cp311-win_amd64.whl", hash = "sha256:e1e74298bab6ee0d6e749ed4fd1901c7e604bdda32c03d787a2cc71c46d0433d", size = 481069, upload-time = "2026-07-23T01:53:39.673Z" }, + { url = "https://files.pythonhosted.org/packages/8e/76/88401ff3fc95e85c5fc38d588f36f55e61ecb64343b2bc8d69326f453cc0/aiohttp-3.14.3-cp311-cp311-win_arm64.whl", hash = "sha256:03cd2bde3d7f085b64e549c985f4bb928cad7e8ecf5323bfca320db548d81b39", size = 453021, upload-time = "2026-07-23T01:53:43.749Z" }, + { url = "https://files.pythonhosted.org/packages/18/d4/eb96299230e20acf2efae207cb8d69051f1f68e357e5ea5e479bf6fb097a/aiohttp-3.14.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:39aded8c7f3b935b54aab1d8d73c70ec0ee2d3ec3b943e0e86611bc150ba47f5", size = 754690, upload-time = "2026-07-23T01:53:47.332Z" }, + { url = "https://files.pythonhosted.org/packages/88/11/e7a70a209eb9a067c0d3212b518a0134e3484f5178c7533878b6b514d469/aiohttp-3.14.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5bcb6ff3fdab1258a192679ff1a05d44f59626430aa05cd1a9d2447423599228", size = 509484, upload-time = "2026-07-23T01:53:51.159Z" }, + { url = "https://files.pythonhosted.org/packages/30/07/4bbc222cc8dbe31d4c3e8a5baad2286e4d42026ac0c570027b89afce6344/aiohttp-3.14.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:617105e2c3018ee38d0c8ce5ee3c84f621a6d8b9f723202aacaff28449ca91ee", size = 511949, upload-time = "2026-07-23T01:53:55.083Z" }, + { url = "https://files.pythonhosted.org/packages/54/b9/42e74c46b7b7c794b995bbc1f573fb48950c38b19d8600c62a6804ee2d67/aiohttp-3.14.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f631fe87a6f30df5fbe6d79640b25e4cffb38c31c7fb6f10871517b84b0f8c1a", size = 1765282, upload-time = "2026-07-23T01:53:59.662Z" }, + { url = "https://files.pythonhosted.org/packages/6b/ed/62bc4d74363ad346d518e0720363a949f63e2e23439a79eb5813d4d29bb3/aiohttp-3.14.3-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a94dbaae5ae27bd849c93570669bff91e0510f33a80805738e3de72a7be0447b", size = 1741511, upload-time = "2026-07-23T01:54:04.063Z" }, + { url = "https://files.pythonhosted.org/packages/d0/9f/181e8a8bc79e47d13c7fc4540bd7a3b729d9505609c61f392a8dd2fbfe55/aiohttp-3.14.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8f2f1c4c032c7cedd7d8da6f54c97b70266c6570c3108d3fdffee7188bb70529", size = 1810680, upload-time = "2026-07-23T01:54:09.882Z" }, + { url = "https://files.pythonhosted.org/packages/5c/9a/dec94d6ad694552fe3424e3f1928d7a606a5d9d9433a04e7ecdd9d38ae7f/aiohttp-3.14.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ea05e1f97ceea523942d9b2a7d7c0359d781d683d6b043f5943a602b14da4787", size = 1905646, upload-time = "2026-07-23T01:54:13.475Z" }, + { url = "https://files.pythonhosted.org/packages/52/b7/7cd31f29d6055bd711ae6e669367fba6f5ae9de463910a793e30556a8db7/aiohttp-3.14.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:543906c127fb1d929b95076db19b83fa2d46751006ff1e23b093aa5ac4d8db42", size = 1792122, upload-time = "2026-07-23T01:54:15.752Z" }, + { url = "https://files.pythonhosted.org/packages/66/73/10b1ef93afa61f4963c746257b70ced619cf31a4798671de5fdb2608501d/aiohttp-3.14.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0a5ff2dfbb9ce645fa5b8ef3e02c6c0b9cc3f6030ff863d0c51fffc50cb5541b", size = 1591127, upload-time = "2026-07-23T01:54:19.489Z" }, + { url = "https://files.pythonhosted.org/packages/49/ed/3b203fa6de1b338c14acdc06bf6ca9b043b7944f005966958c2ced932cde/aiohttp-3.14.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:041badb8f84396357c4d3ad26de6afd7a32b112f43d3c63045c0c8278cfd2043", size = 1725210, upload-time = "2026-07-23T01:54:24.129Z" }, + { url = "https://files.pythonhosted.org/packages/28/b7/1c2aab8c706436dcc28598452488ac9cd7c409da815237c28c27d58993e6/aiohttp-3.14.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:530125ee1163c4219af35dc3aa1206e541e7b31b6efc1a3f93b70a136f65d427", size = 1764848, upload-time = "2026-07-23T01:54:27.973Z" }, + { url = "https://files.pythonhosted.org/packages/54/50/94c28f08b131c4bf10984ea2c7a536c9920608bb2d6e7f95642c30cc87b7/aiohttp-3.14.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c8653fd547c93a61aadc612007790f5555cdd18946fa48cf45e26d8ea4ea473d", size = 1777102, upload-time = "2026-07-23T01:54:31.775Z" }, + { url = "https://files.pythonhosted.org/packages/13/d4/e7d09ba7d345fb2d74440fd2fa033c5e079fac05552927705986f41a364f/aiohttp-3.14.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:89176250f686cb9853c0fb7ead90e639e915b84a6f43eedc2a4e7ec21f1037f0", size = 1580205, upload-time = "2026-07-23T01:54:34.518Z" }, + { url = "https://files.pythonhosted.org/packages/a3/84/072a91d68e1e1eb587985b54baab94221277f877e8ef274fc213a0ceae28/aiohttp-3.14.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3a26434dafe408229ff3403458ca58de24fb51936504decac49ce6755f77e59d", size = 1797219, upload-time = "2026-07-23T01:54:36.995Z" }, + { url = "https://files.pythonhosted.org/packages/e0/eb/aad34e897e668424d6e995da5dff8a4a09af93363d3392488772957a63aa/aiohttp-3.14.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d1558173930a5a8d3069cee5c92fc91c87c4dbcb099debbb3622053717145a19", size = 1768629, upload-time = "2026-07-23T01:54:40.103Z" }, + { url = "https://files.pythonhosted.org/packages/b6/2b/6bb88ddba0fecd9122aa3ebcad25996cf6c083a4a7040dbb3a4f97972af6/aiohttp-3.14.3-cp312-cp312-win32.whl", hash = "sha256:16100ad3ab8d649fdfbee87602d9d2dcdca9df0b9eda8a1b5fdc0d41f96da559", size = 451481, upload-time = "2026-07-23T01:54:42.547Z" }, + { url = "https://files.pythonhosted.org/packages/76/9b/f2f8f108da17ecef2cc3efc424e8b7ad3782b1a8360f7b8eae8ced84f6ea/aiohttp-3.14.3-cp312-cp312-win_amd64.whl", hash = "sha256:33a2d7c28d33797a2e99923dffa63f83d908a19b6bf26cfe80fa790aa5e1a75a", size = 476845, upload-time = "2026-07-23T01:54:44.853Z" }, + { url = "https://files.pythonhosted.org/packages/3e/44/28dac80a8941b604f4da10ce21097614ca1bf905ce93dca28d8d7de9c1e7/aiohttp-3.14.3-cp312-cp312-win_arm64.whl", hash = "sha256:362a3fd481769cac1a824514bcd86fda51c65e8fe6e051099e008fddde6db17c", size = 448050, upload-time = "2026-07-23T01:54:47.087Z" }, + { url = "https://files.pythonhosted.org/packages/57/be/5afd201cc0ab139029aadb75392efe85a293403d9dd3a3226161c21ce00c/aiohttp-3.14.3-cp313-cp313-android_21_arm64_v8a.whl", hash = "sha256:2e9878ae68e4a5f1c0abe4dd497dbc3d51946f5837b56759e2a02e78fa90ef86", size = 506269, upload-time = "2026-07-23T01:54:49.075Z" }, + { url = "https://files.pythonhosted.org/packages/22/09/dec8189d62b45ade009f6792a2264b942a90cb88aeaf181239933cd72c3c/aiohttp-3.14.3-cp313-cp313-android_21_x86_64.whl", hash = "sha256:f3d2669fe7dec7fc359ecdb5984b29b50d85d5d00f8c1cb61de4f4a24ee42627", size = 515166, upload-time = "2026-07-23T01:54:51.894Z" }, + { url = "https://files.pythonhosted.org/packages/28/24/2854869d29ed8a8b19d74f9ec6629515f7e04d02dd329d9d179201e58e47/aiohttp-3.14.3-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:cc7cb243a68167172f48c1fd43cee91ec4b1d40cefd190edd43369d1a6bc9c82", size = 486263, upload-time = "2026-07-23T01:54:54.223Z" }, + { url = "https://files.pythonhosted.org/packages/d4/dd/57187c8be2a35aea65eaee3bd2c3dcbbcf0204f5106c89637e3610380cd1/aiohttp-3.14.3-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:78253b573e6ffab5028924fc98bc281aae05445969982a10864bc360dea2016c", size = 492299, upload-time = "2026-07-23T01:54:56.236Z" }, + { url = "https://files.pythonhosted.org/packages/b9/11/06ae6ed8f0d414edf4068861e233d8fe23ee699bfd4b3ceb8663db948a62/aiohttp-3.14.3-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:7041d52c3a7fa20c9e8c182b534704abb19502c8bdcbde7ab23bfda6f642394f", size = 502235, upload-time = "2026-07-23T01:54:58.377Z" }, + { url = "https://files.pythonhosted.org/packages/7e/a3/559639c34a345d2cf7c52dff6838119f2eaf29eb508227b5b83f573af813/aiohttp-3.14.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ac74facc01463f138b0da5580329cfcc82818dea5656e83ddcd11268fc12ff80", size = 750883, upload-time = "2026-07-23T01:55:00.65Z" }, + { url = "https://files.pythonhosted.org/packages/91/cd/41e131f13afd1e7b0172a9d9eda085ef90eb8439f41f0d279db81ed3ae60/aiohttp-3.14.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d6218d92e450824e9b4881f44e8c09f1853b490f9a64130801024a4793b1b3b0", size = 508473, upload-time = "2026-07-23T01:55:02.945Z" }, + { url = "https://files.pythonhosted.org/packages/bc/6b/e7f13410d391c6e55b4c007a8de024355389d7d459e3d64c42b2d33617e5/aiohttp-3.14.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:11fb37ef075669eee52ab1928fbf6e1741fada40409fa309ebde9607a962aebf", size = 509190, upload-time = "2026-07-23T01:55:05.173Z" }, + { url = "https://files.pythonhosted.org/packages/97/21/6464573e53d69672cc1eada3e5c5cb2d2efa82701e8305a0f2047a576967/aiohttp-3.14.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:55bdcc472aafe2de4a253045cc128007a64f1e0264fb675791e132ea5edaa3bd", size = 1761478, upload-time = "2026-07-23T01:55:07.383Z" }, + { url = "https://files.pythonhosted.org/packages/1a/81/d217043a4c17fbce360905e3b2bdd20139ebc9a2de836d035d179c4da006/aiohttp-3.14.3-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c39846c3aad97a8530c89d7a3869a8f8e9e3762c6ac0504481e5c80948f7e807", size = 1735092, upload-time = "2026-07-23T01:55:09.803Z" }, + { url = "https://files.pythonhosted.org/packages/a1/66/e13a02d0eeb1a9a502402a977abb4e4abff9fe4051c26f80558c57a7c975/aiohttp-3.14.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5895ef58c4620afe02fa16044f023dc4dafec08158f9d08874a46a7dbc0341b8", size = 1800546, upload-time = "2026-07-23T01:55:12.012Z" }, + { url = "https://files.pythonhosted.org/packages/26/5e/57d42fca1d18cb5acc1cad945d017fabc5d6ae71d8a08ad66be8dc3ee544/aiohttp-3.14.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fa9467a8113aa69d3d7c55a70ef0b7c636010a40993f3df9d9d0d73b3eb7ef24", size = 1895250, upload-time = "2026-07-23T01:55:14.357Z" }, + { url = "https://files.pythonhosted.org/packages/ca/1c/7da8d08e74d56f00070822f9638ff3f1c563f8ad87d1efa996c87bfc8644/aiohttp-3.14.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d7d2deec16eeedf55f2c7cf75b521ea3856a5177e123844f8fd0f114ce252cb5", size = 1789289, upload-time = "2026-07-23T01:55:16.668Z" }, + { url = "https://files.pythonhosted.org/packages/cd/0f/cf16bcf56896981c1a0319f5d5db9337994b5165730c48a8fa07e9b34be6/aiohttp-3.14.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:dd54d0e8717de95939766febac482ac0474d8ac3b048115f9f2b1d23a16e7db4", size = 1586706, upload-time = "2026-07-23T01:55:18.913Z" }, + { url = "https://files.pythonhosted.org/packages/fe/6f/76eac12a7f2480e1e304f842efdb07db33256b0d9165b866b6ef0806c202/aiohttp-3.14.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:df82f3787c940c94986b34222d59c9e38843fba85139f36e85255a82ad5355a9", size = 1724652, upload-time = "2026-07-23T01:55:21.296Z" }, + { url = "https://files.pythonhosted.org/packages/39/b6/19c8c592baeeb94b75f966547d40c02ac7590902306ec5863d5c027cf506/aiohttp-3.14.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:42a67efc36300d052fb4508a53e8b6901b9284b599ae63945c377569c5fcc1e1", size = 1756239, upload-time = "2026-07-23T01:55:23.705Z" }, + { url = "https://files.pythonhosted.org/packages/dc/c9/4e9383150296f97f873b680c4de8fb2cd88608fb9f48c79edcb111611abc/aiohttp-3.14.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:7a75aa63cbf9b21cfaf60dc2657e19df2c2867d91707d653fee171ffeedd1371", size = 1769161, upload-time = "2026-07-23T01:55:26.082Z" }, + { url = "https://files.pythonhosted.org/packages/aa/1e/147bdc6cc5de5f3ab011be8bf5d6e786633249f22c20bae06f85e45f5387/aiohttp-3.14.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:e92eb8acc45eb6a9f4935071a77edf5b85cc6f8dfad5cd99e97653c26593cdde", size = 1578759, upload-time = "2026-07-23T01:55:28.846Z" }, + { url = "https://files.pythonhosted.org/packages/fd/31/78388a9d6040ece2e11df62ea229a822cf5e52d238374b220ae9975b2623/aiohttp-3.14.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b014a6ed7cf912e787149fdc529166d3ceabac23f26efeea3158c9aba2354e7e", size = 1792025, upload-time = "2026-07-23T01:55:31.457Z" }, + { url = "https://files.pythonhosted.org/packages/03/51/a3d29fdf2c25d796746af8ad6fe56a45d6256c38b0a8a2ed752e1160b3a2/aiohttp-3.14.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3d4f72af88ac2474bb5bca640030320e3d38a0163a1d7533500e87be458eef71", size = 1768477, upload-time = "2026-07-23T01:55:33.87Z" }, + { url = "https://files.pythonhosted.org/packages/29/a6/442e18b5afeade534d877a2dc3c3e392aff8d49787890b0cf84790410267/aiohttp-3.14.3-cp313-cp313-win32.whl", hash = "sha256:5f08ec777f35ee70720233b8b9811d3bb5d728137f30ac91b7457709c3261ac0", size = 451069, upload-time = "2026-07-23T01:55:36.121Z" }, + { url = "https://files.pythonhosted.org/packages/9d/69/3d876ac02659f271cf7f6769f14a8e3de5b6e888ed8b5a7e998086a4cec8/aiohttp-3.14.3-cp313-cp313-win_amd64.whl", hash = "sha256:dff9461ec275f22135650d5ba4b4931a11f3958df7dfbb8db630000d4dee0883", size = 476518, upload-time = "2026-07-23T01:55:38.303Z" }, + { url = "https://files.pythonhosted.org/packages/b2/0e/50d6e6471cd31edce8b282bdec59375a3a69124d8a989a0b1313355cae52/aiohttp-3.14.3-cp313-cp313-win_arm64.whl", hash = "sha256:ddcac3c6b382e81f1dd0499199d4136b877beb4cb5ef770bbbfba56c4b8f55d2", size = 447676, upload-time = "2026-07-23T01:55:40.451Z" }, + { url = "https://files.pythonhosted.org/packages/c8/20/887fdcf832326571b370ffc347b3e70abe101096f3720126aac161b1d872/aiohttp-3.14.3-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:49f7325beb0f85ef4aef5f48f490269575f83e6e2acad00a1d80b807eb027062", size = 509067, upload-time = "2026-07-23T01:55:42.618Z" }, + { url = "https://files.pythonhosted.org/packages/ad/a3/92cec936f78cc4bf0fa5554ebe593b73459d94e3c62303e1902a4cccb6f7/aiohttp-3.14.3-cp314-cp314-android_24_x86_64.whl", hash = "sha256:e3be98a7c30b8c25d573dafba7171d66dfb05ee6a9070fc46535464ff97700a6", size = 514774, upload-time = "2026-07-23T01:55:44.937Z" }, + { url = "https://files.pythonhosted.org/packages/29/ba/2a0c38df3fc557620b6a5acd98364af050053b6285b4dc7ee74100c63c18/aiohttp-3.14.3-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:614c61d478b83953e261d02bb2df750f17227cd33ef8002945bf5aebbde21919", size = 488134, upload-time = "2026-07-23T01:55:47.135Z" }, + { url = "https://files.pythonhosted.org/packages/48/d6/d51b7d4bf309af3693940d8ffd2b9ed0b682434ef85959b7c9c137f60cf8/aiohttp-3.14.3-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:1caa7b0d05f3e3a36f87788c59e970a7ee1cefcfcbb924a9f138c4a6551c9cb7", size = 494201, upload-time = "2026-07-23T01:55:49.451Z" }, + { url = "https://files.pythonhosted.org/packages/3f/5a/8f624384e5f1efabb5229b94157eb966b021e97bdb188c62860c2ae243c2/aiohttp-3.14.3-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:dfa68deb2a443bdaa3ea5297b0699c1464f08aef3812b486d1348eee61b07dc0", size = 502766, upload-time = "2026-07-23T01:55:51.656Z" }, + { url = "https://files.pythonhosted.org/packages/a6/26/4ff0164370deec18fb19254ee4ab10b7a73304ac0c860b13f5f84663759b/aiohttp-3.14.3-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:e72ee89e28d907a18f46959b4eb0bb06701cc7f8cf4366e00029e2ccfaaf5924", size = 756557, upload-time = "2026-07-23T01:55:53.964Z" }, + { url = "https://files.pythonhosted.org/packages/97/a3/7056b86dc0d9ec709ea9777eae3b0161428f943372f8b98c01c11593b682/aiohttp-3.14.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ad4c8b7488d745d2ca4838ebd8ae5ba9b56341d30b1da43640e4ce87f9f49646", size = 510168, upload-time = "2026-07-23T01:55:56.22Z" }, + { url = "https://files.pythonhosted.org/packages/85/ed/0357a015892fd68058bf2d39d3fd1958e459b997a7db30aaa6aaa434ae96/aiohttp-3.14.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:db332af25642007330fca8be5c4d194caf2bea7a7fc84415aff3497af5dfee6b", size = 512957, upload-time = "2026-07-23T01:55:58.437Z" }, + { url = "https://files.pythonhosted.org/packages/47/d1/8aba53f15ccb2238405f5e9d30e2a8ca44f93878c26e7165ade00d374b1c/aiohttp-3.14.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:25bd2708db6bdf6a6630dd37bdcdfcb47c4434d22ac69c64665b802910140b30", size = 1750149, upload-time = "2026-07-23T01:56:00.856Z" }, + { url = "https://files.pythonhosted.org/packages/49/bd/40c3fee327529284375c6701cbb0fa4600cc2e8432af1378f897e2ef7d3a/aiohttp-3.14.3-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:cef89a58e628c4efcac3275c2d68083f82426dcdc89c1492a6f654f9f7ea6ab9", size = 1707685, upload-time = "2026-07-23T01:56:03.371Z" }, + { url = "https://files.pythonhosted.org/packages/2a/a3/ca0cc6724cca8114b05694abd916060758c79894c3aa5b012cdadc1bc28e/aiohttp-3.14.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c23ec8ee9d5ab2f5421f9c7fffce208435607af27fd46d4a44e031954352838f", size = 1803911, upload-time = "2026-07-23T01:56:05.817Z" }, + { url = "https://files.pythonhosted.org/packages/95/b5/85b099c299c3ffd38ad9b3e43694c8a346934e4a30c88c4fd5a841234f77/aiohttp-3.14.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e2667f0bbe7eb6c74eae5e9691441ad186e5845ca3cff63230fc09c4e7514f5d", size = 1876929, upload-time = "2026-07-23T01:56:08.413Z" }, + { url = "https://files.pythonhosted.org/packages/d5/b7/1da684a04175473fa4cddbf9a2f572e79514c3fd27a74597f43057d4f3da/aiohttp-3.14.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18cb43369747b2ae007bd2655fb8e63a099c2ff1d207962943636dac989b3147", size = 1761112, upload-time = "2026-07-23T01:56:10.918Z" }, + { url = "https://files.pythonhosted.org/packages/d1/16/bc4b55e3e5cb175fd69c53c90d60d2f47797cb343da5106e23863dc4dba4/aiohttp-3.14.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d77640cc618c1d99fc4f8589c0f24a730adfa54eb1e57ef7bf0c8dfb78da898c", size = 1583500, upload-time = "2026-07-23T01:56:13.613Z" }, + { url = "https://files.pythonhosted.org/packages/2a/e8/13a9d957a1ee40837f46aa30f0f4c657e673ad86a2e6362a9f9be20d26d9/aiohttp-3.14.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:53e5179d8abb5710f8e83ba207c41c8d1261fcffd4616500e15ca2b7a33be10a", size = 1713940, upload-time = "2026-07-23T01:56:15.969Z" }, + { url = "https://files.pythonhosted.org/packages/38/05/d33c680c1bcf1c7e130f9cbfc1fc02fe8bb0c4af2a94a53dd5fb56131e5c/aiohttp-3.14.3-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:cd817772b2fcf2b8c0905795318485f9ec16eae60b29feb7f4c77085311637f0", size = 1724413, upload-time = "2026-07-23T01:56:18.591Z" }, + { url = "https://files.pythonhosted.org/packages/85/1d/af798d306f7a74b6a632dbcabcf62a4c91391b7582d2a8c6d7712e2cc54e/aiohttp-3.14.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:4e3ac92d90e92773b2362d506068e9a948192bd553e743c5b2429e28527c8661", size = 1770748, upload-time = "2026-07-23T01:56:21.074Z" }, + { url = "https://files.pythonhosted.org/packages/a8/92/ad720d472556a995049206867765e9410969684f86ee09423ff9969044c1/aiohttp-3.14.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:3f42e9b78301f11c8f861746175d8b9c1ccef713fcad9eab396e2f6db8ed4a22", size = 1577564, upload-time = "2026-07-23T01:56:23.475Z" }, + { url = "https://files.pythonhosted.org/packages/60/ad/0ed7586cbef7a884e23a752fa2bb987a122e6a5dd50dab109258d0a95193/aiohttp-3.14.3-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:9d9edccfe496b476db5f398d97b865e9a6752bcf8aec4eef8390ce20fb64bb41", size = 1782080, upload-time = "2026-07-23T01:56:25.994Z" }, + { url = "https://files.pythonhosted.org/packages/97/ea/dbaed0d73e8a69aad653b045dab451c67c2454bb731a37b45a86593e9422/aiohttp-3.14.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:1c5ec8fb1bcc31a8466f74aaf26c345d5c386fa4bd08a3f0eb9c7a4a3fe8b5bf", size = 1745813, upload-time = "2026-07-23T01:56:28.604Z" }, + { url = "https://files.pythonhosted.org/packages/81/1b/6893d4bc57e434fc93a6c9217c637d967a0b651d989f6e3265179375754a/aiohttp-3.14.3-cp314-cp314-win32.whl", hash = "sha256:38901a84da3ce22249f6e860bf8f90d141bcab7da090cc398f8bb58c0e44b7da", size = 455872, upload-time = "2026-07-23T01:56:31.031Z" }, + { url = "https://files.pythonhosted.org/packages/f5/8b/c7baa1ba1eda4db6989baefe5de6d99834921b84ebd7918624febcb9f290/aiohttp-3.14.3-cp314-cp314-win_amd64.whl", hash = "sha256:8b3b60de05f3dcb6f6a00f818bb2ec781cee4de0645f59ccaf99b1d1823b6100", size = 481030, upload-time = "2026-07-23T01:56:33.365Z" }, + { url = "https://files.pythonhosted.org/packages/22/8c/c29d067df825a2df88ca432db848aa2fe8199598359cc06c12b09320cac9/aiohttp-3.14.3-cp314-cp314-win_arm64.whl", hash = "sha256:1576145bdceeb92382d899751e12743a3a5b8e460a841e3e50543859e54864dc", size = 453669, upload-time = "2026-07-23T01:56:35.731Z" }, + { url = "https://files.pythonhosted.org/packages/6a/a4/9c033beb355d39b6147980597ec9645e4729243f686ee4dc73945de72030/aiohttp-3.14.3-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:8800c996b01c2772a783e3e46f3e1abd5823029adca0df54231960de9bfefa5b", size = 791403, upload-time = "2026-07-23T01:56:37.972Z" }, + { url = "https://files.pythonhosted.org/packages/80/ca/87c32a0a7704583cfc49660bd817889bae5b830bf53b5dcb4e92145ac2da/aiohttp-3.14.3-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:ebe8e504f058fe91223351cecd2d9d6946c9d241bb0250d898ffbdf584cc72b0", size = 526413, upload-time = "2026-07-23T01:56:40.523Z" }, + { url = "https://files.pythonhosted.org/packages/9e/d8/8ec0e471248c500acdce2be3f46db8fb62b5eb60efef072529cc85ee1d26/aiohttp-3.14.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:30402d03a7c0ff52bce290b57e564e9079fd9d0cb545c8aba73f86a103162d2e", size = 532135, upload-time = "2026-07-23T01:56:42.876Z" }, + { url = "https://files.pythonhosted.org/packages/fe/45/f8919fd936e8b79fcd9bda7b6d8e62613462a713f4f17987fd7c34399142/aiohttp-3.14.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9fc7b5bfec6573f3ae844f457fdde5adeb713f8b8e4a81ad64fc207b49383716", size = 1922742, upload-time = "2026-07-23T01:56:45.528Z" }, + { url = "https://files.pythonhosted.org/packages/f6/ec/9ca76b28a27525b0cc53e20842e0228b022f301ce1f436b7d814b4aaf2df/aiohttp-3.14.3-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8a5fd34f7f7410d1730d5c2ba873cacb2eed3fede366feb268a70ba22581ed8f", size = 1787371, upload-time = "2026-07-23T01:56:48.045Z" }, + { url = "https://files.pythonhosted.org/packages/b1/04/6acdbf17315f7b55f1937e3387acb89a3cddeb4995689553d064af8e92ab/aiohttp-3.14.3-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:270d3dace9ca2f10f0da5d8ebe519b7a310fc6112ed916e32df5866df0888553", size = 1912623, upload-time = "2026-07-23T01:56:50.605Z" }, + { url = "https://files.pythonhosted.org/packages/86/e6/438b0c79ca6f45eb9fd9817dd4c01a91919a38c0de5ee9e05e2b4dc0ece7/aiohttp-3.14.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3ae5b3a59436d089b5395d910121a390feed4d00578eb95a0fd1a329fe963100", size = 2005515, upload-time = "2026-07-23T01:56:53.153Z" }, + { url = "https://files.pythonhosted.org/packages/bb/6b/62cbd6577758699525f5c712d1ddef57d9875fbab0ae8d5f5a202fd598f8/aiohttp-3.14.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2498f0fe69ead802f9675beca44a7c21c62fdaa4ec5145ea1c3ad6edbee29f85", size = 1879906, upload-time = "2026-07-23T01:56:55.818Z" }, + { url = "https://files.pythonhosted.org/packages/00/95/18bcbf830a21dc3aae24d8f6b6feaf3db1d2090242d00a7868db2ffb0b67/aiohttp-3.14.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a0dc483c00da8b673abbb367eb6f8d8f4bcec30eb58529ea13cb42e7fd2dfa33", size = 1675849, upload-time = "2026-07-23T01:56:58.861Z" }, + { url = "https://files.pythonhosted.org/packages/a9/19/47f4968659c5e23606c3790c80fc624e691c153d036148449ee84d31b287/aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c7d3a97c678d34fc5b59da671ee9cd630096ddc643e7b5a30d54a2a6f3574d3f", size = 1843496, upload-time = "2026-07-23T01:57:01.591Z" }, + { url = "https://files.pythonhosted.org/packages/64/af/38c33c4dd82fddcb4e56c4653b6f1072a8edbc6b7fa15809f14932c41e2d/aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:f8fb78a83c9e5f741ca3a68cfb455c1f5bb83b4e7249a3848b3cd78d0a8563b0", size = 1827746, upload-time = "2026-07-23T01:57:05.131Z" }, + { url = "https://files.pythonhosted.org/packages/a1/9d/0537cda4885ac8f5b7053d164dd06312f4c483a4edcb8ee5b8aaf2a989bf/aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:74ab5b6a9fb13e873e5a90946588baecaf488745e1db1a4a5c433f971f035098", size = 1853810, upload-time = "2026-07-23T01:57:08.043Z" }, + { url = "https://files.pythonhosted.org/packages/19/fe/26f9c5e6458385aa86497836b0dea6fb2f027827d63f37c7856cce9286ee/aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:bd52f811e65f6fb634b1047159657c98f52b407f8efec907bcfc09da9a4c0a25", size = 1668895, upload-time = "2026-07-23T01:57:10.837Z" }, + { url = "https://files.pythonhosted.org/packages/ec/4c/618b1db9b9ba079b8875d2cdf78e7c4a3bf72903bd5850fee7dd9544600a/aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:f0f177d1b195b9e06376cfd7d308d8a1b920909a609d03ac82a8c73bbb16d3b9", size = 1883833, upload-time = "2026-07-23T01:57:13.672Z" }, + { url = "https://files.pythonhosted.org/packages/94/c6/bd959bd1e4771f9fd944e9e436224c48c77b018b73b519b5aad346335bcc/aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:498c6c623134f8e09a3c4e60bcd607a0b4590dd7dbf08dd40851b27cbb520ccb", size = 1844251, upload-time = "2026-07-23T01:57:16.593Z" }, + { url = "https://files.pythonhosted.org/packages/5e/19/08d41839658bdd44a0ed2480f3891705ecb487ce28c0dde62c9040c997e0/aiohttp-3.14.3-cp314-cp314t-win32.whl", hash = "sha256:b304db572b4368edd8dda8a2274f73156fe15558fca4a917cb8a09fc47af5963", size = 474180, upload-time = "2026-07-23T01:57:19.306Z" }, + { url = "https://files.pythonhosted.org/packages/99/5d/3cd6ef0a2b2851f7ab913b5b079334781bd50ff56a323e4454063377a080/aiohttp-3.14.3-cp314-cp314t-win_amd64.whl", hash = "sha256:b20032766aedf6261c7a566585a40867d092ac03a0d81592d5370ef9b054f99b", size = 500528, upload-time = "2026-07-23T01:57:21.762Z" }, + { url = "https://files.pythonhosted.org/packages/a4/37/cfd1ed540a4d318da025590d96b728e63713c09e9377950fc655dadeb856/aiohttp-3.14.3-cp314-cp314t-win_arm64.whl", hash = "sha256:2e1161602f45a54de2ce0905243a95f58cb42dcd378402f3697f5e0b21e9d2e7", size = 469280, upload-time = "2026-07-23T01:57:24.241Z" }, ] [[package]] From c3d72fcfdb73c4523bc2153e2de1659818427589 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 15:37:51 +0000 Subject: [PATCH 59/60] chore(deps-dev): bump ruff from 0.15.22 to 0.16.0 in the all-deps group (#466) Bumps the all-deps group with 1 update: [ruff](https://github.com/astral-sh/ruff). Updates `ruff` from 0.15.22 to 0.16.0 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.22...0.16.0) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.16.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: all-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- uv.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/uv.lock b/uv.lock index 7c709e2a..1981f793 100644 --- a/uv.lock +++ b/uv.lock @@ -961,27 +961,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.22" +version = "0.16.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/3a/06/ae069393fc66e8ff33036d4b368003833bf6e88ccf182e17e7a2f1c754fd/ruff-0.15.22.tar.gz", hash = "sha256:3f15175b1fb580126f58285a5dae6b2ea89000136d980c64499211f116b54809", size = 4785063, upload-time = "2026-07-16T15:14:13.244Z" } +sdist = { url = "https://files.pythonhosted.org/packages/4d/94/1e5e4967626faf12fa56999cd6222dff6992ceb086ad7945756baf70c7a7/ruff-0.16.0.tar.gz", hash = "sha256:e460aafd5495ec89efaa6ced2e4a9a581116451e1c88b9d37ef497e0f8e93982", size = 4790557, upload-time = "2026-07-23T19:11:30.981Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/23/18/ee54b7ae1e121be7a28ea6da4b67564ebb0530e183a54415ab7e3bcd2c4e/ruff-0.15.22-py3-none-linux_armv6l.whl", hash = "sha256:44423e73493737f5e7c5b41d475483898ff37afcdae38bc3da5085e29af1c2d8", size = 10781258, upload-time = "2026-07-16T15:13:19.452Z" }, - { url = "https://files.pythonhosted.org/packages/2f/d2/2520cb14761ddbeaf57642a76942fc36adcbdbe53b4532241995f6fc485c/ruff-0.15.22-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b82c6482946e9eda7ff2e091d25b8bad3f718684e1916d41bd56873cee05b697", size = 10999477, upload-time = "2026-07-16T15:13:23.318Z" }, - { url = "https://files.pythonhosted.org/packages/c9/10/74e53572aa758dfaa678c2a2646b5c5515d884b7ca56be4d2ce03ca4b560/ruff-0.15.22-py3-none-macosx_11_0_arm64.whl", hash = "sha256:11c1c715af53a09f714e011106bffc419751ec8232fcb5da42173284ea3fec6f", size = 10466716, upload-time = "2026-07-16T15:13:26.162Z" }, - { url = "https://files.pythonhosted.org/packages/1e/cc/44eaaf0844e028182f2d0a8f2190d0f359159aed0a9e5ab861d892f1ae2a/ruff-0.15.22-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:742a29cf29bddb7c8327895d6a10e0e6c5b38a96dd407af9b5d0857f809c0576", size = 10892644, upload-time = "2026-07-16T15:13:29.229Z" }, - { url = "https://files.pythonhosted.org/packages/9f/21/8edf559014d2b0f82beea19cfb713993ad802ccda16868769979c6090a84/ruff-0.15.22-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72af58b951b0ae395935ae79763dc349bc0eb706319d28f7a33ad2cfb3cfc178", size = 10576719, upload-time = "2026-07-16T15:13:32.35Z" }, - { url = "https://files.pythonhosted.org/packages/bf/1e/3a13abd392a3b50b62e5938a831f9ab6e588358cacad5c18545b716d2182/ruff-0.15.22-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62d425005c1835eb24e2ee4161cb90e8db263415f4a71c8c72c33abaa6c0c224", size = 11376494, upload-time = "2026-07-16T15:13:35.958Z" }, - { url = "https://files.pythonhosted.org/packages/bf/3e/422d3d95bcf04dd78e1aeac22184d4f9a8fb2c01865d39d44618484a0317/ruff-0.15.22-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8b9b3f8779a4f08c969defc3c8c35abffaa757e601ed5ae66d6d1db6519969a", size = 12208370, upload-time = "2026-07-16T15:13:39.185Z" }, - { url = "https://files.pythonhosted.org/packages/1e/91/5d065a0e0a02bf4813f5119ad278462eed081d2b832eb7c021ade0ec9e65/ruff-0.15.22-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e0dd1b2e4d3d585f897a0d137cbf4eaf6223bef4e8ce34d6bb12556c5f9249e", size = 11581098, upload-time = "2026-07-16T15:13:42.132Z" }, - { url = "https://files.pythonhosted.org/packages/f6/f9/a0d4871d12fae702eb1f41b686caf05f1f8b124dc6db6f784f53d74918fa/ruff-0.15.22-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:365523eb91d9224e1bcb03b022fbf0facb8f9e23792a2c53d9d4b3924bdbdebb", size = 11399422, upload-time = "2026-07-16T15:13:45.2Z" }, - { url = "https://files.pythonhosted.org/packages/18/80/c843a5176cddbceb0b7e8dd41cf9993490796c1c469348d384f5a5c13c56/ruff-0.15.22-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:fabfd168afdf29fee5be98b831efa9683c94d7c5a3b58b9ce5a2e38444589a74", size = 11381683, upload-time = "2026-07-16T15:13:48.46Z" }, - { url = "https://files.pythonhosted.org/packages/d4/00/8485de0ae92239438a36cfc51350db9b9e85c9ebdfaea91b18e422706662/ruff-0.15.22-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:225dbf095a87f1d9f90f5fd7924d2613ee452a75a4308c63a8f50f761787aa7c", size = 10850295, upload-time = "2026-07-16T15:13:51.655Z" }, - { url = "https://files.pythonhosted.org/packages/fa/91/24977ec2ec72eaf15e4394ace2959fdff2dd1e14f03e005e838023407169/ruff-0.15.22-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:1877d63b9d24ed278744f1523fd11b85540566d54641f97c566d7d9dc5ca5296", size = 10579640, upload-time = "2026-07-16T15:13:54.79Z" }, - { url = "https://files.pythonhosted.org/packages/9c/47/9b51216951974df1f263ac19da550d34252e0ed7218c25f10c5ef9ed7517/ruff-0.15.22-py3-none-musllinux_1_2_i686.whl", hash = "sha256:a1606c510bd7215680d32efab38965f7cdec3ef69f5170a3f4791404ffdd5262", size = 11105077, upload-time = "2026-07-16T15:13:57.915Z" }, - { url = "https://files.pythonhosted.org/packages/c2/47/20e9d4a3b8016778acea5fc32bb50d35d207500a17ddb529ffa6996feef8/ruff-0.15.22-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:630479b18625f5ffc373f77603a22a9f8ac0acd7ff0501178b5db28ec71e9c64", size = 11490980, upload-time = "2026-07-16T15:14:01.032Z" }, - { url = "https://files.pythonhosted.org/packages/4d/76/3f72d8fc38c1cb77b38c56a70da9d0c17700cc1cc50f9649c9d3c8f5ba71/ruff-0.15.22-py3-none-win32.whl", hash = "sha256:e5ba0e4a13fd14abbed2a77b517a3911290c6c6c59ef67784328d1668fab76cf", size = 10789165, upload-time = "2026-07-16T15:14:04.16Z" }, - { url = "https://files.pythonhosted.org/packages/cb/46/4965251734c2b6fcdca1b1b187d20bcac3af0ee5b083b89c910bb961ce3a/ruff-0.15.22-py3-none-win_amd64.whl", hash = "sha256:9be63ba1eb936acd2d1342fb8337c356353706fce233b2a15a09a97037e6acde", size = 11938297, upload-time = "2026-07-16T15:14:07.316Z" }, - { url = "https://files.pythonhosted.org/packages/57/c9/e69b1ff4c8b69093ef08b8919ab767af0569666865b39c30a8795d88d3c6/ruff-0.15.22-py3-none-win_arm64.whl", hash = "sha256:e1168075b72158510839f250027659cdd78476f40507dd517892304c41318661", size = 11298172, upload-time = "2026-07-16T15:14:10.51Z" }, + { url = "https://files.pythonhosted.org/packages/4b/81/1c8818fee7ce1a04cd7d1b3172e0a8f8e4f1dc4feb7fc390e16daa8af323/ruff-0.16.0-py3-none-linux_armv6l.whl", hash = "sha256:e5115729eb08c585e5121978ba5d5b60caeae394ce21b9fb5e6cd33a1c6c9b1e", size = 10754633, upload-time = "2026-07-23T19:10:46.415Z" }, + { url = "https://files.pythonhosted.org/packages/23/df/beaf59c09d68db84304d555f188b276a77132a5d5b0b67a5c762aa143628/ruff-0.16.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:3c954b1d580bfa035b41654f7858cc7e71d5fc3ac5b723dd62bd9133830ed522", size = 10969164, upload-time = "2026-07-23T19:10:50.271Z" }, + { url = "https://files.pythonhosted.org/packages/42/ce/741cd197496a1abbf51352710fd15ed995d2a2be87189c1da26a450d6e83/ruff-0.16.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e01c21d10eb1b29f47b7454e1f4056db9a3f0260c646aa88457c610291db9f81", size = 10488846, upload-time = "2026-07-23T19:10:52.639Z" }, + { url = "https://files.pythonhosted.org/packages/52/2a/a2db8e88cade358f5cdcb05674a917751074109315d014eb6352d9a893f7/ruff-0.16.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6e364e5ed22ed8dc05082fd78e35308618260907ac2d3c1d637b2e682415b6c9", size = 10889729, upload-time = "2026-07-23T19:10:54.89Z" }, + { url = "https://files.pythonhosted.org/packages/42/65/62a771694ebd63029dc953e27dbad40e1588bd4860ff9fe881018fddaa49/ruff-0.16.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d327b8fc113a1d4421a04f3839d3752057c8dd1ee320223a6f3f52d04ada462a", size = 10568275, upload-time = "2026-07-23T19:10:56.993Z" }, + { url = "https://files.pythonhosted.org/packages/3f/e2/ced249fe8af5f086c5c58cc21cc3356d50f32f7401c5df87050c999620a7/ruff-0.16.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9b50c55e263103586b3dcf5f73d479eb8cb5fdb6098fec59a62891dab653717", size = 11385112, upload-time = "2026-07-23T19:10:59.615Z" }, + { url = "https://files.pythonhosted.org/packages/87/0b/05154977a8fd69eeb6c103271f55403bfd8711f5c0f8ed07489d95a504e7/ruff-0.16.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0ff4a79ce3ec0172f3241943835de1c4cb4e2dcd07f0f8c2d02603dbbbee4b17", size = 12207008, upload-time = "2026-07-23T19:11:02.154Z" }, + { url = "https://files.pythonhosted.org/packages/fb/29/98225831a3a1eab0e02f4acc6ca6559a98611dcc68b6965ff4b7234627c1/ruff-0.16.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e95c448fca1fb2a18372a9440926c5a6ee789639bb975c72e7ae6d0b04218ab4", size = 11650842, upload-time = "2026-07-23T19:11:04.557Z" }, + { url = "https://files.pythonhosted.org/packages/91/66/6bd3cf90500653d55dc0ffc8507aa8300bd49d0214b2e8cb4d3fef2943ba/ruff-0.16.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f11a8d11010301d0a398a2fdef67691feca7294da6aef55e2150e8fa2cd520b", size = 11400718, upload-time = "2026-07-23T19:11:09.233Z" }, + { url = "https://files.pythonhosted.org/packages/8e/a2/a54eb4eae05d66364050a5d3b8a9c5ef88196531b3cbe7109d873f87f819/ruff-0.16.0-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:48044c678e9cb8698246c99b14aaccfa6601dea7379eb48a6f8f73f7a6d86cd0", size = 11426177, upload-time = "2026-07-23T19:11:11.994Z" }, + { url = "https://files.pythonhosted.org/packages/1a/be/16e3eea4b2a478a496919f5e36f17c4559e54620bd3bbac5d6affa068006/ruff-0.16.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:7aa0959bad8eb8bef50340154fc9b58678dae31fa4293afa38b44b6e552c0213", size = 10856126, upload-time = "2026-07-23T19:11:14.221Z" }, + { url = "https://files.pythonhosted.org/packages/a2/84/252eb8b868a16eec7257c14f504f77537e734b2d69c762e639e588e304a3/ruff-0.16.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:28ea2b7df8ebf7f9da6b7d47b230ab48f387c0a29be3b474c4d0740e197bb9af", size = 10571208, upload-time = "2026-07-23T19:11:16.378Z" }, + { url = "https://files.pythonhosted.org/packages/21/09/817a482f542f7570cbb4554b26e896610c7114f539b1d9e2d2145bf6bef6/ruff-0.16.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:33a3dfac8c35f81498dea9181bccc2f4c4bc8f1521a1dd9406e77643e0f0fb09", size = 11063329, upload-time = "2026-07-23T19:11:19.173Z" }, + { url = "https://files.pythonhosted.org/packages/2e/23/9403c180ca1cb9b1f7335f5c3e5305c09d49ea5b345196682a36028bde4a/ruff-0.16.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:a5237a0bda500d30d81b8e07a6973a5cbc772864cbf746ae2f4e8a2e01c9f4ed", size = 11489751, upload-time = "2026-07-23T19:11:21.74Z" }, + { url = "https://files.pythonhosted.org/packages/b2/1d/1b2ef7bcde851c78d7f17f1cca13fd6dc695fc4b3d6197941e72cae5b132/ruff-0.16.0-py3-none-win32.whl", hash = "sha256:7fab76fa065c873f41ff744347c6e77bcc3dfec4bcc754dc26b63d23c0f7f5fb", size = 10785885, upload-time = "2026-07-23T19:11:23.947Z" }, + { url = "https://files.pythonhosted.org/packages/b2/a3/d5e4ef7a56be3f928ffb90b94c25ba7d3cb9c7fe0736aeaaedf361770712/ruff-0.16.0-py3-none-win_amd64.whl", hash = "sha256:429c117f022bf481fabd9d551e7a3952b24c65e6ef44337ea09d90bebef14472", size = 11923141, upload-time = "2026-07-23T19:11:26.409Z" }, + { url = "https://files.pythonhosted.org/packages/cb/9a/8415f2657cbe200f41a4531ccededf135505a92d4a012229121f885b26f9/ruff-0.16.0-py3-none-win_arm64.whl", hash = "sha256:14296fedcd2705c77ab8235439278bbb38f285cf7da5528b00b3e330c3d4872d", size = 11273407, upload-time = "2026-07-23T19:11:28.705Z" }, ] [[package]] From 75615caee813a7a325f08ac36e3f588c54bdbee9 Mon Sep 17 00:00:00 2001 From: "meraki-release-bot[bot]" <282373767+meraki-release-bot[bot]@users.noreply.github.com> Date: Wed, 29 Jul 2026 14:54:24 +0000 Subject: [PATCH 60/60] Auto-generated library v4.3.0b4 for API v1.72.0-beta.4. (#467) Co-authored-by: GitHub Action --- docs/generation-report.md | 6 +++ meraki/__init__.py | 40 +++++++++--------- meraki/_version.py | 2 +- meraki/aio/__init__.py | 36 ++++++++-------- meraki/aio/api/appliance.py | 4 +- meraki/aio/api/campusGateway.py | 54 ++++++++++++++++++++++++ meraki/aio/api/networks.py | 9 ++-- meraki/aio/api/organizations.py | 13 +++++- meraki/aio/api/wireless.py | 4 +- meraki/aio/rest_session.py | 18 +++----- meraki/api/administered.py | 4 +- meraki/api/appliance.py | 8 ++-- meraki/api/assistant.py | 4 +- meraki/api/batch/__init__.py | 6 +-- meraki/api/batch/administered.py | 4 +- meraki/api/batch/appliance.py | 8 ++-- meraki/api/batch/assistant.py | 4 +- meraki/api/batch/camera.py | 4 +- meraki/api/batch/campusGateway.py | 4 +- meraki/api/batch/cellularGateway.py | 4 +- meraki/api/batch/devices.py | 4 +- meraki/api/batch/insight.py | 4 +- meraki/api/batch/licensing.py | 4 +- meraki/api/batch/nac.py | 4 +- meraki/api/batch/networks.py | 9 ++-- meraki/api/batch/organizations.py | 9 +++- meraki/api/batch/secureConnect.py | 4 +- meraki/api/batch/sensor.py | 4 +- meraki/api/batch/sm.py | 4 +- meraki/api/batch/spaces.py | 4 +- meraki/api/batch/support.py | 4 +- meraki/api/batch/switch.py | 4 +- meraki/api/batch/users.py | 4 +- meraki/api/batch/wireless.py | 4 +- meraki/api/batch/wirelessController.py | 4 +- meraki/api/camera.py | 4 +- meraki/api/campusGateway.py | 58 +++++++++++++++++++++++++- meraki/api/cellularGateway.py | 4 +- meraki/api/devices.py | 4 +- meraki/api/insight.py | 4 +- meraki/api/licensing.py | 4 +- meraki/api/nac.py | 4 +- meraki/api/networks.py | 13 +++--- meraki/api/organizations.py | 17 ++++++-- meraki/api/secureConnect.py | 4 +- meraki/api/sensor.py | 4 +- meraki/api/sm.py | 4 +- meraki/api/spaces.py | 4 +- meraki/api/support.py | 4 +- meraki/api/switch.py | 4 +- meraki/api/users.py | 4 +- meraki/api/wireless.py | 8 ++-- meraki/api/wirelessController.py | 4 +- meraki/exceptions.py | 4 +- meraki/rest_session.py | 37 ++++++---------- pyproject.toml | 2 +- uv.lock | 2 +- 57 files changed, 309 insertions(+), 194 deletions(-) diff --git a/docs/generation-report.md b/docs/generation-report.md index dd1b334a..247853bd 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,11 @@ # Generation Report +## 2026-07-29 | Library v4.3.0b4 | API 1.72.0-beta.4 + + +No Python keyword parameter conflicts detected. + + ## 2026-07-22 | Library v4.3.0b3 | API 1.72.0-beta.3 diff --git a/meraki/__init__.py b/meraki/__init__.py index eda76d0b..8e2f3b49 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -1,6 +1,8 @@ import logging import os +from datetime import datetime +from meraki._version import __version__ # noqa: F401 from meraki.api.administered import Administered from meraki.api.appliance import Appliance @@ -23,36 +25,34 @@ # Config import from meraki.config import ( + ACTION_BATCH_RETRY_WAIT_TIME, API_KEY_ENVIRONMENT_VARIABLE, - DEFAULT_BASE_URL, - SINGLE_REQUEST_TIMEOUT, + BE_GEO_ID, CERTIFICATE_PATH, - REQUESTS_PROXY, - WAIT_ON_RATE_LIMIT, - NGINX_429_RETRY_WAIT_TIME, - ACTION_BATCH_RETRY_WAIT_TIME, - NETWORK_DELETE_RETRY_WAIT_TIME, - RETRY_4XX_ERROR, - RETRY_4XX_ERROR_WAIT_TIME, + DEFAULT_BASE_URL, + INHERIT_LOGGING_CONFIG, + LOG_FILE_PREFIX, + LOG_PATH, MAXIMUM_RETRIES, + MERAKI_PYTHON_SDK_CALLER, + NETWORK_DELETE_RETRY_WAIT_TIME, + NGINX_429_RETRY_WAIT_TIME, OUTPUT_LOG, - LOG_PATH, - LOG_FILE_PREFIX, PRINT_TO_CONSOLE, - SUPPRESS_LOGGING, - INHERIT_LOGGING_CONFIG, + REQUESTS_PROXY, + RETRY_4XX_ERROR, + RETRY_4XX_ERROR_WAIT_TIME, SIMULATE_API_CALLS, - BE_GEO_ID, - MERAKI_PYTHON_SDK_CALLER, + SINGLE_REQUEST_TIMEOUT, + SUPPRESS_LOGGING, USE_ITERATOR_FOR_GET_PAGES, VALIDATE_KWARGS, + WAIT_ON_RATE_LIMIT, ) -from meraki.rest_session import RestSession from meraki.exceptions import APIError, APIKeyError, APIResponseError, AsyncAPIError -from meraki._version import __version__ # noqa: F401 -from datetime import datetime +from meraki.rest_session import RestSession -__api_version__ = "1.72.0-beta.3" +__api_version__ = "1.72.0-beta.4" __all__ = [ "APIError", @@ -63,7 +63,7 @@ ] -class DashboardAPI(object): +class DashboardAPI: """ **Creates a persistent Meraki dashboard API session** diff --git a/meraki/_version.py b/meraki/_version.py index 31595a63..10d2475c 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "4.3.0b3" +__version__ = "4.3.0b4" diff --git a/meraki/aio/__init__.py b/meraki/aio/__init__.py index 6e8ed150..56570a30 100644 --- a/meraki/aio/__init__.py +++ b/meraki/aio/__init__.py @@ -1,5 +1,6 @@ import logging import os +from datetime import datetime from meraki.aio.api.administered import AsyncAdministered from meraki.aio.api.appliance import AsyncAppliance @@ -18,39 +19,38 @@ from meraki.aio.api.wireless import AsyncWireless from meraki.aio.api.wirelessController import AsyncWirelessController from meraki.aio.rest_session import AsyncRestSession -from meraki.exceptions import APIKeyError -from datetime import datetime # Batch class imports from meraki.api.batch import Batch # Config import from meraki.config import ( + ACTION_BATCH_RETRY_WAIT_TIME, + AIO_MAXIMUM_CONCURRENT_REQUESTS, API_KEY_ENVIRONMENT_VARIABLE, - DEFAULT_BASE_URL, - SINGLE_REQUEST_TIMEOUT, + BE_GEO_ID, CERTIFICATE_PATH, - REQUESTS_PROXY, - WAIT_ON_RATE_LIMIT, - NGINX_429_RETRY_WAIT_TIME, - ACTION_BATCH_RETRY_WAIT_TIME, - NETWORK_DELETE_RETRY_WAIT_TIME, - RETRY_4XX_ERROR, - RETRY_4XX_ERROR_WAIT_TIME, + DEFAULT_BASE_URL, + INHERIT_LOGGING_CONFIG, + LOG_FILE_PREFIX, + LOG_PATH, MAXIMUM_RETRIES, + MERAKI_PYTHON_SDK_CALLER, + NETWORK_DELETE_RETRY_WAIT_TIME, + NGINX_429_RETRY_WAIT_TIME, OUTPUT_LOG, - LOG_PATH, - LOG_FILE_PREFIX, PRINT_TO_CONSOLE, - SUPPRESS_LOGGING, - INHERIT_LOGGING_CONFIG, + REQUESTS_PROXY, + RETRY_4XX_ERROR, + RETRY_4XX_ERROR_WAIT_TIME, SIMULATE_API_CALLS, - BE_GEO_ID, - MERAKI_PYTHON_SDK_CALLER, + SINGLE_REQUEST_TIMEOUT, + SUPPRESS_LOGGING, USE_ITERATOR_FOR_GET_PAGES, - AIO_MAXIMUM_CONCURRENT_REQUESTS, VALIDATE_KWARGS, + WAIT_ON_RATE_LIMIT, ) +from meraki.exceptions import APIKeyError class AsyncDashboardAPI: diff --git a/meraki/aio/api/appliance.py b/meraki/aio/api/appliance.py index d3557fc0..730ab3f6 100644 --- a/meraki/aio/api/appliance.py +++ b/meraki/aio/api/appliance.py @@ -1382,7 +1382,7 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): - type (string): The type of the port: 'access' or 'trunk'. - vlan (integer): Native VLAN when the port is in Trunk mode. Access VLAN when the port is in Access mode. - allowedVlans (string): Comma-delimited list of VLAN IDs (e.g. '2,15') for all devices. Secure Routers also support VLAN ranges (e.g. '2-10,15'). Use 'all' to permit all VLANs on the port. - - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybris-radius' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. + - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybrid-radius', 'access-manager' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. - peerSgtCapable (boolean): If true, Peer SGT is enabled for traffic through this port. Applicable to trunk port only, not access port. - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this port is assigned to. - sgt (object): Security Group Tag settings for the port. @@ -3274,7 +3274,7 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): kwargs.update(locals()) - if "priorityRoute" in kwargs and kwargs["priorityRoute"] is not None: + if "priorityRoute" in kwargs: options = ["Auto VPN", "eBGP"] assert kwargs["priorityRoute"] in options, ( f'''"priorityRoute" cannot be "{kwargs["priorityRoute"]}", & must be set to one of: {options}''' diff --git a/meraki/aio/api/campusGateway.py b/meraki/aio/api/campusGateway.py index 90e053a1..eb834410 100644 --- a/meraki/aio/api/campusGateway.py +++ b/meraki/aio/api/campusGateway.py @@ -603,6 +603,60 @@ def getOrganizationCampusGatewayClustersSsids(self, organizationId: str, total_p return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCampusGatewayClustersTunnelable( + self, organizationId: str, fromNetworkIds: list, total_pages=1, direction="next", **kwargs + ): + """ + **List available campus gateway clusters that can be used for wireless network tunneling** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters-tunnelable + + - organizationId (string): Organization ID + - fromNetworkIds (array): Filter results by wireless network 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 + - excludeSsidNumbers (array): Optional SSID numbers (0-15) to exclude from restriction checks, corresponding to each fromNetworkIds entry. Only one SSID per network can be excluded. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 200. Default is 200. + - 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", "tunnelable"], + "operation": "getOrganizationCampusGatewayClustersTunnelable", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/tunnelable" + + query_params = [ + "fromNetworkIds", + "excludeSsidNumbers", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "fromNetworkIds", + "excludeSsidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClustersTunnelable: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCampusGatewayClustersTunnelingByClusterByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): diff --git a/meraki/aio/api/networks.py b/meraki/aio/api/networks.py index e995d1df..3fe95850 100644 --- a/meraki/aio/api/networks.py +++ b/meraki/aio/api/networks.py @@ -1113,6 +1113,7 @@ def createNetworkFirmwareUpgradesRollback(self, networkId: str, reasons: list, * options = [ "appliance", "camera", + "campusGateway", "cellularGateway", "secureConnect", "switch", @@ -3321,10 +3322,9 @@ def createNetworkVlanProfile(self, networkId: str, name: str, vlanNames: list, v - vlanNames (array): An array of named VLANs - vlanGroups (array): An array of VLAN groups - iname (string): IName of the profile - - allowedVlans (string): The VLANs allowed on the VLAN profile. Only applicable to trunk ports. The given range must be inclusive of all named VLANs. """ - kwargs.update(locals()) + kwargs = locals() metadata = { "tags": ["networks", "configure", "vlanProfiles"], @@ -3335,7 +3335,6 @@ def createNetworkVlanProfile(self, networkId: str, name: str, vlanNames: list, v body_params = [ "name", - "allowedVlans", "vlanNames", "vlanGroups", "iname", @@ -3471,10 +3470,9 @@ def updateNetworkVlanProfile(self, networkId: str, iname: str, name: str, vlanNa - name (string): Name of the profile, string length must be from 1 to 255 characters - vlanNames (array): An array of named VLANs - vlanGroups (array): An array of VLAN groups - - allowedVlans (string): The VLANs allowed on the VLAN profile. Only applicable to trunk ports. The given range must be inclusive of all named VLANs. """ - kwargs.update(locals()) + kwargs = locals() metadata = { "tags": ["networks", "configure", "vlanProfiles"], @@ -3486,7 +3484,6 @@ def updateNetworkVlanProfile(self, networkId: str, iname: str, name: str, vlanNa body_params = [ "name", - "allowedVlans", "vlanNames", "vlanGroups", ] diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 839704d5..eb1fb229 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -12035,7 +12035,18 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/sase/sites/detach" - return self._session.delete(metadata, resource) + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"detachOrganizationSaseSites: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) def updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs): """ diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index f28394ea..108167eb 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -5468,7 +5468,7 @@ def getOrganizationAssuranceWirelessExperienceMetricsOverviewHistoryByNetwork( def getOrganizationAssuranceWirelessExperienceMostImpactedNetworks(self, organizationId: str, **kwargs): """ - **Returns the most impacted wireless experience networks and the top failure contributor for each network.** + **Returns the most impacted wireless experience networks with client counts, impacted experience metrics, and the top failure contributor for each network.** https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-most-impacted-networks - organizationId (string): Organization ID @@ -5511,7 +5511,7 @@ def getOrganizationAssuranceWirelessExperienceMostImpactedNetworks(self, organiz def getOrganizationAssuranceWirelessExperienceMostImpactedXMs(self, organizationId: str, **kwargs): """ - **Returns the most impacted wireless experience metrics and the top failure contributor for each metric/network pair.** + **Returns the most impacted wireless experience metrics, including client counts, top failure contributor, and most impacted networks for each metric.** https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-most-impacted-x-ms - organizationId (string): Organization ID diff --git a/meraki/aio/rest_session.py b/meraki/aio/rest_session.py index aba94507..bc57e859 100644 --- a/meraki/aio/rest_session.py +++ b/meraki/aio/rest_session.py @@ -356,10 +356,7 @@ async def _get_pages_iterator( starting_after = urllib.parse.unquote(str(links["next"]["url"]).split("startingAfter=")[1]) delta = datetime.utcnow() - datetime.fromisoformat(starting_after[:-1]) # Break out of loop if startingAfter returned from next link is within 5 minutes of current time - if delta.total_seconds() < 300: - break - # Or if next page is past the specified window's end time - elif event_log_end_time and starting_after > event_log_end_time: + if delta.total_seconds() < 300 or event_log_end_time and starting_after > event_log_end_time: break metadata["page"] += 1 @@ -433,10 +430,7 @@ async def _get_pages_legacy( starting_after = urllib.parse.unquote(str(links["next"]["url"]).split("startingAfter=")[1]) delta = datetime.utcnow() - datetime.fromisoformat(starting_after[:-1]) # Break out of loop if startingAfter returned from next link is within 5 minutes of current time - if delta.total_seconds() < 300: - break - # Or if next page is past the specified window's end time - elif event_log_end_time and starting_after > event_log_end_time: + if delta.total_seconds() < 300 or event_log_end_time and starting_after > event_log_end_time: break metadata["page"] += 1 @@ -472,10 +466,8 @@ async def _get_pages_legacy( events = json_response["events"] if direction == "next": events = events[::-1] - if start < results["pageStartAt"]: - results["pageStartAt"] = start - if end > results["pageEndAt"]: - results["pageEndAt"] = end + results["pageStartAt"] = min(results["pageStartAt"], start) + results["pageEndAt"] = max(results["pageEndAt"], end) results["events"].extend(events) total_pages = total_pages - 1 @@ -501,7 +493,7 @@ async def delete(self, metadata, url, params=None): metadata["url"] = url metadata["params"] = params async with await self.request(metadata, "DELETE", url, params=params): - return None + return async def close(self): await self._req_session.close() diff --git a/meraki/api/administered.py b/meraki/api/administered.py index 43620862..07e6bf60 100644 --- a/meraki/api/administered.py +++ b/meraki/api/administered.py @@ -1,9 +1,9 @@ import urllib -class Administered(object): +class Administered: def __init__(self, session): - super(Administered, self).__init__() + super().__init__() self._session = session def getAdministeredIdentitiesMe(self): diff --git a/meraki/api/appliance.py b/meraki/api/appliance.py index 87c69779..c3153dfc 100644 --- a/meraki/api/appliance.py +++ b/meraki/api/appliance.py @@ -1,9 +1,9 @@ import urllib -class Appliance(object): +class Appliance: def __init__(self, session): - super(Appliance, self).__init__() + super().__init__() self._session = session def getDeviceApplianceDhcpSubnets(self, serial: str): @@ -1382,7 +1382,7 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): - type (string): The type of the port: 'access' or 'trunk'. - vlan (integer): Native VLAN when the port is in Trunk mode. Access VLAN when the port is in Access mode. - allowedVlans (string): Comma-delimited list of VLAN IDs (e.g. '2,15') for all devices. Secure Routers also support VLAN ranges (e.g. '2-10,15'). Use 'all' to permit all VLANs on the port. - - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybris-radius' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. + - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybrid-radius', 'access-manager' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. - peerSgtCapable (boolean): If true, Peer SGT is enabled for traffic through this port. Applicable to trunk port only, not access port. - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this port is assigned to. - sgt (object): Security Group Tag settings for the port. @@ -3274,7 +3274,7 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): kwargs.update(locals()) - if "priorityRoute" in kwargs and kwargs["priorityRoute"] is not None: + if "priorityRoute" in kwargs: options = ["Auto VPN", "eBGP"] assert kwargs["priorityRoute"] in options, ( f'''"priorityRoute" cannot be "{kwargs["priorityRoute"]}", & must be set to one of: {options}''' diff --git a/meraki/api/assistant.py b/meraki/api/assistant.py index eed478e8..8e36c69c 100644 --- a/meraki/api/assistant.py +++ b/meraki/api/assistant.py @@ -1,9 +1,9 @@ import urllib -class Assistant(object): +class Assistant: def __init__(self, session): - super(Assistant, self).__init__() + super().__init__() self._session = session def createAdministeredAssistantChatCompletion(self, **kwargs): diff --git a/meraki/api/batch/__init__.py b/meraki/api/batch/__init__.py index e716147b..b0b46ef7 100644 --- a/meraki/api/batch/__init__.py +++ b/meraki/api/batch/__init__.py @@ -1,10 +1,10 @@ -from meraki.api.batch.organizations import ActionBatchOrganizations -from meraki.api.batch.networks import ActionBatchNetworks -from meraki.api.batch.devices import ActionBatchDevices from meraki.api.batch.appliance import ActionBatchAppliance from meraki.api.batch.camera import ActionBatchCamera from meraki.api.batch.cellularGateway import ActionBatchCellularGateway +from meraki.api.batch.devices import ActionBatchDevices from meraki.api.batch.insight import ActionBatchInsight +from meraki.api.batch.networks import ActionBatchNetworks +from meraki.api.batch.organizations import ActionBatchOrganizations from meraki.api.batch.sensor import ActionBatchSensor from meraki.api.batch.sm import ActionBatchSm from meraki.api.batch.switch import ActionBatchSwitch diff --git a/meraki/api/batch/administered.py b/meraki/api/batch/administered.py index fb74f8bb..f1b126ce 100644 --- a/meraki/api/batch/administered.py +++ b/meraki/api/batch/administered.py @@ -1,3 +1,3 @@ -class ActionBatchAdministered(object): +class ActionBatchAdministered: def __init__(self): - super(ActionBatchAdministered, self).__init__() + super().__init__() diff --git a/meraki/api/batch/appliance.py b/meraki/api/batch/appliance.py index ff7f9697..e07b5b71 100644 --- a/meraki/api/batch/appliance.py +++ b/meraki/api/batch/appliance.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchAppliance(object): +class ActionBatchAppliance: def __init__(self): - super(ActionBatchAppliance, self).__init__() + super().__init__() def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): """ @@ -469,7 +469,7 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): - type (string): The type of the port: 'access' or 'trunk'. - vlan (integer): Native VLAN when the port is in Trunk mode. Access VLAN when the port is in Access mode. - allowedVlans (string): Comma-delimited list of VLAN IDs (e.g. '2,15') for all devices. Secure Routers also support VLAN ranges (e.g. '2-10,15'). Use 'all' to permit all VLANs on the port. - - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybris-radius' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. + - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybrid-radius', 'access-manager' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. - peerSgtCapable (boolean): If true, Peer SGT is enabled for traffic through this port. Applicable to trunk port only, not access port. - adaptivePolicyGroupId (string): Adaptive policy group ID that all traffic originating from this port is assigned to. - sgt (object): Security Group Tag settings for the port. @@ -1486,7 +1486,7 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): kwargs.update(locals()) - if "priorityRoute" in kwargs and kwargs["priorityRoute"] is not None: + if "priorityRoute" in kwargs: options = ["Auto VPN", "eBGP"] assert kwargs["priorityRoute"] in options, ( f'''"priorityRoute" cannot be "{kwargs["priorityRoute"]}", & must be set to one of: {options}''' diff --git a/meraki/api/batch/assistant.py b/meraki/api/batch/assistant.py index 31bf6782..3245c122 100644 --- a/meraki/api/batch/assistant.py +++ b/meraki/api/batch/assistant.py @@ -1,3 +1,3 @@ -class ActionBatchAssistant(object): +class ActionBatchAssistant: def __init__(self): - super(ActionBatchAssistant, self).__init__() + super().__init__() diff --git a/meraki/api/batch/camera.py b/meraki/api/batch/camera.py index 6f2993c2..e573cdf5 100644 --- a/meraki/api/batch/camera.py +++ b/meraki/api/batch/camera.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchCamera(object): +class ActionBatchCamera: def __init__(self): - super(ActionBatchCamera, self).__init__() + super().__init__() def updateDeviceCameraCustomAnalytics(self, serial: str, **kwargs): """ diff --git a/meraki/api/batch/campusGateway.py b/meraki/api/batch/campusGateway.py index 60c995d6..3dc853d9 100644 --- a/meraki/api/batch/campusGateway.py +++ b/meraki/api/batch/campusGateway.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchCampusGateway(object): +class ActionBatchCampusGateway: def __init__(self): - super(ActionBatchCampusGateway, self).__init__() + super().__init__() def createNetworkCampusGatewayCluster( self, networkId: str, name: str, uplinks: list, tunnels: list, nameservers: dict, portChannels: list, **kwargs diff --git a/meraki/api/batch/cellularGateway.py b/meraki/api/batch/cellularGateway.py index e57b9508..4981798b 100644 --- a/meraki/api/batch/cellularGateway.py +++ b/meraki/api/batch/cellularGateway.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchCellularGateway(object): +class ActionBatchCellularGateway: def __init__(self): - super(ActionBatchCellularGateway, self).__init__() + super().__init__() def updateDeviceCellularGatewayLan(self, serial: str, **kwargs): """ diff --git a/meraki/api/batch/devices.py b/meraki/api/batch/devices.py index daaa4661..054a7b47 100644 --- a/meraki/api/batch/devices.py +++ b/meraki/api/batch/devices.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchDevices(object): +class ActionBatchDevices: def __init__(self): - super(ActionBatchDevices, self).__init__() + super().__init__() def updateDevice(self, serial: str, **kwargs): """ diff --git a/meraki/api/batch/insight.py b/meraki/api/batch/insight.py index c2057ffd..3468996e 100644 --- a/meraki/api/batch/insight.py +++ b/meraki/api/batch/insight.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchInsight(object): +class ActionBatchInsight: def __init__(self): - super(ActionBatchInsight, self).__init__() + super().__init__() def createOrganizationInsightApplication(self, organizationId: str, counterSetRuleId: int, **kwargs): """ diff --git a/meraki/api/batch/licensing.py b/meraki/api/batch/licensing.py index 068ececf..31e22332 100644 --- a/meraki/api/batch/licensing.py +++ b/meraki/api/batch/licensing.py @@ -1,3 +1,3 @@ -class ActionBatchLicensing(object): +class ActionBatchLicensing: def __init__(self): - super(ActionBatchLicensing, self).__init__() + super().__init__() diff --git a/meraki/api/batch/nac.py b/meraki/api/batch/nac.py index 7a6720b0..f186e8b1 100644 --- a/meraki/api/batch/nac.py +++ b/meraki/api/batch/nac.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchNac(object): +class ActionBatchNac: def __init__(self): - super(ActionBatchNac, self).__init__() + super().__init__() def createOrganizationNacCertificatesAuthoritiesCrl( self, organizationId: str, caId: str, content: str, isDelta: bool, **kwargs diff --git a/meraki/api/batch/networks.py b/meraki/api/batch/networks.py index 3b6e6d94..9bf59835 100644 --- a/meraki/api/batch/networks.py +++ b/meraki/api/batch/networks.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchNetworks(object): +class ActionBatchNetworks: def __init__(self): - super(ActionBatchNetworks, self).__init__() + super().__init__() def updateNetwork(self, networkId: str, **kwargs): """ @@ -276,6 +276,7 @@ def createNetworkFirmwareUpgradesRollback(self, networkId: str, reasons: list, * options = [ "appliance", "camera", + "campusGateway", "cellularGateway", "secureConnect", "switch", @@ -1102,17 +1103,15 @@ def createNetworkVlanProfile(self, networkId: str, name: str, vlanNames: list, v - vlanNames (array): An array of named VLANs - vlanGroups (array): An array of VLAN groups - iname (string): IName of the profile - - allowedVlans (string): The VLANs allowed on the VLAN profile. Only applicable to trunk ports. The given range must be inclusive of all named VLANs. """ - kwargs.update(locals()) + kwargs = locals() networkId = urllib.parse.quote(networkId, safe="") resource = f"/networks/{networkId}/vlanProfiles" body_params = [ "name", - "allowedVlans", "vlanNames", "vlanGroups", "iname", diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index 5f259fa0..ef3ce429 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchOrganizations(object): +class ActionBatchOrganizations: def __init__(self): - super(ActionBatchOrganizations, self).__init__() + super().__init__() def updateOrganization(self, organizationId: str, **kwargs): """ @@ -3165,9 +3165,14 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): organizationId = urllib.parse.quote(organizationId, safe="") resource = f"/organizations/{organizationId}/sase/sites/detach" + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} action = { "resource": resource, "operation": "detach", + "body": payload, } return action diff --git a/meraki/api/batch/secureConnect.py b/meraki/api/batch/secureConnect.py index aa0b6f8b..d2d958ae 100644 --- a/meraki/api/batch/secureConnect.py +++ b/meraki/api/batch/secureConnect.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchSecureConnect(object): +class ActionBatchSecureConnect: def __init__(self): - super(ActionBatchSecureConnect, self).__init__() + super().__init__() def createOrganizationSecureConnectPrivateResourceGroup(self, organizationId: str, name: str, **kwargs): """ diff --git a/meraki/api/batch/sensor.py b/meraki/api/batch/sensor.py index 63e5f436..b82b0743 100644 --- a/meraki/api/batch/sensor.py +++ b/meraki/api/batch/sensor.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchSensor(object): +class ActionBatchSensor: def __init__(self): - super(ActionBatchSensor, self).__init__() + super().__init__() def createDeviceSensorCommand(self, serial: str, operation: str, **kwargs): """ diff --git a/meraki/api/batch/sm.py b/meraki/api/batch/sm.py index 738e1498..8d3c8b63 100644 --- a/meraki/api/batch/sm.py +++ b/meraki/api/batch/sm.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchSm(object): +class ActionBatchSm: def __init__(self): - super(ActionBatchSm, self).__init__() + super().__init__() def createNetworkSmScript(self, networkId: str, name: str, platform: str, **kwargs): """ diff --git a/meraki/api/batch/spaces.py b/meraki/api/batch/spaces.py index 990bdcaa..c1e914eb 100644 --- a/meraki/api/batch/spaces.py +++ b/meraki/api/batch/spaces.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchSpaces(object): +class ActionBatchSpaces: def __init__(self): - super(ActionBatchSpaces, self).__init__() + super().__init__() def removeOrganizationSpacesIntegration(self, organizationId: str): """ diff --git a/meraki/api/batch/support.py b/meraki/api/batch/support.py index e884c292..3c6431d7 100644 --- a/meraki/api/batch/support.py +++ b/meraki/api/batch/support.py @@ -1,3 +1,3 @@ -class ActionBatchSupport(object): +class ActionBatchSupport: def __init__(self): - super(ActionBatchSupport, self).__init__() + super().__init__() diff --git a/meraki/api/batch/switch.py b/meraki/api/batch/switch.py index 9c2b27f8..d972caa3 100644 --- a/meraki/api/batch/switch.py +++ b/meraki/api/batch/switch.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchSwitch(object): +class ActionBatchSwitch: def __init__(self): - super(ActionBatchSwitch, self).__init__() + super().__init__() def cycleDeviceSwitchPorts(self, serial: str, ports: list, **kwargs): """ diff --git a/meraki/api/batch/users.py b/meraki/api/batch/users.py index a194ca60..d94840b4 100644 --- a/meraki/api/batch/users.py +++ b/meraki/api/batch/users.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchUsers(object): +class ActionBatchUsers: def __init__(self): - super(ActionBatchUsers, self).__init__() + super().__init__() def createOrganizationIamUsersAuthorization(self, organizationId: str, authZone: dict, **kwargs): """ diff --git a/meraki/api/batch/wireless.py b/meraki/api/batch/wireless.py index 6a4e9ce8..d787ca57 100644 --- a/meraki/api/batch/wireless.py +++ b/meraki/api/batch/wireless.py @@ -1,9 +1,9 @@ import urllib -class ActionBatchWireless(object): +class ActionBatchWireless: def __init__(self): - super(ActionBatchWireless, self).__init__() + super().__init__() def updateDeviceWirelessAlternateManagementInterfaceIpv6(self, serial: str, **kwargs): """ diff --git a/meraki/api/batch/wirelessController.py b/meraki/api/batch/wirelessController.py index 6adbd73d..d063f114 100644 --- a/meraki/api/batch/wirelessController.py +++ b/meraki/api/batch/wirelessController.py @@ -1,3 +1,3 @@ -class ActionBatchWirelessController(object): +class ActionBatchWirelessController: def __init__(self): - super(ActionBatchWirelessController, self).__init__() + super().__init__() diff --git a/meraki/api/camera.py b/meraki/api/camera.py index 7d983310..edfd0bde 100644 --- a/meraki/api/camera.py +++ b/meraki/api/camera.py @@ -1,9 +1,9 @@ import urllib -class Camera(object): +class Camera: def __init__(self, session): - super(Camera, self).__init__() + super().__init__() self._session = session def getDeviceCameraAnalyticsLive(self, serial: str): diff --git a/meraki/api/campusGateway.py b/meraki/api/campusGateway.py index cc456d95..466b7d15 100644 --- a/meraki/api/campusGateway.py +++ b/meraki/api/campusGateway.py @@ -1,9 +1,9 @@ import urllib -class CampusGateway(object): +class CampusGateway: def __init__(self, session): - super(CampusGateway, self).__init__() + super().__init__() self._session = session def createNetworkCampusGatewayCluster( @@ -603,6 +603,60 @@ def getOrganizationCampusGatewayClustersSsids(self, organizationId: str, total_p return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCampusGatewayClustersTunnelable( + self, organizationId: str, fromNetworkIds: list, total_pages=1, direction="next", **kwargs + ): + """ + **List available campus gateway clusters that can be used for wireless network tunneling** + https://developer.cisco.com/meraki/api-v1/#!get-organization-campus-gateway-clusters-tunnelable + + - organizationId (string): Organization ID + - fromNetworkIds (array): Filter results by wireless network 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 + - excludeSsidNumbers (array): Optional SSID numbers (0-15) to exclude from restriction checks, corresponding to each fromNetworkIds entry. Only one SSID per network can be excluded. + - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 200. Default is 200. + - 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", "tunnelable"], + "operation": "getOrganizationCampusGatewayClustersTunnelable", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/campusGateway/clusters/tunnelable" + + query_params = [ + "fromNetworkIds", + "excludeSsidNumbers", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "fromNetworkIds", + "excludeSsidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationCampusGatewayClustersTunnelable: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationCampusGatewayClustersTunnelingByClusterByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): diff --git a/meraki/api/cellularGateway.py b/meraki/api/cellularGateway.py index cececf4a..e5c27466 100644 --- a/meraki/api/cellularGateway.py +++ b/meraki/api/cellularGateway.py @@ -1,9 +1,9 @@ import urllib -class CellularGateway(object): +class CellularGateway: def __init__(self, session): - super(CellularGateway, self).__init__() + super().__init__() self._session = session def getDeviceCellularGatewayLan(self, serial: str): diff --git a/meraki/api/devices.py b/meraki/api/devices.py index 8a436051..973fd0eb 100644 --- a/meraki/api/devices.py +++ b/meraki/api/devices.py @@ -1,9 +1,9 @@ import urllib -class Devices(object): +class Devices: def __init__(self, session): - super(Devices, self).__init__() + super().__init__() self._session = session def getDevice(self, serial: str): diff --git a/meraki/api/insight.py b/meraki/api/insight.py index 08b7cb4b..b70de952 100644 --- a/meraki/api/insight.py +++ b/meraki/api/insight.py @@ -1,9 +1,9 @@ import urllib -class Insight(object): +class Insight: def __init__(self, session): - super(Insight, self).__init__() + super().__init__() self._session = session def getNetworkInsightApplicationHealthByTime(self, networkId: str, applicationId: str, **kwargs): diff --git a/meraki/api/licensing.py b/meraki/api/licensing.py index 5911aa63..2aed1a35 100644 --- a/meraki/api/licensing.py +++ b/meraki/api/licensing.py @@ -1,9 +1,9 @@ import urllib -class Licensing(object): +class Licensing: def __init__(self, session): - super(Licensing, self).__init__() + super().__init__() self._session = session def getAdministeredLicensingSubscriptionEntitlements(self, **kwargs): diff --git a/meraki/api/nac.py b/meraki/api/nac.py index 09bd2070..3232f3d0 100644 --- a/meraki/api/nac.py +++ b/meraki/api/nac.py @@ -1,9 +1,9 @@ import urllib -class Nac(object): +class Nac: def __init__(self, session): - super(Nac, self).__init__() + super().__init__() self._session = session def getOrganizationNacAuthorizationPolicies(self, organizationId: str, **kwargs): diff --git a/meraki/api/networks.py b/meraki/api/networks.py index 73107503..e2755f53 100644 --- a/meraki/api/networks.py +++ b/meraki/api/networks.py @@ -1,9 +1,9 @@ import urllib -class Networks(object): +class Networks: def __init__(self, session): - super(Networks, self).__init__() + super().__init__() self._session = session def getNetwork(self, networkId: str): @@ -1113,6 +1113,7 @@ def createNetworkFirmwareUpgradesRollback(self, networkId: str, reasons: list, * options = [ "appliance", "camera", + "campusGateway", "cellularGateway", "secureConnect", "switch", @@ -3321,10 +3322,9 @@ def createNetworkVlanProfile(self, networkId: str, name: str, vlanNames: list, v - vlanNames (array): An array of named VLANs - vlanGroups (array): An array of VLAN groups - iname (string): IName of the profile - - allowedVlans (string): The VLANs allowed on the VLAN profile. Only applicable to trunk ports. The given range must be inclusive of all named VLANs. """ - kwargs.update(locals()) + kwargs = locals() metadata = { "tags": ["networks", "configure", "vlanProfiles"], @@ -3335,7 +3335,6 @@ def createNetworkVlanProfile(self, networkId: str, name: str, vlanNames: list, v body_params = [ "name", - "allowedVlans", "vlanNames", "vlanGroups", "iname", @@ -3471,10 +3470,9 @@ def updateNetworkVlanProfile(self, networkId: str, iname: str, name: str, vlanNa - name (string): Name of the profile, string length must be from 1 to 255 characters - vlanNames (array): An array of named VLANs - vlanGroups (array): An array of VLAN groups - - allowedVlans (string): The VLANs allowed on the VLAN profile. Only applicable to trunk ports. The given range must be inclusive of all named VLANs. """ - kwargs.update(locals()) + kwargs = locals() metadata = { "tags": ["networks", "configure", "vlanProfiles"], @@ -3486,7 +3484,6 @@ def updateNetworkVlanProfile(self, networkId: str, iname: str, name: str, vlanNa body_params = [ "name", - "allowedVlans", "vlanNames", "vlanGroups", ] diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index 1b009e3c..c112ea1f 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -1,9 +1,9 @@ import urllib -class Organizations(object): +class Organizations: def __init__(self, session): - super(Organizations, self).__init__() + super().__init__() self._session = session def getOrganizations(self, total_pages=1, direction="next", **kwargs): @@ -12035,7 +12035,18 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/sase/sites/detach" - return self._session.delete(metadata, resource) + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"detachOrganizationSaseSites: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) def updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs): """ diff --git a/meraki/api/secureConnect.py b/meraki/api/secureConnect.py index 75a773ac..85fecca0 100644 --- a/meraki/api/secureConnect.py +++ b/meraki/api/secureConnect.py @@ -1,9 +1,9 @@ import urllib -class SecureConnect(object): +class SecureConnect: def __init__(self, session): - super(SecureConnect, self).__init__() + super().__init__() self._session = session def getOrganizationSecureConnectPrivateApplicationGroups( diff --git a/meraki/api/sensor.py b/meraki/api/sensor.py index 9c901dee..0e4bfc63 100644 --- a/meraki/api/sensor.py +++ b/meraki/api/sensor.py @@ -1,9 +1,9 @@ import urllib -class Sensor(object): +class Sensor: def __init__(self, session): - super(Sensor, self).__init__() + super().__init__() self._session = session def getDeviceSensorCommands(self, serial: str, total_pages=1, direction="next", **kwargs): diff --git a/meraki/api/sm.py b/meraki/api/sm.py index 26a01905..eae11a62 100644 --- a/meraki/api/sm.py +++ b/meraki/api/sm.py @@ -1,9 +1,9 @@ import urllib -class Sm(object): +class Sm: def __init__(self, session): - super(Sm, self).__init__() + super().__init__() self._session = session def createNetworkSmBypassActivationLockAttempt(self, networkId: str, ids: list, **kwargs): diff --git a/meraki/api/spaces.py b/meraki/api/spaces.py index 6c0475d8..37ee9da6 100644 --- a/meraki/api/spaces.py +++ b/meraki/api/spaces.py @@ -1,9 +1,9 @@ import urllib -class Spaces(object): +class Spaces: def __init__(self, session): - super(Spaces, self).__init__() + super().__init__() self._session = session def getOrganizationSpacesIntegrateStatus(self, organizationId: str): diff --git a/meraki/api/support.py b/meraki/api/support.py index 9fe7ab7e..562c5bf7 100644 --- a/meraki/api/support.py +++ b/meraki/api/support.py @@ -1,9 +1,9 @@ import urllib -class Support(object): +class Support: def __init__(self, session): - super(Support, self).__init__() + super().__init__() self._session = session def getOrganizationSupportSalesRepresentatives(self, organizationId: str): diff --git a/meraki/api/switch.py b/meraki/api/switch.py index 487d2810..3ebab47b 100644 --- a/meraki/api/switch.py +++ b/meraki/api/switch.py @@ -1,9 +1,9 @@ import urllib -class Switch(object): +class Switch: def __init__(self, session): - super(Switch, self).__init__() + super().__init__() self._session = session def getDeviceSwitchPorts(self, serial: str, **kwargs): diff --git a/meraki/api/users.py b/meraki/api/users.py index f48c8b52..af0776f4 100644 --- a/meraki/api/users.py +++ b/meraki/api/users.py @@ -1,9 +1,9 @@ import urllib -class Users(object): +class Users: def __init__(self, session): - super(Users, self).__init__() + super().__init__() self._session = session def getOrganizationIamUsersAuthorizations( diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index fe83ddef..d671c420 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -1,9 +1,9 @@ import urllib -class Wireless(object): +class Wireless: def __init__(self, session): - super(Wireless, self).__init__() + super().__init__() self._session = session def updateDeviceWirelessAlternateManagementInterfaceIpv6(self, serial: str, **kwargs): @@ -5468,7 +5468,7 @@ def getOrganizationAssuranceWirelessExperienceMetricsOverviewHistoryByNetwork( def getOrganizationAssuranceWirelessExperienceMostImpactedNetworks(self, organizationId: str, **kwargs): """ - **Returns the most impacted wireless experience networks and the top failure contributor for each network.** + **Returns the most impacted wireless experience networks with client counts, impacted experience metrics, and the top failure contributor for each network.** https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-most-impacted-networks - organizationId (string): Organization ID @@ -5511,7 +5511,7 @@ def getOrganizationAssuranceWirelessExperienceMostImpactedNetworks(self, organiz def getOrganizationAssuranceWirelessExperienceMostImpactedXMs(self, organizationId: str, **kwargs): """ - **Returns the most impacted wireless experience metrics and the top failure contributor for each metric/network pair.** + **Returns the most impacted wireless experience metrics, including client counts, top failure contributor, and most impacted networks for each metric.** https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-most-impacted-x-ms - organizationId (string): Organization ID diff --git a/meraki/api/wirelessController.py b/meraki/api/wirelessController.py index 3ba7fa19..fa3a2479 100644 --- a/meraki/api/wirelessController.py +++ b/meraki/api/wirelessController.py @@ -1,9 +1,9 @@ import urllib -class WirelessController(object): +class WirelessController: def __init__(self, session): - super(WirelessController, self).__init__() + super().__init__() self._session = session def getOrganizationWirelessControllerAvailabilitiesChangeHistory( diff --git a/meraki/exceptions.py b/meraki/exceptions.py index 3b2a3cce..a4af53f9 100644 --- a/meraki/exceptions.py +++ b/meraki/exceptions.py @@ -2,7 +2,7 @@ class APIKeyError(Exception): def __init__(self): self.message = "Meraki API key needs to be defined" - super(APIKeyError, self).__init__(self.message) + super().__init__(self.message) def __repr__(self): return self.message @@ -46,7 +46,7 @@ def __init__(self, metadata, response): self.message = self.response.content[:100].decode("UTF-8").strip() if isinstance(self.message, str) and self.status == 404 and self.reason == "Not Found": self.message += "please wait a minute if the key or org was just newly created." - super(APIError, self).__init__(f"{self.tag}, {self.operation} - {self.status} {self.reason}, {self.message}") + super().__init__(f"{self.tag}, {self.operation} - {self.status} {self.reason}, {self.message}") def __repr__(self): return f"{self.tag}, {self.operation} - {self.status} {self.reason}, {self.message}" diff --git a/meraki/rest_session.py b/meraki/rest_session.py index 0832410e..6c6d9a6d 100644 --- a/meraki/rest_session.py +++ b/meraki/rest_session.py @@ -1,12 +1,12 @@ -import random -import urllib.parse -from datetime import datetime, timezone import json +import random import time +import urllib.parse +from datetime import UTC, datetime import requests -from requests.utils import to_key_val_list from requests.compat import basestring, urlencode +from requests.utils import to_key_val_list from meraki._version import __version__ from meraki.common import ( @@ -56,9 +56,7 @@ def encode_params(_, data): Ex. {"param": [{"key_1":"value_1"}, {"key_2":"value_2"}]} => ?param[]key_1=value_1¶m[]key_2=value_2 """ - if isinstance(data, (str, bytes)): - return data - elif hasattr(data, "read"): + if isinstance(data, (str, bytes)) or hasattr(data, "read"): return data elif hasattr(data, "__iter__"): result = [] @@ -124,7 +122,7 @@ def user_agent_extended(be_geo_id, caller): # Main module interface -class RestSession(object): +class RestSession: def __init__( self, logger, @@ -146,7 +144,7 @@ def __init__( use_iterator_for_get_pages=USE_ITERATOR_FOR_GET_PAGES, validate_kwargs=False, ): - super(RestSession, self).__init__() + super().__init__() # Initialize attributes and properties self._version = __version__ @@ -433,12 +431,9 @@ def _get_pages_iterator( # Prevent getNetworkEvents from infinite loop as time goes forward if metadata["operation"] == "getNetworkEvents": starting_after = urllib.parse.unquote(str(links["next"]["url"]).split("startingAfter=")[1]) - delta = datetime.now(timezone.utc) - datetime.fromisoformat(starting_after) + delta = datetime.now(UTC) - datetime.fromisoformat(starting_after) # Break out of loop if startingAfter returned from next link is within 5 minutes of current time - if delta.total_seconds() < 300: - break - # Or if the next page is past the specified window's end time - elif event_log_end_time and starting_after > event_log_end_time: + if delta.total_seconds() < 300 or event_log_end_time and starting_after > event_log_end_time: break metadata["page"] += 1 @@ -525,12 +520,9 @@ def _get_pages_legacy( # Prevent getNetworkEvents from infinite loop as time goes forward if metadata["operation"] == "getNetworkEvents": starting_after = urllib.parse.unquote(links["next"]["url"].split("startingAfter=")[1]) - delta = datetime.now(timezone.utc) - datetime.fromisoformat(starting_after) + delta = datetime.now(UTC) - datetime.fromisoformat(starting_after) # Break out of loop if startingAfter returned from next link is within 5 minutes of current time - if delta.total_seconds() < 300: - break - # Or if next page is past the specified window's end time - elif event_log_end_time and starting_after > event_log_end_time: + if delta.total_seconds() < 300 or event_log_end_time and starting_after > event_log_end_time: break metadata["page"] += 1 @@ -566,10 +558,8 @@ def _get_pages_legacy( events = response.json()["events"] if direction == "next": events = events[::-1] - if start < results["pageStartAt"]: - results["pageStartAt"] = start - if end > results["pageEndAt"]: - results["pageEndAt"] = end + results["pageStartAt"] = min(results["pageStartAt"], start) + results["pageEndAt"] = max(results["pageEndAt"], end) results["events"].extend(events) total_pages -= 1 @@ -610,4 +600,3 @@ def delete(self, metadata, url, params=None): response = self.request(metadata, "DELETE", url, params=params) if response: response.close() - return None diff --git a/pyproject.toml b/pyproject.toml index 22c03dac..c51173b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "4.3.0b3" +version = "4.3.0b4" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index 1981f793..0dc5c586 100644 --- a/uv.lock +++ b/uv.lock @@ -549,7 +549,7 @@ wheels = [ [[package]] name = "meraki" -version = "4.3.0b3" +version = "4.3.0b4" source = { editable = "." } dependencies = [ { name = "aiohttp" },