Class: Harbor1Client::ProductsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/harbor1_client/api/products_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProductsApi

Returns a new instance of ProductsApi.



19
20
21
# File 'lib/harbor1_client/api/products_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/harbor1_client/api/products_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#chartrepo_charts_post(chart, opts = {}) ⇒ nil

Upload a chart file to the defult ‘library’ project. Upload a chart file to the default ‘library’ project. Uploading together with the prov file at the same time is also supported.

Parameters:

  • chart

    The chart file

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

    the optional parameters

Options Hash (opts):

  • :prov (File)

    The provance file

Returns:

  • (nil)


28
29
30
31
# File 'lib/harbor1_client/api/products_api.rb', line 28

def chartrepo_charts_post(chart, opts = {})
  chartrepo_charts_post_with_http_info(chart, opts)
  nil
end

#chartrepo_charts_post_with_http_info(chart, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Upload a chart file to the defult &#39;library&#39; project. Upload a chart file to the default &#39;library&#39; project. Uploading together with the prov file at the same time is also supported.

Parameters:

  • chart

    The chart file

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

    the optional parameters

Options Hash (opts):

  • :prov (File)

    The provance file

Returns:

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

    nil, response status code and response headers



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
# File 'lib/harbor1_client/api/products_api.rb', line 39

def chartrepo_charts_post_with_http_info(chart, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.chartrepo_charts_post ...'
  end
  # verify the required parameter 'chart' is set
  if @api_client.config.client_side_validation && chart.nil?
    fail ArgumentError, "Missing the required parameter 'chart' when calling ProductsApi.chartrepo_charts_post"
  end
  # resource path
  local_var_path = '/chartrepo/charts'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['chart'] = chart
  form_params['prov'] = opts[:'prov'] if !opts[:'prov'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#chartrepo_charts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_health_get(opts = {}) ⇒ InlineResponse200

Check the health of chart repository service. Check the health of chart repository service.

Parameters:

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

    the optional parameters

Returns:



83
84
85
86
# File 'lib/harbor1_client/api/products_api.rb', line 83

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

#chartrepo_health_get_with_http_info(opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>

Check the health of chart repository service. Check the health of chart repository service.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(InlineResponse200, Fixnum, Hash)>)

    InlineResponse200 data, response status code and response headers



92
93
94
95
96
97
98
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
# File 'lib/harbor1_client/api/products_api.rb', line 92

def chartrepo_health_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.chartrepo_health_get ...'
  end
  # resource path
  local_var_path = '/chartrepo/health'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse200')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#chartrepo_health_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_get(repo, opts = {}) ⇒ Array<ChartInfoEntry>

Get all the charts under the specified project Get all the charts under the specified project

Parameters:

  • repo

    The project name

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

    the optional parameters

Returns:



132
133
134
135
# File 'lib/harbor1_client/api/products_api.rb', line 132

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

#chartrepo_repo_charts_get_with_http_info(repo, opts = {}) ⇒ Array<(Array<ChartInfoEntry>, Fixnum, Hash)>

Get all the charts under the specified project Get all the charts under the specified project

Parameters:

  • repo

    The project name

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

    the optional parameters

Returns:

  • (Array<(Array<ChartInfoEntry>, Fixnum, Hash)>)

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



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
171
172
173
174
175
176
177
178
179
180
# File 'lib/harbor1_client/api/products_api.rb', line 142

def chartrepo_repo_charts_get_with_http_info(repo, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.chartrepo_repo_charts_get ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ProductsApi.chartrepo_repo_charts_get"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts'.sub('{' + 'repo' + '}', repo.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ChartInfoEntry>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#chartrepo_repo_charts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_delete(repo, name, opts = {}) ⇒ nil

Delete all the versions of the specified chart Delete all the versions of the specified chart

Parameters:

  • repo

    The project name

  • name

    The chart name

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

    the optional parameters

Returns:

  • (nil)


187
188
189
190
# File 'lib/harbor1_client/api/products_api.rb', line 187

def chartrepo_repo_charts_name_delete(repo, name, opts = {})
  chartrepo_repo_charts_name_delete_with_http_info(repo, name, opts)
  nil
end

#chartrepo_repo_charts_name_delete_with_http_info(repo, name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete all the versions of the specified chart Delete all the versions of the specified chart

Parameters:

  • repo

    The project name

  • name

    The chart name

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
236
237
238
239
# File 'lib/harbor1_client/api/products_api.rb', line 198

def chartrepo_repo_charts_name_delete_with_http_info(repo, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.chartrepo_repo_charts_name_delete ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ProductsApi.chartrepo_repo_charts_name_delete"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling ProductsApi.chartrepo_repo_charts_name_delete"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#chartrepo_repo_charts_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_get(repo, name, opts = {}) ⇒ ChartVersions

Get all the versions of the specified chart Get all the versions of the specified chart

Parameters:

  • repo

    The project name

  • name

    The chart name

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

    the optional parameters

Returns:



246
247
248
249
# File 'lib/harbor1_client/api/products_api.rb', line 246

def chartrepo_repo_charts_name_get(repo, name, opts = {})
  data, _status_code, _headers = chartrepo_repo_charts_name_get_with_http_info(repo, name, opts)
  data
end

#chartrepo_repo_charts_name_get_with_http_info(repo, name, opts = {}) ⇒ Array<(ChartVersions, Fixnum, Hash)>

Get all the versions of the specified chart Get all the versions of the specified chart

Parameters:

  • repo

    The project name

  • name

    The chart name

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

    the optional parameters

Returns:

  • (Array<(ChartVersions, Fixnum, Hash)>)

    ChartVersions 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
# File 'lib/harbor1_client/api/products_api.rb', line 257

def chartrepo_repo_charts_name_get_with_http_info(repo, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.chartrepo_repo_charts_name_get ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ProductsApi.chartrepo_repo_charts_name_get"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling ProductsApi.chartrepo_repo_charts_name_get"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChartVersions')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#chartrepo_repo_charts_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_version_delete(repo, name, version, opts = {}) ⇒ nil

Delete the specified chart version Delete the specified chart version

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

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

    the optional parameters

Returns:

  • (nil)


307
308
309
310
# File 'lib/harbor1_client/api/products_api.rb', line 307

def chartrepo_repo_charts_name_version_delete(repo, name, version, opts = {})
  chartrepo_repo_charts_name_version_delete_with_http_info(repo, name, version, opts)
  nil
end

#chartrepo_repo_charts_name_version_delete_with_http_info(repo, name, version, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete the specified chart version Delete the specified chart version

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/harbor1_client/api/products_api.rb', line 319

def chartrepo_repo_charts_name_version_delete_with_http_info(repo, name, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.chartrepo_repo_charts_name_version_delete ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ProductsApi.chartrepo_repo_charts_name_version_delete"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling ProductsApi.chartrepo_repo_charts_name_version_delete"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ProductsApi.chartrepo_repo_charts_name_version_delete"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}/{version}'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#chartrepo_repo_charts_name_version_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_version_get(repo, name, version, opts = {}) ⇒ ChartVersionDetails

Get the specified chart version Get the specified chart version

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

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

    the optional parameters

Returns:



372
373
374
375
# File 'lib/harbor1_client/api/products_api.rb', line 372

def chartrepo_repo_charts_name_version_get(repo, name, version, opts = {})
  data, _status_code, _headers = chartrepo_repo_charts_name_version_get_with_http_info(repo, name, version, opts)
  data
end

#chartrepo_repo_charts_name_version_get_with_http_info(repo, name, version, opts = {}) ⇒ Array<(ChartVersionDetails, Fixnum, Hash)>

Get the specified chart version Get the specified chart version

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

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

    the optional parameters

Returns:

  • (Array<(ChartVersionDetails, Fixnum, Hash)>)

    ChartVersionDetails 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
# File 'lib/harbor1_client/api/products_api.rb', line 384

def chartrepo_repo_charts_name_version_get_with_http_info(repo, name, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.chartrepo_repo_charts_name_version_get ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ProductsApi.chartrepo_repo_charts_name_version_get"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling ProductsApi.chartrepo_repo_charts_name_version_get"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ProductsApi.chartrepo_repo_charts_name_version_get"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}/{version}'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChartVersionDetails')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#chartrepo_repo_charts_name_version_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_version_labels_get(repo, name, version, opts = {}) ⇒ nil

Return the attahced labels of chart. Return the attahced labels of the specified chart version.

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

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

    the optional parameters

Returns:

  • (nil)


438
439
440
441
# File 'lib/harbor1_client/api/products_api.rb', line 438

def chartrepo_repo_charts_name_version_labels_get(repo, name, version, opts = {})
  chartrepo_repo_charts_name_version_labels_get_with_http_info(repo, name, version, opts)
  nil
end

#chartrepo_repo_charts_name_version_labels_get_with_http_info(repo, name, version, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Return the attahced labels of chart. Return the attahced labels of the specified chart version.

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
495
# File 'lib/harbor1_client/api/products_api.rb', line 450

def chartrepo_repo_charts_name_version_labels_get_with_http_info(repo, name, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.chartrepo_repo_charts_name_version_labels_get ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ProductsApi.chartrepo_repo_charts_name_version_labels_get"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling ProductsApi.chartrepo_repo_charts_name_version_labels_get"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ProductsApi.chartrepo_repo_charts_name_version_labels_get"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}/{version}/labels'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#chartrepo_repo_charts_name_version_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_version_labels_id_delete(repo, name, version, id, opts = {}) ⇒ nil

Remove label from chart. Remove label from the specified chart version.

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

  • id

    The label ID

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

    the optional parameters

Returns:

  • (nil)


504
505
506
507
# File 'lib/harbor1_client/api/products_api.rb', line 504

def chartrepo_repo_charts_name_version_labels_id_delete(repo, name, version, id, opts = {})
  chartrepo_repo_charts_name_version_labels_id_delete_with_http_info(repo, name, version, id, opts)
  nil
end

#chartrepo_repo_charts_name_version_labels_id_delete_with_http_info(repo, name, version, id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Remove label from chart. Remove label from the specified chart version.

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

  • id

    The label ID

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
557
558
559
560
561
562
563
564
565
566
# File 'lib/harbor1_client/api/products_api.rb', line 517

def chartrepo_repo_charts_name_version_labels_id_delete_with_http_info(repo, name, version, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.chartrepo_repo_charts_name_version_labels_id_delete ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ProductsApi.chartrepo_repo_charts_name_version_labels_id_delete"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling ProductsApi.chartrepo_repo_charts_name_version_labels_id_delete"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ProductsApi.chartrepo_repo_charts_name_version_labels_id_delete"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.chartrepo_repo_charts_name_version_labels_id_delete"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}/{version}/labels/{id}'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s).sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#chartrepo_repo_charts_name_version_labels_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_version_labels_post(repo, name, version, label, opts = {}) ⇒ nil

Mark label to chart. Mark label to the specified chart version.

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

  • label

    The label being marked to the chart version

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

    the optional parameters

Returns:

  • (nil)


575
576
577
578
# File 'lib/harbor1_client/api/products_api.rb', line 575

def chartrepo_repo_charts_name_version_labels_post(repo, name, version, label, opts = {})
  chartrepo_repo_charts_name_version_labels_post_with_http_info(repo, name, version, label, opts)
  nil
end

#chartrepo_repo_charts_name_version_labels_post_with_http_info(repo, name, version, label, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Mark label to chart. Mark label to the specified chart version.

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

  • label

    The label being marked to the chart version

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
# File 'lib/harbor1_client/api/products_api.rb', line 588

def chartrepo_repo_charts_name_version_labels_post_with_http_info(repo, name, version, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.chartrepo_repo_charts_name_version_labels_post ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ProductsApi.chartrepo_repo_charts_name_version_labels_post"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling ProductsApi.chartrepo_repo_charts_name_version_labels_post"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ProductsApi.chartrepo_repo_charts_name_version_labels_post"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling ProductsApi.chartrepo_repo_charts_name_version_labels_post"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}/{version}/labels'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(label)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#chartrepo_repo_charts_name_version_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_post(repo, chart, opts = {}) ⇒ nil

Upload a chart file to the specified project. Upload a chart file to the specified project. With this API, the corresponding provance file can be uploaded together with chart file at once.

Parameters:

  • repo

    The project name

  • chart

    The chart file

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

    the optional parameters

Options Hash (opts):

  • :prov (File)

    The provance file

Returns:

  • (nil)


645
646
647
648
# File 'lib/harbor1_client/api/products_api.rb', line 645

def chartrepo_repo_charts_post(repo, chart, opts = {})
  chartrepo_repo_charts_post_with_http_info(repo, chart, opts)
  nil
end

#chartrepo_repo_charts_post_with_http_info(repo, chart, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Upload a chart file to the specified project. Upload a chart file to the specified project. With this API, the corresponding provance file can be uploaded together with chart file at once.

Parameters:

  • repo

    The project name

  • chart

    The chart file

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

    the optional parameters

Options Hash (opts):

  • :prov (File)

    The provance file

Returns:

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

    nil, response status code and response headers



657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
# File 'lib/harbor1_client/api/products_api.rb', line 657

def chartrepo_repo_charts_post_with_http_info(repo, chart, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.chartrepo_repo_charts_post ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ProductsApi.chartrepo_repo_charts_post"
  end
  # verify the required parameter 'chart' is set
  if @api_client.config.client_side_validation && chart.nil?
    fail ArgumentError, "Missing the required parameter 'chart' when calling ProductsApi.chartrepo_repo_charts_post"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts'.sub('{' + 'repo' + '}', repo.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['chart'] = chart
  form_params['prov'] = opts[:'prov'] if !opts[:'prov'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#chartrepo_repo_charts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_prov_post(repo, prov, opts = {}) ⇒ nil

Upload a provance file to the specified project. Upload a provance file to the specified project. The provance file should be targeted for an existing chart file.

Parameters:

  • repo

    The project name

  • prov

    The provance file

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

    the optional parameters

Returns:

  • (nil)


707
708
709
710
# File 'lib/harbor1_client/api/products_api.rb', line 707

def chartrepo_repo_prov_post(repo, prov, opts = {})
  chartrepo_repo_prov_post_with_http_info(repo, prov, opts)
  nil
end

#chartrepo_repo_prov_post_with_http_info(repo, prov, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Upload a provance file to the specified project. Upload a provance file to the specified project. The provance file should be targeted for an existing chart file.

Parameters:

  • repo

    The project name

  • prov

    The provance file

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
# File 'lib/harbor1_client/api/products_api.rb', line 718

def chartrepo_repo_prov_post_with_http_info(repo, prov, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.chartrepo_repo_prov_post ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ProductsApi.chartrepo_repo_prov_post"
  end
  # verify the required parameter 'prov' is set
  if @api_client.config.client_side_validation && prov.nil?
    fail ArgumentError, "Missing the required parameter 'prov' when calling ProductsApi.chartrepo_repo_prov_post"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/prov'.sub('{' + 'repo' + '}', repo.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['prov'] = prov

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#chartrepo_repo_prov_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#configurations_get(opts = {}) ⇒ ConfigurationsResponse

Get system configurations. This endpoint is for retrieving system configurations that only provides for admin user.

Parameters:

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

    the optional parameters

Returns:



765
766
767
768
# File 'lib/harbor1_client/api/products_api.rb', line 765

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

#configurations_get_with_http_info(opts = {}) ⇒ Array<(ConfigurationsResponse, Fixnum, Hash)>

Get system configurations. This endpoint is for retrieving system configurations that only provides for admin user.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(ConfigurationsResponse, Fixnum, Hash)>)

    ConfigurationsResponse data, response status code and response headers



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
# File 'lib/harbor1_client/api/products_api.rb', line 774

def configurations_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.configurations_get ...'
  end
  # resource path
  local_var_path = '/configurations'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ConfigurationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#configurations_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#configurations_put(configurations, opts = {}) ⇒ nil

Modify system configurations. This endpoint is for modifying system configurations that only provides for admin user.

Parameters:

  • configurations

    The configuration map can contain a subset of the attributes of the schema, which are to be updated.

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

    the optional parameters

Returns:

  • (nil)


814
815
816
817
# File 'lib/harbor1_client/api/products_api.rb', line 814

def configurations_put(configurations, opts = {})
  configurations_put_with_http_info(configurations, opts)
  nil
end

#configurations_put_with_http_info(configurations, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Modify system configurations. This endpoint is for modifying system configurations that only provides for admin user.

Parameters:

  • configurations

    The configuration map can contain a subset of the attributes of the schema, which are to be updated.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
851
852
853
854
855
856
857
858
859
860
861
# File 'lib/harbor1_client/api/products_api.rb', line 824

def configurations_put_with_http_info(configurations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.configurations_put ...'
  end
  # verify the required parameter 'configurations' is set
  if @api_client.config.client_side_validation && configurations.nil?
    fail ArgumentError, "Missing the required parameter 'configurations' when calling ProductsApi.configurations_put"
  end
  # resource path
  local_var_path = '/configurations'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(configurations)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#configurations_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#email_ping_post(opts = {}) ⇒ nil

Test connection and authentication with email server. Test connection and authentication with email server.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :settings (EmailServerSetting)

    Email server settings, if some of the settings are not assigned, they will be read from system configuration.

Returns:

  • (nil)


867
868
869
870
# File 'lib/harbor1_client/api/products_api.rb', line 867

def email_ping_post(opts = {})
  email_ping_post_with_http_info(opts)
  nil
end

#email_ping_post_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Test connection and authentication with email server. Test connection and authentication with email server.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :settings (EmailServerSetting)

    Email server settings, if some of the settings are not assigned, they will be read from system configuration.

Returns:

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

    nil, response status code and response headers



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
909
910
# File 'lib/harbor1_client/api/products_api.rb', line 877

def email_ping_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.email_ping_post ...'
  end
  # resource path
  local_var_path = '/email/ping'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'settings'])
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#email_ping_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#health_get(opts = {}) ⇒ OverallHealthStatus

Health check API The endpoint returns the health stauts of the system.

Parameters:

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

    the optional parameters

Returns:



915
916
917
918
# File 'lib/harbor1_client/api/products_api.rb', line 915

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

#health_get_with_http_info(opts = {}) ⇒ Array<(OverallHealthStatus, Fixnum, Hash)>

Health check API The endpoint returns the health stauts of the system.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(OverallHealthStatus, Fixnum, Hash)>)

    OverallHealthStatus data, response status code and response headers



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
956
957
958
# File 'lib/harbor1_client/api/products_api.rb', line 924

def health_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.health_get ...'
  end
  # resource path
  local_var_path = '/health'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OverallHealthStatus')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#health_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#internal_switchquota_put(switcher, opts = {}) ⇒ nil

Enable or disable quota. This endpoint is for enable/disable quota. When quota is disabled, no resource require/release in image/chart push and delete.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


964
965
966
967
# File 'lib/harbor1_client/api/products_api.rb', line 964

def internal_switchquota_put(switcher, opts = {})
  internal_switchquota_put_with_http_info(switcher, opts)
  nil
end

#internal_switchquota_put_with_http_info(switcher, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Enable or disable quota. This endpoint is for enable/disable quota. When quota is disabled, no resource require/release in image/chart push and delete.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



974
975
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
# File 'lib/harbor1_client/api/products_api.rb', line 974

def internal_switchquota_put_with_http_info(switcher, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.internal_switchquota_put ...'
  end
  # verify the required parameter 'switcher' is set
  if @api_client.config.client_side_validation && switcher.nil?
    fail ArgumentError, "Missing the required parameter 'switcher' when calling ProductsApi.internal_switchquota_put"
  end
  # resource path
  local_var_path = '/internal/switchquota'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(switcher)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#internal_switchquota_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#internal_syncquota_post(opts = {}) ⇒ nil

Sync quota from registry/chart to DB. This endpoint is for syncing quota usage of registry/chart with database.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1016
1017
1018
1019
# File 'lib/harbor1_client/api/products_api.rb', line 1016

def internal_syncquota_post(opts = {})
  internal_syncquota_post_with_http_info(opts)
  nil
end

#internal_syncquota_post_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Sync quota from registry/chart to DB. This endpoint is for syncing quota usage of registry/chart with database.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
# File 'lib/harbor1_client/api/products_api.rb', line 1025

def internal_syncquota_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.internal_syncquota_post ...'
  end
  # resource path
  local_var_path = '/internal/syncquota'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#internal_syncquota_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#internal_syncregistry_post(opts = {}) ⇒ nil

Sync repositories from registry to DB. This endpoint is for syncing all repositories of registry with database.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1063
1064
1065
1066
# File 'lib/harbor1_client/api/products_api.rb', line 1063

def internal_syncregistry_post(opts = {})
  internal_syncregistry_post_with_http_info(opts)
  nil
end

#internal_syncregistry_post_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Sync repositories from registry to DB. This endpoint is for syncing all repositories of registry with database.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
# File 'lib/harbor1_client/api/products_api.rb', line 1072

def internal_syncregistry_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.internal_syncregistry_post ...'
  end
  # resource path
  local_var_path = '/internal/syncregistry'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#internal_syncregistry_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#labels_get(scope, opts = {}) ⇒ Array<Label>

List labels according to the query strings. This endpoint let user list labels by name, scope and project_id

Parameters:

  • scope

    The label scope. Valid values are g and p. g for global labels and p for project labels.

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    The label name.

  • :project_id (Integer)

    Relevant project ID, required when scope is p.

  • :page (Integer)

    The page nubmer.

  • :page_size (Integer)

    The size of per page.

Returns:



1115
1116
1117
1118
# File 'lib/harbor1_client/api/products_api.rb', line 1115

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

#labels_get_with_http_info(scope, opts = {}) ⇒ Array<(Array<Label>, Fixnum, Hash)>

List labels according to the query strings. This endpoint let user list labels by name, scope and project_id

Parameters:

  • scope

    The label scope. Valid values are g and p. g for global labels and p for project labels.

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    The label name.

  • :project_id (Integer)

    Relevant project ID, required when scope is p.

  • :page (Integer)

    The page nubmer.

  • :page_size (Integer)

    The size of per page.

Returns:

  • (Array<(Array<Label>, Fixnum, Hash)>)

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



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
# File 'lib/harbor1_client/api/products_api.rb', line 1129

def labels_get_with_http_info(scope, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.labels_get ...'
  end
  # verify the required parameter 'scope' is set
  if @api_client.config.client_side_validation && scope.nil?
    fail ArgumentError, "Missing the required parameter 'scope' when calling ProductsApi.labels_get"
  end
  # resource path
  local_var_path = '/labels'

  # query parameters
  query_params = {}
  query_params[:'scope'] = scope
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Label>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#labels_id_delete(id, opts = {}) ⇒ nil

Delete the label specified by ID. Delete the label specified by ID.

Parameters:

  • id

    Label ID

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

    the optional parameters

Returns:

  • (nil)


1178
1179
1180
1181
# File 'lib/harbor1_client/api/products_api.rb', line 1178

def labels_id_delete(id, opts = {})
  labels_id_delete_with_http_info(id, opts)
  nil
end

#labels_id_delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete the label specified by ID. Delete the label specified by ID.

Parameters:

  • id

    Label ID

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
# File 'lib/harbor1_client/api/products_api.rb', line 1188

def labels_id_delete_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.labels_id_delete ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.labels_id_delete"
  end
  # resource path
  local_var_path = '/labels/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#labels_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#labels_id_get(id, opts = {}) ⇒ Label

Get the label specified by ID. This endpoint let user get the label by specific ID.

Parameters:

  • id

    Label ID

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

    the optional parameters

Returns:



1231
1232
1233
1234
# File 'lib/harbor1_client/api/products_api.rb', line 1231

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

#labels_id_get_with_http_info(id, opts = {}) ⇒ Array<(Label, Fixnum, Hash)>

Get the label specified by ID. This endpoint let user get the label by specific ID.

Parameters:

  • id

    Label ID

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

    the optional parameters

Returns:

  • (Array<(Label, Fixnum, Hash)>)

    Label data, response status code and response headers



1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
# File 'lib/harbor1_client/api/products_api.rb', line 1241

def labels_id_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.labels_id_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.labels_id_get"
  end
  # resource path
  local_var_path = '/labels/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Label')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#labels_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#labels_id_put(id, label, opts = {}) ⇒ nil

Update the label properties. This endpoint let user update label properties.

Parameters:

  • id

    Label ID

  • label

    The updated label json object.

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

    the optional parameters

Returns:

  • (nil)


1286
1287
1288
1289
# File 'lib/harbor1_client/api/products_api.rb', line 1286

def labels_id_put(id, label, opts = {})
  labels_id_put_with_http_info(id, label, opts)
  nil
end

#labels_id_put_with_http_info(id, label, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update the label properties. This endpoint let user update label properties.

Parameters:

  • id

    Label ID

  • label

    The updated label json object.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
# File 'lib/harbor1_client/api/products_api.rb', line 1297

def labels_id_put_with_http_info(id, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.labels_id_put ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.labels_id_put"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling ProductsApi.labels_id_put"
  end
  # resource path
  local_var_path = '/labels/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(label)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#labels_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#labels_id_resources_get(id, opts = {}) ⇒ Resource

Get the resources that the label is referenced by. This endpoint let user get the resources that the label is referenced by. Only the replication policies are returned for now.

Parameters:

  • id

    Label ID

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

    the optional parameters

Returns:



1344
1345
1346
1347
# File 'lib/harbor1_client/api/products_api.rb', line 1344

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

#labels_id_resources_get_with_http_info(id, opts = {}) ⇒ Array<(Resource, Fixnum, Hash)>

Get the resources that the label is referenced by. This endpoint let user get the resources that the label is referenced by. Only the replication policies are returned for now.

Parameters:

  • id

    Label ID

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

    the optional parameters

Returns:

  • (Array<(Resource, Fixnum, Hash)>)

    Resource data, response status code and response headers



1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
# File 'lib/harbor1_client/api/products_api.rb', line 1354

def labels_id_resources_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.labels_id_resources_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.labels_id_resources_get"
  end
  # resource path
  local_var_path = '/labels/{id}/resources'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Resource')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#labels_id_resources_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#labels_post(label, opts = {}) ⇒ nil

Post creates a label This endpoint let user creates a label.

Parameters:

  • label

    The json object of label.

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

    the optional parameters

Returns:

  • (nil)


1398
1399
1400
1401
# File 'lib/harbor1_client/api/products_api.rb', line 1398

def labels_post(label, opts = {})
  labels_post_with_http_info(label, opts)
  nil
end

#labels_post_with_http_info(label, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Post creates a label This endpoint let user creates a label.

Parameters:

  • label

    The json object of label.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
# File 'lib/harbor1_client/api/products_api.rb', line 1408

def labels_post_with_http_info(label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.labels_post ...'
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling ProductsApi.labels_post"
  end
  # resource path
  local_var_path = '/labels'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(label)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#ldap_groups_search_get(opts = {}) ⇒ Array<UserGroup>

Search available ldap groups. This endpoint searches the available ldap groups based on related configuration parameters. support to search by groupname or groupdn.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :groupname (String)

    Ldap group name

  • :groupdn (String)

    The LDAP group DN

Returns:



1452
1453
1454
1455
# File 'lib/harbor1_client/api/products_api.rb', line 1452

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

#ldap_groups_search_get_with_http_info(opts = {}) ⇒ Array<(Array<UserGroup>, Fixnum, Hash)>

Search available ldap groups. This endpoint searches the available ldap groups based on related configuration parameters. support to search by groupname or groupdn.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :groupname (String)

    Ldap group name

  • :groupdn (String)

    The LDAP group DN

Returns:

  • (Array<(Array<UserGroup>, Fixnum, Hash)>)

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



1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
# File 'lib/harbor1_client/api/products_api.rb', line 1463

def ldap_groups_search_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.ldap_groups_search_get ...'
  end
  # resource path
  local_var_path = '/ldap/groups/search'

  # query parameters
  query_params = {}
  query_params[:'groupname'] = opts[:'groupname'] if !opts[:'groupname'].nil?
  query_params[:'groupdn'] = opts[:'groupdn'] if !opts[:'groupdn'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<UserGroup>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#ldap_groups_search_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#ldap_ping_post(opts = {}) ⇒ nil

Ping available ldap service. This endpoint ping the available ldap service for test related configuration parameters.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ldapconf (LdapConf)

    ldap configuration. support input ldap service configuration. If it&#39;s a empty request, will load current configuration from the system.

Returns:

  • (nil)


1505
1506
1507
1508
# File 'lib/harbor1_client/api/products_api.rb', line 1505

def ldap_ping_post(opts = {})
  ldap_ping_post_with_http_info(opts)
  nil
end

#ldap_ping_post_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Ping available ldap service. This endpoint ping the available ldap service for test related configuration parameters.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ldapconf (LdapConf)

    ldap configuration. support input ldap service configuration. If it&#39;s a empty request, will load current configuration from the system.

Returns:

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

    nil, response status code and response headers



1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
# File 'lib/harbor1_client/api/products_api.rb', line 1515

def ldap_ping_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.ldap_ping_post ...'
  end
  # resource path
  local_var_path = '/ldap/ping'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'ldapconf'])
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#ldap_ping_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#ldap_users_import_post(uid_list, opts = {}) ⇒ nil

Import selected available ldap users. This endpoint adds the selected available ldap users to harbor based on related configuration parameters from the system. System will try to guess the user email address and realname, add to harbor user information. If have errors when import user, will return the list of importing failed uid and the failed reason.

Parameters:

  • uid_list

    The uid listed for importing. This list will check users validity of ldap service based on configuration from the system.

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

    the optional parameters

Returns:

  • (nil)


1554
1555
1556
1557
# File 'lib/harbor1_client/api/products_api.rb', line 1554

def ldap_users_import_post(uid_list, opts = {})
  ldap_users_import_post_with_http_info(uid_list, opts)
  nil
end

#ldap_users_import_post_with_http_info(uid_list, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Import selected available ldap users. This endpoint adds the selected available ldap users to harbor based on related configuration parameters from the system. System will try to guess the user email address and realname, add to harbor user information. If have errors when import user, will return the list of importing failed uid and the failed reason.

Parameters:

  • uid_list

    The uid listed for importing. This list will check users validity of ldap service based on configuration from the system.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
# File 'lib/harbor1_client/api/products_api.rb', line 1564

def ldap_users_import_post_with_http_info(uid_list, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.ldap_users_import_post ...'
  end
  # verify the required parameter 'uid_list' is set
  if @api_client.config.client_side_validation && uid_list.nil?
    fail ArgumentError, "Missing the required parameter 'uid_list' when calling ProductsApi.ldap_users_import_post"
  end
  # resource path
  local_var_path = '/ldap/users/import'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(uid_list)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#ldap_users_import_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#ldap_users_search_get(opts = {}) ⇒ Array<LdapUsers>

Search available ldap users. This endpoint searches the available ldap users based on related configuration parameters. Support searched by input ladp configuration, load configuration from the system and specific filter.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :username (String)

    Registered user ID

Returns:



1607
1608
1609
1610
# File 'lib/harbor1_client/api/products_api.rb', line 1607

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

#ldap_users_search_get_with_http_info(opts = {}) ⇒ Array<(Array<LdapUsers>, Fixnum, Hash)>

Search available ldap users. This endpoint searches the available ldap users based on related configuration parameters. Support searched by input ladp configuration, load configuration from the system and specific filter.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :username (String)

    Registered user ID

Returns:

  • (Array<(Array<LdapUsers>, Fixnum, Hash)>)

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



1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
# File 'lib/harbor1_client/api/products_api.rb', line 1617

def ldap_users_search_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.ldap_users_search_get ...'
  end
  # resource path
  local_var_path = '/ldap/users/search'

  # query parameters
  query_params = {}
  query_params[:'username'] = opts[:'username'] if !opts[:'username'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<LdapUsers>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#ldap_users_search_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#logs_get(opts = {}) ⇒ Array<AccessLog>

Get recent logs of the projects which the user is a member of This endpoint let user see the recent operation logs of the projects which he is member of

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :username (String)

    Username of the operator.

  • :repository (String)

    The name of repository

  • :tag (String)

    The name of tag

  • :operation (String)

    The operation

  • :begin_timestamp (String)

    The begin timestamp

  • :end_timestamp (String)

    The end timestamp

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page, default is 10, maximum is 100.

Returns:



1665
1666
1667
1668
# File 'lib/harbor1_client/api/products_api.rb', line 1665

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

#logs_get_with_http_info(opts = {}) ⇒ Array<(Array<AccessLog>, Fixnum, Hash)>

Get recent logs of the projects which the user is a member of This endpoint let user see the recent operation logs of the projects which he is member of

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :username (String)

    Username of the operator.

  • :repository (String)

    The name of repository

  • :tag (String)

    The name of tag

  • :operation (String)

    The operation

  • :begin_timestamp (String)

    The begin timestamp

  • :end_timestamp (String)

    The end timestamp

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page, default is 10, maximum is 100.

Returns:

  • (Array<(Array<AccessLog>, Fixnum, Hash)>)

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



1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
# File 'lib/harbor1_client/api/products_api.rb', line 1682

def logs_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.logs_get ...'
  end
  # resource path
  local_var_path = '/logs'

  # query parameters
  query_params = {}
  query_params[:'username'] = opts[:'username'] if !opts[:'username'].nil?
  query_params[:'repository'] = opts[:'repository'] if !opts[:'repository'].nil?
  query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
  query_params[:'operation'] = opts[:'operation'] if !opts[:'operation'].nil?
  query_params[:'begin_timestamp'] = opts[:'begin_timestamp'] if !opts[:'begin_timestamp'].nil?
  query_params[:'end_timestamp'] = opts[:'end_timestamp'] if !opts[:'end_timestamp'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<AccessLog>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#logs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_get(opts = {}) ⇒ Array<Project>

List projects This endpoint returns all projects created by Harbor, and can be filtered by project name.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    The name of project.

  • :public (BOOLEAN)

    The project is public or private.

  • :owner (String)

    The name of project owner.

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page, default is 10, maximum is 100.

Returns:



1734
1735
1736
1737
# File 'lib/harbor1_client/api/products_api.rb', line 1734

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

#projects_get_with_http_info(opts = {}) ⇒ Array<(Array<Project>, Fixnum, Hash)>

List projects This endpoint returns all projects created by Harbor, and can be filtered by project name.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    The name of project.

  • :public (BOOLEAN)

    The project is public or private.

  • :owner (String)

    The name of project owner.

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page, default is 10, maximum is 100.

Returns:

  • (Array<(Array<Project>, Fixnum, Hash)>)

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



1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
# File 'lib/harbor1_client/api/products_api.rb', line 1748

def projects_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_get ...'
  end
  # resource path
  local_var_path = '/projects'

  # query parameters
  query_params = {}
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'public'] = opts[:'public'] if !opts[:'public'].nil?
  query_params[:'owner'] = opts[:'owner'] if !opts[:'owner'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Project>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_head(project_name, opts = {}) ⇒ nil

Check if the project name user provided already exists. This endpoint is used to check if the project name user provided already exist.

Parameters:

  • project_name

    Project name for checking exists.

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

    the optional parameters

Returns:

  • (nil)


1793
1794
1795
1796
# File 'lib/harbor1_client/api/products_api.rb', line 1793

def projects_head(project_name, opts = {})
  projects_head_with_http_info(project_name, opts)
  nil
end

#projects_head_with_http_info(project_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Check if the project name user provided already exists. This endpoint is used to check if the project name user provided already exist.

Parameters:

  • project_name

    Project name for checking exists.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
# File 'lib/harbor1_client/api/products_api.rb', line 1803

def projects_head_with_http_info(project_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_head ...'
  end
  # verify the required parameter 'project_name' is set
  if @api_client.config.client_side_validation && project_name.nil?
    fail ArgumentError, "Missing the required parameter 'project_name' when calling ProductsApi.projects_head"
  end
  # resource path
  local_var_path = '/projects'

  # query parameters
  query_params = {}
  query_params[:'project_name'] = project_name

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:HEAD, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_post(project, opts = {}) ⇒ nil

Create a new project. This endpoint is for user to create a new project.

Parameters:

  • project

    New created project.

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

    the optional parameters

Returns:

  • (nil)


1847
1848
1849
1850
# File 'lib/harbor1_client/api/products_api.rb', line 1847

def projects_post(project, opts = {})
  projects_post_with_http_info(project, opts)
  nil
end

#projects_post_with_http_info(project, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create a new project. This endpoint is for user to create a new project.

Parameters:

  • project

    New created project.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
# File 'lib/harbor1_client/api/products_api.rb', line 1857

def projects_post_with_http_info(project, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_post ...'
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling ProductsApi.projects_post"
  end
  # resource path
  local_var_path = '/projects'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(project)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_delete(project_id, opts = {}) ⇒ nil

Delete project by projectID This endpoint is aimed to delete project by project ID.

Parameters:

  • project_id

    Project ID of project which will be deleted.

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

    the optional parameters

Returns:

  • (nil)


1900
1901
1902
1903
# File 'lib/harbor1_client/api/products_api.rb', line 1900

def projects_project_id_delete(project_id, opts = {})
  projects_project_id_delete_with_http_info(project_id, opts)
  nil
end

#projects_project_id_delete_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete project by projectID This endpoint is aimed to delete project by project ID.

Parameters:

  • project_id

    Project ID of project which will be deleted.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
# File 'lib/harbor1_client/api/products_api.rb', line 1910

def projects_project_id_delete_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_delete ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_delete"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_get(project_id, opts = {}) ⇒ Project

Return specific project detail information This endpoint returns specific project information by project ID.

Parameters:

  • project_id

    Project ID for filtering results.

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

    the optional parameters

Returns:



1953
1954
1955
1956
# File 'lib/harbor1_client/api/products_api.rb', line 1953

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

#projects_project_id_get_with_http_info(project_id, opts = {}) ⇒ Array<(Project, Fixnum, Hash)>

Return specific project detail information This endpoint returns specific project information by project ID.

Parameters:

  • project_id

    Project ID for filtering results.

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

    the optional parameters

Returns:

  • (Array<(Project, Fixnum, Hash)>)

    Project data, response status code and response headers



1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
# File 'lib/harbor1_client/api/products_api.rb', line 1963

def projects_project_id_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Project')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_immutabletagrules_get(project_id, opts = {}) ⇒ Array<ImmutableTagRule>

List all immutable tag rules of current project This endpoint returns the immutable tag rules of a project

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Returns:



2007
2008
2009
2010
# File 'lib/harbor1_client/api/products_api.rb', line 2007

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

#projects_project_id_immutabletagrules_get_with_http_info(project_id, opts = {}) ⇒ Array<(Array<ImmutableTagRule>, Fixnum, Hash)>

List all immutable tag rules of current project This endpoint returns the immutable tag rules of a project

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Returns:

  • (Array<(Array<ImmutableTagRule>, Fixnum, Hash)>)

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



2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
# File 'lib/harbor1_client/api/products_api.rb', line 2017

def projects_project_id_immutabletagrules_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_immutabletagrules_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_immutabletagrules_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/immutabletagrules'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ImmutableTagRule>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_immutabletagrules_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_immutabletagrules_id_delete(project_id, id, opts = {}) ⇒ nil

Delete the immutable tag rule.

Parameters:

  • project_id

    Relevant project ID.

  • id

    Immutable tag rule ID.

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

    the optional parameters

Returns:

  • (nil)


2061
2062
2063
2064
# File 'lib/harbor1_client/api/products_api.rb', line 2061

def projects_project_id_immutabletagrules_id_delete(project_id, id, opts = {})
  projects_project_id_immutabletagrules_id_delete_with_http_info(project_id, id, opts)
  nil
end

#projects_project_id_immutabletagrules_id_delete_with_http_info(project_id, id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete the immutable tag rule.

Parameters:

  • project_id

    Relevant project ID.

  • id

    Immutable tag rule ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
# File 'lib/harbor1_client/api/products_api.rb', line 2071

def projects_project_id_immutabletagrules_id_delete_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_immutabletagrules_id_delete ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_immutabletagrules_id_delete"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.projects_project_id_immutabletagrules_id_delete"
  end
  # resource path
  local_var_path = '/projects/{project_id}/immutabletagrules/{id}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_immutabletagrules_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_immutabletagrules_id_put(project_id, id, opts = {}) ⇒ nil

Update the immutable tag rule or enable or disable the rule

Parameters:

  • project_id

    Relevant project ID.

  • id

    Immutable tag rule ID.

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

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


2119
2120
2121
2122
# File 'lib/harbor1_client/api/products_api.rb', line 2119

def projects_project_id_immutabletagrules_id_put(project_id, id, opts = {})
  projects_project_id_immutabletagrules_id_put_with_http_info(project_id, id, opts)
  nil
end

#projects_project_id_immutabletagrules_id_put_with_http_info(project_id, id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update the immutable tag rule or enable or disable the rule

Parameters:

  • project_id

    Relevant project ID.

  • id

    Immutable tag rule ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    nil, response status code and response headers



2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
# File 'lib/harbor1_client/api/products_api.rb', line 2130

def projects_project_id_immutabletagrules_id_put_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_immutabletagrules_id_put ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_immutabletagrules_id_put"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.projects_project_id_immutabletagrules_id_put"
  end
  # resource path
  local_var_path = '/projects/{project_id}/immutabletagrules/{id}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'immutabletagrule'])
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_immutabletagrules_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_immutabletagrules_post(project_id, opts = {}) ⇒ nil

Add an immutable tag rule to current project This endpoint add an immutable tag rule to the project

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


2178
2179
2180
2181
# File 'lib/harbor1_client/api/products_api.rb', line 2178

def projects_project_id_immutabletagrules_post(project_id, opts = {})
  projects_project_id_immutabletagrules_post_with_http_info(project_id, opts)
  nil
end

#projects_project_id_immutabletagrules_post_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Add an immutable tag rule to current project This endpoint add an immutable tag rule to the project

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    nil, response status code and response headers



2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
# File 'lib/harbor1_client/api/products_api.rb', line 2189

def projects_project_id_immutabletagrules_post_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_immutabletagrules_post ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_immutabletagrules_post"
  end
  # resource path
  local_var_path = '/projects/{project_id}/immutabletagrules'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'immutabletagrule'])
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_immutabletagrules_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_logs_get(project_id, opts = {}) ⇒ Array<AccessLog>

Get access logs accompany with a relevant project. This endpoint let user search access logs filtered by operations and date time ranges.

Parameters:

  • project_id

    Relevant project ID

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

    the optional parameters

Options Hash (opts):

  • :username (String)

    Username of the operator.

  • :repository (String)

    The name of repository

  • :tag (String)

    The name of tag

  • :operation (String)

    The operation

  • :begin_timestamp (String)

    The begin timestamp

  • :end_timestamp (String)

    The end timestamp

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page, default is 10, maximum is 100.

Returns:



2240
2241
2242
2243
# File 'lib/harbor1_client/api/products_api.rb', line 2240

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

#projects_project_id_logs_get_with_http_info(project_id, opts = {}) ⇒ Array<(Array<AccessLog>, Fixnum, Hash)>

Get access logs accompany with a relevant project. This endpoint let user search access logs filtered by operations and date time ranges.

Parameters:

  • project_id

    Relevant project ID

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

    the optional parameters

Options Hash (opts):

  • :username (String)

    Username of the operator.

  • :repository (String)

    The name of repository

  • :tag (String)

    The name of tag

  • :operation (String)

    The operation

  • :begin_timestamp (String)

    The begin timestamp

  • :end_timestamp (String)

    The end timestamp

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page, default is 10, maximum is 100.

Returns:

  • (Array<(Array<AccessLog>, Fixnum, Hash)>)

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



2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
# File 'lib/harbor1_client/api/products_api.rb', line 2258

def projects_project_id_logs_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_logs_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_logs_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/logs'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'username'] = opts[:'username'] if !opts[:'username'].nil?
  query_params[:'repository'] = opts[:'repository'] if !opts[:'repository'].nil?
  query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
  query_params[:'operation'] = opts[:'operation'] if !opts[:'operation'].nil?
  query_params[:'begin_timestamp'] = opts[:'begin_timestamp'] if !opts[:'begin_timestamp'].nil?
  query_params[:'end_timestamp'] = opts[:'end_timestamp'] if !opts[:'end_timestamp'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<AccessLog>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_logs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_members_get(project_id, opts = {}) ⇒ Array<ProjectMemberEntity>

Get all project member information Get all project member information

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Options Hash (opts):

  • :entityname (String)

    The entity name to search.

Returns:



2311
2312
2313
2314
# File 'lib/harbor1_client/api/products_api.rb', line 2311

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

#projects_project_id_members_get_with_http_info(project_id, opts = {}) ⇒ Array<(Array<ProjectMemberEntity>, Fixnum, Hash)>

Get all project member information Get all project member information

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Options Hash (opts):

  • :entityname (String)

    The entity name to search.

Returns:

  • (Array<(Array<ProjectMemberEntity>, Fixnum, Hash)>)

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



2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
# File 'lib/harbor1_client/api/products_api.rb', line 2322

def projects_project_id_members_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_members_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_members_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/members'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'entityname'] = opts[:'entityname'] if !opts[:'entityname'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ProjectMemberEntity>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_members_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_members_mid_delete(project_id, mid, opts = {}) ⇒ nil

Delete project member

Parameters:

  • project_id

    Relevant project ID.

  • mid

    Member ID.

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

    the optional parameters

Returns:

  • (nil)


2367
2368
2369
2370
# File 'lib/harbor1_client/api/products_api.rb', line 2367

def projects_project_id_members_mid_delete(project_id, mid, opts = {})
  projects_project_id_members_mid_delete_with_http_info(project_id, mid, opts)
  nil
end

#projects_project_id_members_mid_delete_with_http_info(project_id, mid, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete project member

Parameters:

  • project_id

    Relevant project ID.

  • mid

    Member ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
# File 'lib/harbor1_client/api/products_api.rb', line 2377

def projects_project_id_members_mid_delete_with_http_info(project_id, mid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_members_mid_delete ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_members_mid_delete"
  end
  # verify the required parameter 'mid' is set
  if @api_client.config.client_side_validation && mid.nil?
    fail ArgumentError, "Missing the required parameter 'mid' when calling ProductsApi.projects_project_id_members_mid_delete"
  end
  # resource path
  local_var_path = '/projects/{project_id}/members/{mid}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'mid' + '}', mid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_members_mid_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_members_mid_get(project_id, mid, opts = {}) ⇒ ProjectMemberEntity

Get the project member information Get the project member information

Parameters:

  • project_id

    Relevant project ID.

  • mid

    The member ID

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

    the optional parameters

Returns:



2425
2426
2427
2428
# File 'lib/harbor1_client/api/products_api.rb', line 2425

def projects_project_id_members_mid_get(project_id, mid, opts = {})
  data, _status_code, _headers = projects_project_id_members_mid_get_with_http_info(project_id, mid, opts)
  data
end

#projects_project_id_members_mid_get_with_http_info(project_id, mid, opts = {}) ⇒ Array<(ProjectMemberEntity, Fixnum, Hash)>

Get the project member information Get the project member information

Parameters:

  • project_id

    Relevant project ID.

  • mid

    The member ID

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

    the optional parameters

Returns:

  • (Array<(ProjectMemberEntity, Fixnum, Hash)>)

    ProjectMemberEntity data, response status code and response headers



2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
# File 'lib/harbor1_client/api/products_api.rb', line 2436

def projects_project_id_members_mid_get_with_http_info(project_id, mid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_members_mid_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_members_mid_get"
  end
  # verify the required parameter 'mid' is set
  if @api_client.config.client_side_validation && mid.nil?
    fail ArgumentError, "Missing the required parameter 'mid' when calling ProductsApi.projects_project_id_members_mid_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/members/{mid}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'mid' + '}', mid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectMemberEntity')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_members_mid_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_members_mid_put(project_id, mid, opts = {}) ⇒ nil

Update project member Update project member relationship

Parameters:

  • project_id

    Relevant project ID.

  • mid

    Member ID.

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

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


2486
2487
2488
2489
# File 'lib/harbor1_client/api/products_api.rb', line 2486

def projects_project_id_members_mid_put(project_id, mid, opts = {})
  projects_project_id_members_mid_put_with_http_info(project_id, mid, opts)
  nil
end

#projects_project_id_members_mid_put_with_http_info(project_id, mid, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update project member Update project member relationship

Parameters:

  • project_id

    Relevant project ID.

  • mid

    Member ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    nil, response status code and response headers



2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
# File 'lib/harbor1_client/api/products_api.rb', line 2498

def projects_project_id_members_mid_put_with_http_info(project_id, mid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_members_mid_put ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_members_mid_put"
  end
  # verify the required parameter 'mid' is set
  if @api_client.config.client_side_validation && mid.nil?
    fail ArgumentError, "Missing the required parameter 'mid' when calling ProductsApi.projects_project_id_members_mid_put"
  end
  # resource path
  local_var_path = '/projects/{project_id}/members/{mid}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'mid' + '}', mid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'role'])
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_members_mid_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_members_post(project_id, opts = {}) ⇒ nil

Create project member Create project member relationship, the member can be one of the user_member and group_member, The user_member need to specify user_id or username. If the user already exist in harbor DB, specify the user_id, If does not exist in harbor DB, it will SearchAndOnBoard the user. The group_member need to specify id or ldap_group_dn. If the group already exist in harbor DB. specify the user group’s id, If does not exist, it will SearchAndOnBoard the group.

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


2546
2547
2548
2549
# File 'lib/harbor1_client/api/products_api.rb', line 2546

def projects_project_id_members_post(project_id, opts = {})
  projects_project_id_members_post_with_http_info(project_id, opts)
  nil
end

#projects_project_id_members_post_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create project member Create project member relationship, the member can be one of the user_member and group_member, The user_member need to specify user_id or username. If the user already exist in harbor DB, specify the user_id, If does not exist in harbor DB, it will SearchAndOnBoard the user. The group_member need to specify id or ldap_group_dn. If the group already exist in harbor DB. specify the user group&#39;s id, If does not exist, it will SearchAndOnBoard the group.

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    nil, response status code and response headers



2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
# File 'lib/harbor1_client/api/products_api.rb', line 2557

def projects_project_id_members_post_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_members_post ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_members_post"
  end
  # resource path
  local_var_path = '/projects/{project_id}/members'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'project_member'])
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_members_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_metadatas_get(project_id, opts = {}) ⇒ ProjectMetadata

Get project metadata. This endpoint returns metadata of the project specified by project ID.

Parameters:

  • project_id

    The ID of project.

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

    the optional parameters

Returns:



2600
2601
2602
2603
# File 'lib/harbor1_client/api/products_api.rb', line 2600

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

#projects_project_id_metadatas_get_with_http_info(project_id, opts = {}) ⇒ Array<(ProjectMetadata, Fixnum, Hash)>

Get project metadata. This endpoint returns metadata of the project specified by project ID.

Parameters:

  • project_id

    The ID of project.

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

    the optional parameters

Returns:

  • (Array<(ProjectMetadata, Fixnum, Hash)>)

    ProjectMetadata data, response status code and response headers



2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
# File 'lib/harbor1_client/api/products_api.rb', line 2610

def projects_project_id_metadatas_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_metadatas_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_metadatas_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/metadatas'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_metadatas_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_metadatas_meta_name_delete(project_id, meta_name, opts = {}) ⇒ nil

Delete metadata of a project This endpoint is aimed to delete metadata of a project.

Parameters:

  • project_id

    The ID of project.

  • meta_name

    The name of metadat.

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

    the optional parameters

Returns:

  • (nil)


2655
2656
2657
2658
# File 'lib/harbor1_client/api/products_api.rb', line 2655

def projects_project_id_metadatas_meta_name_delete(project_id, meta_name, opts = {})
  projects_project_id_metadatas_meta_name_delete_with_http_info(project_id, meta_name, opts)
  nil
end

#projects_project_id_metadatas_meta_name_delete_with_http_info(project_id, meta_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete metadata of a project This endpoint is aimed to delete metadata of a project.

Parameters:

  • project_id

    The ID of project.

  • meta_name

    The name of metadat.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
# File 'lib/harbor1_client/api/products_api.rb', line 2666

def projects_project_id_metadatas_meta_name_delete_with_http_info(project_id, meta_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_metadatas_meta_name_delete ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_metadatas_meta_name_delete"
  end
  # verify the required parameter 'meta_name' is set
  if @api_client.config.client_side_validation && meta_name.nil?
    fail ArgumentError, "Missing the required parameter 'meta_name' when calling ProductsApi.projects_project_id_metadatas_meta_name_delete"
  end
  # resource path
  local_var_path = '/projects/{project_id}/metadatas/{meta_name}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'meta_name' + '}', meta_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_metadatas_meta_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_metadatas_meta_name_get(project_id, meta_name, opts = {}) ⇒ ProjectMetadata

Get project metadata This endpoint returns specified metadata of a project.

Parameters:

  • project_id

    Project ID for filtering results.

  • meta_name

    The name of metadat.

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

    the optional parameters

Returns:



2714
2715
2716
2717
# File 'lib/harbor1_client/api/products_api.rb', line 2714

def projects_project_id_metadatas_meta_name_get(project_id, meta_name, opts = {})
  data, _status_code, _headers = projects_project_id_metadatas_meta_name_get_with_http_info(project_id, meta_name, opts)
  data
end

#projects_project_id_metadatas_meta_name_get_with_http_info(project_id, meta_name, opts = {}) ⇒ Array<(ProjectMetadata, Fixnum, Hash)>

Get project metadata This endpoint returns specified metadata of a project.

Parameters:

  • project_id

    Project ID for filtering results.

  • meta_name

    The name of metadat.

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

    the optional parameters

Returns:

  • (Array<(ProjectMetadata, Fixnum, Hash)>)

    ProjectMetadata data, response status code and response headers



2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
# File 'lib/harbor1_client/api/products_api.rb', line 2725

def projects_project_id_metadatas_meta_name_get_with_http_info(project_id, meta_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_metadatas_meta_name_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_metadatas_meta_name_get"
  end
  # verify the required parameter 'meta_name' is set
  if @api_client.config.client_side_validation && meta_name.nil?
    fail ArgumentError, "Missing the required parameter 'meta_name' when calling ProductsApi.projects_project_id_metadatas_meta_name_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/metadatas/{meta_name}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'meta_name' + '}', meta_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_metadatas_meta_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_metadatas_meta_name_put(project_id, meta_name, opts = {}) ⇒ nil

Update metadata of a project. This endpoint is aimed to update the metadata of a project.

Parameters:

  • project_id

    The ID of project.

  • meta_name

    The name of metadat.

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

    the optional parameters

Returns:

  • (nil)


2774
2775
2776
2777
# File 'lib/harbor1_client/api/products_api.rb', line 2774

def projects_project_id_metadatas_meta_name_put(project_id, meta_name, opts = {})
  projects_project_id_metadatas_meta_name_put_with_http_info(project_id, meta_name, opts)
  nil
end

#projects_project_id_metadatas_meta_name_put_with_http_info(project_id, meta_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update metadata of a project. This endpoint is aimed to update the metadata of a project.

Parameters:

  • project_id

    The ID of project.

  • meta_name

    The name of metadat.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
# File 'lib/harbor1_client/api/products_api.rb', line 2785

def projects_project_id_metadatas_meta_name_put_with_http_info(project_id, meta_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_metadatas_meta_name_put ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_metadatas_meta_name_put"
  end
  # verify the required parameter 'meta_name' is set
  if @api_client.config.client_side_validation && meta_name.nil?
    fail ArgumentError, "Missing the required parameter 'meta_name' when calling ProductsApi.projects_project_id_metadatas_meta_name_put"
  end
  # resource path
  local_var_path = '/projects/{project_id}/metadatas/{meta_name}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'meta_name' + '}', meta_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_metadatas_meta_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_metadatas_post(project_id, metadata, opts = {}) ⇒ nil

Add metadata for the project. This endpoint is aimed to add metadata of a project.

Parameters:

  • project_id

    Selected project ID.

  • metadata

    The metadata of project.

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

    the optional parameters

Returns:

  • (nil)


2833
2834
2835
2836
# File 'lib/harbor1_client/api/products_api.rb', line 2833

def projects_project_id_metadatas_post(project_id, , opts = {})
  projects_project_id_metadatas_post_with_http_info(project_id, , opts)
  nil
end

#projects_project_id_metadatas_post_with_http_info(project_id, metadata, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Add metadata for the project. This endpoint is aimed to add metadata of a project.

Parameters:

  • project_id

    Selected project ID.

  • metadata

    The metadata of project.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
# File 'lib/harbor1_client/api/products_api.rb', line 2844

def projects_project_id_metadatas_post_with_http_info(project_id, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_metadatas_post ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_metadatas_post"
  end
  # verify the required parameter 'metadata' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'metadata' when calling ProductsApi.projects_project_id_metadatas_post"
  end
  # resource path
  local_var_path = '/projects/{project_id}/metadatas'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body()
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_metadatas_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_put(project_id, project, opts = {}) ⇒ nil

Update properties for a selected project. This endpoint is aimed to update the properties of a project.

Parameters:

  • project_id

    Selected project ID.

  • project

    Updates of project.

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

    the optional parameters

Returns:

  • (nil)


2892
2893
2894
2895
# File 'lib/harbor1_client/api/products_api.rb', line 2892

def projects_project_id_put(project_id, project, opts = {})
  projects_project_id_put_with_http_info(project_id, project, opts)
  nil
end

#projects_project_id_put_with_http_info(project_id, project, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update properties for a selected project. This endpoint is aimed to update the properties of a project.

Parameters:

  • project_id

    Selected project ID.

  • project

    Updates of project.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
# File 'lib/harbor1_client/api/products_api.rb', line 2903

def projects_project_id_put_with_http_info(project_id, project, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_put ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_put"
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling ProductsApi.projects_project_id_put"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(project)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_robots_get(project_id, opts = {}) ⇒ Array<RobotAccount>

Get all robot accounts of specified project Get all robot accounts of specified project

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Returns:



2950
2951
2952
2953
# File 'lib/harbor1_client/api/products_api.rb', line 2950

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

#projects_project_id_robots_get_with_http_info(project_id, opts = {}) ⇒ Array<(Array<RobotAccount>, Fixnum, Hash)>

Get all robot accounts of specified project Get all robot accounts of specified project

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Returns:

  • (Array<(Array<RobotAccount>, Fixnum, Hash)>)

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



2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
# File 'lib/harbor1_client/api/products_api.rb', line 2960

def projects_project_id_robots_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_robots_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_robots_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/robots'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<RobotAccount>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_robots_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_robots_post(project_id, robot, opts = {}) ⇒ RobotAccountPostRep

Create a robot account for project Create a robot account for project

Parameters:

  • project_id

    Relevant project ID.

  • robot

    Request body of creating a robot account.

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

    the optional parameters

Returns:



3005
3006
3007
3008
# File 'lib/harbor1_client/api/products_api.rb', line 3005

def projects_project_id_robots_post(project_id, robot, opts = {})
  data, _status_code, _headers = projects_project_id_robots_post_with_http_info(project_id, robot, opts)
  data
end

#projects_project_id_robots_post_with_http_info(project_id, robot, opts = {}) ⇒ Array<(RobotAccountPostRep, Fixnum, Hash)>

Create a robot account for project Create a robot account for project

Parameters:

  • project_id

    Relevant project ID.

  • robot

    Request body of creating a robot account.

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

    the optional parameters

Returns:

  • (Array<(RobotAccountPostRep, Fixnum, Hash)>)

    RobotAccountPostRep data, response status code and response headers



3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
# File 'lib/harbor1_client/api/products_api.rb', line 3016

def projects_project_id_robots_post_with_http_info(project_id, robot, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_robots_post ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_robots_post"
  end
  # verify the required parameter 'robot' is set
  if @api_client.config.client_side_validation && robot.nil?
    fail ArgumentError, "Missing the required parameter 'robot' when calling ProductsApi.projects_project_id_robots_post"
  end
  # resource path
  local_var_path = '/projects/{project_id}/robots'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(robot)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RobotAccountPostRep')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_robots_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_robots_robot_id_delete(project_id, robot_id, opts = {}) ⇒ nil

Delete the specified robot account Delete the specified robot account

Parameters:

  • project_id

    Relevant project ID.

  • robot_id

    The ID of robot account.

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

    the optional parameters

Returns:

  • (nil)


3065
3066
3067
3068
# File 'lib/harbor1_client/api/products_api.rb', line 3065

def projects_project_id_robots_robot_id_delete(project_id, robot_id, opts = {})
  projects_project_id_robots_robot_id_delete_with_http_info(project_id, robot_id, opts)
  nil
end

#projects_project_id_robots_robot_id_delete_with_http_info(project_id, robot_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete the specified robot account Delete the specified robot account

Parameters:

  • project_id

    Relevant project ID.

  • robot_id

    The ID of robot account.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
# File 'lib/harbor1_client/api/products_api.rb', line 3076

def projects_project_id_robots_robot_id_delete_with_http_info(project_id, robot_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_robots_robot_id_delete ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_robots_robot_id_delete"
  end
  # verify the required parameter 'robot_id' is set
  if @api_client.config.client_side_validation && robot_id.nil?
    fail ArgumentError, "Missing the required parameter 'robot_id' when calling ProductsApi.projects_project_id_robots_robot_id_delete"
  end
  # resource path
  local_var_path = '/projects/{project_id}/robots/{robot_id}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'robot_id' + '}', robot_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_robots_robot_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_robots_robot_id_get(project_id, robot_id, opts = {}) ⇒ RobotAccount

Return the infor of the specified robot account. Return the infor of the specified robot account.

Parameters:

  • project_id

    Relevant project ID.

  • robot_id

    The ID of robot account.

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

    the optional parameters

Returns:



3124
3125
3126
3127
# File 'lib/harbor1_client/api/products_api.rb', line 3124

def projects_project_id_robots_robot_id_get(project_id, robot_id, opts = {})
  data, _status_code, _headers = projects_project_id_robots_robot_id_get_with_http_info(project_id, robot_id, opts)
  data
end

#projects_project_id_robots_robot_id_get_with_http_info(project_id, robot_id, opts = {}) ⇒ Array<(RobotAccount, Fixnum, Hash)>

Return the infor of the specified robot account. Return the infor of the specified robot account.

Parameters:

  • project_id

    Relevant project ID.

  • robot_id

    The ID of robot account.

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

    the optional parameters

Returns:

  • (Array<(RobotAccount, Fixnum, Hash)>)

    RobotAccount data, response status code and response headers



3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
# File 'lib/harbor1_client/api/products_api.rb', line 3135

def projects_project_id_robots_robot_id_get_with_http_info(project_id, robot_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_robots_robot_id_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_robots_robot_id_get"
  end
  # verify the required parameter 'robot_id' is set
  if @api_client.config.client_side_validation && robot_id.nil?
    fail ArgumentError, "Missing the required parameter 'robot_id' when calling ProductsApi.projects_project_id_robots_robot_id_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/robots/{robot_id}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'robot_id' + '}', robot_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RobotAccount')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_robots_robot_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_robots_robot_id_put(project_id, robot_id, robot, opts = {}) ⇒ nil

Update status of robot account. Used to disable/enable a specified robot account.

Parameters:

  • project_id

    Relevant project ID.

  • robot_id

    The ID of robot account.

  • robot

    Request body of enable/disable a robot account.

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

    the optional parameters

Returns:

  • (nil)


3185
3186
3187
3188
# File 'lib/harbor1_client/api/products_api.rb', line 3185

def projects_project_id_robots_robot_id_put(project_id, robot_id, robot, opts = {})
  projects_project_id_robots_robot_id_put_with_http_info(project_id, robot_id, robot, opts)
  nil
end

#projects_project_id_robots_robot_id_put_with_http_info(project_id, robot_id, robot, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update status of robot account. Used to disable/enable a specified robot account.

Parameters:

  • project_id

    Relevant project ID.

  • robot_id

    The ID of robot account.

  • robot

    Request body of enable/disable a robot account.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
# File 'lib/harbor1_client/api/products_api.rb', line 3197

def projects_project_id_robots_robot_id_put_with_http_info(project_id, robot_id, robot, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_robots_robot_id_put ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_robots_robot_id_put"
  end
  # verify the required parameter 'robot_id' is set
  if @api_client.config.client_side_validation && robot_id.nil?
    fail ArgumentError, "Missing the required parameter 'robot_id' when calling ProductsApi.projects_project_id_robots_robot_id_put"
  end
  # verify the required parameter 'robot' is set
  if @api_client.config.client_side_validation && robot.nil?
    fail ArgumentError, "Missing the required parameter 'robot' when calling ProductsApi.projects_project_id_robots_robot_id_put"
  end
  # resource path
  local_var_path = '/projects/{project_id}/robots/{robot_id}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'robot_id' + '}', robot_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(robot)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_robots_robot_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_scanner_candidates_get(project_id, opts = {}) ⇒ Array<ScannerRegistration>

Get scanner registration candidates for configurating project level scanner Retrieve the system configured scanner registrations as candidates of setting project level scanner.

Parameters:

  • project_id

    The project identifier.

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

    the optional parameters

Returns:



3248
3249
3250
3251
# File 'lib/harbor1_client/api/products_api.rb', line 3248

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

#projects_project_id_scanner_candidates_get_with_http_info(project_id, opts = {}) ⇒ Array<(Array<ScannerRegistration>, Fixnum, Hash)>

Get scanner registration candidates for configurating project level scanner Retrieve the system configured scanner registrations as candidates of setting project level scanner.

Parameters:

  • project_id

    The project identifier.

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

    the optional parameters

Returns:

  • (Array<(Array<ScannerRegistration>, Fixnum, Hash)>)

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



3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
# File 'lib/harbor1_client/api/products_api.rb', line 3258

def projects_project_id_scanner_candidates_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_scanner_candidates_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_scanner_candidates_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/scanner/candidates'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ScannerRegistration>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_scanner_candidates_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_scanner_get(project_id, opts = {}) ⇒ ScannerRegistration

Get project level scanner Get the scanner registration of the specified project. If no scanner registration is configured for the specified project, the system default scanner registration will be returned.

Parameters:

  • project_id

    The project identifier.

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

    the optional parameters

Returns:



3302
3303
3304
3305
# File 'lib/harbor1_client/api/products_api.rb', line 3302

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

#projects_project_id_scanner_get_with_http_info(project_id, opts = {}) ⇒ Array<(ScannerRegistration, Fixnum, Hash)>

Get project level scanner Get the scanner registration of the specified project. If no scanner registration is configured for the specified project, the system default scanner registration will be returned.

Parameters:

  • project_id

    The project identifier.

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

    the optional parameters

Returns:

  • (Array<(ScannerRegistration, Fixnum, Hash)>)

    ScannerRegistration data, response status code and response headers



3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
# File 'lib/harbor1_client/api/products_api.rb', line 3312

def projects_project_id_scanner_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_scanner_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_scanner_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/scanner'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ScannerRegistration')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_scanner_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_summary_get(project_id, opts = {}) ⇒ ProjectSummary

Get summary of the project. Get summary of the project.

Parameters:

  • project_id

    Relevant project ID

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

    the optional parameters

Returns:



3356
3357
3358
3359
# File 'lib/harbor1_client/api/products_api.rb', line 3356

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

#projects_project_id_summary_get_with_http_info(project_id, opts = {}) ⇒ Array<(ProjectSummary, Fixnum, Hash)>

Get summary of the project. Get summary of the project.

Parameters:

  • project_id

    Relevant project ID

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

    the optional parameters

Returns:

  • (Array<(ProjectSummary, Fixnum, Hash)>)

    ProjectSummary data, response status code and response headers



3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
# File 'lib/harbor1_client/api/products_api.rb', line 3366

def projects_project_id_summary_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_summary_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_summary_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/summary'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectSummary')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_summary_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_webhook_jobs_get(project_id, policy_id, opts = {}) ⇒ Array<WebhookJob>

List project webhook jobs This endpoint returns webhook jobs of a project.

Parameters:

  • project_id

    Relevant project ID.

  • policy_id

    The policy ID.

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

    the optional parameters

Returns:



3411
3412
3413
3414
# File 'lib/harbor1_client/api/products_api.rb', line 3411

def projects_project_id_webhook_jobs_get(project_id, policy_id, opts = {})
  data, _status_code, _headers = projects_project_id_webhook_jobs_get_with_http_info(project_id, policy_id, opts)
  data
end

#projects_project_id_webhook_jobs_get_with_http_info(project_id, policy_id, opts = {}) ⇒ Array<(Array<WebhookJob>, Fixnum, Hash)>

List project webhook jobs This endpoint returns webhook jobs of a project.

Parameters:

  • project_id

    Relevant project ID.

  • policy_id

    The policy ID.

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

    the optional parameters

Returns:

  • (Array<(Array<WebhookJob>, Fixnum, Hash)>)

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



3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
# File 'lib/harbor1_client/api/products_api.rb', line 3422

def projects_project_id_webhook_jobs_get_with_http_info(project_id, policy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_webhook_jobs_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_webhook_jobs_get"
  end
  # verify the required parameter 'policy_id' is set
  if @api_client.config.client_side_validation && policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'policy_id' when calling ProductsApi.projects_project_id_webhook_jobs_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/webhook/jobs'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'policy_id'] = policy_id

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<WebhookJob>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_webhook_jobs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_webhook_lasttrigger_get(project_id, opts = {}) ⇒ Array<WebhookLastTrigger>

Get project webhook policy last trigger info This endpoint returns last trigger information of project webhook policy.

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Returns:



3471
3472
3473
3474
# File 'lib/harbor1_client/api/products_api.rb', line 3471

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

#projects_project_id_webhook_lasttrigger_get_with_http_info(project_id, opts = {}) ⇒ Array<(Array<WebhookLastTrigger>, Fixnum, Hash)>

Get project webhook policy last trigger info This endpoint returns last trigger information of project webhook policy.

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Returns:

  • (Array<(Array<WebhookLastTrigger>, Fixnum, Hash)>)

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



3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
# File 'lib/harbor1_client/api/products_api.rb', line 3481

def projects_project_id_webhook_lasttrigger_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_webhook_lasttrigger_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_webhook_lasttrigger_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/webhook/lasttrigger'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<WebhookLastTrigger>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_webhook_lasttrigger_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_webhook_policies_get(project_id, opts = {}) ⇒ Array<WebhookPolicy>

List project webhook policies. This endpoint returns webhook policies of a project.

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Returns:



3525
3526
3527
3528
# File 'lib/harbor1_client/api/products_api.rb', line 3525

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

#projects_project_id_webhook_policies_get_with_http_info(project_id, opts = {}) ⇒ Array<(Array<WebhookPolicy>, Fixnum, Hash)>

List project webhook policies. This endpoint returns webhook policies of a project.

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Returns:

  • (Array<(Array<WebhookPolicy>, Fixnum, Hash)>)

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



3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
# File 'lib/harbor1_client/api/products_api.rb', line 3535

def projects_project_id_webhook_policies_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_webhook_policies_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_webhook_policies_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/webhook/policies'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<WebhookPolicy>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_webhook_policies_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_webhook_policies_policy_id_delete(project_id, policy_id, opts = {}) ⇒ nil

Delete webhook policy of a project This endpoint is aimed to delete webhookpolicy of a project.

Parameters:

  • project_id

    Relevant project ID.

  • policy_id

    The id of webhook policy.

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

    the optional parameters

Returns:

  • (nil)


3580
3581
3582
3583
# File 'lib/harbor1_client/api/products_api.rb', line 3580

def projects_project_id_webhook_policies_policy_id_delete(project_id, policy_id, opts = {})
  projects_project_id_webhook_policies_policy_id_delete_with_http_info(project_id, policy_id, opts)
  nil
end

#projects_project_id_webhook_policies_policy_id_delete_with_http_info(project_id, policy_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete webhook policy of a project This endpoint is aimed to delete webhookpolicy of a project.

Parameters:

  • project_id

    Relevant project ID.

  • policy_id

    The id of webhook policy.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
# File 'lib/harbor1_client/api/products_api.rb', line 3591

def projects_project_id_webhook_policies_policy_id_delete_with_http_info(project_id, policy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_webhook_policies_policy_id_delete ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_webhook_policies_policy_id_delete"
  end
  # verify the required parameter 'policy_id' is set
  if @api_client.config.client_side_validation && policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'policy_id' when calling ProductsApi.projects_project_id_webhook_policies_policy_id_delete"
  end
  # resource path
  local_var_path = '/projects/{project_id}/webhook/policies/{policy_id}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'policy_id' + '}', policy_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_webhook_policies_policy_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_webhook_policies_policy_id_get(project_id, policy_id, opts = {}) ⇒ WebhookPolicy

Get project webhook policy This endpoint returns specified webhook policy of a project.

Parameters:

  • project_id

    Relevant project ID.

  • policy_id

    The id of webhook policy.

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

    the optional parameters

Returns:



3639
3640
3641
3642
# File 'lib/harbor1_client/api/products_api.rb', line 3639

def projects_project_id_webhook_policies_policy_id_get(project_id, policy_id, opts = {})
  data, _status_code, _headers = projects_project_id_webhook_policies_policy_id_get_with_http_info(project_id, policy_id, opts)
  data
end

#projects_project_id_webhook_policies_policy_id_get_with_http_info(project_id, policy_id, opts = {}) ⇒ Array<(WebhookPolicy, Fixnum, Hash)>

Get project webhook policy This endpoint returns specified webhook policy of a project.

Parameters:

  • project_id

    Relevant project ID.

  • policy_id

    The id of webhook policy.

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

    the optional parameters

Returns:

  • (Array<(WebhookPolicy, Fixnum, Hash)>)

    WebhookPolicy data, response status code and response headers



3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
# File 'lib/harbor1_client/api/products_api.rb', line 3650

def projects_project_id_webhook_policies_policy_id_get_with_http_info(project_id, policy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_webhook_policies_policy_id_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_webhook_policies_policy_id_get"
  end
  # verify the required parameter 'policy_id' is set
  if @api_client.config.client_side_validation && policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'policy_id' when calling ProductsApi.projects_project_id_webhook_policies_policy_id_get"
  end
  # resource path
  local_var_path = '/projects/{project_id}/webhook/policies/{policy_id}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'policy_id' + '}', policy_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'WebhookPolicy')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_webhook_policies_policy_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_webhook_policies_policy_id_put(project_id, policy_id, policy, opts = {}) ⇒ nil

Update webhook policy of a project. This endpoint is aimed to update the webhook policy of a project.

Parameters:

  • project_id

    Relevant project ID.

  • policy_id

    The id of webhook policy.

  • policy

    All properties needed except &quot;id&quot;, &quot;project_id&quot;, &quot;creation_time&quot;, &quot;update_time&quot;.

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

    the optional parameters

Returns:

  • (nil)


3700
3701
3702
3703
# File 'lib/harbor1_client/api/products_api.rb', line 3700

def projects_project_id_webhook_policies_policy_id_put(project_id, policy_id, policy, opts = {})
  projects_project_id_webhook_policies_policy_id_put_with_http_info(project_id, policy_id, policy, opts)
  nil
end

#projects_project_id_webhook_policies_policy_id_put_with_http_info(project_id, policy_id, policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update webhook policy of a project. This endpoint is aimed to update the webhook policy of a project.

Parameters:

  • project_id

    Relevant project ID.

  • policy_id

    The id of webhook policy.

  • policy

    All properties needed except &quot;id&quot;, &quot;project_id&quot;, &quot;creation_time&quot;, &quot;update_time&quot;.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
# File 'lib/harbor1_client/api/products_api.rb', line 3712

def projects_project_id_webhook_policies_policy_id_put_with_http_info(project_id, policy_id, policy, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_webhook_policies_policy_id_put ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_webhook_policies_policy_id_put"
  end
  # verify the required parameter 'policy_id' is set
  if @api_client.config.client_side_validation && policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'policy_id' when calling ProductsApi.projects_project_id_webhook_policies_policy_id_put"
  end
  # verify the required parameter 'policy' is set
  if @api_client.config.client_side_validation && policy.nil?
    fail ArgumentError, "Missing the required parameter 'policy' when calling ProductsApi.projects_project_id_webhook_policies_policy_id_put"
  end
  # resource path
  local_var_path = '/projects/{project_id}/webhook/policies/{policy_id}'.sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'policy_id' + '}', policy_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(policy)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_webhook_policies_policy_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_webhook_policies_post(project_id, policy, opts = {}) ⇒ nil

Create project webhook policy. This endpoint create a webhook policy if the project does not have one.

Parameters:

  • project_id

    Relevant project ID

  • policy

    Properties &quot;targets&quot; and &quot;event_types&quot; needed.

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

    the optional parameters

Returns:

  • (nil)


3764
3765
3766
3767
# File 'lib/harbor1_client/api/products_api.rb', line 3764

def projects_project_id_webhook_policies_post(project_id, policy, opts = {})
  projects_project_id_webhook_policies_post_with_http_info(project_id, policy, opts)
  nil
end

#projects_project_id_webhook_policies_post_with_http_info(project_id, policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create project webhook policy. This endpoint create a webhook policy if the project does not have one.

Parameters:

  • project_id

    Relevant project ID

  • policy

    Properties &quot;targets&quot; and &quot;event_types&quot; needed.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
# File 'lib/harbor1_client/api/products_api.rb', line 3775

def projects_project_id_webhook_policies_post_with_http_info(project_id, policy, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_webhook_policies_post ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_webhook_policies_post"
  end
  # verify the required parameter 'policy' is set
  if @api_client.config.client_side_validation && policy.nil?
    fail ArgumentError, "Missing the required parameter 'policy' when calling ProductsApi.projects_project_id_webhook_policies_post"
  end
  # resource path
  local_var_path = '/projects/{project_id}/webhook/policies'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(policy)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_webhook_policies_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects_project_id_webhook_policies_test_post(project_id, policy, opts = {}) ⇒ nil

Test project webhook connection This endpoint tests webhook connection of a project.

Parameters:

  • project_id

    Relevant project ID.

  • policy

    Only property &quot;targets&quot; needed.

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

    the optional parameters

Returns:

  • (nil)


3823
3824
3825
3826
# File 'lib/harbor1_client/api/products_api.rb', line 3823

def projects_project_id_webhook_policies_test_post(project_id, policy, opts = {})
  projects_project_id_webhook_policies_test_post_with_http_info(project_id, policy, opts)
  nil
end

#projects_project_id_webhook_policies_test_post_with_http_info(project_id, policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Test project webhook connection This endpoint tests webhook connection of a project.

Parameters:

  • project_id

    Relevant project ID.

  • policy

    Only property &quot;targets&quot; needed.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
# File 'lib/harbor1_client/api/products_api.rb', line 3834

def projects_project_id_webhook_policies_test_post_with_http_info(project_id, policy, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_webhook_policies_test_post ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.projects_project_id_webhook_policies_test_post"
  end
  # verify the required parameter 'policy' is set
  if @api_client.config.client_side_validation && policy.nil?
    fail ArgumentError, "Missing the required parameter 'policy' when calling ProductsApi.projects_project_id_webhook_policies_test_post"
  end
  # resource path
  local_var_path = '/projects/{project_id}/webhook/policies/test'.sub('{' + 'project_id' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(policy)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_webhook_policies_test_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#quotas_get(opts = {}) ⇒ Array<Quota>

List quotas List quotas

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :reference (String)

    The reference type of quota.

  • :reference_id (String)

    The reference id of quota.

  • :sort (String)

    Sort method, valid values include: &#39;hard.resource_name&#39;, &#39;-hard.resource_name&#39;, &#39;used.resource_name&#39;, &#39;-used.resource_name&#39;. Here &#39;-&#39; stands for descending order, resource_name should be the real resource name of the quota.

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page, default is 10, maximum is 100.

Returns:



3885
3886
3887
3888
# File 'lib/harbor1_client/api/products_api.rb', line 3885

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

#quotas_get_with_http_info(opts = {}) ⇒ Array<(Array<Quota>, Fixnum, Hash)>

List quotas List quotas

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :reference (String)

    The reference type of quota.

  • :reference_id (String)

    The reference id of quota.

  • :sort (String)

    Sort method, valid values include: &#39;hard.resource_name&#39;, &#39;-hard.resource_name&#39;, &#39;used.resource_name&#39;, &#39;-used.resource_name&#39;. Here &#39;-&#39; stands for descending order, resource_name should be the real resource name of the quota.

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page, default is 10, maximum is 100.

Returns:

  • (Array<(Array<Quota>, Fixnum, Hash)>)

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



3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
# File 'lib/harbor1_client/api/products_api.rb', line 3899

def quotas_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.quotas_get ...'
  end
  # resource path
  local_var_path = '/quotas'

  # query parameters
  query_params = {}
  query_params[:'reference'] = opts[:'reference'] if !opts[:'reference'].nil?
  query_params[:'reference_id'] = opts[:'reference_id'] if !opts[:'reference_id'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Quota>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#quotas_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#quotas_id_get(id, opts = {}) ⇒ Quota

Get the specified quota Get the specified quota

Parameters:

  • id

    Quota ID

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

    the optional parameters

Returns:



3944
3945
3946
3947
# File 'lib/harbor1_client/api/products_api.rb', line 3944

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

#quotas_id_get_with_http_info(id, opts = {}) ⇒ Array<(Quota, Fixnum, Hash)>

Get the specified quota Get the specified quota

Parameters:

  • id

    Quota ID

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

    the optional parameters

Returns:

  • (Array<(Quota, Fixnum, Hash)>)

    Quota data, response status code and response headers



3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
# File 'lib/harbor1_client/api/products_api.rb', line 3954

def quotas_id_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.quotas_id_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.quotas_id_get"
  end
  # resource path
  local_var_path = '/quotas/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Quota')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#quotas_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#quotas_id_put(id, hard, opts = {}) ⇒ nil

Update the specified quota Update hard limits of the specified quota

Parameters:

  • id

    Quota ID

  • hard

    The new hard limits for the quota

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

    the optional parameters

Returns:

  • (nil)


3999
4000
4001
4002
# File 'lib/harbor1_client/api/products_api.rb', line 3999

def quotas_id_put(id, hard, opts = {})
  quotas_id_put_with_http_info(id, hard, opts)
  nil
end

#quotas_id_put_with_http_info(id, hard, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update the specified quota Update hard limits of the specified quota

Parameters:

  • id

    Quota ID

  • hard

    The new hard limits for the quota

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
# File 'lib/harbor1_client/api/products_api.rb', line 4010

def quotas_id_put_with_http_info(id, hard, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.quotas_id_put ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.quotas_id_put"
  end
  # verify the required parameter 'hard' is set
  if @api_client.config.client_side_validation && hard.nil?
    fail ArgumentError, "Missing the required parameter 'hard' when calling ProductsApi.quotas_id_put"
  end
  # resource path
  local_var_path = '/quotas/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(hard)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#quotas_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#registries_get(opts = {}) ⇒ Array<Registry>

List registries. This endpoint let user list filtered registries by name, if name is nil, list returns all registries.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    Registry&#39;s name.

Returns:



4057
4058
4059
4060
# File 'lib/harbor1_client/api/products_api.rb', line 4057

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

#registries_get_with_http_info(opts = {}) ⇒ Array<(Array<Registry>, Fixnum, Hash)>

List registries. This endpoint let user list filtered registries by name, if name is nil, list returns all registries.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    Registry&#39;s name.

Returns:

  • (Array<(Array<Registry>, Fixnum, Hash)>)

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



4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
# File 'lib/harbor1_client/api/products_api.rb', line 4067

def registries_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.registries_get ...'
  end
  # resource path
  local_var_path = '/registries'

  # query parameters
  query_params = {}
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Registry>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#registries_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#registries_id_delete(id, opts = {}) ⇒ nil

Delete specific registry. This endpoint is for to delete specific registry.

Parameters:

  • id

    The registry&#39;s ID.

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

    the optional parameters

Returns:

  • (nil)


4108
4109
4110
4111
# File 'lib/harbor1_client/api/products_api.rb', line 4108

def registries_id_delete(id, opts = {})
  registries_id_delete_with_http_info(id, opts)
  nil
end

#registries_id_delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete specific registry. This endpoint is for to delete specific registry.

Parameters:

  • id

    The registry&#39;s ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
# File 'lib/harbor1_client/api/products_api.rb', line 4118

def registries_id_delete_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.registries_id_delete ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.registries_id_delete"
  end
  # resource path
  local_var_path = '/registries/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#registries_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#registries_id_get(id, opts = {}) ⇒ Registry

Get registry. This endpoint is for get specific registry.

Parameters:

  • id

    The registry ID.

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

    the optional parameters

Returns:



4161
4162
4163
4164
# File 'lib/harbor1_client/api/products_api.rb', line 4161

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

#registries_id_get_with_http_info(id, opts = {}) ⇒ Array<(Registry, Fixnum, Hash)>

Get registry. This endpoint is for get specific registry.

Parameters:

  • id

    The registry ID.

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

    the optional parameters

Returns:

  • (Array<(Registry, Fixnum, Hash)>)

    Registry data, response status code and response headers



4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
# File 'lib/harbor1_client/api/products_api.rb', line 4171

def registries_id_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.registries_id_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.registries_id_get"
  end
  # resource path
  local_var_path = '/registries/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Registry')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#registries_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#registries_id_info_get(id, opts = {}) ⇒ RegistryInfo

Get registry info. Get the info of one specific registry.

Parameters:

  • id

    The registry ID.

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

    the optional parameters

Returns:



4215
4216
4217
4218
# File 'lib/harbor1_client/api/products_api.rb', line 4215

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

#registries_id_info_get_with_http_info(id, opts = {}) ⇒ Array<(RegistryInfo, Fixnum, Hash)>

Get registry info. Get the info of one specific registry.

Parameters:

  • id

    The registry ID.

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

    the optional parameters

Returns:

  • (Array<(RegistryInfo, Fixnum, Hash)>)

    RegistryInfo data, response status code and response headers



4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
# File 'lib/harbor1_client/api/products_api.rb', line 4225

def registries_id_info_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.registries_id_info_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.registries_id_info_get"
  end
  # resource path
  local_var_path = '/registries/{id}/info'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RegistryInfo')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#registries_id_info_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#registries_id_namespace_get(id, opts = {}) ⇒ Array<Namespace>

List namespaces of registry This endpoint let user list namespaces of registry according to query.

Parameters:

  • id

    The registry ID.

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    The name of namespace.

Returns:



4270
4271
4272
4273
# File 'lib/harbor1_client/api/products_api.rb', line 4270

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

#registries_id_namespace_get_with_http_info(id, opts = {}) ⇒ Array<(Array<Namespace>, Fixnum, Hash)>

List namespaces of registry This endpoint let user list namespaces of registry according to query.

Parameters:

  • id

    The registry ID.

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    The name of namespace.

Returns:

  • (Array<(Array<Namespace>, Fixnum, Hash)>)

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



4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
# File 'lib/harbor1_client/api/products_api.rb', line 4281

def registries_id_namespace_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.registries_id_namespace_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.registries_id_namespace_get"
  end
  # resource path
  local_var_path = '/registries/{id}/namespace'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Namespace>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#registries_id_namespace_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#registries_id_put(id, repo_target, opts = {}) ⇒ nil

Update a given registry. This endpoint is for update a given registry.

Parameters:

  • id

    The registry&#39;s ID.

  • repo_target

    Updates registry.

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

    the optional parameters

Returns:

  • (nil)


4327
4328
4329
4330
# File 'lib/harbor1_client/api/products_api.rb', line 4327

def registries_id_put(id, repo_target, opts = {})
  registries_id_put_with_http_info(id, repo_target, opts)
  nil
end

#registries_id_put_with_http_info(id, repo_target, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update a given registry. This endpoint is for update a given registry.

Parameters:

  • id

    The registry&#39;s ID.

  • repo_target

    Updates registry.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
# File 'lib/harbor1_client/api/products_api.rb', line 4338

def registries_id_put_with_http_info(id, repo_target, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.registries_id_put ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.registries_id_put"
  end
  # verify the required parameter 'repo_target' is set
  if @api_client.config.client_side_validation && repo_target.nil?
    fail ArgumentError, "Missing the required parameter 'repo_target' when calling ProductsApi.registries_id_put"
  end
  # resource path
  local_var_path = '/registries/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(repo_target)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#registries_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#registries_ping_post(registry, opts = {}) ⇒ nil

Ping status of a registry. This endpoint checks status of a registry, the registry can be given by ID or URL (together with credential)

Parameters:

  • registry

    Registry to ping.

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

    the optional parameters

Returns:

  • (nil)


4385
4386
4387
4388
# File 'lib/harbor1_client/api/products_api.rb', line 4385

def registries_ping_post(registry, opts = {})
  registries_ping_post_with_http_info(registry, opts)
  nil
end

#registries_ping_post_with_http_info(registry, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Ping status of a registry. This endpoint checks status of a registry, the registry can be given by ID or URL (together with credential)

Parameters:

  • registry

    Registry to ping.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
# File 'lib/harbor1_client/api/products_api.rb', line 4395

def registries_ping_post_with_http_info(registry, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.registries_ping_post ...'
  end
  # verify the required parameter 'registry' is set
  if @api_client.config.client_side_validation && registry.nil?
    fail ArgumentError, "Missing the required parameter 'registry' when calling ProductsApi.registries_ping_post"
  end
  # resource path
  local_var_path = '/registries/ping'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(registry)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#registries_ping_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#registries_post(registry, opts = {}) ⇒ nil

Create a new registry. This endpoint is for user to create a new registry.

Parameters:

  • registry

    New created registry.

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

    the optional parameters

Returns:

  • (nil)


4438
4439
4440
4441
# File 'lib/harbor1_client/api/products_api.rb', line 4438

def registries_post(registry, opts = {})
  registries_post_with_http_info(registry, opts)
  nil
end

#registries_post_with_http_info(registry, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create a new registry. This endpoint is for user to create a new registry.

Parameters:

  • registry

    New created registry.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
# File 'lib/harbor1_client/api/products_api.rb', line 4448

def registries_post_with_http_info(registry, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.registries_post ...'
  end
  # verify the required parameter 'registry' is set
  if @api_client.config.client_side_validation && registry.nil?
    fail ArgumentError, "Missing the required parameter 'registry' when calling ProductsApi.registries_post"
  end
  # resource path
  local_var_path = '/registries'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(registry)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#registries_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replication_adapters_get(opts = {}) ⇒ Array<String>

List supported adapters. This endpoint let user list supported adapters.

Parameters:

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

    the optional parameters

Returns:

  • (Array<String>)


4490
4491
4492
4493
# File 'lib/harbor1_client/api/products_api.rb', line 4490

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

#replication_adapters_get_with_http_info(opts = {}) ⇒ Array<(Array<String>, Fixnum, Hash)>

List supported adapters. This endpoint let user list supported adapters.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Array<String>, Fixnum, Hash)>)

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



4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
# File 'lib/harbor1_client/api/products_api.rb', line 4499

def replication_adapters_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.replication_adapters_get ...'
  end
  # resource path
  local_var_path = '/replication/adapters'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<String>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#replication_adapters_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replication_executions_get(opts = {}) ⇒ Array<ReplicationExecution>

List replication executions. This endpoint let user list replication executions.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :policy_id (Integer)

    The policy ID.

  • :status (String)

    The execution status.

  • :trigger (String)

    The trigger mode.

  • :page (Integer)

    The page.

  • :page_size (Integer)

    The page size.

Returns:



4543
4544
4545
4546
# File 'lib/harbor1_client/api/products_api.rb', line 4543

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

#replication_executions_get_with_http_info(opts = {}) ⇒ Array<(Array<ReplicationExecution>, Fixnum, Hash)>

List replication executions. This endpoint let user list replication executions.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :policy_id (Integer)

    The policy ID.

  • :status (String)

    The execution status.

  • :trigger (String)

    The trigger mode.

  • :page (Integer)

    The page.

  • :page_size (Integer)

    The page size.

Returns:

  • (Array<(Array<ReplicationExecution>, Fixnum, Hash)>)

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



4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
# File 'lib/harbor1_client/api/products_api.rb', line 4557

def replication_executions_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.replication_executions_get ...'
  end
  # resource path
  local_var_path = '/replication/executions'

  # query parameters
  query_params = {}
  query_params[:'policy_id'] = opts[:'policy_id'] if !opts[:'policy_id'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'trigger'] = opts[:'trigger'] if !opts[:'trigger'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ReplicationExecution>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#replication_executions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replication_executions_id_get(id, opts = {}) ⇒ ReplicationExecution

Get the execution of the replication. This endpoint is for user to get one execution of the replication.

Parameters:

  • id

    The execution ID.

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

    the optional parameters

Returns:



4602
4603
4604
4605
# File 'lib/harbor1_client/api/products_api.rb', line 4602

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

#replication_executions_id_get_with_http_info(id, opts = {}) ⇒ Array<(ReplicationExecution, Fixnum, Hash)>

Get the execution of the replication. This endpoint is for user to get one execution of the replication.

Parameters:

  • id

    The execution ID.

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

    the optional parameters

Returns:

  • (Array<(ReplicationExecution, Fixnum, Hash)>)

    ReplicationExecution data, response status code and response headers



4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
# File 'lib/harbor1_client/api/products_api.rb', line 4612

def replication_executions_id_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.replication_executions_id_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.replication_executions_id_get"
  end
  # resource path
  local_var_path = '/replication/executions/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ReplicationExecution')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#replication_executions_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replication_executions_id_put(id, opts = {}) ⇒ nil

Stop the execution of the replication. This endpoint is for user to stop one execution of the replication.

Parameters:

  • id

    The execution ID.

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

    the optional parameters

Returns:

  • (nil)


4656
4657
4658
4659
# File 'lib/harbor1_client/api/products_api.rb', line 4656

def replication_executions_id_put(id, opts = {})
  replication_executions_id_put_with_http_info(id, opts)
  nil
end

#replication_executions_id_put_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Stop the execution of the replication. This endpoint is for user to stop one execution of the replication.

Parameters:

  • id

    The execution ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
# File 'lib/harbor1_client/api/products_api.rb', line 4666

def replication_executions_id_put_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.replication_executions_id_put ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.replication_executions_id_put"
  end
  # resource path
  local_var_path = '/replication/executions/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#replication_executions_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replication_executions_id_tasks_get(id, opts = {}) ⇒ Array<ReplicationTask>

Get the task list of one execution. This endpoint is for user to get the task list of one execution.

Parameters:

  • id

    The execution ID.

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

    the optional parameters

Returns:



4709
4710
4711
4712
# File 'lib/harbor1_client/api/products_api.rb', line 4709

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

#replication_executions_id_tasks_get_with_http_info(id, opts = {}) ⇒ Array<(Array<ReplicationTask>, Fixnum, Hash)>

Get the task list of one execution. This endpoint is for user to get the task list of one execution.

Parameters:

  • id

    The execution ID.

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

    the optional parameters

Returns:

  • (Array<(Array<ReplicationTask>, Fixnum, Hash)>)

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



4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
# File 'lib/harbor1_client/api/products_api.rb', line 4719

def replication_executions_id_tasks_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.replication_executions_id_tasks_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.replication_executions_id_tasks_get"
  end
  # resource path
  local_var_path = '/replication/executions/{id}/tasks'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ReplicationTask>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#replication_executions_id_tasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replication_executions_id_tasks_task_id_log_get(id, task_id, opts = {}) ⇒ nil

Get the log of one task. This endpoint is for user to get the log of one task.

Parameters:

  • id

    The execution ID.

  • task_id

    The task ID.

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

    the optional parameters

Returns:

  • (nil)


4764
4765
4766
4767
# File 'lib/harbor1_client/api/products_api.rb', line 4764

def replication_executions_id_tasks_task_id_log_get(id, task_id, opts = {})
  replication_executions_id_tasks_task_id_log_get_with_http_info(id, task_id, opts)
  nil
end

#replication_executions_id_tasks_task_id_log_get_with_http_info(id, task_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get the log of one task. This endpoint is for user to get the log of one task.

Parameters:

  • id

    The execution ID.

  • task_id

    The task ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
# File 'lib/harbor1_client/api/products_api.rb', line 4775

def replication_executions_id_tasks_task_id_log_get_with_http_info(id, task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.replication_executions_id_tasks_task_id_log_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.replication_executions_id_tasks_task_id_log_get"
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling ProductsApi.replication_executions_id_tasks_task_id_log_get"
  end
  # resource path
  local_var_path = '/replication/executions/{id}/tasks/{task_id}/log'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'task_id' + '}', task_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#replication_executions_id_tasks_task_id_log_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replication_executions_post(execution, opts = {}) ⇒ nil

Start one execution of the replication. This endpoint is for user to start one execution of the replication.

Parameters:

  • execution

    The execution that needs to be started, only the property &quot;policy_id&quot; is needed.

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

    the optional parameters

Returns:

  • (nil)


4822
4823
4824
4825
# File 'lib/harbor1_client/api/products_api.rb', line 4822

def replication_executions_post(execution, opts = {})
  replication_executions_post_with_http_info(execution, opts)
  nil
end

#replication_executions_post_with_http_info(execution, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Start one execution of the replication. This endpoint is for user to start one execution of the replication.

Parameters:

  • execution

    The execution that needs to be started, only the property &quot;policy_id&quot; is needed.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
# File 'lib/harbor1_client/api/products_api.rb', line 4832

def replication_executions_post_with_http_info(execution, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.replication_executions_post ...'
  end
  # verify the required parameter 'execution' is set
  if @api_client.config.client_side_validation && execution.nil?
    fail ArgumentError, "Missing the required parameter 'execution' when calling ProductsApi.replication_executions_post"
  end
  # resource path
  local_var_path = '/replication/executions'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(execution)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#replication_executions_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replication_policies_get(opts = {}) ⇒ Array<ReplicationPolicy>

List replication policies This endpoint let user list replication policies

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    The replication policy name.

  • :page (Integer)

    The page nubmer.

  • :page_size (Integer)

    The size of per page.

Returns:



4877
4878
4879
4880
# File 'lib/harbor1_client/api/products_api.rb', line 4877

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

#replication_policies_get_with_http_info(opts = {}) ⇒ Array<(Array<ReplicationPolicy>, Fixnum, Hash)>

List replication policies This endpoint let user list replication policies

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    The replication policy name.

  • :page (Integer)

    The page nubmer.

  • :page_size (Integer)

    The size of per page.

Returns:

  • (Array<(Array<ReplicationPolicy>, Fixnum, Hash)>)

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



4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
# File 'lib/harbor1_client/api/products_api.rb', line 4889

def replication_policies_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.replication_policies_get ...'
  end
  # resource path
  local_var_path = '/replication/policies'

  # query parameters
  query_params = {}
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ReplicationPolicy>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#replication_policies_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replication_policies_id_delete(id, opts = {}) ⇒ nil

Delete the replication policy specified by ID. Delete the replication policy specified by ID.

Parameters:

  • id

    Replication policy ID

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

    the optional parameters

Returns:

  • (nil)


4932
4933
4934
4935
# File 'lib/harbor1_client/api/products_api.rb', line 4932

def replication_policies_id_delete(id, opts = {})
  replication_policies_id_delete_with_http_info(id, opts)
  nil
end

#replication_policies_id_delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete the replication policy specified by ID. Delete the replication policy specified by ID.

Parameters:

  • id

    Replication policy ID

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
# File 'lib/harbor1_client/api/products_api.rb', line 4942

def replication_policies_id_delete_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.replication_policies_id_delete ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.replication_policies_id_delete"
  end
  # resource path
  local_var_path = '/replication/policies/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#replication_policies_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replication_policies_id_get(id, opts = {}) ⇒ ReplicationPolicy

Get replication policy. This endpoint let user get replication policy by specific ID.

Parameters:

  • id

    policy ID

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

    the optional parameters

Returns:



4985
4986
4987
4988
# File 'lib/harbor1_client/api/products_api.rb', line 4985

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

#replication_policies_id_get_with_http_info(id, opts = {}) ⇒ Array<(ReplicationPolicy, Fixnum, Hash)>

Get replication policy. This endpoint let user get replication policy by specific ID.

Parameters:

  • id

    policy ID

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

    the optional parameters

Returns:

  • (Array<(ReplicationPolicy, Fixnum, Hash)>)

    ReplicationPolicy data, response status code and response headers



4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
# File 'lib/harbor1_client/api/products_api.rb', line 4995

def replication_policies_id_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.replication_policies_id_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.replication_policies_id_get"
  end
  # resource path
  local_var_path = '/replication/policies/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ReplicationPolicy')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#replication_policies_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replication_policies_id_put(id, policy, opts = {}) ⇒ nil

Update the replication policy This endpoint let user update policy.

Parameters:

  • id

    policy ID

  • policy

    The replication policy model.

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

    the optional parameters

Returns:

  • (nil)


5040
5041
5042
5043
# File 'lib/harbor1_client/api/products_api.rb', line 5040

def replication_policies_id_put(id, policy, opts = {})
  replication_policies_id_put_with_http_info(id, policy, opts)
  nil
end

#replication_policies_id_put_with_http_info(id, policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update the replication policy This endpoint let user update policy.

Parameters:

  • id

    policy ID

  • policy

    The replication policy model.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
# File 'lib/harbor1_client/api/products_api.rb', line 5051

def replication_policies_id_put_with_http_info(id, policy, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.replication_policies_id_put ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.replication_policies_id_put"
  end
  # verify the required parameter 'policy' is set
  if @api_client.config.client_side_validation && policy.nil?
    fail ArgumentError, "Missing the required parameter 'policy' when calling ProductsApi.replication_policies_id_put"
  end
  # resource path
  local_var_path = '/replication/policies/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(policy)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#replication_policies_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replication_policies_post(policy, opts = {}) ⇒ nil

Create a replication policy This endpoint let user create a replication policy

Parameters:

  • policy

    The policy model.

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

    the optional parameters

Returns:

  • (nil)


5098
5099
5100
5101
# File 'lib/harbor1_client/api/products_api.rb', line 5098

def replication_policies_post(policy, opts = {})
  replication_policies_post_with_http_info(policy, opts)
  nil
end

#replication_policies_post_with_http_info(policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create a replication policy This endpoint let user create a replication policy

Parameters:

  • policy

    The policy model.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
# File 'lib/harbor1_client/api/products_api.rb', line 5108

def replication_policies_post_with_http_info(policy, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.replication_policies_post ...'
  end
  # verify the required parameter 'policy' is set
  if @api_client.config.client_side_validation && policy.nil?
    fail ArgumentError, "Missing the required parameter 'policy' when calling ProductsApi.replication_policies_post"
  end
  # resource path
  local_var_path = '/replication/policies'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(policy)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#replication_policies_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_get(project_id, opts = {}) ⇒ Array<Repository>

Get repositories accompany with relevant project and repo name. This endpoint lets user search repositories accompanying with relevant project ID and repo name. Repositories can be sorted by repo name, creation_time, update_time in either ascending or descending order.

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Options Hash (opts):

  • :q (String)

    Repo name for filtering results.

  • :sort (String)

    Sort method, valid values include: &#39;name&#39;, &#39;-name&#39;, &#39;creation_time&#39;, &#39;-creation_time&#39;, &#39;update_time&#39;, &#39;-update_time&#39;. Here &#39;-&#39; stands for descending order.

  • :label_id (Integer)

    The ID of label used to filter the result.

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page, default is 10, maximum is 100.

Returns:



5156
5157
5158
5159
# File 'lib/harbor1_client/api/products_api.rb', line 5156

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

#repositories_get_with_http_info(project_id, opts = {}) ⇒ Array<(Array<Repository>, Fixnum, Hash)>

Get repositories accompany with relevant project and repo name. This endpoint lets user search repositories accompanying with relevant project ID and repo name. Repositories can be sorted by repo name, creation_time, update_time in either ascending or descending order.

Parameters:

  • project_id

    Relevant project ID.

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

    the optional parameters

Options Hash (opts):

  • :q (String)

    Repo name for filtering results.

  • :sort (String)

    Sort method, valid values include: &#39;name&#39;, &#39;-name&#39;, &#39;creation_time&#39;, &#39;-creation_time&#39;, &#39;update_time&#39;, &#39;-update_time&#39;. Here &#39;-&#39; stands for descending order.

  • :label_id (Integer)

    The ID of label used to filter the result.

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page, default is 10, maximum is 100.

Returns:

  • (Array<(Array<Repository>, Fixnum, Hash)>)

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



5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
# File 'lib/harbor1_client/api/products_api.rb', line 5171

def repositories_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProductsApi.repositories_get"
  end
  # resource path
  local_var_path = '/repositories'

  # query parameters
  query_params = {}
  query_params[:'project_id'] = project_id
  query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'label_id'] = opts[:'label_id'] if !opts[:'label_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Repository>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_delete(repo_name, opts = {}) ⇒ nil

Delete a repository. This endpoint let user delete a repository with name.

Parameters:

  • repo_name

    The name of repository which will be deleted.

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

    the optional parameters

Returns:

  • (nil)


5221
5222
5223
5224
# File 'lib/harbor1_client/api/products_api.rb', line 5221

def repositories_repo_name_delete(repo_name, opts = {})
  repositories_repo_name_delete_with_http_info(repo_name, opts)
  nil
end

#repositories_repo_name_delete_with_http_info(repo_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a repository. This endpoint let user delete a repository with name.

Parameters:

  • repo_name

    The name of repository which will be deleted.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
# File 'lib/harbor1_client/api/products_api.rb', line 5231

def repositories_repo_name_delete_with_http_info(repo_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_delete ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_delete"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}'.sub('{' + 'repo_name' + '}', repo_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_labels_get(repo_name, opts = {}) ⇒ Array<Label>

Get labels of a repository. Get labels of a repository specified by the repo_name.

Parameters:

  • repo_name

    The name of repository.

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

    the optional parameters

Returns:



5274
5275
5276
5277
# File 'lib/harbor1_client/api/products_api.rb', line 5274

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

#repositories_repo_name_labels_get_with_http_info(repo_name, opts = {}) ⇒ Array<(Array<Label>, Fixnum, Hash)>

Get labels of a repository. Get labels of a repository specified by the repo_name.

Parameters:

  • repo_name

    The name of repository.

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

    the optional parameters

Returns:

  • (Array<(Array<Label>, Fixnum, Hash)>)

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



5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
# File 'lib/harbor1_client/api/products_api.rb', line 5284

def repositories_repo_name_labels_get_with_http_info(repo_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_labels_get ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_labels_get"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/labels'.sub('{' + 'repo_name' + '}', repo_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Label>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_labels_label_id_delete(repo_name, label_id, opts = {}) ⇒ nil

Delete label from the repository. Delete the label from the repository specified by the repo_name.

Parameters:

  • repo_name

    The name of repository.

  • label_id

    The ID of label.

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

    the optional parameters

Returns:

  • (nil)


5329
5330
5331
5332
# File 'lib/harbor1_client/api/products_api.rb', line 5329

def repositories_repo_name_labels_label_id_delete(repo_name, label_id, opts = {})
  repositories_repo_name_labels_label_id_delete_with_http_info(repo_name, label_id, opts)
  nil
end

#repositories_repo_name_labels_label_id_delete_with_http_info(repo_name, label_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete label from the repository. Delete the label from the repository specified by the repo_name.

Parameters:

  • repo_name

    The name of repository.

  • label_id

    The ID of label.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
# File 'lib/harbor1_client/api/products_api.rb', line 5340

def repositories_repo_name_labels_label_id_delete_with_http_info(repo_name, label_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_labels_label_id_delete ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_labels_label_id_delete"
  end
  # verify the required parameter 'label_id' is set
  if @api_client.config.client_side_validation && label_id.nil?
    fail ArgumentError, "Missing the required parameter 'label_id' when calling ProductsApi.repositories_repo_name_labels_label_id_delete"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/labels/{label_id}'.sub('{' + 'repo_name' + '}', repo_name.to_s).sub('{' + 'label_id' + '}', label_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_labels_label_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_labels_post(repo_name, label, opts = {}) ⇒ nil

Add a label to the repository. Add a label to the repository.

Parameters:

  • repo_name

    The name of repository.

  • label

    Only the ID property is required.

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

    the optional parameters

Returns:

  • (nil)


5388
5389
5390
5391
# File 'lib/harbor1_client/api/products_api.rb', line 5388

def repositories_repo_name_labels_post(repo_name, label, opts = {})
  repositories_repo_name_labels_post_with_http_info(repo_name, label, opts)
  nil
end

#repositories_repo_name_labels_post_with_http_info(repo_name, label, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Add a label to the repository. Add a label to the repository.

Parameters:

  • repo_name

    The name of repository.

  • label

    Only the ID property is required.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
# File 'lib/harbor1_client/api/products_api.rb', line 5399

def repositories_repo_name_labels_post_with_http_info(repo_name, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_labels_post ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_labels_post"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling ProductsApi.repositories_repo_name_labels_post"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/labels'.sub('{' + 'repo_name' + '}', repo_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(label)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_put(repo_name, description, opts = {}) ⇒ nil

Update description of the repository. This endpoint is used to update description of the repository.

Parameters:

  • repo_name

    The name of repository which will be deleted.

  • description

    The description of the repository.

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

    the optional parameters

Returns:

  • (nil)


5447
5448
5449
5450
# File 'lib/harbor1_client/api/products_api.rb', line 5447

def repositories_repo_name_put(repo_name, description, opts = {})
  repositories_repo_name_put_with_http_info(repo_name, description, opts)
  nil
end

#repositories_repo_name_put_with_http_info(repo_name, description, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update description of the repository. This endpoint is used to update description of the repository.

Parameters:

  • repo_name

    The name of repository which will be deleted.

  • description

    The description of the repository.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
# File 'lib/harbor1_client/api/products_api.rb', line 5458

def repositories_repo_name_put_with_http_info(repo_name, description, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_put ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_put"
  end
  # verify the required parameter 'description' is set
  if @api_client.config.client_side_validation && description.nil?
    fail ArgumentError, "Missing the required parameter 'description' when calling ProductsApi.repositories_repo_name_put"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}'.sub('{' + 'repo_name' + '}', repo_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(description)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_signatures_get(repo_name, opts = {}) ⇒ Array<RepoSignature>

Get signature information of a repository This endpoint aims to retrieve signature information of a repository, the data is from the nested notary instance of Harbor. If the repository does not have any signature information in notary, this API will return an empty list with response code 200, instead of 404

Parameters:

  • repo_name

    repository name.

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

    the optional parameters

Returns:



5505
5506
5507
5508
# File 'lib/harbor1_client/api/products_api.rb', line 5505

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

#repositories_repo_name_signatures_get_with_http_info(repo_name, opts = {}) ⇒ Array<(Array<RepoSignature>, Fixnum, Hash)>

Get signature information of a repository This endpoint aims to retrieve signature information of a repository, the data is from the nested notary instance of Harbor. If the repository does not have any signature information in notary, this API will return an empty list with response code 200, instead of 404

Parameters:

  • repo_name

    repository name.

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

    the optional parameters

Returns:

  • (Array<(Array<RepoSignature>, Fixnum, Hash)>)

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



5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
# File 'lib/harbor1_client/api/products_api.rb', line 5515

def repositories_repo_name_signatures_get_with_http_info(repo_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_signatures_get ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_signatures_get"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/signatures'.sub('{' + 'repo_name' + '}', repo_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<RepoSignature>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_signatures_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_tags_get(repo_name, opts = {}) ⇒ Array<DetailedTag>

Get tags of a relevant repository. This endpoint aims to retrieve tags from a relevant repository. If deployed with Notary, the signature property of response represents whether the image is singed or not. If the property is null, the image is unsigned.

Parameters:

  • repo_name

    Relevant repository name.

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

    the optional parameters

Options Hash (opts):

  • :label_id (String)

    A label ID.

  • :detail (BOOLEAN)

    Bool value indicating whether return detailed information of the tag, such as vulnerability scan info, if set to false, only tag name is returned.

Returns:



5561
5562
5563
5564
# File 'lib/harbor1_client/api/products_api.rb', line 5561

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

#repositories_repo_name_tags_get_with_http_info(repo_name, opts = {}) ⇒ Array<(Array<DetailedTag>, Fixnum, Hash)>

Get tags of a relevant repository. This endpoint aims to retrieve tags from a relevant repository. If deployed with Notary, the signature property of response represents whether the image is singed or not. If the property is null, the image is unsigned.

Parameters:

  • repo_name

    Relevant repository name.

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

    the optional parameters

Options Hash (opts):

  • :label_id (String)

    A label ID.

  • :detail (BOOLEAN)

    Bool value indicating whether return detailed information of the tag, such as vulnerability scan info, if set to false, only tag name is returned.

Returns:

  • (Array<(Array<DetailedTag>, Fixnum, Hash)>)

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



5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
# File 'lib/harbor1_client/api/products_api.rb', line 5573

def repositories_repo_name_tags_get_with_http_info(repo_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_tags_get ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_tags_get"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/tags'.sub('{' + 'repo_name' + '}', repo_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'label_id'] = opts[:'label_id'] if !opts[:'label_id'].nil?
  query_params[:'detail'] = opts[:'detail'] if !opts[:'detail'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<DetailedTag>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_tags_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_tags_post(repo_name, request, opts = {}) ⇒ nil

Retag an image This endpoint tags an existing image with another tag in this repo, source images can be in different repos or projects.

Parameters:

  • repo_name

    Relevant repository name.

  • request

    Request to give source image and target tag.

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

    the optional parameters

Returns:

  • (nil)


5620
5621
5622
5623
# File 'lib/harbor1_client/api/products_api.rb', line 5620

def repositories_repo_name_tags_post(repo_name, request, opts = {})
  repositories_repo_name_tags_post_with_http_info(repo_name, request, opts)
  nil
end

#repositories_repo_name_tags_post_with_http_info(repo_name, request, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Retag an image This endpoint tags an existing image with another tag in this repo, source images can be in different repos or projects.

Parameters:

  • repo_name

    Relevant repository name.

  • request

    Request to give source image and target tag.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
# File 'lib/harbor1_client/api/products_api.rb', line 5631

def repositories_repo_name_tags_post_with_http_info(repo_name, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_tags_post ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_tags_post"
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ProductsApi.repositories_repo_name_tags_post"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/tags'.sub('{' + 'repo_name' + '}', repo_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_tags_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_tags_tag_delete(repo_name, tag, opts = {}) ⇒ nil

Delete a tag in a repository. This endpoint let user delete tags with repo name and tag.

Parameters:

  • repo_name

    The name of repository which will be deleted.

  • tag

    Tag of a repository.

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

    the optional parameters

Returns:

  • (nil)


5679
5680
5681
5682
# File 'lib/harbor1_client/api/products_api.rb', line 5679

def repositories_repo_name_tags_tag_delete(repo_name, tag, opts = {})
  repositories_repo_name_tags_tag_delete_with_http_info(repo_name, tag, opts)
  nil
end

#repositories_repo_name_tags_tag_delete_with_http_info(repo_name, tag, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a tag in a repository. This endpoint let user delete tags with repo name and tag.

Parameters:

  • repo_name

    The name of repository which will be deleted.

  • tag

    Tag of a repository.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
# File 'lib/harbor1_client/api/products_api.rb', line 5690

def repositories_repo_name_tags_tag_delete_with_http_info(repo_name, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_tags_tag_delete ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_tags_tag_delete"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling ProductsApi.repositories_repo_name_tags_tag_delete"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/tags/{tag}'.sub('{' + 'repo_name' + '}', repo_name.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_tags_tag_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_tags_tag_get(repo_name, tag, opts = {}) ⇒ DetailedTag

Get the tag of the repository. This endpoint aims to retrieve the tag of the repository. If deployed with Notary, the signature property of response represents whether the image is singed or not. If the property is null, the image is unsigned.

Parameters:

  • repo_name

    Relevant repository name.

  • tag

    Tag of the repository.

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

    the optional parameters

Returns:



5738
5739
5740
5741
# File 'lib/harbor1_client/api/products_api.rb', line 5738

def repositories_repo_name_tags_tag_get(repo_name, tag, opts = {})
  data, _status_code, _headers = repositories_repo_name_tags_tag_get_with_http_info(repo_name, tag, opts)
  data
end

#repositories_repo_name_tags_tag_get_with_http_info(repo_name, tag, opts = {}) ⇒ Array<(DetailedTag, Fixnum, Hash)>

Get the tag of the repository. This endpoint aims to retrieve the tag of the repository. If deployed with Notary, the signature property of response represents whether the image is singed or not. If the property is null, the image is unsigned.

Parameters:

  • repo_name

    Relevant repository name.

  • tag

    Tag of the repository.

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

    the optional parameters

Returns:

  • (Array<(DetailedTag, Fixnum, Hash)>)

    DetailedTag data, response status code and response headers



5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
# File 'lib/harbor1_client/api/products_api.rb', line 5749

def repositories_repo_name_tags_tag_get_with_http_info(repo_name, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_tags_tag_get ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_tags_tag_get"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling ProductsApi.repositories_repo_name_tags_tag_get"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/tags/{tag}'.sub('{' + 'repo_name' + '}', repo_name.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DetailedTag')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_tags_tag_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_tags_tag_labels_get(repo_name, tag, opts = {}) ⇒ Array<Label>

Get labels of an image. Get labels of an image specified by the repo_name and tag.

Parameters:

  • repo_name

    The name of repository.

  • tag

    The tag of the image.

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

    the optional parameters

Returns:



5798
5799
5800
5801
# File 'lib/harbor1_client/api/products_api.rb', line 5798

def repositories_repo_name_tags_tag_labels_get(repo_name, tag, opts = {})
  data, _status_code, _headers = repositories_repo_name_tags_tag_labels_get_with_http_info(repo_name, tag, opts)
  data
end

#repositories_repo_name_tags_tag_labels_get_with_http_info(repo_name, tag, opts = {}) ⇒ Array<(Array<Label>, Fixnum, Hash)>

Get labels of an image. Get labels of an image specified by the repo_name and tag.

Parameters:

  • repo_name

    The name of repository.

  • tag

    The tag of the image.

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

    the optional parameters

Returns:

  • (Array<(Array<Label>, Fixnum, Hash)>)

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



5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
# File 'lib/harbor1_client/api/products_api.rb', line 5809

def repositories_repo_name_tags_tag_labels_get_with_http_info(repo_name, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_tags_tag_labels_get ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_tags_tag_labels_get"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling ProductsApi.repositories_repo_name_tags_tag_labels_get"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/tags/{tag}/labels'.sub('{' + 'repo_name' + '}', repo_name.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Label>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_tags_tag_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_tags_tag_labels_label_id_delete(repo_name, tag, label_id, opts = {}) ⇒ nil

Delete label from the image. Delete the label from the image specified by the repo_name and tag.

Parameters:

  • repo_name

    The name of repository.

  • tag

    The tag of the image.

  • label_id

    The ID of label.

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

    the optional parameters

Returns:

  • (nil)


5859
5860
5861
5862
# File 'lib/harbor1_client/api/products_api.rb', line 5859

def repositories_repo_name_tags_tag_labels_label_id_delete(repo_name, tag, label_id, opts = {})
  repositories_repo_name_tags_tag_labels_label_id_delete_with_http_info(repo_name, tag, label_id, opts)
  nil
end

#repositories_repo_name_tags_tag_labels_label_id_delete_with_http_info(repo_name, tag, label_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete label from the image. Delete the label from the image specified by the repo_name and tag.

Parameters:

  • repo_name

    The name of repository.

  • tag

    The tag of the image.

  • label_id

    The ID of label.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
# File 'lib/harbor1_client/api/products_api.rb', line 5871

def repositories_repo_name_tags_tag_labels_label_id_delete_with_http_info(repo_name, tag, label_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_tags_tag_labels_label_id_delete ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_tags_tag_labels_label_id_delete"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling ProductsApi.repositories_repo_name_tags_tag_labels_label_id_delete"
  end
  # verify the required parameter 'label_id' is set
  if @api_client.config.client_side_validation && label_id.nil?
    fail ArgumentError, "Missing the required parameter 'label_id' when calling ProductsApi.repositories_repo_name_tags_tag_labels_label_id_delete"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/tags/{tag}/labels/{label_id}'.sub('{' + 'repo_name' + '}', repo_name.to_s).sub('{' + 'tag' + '}', tag.to_s).sub('{' + 'label_id' + '}', label_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_tags_tag_labels_label_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_tags_tag_labels_post(repo_name, tag, label, opts = {}) ⇒ nil

Add a label to image. Add a label to the image.

Parameters:

  • repo_name

    The name of repository.

  • tag

    The tag of the image.

  • label

    Only the ID property is required.

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

    the optional parameters

Returns:

  • (nil)


5924
5925
5926
5927
# File 'lib/harbor1_client/api/products_api.rb', line 5924

def repositories_repo_name_tags_tag_labels_post(repo_name, tag, label, opts = {})
  repositories_repo_name_tags_tag_labels_post_with_http_info(repo_name, tag, label, opts)
  nil
end

#repositories_repo_name_tags_tag_labels_post_with_http_info(repo_name, tag, label, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Add a label to image. Add a label to the image.

Parameters:

  • repo_name

    The name of repository.

  • tag

    The tag of the image.

  • label

    Only the ID property is required.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
# File 'lib/harbor1_client/api/products_api.rb', line 5936

def repositories_repo_name_tags_tag_labels_post_with_http_info(repo_name, tag, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_tags_tag_labels_post ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_tags_tag_labels_post"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling ProductsApi.repositories_repo_name_tags_tag_labels_post"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling ProductsApi.repositories_repo_name_tags_tag_labels_post"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/tags/{tag}/labels'.sub('{' + 'repo_name' + '}', repo_name.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(label)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_tags_tag_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_tags_tag_manifest_get(repo_name, tag, opts = {}) ⇒ Manifest

Get manifests of a relevant repository. This endpoint aims to retreive manifests from a relevant repository.

Parameters:

  • repo_name

    Repository name

  • tag

    Tag name

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

    the optional parameters

Options Hash (opts):

  • :version (String)

    The version of manifest, valid value are &quot;v1&quot; and &quot;v2&quot;, default is &quot;v2&quot;

Returns:



5989
5990
5991
5992
# File 'lib/harbor1_client/api/products_api.rb', line 5989

def repositories_repo_name_tags_tag_manifest_get(repo_name, tag, opts = {})
  data, _status_code, _headers = repositories_repo_name_tags_tag_manifest_get_with_http_info(repo_name, tag, opts)
  data
end

#repositories_repo_name_tags_tag_manifest_get_with_http_info(repo_name, tag, opts = {}) ⇒ Array<(Manifest, Fixnum, Hash)>

Get manifests of a relevant repository. This endpoint aims to retreive manifests from a relevant repository.

Parameters:

  • repo_name

    Repository name

  • tag

    Tag name

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

    the optional parameters

Options Hash (opts):

  • :version (String)

    The version of manifest, valid value are &quot;v1&quot; and &quot;v2&quot;, default is &quot;v2&quot;

Returns:

  • (Array<(Manifest, Fixnum, Hash)>)

    Manifest data, response status code and response headers



6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
# File 'lib/harbor1_client/api/products_api.rb', line 6001

def repositories_repo_name_tags_tag_manifest_get_with_http_info(repo_name, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_tags_tag_manifest_get ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_tags_tag_manifest_get"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling ProductsApi.repositories_repo_name_tags_tag_manifest_get"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/tags/{tag}/manifest'.sub('{' + 'repo_name' + '}', repo_name.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}
  query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Manifest')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_tags_tag_manifest_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_tags_tag_scan_post(repo_name, tag, opts = {}) ⇒ nil

Scan the image. Trigger a scan targeting the artifact identified by the repo_name and tag.

Parameters:

  • repo_name

    Repository name

  • tag

    Tag name

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

    the optional parameters

Returns:

  • (nil)


6051
6052
6053
6054
# File 'lib/harbor1_client/api/products_api.rb', line 6051

def repositories_repo_name_tags_tag_scan_post(repo_name, tag, opts = {})
  repositories_repo_name_tags_tag_scan_post_with_http_info(repo_name, tag, opts)
  nil
end

#repositories_repo_name_tags_tag_scan_post_with_http_info(repo_name, tag, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Scan the image. Trigger a scan targeting the artifact identified by the repo_name and tag.

Parameters:

  • repo_name

    Repository name

  • tag

    Tag name

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
# File 'lib/harbor1_client/api/products_api.rb', line 6062

def repositories_repo_name_tags_tag_scan_post_with_http_info(repo_name, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_tags_tag_scan_post ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_tags_tag_scan_post"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling ProductsApi.repositories_repo_name_tags_tag_scan_post"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/tags/{tag}/scan'.sub('{' + 'repo_name' + '}', repo_name.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_tags_tag_scan_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_repo_name_tags_tag_scan_uuid_log_get(repo_name, tag, uuid, opts = {}) ⇒ String

Get scan log Get the log text stream for the given artifact and scan action.

Parameters:

  • repo_name

    Repository name

  • tag

    Tag name

  • uuid

    the scan unique identifier

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

    the optional parameters

Returns:

  • (String)


6111
6112
6113
6114
# File 'lib/harbor1_client/api/products_api.rb', line 6111

def repositories_repo_name_tags_tag_scan_uuid_log_get(repo_name, tag, uuid, opts = {})
  data, _status_code, _headers = repositories_repo_name_tags_tag_scan_uuid_log_get_with_http_info(repo_name, tag, uuid, opts)
  data
end

#repositories_repo_name_tags_tag_scan_uuid_log_get_with_http_info(repo_name, tag, uuid, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Get scan log Get the log text stream for the given artifact and scan action.

Parameters:

  • repo_name

    Repository name

  • tag

    Tag name

  • uuid

    the scan unique identifier

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

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
# File 'lib/harbor1_client/api/products_api.rb', line 6123

def repositories_repo_name_tags_tag_scan_uuid_log_get_with_http_info(repo_name, tag, uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_repo_name_tags_tag_scan_uuid_log_get ...'
  end
  # verify the required parameter 'repo_name' is set
  if @api_client.config.client_side_validation && repo_name.nil?
    fail ArgumentError, "Missing the required parameter 'repo_name' when calling ProductsApi.repositories_repo_name_tags_tag_scan_uuid_log_get"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling ProductsApi.repositories_repo_name_tags_tag_scan_uuid_log_get"
  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 ProductsApi.repositories_repo_name_tags_tag_scan_uuid_log_get"
  end
  # resource path
  local_var_path = '/repositories/{repo_name}/tags/{tag}/scan/{uuid}/log'.sub('{' + 'repo_name' + '}', repo_name.to_s).sub('{' + 'tag' + '}', tag.to_s).sub('{' + 'uuid' + '}', uuid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_repo_name_tags_tag_scan_uuid_log_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#repositories_top_get(opts = {}) ⇒ Array<Repository>

Get public repositories which are accessed most. This endpoint aims to let users see the most popular public repositories

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :count (Integer)

    The number of the requested public repositories, default is 10 if not provided.

Returns:



6175
6176
6177
6178
# File 'lib/harbor1_client/api/products_api.rb', line 6175

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

#repositories_top_get_with_http_info(opts = {}) ⇒ Array<(Array<Repository>, Fixnum, Hash)>

Get public repositories which are accessed most. This endpoint aims to let users see the most popular public repositories

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :count (Integer)

    The number of the requested public repositories, default is 10 if not provided.

Returns:

  • (Array<(Array<Repository>, Fixnum, Hash)>)

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



6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
# File 'lib/harbor1_client/api/products_api.rb', line 6185

def repositories_top_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.repositories_top_get ...'
  end
  # resource path
  local_var_path = '/repositories/top'

  # query parameters
  query_params = {}
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Repository>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#repositories_top_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retentions_id_executions_eid_patch(id, eid, action, opts = {}) ⇒ nil

Stop a Retention job Stop a Retention job, only support "stop" action now.

Parameters:

  • id

    Retention ID.

  • eid

    Retention execution ID.

  • action

    The action, only support &quot;stop&quot; now.

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

    the optional parameters

Returns:

  • (nil)


6228
6229
6230
6231
# File 'lib/harbor1_client/api/products_api.rb', line 6228

def retentions_id_executions_eid_patch(id, eid, action, opts = {})
  retentions_id_executions_eid_patch_with_http_info(id, eid, action, opts)
  nil
end

#retentions_id_executions_eid_patch_with_http_info(id, eid, action, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Stop a Retention job Stop a Retention job, only support &quot;stop&quot; action now.

Parameters:

  • id

    Retention ID.

  • eid

    Retention execution ID.

  • action

    The action, only support &quot;stop&quot; now.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
# File 'lib/harbor1_client/api/products_api.rb', line 6240

def retentions_id_executions_eid_patch_with_http_info(id, eid, action, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.retentions_id_executions_eid_patch ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.retentions_id_executions_eid_patch"
  end
  # verify the required parameter 'eid' is set
  if @api_client.config.client_side_validation && eid.nil?
    fail ArgumentError, "Missing the required parameter 'eid' when calling ProductsApi.retentions_id_executions_eid_patch"
  end
  # verify the required parameter 'action' is set
  if @api_client.config.client_side_validation && action.nil?
    fail ArgumentError, "Missing the required parameter 'action' when calling ProductsApi.retentions_id_executions_eid_patch"
  end
  # resource path
  local_var_path = '/retentions/{id}/executions/{eid}'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'eid' + '}', eid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(action)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#retentions_id_executions_eid_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retentions_id_executions_eid_tasks_get(id, eid, opts = {}) ⇒ Array<RetentionExecutionTask>

Get Retention job tasks Get Retention job tasks, each repository as a task.

Parameters:

  • id

    Retention ID.

  • eid

    Retention execution ID.

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

    the optional parameters

Returns:



6292
6293
6294
6295
# File 'lib/harbor1_client/api/products_api.rb', line 6292

def retentions_id_executions_eid_tasks_get(id, eid, opts = {})
  data, _status_code, _headers = retentions_id_executions_eid_tasks_get_with_http_info(id, eid, opts)
  data
end

#retentions_id_executions_eid_tasks_get_with_http_info(id, eid, opts = {}) ⇒ Array<(Array<RetentionExecutionTask>, Fixnum, Hash)>

Get Retention job tasks Get Retention job tasks, each repository as a task.

Parameters:

  • id

    Retention ID.

  • eid

    Retention execution ID.

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

    the optional parameters

Returns:

  • (Array<(Array<RetentionExecutionTask>, Fixnum, Hash)>)

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



6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
# File 'lib/harbor1_client/api/products_api.rb', line 6303

def retentions_id_executions_eid_tasks_get_with_http_info(id, eid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.retentions_id_executions_eid_tasks_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.retentions_id_executions_eid_tasks_get"
  end
  # verify the required parameter 'eid' is set
  if @api_client.config.client_side_validation && eid.nil?
    fail ArgumentError, "Missing the required parameter 'eid' when calling ProductsApi.retentions_id_executions_eid_tasks_get"
  end
  # resource path
  local_var_path = '/retentions/{id}/executions/{eid}/tasks'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'eid' + '}', eid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<RetentionExecutionTask>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#retentions_id_executions_eid_tasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retentions_id_executions_eid_tasks_tid_get(id, eid, tid, opts = {}) ⇒ String

Get Retention job task log Get Retention job task log, tags ratain or deletion detail will be shown in a table.

Parameters:

  • id

    Retention ID.

  • eid

    Retention execution ID.

  • tid

    Retention execution ID.

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

    the optional parameters

Returns:

  • (String)


6353
6354
6355
6356
# File 'lib/harbor1_client/api/products_api.rb', line 6353

def retentions_id_executions_eid_tasks_tid_get(id, eid, tid, opts = {})
  data, _status_code, _headers = retentions_id_executions_eid_tasks_tid_get_with_http_info(id, eid, tid, opts)
  data
end

#retentions_id_executions_eid_tasks_tid_get_with_http_info(id, eid, tid, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Get Retention job task log Get Retention job task log, tags ratain or deletion detail will be shown in a table.

Parameters:

  • id

    Retention ID.

  • eid

    Retention execution ID.

  • tid

    Retention execution ID.

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

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
# File 'lib/harbor1_client/api/products_api.rb', line 6365

def retentions_id_executions_eid_tasks_tid_get_with_http_info(id, eid, tid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.retentions_id_executions_eid_tasks_tid_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.retentions_id_executions_eid_tasks_tid_get"
  end
  # verify the required parameter 'eid' is set
  if @api_client.config.client_side_validation && eid.nil?
    fail ArgumentError, "Missing the required parameter 'eid' when calling ProductsApi.retentions_id_executions_eid_tasks_tid_get"
  end
  # verify the required parameter 'tid' is set
  if @api_client.config.client_side_validation && tid.nil?
    fail ArgumentError, "Missing the required parameter 'tid' when calling ProductsApi.retentions_id_executions_eid_tasks_tid_get"
  end
  # resource path
  local_var_path = '/retentions/{id}/executions/{eid}/tasks/{tid}'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'eid' + '}', eid.to_s).sub('{' + 'tid' + '}', tid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#retentions_id_executions_eid_tasks_tid_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retentions_id_executions_get(id, opts = {}) ⇒ Array<RetentionExecution>

Get a Retention job Get a Retention job, job status may be delayed before job service schedule it up.

Parameters:

  • id

    Retention ID.

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

    the optional parameters

Returns:



6417
6418
6419
6420
# File 'lib/harbor1_client/api/products_api.rb', line 6417

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

#retentions_id_executions_get_with_http_info(id, opts = {}) ⇒ Array<(Array<RetentionExecution>, Fixnum, Hash)>

Get a Retention job Get a Retention job, job status may be delayed before job service schedule it up.

Parameters:

  • id

    Retention ID.

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

    the optional parameters

Returns:

  • (Array<(Array<RetentionExecution>, Fixnum, Hash)>)

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



6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
# File 'lib/harbor1_client/api/products_api.rb', line 6427

def retentions_id_executions_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.retentions_id_executions_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.retentions_id_executions_get"
  end
  # resource path
  local_var_path = '/retentions/{id}/executions'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<RetentionExecution>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#retentions_id_executions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retentions_id_executions_post(id, action, opts = {}) ⇒ nil

Trigger a Retention job Trigger a Retention job, if dry_run is True, nothing would be deleted actually.

Parameters:

  • id

    Retention ID.

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

    the optional parameters

Returns:

  • (nil)


6472
6473
6474
6475
# File 'lib/harbor1_client/api/products_api.rb', line 6472

def retentions_id_executions_post(id, action, opts = {})
  retentions_id_executions_post_with_http_info(id, action, opts)
  nil
end

#retentions_id_executions_post_with_http_info(id, action, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Trigger a Retention job Trigger a Retention job, if dry_run is True, nothing would be deleted actually.

Parameters:

  • id

    Retention ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
# File 'lib/harbor1_client/api/products_api.rb', line 6483

def retentions_id_executions_post_with_http_info(id, action, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.retentions_id_executions_post ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.retentions_id_executions_post"
  end
  # verify the required parameter 'action' is set
  if @api_client.config.client_side_validation && action.nil?
    fail ArgumentError, "Missing the required parameter 'action' when calling ProductsApi.retentions_id_executions_post"
  end
  # resource path
  local_var_path = '/retentions/{id}/executions'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(action)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#retentions_id_executions_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retentions_id_get(id, opts = {}) ⇒ RetentionPolicy

Get Retention Policy Get Retention Policy.

Parameters:

  • id

    Retention ID.

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

    the optional parameters

Returns:



6530
6531
6532
6533
# File 'lib/harbor1_client/api/products_api.rb', line 6530

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

#retentions_id_get_with_http_info(id, opts = {}) ⇒ Array<(RetentionPolicy, Fixnum, Hash)>

Get Retention Policy Get Retention Policy.

Parameters:

  • id

    Retention ID.

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

    the optional parameters

Returns:

  • (Array<(RetentionPolicy, Fixnum, Hash)>)

    RetentionPolicy data, response status code and response headers



6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
# File 'lib/harbor1_client/api/products_api.rb', line 6540

def retentions_id_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.retentions_id_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.retentions_id_get"
  end
  # resource path
  local_var_path = '/retentions/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RetentionPolicy')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#retentions_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retentions_id_put(id, policy, opts = {}) ⇒ nil

Update Retention Policy Update Retention Policy, you can reference metadatas API for the policy model. You can check project metadatas to find whether a retention policy is already binded. This method should only be called when retention policy has already binded to project.

Parameters:

  • id

    Retention ID.

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

    the optional parameters

Returns:

  • (nil)


6585
6586
6587
6588
# File 'lib/harbor1_client/api/products_api.rb', line 6585

def retentions_id_put(id, policy, opts = {})
  retentions_id_put_with_http_info(id, policy, opts)
  nil
end

#retentions_id_put_with_http_info(id, policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update Retention Policy Update Retention Policy, you can reference metadatas API for the policy model. You can check project metadatas to find whether a retention policy is already binded. This method should only be called when retention policy has already binded to project.

Parameters:

  • id

    Retention ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
# File 'lib/harbor1_client/api/products_api.rb', line 6596

def retentions_id_put_with_http_info(id, policy, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.retentions_id_put ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.retentions_id_put"
  end
  # verify the required parameter 'policy' is set
  if @api_client.config.client_side_validation && policy.nil?
    fail ArgumentError, "Missing the required parameter 'policy' when calling ProductsApi.retentions_id_put"
  end
  # resource path
  local_var_path = '/retentions/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(policy)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#retentions_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retentions_metadatas_get(opts = {}) ⇒ RetentionMetadata

Get Retention Metadatas Get Retention Metadatas.

Parameters:

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

    the optional parameters

Returns:



6642
6643
6644
6645
# File 'lib/harbor1_client/api/products_api.rb', line 6642

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

#retentions_metadatas_get_with_http_info(opts = {}) ⇒ Array<(RetentionMetadata, Fixnum, Hash)>

Get Retention Metadatas Get Retention Metadatas.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(RetentionMetadata, Fixnum, Hash)>)

    RetentionMetadata data, response status code and response headers



6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
# File 'lib/harbor1_client/api/products_api.rb', line 6651

def retentions_metadatas_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.retentions_metadatas_get ...'
  end
  # resource path
  local_var_path = '/retentions/metadatas'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RetentionMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#retentions_metadatas_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retentions_post(policy, opts = {}) ⇒ nil

Create Retention Policy Create Retention Policy, you can reference metadatas API for the policy model. You can check project metadatas to find whether a retention policy is already binded. This method should only be called when no retention policy binded to project yet.

Parameters:

  • policy

    Create Retention Policy successfully.

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

    the optional parameters

Returns:

  • (nil)


6691
6692
6693
6694
# File 'lib/harbor1_client/api/products_api.rb', line 6691

def retentions_post(policy, opts = {})
  retentions_post_with_http_info(policy, opts)
  nil
end

#retentions_post_with_http_info(policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create Retention Policy Create Retention Policy, you can reference metadatas API for the policy model. You can check project metadatas to find whether a retention policy is already binded. This method should only be called when no retention policy binded to project yet.

Parameters:

  • policy

    Create Retention Policy successfully.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
# File 'lib/harbor1_client/api/products_api.rb', line 6701

def retentions_post_with_http_info(policy, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.retentions_post ...'
  end
  # verify the required parameter 'policy' is set
  if @api_client.config.client_side_validation && policy.nil?
    fail ArgumentError, "Missing the required parameter 'policy' when calling ProductsApi.retentions_post"
  end
  # resource path
  local_var_path = '/retentions'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(policy)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#retentions_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scanners_get(opts = {}) ⇒ Array<ScannerRegistration>

List scanner registrations Returns a list of currently configured scanner registrations.

Parameters:

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

    the optional parameters

Returns:



6743
6744
6745
6746
# File 'lib/harbor1_client/api/products_api.rb', line 6743

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

#scanners_get_with_http_info(opts = {}) ⇒ Array<(Array<ScannerRegistration>, Fixnum, Hash)>

List scanner registrations Returns a list of currently configured scanner registrations.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Array<ScannerRegistration>, Fixnum, Hash)>)

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



6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
# File 'lib/harbor1_client/api/products_api.rb', line 6752

def scanners_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.scanners_get ...'
  end
  # resource path
  local_var_path = '/scanners'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ScannerRegistration>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#scanners_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scanners_ping_post(settings, opts = {}) ⇒ nil

Tests scanner registration settings Pings scanner adapter to test endpoint URL and authorization settings.

Parameters:

  • settings

    A scanner registration settings to be tested.

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

    the optional parameters

Returns:

  • (nil)


6792
6793
6794
6795
# File 'lib/harbor1_client/api/products_api.rb', line 6792

def scanners_ping_post(settings, opts = {})
  scanners_ping_post_with_http_info(settings, opts)
  nil
end

#scanners_ping_post_with_http_info(settings, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Tests scanner registration settings Pings scanner adapter to test endpoint URL and authorization settings.

Parameters:

  • settings

    A scanner registration settings to be tested.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
# File 'lib/harbor1_client/api/products_api.rb', line 6802

def scanners_ping_post_with_http_info(settings, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.scanners_ping_post ...'
  end
  # verify the required parameter 'settings' is set
  if @api_client.config.client_side_validation && settings.nil?
    fail ArgumentError, "Missing the required parameter 'settings' when calling ProductsApi.scanners_ping_post"
  end
  # resource path
  local_var_path = '/scanners/ping'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(settings)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#scanners_ping_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scanners_registration_id_get(registration_id, opts = {}) ⇒ ScannerRegistration

Get a scanner registration details Retruns the details of the specified scanner registration.

Parameters:

  • registration_id

    The scanner registration identifer.

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

    the optional parameters

Returns:



6845
6846
6847
6848
# File 'lib/harbor1_client/api/products_api.rb', line 6845

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

#scanners_registration_id_get_with_http_info(registration_id, opts = {}) ⇒ Array<(ScannerRegistration, Fixnum, Hash)>

Get a scanner registration details Retruns the details of the specified scanner registration.

Parameters:

  • registration_id

    The scanner registration identifer.

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

    the optional parameters

Returns:

  • (Array<(ScannerRegistration, Fixnum, Hash)>)

    ScannerRegistration data, response status code and response headers



6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
# File 'lib/harbor1_client/api/products_api.rb', line 6855

def scanners_registration_id_get_with_http_info(registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.scanners_registration_id_get ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling ProductsApi.scanners_registration_id_get"
  end
  # resource path
  local_var_path = '/scanners/{registration_id}'.sub('{' + 'registration_id' + '}', registration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ScannerRegistration')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#scanners_registration_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scanners_registration_id_metadata_get(registration_id, opts = {}) ⇒ ScannerAdapterMetadata

Get the metadata of the specified scanner registration Get the metadata of the specified scanner registration, including the capabilities and customzied properties.

Parameters:

  • registration_id

    The scanner registration identifier.

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

    the optional parameters

Returns:



6899
6900
6901
6902
# File 'lib/harbor1_client/api/products_api.rb', line 6899

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

#scanners_registration_id_metadata_get_with_http_info(registration_id, opts = {}) ⇒ Array<(ScannerAdapterMetadata, Fixnum, Hash)>

Get the metadata of the specified scanner registration Get the metadata of the specified scanner registration, including the capabilities and customzied properties.

Parameters:

  • registration_id

    The scanner registration identifier.

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

    the optional parameters

Returns:

  • (Array<(ScannerAdapterMetadata, Fixnum, Hash)>)

    ScannerAdapterMetadata data, response status code and response headers



6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
# File 'lib/harbor1_client/api/products_api.rb', line 6909

def (registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.scanners_registration_id_metadata_get ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling ProductsApi.scanners_registration_id_metadata_get"
  end
  # resource path
  local_var_path = '/scanners/{registration_id}/metadata'.sub('{' + 'registration_id' + '}', registration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ScannerAdapterMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#scanners_registration_id_metadata_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scans_all_metrics_get(opts = {}) ⇒ Stats

Get the metrics of the latest scan all process Get the metrics of the latest scan all process

Parameters:

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

    the optional parameters

Returns:



6952
6953
6954
6955
# File 'lib/harbor1_client/api/products_api.rb', line 6952

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

#scans_all_metrics_get_with_http_info(opts = {}) ⇒ Array<(Stats, Fixnum, Hash)>

Get the metrics of the latest scan all process Get the metrics of the latest scan all process

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Stats, Fixnum, Hash)>)

    Stats data, response status code and response headers



6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
# File 'lib/harbor1_client/api/products_api.rb', line 6961

def scans_all_metrics_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.scans_all_metrics_get ...'
  end
  # resource path
  local_var_path = '/scans/all/metrics'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Stats')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#scans_all_metrics_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scans_schedule_metrics_get(opts = {}) ⇒ Stats

Get the metrics of the latest scheduled scan all process Get the metrics of the latest scheduled scan all process

Parameters:

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

    the optional parameters

Returns:



7000
7001
7002
7003
# File 'lib/harbor1_client/api/products_api.rb', line 7000

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

#scans_schedule_metrics_get_with_http_info(opts = {}) ⇒ Array<(Stats, Fixnum, Hash)>

Get the metrics of the latest scheduled scan all process Get the metrics of the latest scheduled scan all process

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Stats, Fixnum, Hash)>)

    Stats data, response status code and response headers



7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
# File 'lib/harbor1_client/api/products_api.rb', line 7009

def scans_schedule_metrics_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.scans_schedule_metrics_get ...'
  end
  # resource path
  local_var_path = '/scans/schedule/metrics'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Stats')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#scans_schedule_metrics_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#search_get(q, opts = {}) ⇒ Array<Search>

Search for projects, repositories and helm charts The Search endpoint returns information about the projects ,repositories and helm charts offered at public status or related to the current logged in user. The response includes the project, repository list and charts in a proper display order.

Parameters:

  • q

    Search parameter for project and repository name.

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

    the optional parameters

Returns:



7049
7050
7051
7052
# File 'lib/harbor1_client/api/products_api.rb', line 7049

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

#search_get_with_http_info(q, opts = {}) ⇒ Array<(Array<Search>, Fixnum, Hash)>

Search for projects, repositories and helm charts The Search endpoint returns information about the projects ,repositories and helm charts offered at public status or related to the current logged in user. The response includes the project, repository list and charts in a proper display order.

Parameters:

  • q

    Search parameter for project and repository name.

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

    the optional parameters

Returns:

  • (Array<(Array<Search>, Fixnum, Hash)>)

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



7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
# File 'lib/harbor1_client/api/products_api.rb', line 7059

def search_get_with_http_info(q, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.search_get ...'
  end
  # verify the required parameter 'q' is set
  if @api_client.config.client_side_validation && q.nil?
    fail ArgumentError, "Missing the required parameter 'q' when calling ProductsApi.search_get"
  end
  # resource path
  local_var_path = '/search'

  # query parameters
  query_params = {}
  query_params[:'q'] = q

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Search>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#search_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#statistics_get(opts = {}) ⇒ StatisticMap

Get projects number and repositories number relevant to the user This endpoint is aimed to statistic all of the projects number and repositories number relevant to the logined user, also the public projects number and repositories number. If the user is admin, he can also get total projects number and total repositories number.

Parameters:

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

    the optional parameters

Returns:



7103
7104
7105
7106
# File 'lib/harbor1_client/api/products_api.rb', line 7103

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

#statistics_get_with_http_info(opts = {}) ⇒ Array<(StatisticMap, Fixnum, Hash)>

Get projects number and repositories number relevant to the user This endpoint is aimed to statistic all of the projects number and repositories number relevant to the logined user, also the public projects number and repositories number. If the user is admin, he can also get total projects number and total repositories number.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(StatisticMap, Fixnum, Hash)>)

    StatisticMap data, response status code and response headers



7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
# File 'lib/harbor1_client/api/products_api.rb', line 7112

def statistics_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.statistics_get ...'
  end
  # resource path
  local_var_path = '/statistics'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StatisticMap')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#statistics_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_cve_whitelist_get(opts = {}) ⇒ CVEWhitelist

Get the system level whitelist of CVE. Get the system level whitelist of CVE. This API can be called by all authenticated users.

Parameters:

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

    the optional parameters

Returns:



7151
7152
7153
7154
# File 'lib/harbor1_client/api/products_api.rb', line 7151

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

#system_cve_whitelist_get_with_http_info(opts = {}) ⇒ Array<(CVEWhitelist, Fixnum, Hash)>

Get the system level whitelist of CVE. Get the system level whitelist of CVE. This API can be called by all authenticated users.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(CVEWhitelist, Fixnum, Hash)>)

    CVEWhitelist data, response status code and response headers



7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
# File 'lib/harbor1_client/api/products_api.rb', line 7160

def system_cve_whitelist_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.system_cve_whitelist_get ...'
  end
  # resource path
  local_var_path = '/system/CVEWhitelist'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CVEWhitelist')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#system_cve_whitelist_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_cve_whitelist_put(opts = {}) ⇒ nil

Update the system level whitelist of CVE. This API overwrites the system level whitelist of CVE with the list in request body. Only system Admin has permission to call this API.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :whitelist (CVEWhitelist)

    The whitelist with new content

Returns:

  • (nil)


7200
7201
7202
7203
# File 'lib/harbor1_client/api/products_api.rb', line 7200

def system_cve_whitelist_put(opts = {})
  system_cve_whitelist_put_with_http_info(opts)
  nil
end

#system_cve_whitelist_put_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update the system level whitelist of CVE. This API overwrites the system level whitelist of CVE with the list in request body. Only system Admin has permission to call this API.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :whitelist (CVEWhitelist)

    The whitelist with new content

Returns:

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

    nil, response status code and response headers



7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
# File 'lib/harbor1_client/api/products_api.rb', line 7210

def system_cve_whitelist_put_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.system_cve_whitelist_put ...'
  end
  # resource path
  local_var_path = '/system/CVEWhitelist'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'whitelist'])
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#system_cve_whitelist_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_gc_get(opts = {}) ⇒ Array<GCResult>

Get gc results. This endpoint let user get latest ten gc results.

Parameters:

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

    the optional parameters

Returns:



7248
7249
7250
7251
# File 'lib/harbor1_client/api/products_api.rb', line 7248

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

#system_gc_get_with_http_info(opts = {}) ⇒ Array<(Array<GCResult>, Fixnum, Hash)>

Get gc results. This endpoint let user get latest ten gc results.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Array<GCResult>, Fixnum, Hash)>)

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



7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
# File 'lib/harbor1_client/api/products_api.rb', line 7257

def system_gc_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.system_gc_get ...'
  end
  # resource path
  local_var_path = '/system/gc'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<GCResult>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#system_gc_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_gc_id_get(id, opts = {}) ⇒ GCResult

Get gc status. This endpoint let user get gc status filtered by specific ID.

Parameters:

  • id

    Relevant job ID

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

    the optional parameters

Returns:



7297
7298
7299
7300
# File 'lib/harbor1_client/api/products_api.rb', line 7297

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

#system_gc_id_get_with_http_info(id, opts = {}) ⇒ Array<(GCResult, Fixnum, Hash)>

Get gc status. This endpoint let user get gc status filtered by specific ID.

Parameters:

  • id

    Relevant job ID

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

    the optional parameters

Returns:

  • (Array<(GCResult, Fixnum, Hash)>)

    GCResult data, response status code and response headers



7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
# File 'lib/harbor1_client/api/products_api.rb', line 7307

def system_gc_id_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.system_gc_id_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.system_gc_id_get"
  end
  # resource path
  local_var_path = '/system/gc/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GCResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#system_gc_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_gc_id_log_get(id, opts = {}) ⇒ String

Get gc job log. This endpoint let user get gc job logs filtered by specific ID.

Parameters:

  • id

    Relevant job ID

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

    the optional parameters

Returns:

  • (String)


7351
7352
7353
7354
# File 'lib/harbor1_client/api/products_api.rb', line 7351

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

#system_gc_id_log_get_with_http_info(id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Get gc job log. This endpoint let user get gc job logs filtered by specific ID.

Parameters:

  • id

    Relevant job ID

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

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
# File 'lib/harbor1_client/api/products_api.rb', line 7361

def system_gc_id_log_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.system_gc_id_log_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProductsApi.system_gc_id_log_get"
  end
  # resource path
  local_var_path = '/system/gc/{id}/log'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#system_gc_id_log_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_gc_schedule_get(opts = {}) ⇒ AdminJobSchedule

Get gc’s schedule. This endpoint is for get schedule of gc job.

Parameters:

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

    the optional parameters

Returns:



7404
7405
7406
7407
# File 'lib/harbor1_client/api/products_api.rb', line 7404

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

#system_gc_schedule_get_with_http_info(opts = {}) ⇒ Array<(AdminJobSchedule, Fixnum, Hash)>

Get gc&#39;s schedule. This endpoint is for get schedule of gc job.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(AdminJobSchedule, Fixnum, Hash)>)

    AdminJobSchedule data, response status code and response headers



7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
# File 'lib/harbor1_client/api/products_api.rb', line 7413

def system_gc_schedule_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.system_gc_schedule_get ...'
  end
  # resource path
  local_var_path = '/system/gc/schedule'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AdminJobSchedule')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#system_gc_schedule_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_gc_schedule_post(schedule, opts = {}) ⇒ nil

Create a gc schedule. This endpoint is for update gc schedule.

Parameters:

  • schedule

    Updates of gc&#39;s schedule.

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

    the optional parameters

Returns:

  • (nil)


7453
7454
7455
7456
# File 'lib/harbor1_client/api/products_api.rb', line 7453

def system_gc_schedule_post(schedule, opts = {})
  system_gc_schedule_post_with_http_info(schedule, opts)
  nil
end

#system_gc_schedule_post_with_http_info(schedule, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create a gc schedule. This endpoint is for update gc schedule.

Parameters:

  • schedule

    Updates of gc&#39;s schedule.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
# File 'lib/harbor1_client/api/products_api.rb', line 7463

def system_gc_schedule_post_with_http_info(schedule, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.system_gc_schedule_post ...'
  end
  # verify the required parameter 'schedule' is set
  if @api_client.config.client_side_validation && schedule.nil?
    fail ArgumentError, "Missing the required parameter 'schedule' when calling ProductsApi.system_gc_schedule_post"
  end
  # resource path
  local_var_path = '/system/gc/schedule'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(schedule)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#system_gc_schedule_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_gc_schedule_put(schedule, opts = {}) ⇒ nil

Update gc’s schedule. This endpoint is for update gc schedule.

Parameters:

  • schedule

    Updates of gc&#39;s schedule.

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

    the optional parameters

Returns:

  • (nil)


7506
7507
7508
7509
# File 'lib/harbor1_client/api/products_api.rb', line 7506

def system_gc_schedule_put(schedule, opts = {})
  system_gc_schedule_put_with_http_info(schedule, opts)
  nil
end

#system_gc_schedule_put_with_http_info(schedule, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update gc&#39;s schedule. This endpoint is for update gc schedule.

Parameters:

  • schedule

    Updates of gc&#39;s schedule.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
# File 'lib/harbor1_client/api/products_api.rb', line 7516

def system_gc_schedule_put_with_http_info(schedule, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.system_gc_schedule_put ...'
  end
  # verify the required parameter 'schedule' is set
  if @api_client.config.client_side_validation && schedule.nil?
    fail ArgumentError, "Missing the required parameter 'schedule' when calling ProductsApi.system_gc_schedule_put"
  end
  # resource path
  local_var_path = '/system/gc/schedule'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(schedule)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#system_gc_schedule_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_oidc_ping_post(endpoint, opts = {}) ⇒ nil

Test the OIDC endpoint. Test the OIDC endpoint, the setting of the endpoint is provided in the request. This API can only be called by system admin.

Parameters:

  • endpoint

    Request body for OIDC endpoint to be tested.

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

    the optional parameters

Returns:

  • (nil)


7559
7560
7561
7562
# File 'lib/harbor1_client/api/products_api.rb', line 7559

def system_oidc_ping_post(endpoint, opts = {})
  system_oidc_ping_post_with_http_info(endpoint, opts)
  nil
end

#system_oidc_ping_post_with_http_info(endpoint, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Test the OIDC endpoint. Test the OIDC endpoint, the setting of the endpoint is provided in the request. This API can only be called by system admin.

Parameters:

  • endpoint

    Request body for OIDC endpoint to be tested.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
# File 'lib/harbor1_client/api/products_api.rb', line 7569

def system_oidc_ping_post_with_http_info(endpoint, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.system_oidc_ping_post ...'
  end
  # verify the required parameter 'endpoint' is set
  if @api_client.config.client_side_validation && endpoint.nil?
    fail ArgumentError, "Missing the required parameter 'endpoint' when calling ProductsApi.system_oidc_ping_post"
  end
  # resource path
  local_var_path = '/system/oidc/ping'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(endpoint)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#system_oidc_ping_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_scan_all_schedule_get(opts = {}) ⇒ AdminJobSchedule

Get scan_all’s schedule. This endpoint is for getting a schedule for the scan all job, which scans all of images in Harbor.

Parameters:

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

    the optional parameters

Returns:



7611
7612
7613
7614
# File 'lib/harbor1_client/api/products_api.rb', line 7611

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

#system_scan_all_schedule_get_with_http_info(opts = {}) ⇒ Array<(AdminJobSchedule, Fixnum, Hash)>

Get scan_all&#39;s schedule. This endpoint is for getting a schedule for the scan all job, which scans all of images in Harbor.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(AdminJobSchedule, Fixnum, Hash)>)

    AdminJobSchedule data, response status code and response headers



7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
# File 'lib/harbor1_client/api/products_api.rb', line 7620

def system_scan_all_schedule_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.system_scan_all_schedule_get ...'
  end
  # resource path
  local_var_path = '/system/scanAll/schedule'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AdminJobSchedule')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#system_scan_all_schedule_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_scan_all_schedule_post(schedule, opts = {}) ⇒ nil

Create a schedule or a manual trigger for the scan all job. This endpoint is for creating a schedule or a manual trigger for the scan all job, which scans all of images in Harbor.

Parameters:

  • schedule

    Create a schedule or a manual trigger for the scan all job.

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

    the optional parameters

Returns:

  • (nil)


7660
7661
7662
7663
# File 'lib/harbor1_client/api/products_api.rb', line 7660

def system_scan_all_schedule_post(schedule, opts = {})
  system_scan_all_schedule_post_with_http_info(schedule, opts)
  nil
end

#system_scan_all_schedule_post_with_http_info(schedule, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create a schedule or a manual trigger for the scan all job. This endpoint is for creating a schedule or a manual trigger for the scan all job, which scans all of images in Harbor.

Parameters:

  • schedule

    Create a schedule or a manual trigger for the scan all job.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
# File 'lib/harbor1_client/api/products_api.rb', line 7670

def system_scan_all_schedule_post_with_http_info(schedule, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.system_scan_all_schedule_post ...'
  end
  # verify the required parameter 'schedule' is set
  if @api_client.config.client_side_validation && schedule.nil?
    fail ArgumentError, "Missing the required parameter 'schedule' when calling ProductsApi.system_scan_all_schedule_post"
  end
  # resource path
  local_var_path = '/system/scanAll/schedule'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(schedule)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#system_scan_all_schedule_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_scan_all_schedule_put(schedule, opts = {}) ⇒ nil

Update scan all’s schedule. This endpoint is for updating the schedule of scan all job, which scans all of images in Harbor.

Parameters:

  • schedule

    Updates the schedule of scan all job, which scans all of images in Harbor.

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

    the optional parameters

Returns:

  • (nil)


7713
7714
7715
7716
# File 'lib/harbor1_client/api/products_api.rb', line 7713

def system_scan_all_schedule_put(schedule, opts = {})
  system_scan_all_schedule_put_with_http_info(schedule, opts)
  nil
end

#system_scan_all_schedule_put_with_http_info(schedule, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update scan all&#39;s schedule. This endpoint is for updating the schedule of scan all job, which scans all of images in Harbor.

Parameters:

  • schedule

    Updates the schedule of scan all job, which scans all of images in Harbor.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
# File 'lib/harbor1_client/api/products_api.rb', line 7723

def system_scan_all_schedule_put_with_http_info(schedule, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.system_scan_all_schedule_put ...'
  end
  # verify the required parameter 'schedule' is set
  if @api_client.config.client_side_validation && schedule.nil?
    fail ArgumentError, "Missing the required parameter 'schedule' when calling ProductsApi.system_scan_all_schedule_put"
  end
  # resource path
  local_var_path = '/system/scanAll/schedule'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(schedule)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#system_scan_all_schedule_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#systeminfo_get(opts = {}) ⇒ GeneralInfo

Get general system info This API is for retrieving general system info, this can be called by anonymous request.

Parameters:

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

    the optional parameters

Returns:



7765
7766
7767
7768
# File 'lib/harbor1_client/api/products_api.rb', line 7765

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

#systeminfo_get_with_http_info(opts = {}) ⇒ Array<(GeneralInfo, Fixnum, Hash)>

Get general system info This API is for retrieving general system info, this can be called by anonymous request.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(GeneralInfo, Fixnum, Hash)>)

    GeneralInfo data, response status code and response headers



7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
# File 'lib/harbor1_client/api/products_api.rb', line 7774

def systeminfo_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.systeminfo_get ...'
  end
  # resource path
  local_var_path = '/systeminfo'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GeneralInfo')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#systeminfo_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#systeminfo_getcert_get(opts = {}) ⇒ nil

Get default root certificate. This endpoint is for downloading a default root certificate.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


7813
7814
7815
7816
# File 'lib/harbor1_client/api/products_api.rb', line 7813

def systeminfo_getcert_get(opts = {})
  systeminfo_getcert_get_with_http_info(opts)
  nil
end

#systeminfo_getcert_get_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get default root certificate. This endpoint is for downloading a default root certificate.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
# File 'lib/harbor1_client/api/products_api.rb', line 7822

def systeminfo_getcert_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.systeminfo_getcert_get ...'
  end
  # resource path
  local_var_path = '/systeminfo/getcert'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#systeminfo_getcert_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#systeminfo_volumes_get(opts = {}) ⇒ SystemInfo

Get system volume info (total/free size). This endpoint is for retrieving system volume info that only provides for admin user.

Parameters:

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

    the optional parameters

Returns:



7860
7861
7862
7863
# File 'lib/harbor1_client/api/products_api.rb', line 7860

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

#systeminfo_volumes_get_with_http_info(opts = {}) ⇒ Array<(SystemInfo, Fixnum, Hash)>

Get system volume info (total/free size). This endpoint is for retrieving system volume info that only provides for admin user.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(SystemInfo, Fixnum, Hash)>)

    SystemInfo data, response status code and response headers



7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
# File 'lib/harbor1_client/api/products_api.rb', line 7869

def systeminfo_volumes_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.systeminfo_volumes_get ...'
  end
  # resource path
  local_var_path = '/systeminfo/volumes'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SystemInfo')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#systeminfo_volumes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#usergroups_get(opts = {}) ⇒ Array<UserGroup>

Get all user groups information Get all user groups information

Parameters:

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

    the optional parameters

Returns:



7908
7909
7910
7911
# File 'lib/harbor1_client/api/products_api.rb', line 7908

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

#usergroups_get_with_http_info(opts = {}) ⇒ Array<(Array<UserGroup>, Fixnum, Hash)>

Get all user groups information Get all user groups information

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Array<UserGroup>, Fixnum, Hash)>)

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



7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
# File 'lib/harbor1_client/api/products_api.rb', line 7917

def usergroups_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.usergroups_get ...'
  end
  # resource path
  local_var_path = '/usergroups'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<UserGroup>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#usergroups_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#usergroups_group_id_delete(group_id, opts = {}) ⇒ nil

Delete user group Delete user group

Parameters:

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

    the optional parameters

Returns:

  • (nil)


7957
7958
7959
7960
# File 'lib/harbor1_client/api/products_api.rb', line 7957

def usergroups_group_id_delete(group_id, opts = {})
  usergroups_group_id_delete_with_http_info(group_id, opts)
  nil
end

#usergroups_group_id_delete_with_http_info(group_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete user group Delete user group

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
# File 'lib/harbor1_client/api/products_api.rb', line 7967

def usergroups_group_id_delete_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.usergroups_group_id_delete ...'
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling ProductsApi.usergroups_group_id_delete"
  end
  # resource path
  local_var_path = '/usergroups/{group_id}'.sub('{' + 'group_id' + '}', group_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#usergroups_group_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#usergroups_group_id_get(group_id, opts = {}) ⇒ UserGroup

Get user group information Get user group information

Parameters:

  • group_id

    Group ID

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

    the optional parameters

Returns:



8010
8011
8012
8013
# File 'lib/harbor1_client/api/products_api.rb', line 8010

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

#usergroups_group_id_get_with_http_info(group_id, opts = {}) ⇒ Array<(UserGroup, Fixnum, Hash)>

Get user group information Get user group information

Parameters:

  • group_id

    Group ID

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

    the optional parameters

Returns:

  • (Array<(UserGroup, Fixnum, Hash)>)

    UserGroup data, response status code and response headers



8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
# File 'lib/harbor1_client/api/products_api.rb', line 8020

def usergroups_group_id_get_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.usergroups_group_id_get ...'
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling ProductsApi.usergroups_group_id_get"
  end
  # resource path
  local_var_path = '/usergroups/{group_id}'.sub('{' + 'group_id' + '}', group_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UserGroup')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#usergroups_group_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#usergroups_group_id_put(group_id, opts = {}) ⇒ nil

Update group information Update user group information

Parameters:

  • group_id

    Group ID

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

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


8065
8066
8067
8068
# File 'lib/harbor1_client/api/products_api.rb', line 8065

def usergroups_group_id_put(group_id, opts = {})
  usergroups_group_id_put_with_http_info(group_id, opts)
  nil
end

#usergroups_group_id_put_with_http_info(group_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update group information Update user group information

Parameters:

  • group_id

    Group ID

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

    the optional parameters

Options Hash (opts):

Returns:

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

    nil, response status code and response headers



8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
# File 'lib/harbor1_client/api/products_api.rb', line 8076

def usergroups_group_id_put_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.usergroups_group_id_put ...'
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling ProductsApi.usergroups_group_id_put"
  end
  # resource path
  local_var_path = '/usergroups/{group_id}'.sub('{' + 'group_id' + '}', group_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'usergroup'])
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#usergroups_group_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#usergroups_post(opts = {}) ⇒ nil

Create user group Create user group information

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


8119
8120
8121
8122
# File 'lib/harbor1_client/api/products_api.rb', line 8119

def usergroups_post(opts = {})
  usergroups_post_with_http_info(opts)
  nil
end

#usergroups_post_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create user group Create user group information

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    nil, response status code and response headers



8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
# File 'lib/harbor1_client/api/products_api.rb', line 8129

def usergroups_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.usergroups_post ...'
  end
  # resource path
  local_var_path = '/usergroups'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'usergroup'])
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#usergroups_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_current_get(opts = {}) ⇒ User

Get current user info. This endpoint is to get the current user information.

Parameters:

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

    the optional parameters

Returns:



8167
8168
8169
8170
# File 'lib/harbor1_client/api/products_api.rb', line 8167

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

#users_current_get_with_http_info(opts = {}) ⇒ Array<(User, Fixnum, Hash)>

Get current user info. This endpoint is to get the current user information.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(User, Fixnum, Hash)>)

    User data, response status code and response headers



8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
# File 'lib/harbor1_client/api/products_api.rb', line 8176

def users_current_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.users_current_get ...'
  end
  # resource path
  local_var_path = '/users/current'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'User')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#users_current_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_current_permissions_get(opts = {}) ⇒ Array<Permission>

Get current user permissions. This endpoint is to get the current user permissions.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :scope (String)

    Get permissions of the scope

  • :relative (BOOLEAN)

    If true, the resources in the response are relative to the scope, eg for resource &#39;/project/1/repository&#39; if relative is &#39;true&#39; then the resource in response will be &#39;repository&#39;.

Returns:



8217
8218
8219
8220
# File 'lib/harbor1_client/api/products_api.rb', line 8217

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

#users_current_permissions_get_with_http_info(opts = {}) ⇒ Array<(Array<Permission>, Fixnum, Hash)>

Get current user permissions. This endpoint is to get the current user permissions.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :scope (String)

    Get permissions of the scope

  • :relative (BOOLEAN)

    If true, the resources in the response are relative to the scope, eg for resource &#39;/project/1/repository&#39; if relative is &#39;true&#39; then the resource in response will be &#39;repository&#39;.

Returns:

  • (Array<(Array<Permission>, Fixnum, Hash)>)

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



8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
# File 'lib/harbor1_client/api/products_api.rb', line 8228

def users_current_permissions_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.users_current_permissions_get ...'
  end
  # resource path
  local_var_path = '/users/current/permissions'

  # query parameters
  query_params = {}
  query_params[:'scope'] = opts[:'scope'] if !opts[:'scope'].nil?
  query_params[:'relative'] = opts[:'relative'] if !opts[:'relative'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Permission>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#users_current_permissions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_get(opts = {}) ⇒ Array<User>

Get registered users of Harbor. This endpoint is for user to search registered users, support for filtering results with username.Notice, by now this operation is only for administrator.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :username (String)

    Username for filtering results.

  • :email (String)

    Email for filtering results.

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page.

Returns:



8273
8274
8275
8276
# File 'lib/harbor1_client/api/products_api.rb', line 8273

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

#users_get_with_http_info(opts = {}) ⇒ Array<(Array<User>, Fixnum, Hash)>

Get registered users of Harbor. This endpoint is for user to search registered users, support for filtering results with username.Notice, by now this operation is only for administrator.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :username (String)

    Username for filtering results.

  • :email (String)

    Email for filtering results.

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page.

Returns:

  • (Array<(Array<User>, Fixnum, Hash)>)

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



8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
# File 'lib/harbor1_client/api/products_api.rb', line 8286

def users_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.users_get ...'
  end
  # resource path
  local_var_path = '/users'

  # query parameters
  query_params = {}
  query_params[:'username'] = opts[:'username'] if !opts[:'username'].nil?
  query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<User>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#users_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_post(user, opts = {}) ⇒ nil

Creates a new user account. This endpoint is to create a user if the user does not already exist.

Parameters:

  • user

    New created user.

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

    the optional parameters

Returns:

  • (nil)


8330
8331
8332
8333
# File 'lib/harbor1_client/api/products_api.rb', line 8330

def users_post(user, opts = {})
  users_post_with_http_info(user, opts)
  nil
end

#users_post_with_http_info(user, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Creates a new user account. This endpoint is to create a user if the user does not already exist.

Parameters:

  • user

    New created user.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
# File 'lib/harbor1_client/api/products_api.rb', line 8340

def users_post_with_http_info(user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.users_post ...'
  end
  # verify the required parameter 'user' is set
  if @api_client.config.client_side_validation && user.nil?
    fail ArgumentError, "Missing the required parameter 'user' when calling ProductsApi.users_post"
  end
  # resource path
  local_var_path = '/users'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(user)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#users_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_search_get(username, opts = {}) ⇒ Array<UserSearch>

Search users by username This endpoint is to search the users by username.

Parameters:

  • username

    Username for filtering results.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page.

Returns:



8385
8386
8387
8388
# File 'lib/harbor1_client/api/products_api.rb', line 8385

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

#users_search_get_with_http_info(username, opts = {}) ⇒ Array<(Array<UserSearch>, Fixnum, Hash)>

Search users by username This endpoint is to search the users by username.

Parameters:

  • username

    Username for filtering results.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page number, default is 1.

  • :page_size (Integer)

    The size of per page.

Returns:

  • (Array<(Array<UserSearch>, Fixnum, Hash)>)

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



8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
# File 'lib/harbor1_client/api/products_api.rb', line 8397

def users_search_get_with_http_info(username, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.users_search_get ...'
  end
  # verify the required parameter 'username' is set
  if @api_client.config.client_side_validation && username.nil?
    fail ArgumentError, "Missing the required parameter 'username' when calling ProductsApi.users_search_get"
  end
  # resource path
  local_var_path = '/users/search'

  # query parameters
  query_params = {}
  query_params[:'username'] = username
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<UserSearch>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#users_search_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_user_id_cli_secret_put(user_id, input_secret, opts = {}) ⇒ nil

Set CLI secret for a user. This endpoint let user generate a new CLI secret for himself. This API only works when auth mode is set to ‘OIDC’. Once this API returns with successful status, the old secret will be invalid, as there will be only one CLI secret for a user.

Parameters:

  • user_id

    User ID

  • input_secret

    JSON object that includes the new secret

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

    the optional parameters

Returns:

  • (nil)


8445
8446
8447
8448
# File 'lib/harbor1_client/api/products_api.rb', line 8445

def users_user_id_cli_secret_put(user_id, input_secret, opts = {})
  users_user_id_cli_secret_put_with_http_info(user_id, input_secret, opts)
  nil
end

#users_user_id_cli_secret_put_with_http_info(user_id, input_secret, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Set CLI secret for a user. This endpoint let user generate a new CLI secret for himself. This API only works when auth mode is set to &#39;OIDC&#39;. Once this API returns with successful status, the old secret will be invalid, as there will be only one CLI secret for a user.

Parameters:

  • user_id

    User ID

  • input_secret

    JSON object that includes the new secret

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
# File 'lib/harbor1_client/api/products_api.rb', line 8456

def users_user_id_cli_secret_put_with_http_info(user_id, input_secret, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.users_user_id_cli_secret_put ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling ProductsApi.users_user_id_cli_secret_put"
  end
  # verify the required parameter 'input_secret' is set
  if @api_client.config.client_side_validation && input_secret.nil?
    fail ArgumentError, "Missing the required parameter 'input_secret' when calling ProductsApi.users_user_id_cli_secret_put"
  end
  # resource path
  local_var_path = '/users/{user_id}/cli_secret'.sub('{' + 'user_id' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(input_secret)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#users_user_id_cli_secret_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_user_id_delete(user_id, opts = {}) ⇒ nil

Mark a registered user as be removed. This endpoint let administrator of Harbor mark a registered user as be removed.It actually won’t be deleted from DB.

Parameters:

  • user_id

    User ID for marking as to be removed.

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

    the optional parameters

Returns:

  • (nil)


8503
8504
8505
8506
# File 'lib/harbor1_client/api/products_api.rb', line 8503

def users_user_id_delete(user_id, opts = {})
  users_user_id_delete_with_http_info(user_id, opts)
  nil
end

#users_user_id_delete_with_http_info(user_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Mark a registered user as be removed. This endpoint let administrator of Harbor mark a registered user as be removed.It actually won&#39;t be deleted from DB.

Parameters:

  • user_id

    User ID for marking as to be removed.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
# File 'lib/harbor1_client/api/products_api.rb', line 8513

def users_user_id_delete_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.users_user_id_delete ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling ProductsApi.users_user_id_delete"
  end
  # resource path
  local_var_path = '/users/{user_id}'.sub('{' + 'user_id' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#users_user_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_user_id_get(user_id, opts = {}) ⇒ User

Get a user’s profile. Get user’s profile with user id.

Parameters:

  • user_id

    Registered user ID

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

    the optional parameters

Returns:



8556
8557
8558
8559
# File 'lib/harbor1_client/api/products_api.rb', line 8556

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

#users_user_id_get_with_http_info(user_id, opts = {}) ⇒ Array<(User, Fixnum, Hash)>

Get a user&#39;s profile. Get user&#39;s profile with user id.

Parameters:

  • user_id

    Registered user ID

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

    the optional parameters

Returns:

  • (Array<(User, Fixnum, Hash)>)

    User data, response status code and response headers



8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
# File 'lib/harbor1_client/api/products_api.rb', line 8566

def users_user_id_get_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.users_user_id_get ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling ProductsApi.users_user_id_get"
  end
  # resource path
  local_var_path = '/users/{user_id}'.sub('{' + 'user_id' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'User')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#users_user_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_user_id_password_put(user_id, password, opts = {}) ⇒ nil

Change the password on a user that already exists. This endpoint is for user to update password. Users with the admin role can change any user’s password. Guest users can change only their own password.

Parameters:

  • user_id

    Registered user ID.

  • password

    Password to be updated, the attribute &#39;old_password&#39; is optional when the API is called by the system administrator.

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

    the optional parameters

Returns:

  • (nil)


8611
8612
8613
8614
# File 'lib/harbor1_client/api/products_api.rb', line 8611

def users_user_id_password_put(user_id, password, opts = {})
  users_user_id_password_put_with_http_info(user_id, password, opts)
  nil
end

#users_user_id_password_put_with_http_info(user_id, password, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Change the password on a user that already exists. This endpoint is for user to update password. Users with the admin role can change any user&#39;s password. Guest users can change only their own password.

Parameters:

  • user_id

    Registered user ID.

  • password

    Password to be updated, the attribute &#39;old_password&#39; is optional when the API is called by the system administrator.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
# File 'lib/harbor1_client/api/products_api.rb', line 8622

def users_user_id_password_put_with_http_info(user_id, password, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.users_user_id_password_put ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling ProductsApi.users_user_id_password_put"
  end
  # verify the required parameter 'password' is set
  if @api_client.config.client_side_validation && password.nil?
    fail ArgumentError, "Missing the required parameter 'password' when calling ProductsApi.users_user_id_password_put"
  end
  # resource path
  local_var_path = '/users/{user_id}/password'.sub('{' + 'user_id' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(password)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#users_user_id_password_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_user_id_put(user_id, profile, opts = {}) ⇒ nil

Update a registered user to change his profile. This endpoint let a registered user change his profile.

Parameters:

  • user_id

    Registered user ID

  • profile

    Only email, realname and comment can be modified.

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

    the optional parameters

Returns:

  • (nil)


8670
8671
8672
8673
# File 'lib/harbor1_client/api/products_api.rb', line 8670

def users_user_id_put(user_id, profile, opts = {})
  users_user_id_put_with_http_info(user_id, profile, opts)
  nil
end

#users_user_id_put_with_http_info(user_id, profile, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update a registered user to change his profile. This endpoint let a registered user change his profile.

Parameters:

  • user_id

    Registered user ID

  • profile

    Only email, realname and comment can be modified.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
# File 'lib/harbor1_client/api/products_api.rb', line 8681

def users_user_id_put_with_http_info(user_id, profile, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.users_user_id_put ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling ProductsApi.users_user_id_put"
  end
  # verify the required parameter 'profile' is set
  if @api_client.config.client_side_validation && profile.nil?
    fail ArgumentError, "Missing the required parameter 'profile' when calling ProductsApi.users_user_id_put"
  end
  # resource path
  local_var_path = '/users/{user_id}'.sub('{' + 'user_id' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(profile)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#users_user_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_user_id_sysadmin_put(user_id, has_admin_role, opts = {}) ⇒ nil

Update a registered user to change to be an administrator of Harbor. This endpoint let a registered user change to be an administrator of Harbor.

Parameters:

  • user_id

    Registered user ID

  • has_admin_role

    Toggle a user to admin or not.

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

    the optional parameters

Returns:

  • (nil)


8729
8730
8731
8732
# File 'lib/harbor1_client/api/products_api.rb', line 8729

def users_user_id_sysadmin_put(user_id, has_admin_role, opts = {})
  users_user_id_sysadmin_put_with_http_info(user_id, has_admin_role, opts)
  nil
end

#users_user_id_sysadmin_put_with_http_info(user_id, has_admin_role, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update a registered user to change to be an administrator of Harbor. This endpoint let a registered user change to be an administrator of Harbor.

Parameters:

  • user_id

    Registered user ID

  • has_admin_role

    Toggle a user to admin or not.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
# File 'lib/harbor1_client/api/products_api.rb', line 8740

def users_user_id_sysadmin_put_with_http_info(user_id, has_admin_role, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductsApi.users_user_id_sysadmin_put ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling ProductsApi.users_user_id_sysadmin_put"
  end
  # verify the required parameter 'has_admin_role' is set
  if @api_client.config.client_side_validation && has_admin_role.nil?
    fail ArgumentError, "Missing the required parameter 'has_admin_role' when calling ProductsApi.users_user_id_sysadmin_put"
  end
  # resource path
  local_var_path = '/users/{user_id}/sysadmin'.sub('{' + 'user_id' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(has_admin_role)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductsApi#users_user_id_sysadmin_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end