Class: DependencyTracker::MetricsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/dependency-tracker-client/api/metrics_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ MetricsApi

Returns a new instance of MetricsApi.



19
20
21
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_component_current_metrics(uuid, opts = {}) ⇒ ComponentMetrics

Returns current metrics for a specific component

Parameters:

  • uuid (String)

    The UUID of the component to retrieve metrics for

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

    the optional parameters

Returns:



26
27
28
29
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 26

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

#get_component_current_metrics_with_http_info(uuid, opts = {}) ⇒ Array<(ComponentMetrics, Integer, Hash)>

Returns current metrics for a specific component

Parameters:

  • uuid (String)

    The UUID of the component to retrieve metrics for

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

    the optional parameters

Returns:

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

    ComponentMetrics data, response status code and response headers



35
36
37
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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 35

def get_component_current_metrics_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_component_current_metrics ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling MetricsApi.get_component_current_metrics"
  end
  # resource path
  local_var_path = '/v1/metrics/component/{uuid}/current'.sub('{' + 'uuid' + '}', CGI.escape(uuid.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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'ComponentMetrics' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#get_component_metrics_since(uuid, date, opts = {}) ⇒ Array<ComponentMetrics>

Returns historical metrics for a specific component from a specific date Date format must be YYYYMMDD

Parameters:

  • uuid (String)

    The UUID of the component to retrieve metrics for

  • date (String)

    The start date to retrieve metrics for

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

    the optional parameters

Returns:



88
89
90
91
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 88

def get_component_metrics_since(uuid, date, opts = {})
  data, _status_code, _headers = get_component_metrics_since_with_http_info(uuid, date, opts)
  data
end

#get_component_metrics_since_with_http_info(uuid, date, opts = {}) ⇒ Array<(Array<ComponentMetrics>, Integer, Hash)>

Returns historical metrics for a specific component from a specific date Date format must be YYYYMMDD

Parameters:

  • uuid (String)

    The UUID of the component to retrieve metrics for

  • date (String)

    The start date to retrieve metrics for

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

    the optional parameters

Returns:

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

    Array<ComponentMetrics> data, response status code and response headers



99
100
101
102
103
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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 99

def get_component_metrics_since_with_http_info(uuid, date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_component_metrics_since ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling MetricsApi.get_component_metrics_since"
  end
  # verify the required parameter 'date' is set
  if @api_client.config.client_side_validation && date.nil?
    fail ArgumentError, "Missing the required parameter 'date' when calling MetricsApi.get_component_metrics_since"
  end
  # resource path
  local_var_path = '/v1/metrics/component/{uuid}/since/{date}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)).sub('{' + 'date' + '}', CGI.escape(date.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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Array<ComponentMetrics>' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#get_component_metrics_x_days(uuid, days, opts = {}) ⇒ Array<ComponentMetrics>

Returns X days of historical metrics for a specific component

Parameters:

  • uuid (String)

    The UUID of the component to retrieve metrics for

  • days (Integer)

    The number of days back to retrieve metrics for

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

    the optional parameters

Returns:



155
156
157
158
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 155

def get_component_metrics_x_days(uuid, days, opts = {})
  data, _status_code, _headers = get_component_metrics_x_days_with_http_info(uuid, days, opts)
  data
end

#get_component_metrics_x_days_with_http_info(uuid, days, opts = {}) ⇒ Array<(Array<ComponentMetrics>, Integer, Hash)>

Returns X days of historical metrics for a specific component

Parameters:

  • uuid (String)

    The UUID of the component to retrieve metrics for

  • days (Integer)

    The number of days back to retrieve metrics for

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

    the optional parameters

Returns:

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

    Array<ComponentMetrics> data, response status code and response headers



165
166
167
168
169
170
171
172
173
174
175
176
177
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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 165

def get_component_metrics_x_days_with_http_info(uuid, days, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_component_metrics_x_days ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling MetricsApi.get_component_metrics_x_days"
  end
  # verify the required parameter 'days' is set
  if @api_client.config.client_side_validation && days.nil?
    fail ArgumentError, "Missing the required parameter 'days' when calling MetricsApi.get_component_metrics_x_days"
  end
  # resource path
  local_var_path = '/v1/metrics/component/{uuid}/days/{days}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)).sub('{' + 'days' + '}', CGI.escape(days.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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Array<ComponentMetrics>' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#get_dependency_current_metrics(project_uuid, component_uuid, opts = {}) ⇒ DependencyMetrics

Returns current metrics for a specific dependency

Parameters:

  • project_uuid (String)

    The UUID of the project to retrieve metrics for

  • component_uuid (String)

    The UUID of the component to retrieve metrics for

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

    the optional parameters

Returns:



221
222
223
224
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 221

def get_dependency_current_metrics(project_uuid, component_uuid, opts = {})
  data, _status_code, _headers = get_dependency_current_metrics_with_http_info(project_uuid, component_uuid, opts)
  data
end

#get_dependency_current_metrics_with_http_info(project_uuid, component_uuid, opts = {}) ⇒ Array<(DependencyMetrics, Integer, Hash)>

Returns current metrics for a specific dependency

Parameters:

  • project_uuid (String)

    The UUID of the project to retrieve metrics for

  • component_uuid (String)

    The UUID of the component to retrieve metrics for

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

    the optional parameters

Returns:

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

    DependencyMetrics data, response status code and response headers



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 231

def get_dependency_current_metrics_with_http_info(project_uuid, component_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_dependency_current_metrics ...'
  end
  # verify the required parameter 'project_uuid' is set
  if @api_client.config.client_side_validation && project_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'project_uuid' when calling MetricsApi.get_dependency_current_metrics"
  end
  # verify the required parameter 'component_uuid' is set
  if @api_client.config.client_side_validation && component_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'component_uuid' when calling MetricsApi.get_dependency_current_metrics"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{projectUuid}/component/{componentUuid}/current'.sub('{' + 'projectUuid' + '}', CGI.escape(project_uuid.to_s)).sub('{' + 'componentUuid' + '}', CGI.escape(component_uuid.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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'DependencyMetrics' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#get_dependency_metrics_since(project_uuid, component_uuid, date, opts = {}) ⇒ Array<DependencyMetrics>

Returns historical metrics for a specific dependency from a specific date Date format must be YYYYMMDD

Parameters:

  • project_uuid (String)

    The UUID of the project to retrieve metrics for

  • component_uuid (String)

    The UUID of the component to retrieve metrics for

  • date (String)

    The start date to retrieve metrics for

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

    the optional parameters

Returns:



289
290
291
292
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 289

def get_dependency_metrics_since(project_uuid, component_uuid, date, opts = {})
  data, _status_code, _headers = get_dependency_metrics_since_with_http_info(project_uuid, component_uuid, date, opts)
  data
end

#get_dependency_metrics_since_with_http_info(project_uuid, component_uuid, date, opts = {}) ⇒ Array<(Array<DependencyMetrics>, Integer, Hash)>

Returns historical metrics for a specific dependency from a specific date Date format must be YYYYMMDD

Parameters:

  • project_uuid (String)

    The UUID of the project to retrieve metrics for

  • component_uuid (String)

    The UUID of the component to retrieve metrics for

  • date (String)

    The start date to retrieve metrics for

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

    the optional parameters

Returns:

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

    Array<DependencyMetrics> data, response status code and response headers



301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 301

def get_dependency_metrics_since_with_http_info(project_uuid, component_uuid, date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_dependency_metrics_since ...'
  end
  # verify the required parameter 'project_uuid' is set
  if @api_client.config.client_side_validation && project_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'project_uuid' when calling MetricsApi.get_dependency_metrics_since"
  end
  # verify the required parameter 'component_uuid' is set
  if @api_client.config.client_side_validation && component_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'component_uuid' when calling MetricsApi.get_dependency_metrics_since"
  end
  # verify the required parameter 'date' is set
  if @api_client.config.client_side_validation && date.nil?
    fail ArgumentError, "Missing the required parameter 'date' when calling MetricsApi.get_dependency_metrics_since"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{projectUuid}/component/{componentUuid}/since/{date}'.sub('{' + 'projectUuid' + '}', CGI.escape(project_uuid.to_s)).sub('{' + 'componentUuid' + '}', CGI.escape(component_uuid.to_s)).sub('{' + 'date' + '}', CGI.escape(date.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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Array<DependencyMetrics>' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#get_dependency_metrics_x_days(project_uuid, component_uuid, days, opts = {}) ⇒ Array<DependencyMetrics>

Returns X days of historical metrics for a specific dependency

Parameters:

  • project_uuid (String)

    The UUID of the project to retrieve metrics for

  • component_uuid (String)

    The UUID of the component to retrieve metrics for

  • days (Integer)

    The number of days back to retrieve metrics for

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

    the optional parameters

Returns:



362
363
364
365
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 362

def get_dependency_metrics_x_days(project_uuid, component_uuid, days, opts = {})
  data, _status_code, _headers = get_dependency_metrics_x_days_with_http_info(project_uuid, component_uuid, days, opts)
  data
end

#get_dependency_metrics_x_days_with_http_info(project_uuid, component_uuid, days, opts = {}) ⇒ Array<(Array<DependencyMetrics>, Integer, Hash)>

Returns X days of historical metrics for a specific dependency

Parameters:

  • project_uuid (String)

    The UUID of the project to retrieve metrics for

  • component_uuid (String)

    The UUID of the component to retrieve metrics for

  • days (Integer)

    The number of days back to retrieve metrics for

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

    the optional parameters

Returns:

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

    Array<DependencyMetrics> data, response status code and response headers



373
374
375
376
377
378
379
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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 373

def get_dependency_metrics_x_days_with_http_info(project_uuid, component_uuid, days, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_dependency_metrics_x_days ...'
  end
  # verify the required parameter 'project_uuid' is set
  if @api_client.config.client_side_validation && project_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'project_uuid' when calling MetricsApi.get_dependency_metrics_x_days"
  end
  # verify the required parameter 'component_uuid' is set
  if @api_client.config.client_side_validation && component_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'component_uuid' when calling MetricsApi.get_dependency_metrics_x_days"
  end
  # verify the required parameter 'days' is set
  if @api_client.config.client_side_validation && days.nil?
    fail ArgumentError, "Missing the required parameter 'days' when calling MetricsApi.get_dependency_metrics_x_days"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{projectUuid}/component/{componentUuid}/days/{days}'.sub('{' + 'projectUuid' + '}', CGI.escape(project_uuid.to_s)).sub('{' + 'componentUuid' + '}', CGI.escape(component_uuid.to_s)).sub('{' + 'days' + '}', CGI.escape(days.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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Array<DependencyMetrics>' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#get_portfolio_current_metrics(opts = {}) ⇒ PortfolioMetrics

Returns current metrics for the entire portfolio

Parameters:

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

    the optional parameters

Returns:



431
432
433
434
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 431

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

#get_portfolio_current_metrics_with_http_info(opts = {}) ⇒ Array<(PortfolioMetrics, Integer, Hash)>

Returns current metrics for the entire portfolio

Parameters:

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

    the optional parameters

Returns:

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

    PortfolioMetrics data, response status code and response headers



439
440
441
442
443
444
445
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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 439

def get_portfolio_current_metrics_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_portfolio_current_metrics ...'
  end
  # resource path
  local_var_path = '/v1/metrics/portfolio/current'

  # 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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'PortfolioMetrics' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#get_portfolio_metrics_since(date, opts = {}) ⇒ Array<PortfolioMetrics>

Returns historical metrics for the entire portfolio from a specific date Date format must be YYYYMMDD

Parameters:

  • date (String)

    The start date to retrieve metrics for

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

    the optional parameters

Returns:



487
488
489
490
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 487

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

#get_portfolio_metrics_since_with_http_info(date, opts = {}) ⇒ Array<(Array<PortfolioMetrics>, Integer, Hash)>

Returns historical metrics for the entire portfolio from a specific date Date format must be YYYYMMDD

Parameters:

  • date (String)

    The start date to retrieve metrics for

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

    the optional parameters

Returns:

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

    Array<PortfolioMetrics> data, response status code and response headers



497
498
499
500
501
502
503
504
505
506
507
508
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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 497

def get_portfolio_metrics_since_with_http_info(date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_portfolio_metrics_since ...'
  end
  # verify the required parameter 'date' is set
  if @api_client.config.client_side_validation && date.nil?
    fail ArgumentError, "Missing the required parameter 'date' when calling MetricsApi.get_portfolio_metrics_since"
  end
  # resource path
  local_var_path = '/v1/metrics/portfolio/since/{date}'.sub('{' + 'date' + '}', CGI.escape(date.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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Array<PortfolioMetrics>' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#get_portfolio_metrics_x_days(days, opts = {}) ⇒ Array<PortfolioMetrics>

Returns X days of historical metrics for the entire portfolio

Parameters:

  • days (Integer)

    The number of days back to retrieve metrics for

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

    the optional parameters

Returns:



548
549
550
551
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 548

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

#get_portfolio_metrics_x_days_with_http_info(days, opts = {}) ⇒ Array<(Array<PortfolioMetrics>, Integer, Hash)>

Returns X days of historical metrics for the entire portfolio

Parameters:

  • days (Integer)

    The number of days back to retrieve metrics for

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

    the optional parameters

Returns:

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

    Array<PortfolioMetrics> data, response status code and response headers



557
558
559
560
561
562
563
564
565
566
567
568
569
570
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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 557

def get_portfolio_metrics_x_days_with_http_info(days, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_portfolio_metrics_x_days ...'
  end
  # verify the required parameter 'days' is set
  if @api_client.config.client_side_validation && days.nil?
    fail ArgumentError, "Missing the required parameter 'days' when calling MetricsApi.get_portfolio_metrics_x_days"
  end
  # resource path
  local_var_path = '/v1/metrics/portfolio/{days}/days'.sub('{' + 'days' + '}', CGI.escape(days.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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Array<PortfolioMetrics>' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#get_project_current_metrics(uuid, opts = {}) ⇒ ProjectMetrics

Returns current metrics for a specific project

Parameters:

  • uuid (String)

    The UUID of the project to retrieve metrics for

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

    the optional parameters

Returns:



608
609
610
611
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 608

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

#get_project_current_metrics_with_http_info(uuid, opts = {}) ⇒ Array<(ProjectMetrics, Integer, Hash)>

Returns current metrics for a specific project

Parameters:

  • uuid (String)

    The UUID of the project to retrieve metrics for

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

    the optional parameters

Returns:

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

    ProjectMetrics data, response status code and response headers



617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 617

def get_project_current_metrics_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_project_current_metrics ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling MetricsApi.get_project_current_metrics"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{uuid}/current'.sub('{' + 'uuid' + '}', CGI.escape(uuid.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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'ProjectMetrics' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#get_project_metrics_since(uuid, date, opts = {}) ⇒ Array<ProjectMetrics>

Returns historical metrics for a specific project from a specific date Date format must be YYYYMMDD

Parameters:

  • uuid (String)

    The UUID of the project to retrieve metrics for

  • date (String)

    The start date to retrieve metrics for

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

    the optional parameters

Returns:



670
671
672
673
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 670

def get_project_metrics_since(uuid, date, opts = {})
  data, _status_code, _headers = get_project_metrics_since_with_http_info(uuid, date, opts)
  data
end

#get_project_metrics_since_with_http_info(uuid, date, opts = {}) ⇒ Array<(Array<ProjectMetrics>, Integer, Hash)>

Returns historical metrics for a specific project from a specific date Date format must be YYYYMMDD

Parameters:

  • uuid (String)

    The UUID of the project to retrieve metrics for

  • date (String)

    The start date to retrieve metrics for

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

    the optional parameters

Returns:

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

    Array<ProjectMetrics> data, response status code and response headers



681
682
683
684
685
686
687
688
689
690
691
692
693
694
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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 681

def get_project_metrics_since_with_http_info(uuid, date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_project_metrics_since ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling MetricsApi.get_project_metrics_since"
  end
  # verify the required parameter 'date' is set
  if @api_client.config.client_side_validation && date.nil?
    fail ArgumentError, "Missing the required parameter 'date' when calling MetricsApi.get_project_metrics_since"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{uuid}/since/{date}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)).sub('{' + 'date' + '}', CGI.escape(date.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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Array<ProjectMetrics>' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#get_project_metrics_x_days(uuid, days, opts = {}) ⇒ Array<ProjectMetrics>

Returns X days of historical metrics for a specific project

Parameters:

  • uuid (String)

    The UUID of the project to retrieve metrics for

  • days (Integer)

    The number of days back to retrieve metrics for

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

    the optional parameters

Returns:



737
738
739
740
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 737

def get_project_metrics_x_days(uuid, days, opts = {})
  data, _status_code, _headers = get_project_metrics_x_days_with_http_info(uuid, days, opts)
  data
end

#get_project_metrics_x_days_with_http_info(uuid, days, opts = {}) ⇒ Array<(Array<ProjectMetrics>, Integer, Hash)>

Returns X days of historical metrics for a specific project

Parameters:

  • uuid (String)

    The UUID of the project to retrieve metrics for

  • days (Integer)

    The number of days back to retrieve metrics for

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

    the optional parameters

Returns:

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

    Array<ProjectMetrics> data, response status code and response headers



747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 747

def get_project_metrics_x_days_with_http_info(uuid, days, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_project_metrics_x_days ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling MetricsApi.get_project_metrics_x_days"
  end
  # verify the required parameter 'days' is set
  if @api_client.config.client_side_validation && days.nil?
    fail ArgumentError, "Missing the required parameter 'days' when calling MetricsApi.get_project_metrics_x_days"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{uuid}/days/{days}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)).sub('{' + 'days' + '}', CGI.escape(days.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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Array<ProjectMetrics>' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#get_vulnerability_metrics(opts = {}) ⇒ Array<VulnerabilityMetrics>

Returns the sum of all vulnerabilities in the database by year and month

Parameters:

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

    the optional parameters

Returns:



801
802
803
804
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 801

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

#get_vulnerability_metrics_with_http_info(opts = {}) ⇒ Array<(Array<VulnerabilityMetrics>, Integer, Hash)>

Returns the sum of all vulnerabilities in the database by year and month

Parameters:

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

    the optional parameters

Returns:

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

    Array<VulnerabilityMetrics> data, response status code and response headers



809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 809

def get_vulnerability_metrics_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_vulnerability_metrics ...'
  end
  # resource path
  local_var_path = '/v1/metrics/vulnerability'

  # 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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Array<VulnerabilityMetrics>' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#refresh_component_metrics(uuid, opts = {}) ⇒ nil

Requests a refresh of a specific components metrics

Parameters:

  • uuid (String)

    The UUID of the component to refresh metrics on

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

    the optional parameters

Returns:

  • (nil)


856
857
858
859
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 856

def refresh_component_metrics(uuid, opts = {})
  refresh_component_metrics_with_http_info(uuid, opts)
  nil
end

#refresh_component_metrics_with_http_info(uuid, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Requests a refresh of a specific components metrics

Parameters:

  • uuid (String)

    The UUID of the component to refresh metrics on

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 865

def refresh_component_metrics_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.refresh_component_metrics ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling MetricsApi.refresh_component_metrics"
  end
  # resource path
  local_var_path = '/v1/metrics/component/{uuid}/refresh'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}

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

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

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#refresh_dependency_metrics(project_uuid, component_uuid, opts = {}) ⇒ nil

Requests a refresh of a specific dependency metrics

Parameters:

  • project_uuid (String)

    The UUID of the project to retrieve metrics for

  • component_uuid (String)

    The UUID of the component to retrieve metrics for

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

    the optional parameters

Returns:

  • (nil)


915
916
917
918
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 915

def refresh_dependency_metrics(project_uuid, component_uuid, opts = {})
  refresh_dependency_metrics_with_http_info(project_uuid, component_uuid, opts)
  nil
end

#refresh_dependency_metrics_with_http_info(project_uuid, component_uuid, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Requests a refresh of a specific dependency metrics

Parameters:

  • project_uuid (String)

    The UUID of the project to retrieve metrics for

  • component_uuid (String)

    The UUID of the component to retrieve metrics for

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 925

def refresh_dependency_metrics_with_http_info(project_uuid, component_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.refresh_dependency_metrics ...'
  end
  # verify the required parameter 'project_uuid' is set
  if @api_client.config.client_side_validation && project_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'project_uuid' when calling MetricsApi.refresh_dependency_metrics"
  end
  # verify the required parameter 'component_uuid' is set
  if @api_client.config.client_side_validation && component_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'component_uuid' when calling MetricsApi.refresh_dependency_metrics"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{projectUuid}/component/{componentUuid}/refresh'.sub('{' + 'projectUuid' + '}', CGI.escape(project_uuid.to_s)).sub('{' + 'componentUuid' + '}', CGI.escape(component_uuid.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}

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

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

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#refresh_portfolio_metrics(opts = {}) ⇒ PortfolioMetrics

Requests a refresh of the portfolio metrics

Parameters:

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

    the optional parameters

Returns:



977
978
979
980
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 977

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

#refresh_portfolio_metrics_with_http_info(opts = {}) ⇒ Array<(PortfolioMetrics, Integer, Hash)>

Requests a refresh of the portfolio metrics

Parameters:

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

    the optional parameters

Returns:

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

    PortfolioMetrics data, response status code and response headers



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/dependency-tracker-client/api/metrics_api.rb', line 985

def refresh_portfolio_metrics_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.refresh_portfolio_metrics ...'
  end
  # resource path
  local_var_path = '/v1/metrics/portfolio/refresh'

  # 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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'PortfolioMetrics' 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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

#refresh_project_metrics(uuid, opts = {}) ⇒ nil

Requests a refresh of a specific projects metrics

Parameters:

  • uuid (String)

    The UUID of the project to refresh metrics on

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

    the optional parameters

Returns:

  • (nil)


1032
1033
1034
1035
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 1032

def refresh_project_metrics(uuid, opts = {})
  refresh_project_metrics_with_http_info(uuid, opts)
  nil
end

#refresh_project_metrics_with_http_info(uuid, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Requests a refresh of a specific projects metrics

Parameters:

  • uuid (String)

    The UUID of the project to refresh metrics on

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/dependency-tracker-client/api/metrics_api.rb', line 1041

def refresh_project_metrics_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.refresh_project_metrics ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling MetricsApi.refresh_project_metrics"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{uuid}/refresh'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}

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

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

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['X-Api-Key']

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