Class: Falcon::ContainerPackages

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ContainerPackages

Returns a new instance of ContainerPackages.



36
37
38
# File 'lib/crimson-falcon/api/container_packages.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/container_packages.rb', line 34

def api_client
  @api_client
end

Instance Method Details

#read_packages_by_fixable_vuln_count(opts = {}) ⇒ PackagesApiPackagesByVulnCount

Maximum offset = 10000 - limit

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count`

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. (default to 100)

  • :offset (Integer)

    The offset from where to begin.

Returns:



45
46
47
48
# File 'lib/crimson-falcon/api/container_packages.rb', line 45

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

#read_packages_by_fixable_vuln_count_with_http_info(opts = {}) ⇒ Array<(PackagesApiPackagesByVulnCount, Integer, Hash)>

Maximum offset &#x3D; 10000 - limit

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;ai_related&#x60; - &#x60;cid&#x60; - &#x60;container_id&#x60; - &#x60;cveid&#x60; - &#x60;fix_status&#x60; - &#x60;image_digest&#x60; - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;severity&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. (default to 100)

  • :offset (Integer)

    The offset from where to begin.

Returns:



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
# File 'lib/crimson-falcon/api/container_packages.rb', line 56

def read_packages_by_fixable_vuln_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerPackages.read_packages_by_fixable_vuln_count ...'
  end
  # resource path
  local_var_path = '/container-security/combined/packages/app-by-fixable-vulnerability-count/v1'

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

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

  new_options = opts.merge(
    :operation => :"ContainerPackages.read_packages_by_fixable_vuln_count",
    :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: ContainerPackages#read_packages_by_fixable_vuln_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_packages_by_image_count(opts = {}) ⇒ PackagesApiPackagesByImageCount

Retrieves the N most frequently used packages across images

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;ai_related&#x60; - &#x60;cveid&#x60; - &#x60;running_images&#x60; - &#x60;severity&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :limit (Integer)

    Maximum number of package results to return (default to 5)

Returns:



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

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

#read_packages_by_image_count_with_http_info(opts = {}) ⇒ Array<(PackagesApiPackagesByImageCount, Integer, Hash)>

Retrieves the N most frequently used packages across images

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;ai_related&#x60; - &#x60;cveid&#x60; - &#x60;running_images&#x60; - &#x60;severity&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :limit (Integer)

    Maximum number of package results to return (default to 5)

Returns:



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
170
# File 'lib/crimson-falcon/api/container_packages.rb', line 118

def read_packages_by_image_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerPackages.read_packages_by_image_count ...'
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContainerPackages.read_packages_by_image_count, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContainerPackages.read_packages_by_image_count, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/container-security/aggregates/packages/by-image-count/v1'

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

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

  new_options = opts.merge(
    :operation => :"ContainerPackages.read_packages_by_image_count",
    :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: ContainerPackages#read_packages_by_image_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_packages_by_vuln_count(opts = {}) ⇒ PackagesApiPackagesByVulnCount

Maximum offset = 10000 - limit

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;ai_related&#x60; - &#x60;cid&#x60; - &#x60;container_id&#x60; - &#x60;cveid&#x60; - &#x60;fix_status&#x60; - &#x60;image_digest&#x60; - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;severity&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. (default to 100)

  • :offset (Integer)

    The offset from where to begin.

Returns:



178
179
180
181
# File 'lib/crimson-falcon/api/container_packages.rb', line 178

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

#read_packages_by_vuln_count_with_http_info(opts = {}) ⇒ Array<(PackagesApiPackagesByVulnCount, Integer, Hash)>

Maximum offset &#x3D; 10000 - limit

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;ai_related&#x60; - &#x60;cid&#x60; - &#x60;container_id&#x60; - &#x60;cveid&#x60; - &#x60;fix_status&#x60; - &#x60;image_digest&#x60; - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;severity&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. (default to 100)

  • :offset (Integer)

    The offset from where to begin.

Returns:



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
# File 'lib/crimson-falcon/api/container_packages.rb', line 189

def read_packages_by_vuln_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerPackages.read_packages_by_vuln_count ...'
  end
  # resource path
  local_var_path = '/container-security/combined/packages/by-vulnerability-count/v1'

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

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

  new_options = opts.merge(
    :operation => :"ContainerPackages.read_packages_by_vuln_count",
    :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: ContainerPackages#read_packages_by_vuln_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_packages_combined(opts = {}) ⇒ PackagesApiCombinedPackage

Maximum offset = 10000 - limit

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;ai_related&#x60; - &#x60;cid&#x60; - &#x60;container_id&#x60; - &#x60;cveid&#x60; - &#x60;fix_status&#x60; - &#x60;image_digest&#x60; - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;severity&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :only_zero_day_affected (Boolean) — default: true/false

    load zero day affected packages (default to false)

  • :sort (String)

    The fields to sort the records on. Supported columns: - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. (default to 100)

  • :offset (Integer)

    The offset from where to begin.

Returns:



244
245
246
247
# File 'lib/crimson-falcon/api/container_packages.rb', line 244

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

#read_packages_combined_export(opts = {}) ⇒ PackagesApiCombinedPackageExport

Maximum offset = 10000 - limit

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;ai_related&#x60; - &#x60;cid&#x60; - &#x60;container_id&#x60; - &#x60;cveid&#x60; - &#x60;fix_status&#x60; - &#x60;image_digest&#x60; - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;severity&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :only_zero_day_affected (Boolean) — default: true/false

    load zero day affected packages (default to false)

  • :sort (String)

    The fields to sort the records on. Supported columns: - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. (default to 100)

  • :offset (Integer)

    The offset from where to begin.

Returns:



314
315
316
317
# File 'lib/crimson-falcon/api/container_packages.rb', line 314

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

#read_packages_combined_export_with_http_info(opts = {}) ⇒ Array<(PackagesApiCombinedPackageExport, Integer, Hash)>

Maximum offset &#x3D; 10000 - limit

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;ai_related&#x60; - &#x60;cid&#x60; - &#x60;container_id&#x60; - &#x60;cveid&#x60; - &#x60;fix_status&#x60; - &#x60;image_digest&#x60; - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;severity&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :only_zero_day_affected (Boolean) — default: true/false

    load zero day affected packages (default to false)

  • :sort (String)

    The fields to sort the records on. Supported columns: - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. (default to 100)

  • :offset (Integer)

    The offset from where to begin.

Returns:



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
368
369
370
371
372
373
374
# File 'lib/crimson-falcon/api/container_packages.rb', line 327

def read_packages_combined_export_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerPackages.read_packages_combined_export ...'
  end
  # resource path
  local_var_path = '/container-security/combined/packages/export/v1'

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

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

  new_options = opts.merge(
    :operation => :"ContainerPackages.read_packages_combined_export",
    :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: ContainerPackages#read_packages_combined_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_packages_combined_v2(opts = {}) ⇒ PackagesApiCombinedPackageV2

Maximum offset = 10000 - limit

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;ai_related&#x60; - &#x60;cid&#x60; - &#x60;container_id&#x60; - &#x60;cveid&#x60; - &#x60;fix_status&#x60; - &#x60;image_digest&#x60; - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;severity&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :only_zero_day_affected (Boolean) — default: true/false

    load zero day affected packages (default to false)

  • :sort (String)

    The fields to sort the records on. Supported columns: - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. (default to 100)

  • :offset (Integer)

    The offset from where to begin.

Returns:



384
385
386
387
# File 'lib/crimson-falcon/api/container_packages.rb', line 384

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

#read_packages_combined_v2_with_http_info(opts = {}) ⇒ Array<(PackagesApiCombinedPackageV2, Integer, Hash)>

Maximum offset &#x3D; 10000 - limit

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;ai_related&#x60; - &#x60;cid&#x60; - &#x60;container_id&#x60; - &#x60;cveid&#x60; - &#x60;fix_status&#x60; - &#x60;image_digest&#x60; - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;severity&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :only_zero_day_affected (Boolean) — default: true/false

    load zero day affected packages (default to false)

  • :sort (String)

    The fields to sort the records on. Supported columns: - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. (default to 100)

  • :offset (Integer)

    The offset from where to begin.

Returns:



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
433
434
435
436
437
438
439
440
441
442
443
444
# File 'lib/crimson-falcon/api/container_packages.rb', line 397

def read_packages_combined_v2_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerPackages.read_packages_combined_v2 ...'
  end
  # resource path
  local_var_path = '/container-security/combined/packages/v2'

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

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

  new_options = opts.merge(
    :operation => :"ContainerPackages.read_packages_combined_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: ContainerPackages#read_packages_combined_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_packages_combined_with_http_info(opts = {}) ⇒ Array<(PackagesApiCombinedPackage, Integer, Hash)>

Maximum offset &#x3D; 10000 - limit

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;ai_related&#x60; - &#x60;cid&#x60; - &#x60;container_id&#x60; - &#x60;cveid&#x60; - &#x60;fix_status&#x60; - &#x60;image_digest&#x60; - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;severity&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :only_zero_day_affected (Boolean) — default: true/false

    load zero day affected packages (default to false)

  • :sort (String)

    The fields to sort the records on. Supported columns: - &#x60;license&#x60; - &#x60;package_name_version&#x60; - &#x60;type&#x60; - &#x60;vulnerability_count&#x60;

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. (default to 100)

  • :offset (Integer)

    The offset from where to begin.

Returns:

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

    PackagesApiCombinedPackage data, response status code and response headers



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
302
303
304
# File 'lib/crimson-falcon/api/container_packages.rb', line 257

def read_packages_combined_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerPackages.read_packages_combined ...'
  end
  # resource path
  local_var_path = '/container-security/combined/packages/v1'

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

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

  new_options = opts.merge(
    :operation => :"ContainerPackages.read_packages_combined",
    :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: ContainerPackages#read_packages_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_packages_count_by_zero_day(opts = {}) ⇒ CommonCountResponse

Retrieve packages count affected by zero day vulnerabilities

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;cid&#x60;

Returns:



450
451
452
453
# File 'lib/crimson-falcon/api/container_packages.rb', line 450

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

#read_packages_count_by_zero_day_with_http_info(opts = {}) ⇒ Array<(CommonCountResponse, Integer, Hash)>

Retrieve packages count affected by zero day vulnerabilities

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;cid&#x60;

Returns:

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

    CommonCountResponse data, response status code and response headers



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
495
496
497
498
499
500
501
502
# File 'lib/crimson-falcon/api/container_packages.rb', line 459

def read_packages_count_by_zero_day_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerPackages.read_packages_count_by_zero_day ...'
  end
  # resource path
  local_var_path = '/container-security/aggregates/packages/count-by-zero-day/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  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] || 'CommonCountResponse'

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

  new_options = opts.merge(
    :operation => :"ContainerPackages.read_packages_count_by_zero_day",
    :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: ContainerPackages#read_packages_count_by_zero_day\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end