class CloudmersiveSecurityApiClient::NetworkThreatDetectionApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/cloudmersive-security-api-client/api/network_threat_detection_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

network_threat_detection_detect_ssrf_url(request, opts = {}) click to toggle source

Check a URL for Server-side Request Forgery (SSRF) threats Checks if an input URL is at risk of being an SSRF (Server-side request forgery) threat or attack. @param request Input URL request @param [Hash] opts the optional parameters @return [UrlSsrfThreatDetectionResponseFull]

# File lib/cloudmersive-security-api-client/api/network_threat_detection_api.rb, line 27
def network_threat_detection_detect_ssrf_url(request, opts = {})
  data, _status_code, _headers = network_threat_detection_detect_ssrf_url_with_http_info(request, opts)
  data
end
network_threat_detection_detect_ssrf_url_with_http_info(request, opts = {}) click to toggle source

Check a URL for Server-side Request Forgery (SSRF) threats Checks if an input URL is at risk of being an SSRF (Server-side request forgery) threat or attack. @param request Input URL request @param [Hash] opts the optional parameters @return [Array<(UrlSsrfThreatDetectionResponseFull, Fixnum, Hash)>] UrlSsrfThreatDetectionResponseFull data, response status code and response headers

# File lib/cloudmersive-security-api-client/api/network_threat_detection_api.rb, line 37
def network_threat_detection_detect_ssrf_url_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkThreatDetectionApi.network_threat_detection_detect_ssrf_url ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling NetworkThreatDetectionApi.network_threat_detection_detect_ssrf_url"
  end
  # resource path
  local_var_path = '/security/threat-detection/network/url/ssrf/detect'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UrlSsrfThreatDetectionResponseFull')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NetworkThreatDetectionApi#network_threat_detection_detect_ssrf_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
network_threat_detection_is_bot(value, opts = {}) click to toggle source

Check if IP address is a Bot client threat Check if the input IP address is a Bot, robot, or otherwise a non-user entity. Leverages real-time signals to check against known high-probability bots.. @param value IP address to check, e.g. "55.55.55.55&quot;. The input is a string so be sure to enclose it in double-quotes. @param [Hash] opts the optional parameters @return [ThreatDetectionBotCheckResponse]

# File lib/cloudmersive-security-api-client/api/network_threat_detection_api.rb, line 81
def network_threat_detection_is_bot(value, opts = {})
  data, _status_code, _headers = network_threat_detection_is_bot_with_http_info(value, opts)
  data
end
network_threat_detection_is_bot_with_http_info(value, opts = {}) click to toggle source

Check if IP address is a Bot client threat Check if the input IP address is a Bot, robot, or otherwise a non-user entity. Leverages real-time signals to check against known high-probability bots.. @param value IP address to check, e.g. "55.55.55.55&quot;. The input is a string so be sure to enclose it in double-quotes. @param [Hash] opts the optional parameters @return [Array<(ThreatDetectionBotCheckResponse, Fixnum, Hash)>] ThreatDetectionBotCheckResponse data, response status code and response headers

# File lib/cloudmersive-security-api-client/api/network_threat_detection_api.rb, line 91
def network_threat_detection_is_bot_with_http_info(value, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkThreatDetectionApi.network_threat_detection_is_bot ...'
  end
  # verify the required parameter 'value' is set
  if @api_client.config.client_side_validation && value.nil?
    fail ArgumentError, "Missing the required parameter 'value' when calling NetworkThreatDetectionApi.network_threat_detection_is_bot"
  end
  # resource path
  local_var_path = '/security/threat-detection/network/ip/is-bot'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(value)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ThreatDetectionBotCheckResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NetworkThreatDetectionApi#network_threat_detection_is_bot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
network_threat_detection_is_threat(value, opts = {}) click to toggle source

Check if IP address is a known threat Check if the input IP address is a known threat IP address. Checks against known bad IPs, botnets, compromised servers, and other lists of threats. @param value IP address to check, e.g. "55.55.55.55&quot;. The input is a string so be sure to enclose it in double-quotes. @param [Hash] opts the optional parameters @return [IPThreatDetectionResponse]

# File lib/cloudmersive-security-api-client/api/network_threat_detection_api.rb, line 135
def network_threat_detection_is_threat(value, opts = {})
  data, _status_code, _headers = network_threat_detection_is_threat_with_http_info(value, opts)
  data
end
network_threat_detection_is_threat_with_http_info(value, opts = {}) click to toggle source

Check if IP address is a known threat Check if the input IP address is a known threat IP address. Checks against known bad IPs, botnets, compromised servers, and other lists of threats. @param value IP address to check, e.g. "55.55.55.55&quot;. The input is a string so be sure to enclose it in double-quotes. @param [Hash] opts the optional parameters @return [Array<(IPThreatDetectionResponse, Fixnum, Hash)>] IPThreatDetectionResponse data, response status code and response headers

# File lib/cloudmersive-security-api-client/api/network_threat_detection_api.rb, line 145
def network_threat_detection_is_threat_with_http_info(value, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkThreatDetectionApi.network_threat_detection_is_threat ...'
  end
  # verify the required parameter 'value' is set
  if @api_client.config.client_side_validation && value.nil?
    fail ArgumentError, "Missing the required parameter 'value' when calling NetworkThreatDetectionApi.network_threat_detection_is_threat"
  end
  # resource path
  local_var_path = '/security/threat-detection/network/ip/is-threat'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(value)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'IPThreatDetectionResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NetworkThreatDetectionApi#network_threat_detection_is_threat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
network_threat_detection_is_tor_node(value, opts = {}) click to toggle source

Check if IP address is a Tor node server Check if the input IP address is a Tor exit node server. Tor servers are a type of privacy-preserving technology that can hide the original IP address who makes a request. @param value IP address to check, e.g. "55.55.55.55&quot;. The input is a string so be sure to enclose it in double-quotes. @param [Hash] opts the optional parameters @return [ThreatDetectionTorNodeResponse]

# File lib/cloudmersive-security-api-client/api/network_threat_detection_api.rb, line 189
def network_threat_detection_is_tor_node(value, opts = {})
  data, _status_code, _headers = network_threat_detection_is_tor_node_with_http_info(value, opts)
  data
end
network_threat_detection_is_tor_node_with_http_info(value, opts = {}) click to toggle source

Check if IP address is a Tor node server Check if the input IP address is a Tor exit node server. Tor servers are a type of privacy-preserving technology that can hide the original IP address who makes a request. @param value IP address to check, e.g. "55.55.55.55&quot;. The input is a string so be sure to enclose it in double-quotes. @param [Hash] opts the optional parameters @return [Array<(ThreatDetectionTorNodeResponse, Fixnum, Hash)>] ThreatDetectionTorNodeResponse data, response status code and response headers

# File lib/cloudmersive-security-api-client/api/network_threat_detection_api.rb, line 199
def network_threat_detection_is_tor_node_with_http_info(value, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkThreatDetectionApi.network_threat_detection_is_tor_node ...'
  end
  # verify the required parameter 'value' is set
  if @api_client.config.client_side_validation && value.nil?
    fail ArgumentError, "Missing the required parameter 'value' when calling NetworkThreatDetectionApi.network_threat_detection_is_tor_node"
  end
  # resource path
  local_var_path = '/security/threat-detection/network/ip/is-tor-node'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(value)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ThreatDetectionTorNodeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NetworkThreatDetectionApi#network_threat_detection_is_tor_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end