Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Validate required parameters
self.validate_parameters(network_id=options.get("network_id"))
# Prepare query URL
_url_path = '/networks/{networkId}/pii/piiKeys'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'networkId': options.get('network_id', None)
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_parameters = {
'username': options.get('username', None),
'email': options.get('email', None),
'mac': options.get('mac', None),
'serial': options.get('serial', None),
'imei': options.get('imei', None),
'bluetoothMac': options.get('bluetooth_mac', None)
}
_query_builder = APIHelper.append_url_with_query_parameters(_query_builder,
_query_parameters, Configuration.array_serialization)
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'accept': 'application/json'
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Validate required parameters
self.validate_parameters(network_id=network_id)
# Prepare query URL
_url_path = '/networks/{networkId}/firewalledServices'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'networkId': network_id
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'accept': 'application/json'
}
# Prepare and execute request
_request = self.http_client.get(_query_url, headers=_headers)
CustomHeaderAuth.apply(_request)
_context = self.execute_request(_request)
self.validate_response(_context)
# Return appropriate type
return APIHelper.json_deserialize(_context.response.raw_body)
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Validate required parameters
self.validate_parameters(network_id=options.get("network_id"))
# Prepare query URL
_url_path = '/networks/{networkId}/splashLoginAttempts'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'networkId': options.get('network_id', None)
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_parameters = {
'ssidNumber': options.get('ssid_number', None),
'loginIdentifier': options.get('login_identifier', None),
'timespan': options.get('timespan', None)
}
_query_builder = APIHelper.append_url_with_query_parameters(_query_builder,
_query_parameters, Configuration.array_serialization)
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'accept': 'application/json'
}
# Prepare and execute request
'networkId': options.get('network_id', None),
'clientId': options.get('client_id', None)
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_parameters = {
't0': options.get('t_0', None),
't1': options.get('t_1', None),
'timespan': options.get('timespan', None),
'ssid': options.get('ssid', None),
'vlan': options.get('vlan', None),
'apTag': options.get('ap_tag', None),
'fields': options.get('fields', None)
}
_query_builder = APIHelper.append_url_with_query_parameters(_query_builder,
_query_parameters, Configuration.array_serialization)
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'accept': 'application/json'
}
# Prepare and execute request
_request = self.http_client.get(_query_url, headers=_headers)
CustomHeaderAuth.apply(_request)
_context = self.execute_request(_request)
self.validate_response(_context)
# Return appropriate type
return APIHelper.json_deserialize(_context.response.raw_body)
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Validate required parameters
self.validate_parameters(organization_id=organization_id)
# Prepare query URL
_url_path = '/organizations/{organizationId}/configTemplates'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'organizationId': organization_id
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'accept': 'application/json'
}
# Prepare and execute request
_request = self.http_client.get(_query_url, headers=_headers)
CustomHeaderAuth.apply(_request)
_context = self.execute_request(_request)
self.validate_response(_context)
# Return appropriate type
return APIHelper.json_deserialize(_context.response.raw_body)
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Validate required parameters
self.validate_parameters(network_id=network_id)
# Prepare query URL
_url_path = '/networks/{networkId}/snmpSettings'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'networkId': network_id
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'accept': 'application/json'
}
# Prepare and execute request
_request = self.http_client.get(_query_url, headers=_headers)
CustomHeaderAuth.apply(_request)
_context = self.execute_request(_request)
self.validate_response(_context)
# Return appropriate type
return APIHelper.json_deserialize(_context.response.raw_body)
def __init__(self,
x_cisco_meraki_api_key=None):
if x_cisco_meraki_api_key is not None:
Configuration.x_cisco_meraki_api_key = x_cisco_meraki_api_key
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Validate required parameters
self.validate_parameters(network_id=network_id)
# Prepare query URL
_url_path = '/networks/{networkId}/switchStacks'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'networkId': network_id
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'accept': 'application/json'
}
# Prepare and execute request
_request = self.http_client.get(_query_url, headers=_headers)
CustomHeaderAuth.apply(_request)
_context = self.execute_request(_request)
self.validate_response(_context)
# Return appropriate type
return APIHelper.json_deserialize(_context.response.raw_body)
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Validate required parameters
self.validate_parameters(network_id=options.get("network_id"),
create_network_sm_app_polaris=options.get("create_network_sm_app_polaris"))
# Prepare query URL
_url_path = '/networks/{networkId}/sm/app/polaris'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'networkId': options.get('network_id', None)
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'accept': 'application/json',
'content-type': 'application/json; charset=utf-8'
}
# Prepare and execute request
_request = self.http_client.post(_query_url, headers=_headers, parameters=APIHelper.json_serialize(options.get('create_network_sm_app_polaris')))
CustomHeaderAuth.apply(_request)
_context = self.execute_request(_request)
self.validate_response(_context)
# Return appropriate type
code, an error message, and the HTTP body that was received in
the request.
"""
# Validate required parameters
self.validate_parameters(network_id=options.get("network_id"),
switch_stack_id=options.get("switch_stack_id"))
# Prepare query URL
_url_path = '/networks/{networkId}/switchStacks/{switchStackId}'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'networkId': options.get('network_id', None),
'switchStackId': options.get('switch_stack_id', None)
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_url = APIHelper.clean_url(_query_builder)
# Prepare and execute request
_request = self.http_client.delete(_query_url)
CustomHeaderAuth.apply(_request)
_context = self.execute_request(_request)
self.validate_response(_context)