cloudmersive-security-api-client 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +119 -0
  4. data/Rakefile +8 -0
  5. data/cloudmersive-security-api-client.gemspec +45 -0
  6. data/docs/ContentThreatDetectionApi.md +283 -0
  7. data/docs/IPThreatDetectionResponse.md +9 -0
  8. data/docs/NetworkThreatDetectionApi.md +228 -0
  9. data/docs/StringAutomaticThreatDetection.md +18 -0
  10. data/docs/StringInsecureDeserializationJsonDetection.md +10 -0
  11. data/docs/StringSqlInjectionDetectionResult.md +10 -0
  12. data/docs/StringXssProtectionResult.md +11 -0
  13. data/docs/StringXxeDetectionResult.md +9 -0
  14. data/docs/ThreatDetectionBotCheckResponse.md +8 -0
  15. data/docs/ThreatDetectionTorNodeResponse.md +8 -0
  16. data/docs/UrlSsrfThreatDetectionRequestFull.md +9 -0
  17. data/docs/UrlSsrfThreatDetectionResponseFull.md +9 -0
  18. data/git_push.sh +55 -0
  19. data/lib/cloudmersive-security-api-client.rb +51 -0
  20. data/lib/cloudmersive-security-api-client/api/content_threat_detection_api.rb +293 -0
  21. data/lib/cloudmersive-security-api-client/api/network_threat_detection_api.rb +239 -0
  22. data/lib/cloudmersive-security-api-client/api_client.rb +391 -0
  23. data/lib/cloudmersive-security-api-client/api_error.rb +38 -0
  24. data/lib/cloudmersive-security-api-client/configuration.rb +209 -0
  25. data/lib/cloudmersive-security-api-client/models/ip_threat_detection_response.rb +196 -0
  26. data/lib/cloudmersive-security-api-client/models/string_automatic_threat_detection.rb +285 -0
  27. data/lib/cloudmersive-security-api-client/models/string_insecure_deserialization_json_detection.rb +206 -0
  28. data/lib/cloudmersive-security-api-client/models/string_sql_injection_detection_result.rb +206 -0
  29. data/lib/cloudmersive-security-api-client/models/string_xss_protection_result.rb +216 -0
  30. data/lib/cloudmersive-security-api-client/models/string_xxe_detection_result.rb +196 -0
  31. data/lib/cloudmersive-security-api-client/models/threat_detection_bot_check_response.rb +186 -0
  32. data/lib/cloudmersive-security-api-client/models/threat_detection_tor_node_response.rb +186 -0
  33. data/lib/cloudmersive-security-api-client/models/url_ssrf_threat_detection_request_full.rb +198 -0
  34. data/lib/cloudmersive-security-api-client/models/url_ssrf_threat_detection_response_full.rb +196 -0
  35. data/lib/cloudmersive-security-api-client/version.rb +15 -0
  36. data/spec/api/content_threat_detection_api_spec.rb +95 -0
  37. data/spec/api/network_threat_detection_api_spec.rb +83 -0
  38. data/spec/api_client_spec.rb +243 -0
  39. data/spec/configuration_spec.rb +42 -0
  40. data/spec/models/ip_threat_detection_response_spec.rb +47 -0
  41. data/spec/models/string_automatic_threat_detection_spec.rb +101 -0
  42. data/spec/models/string_insecure_deserialization_json_detection_spec.rb +53 -0
  43. data/spec/models/string_sql_injection_detection_result_spec.rb +53 -0
  44. data/spec/models/string_xss_protection_result_spec.rb +59 -0
  45. data/spec/models/string_xxe_detection_result_spec.rb +47 -0
  46. data/spec/models/threat_detection_bot_check_response_spec.rb +41 -0
  47. data/spec/models/threat_detection_tor_node_response_spec.rb +41 -0
  48. data/spec/models/url_ssrf_threat_detection_request_full_spec.rb +47 -0
  49. data/spec/models/url_ssrf_threat_detection_response_full_spec.rb +47 -0
  50. data/spec/spec_helper.rb +111 -0
  51. metadata +273 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e3fa172a6d3ae2f3278713e3cfd5373ecd62c8758107313f67dab2ab9b9378b3
4
+ data.tar.gz: 2a00b907aec1cd26d0a772664b46270a2c8ed57ef1ad19061983b09f745e7c72
5
+ SHA512:
6
+ metadata.gz: 821baf71c818470b2b80f82ff627c413bfce604e5a7dd3687e23c9976e078982f442c1efd9e68ab3ff801f412479d3cf9d454428d901214f182ae0ee5f23c335
7
+ data.tar.gz: fcf89ec8158860bf38a40e4b50ba96aabfa4258ac5b17151cbfead71e306fb823d209998309b6a84420f33608e9478739aafebc4edf9e4e34086178734f3ee55
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.3.3'
7
+ end
data/README.md ADDED
@@ -0,0 +1,119 @@
1
+ # cloudmersive-security-api-client
2
+
3
+ CloudmersiveSecurityApiClient - the Ruby gem for the securityapi
4
+
5
+ The security APIs help you detect and block security threats.
6
+
7
+ This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
+
9
+ - API version: v1
10
+ - Package version: 2.0.1
11
+ - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
+
13
+ ## Installation
14
+
15
+ ### Build a gem
16
+
17
+ To build the Ruby code into a gem:
18
+
19
+ ```shell
20
+ gem build cloudmersive-security-api-client.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./cloudmersive-security-api-client-2.0.1.gem
27
+ ```
28
+ (for development, run `gem install --dev ./cloudmersive-security-api-client-2.0.1.gem` to install the development dependencies)
29
+
30
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
+
32
+ Finally add this to the Gemfile:
33
+
34
+ gem 'cloudmersive-security-api-client', '~> 2.0.1'
35
+
36
+ ### Install from Git
37
+
38
+ 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:
39
+
40
+ gem 'cloudmersive-security-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
41
+
42
+ ### Include the Ruby code directly
43
+
44
+ Include the Ruby code directly using `-I` as follows:
45
+
46
+ ```shell
47
+ ruby -Ilib script.rb
48
+ ```
49
+
50
+ ## Getting Started
51
+
52
+ Please follow the [installation](#installation) procedure and then run the following code:
53
+ ```ruby
54
+ # Load the gem
55
+ require 'cloudmersive-security-api-client'
56
+
57
+ # Setup authorization
58
+ CloudmersiveSecurityApiClient.configure do |config|
59
+ # Configure API key authorization: Apikey
60
+ config.api_key['Apikey'] = 'YOUR API KEY'
61
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
62
+ #config.api_key_prefix['Apikey'] = 'Bearer'
63
+ end
64
+
65
+ api_instance = CloudmersiveSecurityApiClient::ContentThreatDetectionApi.new
66
+
67
+ value = 'value_example' # String | User-facing text input.
68
+
69
+
70
+ begin
71
+ #Automatically detect threats in an input string
72
+ result = api_instance.content_threat_detection_automatic_threat_detection_string(value)
73
+ p result
74
+ rescue CloudmersiveSecurityApiClient::ApiError => e
75
+ puts "Exception when calling ContentThreatDetectionApi->content_threat_detection_automatic_threat_detection_string: #{e}"
76
+ end
77
+
78
+ ```
79
+
80
+ ## Documentation for API Endpoints
81
+
82
+ All URIs are relative to *https://api.cloudmersive.com*
83
+
84
+ Class | Method | HTTP request | Description
85
+ ------------ | ------------- | ------------- | -------------
86
+ *CloudmersiveSecurityApiClient::ContentThreatDetectionApi* | [**content_threat_detection_automatic_threat_detection_string**](docs/ContentThreatDetectionApi.md#content_threat_detection_automatic_threat_detection_string) | **POST** /security/threat-detection/content/automatic/detect/string | Automatically detect threats in an input string
87
+ *CloudmersiveSecurityApiClient::ContentThreatDetectionApi* | [**content_threat_detection_check_sql_injection_string**](docs/ContentThreatDetectionApi.md#content_threat_detection_check_sql_injection_string) | **POST** /security/threat-detection/content/sql-injection/detect/string | Check text input for SQL Injection (SQLI) attacks
88
+ *CloudmersiveSecurityApiClient::ContentThreatDetectionApi* | [**content_threat_detection_check_xxe**](docs/ContentThreatDetectionApi.md#content_threat_detection_check_xxe) | **POST** /security/threat-detection/content/xxe/detect/xml/string | Protect text input from XML External Entity (XXE) attacks
89
+ *CloudmersiveSecurityApiClient::ContentThreatDetectionApi* | [**content_threat_detection_detect_insecure_deserialization_json_string**](docs/ContentThreatDetectionApi.md#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
90
+ *CloudmersiveSecurityApiClient::ContentThreatDetectionApi* | [**content_threat_detection_protect_xss**](docs/ContentThreatDetectionApi.md#content_threat_detection_protect_xss) | **POST** /security/threat-detection/content/xss/detect/string | Protect text input from Cross-Site-Scripting (XSS) attacks through normalization
91
+ *CloudmersiveSecurityApiClient::NetworkThreatDetectionApi* | [**network_threat_detection_detect_ssrf_url**](docs/NetworkThreatDetectionApi.md#network_threat_detection_detect_ssrf_url) | **POST** /security/threat-detection/network/url/ssrf/detect | Check a URL for Server-side Request Forgery (SSRF) threats
92
+ *CloudmersiveSecurityApiClient::NetworkThreatDetectionApi* | [**network_threat_detection_is_bot**](docs/NetworkThreatDetectionApi.md#network_threat_detection_is_bot) | **POST** /security/threat-detection/network/ip/is-bot | Check if IP address is a Bot client threat
93
+ *CloudmersiveSecurityApiClient::NetworkThreatDetectionApi* | [**network_threat_detection_is_threat**](docs/NetworkThreatDetectionApi.md#network_threat_detection_is_threat) | **POST** /security/threat-detection/network/ip/is-threat | Check if IP address is a known threat
94
+ *CloudmersiveSecurityApiClient::NetworkThreatDetectionApi* | [**network_threat_detection_is_tor_node**](docs/NetworkThreatDetectionApi.md#network_threat_detection_is_tor_node) | **POST** /security/threat-detection/network/ip/is-tor-node | Check if IP address is a Tor node server
95
+
96
+
97
+ ## Documentation for Models
98
+
99
+ - [CloudmersiveSecurityApiClient::IPThreatDetectionResponse](docs/IPThreatDetectionResponse.md)
100
+ - [CloudmersiveSecurityApiClient::StringAutomaticThreatDetection](docs/StringAutomaticThreatDetection.md)
101
+ - [CloudmersiveSecurityApiClient::StringInsecureDeserializationJsonDetection](docs/StringInsecureDeserializationJsonDetection.md)
102
+ - [CloudmersiveSecurityApiClient::StringSqlInjectionDetectionResult](docs/StringSqlInjectionDetectionResult.md)
103
+ - [CloudmersiveSecurityApiClient::StringXssProtectionResult](docs/StringXssProtectionResult.md)
104
+ - [CloudmersiveSecurityApiClient::StringXxeDetectionResult](docs/StringXxeDetectionResult.md)
105
+ - [CloudmersiveSecurityApiClient::ThreatDetectionBotCheckResponse](docs/ThreatDetectionBotCheckResponse.md)
106
+ - [CloudmersiveSecurityApiClient::ThreatDetectionTorNodeResponse](docs/ThreatDetectionTorNodeResponse.md)
107
+ - [CloudmersiveSecurityApiClient::UrlSsrfThreatDetectionRequestFull](docs/UrlSsrfThreatDetectionRequestFull.md)
108
+ - [CloudmersiveSecurityApiClient::UrlSsrfThreatDetectionResponseFull](docs/UrlSsrfThreatDetectionResponseFull.md)
109
+
110
+
111
+ ## Documentation for Authorization
112
+
113
+
114
+ ### Apikey
115
+
116
+ - **Type**: API key
117
+ - **API key parameter name**: Apikey
118
+ - **Location**: HTTP header
119
+
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,45 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #securityapi
5
+
6
+ #The security APIs help you detect and block security threats.
7
+
8
+ OpenAPI spec version: v1
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 2.4.14
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "cloudmersive-security-api-client/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "cloudmersive-security-api-client"
20
+ s.version = CloudmersiveSecurityApiClient::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["Cloudmersive"]
23
+ s.email = [""]
24
+ s.homepage = "https://www.cloudmersive.com/security-api"
25
+ s.summary = "Detect and block security threats."
26
+ s.description = "The security APIs help you detect and block security threats. Provides coverage for the most common types of security threats in one powerful API."
27
+ s.license = 'Apache 2.0'
28
+ s.required_ruby_version = ">= 1.9"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
35
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
36
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
37
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
38
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
39
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
40
+
41
+ s.files = Dir['./**/*']
42
+ s.test_files = `find spec/*`.split("\n")
43
+ s.executables = []
44
+ s.require_paths = ["lib"]
45
+ end
@@ -0,0 +1,283 @@
1
+ # CloudmersiveSecurityApiClient::ContentThreatDetectionApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**content_threat_detection_automatic_threat_detection_string**](ContentThreatDetectionApi.md#content_threat_detection_automatic_threat_detection_string) | **POST** /security/threat-detection/content/automatic/detect/string | Automatically detect threats in an input string
8
+ [**content_threat_detection_check_sql_injection_string**](ContentThreatDetectionApi.md#content_threat_detection_check_sql_injection_string) | **POST** /security/threat-detection/content/sql-injection/detect/string | Check text input for SQL Injection (SQLI) attacks
9
+ [**content_threat_detection_check_xxe**](ContentThreatDetectionApi.md#content_threat_detection_check_xxe) | **POST** /security/threat-detection/content/xxe/detect/xml/string | Protect text input from XML External Entity (XXE) attacks
10
+ [**content_threat_detection_detect_insecure_deserialization_json_string**](ContentThreatDetectionApi.md#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
11
+ [**content_threat_detection_protect_xss**](ContentThreatDetectionApi.md#content_threat_detection_protect_xss) | **POST** /security/threat-detection/content/xss/detect/string | Protect text input from Cross-Site-Scripting (XSS) attacks through normalization
12
+
13
+
14
+ # **content_threat_detection_automatic_threat_detection_string**
15
+ > StringAutomaticThreatDetection content_threat_detection_automatic_threat_detection_string(value)
16
+
17
+ Automatically detect threats in an input string
18
+
19
+ Auto-detects a wide range of threat types in input string, including Cross-Site Scripting (XSS), SQL Injection (SQLI), XML External Entitites (XXE), Server-side Request Forgeries (SSRF), and JSON Insecure Deserialization (JID).
20
+
21
+ ### Example
22
+ ```ruby
23
+ # load the gem
24
+ require 'cloudmersive-security-api-client'
25
+ # setup authorization
26
+ CloudmersiveSecurityApiClient.configure do |config|
27
+ # Configure API key authorization: Apikey
28
+ config.api_key['Apikey'] = 'YOUR API KEY'
29
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
+ #config.api_key_prefix['Apikey'] = 'Bearer'
31
+ end
32
+
33
+ api_instance = CloudmersiveSecurityApiClient::ContentThreatDetectionApi.new
34
+
35
+ value = 'value_example' # String | User-facing text input.
36
+
37
+
38
+ begin
39
+ #Automatically detect threats in an input string
40
+ result = api_instance.content_threat_detection_automatic_threat_detection_string(value)
41
+ p result
42
+ rescue CloudmersiveSecurityApiClient::ApiError => e
43
+ puts "Exception when calling ContentThreatDetectionApi->content_threat_detection_automatic_threat_detection_string: #{e}"
44
+ end
45
+ ```
46
+
47
+ ### Parameters
48
+
49
+ Name | Type | Description | Notes
50
+ ------------- | ------------- | ------------- | -------------
51
+ **value** | **String**| User-facing text input. |
52
+
53
+ ### Return type
54
+
55
+ [**StringAutomaticThreatDetection**](StringAutomaticThreatDetection.md)
56
+
57
+ ### Authorization
58
+
59
+ [Apikey](../README.md#Apikey)
60
+
61
+ ### HTTP request headers
62
+
63
+ - **Content-Type**: application/json, text/json
64
+ - **Accept**: application/json, text/json, application/xml, text/xml
65
+
66
+
67
+
68
+ # **content_threat_detection_check_sql_injection_string**
69
+ > StringSqlInjectionDetectionResult content_threat_detection_check_sql_injection_string(value)
70
+
71
+ Check text input for SQL Injection (SQLI) attacks
72
+
73
+ Detects SQL Injection (SQLI) attacks from text input.
74
+
75
+ ### Example
76
+ ```ruby
77
+ # load the gem
78
+ require 'cloudmersive-security-api-client'
79
+ # setup authorization
80
+ CloudmersiveSecurityApiClient.configure do |config|
81
+ # Configure API key authorization: Apikey
82
+ config.api_key['Apikey'] = 'YOUR API KEY'
83
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
84
+ #config.api_key_prefix['Apikey'] = 'Bearer'
85
+ end
86
+
87
+ api_instance = CloudmersiveSecurityApiClient::ContentThreatDetectionApi.new
88
+
89
+ value = 'value_example' # String | User-facing text input.
90
+
91
+
92
+ begin
93
+ #Check text input for SQL Injection (SQLI) attacks
94
+ result = api_instance.content_threat_detection_check_sql_injection_string(value)
95
+ p result
96
+ rescue CloudmersiveSecurityApiClient::ApiError => e
97
+ puts "Exception when calling ContentThreatDetectionApi->content_threat_detection_check_sql_injection_string: #{e}"
98
+ end
99
+ ```
100
+
101
+ ### Parameters
102
+
103
+ Name | Type | Description | Notes
104
+ ------------- | ------------- | ------------- | -------------
105
+ **value** | **String**| User-facing text input. |
106
+
107
+ ### Return type
108
+
109
+ [**StringSqlInjectionDetectionResult**](StringSqlInjectionDetectionResult.md)
110
+
111
+ ### Authorization
112
+
113
+ [Apikey](../README.md#Apikey)
114
+
115
+ ### HTTP request headers
116
+
117
+ - **Content-Type**: application/json, text/json
118
+ - **Accept**: application/json, text/json, application/xml, text/xml
119
+
120
+
121
+
122
+ # **content_threat_detection_check_xxe**
123
+ > StringXxeDetectionResult content_threat_detection_check_xxe(value)
124
+
125
+ Protect text input from XML External Entity (XXE) attacks
126
+
127
+ Detects XXE (XML External Entity) attacks from XML text input.
128
+
129
+ ### Example
130
+ ```ruby
131
+ # load the gem
132
+ require 'cloudmersive-security-api-client'
133
+ # setup authorization
134
+ CloudmersiveSecurityApiClient.configure do |config|
135
+ # Configure API key authorization: Apikey
136
+ config.api_key['Apikey'] = 'YOUR API KEY'
137
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
138
+ #config.api_key_prefix['Apikey'] = 'Bearer'
139
+ end
140
+
141
+ api_instance = CloudmersiveSecurityApiClient::ContentThreatDetectionApi.new
142
+
143
+ value = 'value_example' # String | User-facing text input.
144
+
145
+
146
+ begin
147
+ #Protect text input from XML External Entity (XXE) attacks
148
+ result = api_instance.content_threat_detection_check_xxe(value)
149
+ p result
150
+ rescue CloudmersiveSecurityApiClient::ApiError => e
151
+ puts "Exception when calling ContentThreatDetectionApi->content_threat_detection_check_xxe: #{e}"
152
+ end
153
+ ```
154
+
155
+ ### Parameters
156
+
157
+ Name | Type | Description | Notes
158
+ ------------- | ------------- | ------------- | -------------
159
+ **value** | **String**| User-facing text input. |
160
+
161
+ ### Return type
162
+
163
+ [**StringXxeDetectionResult**](StringXxeDetectionResult.md)
164
+
165
+ ### Authorization
166
+
167
+ [Apikey](../README.md#Apikey)
168
+
169
+ ### HTTP request headers
170
+
171
+ - **Content-Type**: application/json, text/json
172
+ - **Accept**: application/json, text/json, application/xml, text/xml
173
+
174
+
175
+
176
+ # **content_threat_detection_detect_insecure_deserialization_json_string**
177
+ > StringInsecureDeserializationJsonDetection content_threat_detection_detect_insecure_deserialization_json_string(value)
178
+
179
+ Detect Insecure Deserialization JSON (JID) attacks in a string
180
+
181
+ Detects Insecure Deserialization JSON (JID) attacks from text input.
182
+
183
+ ### Example
184
+ ```ruby
185
+ # load the gem
186
+ require 'cloudmersive-security-api-client'
187
+ # setup authorization
188
+ CloudmersiveSecurityApiClient.configure do |config|
189
+ # Configure API key authorization: Apikey
190
+ config.api_key['Apikey'] = 'YOUR API KEY'
191
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
192
+ #config.api_key_prefix['Apikey'] = 'Bearer'
193
+ end
194
+
195
+ api_instance = CloudmersiveSecurityApiClient::ContentThreatDetectionApi.new
196
+
197
+ value = 'value_example' # String | User-facing text input.
198
+
199
+
200
+ begin
201
+ #Detect Insecure Deserialization JSON (JID) attacks in a string
202
+ result = api_instance.content_threat_detection_detect_insecure_deserialization_json_string(value)
203
+ p result
204
+ rescue CloudmersiveSecurityApiClient::ApiError => e
205
+ puts "Exception when calling ContentThreatDetectionApi->content_threat_detection_detect_insecure_deserialization_json_string: #{e}"
206
+ end
207
+ ```
208
+
209
+ ### Parameters
210
+
211
+ Name | Type | Description | Notes
212
+ ------------- | ------------- | ------------- | -------------
213
+ **value** | **String**| User-facing text input. |
214
+
215
+ ### Return type
216
+
217
+ [**StringInsecureDeserializationJsonDetection**](StringInsecureDeserializationJsonDetection.md)
218
+
219
+ ### Authorization
220
+
221
+ [Apikey](../README.md#Apikey)
222
+
223
+ ### HTTP request headers
224
+
225
+ - **Content-Type**: application/json, text/json
226
+ - **Accept**: application/json, text/json, application/xml, text/xml
227
+
228
+
229
+
230
+ # **content_threat_detection_protect_xss**
231
+ > StringXssProtectionResult content_threat_detection_protect_xss(value)
232
+
233
+ Protect text input from Cross-Site-Scripting (XSS) attacks through normalization
234
+
235
+ Detects and removes XSS (Cross-Site-Scripting) attacks from text input through normalization. Returns the normalized result, as well as information on whether the original input contained an XSS risk.
236
+
237
+ ### Example
238
+ ```ruby
239
+ # load the gem
240
+ require 'cloudmersive-security-api-client'
241
+ # setup authorization
242
+ CloudmersiveSecurityApiClient.configure do |config|
243
+ # Configure API key authorization: Apikey
244
+ config.api_key['Apikey'] = 'YOUR API KEY'
245
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
246
+ #config.api_key_prefix['Apikey'] = 'Bearer'
247
+ end
248
+
249
+ api_instance = CloudmersiveSecurityApiClient::ContentThreatDetectionApi.new
250
+
251
+ value = 'value_example' # String | User-facing text input.
252
+
253
+
254
+ begin
255
+ #Protect text input from Cross-Site-Scripting (XSS) attacks through normalization
256
+ result = api_instance.content_threat_detection_protect_xss(value)
257
+ p result
258
+ rescue CloudmersiveSecurityApiClient::ApiError => e
259
+ puts "Exception when calling ContentThreatDetectionApi->content_threat_detection_protect_xss: #{e}"
260
+ end
261
+ ```
262
+
263
+ ### Parameters
264
+
265
+ Name | Type | Description | Notes
266
+ ------------- | ------------- | ------------- | -------------
267
+ **value** | **String**| User-facing text input. |
268
+
269
+ ### Return type
270
+
271
+ [**StringXssProtectionResult**](StringXssProtectionResult.md)
272
+
273
+ ### Authorization
274
+
275
+ [Apikey](../README.md#Apikey)
276
+
277
+ ### HTTP request headers
278
+
279
+ - **Content-Type**: application/json, text/json
280
+ - **Accept**: application/json, text/json, application/xml, text/xml
281
+
282
+
283
+