diff --git a/docs/generation-report.md b/docs/generation-report.md index bb4f3d4..e9eaf33 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,11 @@ # Generation Report +## 2026-08-12 | Library v4.4.0b1 | API 1.73.0-beta.1 + + +No Python keyword parameter conflicts detected. + + ## 2026-08-05 | Library v4.4.0b0 | API 1.73.0-beta.0 diff --git a/meraki/__init__.py b/meraki/__init__.py index 10c9eed..a4287c4 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -52,7 +52,7 @@ from meraki.exceptions import APIError, APIKeyError, APIResponseError, AsyncAPIError from meraki.rest_session import RestSession -__api_version__ = "1.73.0-beta.0" +__api_version__ = "1.73.0-beta.1" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index e0dd069..e8957a0 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "4.4.0b0" +__version__ = "4.4.0b1" diff --git a/meraki/aio/api/appliance.py b/meraki/aio/api/appliance.py index 72ddb92..18f19c9 100644 --- a/meraki/aio/api/appliance.py +++ b/meraki/aio/api/appliance.py @@ -2053,11 +2053,11 @@ def updateNetworkApplianceSsid(self, networkId: str, number: str, **kwargs): - name (string): The name of the SSID. - enabled (boolean): Whether or not the SSID is enabled. - defaultVlanId (integer): The VLAN ID of the VLAN associated to this SSID. This parameter is only valid if the network is in routed mode. - - authMode (string): The association control method for the SSID ('open', 'psk', '8021x-meraki' or '8021x-radius'). + - authMode (string): The association control method for the SSID ('open', 'psk', '8021x-meraki', '8021x-radius' or '8021x-nac'). - psk (string): The passkey for the SSID. This param is only valid if the authMode is 'psk'. - radiusServers (array): The RADIUS 802.1x servers to be used for authentication. This param is only valid if the authMode is '8021x-radius'. - encryptionMode (string): The psk encryption mode for the SSID ('wep' or 'wpa'). This param is only valid if the authMode is 'psk'. - - wpaEncryptionMode (string): The types of WPA encryption. ('WPA1 and WPA2', 'WPA2 only', 'WPA3 Transition Mode' or 'WPA3 only'). This param is only valid if (1) the authMode is 'psk' & the encryptionMode is 'wpa' OR (2) the authMode is '8021x-meraki' OR (3) the authMode is '8021x-radius' + - wpaEncryptionMode (string): The types of WPA encryption. ('WPA1 and WPA2', 'WPA2 only', 'WPA3 Transition Mode' or 'WPA3 only'). This param is only valid if (1) the authMode is 'psk' & the encryptionMode is 'wpa' OR (2) the authMode is '8021x-meraki' OR (3) the authMode is '8021x-radius' OR (4) the authMode is '8021x-nac' - visible (boolean): Boolean indicating whether the MX should advertise or hide this SSID. - dhcpEnforcedDeauthentication (object): DHCP Enforced Deauthentication enables the disassociation of wireless clients in addition to Mandatory DHCP. This param is only valid on firmware versions >= MX 17.0 where the associated LAN has Mandatory DHCP Enabled - dot11w (object): The current setting for Protected Management Frames (802.11w). @@ -2066,7 +2066,7 @@ def updateNetworkApplianceSsid(self, networkId: str, number: str, **kwargs): kwargs.update(locals()) if "authMode" in kwargs: - options = ["8021x-meraki", "8021x-radius", "open", "psk"] + options = ["8021x-meraki", "8021x-nac", "8021x-radius", "open", "psk"] assert kwargs["authMode"] in options, ( f'''"authMode" cannot be "{kwargs["authMode"]}", & must be set to one of: {options}''' ) diff --git a/meraki/aio/api/devices.py b/meraki/aio/api/devices.py index 3e24199..5f01c2c 100644 --- a/meraki/aio/api/devices.py +++ b/meraki/aio/api/devices.py @@ -1093,6 +1093,7 @@ def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): - destination (object): The destination IP or subnet to lookup - nextHop (object): The next hop to lookup - vpn (object): VPN related search criteria + - vrf (object): Virtual routing and forwarding (VRF) search criteria - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ @@ -1130,6 +1131,7 @@ def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): "destination", "nextHop", "vpn", + "vrf", "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/aio/api/licensing.py b/meraki/aio/api/licensing.py index c8ba0f9..562566a 100644 --- a/meraki/aio/api/licensing.py +++ b/meraki/aio/api/licensing.py @@ -12,10 +12,17 @@ def getAdministeredLicensingSubscriptionEntitlements(self, **kwargs): https://developer.cisco.com/meraki/api-v1/#!get-administered-licensing-subscription-entitlements - skus (array): Filter to entitlements with the specified SKUs + - subscriptionType (string): Filter entitlements by subscription type """ kwargs.update(locals()) + if "subscriptionType" in kwargs: + options = ["termed", "unified"] + assert kwargs["subscriptionType"] in options, ( + f'''"subscriptionType" cannot be "{kwargs["subscriptionType"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["licensing", "configure", "subscription", "entitlements"], "operation": "getAdministeredLicensingSubscriptionEntitlements", @@ -24,6 +31,7 @@ def getAdministeredLicensingSubscriptionEntitlements(self, **kwargs): query_params = [ "skus", + "subscriptionType", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} diff --git a/meraki/aio/api/nac.py b/meraki/aio/api/nac.py index 319f92b..8080582 100644 --- a/meraki/aio/api/nac.py +++ b/meraki/aio/api/nac.py @@ -411,9 +411,28 @@ def retrieveOrganizationNacCertificatesAuthoritiesCrls(self, organizationId: str return self._session.post(metadata, resource, payload) + def getOrganizationNacCertificatesAuthoritiesCrl(self, organizationId: str, crlId: str): + """ + **Get a CRL, including its revoked serial numbers** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-certificates-authorities-crl + + - organizationId (string): Organization ID + - crlId (string): Crl ID + """ + + metadata = { + "tags": ["nac", "configure", "certificates", "authorities", "crls"], + "operation": "getOrganizationNacCertificatesAuthoritiesCrl", + } + 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.get(metadata, resource) + def deleteOrganizationNacCertificatesAuthoritiesCrl(self, organizationId: str, crlId: str): """ - **Deletes a whole CRL, including all its deltas (in case of base CRL removal)** + **Deletes a CRL** https://developer.cisco.com/meraki/api-v1/#!delete-organization-nac-certificates-authorities-crl - organizationId (string): Organization ID @@ -536,6 +555,7 @@ def getOrganizationNacClients(self, organizationId: str, total_pages=1, directio - 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 + - ipskConfigured (boolean): Filter clients by Identity Pre-Shared Key (iPSK) configuration status. true returns only clients with a per-client iPSK passphrase set; false returns only clients without one. Omit to return all clients regardless of iPSK status. When combined with other filters (clientIds, groupIds, search, classification, ssid, lastNetworkName), all conditions are applied together (logical AND). """ kwargs.update(locals()) @@ -570,6 +590,7 @@ def getOrganizationNacClients(self, organizationId: str, total_pages=1, directio "lastNetworkName", "ssid", "classification", + "ipskConfigured", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} @@ -606,6 +627,7 @@ def createOrganizationNacClient(self, organizationId: str, mac: str, **kwargs): - 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 + - ipsk (string): Per-client Identity Pre-Shared Key (iPSK) passphrase (8-63 printable ASCII characters). Only accepted when the access-manager-ipsk-per-client feature flag is enabled; omit when the flag is disabled. Omit to create the client without a passphrase. """ kwargs.update(locals()) @@ -630,6 +652,7 @@ def createOrganizationNacClient(self, organizationId: str, mac: str, **kwargs): "userDetails", "oui", "groups", + "ipsk", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -680,6 +703,7 @@ def createOrganizationNacClientsBulkEdit(self, organizationId: str, clientIds: l - 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 + - ipsk (string): Per-client Identity Pre-Shared Key (iPSK) passphrase to apply to all selected clients (8-63 printable ASCII characters). Only accepted when the access-manager-ipsk-per-client feature flag is enabled; omit when the flag is disabled. Send an empty string to clear the passphrase. Omit the field to leave existing passphrases unchanged. - groups (object): Client group information to be applied on the list of clients provided """ @@ -695,6 +719,7 @@ def createOrganizationNacClientsBulkEdit(self, organizationId: str, clientIds: l body_params = [ "clientIds", "description", + "ipsk", "groups", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -715,7 +740,7 @@ def createOrganizationNacClientsBulkUpload( 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 + - contents (string): CSV file content in Base64 encoded string format. Example CSV includes headers MAC Address, Endpoint device group, Description, IPSK. - 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 """ @@ -932,6 +957,7 @@ def updateOrganizationNacClient(self, organizationId: str, clientId: str, mac: s - 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 + - ipsk (string): Per-client Identity Pre-Shared Key (iPSK) passphrase (8-63 printable ASCII characters). Only accepted when the access-manager-ipsk-per-client feature flag is enabled; omit when the flag is disabled. Send an empty string to clear the passphrase. Omit the field to leave any existing passphrase unchanged. - groups (object): Client group membership changes """ @@ -957,6 +983,7 @@ def updateOrganizationNacClient(self, organizationId: str, clientId: str, mac: s "uuid", "userDetails", "oui", + "ipsk", "groups", ] 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 3a4e356..3e78397 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -3716,6 +3716,60 @@ def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByServe return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsInsightsByNetwork(self, organizationId: str, **kwargs): + """ + **Provides insights into wired successful connections experience by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-insights-by-network + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - 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. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "wired", "experience", "successfulConnections", "insights", "byNetwork"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsInsightsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/insights/byNetwork" + + query_params = [ + "networkIds", + "serials", + "contributor", + "subContributor", + "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"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsInsightsByNetwork: 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** @@ -7250,7 +7304,8 @@ def getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork( - 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. + - updateAvailable (boolean): Limit the list of networks by update availability. + - updateStatus (string): Limit the list of networks to those whose latest software update has the specified status. - templateRole (string): Limit the list of networks by config template role: non-template only, templates only, or templates and bound networks. """ @@ -7293,6 +7348,11 @@ def getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork( assert kwargs["firmwareType"] in options, ( f'''"firmwareType" cannot be "{kwargs["firmwareType"]}", & must be set to one of: {options}''' ) + if "updateStatus" in kwargs: + options = ["completed", "completed recently", "in progress", "not yet scheduled", "pending"] + assert kwargs["updateStatus"] in options, ( + f'''"updateStatus" cannot be "{kwargs["updateStatus"]}", & must be set to one of: {options}''' + ) if "templateRole" in kwargs: options = ["bound-templates", "non-template", "templates"] assert kwargs["templateRole"] in options, ( @@ -7321,7 +7381,8 @@ def getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork( "firmwareStatus", "firmwareType", "upgradeDependencyIds", - "upgradeAvailable", + "updateAvailable", + "updateStatus", "templateRole", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} diff --git a/meraki/aio/api/spaces.py b/meraki/aio/api/spaces.py index 5be2df5..8f8e058 100644 --- a/meraki/aio/api/spaces.py +++ b/meraki/aio/api/spaces.py @@ -6,6 +6,93 @@ def __init__(self, session): super().__init__() self._session = session + def createNetworkSpacesSitesBuilding(self, networkId: str, name: str, **kwargs): + """ + **Create a new building** + https://developer.cisco.com/meraki/api-v1/#!create-network-spaces-sites-building + + - networkId (string): Network ID + - name (string): The name of the building + - bounds (object): Geographic bounding box for the building, expressed as north-east and south-west corner coordinates. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["spaces", "configure", "sites", "buildings"], + "operation": "createNetworkSpacesSitesBuilding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/spaces/sites/buildings" + + body_params = [ + "name", + "bounds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkSpacesSitesBuilding: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateNetworkSpacesSitesBuilding(self, networkId: str, buildingId: str, **kwargs): + """ + **Update a building** + https://developer.cisco.com/meraki/api-v1/#!update-network-spaces-sites-building + + - networkId (string): Network ID + - buildingId (string): Building ID + - name (string): The name of the building + - bounds (object): Geographic bounding box for the building, expressed as north-east and south-west corner coordinates. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["spaces", "configure", "sites", "buildings"], + "operation": "updateNetworkSpacesSitesBuilding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + buildingId = urllib.parse.quote(str(buildingId), safe="") + resource = f"/networks/{networkId}/spaces/sites/buildings/{buildingId}" + + body_params = [ + "name", + "bounds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSpacesSitesBuilding: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteNetworkSpacesSitesBuilding(self, networkId: str, buildingId: str): + """ + **Delete a building** + https://developer.cisco.com/meraki/api-v1/#!delete-network-spaces-sites-building + + - networkId (string): Network ID + - buildingId (string): Building ID + """ + + metadata = { + "tags": ["spaces", "configure", "sites", "buildings"], + "operation": "deleteNetworkSpacesSitesBuilding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + buildingId = urllib.parse.quote(str(buildingId), safe="") + resource = f"/networks/{networkId}/spaces/sites/buildings/{buildingId}" + + return self._session.delete(metadata, resource) + def getOrganizationSpacesIntegrateStatus(self, organizationId: str): """ **Get the status of the Spaces integration in Meraki** @@ -39,3 +126,89 @@ def removeOrganizationSpacesIntegration(self, organizationId: str): resource = f"/organizations/{organizationId}/spaces/integration/remove" return self._session.post(metadata, resource) + + def getOrganizationSpacesSitesBuildings(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-spaces-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. This filter uses multiple exact matches. Maximum 100 network IDs. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["spaces", "configure", "sites", "buildings"], + "operation": "getOrganizationSpacesSitesBuildings", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/spaces/sites/buildings" + + 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"getOrganizationSpacesSitesBuildings: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSpacesSitesOverview(self, organizationId: str, **kwargs): + """ + **Get point-in-time overview statistics for buildings, floors, maps, and wireless device placement** + https://developer.cisco.com/meraki/api-v1/#!get-organization-spaces-sites-overview + + - organizationId (string): Organization ID + - networkIds (array): Optional parameter to filter statistics by one or more network IDs. This filter uses multiple exact matches. Maximum 100 network IDs. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["spaces", "monitor", "sites", "overview"], + "operation": "getOrganizationSpacesSitesOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/spaces/sites/overview" + + 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"getOrganizationSpacesSitesOverview: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) diff --git a/meraki/aio/api/switch.py b/meraki/aio/api/switch.py index 01a1fce..af22b57 100644 --- a/meraki/aio/api/switch.py +++ b/meraki/aio/api/switch.py @@ -204,6 +204,8 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): - tags (array): The list of tags of the switch port. - enabled (boolean): The status of the switch port. - poeEnabled (boolean): The PoE status of the switch port. + - perpetualPoe (object): Perpetual PoE settings for the switch port. + - fastPoe (object): Fast PoE settings for the switch port. - type (string): The type of the switch port ('access', 'trunk', 'stack', 'routed', 'svl' or 'dad'). - 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. @@ -265,6 +267,8 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): "tags", "enabled", "poeEnabled", + "perpetualPoe", + "fastPoe", "type", "vlan", "voiceVlan", @@ -1876,6 +1880,70 @@ def deleteNetworkSwitchPortsProfile(self, networkId: str, id: str): return self._session.delete(metadata, resource) + def updateNetworkSwitchPowerFlexible(self, networkId: str, enabled: bool, **kwargs): + """ + **Updates Flexible Power over Ethernet (PoE) config for a switch network.** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-power-flexible + + - networkId (string): Network ID + - enabled (boolean): Whether Flexible Power over Ethernet (PoE) is enabled for the network. + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "power", "flexible"], + "operation": "updateNetworkSwitchPowerFlexible", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/power/flexible" + + 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"updateNetworkSwitchPowerFlexible: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def batchNetworkSwitchPowerFlexibleExceptionsCreateOrDelete(self, networkId: str, items: list, **kwargs): + """ + **Create or delete Flexible Power over Ethernet (PoE) switch or stack exceptions in atomic batch actions.** + https://developer.cisco.com/meraki/api-v1/#!batch-network-switch-power-flexible-exceptions-create-or-delete + + - networkId (string): Network ID + - items (array): Array of switch or stack exception operations + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "power", "flexible", "exceptions"], + "operation": "batchNetworkSwitchPowerFlexibleExceptionsCreateOrDelete", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/power/flexible/exceptions/batchCreateOrDelete" + + 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"batchNetworkSwitchPowerFlexibleExceptionsCreateOrDelete: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + def getNetworkSwitchQosRules(self, networkId: str): """ **List quality of service rules** @@ -5582,6 +5650,157 @@ def getOrganizationSwitchPortsUsageHistoryByDeviceByInterval( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationSwitchPowerFlexibleByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns the Flexible Power over Ethernet (PoE) config for switch networks within an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-power-flexible-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 the returned networks by network IDs + - 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": ["switch", "configure", "power", "flexible", "byNetwork"], + "operation": "getOrganizationSwitchPowerFlexibleByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/power/flexible/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"getOrganizationSwitchPowerFlexibleByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPowerFlexibleExceptionsByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns switches that are excluded from Flexible Power over Ethernet (PoE) inside an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-power-flexible-exceptions-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 the returned switches by network IDs + - 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": ["switch", "configure", "power", "flexible", "exceptions", "byDevice"], + "operation": "getOrganizationSwitchPowerFlexibleExceptionsByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/power/flexible/exceptions/byDevice" + + 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"getOrganizationSwitchPowerFlexibleExceptionsByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPowerFlexibleExceptionsByStack( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns stacks that are excluded from Flexible Power over Ethernet (PoE) inside an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-power-flexible-exceptions-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 + - networkIds (array): Optional parameter to filter the returned stacks by network IDs + - 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": ["switch", "configure", "power", "flexible", "exceptions", "byStack"], + "operation": "getOrganizationSwitchPowerFlexibleExceptionsByStack", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/power/flexible/exceptions/byStack" + + 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"getOrganizationSwitchPowerFlexibleExceptionsByStack: 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** diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index daa9822..55657fa 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -353,12 +353,12 @@ def getDeviceWirelessRadioOverrides(self, serial: str): 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.** + **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. + - rfProfile (object): This device's RF profile. If omitted, the existing RF profile assignment remains unchanged. + - radios (array): Radio overrides. If omitted, existing per-radio override settings remain unchanged. If provided, only the radios included in the array are updated; the array does not replace the device's full existing set of radio overrides. Read-only response fields for each radio, such as 'band', may be included in the request body and are ignored. """ kwargs.update(locals()) @@ -4658,6 +4658,7 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - insights (string): Source used to compute insights. Defaults to dashboard. - 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. @@ -4670,6 +4671,11 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo kwargs.update(locals()) + if "insights" in kwargs: + options = ["dashboard", "rca"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) if "contributor" in kwargs: options = ["Co-channel interference", "High traffic", "Non-wifi interference"] assert kwargs["contributor"] in options, ( @@ -4688,6 +4694,7 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo "serials", "ssidNumbers", "bands", + "insights", "contributor", "subContributor", "t0", @@ -5346,6 +5353,7 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - insights (string): Source used to compute insights. Defaults to dashboard. - 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. @@ -5358,6 +5366,11 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( kwargs.update(locals()) + if "insights" in kwargs: + options = ["dashboard", "rca"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) if "contributor" in kwargs: options = ["Admin power restriction", "Insufficient AP density", "Sticky client", "Weak signal"] assert kwargs["contributor"] in options, ( @@ -5376,6 +5389,7 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( "serials", "ssidNumbers", "bands", + "insights", "contributor", "subContributor", "t0", @@ -6991,6 +7005,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - insights (string): Source used to compute insights. Defaults to dashboard. - 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. - variant (string): Wireless State Machine variant to use. @@ -7004,6 +7019,11 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( kwargs.update(locals()) + if "insights" in kwargs: + options = ["dashboard", "rca"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) if "contributor" in kwargs: options = ["assoc", "auth", "dhcp", "dns"] assert kwargs["contributor"] in options, ( @@ -7027,6 +7047,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( "serials", "ssidNumbers", "bands", + "insights", "contributor", "subContributor", "variant", @@ -10267,6 +10288,76 @@ def getOrganizationWirelessRadioOverridesByDevice(self, organizationId: str, tot return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationWirelessRadioPowerCapabilitiesByModel( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List radio transmit power capabilities by model for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-power-capabilities-by-model + + - organizationId (string): Organization ID + - total_pages (integer or string): use with perPage to get 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): Restrict the model population to models deployed in the specified networks. Maximum 5 elements. Networks that are unreadable by the caller or that do not exist are silently omitted. Because capabilities are model-intrinsic (identical regardless of network), network metadata is not included in the response; this filter only narrows which deployed models are returned. + - radioBands (array): Filter results by radio-frequency band (in GHz). Enum per element: '2.4', '5', '6'. Case-sensitive (band values are numeric strings). Maximum 3 elements. Flex radios that support multiple bands appear if any band matches. Default: all bands returned. + - modelNames (array): Filter results to specific access point models by name. Accepts model names (e.g. MR46, CW9164I). Case-insensitive. Maximum 20 elements. Narrows the population selected by scope. When scope is 'deployed' (the default), returns only the named models that are deployed. When scope is 'known', returns only the named models from the full known set. + - scope (string): Select the model population. Enum: 'deployed' (only models deployed in the organization's networks), 'known' (every known access point model). Case-insensitive. Default: 'deployed'. + - modelEnvironment (string): Filter by access point model deployment environment. Enum: 'indoor', 'outdoor', 'mixed'. Case-insensitive. 'mixed' selects models that can be deployed in either environment. Default: all environments returned. + - 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. + """ + + kwargs.update(locals()) + + if "scope" in kwargs: + options = ["deployed", "known"] + assert kwargs["scope"] in options, f'''"scope" cannot be "{kwargs["scope"]}", & must be set to one of: {options}''' + if "modelEnvironment" in kwargs: + options = ["indoor", "mixed", "outdoor"] + assert kwargs["modelEnvironment"] in options, ( + f'''"modelEnvironment" cannot be "{kwargs["modelEnvironment"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "radio", "power", "capabilities", "byModel"], + "operation": "getOrganizationWirelessRadioPowerCapabilitiesByModel", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/radio/power/capabilities/byModel" + + query_params = [ + "networkIds", + "radioBands", + "modelNames", + "scope", + "modelEnvironment", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "radioBands", + "modelNames", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessRadioPowerCapabilitiesByModel: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def byOrganizationWirelessRadioRfHealthNeighborsRssiDevice(self, organizationId: str, **kwargs): """ **Show the by-device neighbor rssi information for the organization in the given interval** diff --git a/meraki/api/appliance.py b/meraki/api/appliance.py index 6172dc4..ec9de23 100644 --- a/meraki/api/appliance.py +++ b/meraki/api/appliance.py @@ -2053,11 +2053,11 @@ def updateNetworkApplianceSsid(self, networkId: str, number: str, **kwargs): - name (string): The name of the SSID. - enabled (boolean): Whether or not the SSID is enabled. - defaultVlanId (integer): The VLAN ID of the VLAN associated to this SSID. This parameter is only valid if the network is in routed mode. - - authMode (string): The association control method for the SSID ('open', 'psk', '8021x-meraki' or '8021x-radius'). + - authMode (string): The association control method for the SSID ('open', 'psk', '8021x-meraki', '8021x-radius' or '8021x-nac'). - psk (string): The passkey for the SSID. This param is only valid if the authMode is 'psk'. - radiusServers (array): The RADIUS 802.1x servers to be used for authentication. This param is only valid if the authMode is '8021x-radius'. - encryptionMode (string): The psk encryption mode for the SSID ('wep' or 'wpa'). This param is only valid if the authMode is 'psk'. - - wpaEncryptionMode (string): The types of WPA encryption. ('WPA1 and WPA2', 'WPA2 only', 'WPA3 Transition Mode' or 'WPA3 only'). This param is only valid if (1) the authMode is 'psk' & the encryptionMode is 'wpa' OR (2) the authMode is '8021x-meraki' OR (3) the authMode is '8021x-radius' + - wpaEncryptionMode (string): The types of WPA encryption. ('WPA1 and WPA2', 'WPA2 only', 'WPA3 Transition Mode' or 'WPA3 only'). This param is only valid if (1) the authMode is 'psk' & the encryptionMode is 'wpa' OR (2) the authMode is '8021x-meraki' OR (3) the authMode is '8021x-radius' OR (4) the authMode is '8021x-nac' - visible (boolean): Boolean indicating whether the MX should advertise or hide this SSID. - dhcpEnforcedDeauthentication (object): DHCP Enforced Deauthentication enables the disassociation of wireless clients in addition to Mandatory DHCP. This param is only valid on firmware versions >= MX 17.0 where the associated LAN has Mandatory DHCP Enabled - dot11w (object): The current setting for Protected Management Frames (802.11w). @@ -2066,7 +2066,7 @@ def updateNetworkApplianceSsid(self, networkId: str, number: str, **kwargs): kwargs.update(locals()) if "authMode" in kwargs: - options = ["8021x-meraki", "8021x-radius", "open", "psk"] + options = ["8021x-meraki", "8021x-nac", "8021x-radius", "open", "psk"] assert kwargs["authMode"] in options, ( f'''"authMode" cannot be "{kwargs["authMode"]}", & must be set to one of: {options}''' ) diff --git a/meraki/api/batch/appliance.py b/meraki/api/batch/appliance.py index 377645e..8f79e21 100644 --- a/meraki/api/batch/appliance.py +++ b/meraki/api/batch/appliance.py @@ -770,11 +770,11 @@ def updateNetworkApplianceSsid(self, networkId: str, number: str, **kwargs): - name (string): The name of the SSID. - enabled (boolean): Whether or not the SSID is enabled. - defaultVlanId (integer): The VLAN ID of the VLAN associated to this SSID. This parameter is only valid if the network is in routed mode. - - authMode (string): The association control method for the SSID ('open', 'psk', '8021x-meraki' or '8021x-radius'). + - authMode (string): The association control method for the SSID ('open', 'psk', '8021x-meraki', '8021x-radius' or '8021x-nac'). - psk (string): The passkey for the SSID. This param is only valid if the authMode is 'psk'. - radiusServers (array): The RADIUS 802.1x servers to be used for authentication. This param is only valid if the authMode is '8021x-radius'. - encryptionMode (string): The psk encryption mode for the SSID ('wep' or 'wpa'). This param is only valid if the authMode is 'psk'. - - wpaEncryptionMode (string): The types of WPA encryption. ('WPA1 and WPA2', 'WPA2 only', 'WPA3 Transition Mode' or 'WPA3 only'). This param is only valid if (1) the authMode is 'psk' & the encryptionMode is 'wpa' OR (2) the authMode is '8021x-meraki' OR (3) the authMode is '8021x-radius' + - wpaEncryptionMode (string): The types of WPA encryption. ('WPA1 and WPA2', 'WPA2 only', 'WPA3 Transition Mode' or 'WPA3 only'). This param is only valid if (1) the authMode is 'psk' & the encryptionMode is 'wpa' OR (2) the authMode is '8021x-meraki' OR (3) the authMode is '8021x-radius' OR (4) the authMode is '8021x-nac' - visible (boolean): Boolean indicating whether the MX should advertise or hide this SSID. - dhcpEnforcedDeauthentication (object): DHCP Enforced Deauthentication enables the disassociation of wireless clients in addition to Mandatory DHCP. This param is only valid on firmware versions >= MX 17.0 where the associated LAN has Mandatory DHCP Enabled - dot11w (object): The current setting for Protected Management Frames (802.11w). @@ -783,7 +783,7 @@ def updateNetworkApplianceSsid(self, networkId: str, number: str, **kwargs): kwargs.update(locals()) if "authMode" in kwargs: - options = ["8021x-meraki", "8021x-radius", "open", "psk"] + options = ["8021x-meraki", "8021x-nac", "8021x-radius", "open", "psk"] assert kwargs["authMode"] in options, ( f'''"authMode" cannot be "{kwargs["authMode"]}", & must be set to one of: {options}''' ) diff --git a/meraki/api/batch/devices.py b/meraki/api/batch/devices.py index 054a7b4..0911270 100644 --- a/meraki/api/batch/devices.py +++ b/meraki/api/batch/devices.py @@ -263,6 +263,7 @@ def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): - destination (object): The destination IP or subnet to lookup - nextHop (object): The next hop to lookup - vpn (object): VPN related search criteria + - vrf (object): Virtual routing and forwarding (VRF) search criteria - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ @@ -296,6 +297,7 @@ def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): "destination", "nextHop", "vpn", + "vrf", "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/api/batch/nac.py b/meraki/api/batch/nac.py index 7c69cc5..8a9e737 100644 --- a/meraki/api/batch/nac.py +++ b/meraki/api/batch/nac.py @@ -61,7 +61,7 @@ def retrieveOrganizationNacCertificatesAuthoritiesCrls(self, organizationId: str def deleteOrganizationNacCertificatesAuthoritiesCrl(self, organizationId: str, crlId: str): """ - **Deletes a whole CRL, including all its deltas (in case of base CRL removal)** + **Deletes a CRL. Deleting a base CRL also deletes deltas associated with that base CRL.** https://developer.cisco.com/meraki/api-v1/#!delete-organization-nac-certificates-authorities-crl - organizationId (string): Organization ID @@ -162,6 +162,7 @@ def createOrganizationNacClientsBulkEdit(self, organizationId: str, clientIds: l - 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 + - ipsk (string): Per-client Identity Pre-Shared Key (iPSK) passphrase to apply to all selected clients (8-63 printable ASCII characters). Only accepted when the access-manager-ipsk-per-client feature flag is enabled; omit when the flag is disabled. Send an empty string to clear the passphrase. Omit the field to leave existing passphrases unchanged. - groups (object): Client group information to be applied on the list of clients provided """ @@ -173,6 +174,7 @@ def createOrganizationNacClientsBulkEdit(self, organizationId: str, clientIds: l body_params = [ "clientIds", "description", + "ipsk", "groups", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -187,11 +189,11 @@ def createOrganizationNacClientsBulkUpload( self, organizationId: str, contents: str, updateClients: bool, createClientGroups: bool, **kwargs ): """ - **Bulk upload of clients, client groups and their associations for the organization** + **Bulk upload of clients, client groups and their associations for the organization. CSV columns: MAC Address, Endpoint device group, Description, and an optional IPSK column for per-client Identity Pre-Shared Key (iPSK) passphrases. The IPSK column is only accepted when the access-manager-ipsk-per-client feature flag is enabled; omit the column when the flag is disabled. When the IPSK column is present, provide a valid passphrase (8-63 printable ASCII characters) per row to set or update it; leave the cell blank to skip setting a passphrase for that row. The response echoes errored rows in Base64 CSV format for troubleshooting; IPSK column values are never returned in the response.** 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 + - contents (string): CSV file content in Base64 encoded string format. Example CSV includes headers MAC Address, Endpoint device group, Description, IPSK. - 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 """ @@ -307,6 +309,7 @@ def updateOrganizationNacClient(self, organizationId: str, clientId: str, mac: s - 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 + - ipsk (string): Per-client Identity Pre-Shared Key (iPSK) passphrase (8-63 printable ASCII characters). Only accepted when the access-manager-ipsk-per-client feature flag is enabled; omit when the flag is disabled. Send an empty string to clear the passphrase. Omit the field to leave any existing passphrase unchanged. - groups (object): Client group membership changes """ @@ -328,6 +331,7 @@ def updateOrganizationNacClient(self, organizationId: str, clientId: str, mac: s "uuid", "userDetails", "oui", + "ipsk", "groups", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index ef3ce42..141c70e 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -3057,31 +3057,6 @@ def deleteOrganizationSamlIdp(self, organizationId: str, idpId: str): } return action - def batchOrganizationSaseConnectorsDelete(self, organizationId: str, **kwargs): - """ - **Delete SSE Connectors by ID** - https://developer.cisco.com/meraki/api-v1/#!batch-organization-sase-connectors-delete - - - organizationId (string): Organization ID - - items (array): List of connectors to delete (maximum 20 items) - """ - - kwargs.update(locals()) - - organizationId = urllib.parse.quote(organizationId, safe="") - resource = f"/organizations/{organizationId}/sase/connectors/batchDelete" - - body_params = [ - "items", - ] - payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} - action = { - "resource": resource, - "operation": "teardown", - "body": payload, - } - return action - def createOrganizationSaseIntegration(self, organizationId: str, api: dict, **kwargs): """ **Create a new Secure Access integration** @@ -3126,56 +3101,6 @@ def deleteOrganizationSaseIntegration(self, organizationId: str, integrationId: } return action - 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 - - - organizationId (string): Organization ID - - items (array): List of Meraki SD-WAN sites with the associated regions to be attached. - """ - - kwargs = locals() - - organizationId = urllib.parse.quote(organizationId, safe="") - resource = f"/organizations/{organizationId}/sase/sites/attach" - - body_params = [ - "items", - ] - 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 detachOrganizationSaseSites(self, organizationId: str, **kwargs): - """ - **Detach sites in this organization from Secure Access. This will remove the sites from Secure Access.** - https://developer.cisco.com/meraki/api-v1/#!detach-organization-sase-sites - - - organizationId (string): Organization ID - - items (array): List of Secure Access sites to be detached. - """ - - kwargs.update(locals()) - - 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 - 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/spaces.py b/meraki/api/batch/spaces.py index c1e914e..29aec45 100644 --- a/meraki/api/batch/spaces.py +++ b/meraki/api/batch/spaces.py @@ -5,6 +5,81 @@ class ActionBatchSpaces: def __init__(self): super().__init__() + def createNetworkSpacesSitesBuilding(self, networkId: str, name: str, **kwargs): + """ + **Create a new building** + https://developer.cisco.com/meraki/api-v1/#!create-network-spaces-sites-building + + - networkId (string): Network ID + - name (string): The name of the building + - bounds (object): Geographic bounding box for the building, expressed as north-east and south-west corner coordinates. + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/spaces/sites/buildings" + + body_params = [ + "name", + "bounds", + ] + 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 updateNetworkSpacesSitesBuilding(self, networkId: str, buildingId: str, **kwargs): + """ + **Update a building** + https://developer.cisco.com/meraki/api-v1/#!update-network-spaces-sites-building + + - networkId (string): Network ID + - buildingId (string): Building ID + - name (string): The name of the building + - bounds (object): Geographic bounding box for the building, expressed as north-east and south-west corner coordinates. + """ + + kwargs.update(locals()) + + networkId = urllib.parse.quote(networkId, safe="") + buildingId = urllib.parse.quote(buildingId, safe="") + resource = f"/networks/{networkId}/spaces/sites/buildings/{buildingId}" + + body_params = [ + "name", + "bounds", + ] + 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 deleteNetworkSpacesSitesBuilding(self, networkId: str, buildingId: str): + """ + **Delete a building** + https://developer.cisco.com/meraki/api-v1/#!delete-network-spaces-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}/spaces/sites/buildings/{buildingId}" + + action = { + "resource": resource, + "operation": "destroy", + } + return action + def removeOrganizationSpacesIntegration(self, organizationId: str): """ **Remove the Spaces integration from Meraki** diff --git a/meraki/api/batch/switch.py b/meraki/api/batch/switch.py index b965c5c..92d7381 100644 --- a/meraki/api/batch/switch.py +++ b/meraki/api/batch/switch.py @@ -75,6 +75,8 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): - tags (array): The list of tags of the switch port. - enabled (boolean): The status of the switch port. - poeEnabled (boolean): The PoE status of the switch port. + - perpetualPoe (object): Perpetual PoE settings for the switch port. + - fastPoe (object): Fast PoE settings for the switch port. - type (string): The type of the switch port ('access', 'trunk', 'stack', 'routed', 'svl' or 'dad'). - 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. @@ -132,6 +134,8 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): "tags", "enabled", "poeEnabled", + "perpetualPoe", + "fastPoe", "type", "vlan", "voiceVlan", @@ -1081,6 +1085,56 @@ def deleteNetworkSwitchPortsProfile(self, networkId: str, id: str): } return action + def updateNetworkSwitchPowerFlexible(self, networkId: str, enabled: bool, **kwargs): + """ + **Updates Flexible Power over Ethernet (PoE) config for a switch network.** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-power-flexible + + - networkId (string): Network ID + - enabled (boolean): Whether Flexible Power over Ethernet (PoE) is enabled for the network. + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/switch/power/flexible" + + 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 batchNetworkSwitchPowerFlexibleExceptionsCreateOrDelete(self, networkId: str, items: list, **kwargs): + """ + **Create or delete Flexible Power over Ethernet (PoE) switch or stack exceptions in atomic batch actions.** + https://developer.cisco.com/meraki/api-v1/#!batch-network-switch-power-flexible-exceptions-create-or-delete + + - networkId (string): Network ID + - items (array): Array of switch or stack exception operations + """ + + kwargs = locals() + + networkId = urllib.parse.quote(networkId, safe="") + resource = f"/networks/{networkId}/switch/power/flexible/exceptions/batchCreateOrDelete" + + body_params = [ + "items", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "delete", + "body": payload, + } + return action + def createNetworkSwitchQosRule(self, networkId: str, vlan: int, **kwargs): """ **Add a quality of service rule** diff --git a/meraki/api/batch/wireless.py b/meraki/api/batch/wireless.py index f3abc0a..5221a4f 100644 --- a/meraki/api/batch/wireless.py +++ b/meraki/api/batch/wireless.py @@ -120,12 +120,12 @@ def updateDeviceWirelessRadioAfcPosition(self, serial: str, **kwargs): 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.** + **Update 2.4 GHz, 5 GHz, and 6 GHz radio settings (channel, channel width, power, and enable/disable) that override RF profiles. Read-only fields returned by this endpoint, such as 'serial', 'network', and 'radios[].band', may be included when sending a previously returned object back to this PUT endpoint and will be ignored.** 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. + - rfProfile (object): This device's RF profile. If omitted, the existing RF profile assignment remains unchanged. + - radios (array): Radio overrides. If omitted, existing per-radio override settings remain unchanged. If provided, only the radios included in the array are updated; the array does not replace the device's full existing set of radio overrides. Read-only response fields for each radio, such as 'band', may be included in the request body and are ignored. """ kwargs.update(locals()) diff --git a/meraki/api/devices.py b/meraki/api/devices.py index 973fd0e..0214dc4 100644 --- a/meraki/api/devices.py +++ b/meraki/api/devices.py @@ -1093,6 +1093,7 @@ def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): - destination (object): The destination IP or subnet to lookup - nextHop (object): The next hop to lookup - vpn (object): VPN related search criteria + - vrf (object): Virtual routing and forwarding (VRF) search criteria - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret """ @@ -1130,6 +1131,7 @@ def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): "destination", "nextHop", "vpn", + "vrf", "callback", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/api/licensing.py b/meraki/api/licensing.py index 2aed1a3..c1005cf 100644 --- a/meraki/api/licensing.py +++ b/meraki/api/licensing.py @@ -12,10 +12,17 @@ def getAdministeredLicensingSubscriptionEntitlements(self, **kwargs): https://developer.cisco.com/meraki/api-v1/#!get-administered-licensing-subscription-entitlements - skus (array): Filter to entitlements with the specified SKUs + - subscriptionType (string): Filter entitlements by subscription type """ kwargs.update(locals()) + if "subscriptionType" in kwargs: + options = ["termed", "unified"] + assert kwargs["subscriptionType"] in options, ( + f'''"subscriptionType" cannot be "{kwargs["subscriptionType"]}", & must be set to one of: {options}''' + ) + metadata = { "tags": ["licensing", "configure", "subscription", "entitlements"], "operation": "getAdministeredLicensingSubscriptionEntitlements", @@ -24,6 +31,7 @@ def getAdministeredLicensingSubscriptionEntitlements(self, **kwargs): query_params = [ "skus", + "subscriptionType", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} diff --git a/meraki/api/nac.py b/meraki/api/nac.py index 43621f8..bbe220e 100644 --- a/meraki/api/nac.py +++ b/meraki/api/nac.py @@ -411,9 +411,28 @@ def retrieveOrganizationNacCertificatesAuthoritiesCrls(self, organizationId: str return self._session.post(metadata, resource, payload) + def getOrganizationNacCertificatesAuthoritiesCrl(self, organizationId: str, crlId: str): + """ + **Get a CRL, including its revoked serial numbers** + https://developer.cisco.com/meraki/api-v1/#!get-organization-nac-certificates-authorities-crl + + - organizationId (string): Organization ID + - crlId (string): Crl ID + """ + + metadata = { + "tags": ["nac", "configure", "certificates", "authorities", "crls"], + "operation": "getOrganizationNacCertificatesAuthoritiesCrl", + } + 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.get(metadata, resource) + def deleteOrganizationNacCertificatesAuthoritiesCrl(self, organizationId: str, crlId: str): """ - **Deletes a whole CRL, including all its deltas (in case of base CRL removal)** + **Deletes a CRL** https://developer.cisco.com/meraki/api-v1/#!delete-organization-nac-certificates-authorities-crl - organizationId (string): Organization ID @@ -536,6 +555,7 @@ def getOrganizationNacClients(self, organizationId: str, total_pages=1, directio - 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 + - ipskConfigured (boolean): Filter clients by Identity Pre-Shared Key (iPSK) configuration status. true returns only clients with a per-client iPSK passphrase set; false returns only clients without one. Omit to return all clients regardless of iPSK status. When combined with other filters (clientIds, groupIds, search, classification, ssid, lastNetworkName), all conditions are applied together (logical AND). """ kwargs.update(locals()) @@ -570,6 +590,7 @@ def getOrganizationNacClients(self, organizationId: str, total_pages=1, directio "lastNetworkName", "ssid", "classification", + "ipskConfigured", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} @@ -606,6 +627,7 @@ def createOrganizationNacClient(self, organizationId: str, mac: str, **kwargs): - 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 + - ipsk (string): Per-client Identity Pre-Shared Key (iPSK) passphrase (8-63 printable ASCII characters). Only accepted when the access-manager-ipsk-per-client feature flag is enabled; omit when the flag is disabled. Omit to create the client without a passphrase. """ kwargs.update(locals()) @@ -630,6 +652,7 @@ def createOrganizationNacClient(self, organizationId: str, mac: str, **kwargs): "userDetails", "oui", "groups", + "ipsk", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -680,6 +703,7 @@ def createOrganizationNacClientsBulkEdit(self, organizationId: str, clientIds: l - 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 + - ipsk (string): Per-client Identity Pre-Shared Key (iPSK) passphrase to apply to all selected clients (8-63 printable ASCII characters). Only accepted when the access-manager-ipsk-per-client feature flag is enabled; omit when the flag is disabled. Send an empty string to clear the passphrase. Omit the field to leave existing passphrases unchanged. - groups (object): Client group information to be applied on the list of clients provided """ @@ -695,6 +719,7 @@ def createOrganizationNacClientsBulkEdit(self, organizationId: str, clientIds: l body_params = [ "clientIds", "description", + "ipsk", "groups", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -715,7 +740,7 @@ def createOrganizationNacClientsBulkUpload( 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 + - contents (string): CSV file content in Base64 encoded string format. Example CSV includes headers MAC Address, Endpoint device group, Description, IPSK. - 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 """ @@ -932,6 +957,7 @@ def updateOrganizationNacClient(self, organizationId: str, clientId: str, mac: s - 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 + - ipsk (string): Per-client Identity Pre-Shared Key (iPSK) passphrase (8-63 printable ASCII characters). Only accepted when the access-manager-ipsk-per-client feature flag is enabled; omit when the flag is disabled. Send an empty string to clear the passphrase. Omit the field to leave any existing passphrase unchanged. - groups (object): Client group membership changes """ @@ -957,6 +983,7 @@ def updateOrganizationNacClient(self, organizationId: str, clientId: str, mac: s "uuid", "userDetails", "oui", + "ipsk", "groups", ] 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 d2d7cac..30ae7c3 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -3716,6 +3716,60 @@ def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsByNetworkByServe return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWiredExperienceSuccessfulConnectionsInsightsByNetwork(self, organizationId: str, **kwargs): + """ + **Provides insights into wired successful connections experience by network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wired-experience-successful-connections-insights-by-network + + - organizationId (string): Organization ID + - networkIds (array): Filter results by network. + - serials (array): Filter results by device serial. + - 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. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["organizations", "configure", "wired", "experience", "successfulConnections", "insights", "byNetwork"], + "operation": "getOrganizationAssuranceWiredExperienceSuccessfulConnectionsInsightsByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wired/experience/successfulConnections/insights/byNetwork" + + query_params = [ + "networkIds", + "serials", + "contributor", + "subContributor", + "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"getOrganizationAssuranceWiredExperienceSuccessfulConnectionsInsightsByNetwork: 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** @@ -7250,7 +7304,8 @@ def getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork( - 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. + - updateAvailable (boolean): Limit the list of networks by update availability. + - updateStatus (string): Limit the list of networks to those whose latest software update has the specified status. - templateRole (string): Limit the list of networks by config template role: non-template only, templates only, or templates and bound networks. """ @@ -7293,6 +7348,11 @@ def getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork( assert kwargs["firmwareType"] in options, ( f'''"firmwareType" cannot be "{kwargs["firmwareType"]}", & must be set to one of: {options}''' ) + if "updateStatus" in kwargs: + options = ["completed", "completed recently", "in progress", "not yet scheduled", "pending"] + assert kwargs["updateStatus"] in options, ( + f'''"updateStatus" cannot be "{kwargs["updateStatus"]}", & must be set to one of: {options}''' + ) if "templateRole" in kwargs: options = ["bound-templates", "non-template", "templates"] assert kwargs["templateRole"] in options, ( @@ -7321,7 +7381,8 @@ def getOrganizationDevicesSoftwareUpdatesOverviewsByNetwork( "firmwareStatus", "firmwareType", "upgradeDependencyIds", - "upgradeAvailable", + "updateAvailable", + "updateStatus", "templateRole", ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} diff --git a/meraki/api/spaces.py b/meraki/api/spaces.py index 37ee9da..12a5531 100644 --- a/meraki/api/spaces.py +++ b/meraki/api/spaces.py @@ -6,6 +6,93 @@ def __init__(self, session): super().__init__() self._session = session + def createNetworkSpacesSitesBuilding(self, networkId: str, name: str, **kwargs): + """ + **Create a new building** + https://developer.cisco.com/meraki/api-v1/#!create-network-spaces-sites-building + + - networkId (string): Network ID + - name (string): The name of the building + - bounds (object): Geographic bounding box for the building, expressed as north-east and south-west corner coordinates. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["spaces", "configure", "sites", "buildings"], + "operation": "createNetworkSpacesSitesBuilding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/spaces/sites/buildings" + + body_params = [ + "name", + "bounds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createNetworkSpacesSitesBuilding: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def updateNetworkSpacesSitesBuilding(self, networkId: str, buildingId: str, **kwargs): + """ + **Update a building** + https://developer.cisco.com/meraki/api-v1/#!update-network-spaces-sites-building + + - networkId (string): Network ID + - buildingId (string): Building ID + - name (string): The name of the building + - bounds (object): Geographic bounding box for the building, expressed as north-east and south-west corner coordinates. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["spaces", "configure", "sites", "buildings"], + "operation": "updateNetworkSpacesSitesBuilding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + buildingId = urllib.parse.quote(str(buildingId), safe="") + resource = f"/networks/{networkId}/spaces/sites/buildings/{buildingId}" + + body_params = [ + "name", + "bounds", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"updateNetworkSpacesSitesBuilding: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def deleteNetworkSpacesSitesBuilding(self, networkId: str, buildingId: str): + """ + **Delete a building** + https://developer.cisco.com/meraki/api-v1/#!delete-network-spaces-sites-building + + - networkId (string): Network ID + - buildingId (string): Building ID + """ + + metadata = { + "tags": ["spaces", "configure", "sites", "buildings"], + "operation": "deleteNetworkSpacesSitesBuilding", + } + networkId = urllib.parse.quote(str(networkId), safe="") + buildingId = urllib.parse.quote(str(buildingId), safe="") + resource = f"/networks/{networkId}/spaces/sites/buildings/{buildingId}" + + return self._session.delete(metadata, resource) + def getOrganizationSpacesIntegrateStatus(self, organizationId: str): """ **Get the status of the Spaces integration in Meraki** @@ -39,3 +126,89 @@ def removeOrganizationSpacesIntegration(self, organizationId: str): resource = f"/organizations/{organizationId}/spaces/integration/remove" return self._session.post(metadata, resource) + + def getOrganizationSpacesSitesBuildings(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-spaces-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. This filter uses multiple exact matches. Maximum 100 network IDs. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["spaces", "configure", "sites", "buildings"], + "operation": "getOrganizationSpacesSitesBuildings", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/spaces/sites/buildings" + + 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"getOrganizationSpacesSitesBuildings: ignoring unrecognized kwargs: {invalid}") + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSpacesSitesOverview(self, organizationId: str, **kwargs): + """ + **Get point-in-time overview statistics for buildings, floors, maps, and wireless device placement** + https://developer.cisco.com/meraki/api-v1/#!get-organization-spaces-sites-overview + + - organizationId (string): Organization ID + - networkIds (array): Optional parameter to filter statistics by one or more network IDs. This filter uses multiple exact matches. Maximum 100 network IDs. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["spaces", "monitor", "sites", "overview"], + "operation": "getOrganizationSpacesSitesOverview", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/spaces/sites/overview" + + 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"getOrganizationSpacesSitesOverview: ignoring unrecognized kwargs: {invalid}") + + return self._session.get(metadata, resource, params) diff --git a/meraki/api/switch.py b/meraki/api/switch.py index 3240f66..35a0531 100644 --- a/meraki/api/switch.py +++ b/meraki/api/switch.py @@ -204,6 +204,8 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): - tags (array): The list of tags of the switch port. - enabled (boolean): The status of the switch port. - poeEnabled (boolean): The PoE status of the switch port. + - perpetualPoe (object): Perpetual PoE settings for the switch port. + - fastPoe (object): Fast PoE settings for the switch port. - type (string): The type of the switch port ('access', 'trunk', 'stack', 'routed', 'svl' or 'dad'). - 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. @@ -265,6 +267,8 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): "tags", "enabled", "poeEnabled", + "perpetualPoe", + "fastPoe", "type", "vlan", "voiceVlan", @@ -1876,6 +1880,70 @@ def deleteNetworkSwitchPortsProfile(self, networkId: str, id: str): return self._session.delete(metadata, resource) + def updateNetworkSwitchPowerFlexible(self, networkId: str, enabled: bool, **kwargs): + """ + **Updates Flexible Power over Ethernet (PoE) config for a switch network.** + https://developer.cisco.com/meraki/api-v1/#!update-network-switch-power-flexible + + - networkId (string): Network ID + - enabled (boolean): Whether Flexible Power over Ethernet (PoE) is enabled for the network. + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "power", "flexible"], + "operation": "updateNetworkSwitchPowerFlexible", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/power/flexible" + + 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"updateNetworkSwitchPowerFlexible: ignoring unrecognized kwargs: {invalid}") + + return self._session.put(metadata, resource, payload) + + def batchNetworkSwitchPowerFlexibleExceptionsCreateOrDelete(self, networkId: str, items: list, **kwargs): + """ + **Create or delete Flexible Power over Ethernet (PoE) switch or stack exceptions in atomic batch actions.** + https://developer.cisco.com/meraki/api-v1/#!batch-network-switch-power-flexible-exceptions-create-or-delete + + - networkId (string): Network ID + - items (array): Array of switch or stack exception operations + """ + + kwargs = locals() + + metadata = { + "tags": ["switch", "configure", "power", "flexible", "exceptions"], + "operation": "batchNetworkSwitchPowerFlexibleExceptionsCreateOrDelete", + } + networkId = urllib.parse.quote(str(networkId), safe="") + resource = f"/networks/{networkId}/switch/power/flexible/exceptions/batchCreateOrDelete" + + 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"batchNetworkSwitchPowerFlexibleExceptionsCreateOrDelete: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + def getNetworkSwitchQosRules(self, networkId: str): """ **List quality of service rules** @@ -5582,6 +5650,157 @@ def getOrganizationSwitchPortsUsageHistoryByDeviceByInterval( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationSwitchPowerFlexibleByNetwork(self, organizationId: str, total_pages=1, direction="next", **kwargs): + """ + **Returns the Flexible Power over Ethernet (PoE) config for switch networks within an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-power-flexible-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 the returned networks by network IDs + - 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": ["switch", "configure", "power", "flexible", "byNetwork"], + "operation": "getOrganizationSwitchPowerFlexibleByNetwork", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/power/flexible/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"getOrganizationSwitchPowerFlexibleByNetwork: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPowerFlexibleExceptionsByDevice( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns switches that are excluded from Flexible Power over Ethernet (PoE) inside an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-power-flexible-exceptions-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 the returned switches by network IDs + - 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": ["switch", "configure", "power", "flexible", "exceptions", "byDevice"], + "operation": "getOrganizationSwitchPowerFlexibleExceptionsByDevice", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/power/flexible/exceptions/byDevice" + + 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"getOrganizationSwitchPowerFlexibleExceptionsByDevice: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + def getOrganizationSwitchPowerFlexibleExceptionsByStack( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **Returns stacks that are excluded from Flexible Power over Ethernet (PoE) inside an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-power-flexible-exceptions-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 + - networkIds (array): Optional parameter to filter the returned stacks by network IDs + - 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": ["switch", "configure", "power", "flexible", "exceptions", "byStack"], + "operation": "getOrganizationSwitchPowerFlexibleExceptionsByStack", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/switch/power/flexible/exceptions/byStack" + + 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"getOrganizationSwitchPowerFlexibleExceptionsByStack: 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** diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index bfe0e4c..7f1d9b7 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -353,12 +353,12 @@ def getDeviceWirelessRadioOverrides(self, serial: str): 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.** + **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. + - rfProfile (object): This device's RF profile. If omitted, the existing RF profile assignment remains unchanged. + - radios (array): Radio overrides. If omitted, existing per-radio override settings remain unchanged. If provided, only the radios included in the array are updated; the array does not replace the device's full existing set of radio overrides. Read-only response fields for each radio, such as 'band', may be included in the request body and are ignored. """ kwargs.update(locals()) @@ -4658,6 +4658,7 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - insights (string): Source used to compute insights. Defaults to dashboard. - 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. @@ -4670,6 +4671,11 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo kwargs.update(locals()) + if "insights" in kwargs: + options = ["dashboard", "rca"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) if "contributor" in kwargs: options = ["Co-channel interference", "High traffic", "Non-wifi interference"] assert kwargs["contributor"] in options, ( @@ -4688,6 +4694,7 @@ def getOrganizationAssuranceWirelessExperienceChannelAvailabilityInsightsByNetwo "serials", "ssidNumbers", "bands", + "insights", "contributor", "subContributor", "t0", @@ -5346,6 +5353,7 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - insights (string): Source used to compute insights. Defaults to dashboard. - 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. @@ -5358,6 +5366,11 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( kwargs.update(locals()) + if "insights" in kwargs: + options = ["dashboard", "rca"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) if "contributor" in kwargs: options = ["Admin power restriction", "Insufficient AP density", "Sticky client", "Weak signal"] assert kwargs["contributor"] in options, ( @@ -5376,6 +5389,7 @@ def getOrganizationAssuranceWirelessExperienceCoverageInsightsByNetwork( "serials", "ssidNumbers", "bands", + "insights", "contributor", "subContributor", "t0", @@ -6991,6 +7005,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( - serials (array): Filter results by device serial. - ssidNumbers (array): Filter results by SSID number. - bands (array): Filter results by band. + - insights (string): Source used to compute insights. Defaults to dashboard. - 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. - variant (string): Wireless State Machine variant to use. @@ -7004,6 +7019,11 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( kwargs.update(locals()) + if "insights" in kwargs: + options = ["dashboard", "rca"] + assert kwargs["insights"] in options, ( + f'''"insights" cannot be "{kwargs["insights"]}", & must be set to one of: {options}''' + ) if "contributor" in kwargs: options = ["assoc", "auth", "dhcp", "dns"] assert kwargs["contributor"] in options, ( @@ -7027,6 +7047,7 @@ def getOrganizationAssuranceWirelessExperienceTimeToConnectInsightsByNetwork( "serials", "ssidNumbers", "bands", + "insights", "contributor", "subContributor", "variant", @@ -10267,6 +10288,76 @@ def getOrganizationWirelessRadioOverridesByDevice(self, organizationId: str, tot return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationWirelessRadioPowerCapabilitiesByModel( + self, organizationId: str, total_pages=1, direction="next", **kwargs + ): + """ + **List radio transmit power capabilities by model for an organization** + https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-radio-power-capabilities-by-model + + - organizationId (string): Organization ID + - total_pages (integer or string): use with perPage to get 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): Restrict the model population to models deployed in the specified networks. Maximum 5 elements. Networks that are unreadable by the caller or that do not exist are silently omitted. Because capabilities are model-intrinsic (identical regardless of network), network metadata is not included in the response; this filter only narrows which deployed models are returned. + - radioBands (array): Filter results by radio-frequency band (in GHz). Enum per element: '2.4', '5', '6'. Case-sensitive (band values are numeric strings). Maximum 3 elements. Flex radios that support multiple bands appear if any band matches. Default: all bands returned. + - modelNames (array): Filter results to specific access point models by name. Accepts model names (e.g. MR46, CW9164I). Case-insensitive. Maximum 20 elements. Narrows the population selected by scope. When scope is 'deployed' (the default), returns only the named models that are deployed. When scope is 'known', returns only the named models from the full known set. + - scope (string): Select the model population. Enum: 'deployed' (only models deployed in the organization's networks), 'known' (every known access point model). Case-insensitive. Default: 'deployed'. + - modelEnvironment (string): Filter by access point model deployment environment. Enum: 'indoor', 'outdoor', 'mixed'. Case-insensitive. 'mixed' selects models that can be deployed in either environment. Default: all environments returned. + - 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. + """ + + kwargs.update(locals()) + + if "scope" in kwargs: + options = ["deployed", "known"] + assert kwargs["scope"] in options, f'''"scope" cannot be "{kwargs["scope"]}", & must be set to one of: {options}''' + if "modelEnvironment" in kwargs: + options = ["indoor", "mixed", "outdoor"] + assert kwargs["modelEnvironment"] in options, ( + f'''"modelEnvironment" cannot be "{kwargs["modelEnvironment"]}", & must be set to one of: {options}''' + ) + + metadata = { + "tags": ["wireless", "configure", "radio", "power", "capabilities", "byModel"], + "operation": "getOrganizationWirelessRadioPowerCapabilitiesByModel", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/wireless/radio/power/capabilities/byModel" + + query_params = [ + "networkIds", + "radioBands", + "modelNames", + "scope", + "modelEnvironment", + "perPage", + "startingAfter", + "endingBefore", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = [ + "networkIds", + "radioBands", + "modelNames", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + + if self._session._validate_kwargs: + all_params = query_params + array_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationWirelessRadioPowerCapabilitiesByModel: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + def byOrganizationWirelessRadioRfHealthNeighborsRssiDevice(self, organizationId: str, **kwargs): """ **Show the by-device neighbor rssi information for the organization in the given interval** diff --git a/pyproject.toml b/pyproject.toml index 728c871..9fca8fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "4.4.0b0" +version = "4.4.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 6ecb62e..8fd3e2a 100644 --- a/uv.lock +++ b/uv.lock @@ -549,7 +549,7 @@ wheels = [ [[package]] name = "meraki" -version = "4.4.0b0" +version = "4.4.0b1" source = { editable = "." } dependencies = [ { name = "aiohttp" },