Class: SwaggerClient::VulnerabilityResultApi

Inherits:
Object
  • Object
show all
Defined in:
lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ VulnerabilityResultApi

Returns a new instance of VulnerabilityResultApi.



16
17
18
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 16

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



14
15
16
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#create_vulnerability_validation(id, vulnerability_id, opts = {}) ⇒ CreatedReferenceVulnerabilityValidationIDLink

Asset Vulnerability Validations Creates a vulnerability validation for a vulnerability on an asset. The validation signifies that the vulnerability has been confirmed exploitable by an external tool, such as <a target="_blank" rel="noopener noreferrer" href="www.metasploit.com">Metasploit</a>.

Parameters:

  • id

    The identifier of the asset.

  • vulnerability_id

    The identifier of the vulnerability.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



26
27
28
29
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 26

def create_vulnerability_validation(id, vulnerability_id, opts = {})
  data, _status_code, _headers = create_vulnerability_validation_with_http_info(site_idte_id, vulnerability_id, opts)
  data
end

#create_vulnerability_validation_with_http_info(id, vulnerability_id, opts = {}) ⇒ Array<(CreatedReferenceVulnerabilityValidationIDLink, Integer, Hash)>

Asset Vulnerability Validations Creates a vulnerability validation for a vulnerability on an asset. The validation signifies that the vulnerability has been confirmed exploitable by an external tool, such as &lt;a target&#x3D;&quot;_blank&quot; rel&#x3D;&quot;noopener noreferrer&quot; href&#x3D;&quot;www.metasploit.com&quot;&gt;Metasploit&lt;/a&gt;.

Parameters:

  • id

    The identifier of the asset.

  • vulnerability_id

    The identifier of the vulnerability.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 38

def create_vulnerability_validation_with_http_info(id, vulnerability_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VulnerabilityResultApi.create_vulnerability_validation ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && site_idte_id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling VulnerabilityResultApi.create_vulnerability_validation"
  end
  # verify the required parameter 'vulnerability_id' is set
  if @api_client.config.client_side_validation && vulnerability_id.nil?
    fail ArgumentError, "Missing the required parameter 'vulnerability_id' when calling VulnerabilityResultApi.create_vulnerability_validation"
  end
  # resource path
  local_var_path = '/api/3/assets/{id}/vulnerabilities/{vulnerabilityId}/validations'.sub('{' + 'id' + '}', site_idte_id.to_s).sub('{' + 'vulnerabilityId' + '}', vulnerability_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=UTF-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) 

  return_type = opts[:return_type] || 'CreatedReferenceVulnerabilityValidationIDLink' 

  auth_names = opts[:auth_names] || []
  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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VulnerabilityResultApi#create_vulnerability_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_vulnerability_validation(id, vulnerability_id, validation_id, opts = {}) ⇒ Links

Asset Vulnerability Validation Removes a vulnerability validation for a vulnerability from an asset.

Parameters:

  • id

    The identifier of the asset.

  • vulnerability_id

    The identifier of the vulnerability.

  • validation_id

    The identifier of the vulnerability validation.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



92
93
94
95
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 92

def delete_vulnerability_validation(id, vulnerability_id, validation_id, opts = {})
  data, _status_code, _headers = delete_vulnerability_validation_with_http_info(site_idte_id, vulnerability_id, validation_id, opts)
  data
end

#delete_vulnerability_validation_with_http_info(id, vulnerability_id, validation_id, opts = {}) ⇒ Array<(Links, Integer, Hash)>

Asset Vulnerability Validation Removes a vulnerability validation for a vulnerability from an asset.

Parameters:

  • id

    The identifier of the asset.

  • vulnerability_id

    The identifier of the vulnerability.

  • validation_id

    The identifier of the vulnerability validation.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Links, Integer, Hash)>)

    Links data, response status code and response headers



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 104

def delete_vulnerability_validation_with_http_info(id, vulnerability_id, validation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VulnerabilityResultApi.delete_vulnerability_validation ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && site_idte_id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling VulnerabilityResultApi.delete_vulnerability_validation"
  end
  # verify the required parameter 'vulnerability_id' is set
  if @api_client.config.client_side_validation && vulnerability_id.nil?
    fail ArgumentError, "Missing the required parameter 'vulnerability_id' when calling VulnerabilityResultApi.delete_vulnerability_validation"
  end
  # verify the required parameter 'validation_id' is set
  if @api_client.config.client_side_validation && validation_id.nil?
    fail ArgumentError, "Missing the required parameter 'validation_id' when calling VulnerabilityResultApi.delete_vulnerability_validation"
  end
  # resource path
  local_var_path = '/api/3/assets/{id}/vulnerabilities/{vulnerabilityId}/validations/{validationId}'.sub('{' + 'id' + '}', site_idte_id.to_s).sub('{' + 'vulnerabilityId' + '}', vulnerability_id.to_s).sub('{' + 'validationId' + '}', validation_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=UTF-8'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'Links' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VulnerabilityResultApi#delete_vulnerability_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_asset_service_vulnerabilities(site_idte_id, protocol, port, opts = {}) ⇒ PageOfVulnerabilityFinding

Asset Service Vulnerabilities Retrieves the vulnerabilities present on a service running on an asset. A finding may be ‘invulnerable` if all instances on the service have exceptions applied.

Parameters:

  • id

    The identifier of the asset.

  • protocol

    The protocol of the service.

  • port

    The port of the service.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The index of the page (zero-based) to retrieve. (default to 0)

  • :size (Integer)

    The number of records per page to retrieve. (default to 10)

  • :sort (Array<String>)

    The criteria to sort the records by, in the format: &#x60;property&#x60;. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters.

Returns:



163
164
165
166
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 163

def get_asset_service_vulnerabilities(site_idte_id, protocol, port, opts = {})
  data, _status_code, _headers = get_asset_service_vulnerabilities_with_http_info(site_idte_id, protocol, port, opts)
  data
end

#get_asset_service_vulnerabilities_with_http_info(site_idte_id, protocol, port, opts = {}) ⇒ Array<(PageOfVulnerabilityFinding, Integer, Hash)>

Asset Service Vulnerabilities Retrieves the vulnerabilities present on a service running on an asset. A finding may be &#x60;invulnerable&#x60; if all instances on the service have exceptions applied.

Parameters:

  • id

    The identifier of the asset.

  • protocol

    The protocol of the service.

  • port

    The port of the service.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The index of the page (zero-based) to retrieve.

  • :size (Integer)

    The number of records per page to retrieve.

  • :sort (Array<String>)

    The criteria to sort the records by, in the format: &#x60;property&#x60;. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters.

Returns:

  • (Array<(PageOfVulnerabilityFinding, Integer, Hash)>)

    PageOfVulnerabilityFinding data, response status code and response headers



178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 178

def get_asset_service_vulnerabilities_with_http_info(site_idte_id, protocol, port, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VulnerabilityResultApi.get_asset_service_vulnerabilities ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && site_idte_id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling VulnerabilityResultApi.get_asset_service_vulnerabilities"
  end
  # verify the required parameter 'protocol' is set
  if @api_client.config.client_side_validation && protocol.nil?
    fail ArgumentError, "Missing the required parameter 'protocol' when calling VulnerabilityResultApi.get_asset_service_vulnerabilities"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['ip', 'icmp', 'igmp', 'ggp', 'tcp', 'pup', 'udp', 'idp', 'esp', 'nd', 'raw'].include?(protocol)
    fail ArgumentError, "invalid value for 'protocol', must be one of ip, icmp, igmp, ggp, tcp, pup, udp, idp, esp, nd, raw"
  end
  # verify the required parameter 'port' is set
  if @api_client.config.client_side_validation && port.nil?
    fail ArgumentError, "Missing the required parameter 'port' when calling VulnerabilityResultApi.get_asset_service_vulnerabilities"
  end
  # resource path
  local_var_path = '/api/3/assets/{id}/services/{protocol}/{port}/vulnerabilities'.sub('{' + 'id' + '}', site_idte_id.to_s).sub('{' + 'protocol' + '}', protocol.to_s).sub('{' + 'port' + '}', port.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=UTF-8'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'PageOfVulnerabilityFinding' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VulnerabilityResultApi#get_asset_service_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_asset_vulnerabilities(site_idte_id, opts = {}) ⇒ PageOfVulnerabilityFinding

Asset Vulnerabilities Retrieves all vulnerability findings on an asset. A finding may be ‘invulnerable` if all instances have exceptions applied.

Parameters:

  • id

    The identifier of the asset.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The index of the page (zero-based) to retrieve. (default to 0)

  • :size (Integer)

    The number of records per page to retrieve. (default to 10)

  • :sort (Array<String>)

    The criteria to sort the records by, in the format: &#x60;property&#x60;. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters.

Returns:



242
243
244
245
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 242

def get_asset_vulnerabilities(site_idte_id, opts = {})
  data, _status_code, _headers = get_asset_vulnerabilities_with_http_info(site_idte_id, opts)
  data
end

#get_asset_vulnerabilities_with_http_info(site_idte_id, opts = {}) ⇒ Array<(PageOfVulnerabilityFinding, Integer, Hash)>

Asset Vulnerabilities Retrieves all vulnerability findings on an asset. A finding may be &#x60;invulnerable&#x60; if all instances have exceptions applied.

Parameters:

  • id

    The identifier of the asset.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The index of the page (zero-based) to retrieve.

  • :size (Integer)

    The number of records per page to retrieve.

  • :sort (Array<String>)

    The criteria to sort the records by, in the format: &#x60;property&#x60;. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters.

Returns:

  • (Array<(PageOfVulnerabilityFinding, Integer, Hash)>)

    PageOfVulnerabilityFinding data, response status code and response headers



255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 255

def get_asset_vulnerabilities_with_http_info(site_idte_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VulnerabilityResultApi.get_asset_vulnerabilities ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && site_idte_id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling VulnerabilityResultApi.get_asset_vulnerabilities"
  end
  # resource path
  local_var_path = '/api/3/assets/{id}/vulnerabilities'.sub('{' + 'id' + '}', site_idte_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=UTF-8'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'PageOfVulnerabilityFinding' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VulnerabilityResultApi#get_asset_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_asset_vulnerability(site_idte_id, vulnerability_id, opts = {}) ⇒ VulnerabilityFinding

Asset Vulnerability Retrieves the details for a vulnerability finding on an asset.

Parameters:

  • id

    The identifier of the asset.

  • vulnerability_id

    The identifier of the vulnerability.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



305
306
307
308
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 305

def get_asset_vulnerability(site_idte_id, vulnerability_id, opts = {})
  data, _status_code, _headers = get_asset_vulnerability_with_http_info(site_idte_id, vulnerability_id, opts)
  data
end

#get_asset_vulnerability_with_http_info(site_idte_id, vulnerability_id, opts = {}) ⇒ Array<(VulnerabilityFinding, Integer, Hash)>

Asset Vulnerability Retrieves the details for a vulnerability finding on an asset.

Parameters:

  • id

    The identifier of the asset.

  • vulnerability_id

    The identifier of the vulnerability.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(VulnerabilityFinding, Integer, Hash)>)

    VulnerabilityFinding data, response status code and response headers



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 316

def get_asset_vulnerability_with_http_info(site_idte_id, vulnerability_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VulnerabilityResultApi.get_asset_vulnerability ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && site_idte_id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling VulnerabilityResultApi.get_asset_vulnerability"
  end
  # verify the required parameter 'vulnerability_id' is set
  if @api_client.config.client_side_validation && vulnerability_id.nil?
    fail ArgumentError, "Missing the required parameter 'vulnerability_id' when calling VulnerabilityResultApi.get_asset_vulnerability"
  end
  # resource path
  local_var_path = '/api/3/assets/{id}/vulnerabilities/{vulnerabilityId}'.sub('{' + 'id' + '}', site_idte_id.to_s).sub('{' + 'vulnerabilityId' + '}', vulnerability_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=UTF-8'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'VulnerabilityFinding' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VulnerabilityResultApi#get_asset_vulnerability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vulnerability_validation(id, vulnerability_id, validation_id, opts = {}) ⇒ VulnerabilityValidationResource

Asset Vulnerability Validation Returns a vulnerability validation for a vulnerability on an asset. The asset must be currently vulnerable to the validated vulnerable for the validation to be returned.

Parameters:

  • id

    The identifier of the asset.

  • vulnerability_id

    The identifier of the vulnerability.

  • validation_id

    The identifier of the vulnerability validation.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



368
369
370
371
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 368

def get_vulnerability_validation(id, vulnerability_id, validation_id, opts = {})
  data, _status_code, _headers = get_vulnerability_validation_with_http_info(site_idte_id, vulnerability_id, validation_id, opts)
  data
end

#get_vulnerability_validation_with_http_info(id, vulnerability_id, validation_id, opts = {}) ⇒ Array<(VulnerabilityValidationResource, Integer, Hash)>

Asset Vulnerability Validation Returns a vulnerability validation for a vulnerability on an asset. The asset must be currently vulnerable to the validated vulnerable for the validation to be returned.

Parameters:

  • id

    The identifier of the asset.

  • vulnerability_id

    The identifier of the vulnerability.

  • validation_id

    The identifier of the vulnerability validation.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 380

def get_vulnerability_validation_with_http_info(id, vulnerability_id, validation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VulnerabilityResultApi.get_vulnerability_validation ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && site_idte_id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling VulnerabilityResultApi.get_vulnerability_validation"
  end
  # verify the required parameter 'vulnerability_id' is set
  if @api_client.config.client_side_validation && vulnerability_id.nil?
    fail ArgumentError, "Missing the required parameter 'vulnerability_id' when calling VulnerabilityResultApi.get_vulnerability_validation"
  end
  # verify the required parameter 'validation_id' is set
  if @api_client.config.client_side_validation && validation_id.nil?
    fail ArgumentError, "Missing the required parameter 'validation_id' when calling VulnerabilityResultApi.get_vulnerability_validation"
  end
  # resource path
  local_var_path = '/api/3/assets/{id}/vulnerabilities/{vulnerabilityId}/validations/{validationId}'.sub('{' + 'id' + '}', site_idte_id.to_s).sub('{' + 'vulnerabilityId' + '}', vulnerability_id.to_s).sub('{' + 'validationId' + '}', validation_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=UTF-8'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'VulnerabilityValidationResource' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VulnerabilityResultApi#get_vulnerability_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vulnerability_validations(id, vulnerability_id, opts = {}) ⇒ ResourcesVulnerabilityValidationResource

Asset Vulnerability Validations Returns all vulnerability validations for a vulnerability on an asset. The asset must be currently vulnerable to the validated vulnerable for the validation to be returned.

Parameters:

  • id

    The identifier of the asset.

  • vulnerability_id

    The identifier of the vulnerability.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



435
436
437
438
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 435

def get_vulnerability_validations(id, vulnerability_id, opts = {})
  data, _status_code, _headers = get_vulnerability_validations_with_http_info(site_idte_id, vulnerability_id, opts)
  data
end

#get_vulnerability_validations_with_http_info(id, vulnerability_id, opts = {}) ⇒ Array<(ResourcesVulnerabilityValidationResource, Integer, Hash)>

Asset Vulnerability Validations Returns all vulnerability validations for a vulnerability on an asset. The asset must be currently vulnerable to the validated vulnerable for the validation to be returned.

Parameters:

  • id

    The identifier of the asset.

  • vulnerability_id

    The identifier of the vulnerability.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/api/vulnerability_result_api.rb', line 446

def get_vulnerability_validations_with_http_info(id, vulnerability_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VulnerabilityResultApi.get_vulnerability_validations ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && site_idte_id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling VulnerabilityResultApi.get_vulnerability_validations"
  end
  # verify the required parameter 'vulnerability_id' is set
  if @api_client.config.client_side_validation && vulnerability_id.nil?
    fail ArgumentError, "Missing the required parameter 'vulnerability_id' when calling VulnerabilityResultApi.get_vulnerability_validations"
  end
  # resource path
  local_var_path = '/api/3/assets/{id}/vulnerabilities/{vulnerabilityId}/validations'.sub('{' + 'id' + '}', site_idte_id.to_s).sub('{' + 'vulnerabilityId' + '}', vulnerability_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=UTF-8'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'ResourcesVulnerabilityValidationResource' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VulnerabilityResultApi#get_vulnerability_validations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end