Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically regenerated library. #230

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meraki/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
)
from meraki.rest_session import *

__version__ = '1.38.0'
__version__ = '1.39.0'


class DashboardAPI(object):
Expand Down
6 changes: 4 additions & 2 deletions meraki/aio/api/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def createDeviceLiveToolsPing(self, serial: str, target: str, **kwargs):
- serial (string): Serial
- target (string): FQDN, IPv4 or IPv6 address
- count (integer): Count parameter to pass to ping. [1..5], default 5
- callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret
"""

kwargs.update(locals())
Expand All @@ -177,7 +178,7 @@ def createDeviceLiveToolsPing(self, serial: str, target: str, **kwargs):
serial = urllib.parse.quote(str(serial), safe='')
resource = f'/devices/{serial}/liveTools/ping'

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

return self._session.post(metadata, resource, payload)
Expand Down Expand Up @@ -212,6 +213,7 @@ def createDeviceLiveToolsPingDevice(self, serial: str, **kwargs):

- serial (string): Serial
- count (integer): Count parameter to pass to ping. [1..5], default 5
- callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret
"""

kwargs.update(locals())
Expand All @@ -223,7 +225,7 @@ def createDeviceLiveToolsPingDevice(self, serial: str, **kwargs):
serial = urllib.parse.quote(str(serial), safe='')
resource = f'/devices/{serial}/liveTools/pingDevice'

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

return self._session.post(metadata, resource, payload)
Expand Down
27 changes: 25 additions & 2 deletions meraki/aio/api/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def createOrganizationActionBatch(self, organizationId: str, actions: list, **kw
- actions (array): A set of changes to make as part of this action (<a href='https://developer.cisco.com/meraki/api/#/rest/guides/action-batches/'>more details</a>)
- confirmed (boolean): Set to true for immediate execution. Set to false if the action should be previewed before executing. This property cannot be unset once it is true. Defaults to false.
- synchronous (boolean): Set to true to force the batch to run synchronous. There can be at most 20 actions in synchronous batch. Defaults to false.
- callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret
"""

kwargs.update(locals())
Expand All @@ -134,7 +135,7 @@ def createOrganizationActionBatch(self, organizationId: str, actions: list, **kw
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/actionBatches'

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

return self._session.post(metadata, resource, payload)
Expand Down Expand Up @@ -2268,6 +2269,7 @@ def getOrganizationInventoryOnboardingCloudMonitoringNetworks(self, organization
- deviceType (string): Device Type switch or wireless controller
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
- direction (string): direction to paginate, either "next" (default) or "prev" page
- search (string): Optional parameter to search on network name
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100000. Default is 1000.
- startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
Expand All @@ -2286,7 +2288,7 @@ def getOrganizationInventoryOnboardingCloudMonitoringNetworks(self, organization
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/inventory/onboarding/cloudMonitoring/networks'

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

return self._session.get_pages(metadata, resource, params, total_pages, direction)
Expand Down Expand Up @@ -3597,6 +3599,27 @@ def getOrganizationWebhooksAlertTypes(self, organizationId: str, **kwargs):



def getOrganizationWebhooksCallbacksStatus(self, organizationId: str, callbackId: str):
"""
**Return the status of an API callback**
https://developer.cisco.com/meraki/api-v1/#!get-organization-webhooks-callbacks-status

- organizationId (string): Organization ID
- callbackId (string): Callback ID
"""

metadata = {
'tags': ['organizations', 'configure', 'webhooks', 'callbacks', 'statuses'],
'operation': 'getOrganizationWebhooksCallbacksStatus'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
callbackId = urllib.parse.quote(str(callbackId), safe='')
resource = f'/organizations/{organizationId}/webhooks/callbacks/statuses/{callbackId}'

return self._session.get(metadata, resource)



def getOrganizationWebhooksLogs(self, organizationId: str, total_pages=1, direction='next', **kwargs):
"""
**Return the log of webhook POSTs sent**
Expand Down
7 changes: 4 additions & 3 deletions meraki/aio/api/sm.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def getNetworkSmDevices(self, networkId: str, total_pages=1, direction='next', *
- wifiMacs (array): Filter devices by wifi mac(s).
- serials (array): Filter devices by serial(s).
- ids (array): Filter devices by id(s).
- uuids (array): Filter devices by uuid(s).
- scope (array): Specify a scope (one of all, none, withAny, withAll, withoutAny, or withoutAll) and a set of tags.
- 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.
Expand All @@ -87,10 +88,10 @@ def getNetworkSmDevices(self, networkId: str, total_pages=1, direction='next', *
networkId = urllib.parse.quote(str(networkId), safe='')
resource = f'/networks/{networkId}/sm/devices'

query_params = ['fields', 'wifiMacs', 'serials', 'ids', 'scope', 'perPage', 'startingAfter', 'endingBefore', ]
query_params = ['fields', 'wifiMacs', 'serials', 'ids', 'uuids', 'scope', 'perPage', 'startingAfter', 'endingBefore', ]
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}

array_params = ['fields', 'wifiMacs', 'serials', 'ids', 'scope', ]
array_params = ['fields', 'wifiMacs', 'serials', 'ids', 'uuids', 'scope', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
Expand Down Expand Up @@ -663,7 +664,7 @@ def getNetworkSmDeviceWlanLists(self, networkId: str, deviceId: str):

def getNetworkSmProfiles(self, networkId: str):
"""
**List all the profiles in the network**
**List all profiles in a network**
https://developer.cisco.com/meraki/api-v1/#!get-network-sm-profiles

- networkId (string): Network ID
Expand Down
27 changes: 27 additions & 0 deletions meraki/aio/api/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2472,6 +2472,33 @@ def updateOrganizationConfigTemplateSwitchProfilePort(self, organizationId: str,



def getOrganizationSummarySwitchPowerHistory(self, organizationId: str, **kwargs):
"""
**Returns the total PoE power draw for all switch ports in the organization over the requested timespan (by default the last 24 hours)**
https://developer.cisco.com/meraki/api-v1/#!get-organization-summary-switch-power-history

- organizationId (string): Organization ID
- t0 (string): The beginning of the timespan for the data.
- t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
- timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 31 days. The default is 1 day.
"""

kwargs.update(locals())

metadata = {
'tags': ['switch', 'monitor', 'summary', 'power', 'history'],
'operation': 'getOrganizationSummarySwitchPowerHistory'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/summary/switch/power/history'

query_params = ['t0', 't1', 'timespan', ]
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}

return self._session.get(metadata, resource, params)



def cloneOrganizationSwitchDevices(self, organizationId: str, sourceSerial: str, targetSerials: list):
"""
**Clone port-level and some switch-level configuration settings from a source switch to one or more target switches**
Expand Down
126 changes: 126 additions & 0 deletions meraki/aio/api/wireless.py
Original file line number Diff line number Diff line change
Expand Up @@ -2429,3 +2429,129 @@ def getOrganizationWirelessDevicesEthernetStatuses(self, organizationId: str, to

return self._session.get_pages(metadata, resource, params, total_pages, direction)



def getOrganizationWirelessDevicesPacketLossByClient(self, organizationId: str, total_pages=1, direction='next', **kwargs):
"""
**Get average packet loss for the given timespan for all clients in the organization.**
https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-client

- organizationId (string): Organization ID
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
- direction (string): direction to paginate, either "next" (default) or "prev" page
- networkIds (array): Filter results by network.
- ssids (array): Filter results by SSID number.
- bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6.
- macs (array): Filter results by client mac address(es).
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
- startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today.
- t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 days after t0.
- timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days.
"""

kwargs.update(locals())

metadata = {
'tags': ['wireless', 'monitor', 'devices', 'packetLoss', 'byClient'],
'operation': 'getOrganizationWirelessDevicesPacketLossByClient'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/wireless/devices/packetLoss/byClient'

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

array_params = ['networkIds', 'ssids', 'bands', 'macs', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
params.pop(k.strip())

return self._session.get_pages(metadata, resource, params, total_pages, direction)



def getOrganizationWirelessDevicesPacketLossByDevice(self, organizationId: str, total_pages=1, direction='next', **kwargs):
"""
**Get average packet loss for the given timespan for all devices in the organization**
https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-device

- organizationId (string): Organization ID
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
- direction (string): direction to paginate, either "next" (default) or "prev" page
- networkIds (array): Filter results by network.
- serials (array): Filter results by device.
- ssids (array): Filter results by SSID number.
- bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6.
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
- startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today.
- t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 days after t0.
- timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days.
"""

kwargs.update(locals())

metadata = {
'tags': ['wireless', 'monitor', 'devices', 'packetLoss', 'byDevice'],
'operation': 'getOrganizationWirelessDevicesPacketLossByDevice'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/wireless/devices/packetLoss/byDevice'

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

array_params = ['networkIds', 'serials', 'ssids', 'bands', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
params.pop(k.strip())

return self._session.get_pages(metadata, resource, params, total_pages, direction)



def getOrganizationWirelessDevicesPacketLossByNetwork(self, organizationId: str, total_pages=1, direction='next', **kwargs):
"""
**Get average packet loss for the given timespan for all networks in the organization.**
https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-packet-loss-by-network

- organizationId (string): Organization ID
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
- direction (string): direction to paginate, either "next" (default) or "prev" page
- networkIds (array): Filter results by network.
- serials (array): Filter results by device.
- ssids (array): Filter results by SSID number.
- bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6.
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
- startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 90 days from today.
- t1 (string): The end of the timespan for the data. t1 can be a maximum of 90 days after t0.
- timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be greater than or equal to 5 minutes and be less than or equal to 90 days. The default is 7 days.
"""

kwargs.update(locals())

metadata = {
'tags': ['wireless', 'monitor', 'devices', 'packetLoss', 'byNetwork'],
'operation': 'getOrganizationWirelessDevicesPacketLossByNetwork'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/wireless/devices/packetLoss/byNetwork'

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

array_params = ['networkIds', 'serials', 'ssids', 'bands', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
params.pop(k.strip())

return self._session.get_pages(metadata, resource, params, total_pages, direction)

Loading