Class: Falcon::OdsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/crimson-falcon/api/ods_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ OdsApi

Returns a new instance of OdsApi.



36
37
38
# File 'lib/crimson-falcon/api/ods_api.rb', line 36

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



34
35
36
# File 'lib/crimson-falcon/api/ods_api.rb', line 34

def api_client
  @api_client
end

Instance Method Details

#aggregate_query_scan_host_metadata(body, opts = {}) ⇒ MsaAggregatesResponse

Get aggregates on ODS scan-hosts data.

Parameters:

Returns:



43
44
45
46
# File 'lib/crimson-falcon/api/ods_api.rb', line 43

def (body, opts = {})
  data, _status_code, _headers = (body, opts)
  data
end

#aggregate_query_scan_host_metadata_with_http_info(body, opts = {}) ⇒ Array<(MsaAggregatesResponse, Integer, Hash)>

Get aggregates on ODS scan-hosts data.

Parameters:

Returns:

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

    MsaAggregatesResponse data, response status code and response headers



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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/crimson-falcon/api/ods_api.rb', line 52

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.aggregate_query_scan_host_metadata ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling OdsApi.aggregate_query_scan_host_metadata"
  end
  # resource path
  local_var_path = '/ods/aggregates/scan-hosts/v1'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'MsaAggregatesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.aggregate_query_scan_host_metadata",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#aggregate_query_scan_host_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#aggregate_scans(body, opts = {}) ⇒ MsaAggregatesResponse

Get aggregates on ODS scan data.

Parameters:

Returns:



109
110
111
112
# File 'lib/crimson-falcon/api/ods_api.rb', line 109

def aggregate_scans(body, opts = {})
  data, _status_code, _headers = aggregate_scans_with_http_info(body, opts)
  data
end

#aggregate_scans_with_http_info(body, opts = {}) ⇒ Array<(MsaAggregatesResponse, Integer, Hash)>

Get aggregates on ODS scan data.

Parameters:

Returns:

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

    MsaAggregatesResponse data, response status code and response headers



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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/crimson-falcon/api/ods_api.rb', line 118

def aggregate_scans_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.aggregate_scans ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling OdsApi.aggregate_scans"
  end
  # resource path
  local_var_path = '/ods/aggregates/scans/v1'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'MsaAggregatesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.aggregate_scans",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#aggregate_scans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#aggregate_scheduled_scans(body, opts = {}) ⇒ MsaAggregatesResponse

Get aggregates on ODS scheduled-scan data.

Parameters:

Returns:



175
176
177
178
# File 'lib/crimson-falcon/api/ods_api.rb', line 175

def aggregate_scheduled_scans(body, opts = {})
  data, _status_code, _headers = aggregate_scheduled_scans_with_http_info(body, opts)
  data
end

#aggregate_scheduled_scans_with_http_info(body, opts = {}) ⇒ Array<(MsaAggregatesResponse, Integer, Hash)>

Get aggregates on ODS scheduled-scan data.

Parameters:

Returns:

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

    MsaAggregatesResponse data, response status code and response headers



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
234
235
# File 'lib/crimson-falcon/api/ods_api.rb', line 184

def aggregate_scheduled_scans_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.aggregate_scheduled_scans ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling OdsApi.aggregate_scheduled_scans"
  end
  # resource path
  local_var_path = '/ods/aggregates/scheduled-scans/v1'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'MsaAggregatesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.aggregate_scheduled_scans",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#aggregate_scheduled_scans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#cancel_scans(body, opts = {}) ⇒ MsaspecQueryResponse

Cancel ODS scans for the given scan ids.

Parameters:

Returns:



241
242
243
244
# File 'lib/crimson-falcon/api/ods_api.rb', line 241

def cancel_scans(body, opts = {})
  data, _status_code, _headers = cancel_scans_with_http_info(body, opts)
  data
end

#cancel_scans_with_http_info(body, opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>

Cancel ODS scans for the given scan ids.

Parameters:

Returns:

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

    MsaspecQueryResponse data, response status code and response headers



250
251
252
253
254
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
299
300
301
# File 'lib/crimson-falcon/api/ods_api.rb', line 250

def cancel_scans_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.cancel_scans ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling OdsApi.cancel_scans"
  end
  # resource path
  local_var_path = '/ods/entities/scan-control-actions/cancel/v1'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'MsaspecQueryResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.cancel_scans",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#cancel_scans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_scan(body, opts = {}) ⇒ EntitiesODSScanResponse

Create ODS scan and start or schedule scan for the given scan request.

Parameters:

Returns:



307
308
309
310
# File 'lib/crimson-falcon/api/ods_api.rb', line 307

def create_scan(body, opts = {})
  data, _status_code, _headers = create_scan_with_http_info(body, opts)
  data
end

#create_scan_with_http_info(body, opts = {}) ⇒ Array<(EntitiesODSScanResponse, Integer, Hash)>

Create ODS scan and start or schedule scan for the given scan request.

Parameters:

Returns:

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

    EntitiesODSScanResponse 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
361
362
363
364
365
366
367
# File 'lib/crimson-falcon/api/ods_api.rb', line 316

def create_scan_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.create_scan ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling OdsApi.create_scan"
  end
  # resource path
  local_var_path = '/ods/entities/scans/v1'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'EntitiesODSScanResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.create_scan",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#create_scan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_scheduled_scans(ids, opts = {}) ⇒ MsaspecQueryResponse

Delete ODS scheduled-scans for the given scheduled-scan ids.

Parameters:

  • ids (Array<String>)

    The scan IDs to retrieve the scan entities

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    A FQL compatible query string.

Returns:



374
375
376
377
# File 'lib/crimson-falcon/api/ods_api.rb', line 374

def delete_scheduled_scans(ids, opts = {})
  data, _status_code, _headers = delete_scheduled_scans_with_http_info(ids, opts)
  data
end

#delete_scheduled_scans_with_http_info(ids, opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>

Delete ODS scheduled-scans for the given scheduled-scan ids.

Parameters:

  • ids (Array<String>)

    The scan IDs to retrieve the scan entities

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    A FQL compatible query string.

Returns:

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

    MsaspecQueryResponse data, response status code and response headers



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
429
430
431
432
# File 'lib/crimson-falcon/api/ods_api.rb', line 384

def delete_scheduled_scans_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.delete_scheduled_scans ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling OdsApi.delete_scheduled_scans"
  end
  # resource path
  local_var_path = '/ods/entities/scheduled-scans/v1'

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'MsaspecQueryResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.delete_scheduled_scans",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#delete_scheduled_scans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_malicious_files_by_ids(ids, opts = {}) ⇒ EntitiesODSScanMaliciousFileResponse

Get malicious files by ids.

Parameters:

  • ids (Array<String>)

    The scan IDs to retrieve the scan entities

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

    the optional parameters

Returns:



438
439
440
441
# File 'lib/crimson-falcon/api/ods_api.rb', line 438

def get_malicious_files_by_ids(ids, opts = {})
  data, _status_code, _headers = get_malicious_files_by_ids_with_http_info(ids, opts)
  data
end

#get_malicious_files_by_ids_with_http_info(ids, opts = {}) ⇒ Array<(EntitiesODSScanMaliciousFileResponse, Integer, Hash)>

Get malicious files by ids.

Parameters:

  • ids (Array<String>)

    The scan IDs to retrieve the scan entities

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

    the optional parameters

Returns:



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
491
492
493
494
# File 'lib/crimson-falcon/api/ods_api.rb', line 447

def get_malicious_files_by_ids_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.get_malicious_files_by_ids ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling OdsApi.get_malicious_files_by_ids"
  end
  # resource path
  local_var_path = '/ods/entities/malicious-files/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'EntitiesODSScanMaliciousFileResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.get_malicious_files_by_ids",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#get_malicious_files_by_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_scan_host_metadata_by_ids(ids, opts = {}) ⇒ EntitiesODSScanHostResponse

Get scan hosts by ids.

Parameters:

  • ids (Array<String>)

    The scan IDs to retrieve the scan entities

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

    the optional parameters

Returns:



500
501
502
503
# File 'lib/crimson-falcon/api/ods_api.rb', line 500

def (ids, opts = {})
  data, _status_code, _headers = (ids, opts)
  data
end

#get_scan_host_metadata_by_ids_with_http_info(ids, opts = {}) ⇒ Array<(EntitiesODSScanHostResponse, Integer, Hash)>

Get scan hosts by ids.

Parameters:

  • ids (Array<String>)

    The scan IDs to retrieve the scan entities

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

    the optional parameters

Returns:

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

    EntitiesODSScanHostResponse data, response status code and response headers



509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
# File 'lib/crimson-falcon/api/ods_api.rb', line 509

def (ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.get_scan_host_metadata_by_ids ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling OdsApi.get_scan_host_metadata_by_ids"
  end
  # resource path
  local_var_path = '/ods/entities/scan-hosts/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'EntitiesODSScanHostResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.get_scan_host_metadata_by_ids",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#get_scan_host_metadata_by_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_scans_by_scan_ids(ids, opts = {}) ⇒ EntitiesODSScanResponse

Get Scans by IDs.

Parameters:

  • ids (Array<String>)

    The scan IDs to retrieve the scan entities

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

    the optional parameters

Returns:



562
563
564
565
# File 'lib/crimson-falcon/api/ods_api.rb', line 562

def get_scans_by_scan_ids(ids, opts = {})
  data, _status_code, _headers = get_scans_by_scan_ids_with_http_info(ids, opts)
  data
end

#get_scans_by_scan_ids_v2(ids, opts = {}) ⇒ EntitiesODSScanResponseV2

Get Scans by IDs.

Parameters:

  • ids (Array<String>)

    The scan IDs to retrieve the scan entities

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

    the optional parameters

Returns:



624
625
626
627
# File 'lib/crimson-falcon/api/ods_api.rb', line 624

def get_scans_by_scan_ids_v2(ids, opts = {})
  data, _status_code, _headers = get_scans_by_scan_ids_v2_with_http_info(ids, opts)
  data
end

#get_scans_by_scan_ids_v2_with_http_info(ids, opts = {}) ⇒ Array<(EntitiesODSScanResponseV2, Integer, Hash)>

Get Scans by IDs.

Parameters:

  • ids (Array<String>)

    The scan IDs to retrieve the scan entities

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

    the optional parameters

Returns:

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

    EntitiesODSScanResponseV2 data, response status code and response headers



633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/crimson-falcon/api/ods_api.rb', line 633

def get_scans_by_scan_ids_v2_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.get_scans_by_scan_ids_v2 ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling OdsApi.get_scans_by_scan_ids_v2"
  end
  # resource path
  local_var_path = '/ods/entities/scans/v2'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'EntitiesODSScanResponseV2'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.get_scans_by_scan_ids_v2",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#get_scans_by_scan_ids_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_scans_by_scan_ids_with_http_info(ids, opts = {}) ⇒ Array<(EntitiesODSScanResponse, Integer, Hash)>

Get Scans by IDs.

Parameters:

  • ids (Array<String>)

    The scan IDs to retrieve the scan entities

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

    the optional parameters

Returns:

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

    EntitiesODSScanResponse data, response status code and response headers



571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
# File 'lib/crimson-falcon/api/ods_api.rb', line 571

def get_scans_by_scan_ids_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.get_scans_by_scan_ids ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling OdsApi.get_scans_by_scan_ids"
  end
  # resource path
  local_var_path = '/ods/entities/scans/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'EntitiesODSScanResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.get_scans_by_scan_ids",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#get_scans_by_scan_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_scheduled_scans_by_scan_ids(ids, opts = {}) ⇒ EntitiesODSScheduleScanResponse

Get ScheduledScans by IDs.

Parameters:

  • ids (Array<String>)

    The scan IDs to retrieve the scan entities

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

    the optional parameters

Returns:



686
687
688
689
# File 'lib/crimson-falcon/api/ods_api.rb', line 686

def get_scheduled_scans_by_scan_ids(ids, opts = {})
  data, _status_code, _headers = get_scheduled_scans_by_scan_ids_with_http_info(ids, opts)
  data
end

#get_scheduled_scans_by_scan_ids_with_http_info(ids, opts = {}) ⇒ Array<(EntitiesODSScheduleScanResponse, Integer, Hash)>

Get ScheduledScans by IDs.

Parameters:

  • ids (Array<String>)

    The scan IDs to retrieve the scan entities

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

    the optional parameters

Returns:



695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
# File 'lib/crimson-falcon/api/ods_api.rb', line 695

def get_scheduled_scans_by_scan_ids_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.get_scheduled_scans_by_scan_ids ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling OdsApi.get_scheduled_scans_by_scan_ids"
  end
  # resource path
  local_var_path = '/ods/entities/scheduled-scans/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'EntitiesODSScheduleScanResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.get_scheduled_scans_by_scan_ids",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#get_scheduled_scans_by_scan_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#query_malicious_files(opts = {}) ⇒ MsaspecQueryResponse

Query malicious files.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    A FQL compatible query string. Terms: [id scan_id host_id host_scan_id filepath filename hash pattern_id severity quarantined last_updated]

  • :offset (Integer)

    Index of the starting resource (default to 0)

  • :limit (Integer)

    The max number of resources to return (default to 500)

  • :sort (String)

    The property to sort on, followed by a |, followed by the sort direction, either &quot;asc&quot; or &quot;desc&quot; (default to ‘last_updated|desc’)

Returns:



751
752
753
754
# File 'lib/crimson-falcon/api/ods_api.rb', line 751

def query_malicious_files(opts = {})
  data, _status_code, _headers = query_malicious_files_with_http_info(opts)
  data
end

#query_malicious_files_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>

Query malicious files.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    A FQL compatible query string. Terms: [id scan_id host_id host_scan_id filepath filename hash pattern_id severity quarantined last_updated]

  • :offset (Integer)

    Index of the starting resource (default to 0)

  • :limit (Integer)

    The max number of resources to return (default to 500)

  • :sort (String)

    The property to sort on, followed by a |, followed by the sort direction, either &quot;asc&quot; or &quot;desc&quot; (default to ‘last_updated|desc’)

Returns:

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

    MsaspecQueryResponse data, response status code and response headers



763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'lib/crimson-falcon/api/ods_api.rb', line 763

def query_malicious_files_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.query_malicious_files ...'
  end
  allowable_values = ["id|asc", "id|desc", "scan_id|asc", "scan_id|desc", "host_id|asc", "host_id|desc", "host_scan_id|asc", "host_scan_id|desc", "filename|asc", "filename|desc", "hash|asc", "hash|desc", "pattern_id|asc", "pattern_id|desc", "severity|asc", "severity|desc", "last_updated|asc", "last_updated|desc"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/ods/queries/malicious-files/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] 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'])

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'MsaspecQueryResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.query_malicious_files",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#query_malicious_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#query_scan_host_metadata(opts = {}) ⇒ MsaspecQueryResponse

Query scan hosts.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    A FQL compatible query string. Terms: [id profile_id host_id scan_id host_scan_id filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity completed_on started_on last_updated scan_control_reason]

  • :offset (Integer)

    Index of the starting resource (default to 0)

  • :limit (Integer)

    The max number of resources to return (default to 500)

  • :sort (String)

    The property to sort on, followed by a |, followed by the sort direction, either &quot;asc&quot; or &quot;desc&quot; (default to ‘last_updated|desc’)

Returns:



822
823
824
825
# File 'lib/crimson-falcon/api/ods_api.rb', line 822

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

#query_scan_host_metadata_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>

Query scan hosts.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    A FQL compatible query string. Terms: [id profile_id host_id scan_id host_scan_id filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity completed_on started_on last_updated scan_control_reason]

  • :offset (Integer)

    Index of the starting resource (default to 0)

  • :limit (Integer)

    The max number of resources to return (default to 500)

  • :sort (String)

    The property to sort on, followed by a |, followed by the sort direction, either &quot;asc&quot; or &quot;desc&quot; (default to ‘last_updated|desc’)

Returns:

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

    MsaspecQueryResponse data, response status code and response headers



834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
# File 'lib/crimson-falcon/api/ods_api.rb', line 834

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.query_scan_host_metadata ...'
  end
  allowable_values = ["id|asc", "id|desc", "scan_id|asc", "scan_id|desc", "host_id|asc", "host_id|desc", "filecount.scanned|asc", "filecount.scanned|desc", "filecount.malicious|asc", "filecount.malicious|desc", "filecount.quarantined|asc", "filecount.quarantined|desc", "filecount.skipped|asc", "filecount.skipped|desc", "status|asc", "status|desc", "severity|asc", "severity|desc", "started_on|asc", "started_on|desc", "completed_on|asc", "completed_on|desc", "last_updated|asc", "last_updated|desc", "scan_control_reason.keyword|asc", "scan_control_reason.keyword|desc"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/ods/queries/scan-hosts/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] 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'])

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'MsaspecQueryResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.query_scan_host_metadata",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#query_scan_host_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#query_scans(opts = {}) ⇒ MsaspecQueryResponse

Query Scans.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    A FQL compatible query string. Terms: [id profile_id description.keyword initiated_from filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity scan_started_on scan_completed_on created_on created_by last_updated targeted_host_count missing_host_count]

  • :offset (Integer)

    Index of the starting resource (default to 0)

  • :limit (Integer)

    The max number of resources to return (default to 500)

  • :sort (String)

    The property to sort on, followed by a |, followed by the sort direction, either &quot;asc&quot; or &quot;desc&quot; (default to ‘created_on|desc’)

Returns:



893
894
895
896
# File 'lib/crimson-falcon/api/ods_api.rb', line 893

def query_scans(opts = {})
  data, _status_code, _headers = query_scans_with_http_info(opts)
  data
end

#query_scans_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>

Query Scans.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    A FQL compatible query string. Terms: [id profile_id description.keyword initiated_from filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity scan_started_on scan_completed_on created_on created_by last_updated targeted_host_count missing_host_count]

  • :offset (Integer)

    Index of the starting resource (default to 0)

  • :limit (Integer)

    The max number of resources to return (default to 500)

  • :sort (String)

    The property to sort on, followed by a |, followed by the sort direction, either &quot;asc&quot; or &quot;desc&quot; (default to ‘created_on|desc’)

Returns:

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

    MsaspecQueryResponse data, response status code and response headers



905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
# File 'lib/crimson-falcon/api/ods_api.rb', line 905

def query_scans_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.query_scans ...'
  end
  allowable_values = ["id|asc", "id|desc", "initiated_from|asc", "initiated_from|desc", "description.keyword|asc", "description.keyword|desc", "filecount.scanned|asc", "filecount.scanned|desc", "filecount.malicious|asc", "filecount.malicious|desc", "filecount.quarantined|asc", "filecount.quarantined|desc", "filecount.skipped|asc", "filecount.skipped|desc", "affected_hosts_count|asc", "affected_hosts_count|desc", "status|asc", "status|desc", "severity|asc", "severity|desc", "scan_started_on|asc", "scan_started_on|desc", "scan_completed_on|asc", "scan_completed_on|desc", "created_on|asc", "created_on|desc", "created_by|asc", "created_by|desc", "last_updated|asc", "last_updated|desc", "targeted_host_count|asc", "targeted_host_count|desc", "missing_host_count|asc", "missing_host_count|desc"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/ods/queries/scans/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] 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'])

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'MsaspecQueryResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.query_scans",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#query_scans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#query_scheduled_scans(opts = {}) ⇒ MsaspecQueryResponse

Query ScheduledScans.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    A FQL compatible query string. Terms: [id description initiated_from status schedule.start_timestamp schedule.Interval created_on created_by last_updated deleted]

  • :offset (Integer)

    Index of the starting resource (default to 0)

  • :limit (Integer)

    The max number of resources to return (default to 500)

  • :sort (String)

    The property to sort on, followed by a |, followed by the sort direction, either &quot;asc&quot; or &quot;desc&quot; (default to ‘schedule.start_timestamp|desc’)

Returns:



964
965
966
967
# File 'lib/crimson-falcon/api/ods_api.rb', line 964

def query_scheduled_scans(opts = {})
  data, _status_code, _headers = query_scheduled_scans_with_http_info(opts)
  data
end

#query_scheduled_scans_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>

Query ScheduledScans.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    A FQL compatible query string. Terms: [id description initiated_from status schedule.start_timestamp schedule.Interval created_on created_by last_updated deleted]

  • :offset (Integer)

    Index of the starting resource (default to 0)

  • :limit (Integer)

    The max number of resources to return (default to 500)

  • :sort (String)

    The property to sort on, followed by a |, followed by the sort direction, either &quot;asc&quot; or &quot;desc&quot; (default to ‘schedule.start_timestamp|desc’)

Returns:

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

    MsaspecQueryResponse data, response status code and response headers



976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
# File 'lib/crimson-falcon/api/ods_api.rb', line 976

def query_scheduled_scans_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.query_scheduled_scans ...'
  end
  allowable_values = ["id|asc", "id|desc", "description.keyword|asc", "description.keyword|desc", "status|asc", "status|desc", "schedule.start_timestamp|asc", "schedule.start_timestamp|desc", "schedule.interval|asc", "schedule.interval|desc", "created_on|asc", "created_on|desc", "created_by|asc", "created_by|desc", "last_updated|asc", "last_updated|desc"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/ods/queries/scheduled-scans/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] 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'])

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'MsaspecQueryResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.query_scheduled_scans",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#query_scheduled_scans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#schedule_scan(body, opts = {}) ⇒ EntitiesODSScheduleScanResponse

Create ODS scan and start or schedule scan for the given scan request.

Parameters:

Returns:



1032
1033
1034
1035
# File 'lib/crimson-falcon/api/ods_api.rb', line 1032

def schedule_scan(body, opts = {})
  data, _status_code, _headers = schedule_scan_with_http_info(body, opts)
  data
end

#schedule_scan_with_http_info(body, opts = {}) ⇒ Array<(EntitiesODSScheduleScanResponse, Integer, Hash)>

Create ODS scan and start or schedule scan for the given scan request.

Parameters:

Returns:



1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
# File 'lib/crimson-falcon/api/ods_api.rb', line 1041

def schedule_scan_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OdsApi.schedule_scan ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling OdsApi.schedule_scan"
  end
  # resource path
  local_var_path = '/ods/entities/scheduled-scans/v1'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'EntitiesODSScheduleScanResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"OdsApi.schedule_scan",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OdsApi#schedule_scan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end