cloudmersive-validate-api-client 2.1.5 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -4
  3. data/docs/DomainApi.md +330 -0
  4. data/docs/IsAdminPathResponse.md +9 -0
  5. data/docs/PhishingCheckRequest.md +8 -0
  6. data/docs/PhishingCheckResponse.md +9 -0
  7. data/docs/SqlInjectionCheckBatchRequest.md +9 -0
  8. data/docs/SqlInjectionCheckBatchResponse.md +8 -0
  9. data/docs/SqlInjectionCheckRequestItem.md +8 -0
  10. data/docs/SqlInjectionDetectionResult.md +10 -0
  11. data/docs/TextInputApi.md +233 -1
  12. data/docs/UrlSafetyCheckRequestFull.md +8 -0
  13. data/docs/UrlSafetyCheckResponseFull.md +9 -0
  14. data/docs/UrlSsrfRequestBatch.md +8 -0
  15. data/docs/UrlSsrfRequestFull.md +9 -0
  16. data/docs/UrlSsrfResponseBatch.md +8 -0
  17. data/docs/UrlSsrfResponseFull.md +9 -0
  18. data/docs/ValidateUrlResponseSyntaxOnly.md +1 -0
  19. data/docs/XxeDetectionBatchRequest.md +8 -0
  20. data/docs/XxeDetectionBatchResponse.md +8 -0
  21. data/docs/XxeDetectionRequestItem.md +11 -0
  22. data/docs/XxeDetectionResult.md +9 -0
  23. data/lib/cloudmersive-validate-api-client.rb +17 -0
  24. data/lib/cloudmersive-validate-api-client/api/domain_api.rb +324 -0
  25. data/lib/cloudmersive-validate-api-client/api/text_input_api.rb +230 -2
  26. data/lib/cloudmersive-validate-api-client/models/is_admin_path_response.rb +196 -0
  27. data/lib/cloudmersive-validate-api-client/models/phishing_check_request.rb +186 -0
  28. data/lib/cloudmersive-validate-api-client/models/phishing_check_response.rb +196 -0
  29. data/lib/cloudmersive-validate-api-client/models/sql_injection_check_batch_request.rb +198 -0
  30. data/lib/cloudmersive-validate-api-client/models/sql_injection_check_batch_response.rb +188 -0
  31. data/lib/cloudmersive-validate-api-client/models/sql_injection_check_request_item.rb +186 -0
  32. data/lib/cloudmersive-validate-api-client/models/sql_injection_detection_result.rb +206 -0
  33. data/lib/cloudmersive-validate-api-client/models/url_safety_check_request_full.rb +186 -0
  34. data/lib/cloudmersive-validate-api-client/models/url_safety_check_response_full.rb +196 -0
  35. data/lib/cloudmersive-validate-api-client/models/url_ssrf_request_batch.rb +188 -0
  36. data/lib/cloudmersive-validate-api-client/models/url_ssrf_request_full.rb +198 -0
  37. data/lib/cloudmersive-validate-api-client/models/url_ssrf_response_batch.rb +188 -0
  38. data/lib/cloudmersive-validate-api-client/models/url_ssrf_response_full.rb +196 -0
  39. data/lib/cloudmersive-validate-api-client/models/validate_url_response_syntax_only.rb +14 -4
  40. data/lib/cloudmersive-validate-api-client/models/xxe_detection_batch_request.rb +188 -0
  41. data/lib/cloudmersive-validate-api-client/models/xxe_detection_batch_response.rb +188 -0
  42. data/lib/cloudmersive-validate-api-client/models/xxe_detection_request_item.rb +220 -0
  43. data/lib/cloudmersive-validate-api-client/models/xxe_detection_result.rb +196 -0
  44. data/lib/cloudmersive-validate-api-client/version.rb +1 -1
  45. data/spec/api/domain_api_spec.rb +72 -0
  46. data/spec/api/text_input_api_spec.rb +53 -1
  47. data/spec/models/is_admin_path_response_spec.rb +47 -0
  48. data/spec/models/phishing_check_request_spec.rb +41 -0
  49. data/spec/models/phishing_check_response_spec.rb +47 -0
  50. data/spec/models/sql_injection_check_batch_request_spec.rb +47 -0
  51. data/spec/models/sql_injection_check_batch_response_spec.rb +41 -0
  52. data/spec/models/sql_injection_check_request_item_spec.rb +41 -0
  53. data/spec/models/sql_injection_detection_result_spec.rb +53 -0
  54. data/spec/models/url_safety_check_request_full_spec.rb +41 -0
  55. data/spec/models/url_safety_check_response_full_spec.rb +47 -0
  56. data/spec/models/url_ssrf_request_batch_spec.rb +41 -0
  57. data/spec/models/url_ssrf_request_full_spec.rb +47 -0
  58. data/spec/models/url_ssrf_response_batch_spec.rb +41 -0
  59. data/spec/models/url_ssrf_response_full_spec.rb +47 -0
  60. data/spec/models/validate_url_response_syntax_only_spec.rb +6 -0
  61. data/spec/models/xxe_detection_batch_request_spec.rb +41 -0
  62. data/spec/models/xxe_detection_batch_response_spec.rb +41 -0
  63. data/spec/models/xxe_detection_request_item_spec.rb +59 -0
  64. data/spec/models/xxe_detection_result_spec.rb +47 -0
  65. metadata +53 -2
@@ -43,6 +43,7 @@ require 'cloudmersive-validate-api-client/models/get_timezones_response'
43
43
  require 'cloudmersive-validate-api-client/models/ip_intelligence_response'
44
44
  require 'cloudmersive-validate-api-client/models/ip_reverse_dns_lookup_response'
45
45
  require 'cloudmersive-validate-api-client/models/ip_threat_response'
46
+ require 'cloudmersive-validate-api-client/models/is_admin_path_response'
46
47
  require 'cloudmersive-validate-api-client/models/last_name_validation_request'
47
48
  require 'cloudmersive-validate-api-client/models/last_name_validation_response'
48
49
  require 'cloudmersive-validate-api-client/models/lead_enrichment_request'
@@ -50,14 +51,26 @@ require 'cloudmersive-validate-api-client/models/lead_enrichment_response'
50
51
  require 'cloudmersive-validate-api-client/models/normalize_address_response'
51
52
  require 'cloudmersive-validate-api-client/models/parse_address_request'
52
53
  require 'cloudmersive-validate-api-client/models/parse_address_response'
54
+ require 'cloudmersive-validate-api-client/models/phishing_check_request'
55
+ require 'cloudmersive-validate-api-client/models/phishing_check_response'
53
56
  require 'cloudmersive-validate-api-client/models/phone_number_validate_request'
54
57
  require 'cloudmersive-validate-api-client/models/phone_number_validation_response'
55
58
  require 'cloudmersive-validate-api-client/models/public_holiday_occurrence'
56
59
  require 'cloudmersive-validate-api-client/models/public_holidays_response'
57
60
  require 'cloudmersive-validate-api-client/models/reverse_geocode_address_request'
58
61
  require 'cloudmersive-validate-api-client/models/reverse_geocode_address_response'
62
+ require 'cloudmersive-validate-api-client/models/sql_injection_check_batch_request'
63
+ require 'cloudmersive-validate-api-client/models/sql_injection_check_batch_response'
64
+ require 'cloudmersive-validate-api-client/models/sql_injection_check_request_item'
65
+ require 'cloudmersive-validate-api-client/models/sql_injection_detection_result'
59
66
  require 'cloudmersive-validate-api-client/models/timezone'
60
67
  require 'cloudmersive-validate-api-client/models/tor_node_response'
68
+ require 'cloudmersive-validate-api-client/models/url_safety_check_request_full'
69
+ require 'cloudmersive-validate-api-client/models/url_safety_check_response_full'
70
+ require 'cloudmersive-validate-api-client/models/url_ssrf_request_batch'
71
+ require 'cloudmersive-validate-api-client/models/url_ssrf_request_full'
72
+ require 'cloudmersive-validate-api-client/models/url_ssrf_response_batch'
73
+ require 'cloudmersive-validate-api-client/models/url_ssrf_response_full'
61
74
  require 'cloudmersive-validate-api-client/models/user_agent_validate_request'
62
75
  require 'cloudmersive-validate-api-client/models/user_agent_validate_response'
63
76
  require 'cloudmersive-validate-api-client/models/validate_address_request'
@@ -83,6 +96,10 @@ require 'cloudmersive-validate-api-client/models/xss_protection_batch_request'
83
96
  require 'cloudmersive-validate-api-client/models/xss_protection_batch_response'
84
97
  require 'cloudmersive-validate-api-client/models/xss_protection_request_item'
85
98
  require 'cloudmersive-validate-api-client/models/xss_protection_result'
99
+ require 'cloudmersive-validate-api-client/models/xxe_detection_batch_request'
100
+ require 'cloudmersive-validate-api-client/models/xxe_detection_batch_response'
101
+ require 'cloudmersive-validate-api-client/models/xxe_detection_request_item'
102
+ require 'cloudmersive-validate-api-client/models/xxe_detection_result'
86
103
 
87
104
  # APIs
88
105
  require 'cloudmersive-validate-api-client/api/address_api'
@@ -73,6 +73,168 @@ module CloudmersiveValidateApiClient
73
73
  end
74
74
  return data, status_code, headers
75
75
  end
76
+ # Get top-level domain name from URL
77
+ # Gets the top-level domain name from a URL, such as mydomain.com.
78
+ # @param request Input URL information
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [ValidateUrlResponseSyntaxOnly]
81
+ def domain_get_top_level_domain_from_url(request, opts = {})
82
+ data, _status_code, _headers = domain_get_top_level_domain_from_url_with_http_info(request, opts)
83
+ data
84
+ end
85
+
86
+ # Get top-level domain name from URL
87
+ # Gets the top-level domain name from a URL, such as mydomain.com.
88
+ # @param request Input URL information
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [Array<(ValidateUrlResponseSyntaxOnly, Fixnum, Hash)>] ValidateUrlResponseSyntaxOnly data, response status code and response headers
91
+ def domain_get_top_level_domain_from_url_with_http_info(request, opts = {})
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug 'Calling API: DomainApi.domain_get_top_level_domain_from_url ...'
94
+ end
95
+ # verify the required parameter 'request' is set
96
+ if @api_client.config.client_side_validation && request.nil?
97
+ fail ArgumentError, "Missing the required parameter 'request' when calling DomainApi.domain_get_top_level_domain_from_url"
98
+ end
99
+ # resource path
100
+ local_var_path = '/validate/domain/url/get-top-level-domain'
101
+
102
+ # query parameters
103
+ query_params = {}
104
+
105
+ # header parameters
106
+ header_params = {}
107
+ # HTTP header 'Accept' (if needed)
108
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
109
+ # HTTP header 'Content-Type'
110
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
111
+
112
+ # form parameters
113
+ form_params = {}
114
+
115
+ # http body (model)
116
+ post_body = @api_client.object_to_http_body(request)
117
+ auth_names = ['Apikey']
118
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
119
+ :header_params => header_params,
120
+ :query_params => query_params,
121
+ :form_params => form_params,
122
+ :body => post_body,
123
+ :auth_names => auth_names,
124
+ :return_type => 'ValidateUrlResponseSyntaxOnly')
125
+ if @api_client.config.debugging
126
+ @api_client.config.logger.debug "API called: DomainApi#domain_get_top_level_domain_from_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
127
+ end
128
+ return data, status_code, headers
129
+ end
130
+ # Check if path is a high-risk server administration path
131
+ # Check if the input URL or relative path is a server Administration Path, and therefore a risk for remote access.
132
+ # @param value URL or relative path to check, e.g. \&quot;/admin/login\&quot;. The input is a string so be sure to enclose it in double-quotes.
133
+ # @param [Hash] opts the optional parameters
134
+ # @return [IsAdminPathResponse]
135
+ def domain_is_admin_path(value, opts = {})
136
+ data, _status_code, _headers = domain_is_admin_path_with_http_info(value, opts)
137
+ data
138
+ end
139
+
140
+ # Check if path is a high-risk server administration path
141
+ # Check if the input URL or relative path is a server Administration Path, and therefore a risk for remote access.
142
+ # @param value URL or relative path to check, e.g. \&quot;/admin/login\&quot;. The input is a string so be sure to enclose it in double-quotes.
143
+ # @param [Hash] opts the optional parameters
144
+ # @return [Array<(IsAdminPathResponse, Fixnum, Hash)>] IsAdminPathResponse data, response status code and response headers
145
+ def domain_is_admin_path_with_http_info(value, opts = {})
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug 'Calling API: DomainApi.domain_is_admin_path ...'
148
+ end
149
+ # verify the required parameter 'value' is set
150
+ if @api_client.config.client_side_validation && value.nil?
151
+ fail ArgumentError, "Missing the required parameter 'value' when calling DomainApi.domain_is_admin_path"
152
+ end
153
+ # resource path
154
+ local_var_path = '/validate/domain/url/is-admin-path'
155
+
156
+ # query parameters
157
+ query_params = {}
158
+
159
+ # header parameters
160
+ header_params = {}
161
+ # HTTP header 'Accept' (if needed)
162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
163
+ # HTTP header 'Content-Type'
164
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
165
+
166
+ # form parameters
167
+ form_params = {}
168
+
169
+ # http body (model)
170
+ post_body = @api_client.object_to_http_body(value)
171
+ auth_names = ['Apikey']
172
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
173
+ :header_params => header_params,
174
+ :query_params => query_params,
175
+ :form_params => form_params,
176
+ :body => post_body,
177
+ :auth_names => auth_names,
178
+ :return_type => 'IsAdminPathResponse')
179
+ if @api_client.config.debugging
180
+ @api_client.config.logger.debug "API called: DomainApi#domain_is_admin_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
181
+ end
182
+ return data, status_code, headers
183
+ end
184
+ # Check a URL for Phishing threats
185
+ # Checks if an input URL is at risk of being an Phishing (fake login page, or other page designed to collect information via social engineering) threat or attack.
186
+ # @param request Input URL request
187
+ # @param [Hash] opts the optional parameters
188
+ # @return [PhishingCheckResponse]
189
+ def domain_phishing_check(request, opts = {})
190
+ data, _status_code, _headers = domain_phishing_check_with_http_info(request, opts)
191
+ data
192
+ end
193
+
194
+ # Check a URL for Phishing threats
195
+ # Checks if an input URL is at risk of being an Phishing (fake login page, or other page designed to collect information via social engineering) threat or attack.
196
+ # @param request Input URL request
197
+ # @param [Hash] opts the optional parameters
198
+ # @return [Array<(PhishingCheckResponse, Fixnum, Hash)>] PhishingCheckResponse data, response status code and response headers
199
+ def domain_phishing_check_with_http_info(request, opts = {})
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug 'Calling API: DomainApi.domain_phishing_check ...'
202
+ end
203
+ # verify the required parameter 'request' is set
204
+ if @api_client.config.client_side_validation && request.nil?
205
+ fail ArgumentError, "Missing the required parameter 'request' when calling DomainApi.domain_phishing_check"
206
+ end
207
+ # resource path
208
+ local_var_path = '/validate/domain/url/phishing-threat-check'
209
+
210
+ # query parameters
211
+ query_params = {}
212
+
213
+ # header parameters
214
+ header_params = {}
215
+ # HTTP header 'Accept' (if needed)
216
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
217
+ # HTTP header 'Content-Type'
218
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
219
+
220
+ # form parameters
221
+ form_params = {}
222
+
223
+ # http body (model)
224
+ post_body = @api_client.object_to_http_body(request)
225
+ auth_names = ['Apikey']
226
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
227
+ :header_params => header_params,
228
+ :query_params => query_params,
229
+ :form_params => form_params,
230
+ :body => post_body,
231
+ :auth_names => auth_names,
232
+ :return_type => 'PhishingCheckResponse')
233
+ if @api_client.config.debugging
234
+ @api_client.config.logger.debug "API called: DomainApi#domain_phishing_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
235
+ end
236
+ return data, status_code, headers
237
+ end
76
238
  # Get WHOIS information for a domain
77
239
  # Validate whether a domain name exists, and also return the full WHOIS record for that domain name. WHOIS records include all the registration details of the domain name, such as information about the domain's owners.
78
240
  # @param domain Domain name to check, for example \&quot;cloudmersive.com\&quot;. The input is a string so be sure to enclose it in double-quotes.
@@ -181,6 +343,168 @@ module CloudmersiveValidateApiClient
181
343
  end
182
344
  return data, status_code, headers
183
345
  end
346
+ # Check a URL for safety threats
347
+ # Checks if an input URL is at risk of being a safety threat through malware, unwanted software, or social engineering threats.
348
+ # @param request Input URL request
349
+ # @param [Hash] opts the optional parameters
350
+ # @return [UrlSafetyCheckResponseFull]
351
+ def domain_safety_check(request, opts = {})
352
+ data, _status_code, _headers = domain_safety_check_with_http_info(request, opts)
353
+ data
354
+ end
355
+
356
+ # Check a URL for safety threats
357
+ # Checks if an input URL is at risk of being a safety threat through malware, unwanted software, or social engineering threats.
358
+ # @param request Input URL request
359
+ # @param [Hash] opts the optional parameters
360
+ # @return [Array<(UrlSafetyCheckResponseFull, Fixnum, Hash)>] UrlSafetyCheckResponseFull data, response status code and response headers
361
+ def domain_safety_check_with_http_info(request, opts = {})
362
+ if @api_client.config.debugging
363
+ @api_client.config.logger.debug 'Calling API: DomainApi.domain_safety_check ...'
364
+ end
365
+ # verify the required parameter 'request' is set
366
+ if @api_client.config.client_side_validation && request.nil?
367
+ fail ArgumentError, "Missing the required parameter 'request' when calling DomainApi.domain_safety_check"
368
+ end
369
+ # resource path
370
+ local_var_path = '/validate/domain/url/safety-threat-check'
371
+
372
+ # query parameters
373
+ query_params = {}
374
+
375
+ # header parameters
376
+ header_params = {}
377
+ # HTTP header 'Accept' (if needed)
378
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
379
+ # HTTP header 'Content-Type'
380
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
381
+
382
+ # form parameters
383
+ form_params = {}
384
+
385
+ # http body (model)
386
+ post_body = @api_client.object_to_http_body(request)
387
+ auth_names = ['Apikey']
388
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
389
+ :header_params => header_params,
390
+ :query_params => query_params,
391
+ :form_params => form_params,
392
+ :body => post_body,
393
+ :auth_names => auth_names,
394
+ :return_type => 'UrlSafetyCheckResponseFull')
395
+ if @api_client.config.debugging
396
+ @api_client.config.logger.debug "API called: DomainApi#domain_safety_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
397
+ end
398
+ return data, status_code, headers
399
+ end
400
+ # Check a URL for SSRF threats
401
+ # Checks if an input URL is at risk of being an SSRF (Server-side request forgery) threat or attack.
402
+ # @param request Input URL request
403
+ # @param [Hash] opts the optional parameters
404
+ # @return [UrlSsrfResponseFull]
405
+ def domain_ssrf_check(request, opts = {})
406
+ data, _status_code, _headers = domain_ssrf_check_with_http_info(request, opts)
407
+ data
408
+ end
409
+
410
+ # Check a URL for SSRF threats
411
+ # Checks if an input URL is at risk of being an SSRF (Server-side request forgery) threat or attack.
412
+ # @param request Input URL request
413
+ # @param [Hash] opts the optional parameters
414
+ # @return [Array<(UrlSsrfResponseFull, Fixnum, Hash)>] UrlSsrfResponseFull data, response status code and response headers
415
+ def domain_ssrf_check_with_http_info(request, opts = {})
416
+ if @api_client.config.debugging
417
+ @api_client.config.logger.debug 'Calling API: DomainApi.domain_ssrf_check ...'
418
+ end
419
+ # verify the required parameter 'request' is set
420
+ if @api_client.config.client_side_validation && request.nil?
421
+ fail ArgumentError, "Missing the required parameter 'request' when calling DomainApi.domain_ssrf_check"
422
+ end
423
+ # resource path
424
+ local_var_path = '/validate/domain/url/ssrf-threat-check'
425
+
426
+ # query parameters
427
+ query_params = {}
428
+
429
+ # header parameters
430
+ header_params = {}
431
+ # HTTP header 'Accept' (if needed)
432
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
433
+ # HTTP header 'Content-Type'
434
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
435
+
436
+ # form parameters
437
+ form_params = {}
438
+
439
+ # http body (model)
440
+ post_body = @api_client.object_to_http_body(request)
441
+ auth_names = ['Apikey']
442
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
443
+ :header_params => header_params,
444
+ :query_params => query_params,
445
+ :form_params => form_params,
446
+ :body => post_body,
447
+ :auth_names => auth_names,
448
+ :return_type => 'UrlSsrfResponseFull')
449
+ if @api_client.config.debugging
450
+ @api_client.config.logger.debug "API called: DomainApi#domain_ssrf_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
451
+ end
452
+ return data, status_code, headers
453
+ end
454
+ # Check a URL for SSRF threats in batches
455
+ # Batch-checks if input URLs are at risk of being an SSRF (Server-side request forgery) threat or attack.
456
+ # @param request Input URL request as a batch of multiple URLs
457
+ # @param [Hash] opts the optional parameters
458
+ # @return [UrlSsrfResponseBatch]
459
+ def domain_ssrf_check_batch(request, opts = {})
460
+ data, _status_code, _headers = domain_ssrf_check_batch_with_http_info(request, opts)
461
+ data
462
+ end
463
+
464
+ # Check a URL for SSRF threats in batches
465
+ # Batch-checks if input URLs are at risk of being an SSRF (Server-side request forgery) threat or attack.
466
+ # @param request Input URL request as a batch of multiple URLs
467
+ # @param [Hash] opts the optional parameters
468
+ # @return [Array<(UrlSsrfResponseBatch, Fixnum, Hash)>] UrlSsrfResponseBatch data, response status code and response headers
469
+ def domain_ssrf_check_batch_with_http_info(request, opts = {})
470
+ if @api_client.config.debugging
471
+ @api_client.config.logger.debug 'Calling API: DomainApi.domain_ssrf_check_batch ...'
472
+ end
473
+ # verify the required parameter 'request' is set
474
+ if @api_client.config.client_side_validation && request.nil?
475
+ fail ArgumentError, "Missing the required parameter 'request' when calling DomainApi.domain_ssrf_check_batch"
476
+ end
477
+ # resource path
478
+ local_var_path = '/validate/domain/url/ssrf-threat-check/batch'
479
+
480
+ # query parameters
481
+ query_params = {}
482
+
483
+ # header parameters
484
+ header_params = {}
485
+ # HTTP header 'Accept' (if needed)
486
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
487
+ # HTTP header 'Content-Type'
488
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
489
+
490
+ # form parameters
491
+ form_params = {}
492
+
493
+ # http body (model)
494
+ post_body = @api_client.object_to_http_body(request)
495
+ auth_names = ['Apikey']
496
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
497
+ :header_params => header_params,
498
+ :query_params => query_params,
499
+ :form_params => form_params,
500
+ :body => post_body,
501
+ :auth_names => auth_names,
502
+ :return_type => 'UrlSsrfResponseBatch')
503
+ if @api_client.config.debugging
504
+ @api_client.config.logger.debug "API called: DomainApi#domain_ssrf_check_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
505
+ end
506
+ return data, status_code, headers
507
+ end
184
508
  # Validate a URL fully
185
509
  # Validate whether a URL is syntactically valid (does not check endpoint for validity), whether it exists, and whether the endpoint is up and passes virus scan checks. Accepts various types of input and produces a well-formed URL as output.
186
510
  # @param request Input URL request
@@ -19,6 +19,117 @@ module CloudmersiveValidateApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Check text input for SQL Injection (SQLI) attacks
23
+ # Detects SQL Injection (SQLI) attacks from text input.
24
+ # @param value User-facing text input.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :detection_level Set to Normal to target a high-security SQL Injection detection level with a very low false positive rate; select High to target a very-high security SQL Injection detection level with higher false positives. Default is Normal (recommended).
27
+ # @return [SqlInjectionDetectionResult]
28
+ def text_input_check_sql_injection(value, opts = {})
29
+ data, _status_code, _headers = text_input_check_sql_injection_with_http_info(value, opts)
30
+ data
31
+ end
32
+
33
+ # Check text input for SQL Injection (SQLI) attacks
34
+ # Detects SQL Injection (SQLI) attacks from text input.
35
+ # @param value User-facing text input.
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :detection_level Set to Normal to target a high-security SQL Injection detection level with a very low false positive rate; select High to target a very-high security SQL Injection detection level with higher false positives. Default is Normal (recommended).
38
+ # @return [Array<(SqlInjectionDetectionResult, Fixnum, Hash)>] SqlInjectionDetectionResult data, response status code and response headers
39
+ def text_input_check_sql_injection_with_http_info(value, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_sql_injection ...'
42
+ end
43
+ # verify the required parameter 'value' is set
44
+ if @api_client.config.client_side_validation && value.nil?
45
+ fail ArgumentError, "Missing the required parameter 'value' when calling TextInputApi.text_input_check_sql_injection"
46
+ end
47
+ # resource path
48
+ local_var_path = '/validate/text-input/check/sql-injection'
49
+
50
+ # query parameters
51
+ query_params = {}
52
+
53
+ # header parameters
54
+ header_params = {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
57
+ # HTTP header 'Content-Type'
58
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
59
+ header_params[:'detectionLevel'] = opts[:'detection_level'] if !opts[:'detection_level'].nil?
60
+
61
+ # form parameters
62
+ form_params = {}
63
+
64
+ # http body (model)
65
+ post_body = @api_client.object_to_http_body(value)
66
+ auth_names = ['Apikey']
67
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => 'SqlInjectionDetectionResult')
74
+ if @api_client.config.debugging
75
+ @api_client.config.logger.debug "API called: TextInputApi#text_input_check_sql_injection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
76
+ end
77
+ return data, status_code, headers
78
+ end
79
+ # Check and protect multiple text inputs for SQL Injection (SQLI) attacks in batch
80
+ # Detects SQL Injection (SQLI) attacks from multiple text inputs. Output preverses order of input items.
81
+ # @param value User-facing text input.
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [SqlInjectionCheckBatchResponse]
84
+ def text_input_check_sql_injection_batch(value, opts = {})
85
+ data, _status_code, _headers = text_input_check_sql_injection_batch_with_http_info(value, opts)
86
+ data
87
+ end
88
+
89
+ # Check and protect multiple text inputs for SQL Injection (SQLI) attacks in batch
90
+ # Detects SQL Injection (SQLI) attacks from multiple text inputs. Output preverses order of input items.
91
+ # @param value User-facing text input.
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [Array<(SqlInjectionCheckBatchResponse, Fixnum, Hash)>] SqlInjectionCheckBatchResponse data, response status code and response headers
94
+ def text_input_check_sql_injection_batch_with_http_info(value, opts = {})
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_sql_injection_batch ...'
97
+ end
98
+ # verify the required parameter 'value' is set
99
+ if @api_client.config.client_side_validation && value.nil?
100
+ fail ArgumentError, "Missing the required parameter 'value' when calling TextInputApi.text_input_check_sql_injection_batch"
101
+ end
102
+ # resource path
103
+ local_var_path = '/validate/text-input/check/sql-injection/batch'
104
+
105
+ # query parameters
106
+ query_params = {}
107
+
108
+ # header parameters
109
+ header_params = {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
112
+ # HTTP header 'Content-Type'
113
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
114
+
115
+ # form parameters
116
+ form_params = {}
117
+
118
+ # http body (model)
119
+ post_body = @api_client.object_to_http_body(value)
120
+ auth_names = ['Apikey']
121
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
122
+ :header_params => header_params,
123
+ :query_params => query_params,
124
+ :form_params => form_params,
125
+ :body => post_body,
126
+ :auth_names => auth_names,
127
+ :return_type => 'SqlInjectionCheckBatchResponse')
128
+ if @api_client.config.debugging
129
+ @api_client.config.logger.debug "API called: TextInputApi#text_input_check_sql_injection_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
130
+ end
131
+ return data, status_code, headers
132
+ end
22
133
  # Check text input for Cross-Site-Scripting (XSS) attacks
23
134
  # Detects XSS (Cross-Site-Scripting) attacks from text input.
24
135
  # @param value User-facing text input.
@@ -74,7 +185,7 @@ module CloudmersiveValidateApiClient
74
185
  return data, status_code, headers
75
186
  end
76
187
  # Check and protect multiple text inputs for Cross-Site-Scripting (XSS) attacks in batch
77
- # Detects XSS (Cross-Site-Scripting) attacks from multiple text input. Output preverses order of input items.
188
+ # Detects XSS (Cross-Site-Scripting) attacks from multiple text inputs. Output preverses order of input items.
78
189
  # @param value User-facing text input.
79
190
  # @param [Hash] opts the optional parameters
80
191
  # @return [XssProtectionBatchResponse]
@@ -84,7 +195,7 @@ module CloudmersiveValidateApiClient
84
195
  end
85
196
 
86
197
  # Check and protect multiple text inputs for Cross-Site-Scripting (XSS) attacks in batch
87
- # Detects XSS (Cross-Site-Scripting) attacks from multiple text input. Output preverses order of input items.
198
+ # Detects XSS (Cross-Site-Scripting) attacks from multiple text inputs. Output preverses order of input items.
88
199
  # @param value User-facing text input.
89
200
  # @param [Hash] opts the optional parameters
90
201
  # @return [Array<(XssProtectionBatchResponse, Fixnum, Hash)>] XssProtectionBatchResponse data, response status code and response headers
@@ -127,6 +238,123 @@ module CloudmersiveValidateApiClient
127
238
  end
128
239
  return data, status_code, headers
129
240
  end
241
+ # Protect text input from XML External Entity (XXE) attacks
242
+ # Detects XXE (XML External Entity) attacks from text input.
243
+ # @param value User-facing text input.
244
+ # @param [Hash] opts the optional parameters
245
+ # @option opts [BOOLEAN] :allow_internet_urls Optional: Set to true to allow Internet-based dependency URLs for DTDs and other XML External Entitites, set to false to block. Default is false.
246
+ # @option opts [String] :known_safe_urls Optional: Comma separated list of fully-qualified URLs that will automatically be considered safe.
247
+ # @option opts [String] :known_unsafe_urls Optional: Comma separated list of fully-qualified URLs that will automatically be considered unsafe.
248
+ # @return [XxeDetectionResult]
249
+ def text_input_check_xxe(value, opts = {})
250
+ data, _status_code, _headers = text_input_check_xxe_with_http_info(value, opts)
251
+ data
252
+ end
253
+
254
+ # Protect text input from XML External Entity (XXE) attacks
255
+ # Detects XXE (XML External Entity) attacks from text input.
256
+ # @param value User-facing text input.
257
+ # @param [Hash] opts the optional parameters
258
+ # @option opts [BOOLEAN] :allow_internet_urls Optional: Set to true to allow Internet-based dependency URLs for DTDs and other XML External Entitites, set to false to block. Default is false.
259
+ # @option opts [String] :known_safe_urls Optional: Comma separated list of fully-qualified URLs that will automatically be considered safe.
260
+ # @option opts [String] :known_unsafe_urls Optional: Comma separated list of fully-qualified URLs that will automatically be considered unsafe.
261
+ # @return [Array<(XxeDetectionResult, Fixnum, Hash)>] XxeDetectionResult data, response status code and response headers
262
+ def text_input_check_xxe_with_http_info(value, opts = {})
263
+ if @api_client.config.debugging
264
+ @api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_xxe ...'
265
+ end
266
+ # verify the required parameter 'value' is set
267
+ if @api_client.config.client_side_validation && value.nil?
268
+ fail ArgumentError, "Missing the required parameter 'value' when calling TextInputApi.text_input_check_xxe"
269
+ end
270
+ # resource path
271
+ local_var_path = '/validate/text-input/check/xxe'
272
+
273
+ # query parameters
274
+ query_params = {}
275
+
276
+ # header parameters
277
+ header_params = {}
278
+ # HTTP header 'Accept' (if needed)
279
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
280
+ # HTTP header 'Content-Type'
281
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
282
+ header_params[:'allowInternetUrls'] = opts[:'allow_internet_urls'] if !opts[:'allow_internet_urls'].nil?
283
+ header_params[:'knownSafeUrls'] = opts[:'known_safe_urls'] if !opts[:'known_safe_urls'].nil?
284
+ header_params[:'knownUnsafeUrls'] = opts[:'known_unsafe_urls'] if !opts[:'known_unsafe_urls'].nil?
285
+
286
+ # form parameters
287
+ form_params = {}
288
+
289
+ # http body (model)
290
+ post_body = @api_client.object_to_http_body(value)
291
+ auth_names = ['Apikey']
292
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
293
+ :header_params => header_params,
294
+ :query_params => query_params,
295
+ :form_params => form_params,
296
+ :body => post_body,
297
+ :auth_names => auth_names,
298
+ :return_type => 'XxeDetectionResult')
299
+ if @api_client.config.debugging
300
+ @api_client.config.logger.debug "API called: TextInputApi#text_input_check_xxe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
301
+ end
302
+ return data, status_code, headers
303
+ end
304
+ # Protect text input from XML External Entity (XXE) attacks
305
+ # Detects XXE (XML External Entity) attacks from text input.
306
+ # @param request
307
+ # @param [Hash] opts the optional parameters
308
+ # @return [XxeDetectionBatchResponse]
309
+ def text_input_check_xxe_batch(request, opts = {})
310
+ data, _status_code, _headers = text_input_check_xxe_batch_with_http_info(request, opts)
311
+ data
312
+ end
313
+
314
+ # Protect text input from XML External Entity (XXE) attacks
315
+ # Detects XXE (XML External Entity) attacks from text input.
316
+ # @param request
317
+ # @param [Hash] opts the optional parameters
318
+ # @return [Array<(XxeDetectionBatchResponse, Fixnum, Hash)>] XxeDetectionBatchResponse data, response status code and response headers
319
+ def text_input_check_xxe_batch_with_http_info(request, opts = {})
320
+ if @api_client.config.debugging
321
+ @api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_xxe_batch ...'
322
+ end
323
+ # verify the required parameter 'request' is set
324
+ if @api_client.config.client_side_validation && request.nil?
325
+ fail ArgumentError, "Missing the required parameter 'request' when calling TextInputApi.text_input_check_xxe_batch"
326
+ end
327
+ # resource path
328
+ local_var_path = '/validate/text-input/check/xxe/batch'
329
+
330
+ # query parameters
331
+ query_params = {}
332
+
333
+ # header parameters
334
+ header_params = {}
335
+ # HTTP header 'Accept' (if needed)
336
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
337
+ # HTTP header 'Content-Type'
338
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
339
+
340
+ # form parameters
341
+ form_params = {}
342
+
343
+ # http body (model)
344
+ post_body = @api_client.object_to_http_body(request)
345
+ auth_names = ['Apikey']
346
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
347
+ :header_params => header_params,
348
+ :query_params => query_params,
349
+ :form_params => form_params,
350
+ :body => post_body,
351
+ :auth_names => auth_names,
352
+ :return_type => 'XxeDetectionBatchResponse')
353
+ if @api_client.config.debugging
354
+ @api_client.config.logger.debug "API called: TextInputApi#text_input_check_xxe_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
355
+ end
356
+ return data, status_code, headers
357
+ end
130
358
  # Protect text input from Cross-Site-Scripting (XSS) attacks through normalization
131
359
  # 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.
132
360
  # @param value User-facing text input.