Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# Validate required parameters
self.validate_parameters(organization_id=options.get("organization_id"))
# Prepare query URL
_url_path = '/organizations/{organizationId}/inventory'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'organizationId': options.get('organization_id', None)
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_parameters = {
'includeLicenseInfo': options.get('include_license_info', 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)
_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'
}
# 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)
self.validate_parameters(network_id=options.get("network_id"),
target_group_id=options.get("target_group_id"))
# Prepare query URL
_url_path = '/networks/{networkId}/sm/targetGroups/{targetGroupId}'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'networkId': options.get('network_id', None),
'targetGroupId': options.get('target_group_id', None)
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_parameters = {
'withDetails': options.get('with_details', 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)
# Prepare query URL
_url_path = '/networks/{network_id}/sm/{id}/deviceCommandLogs'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'network_id': options.get('network_id', None),
'id': options.get('id', None)
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_parameters = {
'perPage': options.get('per_page', None),
'startingAfter': options.get('starting_after', None),
'endingBefore': options.get('ending_before', 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)
_url_path = '/networks/{networkId}/bluetoothClients'
_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 = {
't0': options.get('t_0', None),
'timespan': options.get('timespan', None),
'perPage': options.get('per_page', None),
'startingAfter': options.get('starting_after', None),
'endingBefore': options.get('ending_before', None),
'includeConnectivityHistory': options.get('include_connectivity_history', 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)
bluetooth_client_id=options.get("bluetooth_client_id"))
# Prepare query URL
_url_path = '/networks/{networkId}/bluetoothClients/{bluetoothClientId}'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'networkId': options.get('network_id', None),
'bluetoothClientId': options.get('bluetooth_client_id', None)
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_parameters = {
'includeConnectivityHistory': options.get('include_connectivity_history', None),
'connectivityHistoryTimespan': options.get('connectivity_history_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
_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)
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'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),
'perPage': options.get('per_page', None),
'startingAfter': options.get('starting_after', None),
'endingBefore': options.get('ending_before', 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)
_url_path = '/networks/{networkId}/securityEvents'
_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 = {
't0': options.get('t_0', None),
't1': options.get('t_1', None),
'timespan': options.get('timespan', None),
'perPage': options.get('per_page', None),
'startingAfter': options.get('starting_after', None),
'endingBefore': options.get('ending_before', 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)
# Validate required parameters
self.validate_parameters(network_id=options.get("network_id"))
# Prepare query URL
_url_path = '/networks/{networkId}/sm/targetGroups'
_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 = {
'withDetails': options.get('with_details', 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)
# Prepare query URL
_url_path = '/networks/{networkId}/clients'
_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 = {
't0': options.get('t_0', None),
'timespan': options.get('timespan', None),
'perPage': options.get('per_page', None),
'startingAfter': options.get('starting_after', None),
'endingBefore': options.get('ending_before', 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)