cloudmersive-security-api-client

CloudmersiveSecurityApiClient - the Ruby gem for the securityapi

The security APIs help you detect and block security threats.

This SDK is automatically generated by the Swagger Codegen project:

  • API version: v1
  • Package version: 2.0.1
  • Build package: io.swagger.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build cloudmersive-security-api-client.gemspec

Then either install the gem locally:

gem install ./cloudmersive-security-api-client-2.0.1.gem

(for development, run gem install --dev ./cloudmersive-security-api-client-2.0.1.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'cloudmersive-security-api-client', '~> 2.0.1'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'cloudmersive-security-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'cloudmersive-security-api-client'

# Setup authorization
CloudmersiveSecurityApiClient.configure do |config|
  # Configure API key authorization: Apikey
  config.api_key['Apikey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Apikey'] = 'Bearer'
end

api_instance = CloudmersiveSecurityApiClient::ContentThreatDetectionApi.new

value = 'value_example' # String | User-facing text input.


begin
  #Automatically detect threats in an input string
  result = api_instance.content_threat_detection_automatic_threat_detection_string(value)
  p result
rescue CloudmersiveSecurityApiClient::ApiError => e
  puts "Exception when calling ContentThreatDetectionApi->content_threat_detection_automatic_threat_detection_string: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.cloudmersive.com

Class Method HTTP request Description
CloudmersiveSecurityApiClient::ContentThreatDetectionApi content_threat_detection_automatic_threat_detection_string POST /security/threat-detection/content/automatic/detect/string Automatically detect threats in an input string
CloudmersiveSecurityApiClient::ContentThreatDetectionApi content_threat_detection_check_sql_injection_string POST /security/threat-detection/content/sql-injection/detect/string Check text input for SQL Injection (SQLI) attacks
CloudmersiveSecurityApiClient::ContentThreatDetectionApi content_threat_detection_check_xxe POST /security/threat-detection/content/xxe/detect/xml/string Protect text input from XML External Entity (XXE) attacks
CloudmersiveSecurityApiClient::ContentThreatDetectionApi content_threat_detection_detect_insecure_deserialization_json_string POST /security/threat-detection/content/insecure-deserialization/json/detect/string Detect Insecure Deserialization JSON (JID) attacks in a string
CloudmersiveSecurityApiClient::ContentThreatDetectionApi content_threat_detection_protect_xss POST /security/threat-detection/content/xss/detect/string Protect text input from Cross-Site-Scripting (XSS) attacks through normalization
CloudmersiveSecurityApiClient::NetworkThreatDetectionApi network_threat_detection_detect_ssrf_url POST /security/threat-detection/network/url/ssrf/detect Check a URL for Server-side Request Forgery (SSRF) threats
CloudmersiveSecurityApiClient::NetworkThreatDetectionApi network_threat_detection_is_bot POST /security/threat-detection/network/ip/is-bot Check if IP address is a Bot client threat
CloudmersiveSecurityApiClient::NetworkThreatDetectionApi network_threat_detection_is_threat POST /security/threat-detection/network/ip/is-threat Check if IP address is a known threat
CloudmersiveSecurityApiClient::NetworkThreatDetectionApi network_threat_detection_is_tor_node POST /security/threat-detection/network/ip/is-tor-node Check if IP address is a Tor node server

Documentation for Models

Documentation for Authorization

Apikey

  • Type: API key
  • API key parameter name: Apikey
  • Location: HTTP header