class Harbor1Client::ProductsApi
Attributes
Public Class Methods
# File lib/harbor1_client/api/products_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
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. @param chart The chart file @param [Hash] opts the optional parameters @option opts [File] :prov The provance file @return [nil]
# 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
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. @param chart The chart file @param [Hash] opts the optional parameters @option opts [File] :prov The provance file @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Check the health of chart repository service. Check the health of chart repository service. @param [Hash] opts the optional parameters @return [InlineResponse200]
# 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
Check the health of chart repository service. Check the health of chart repository service. @param [Hash] opts the optional parameters @return [Array<(InlineResponse200
, Fixnum, Hash)>] InlineResponse200
data, response status code and response headers
# 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
Get all the charts under the specified project Get all the charts under the specified project @param repo The project name @param [Hash] opts the optional parameters @return [Array<ChartInfoEntry>]
# 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
Get all the charts under the specified project Get all the charts under the specified project @param repo The project name @param [Hash] opts the optional parameters @return [Array<(Array<ChartInfoEntry>, Fixnum, Hash)>] Array<ChartInfoEntry> data, response status code and response headers
# 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
Delete all the versions of the specified chart Delete all the versions of the specified chart @param repo The project name @param name The chart name @param [Hash] opts the optional parameters @return [nil]
# 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
Delete all the versions of the specified chart Delete all the versions of the specified chart @param repo The project name @param name The chart name @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get all the versions of the specified chart Get all the versions of the specified chart @param repo The project name @param name The chart name @param [Hash] opts the optional parameters @return [ChartVersions]
# 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
Get all the versions of the specified chart Get all the versions of the specified chart @param repo The project name @param name The chart name @param [Hash] opts the optional parameters @return [Array<(ChartVersions
, Fixnum, Hash)>] ChartVersions
data, response status code and response headers
# 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
Delete the specified chart version Delete the specified chart version @param repo The project name @param name The chart name @param version The chart version @param [Hash] opts the optional parameters @return [nil]
# 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
Delete the specified chart version Delete the specified chart version @param repo The project name @param name The chart name @param version The chart version @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get the specified chart version Get the specified chart version @param repo The project name @param name The chart name @param version The chart version @param [Hash] opts the optional parameters @return [ChartVersionDetails]
# 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
Get the specified chart version Get the specified chart version @param repo The project name @param name The chart name @param version The chart version @param [Hash] opts the optional parameters @return [Array<(ChartVersionDetails
, Fixnum, Hash)>] ChartVersionDetails
data, response status code and response headers
# 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
Return the attahced labels of chart. Return the attahced labels of the specified chart version. @param repo The project name @param name The chart name @param version The chart version @param [Hash] opts the optional parameters @return [nil]
# 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
Return the attahced labels of chart. Return the attahced labels of the specified chart version. @param repo The project name @param name The chart name @param version The chart version @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Remove label from chart. Remove label from the specified chart version. @param repo The project name @param name The chart name @param version The chart version @param id The label ID @param [Hash] opts the optional parameters @return [nil]
# 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
Remove label from chart. Remove label from the specified chart version. @param repo The project name @param name The chart name @param version The chart version @param id The label ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Mark label to chart. Mark label to the specified chart version. @param repo The project name @param name The chart name @param version The chart version @param label The label being marked to the chart version @param [Hash] opts the optional parameters @return [nil]
# 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
Mark label to chart. Mark label to the specified chart version. @param repo The project name @param name The chart name @param version The chart version @param label The label being marked to the chart version @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
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. @param repo The project name @param chart The chart file @param [Hash] opts the optional parameters @option opts [File] :prov The provance file @return [nil]
# 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
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. @param repo The project name @param chart The chart file @param [Hash] opts the optional parameters @option opts [File] :prov The provance file @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
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. @param repo The project name @param prov The provance file @param [Hash] opts the optional parameters @return [nil]
# 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
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. @param repo The project name @param prov The provance file @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get system configurations. This endpoint is for retrieving system configurations that only provides for admin user. @param [Hash] opts the optional parameters @return [ConfigurationsResponse]
# 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
Get system configurations. This endpoint is for retrieving system configurations that only provides for admin user. @param [Hash] opts the optional parameters @return [Array<(ConfigurationsResponse
, Fixnum, Hash)>] ConfigurationsResponse
data, response status code and response headers
# 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
Modify system configurations. This endpoint is for modifying system configurations that only provides for admin user. @param configurations The configuration map can contain a subset of the attributes of the schema, which are to be updated. @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 814 def configurations_put(configurations, opts = {}) configurations_put_with_http_info(configurations, opts) nil end
Modify system configurations. This endpoint is for modifying system configurations that only provides for admin user. @param configurations The configuration map can contain a subset of the attributes of the schema, which are to be updated. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Test connection and authentication with email server. Test connection and authentication with email server. @param [Hash] opts the optional parameters @option opts [EmailServerSetting] :settings Email server settings, if some of the settings are not assigned, they will be read from system configuration. @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 867 def email_ping_post(opts = {}) email_ping_post_with_http_info(opts) nil end
Test connection and authentication with email server. Test connection and authentication with email server. @param [Hash] opts the optional parameters @option opts [EmailServerSetting] :settings Email server settings, if some of the settings are not assigned, they will be read from system configuration. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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 check API The endpoint returns the health stauts of the system. @param [Hash] opts the optional parameters @return [OverallHealthStatus]
# 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 check API The endpoint returns the health stauts of the system. @param [Hash] opts the optional parameters @return [Array<(OverallHealthStatus
, Fixnum, Hash)>] OverallHealthStatus
data, response status code and response headers
# 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
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. @param switcher @param [Hash] opts the optional parameters @return [nil]
# 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
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. @param switcher @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Sync quota from registry/chart to DB. This endpoint is for syncing quota usage of registry/chart with database. @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 1016 def internal_syncquota_post(opts = {}) internal_syncquota_post_with_http_info(opts) nil end
Sync quota from registry/chart to DB. This endpoint is for syncing quota usage of registry/chart with database. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Sync repositories from registry to DB. This endpoint is for syncing all repositories of registry with database. @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 1063 def internal_syncregistry_post(opts = {}) internal_syncregistry_post_with_http_info(opts) nil end
Sync repositories from registry to DB. This endpoint is for syncing all repositories of registry with database. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
List labels according to the query strings. This endpoint let user list labels by name, scope and project_id @param scope The label scope. Valid values are g and p. g for global labels and p for project labels. @param [Hash] opts the optional parameters @option opts [String] :name The label name. @option opts [Integer] :project_id Relevant project ID, required when scope is p. @option opts [Integer] :page The page nubmer. @option opts [Integer] :page_size The size of per page. @return [Array<Label>]
# 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
List labels according to the query strings. This endpoint let user list labels by name, scope and project_id @param scope The label scope. Valid values are g and p. g for global labels and p for project labels. @param [Hash] opts the optional parameters @option opts [String] :name The label name. @option opts [Integer] :project_id Relevant project ID, required when scope is p. @option opts [Integer] :page The page nubmer. @option opts [Integer] :page_size The size of per page. @return [Array<(Array<Label>, Fixnum, Hash)>] Array<Label> data, response status code and response headers
# 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
Delete the label specified by ID. Delete the label specified by ID. @param id Label
ID @param [Hash] opts the optional parameters @return [nil]
# 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
Delete the label specified by ID. Delete the label specified by ID. @param id Label
ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get the label specified by ID. This endpoint let user get the label by specific ID. @param id Label
ID @param [Hash] opts the optional parameters @return [Label]
# 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
Get the label specified by ID. This endpoint let user get the label by specific ID. @param id Label
ID @param [Hash] opts the optional parameters @return [Array<(Label
, Fixnum, Hash)>] Label
data, response status code and response headers
# 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
Update the label properties. This endpoint let user update label properties. @param id Label
ID @param label The updated label json object. @param [Hash] opts the optional parameters @return [nil]
# 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
Update the label properties. This endpoint let user update label properties. @param id Label
ID @param label The updated label json object. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
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. @param id Label
ID @param [Hash] opts the optional parameters @return [Resource]
# 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
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. @param id Label
ID @param [Hash] opts the optional parameters @return [Array<(Resource
, Fixnum, Hash)>] Resource
data, response status code and response headers
# 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
Post creates a label This endpoint let user creates a label. @param label The json object of label. @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 1398 def labels_post(label, opts = {}) labels_post_with_http_info(label, opts) nil end
Post creates a label This endpoint let user creates a label. @param label The json object of label. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Search
available ldap groups. This endpoint searches the available ldap groups based on related configuration parameters. support to search by groupname or groupdn. @param [Hash] opts the optional parameters @option opts [String] :groupname Ldap group name @option opts [String] :groupdn The LDAP group DN @return [Array<UserGroup>]
# 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
Search
available ldap groups. This endpoint searches the available ldap groups based on related configuration parameters. support to search by groupname or groupdn. @param [Hash] opts the optional parameters @option opts [String] :groupname Ldap group name @option opts [String] :groupdn The LDAP group DN @return [Array<(Array<UserGroup>, Fixnum, Hash)>] Array<UserGroup> data, response status code and response headers
# 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
Ping available ldap service. This endpoint ping the available ldap service for test related configuration parameters. @param [Hash] opts the optional parameters @option opts [LdapConf] :ldapconf ldap configuration. support input ldap service configuration. If it's a empty request, will load current configuration from the system. @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 1505 def ldap_ping_post(opts = {}) ldap_ping_post_with_http_info(opts) nil end
Ping available ldap service. This endpoint ping the available ldap service for test related configuration parameters. @param [Hash] opts the optional parameters @option opts [LdapConf] :ldapconf ldap configuration. support input ldap service configuration. If it's a empty request, will load current configuration from the system. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
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. @param uid_list The uid listed for importing. This list will check users validity of ldap service based on configuration from the system. @param [Hash] opts the optional parameters @return [nil]
# 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
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. @param uid_list The uid listed for importing. This list will check users validity of ldap service based on configuration from the system. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
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. @param [Hash] opts the optional parameters @option opts [String] :username Registered user ID @return [Array<LdapUsers>]
# 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
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. @param [Hash] opts the optional parameters @option opts [String] :username Registered user ID @return [Array<(Array<LdapUsers>, Fixnum, Hash)>] Array<LdapUsers> data, response status code and response headers
# 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
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 @param [Hash] opts the optional parameters @option opts [String] :username Username of the operator. @option opts [String] :repository The name of repository @option opts [String] :tag The name of tag @option opts [String] :operation The operation @option opts [String] :begin_timestamp The begin timestamp @option opts [String] :end_timestamp The end timestamp @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page, default is 10, maximum is 100. @return [Array<AccessLog>]
# 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
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 @param [Hash] opts the optional parameters @option opts [String] :username Username of the operator. @option opts [String] :repository The name of repository @option opts [String] :tag The name of tag @option opts [String] :operation The operation @option opts [String] :begin_timestamp The begin timestamp @option opts [String] :end_timestamp The end timestamp @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page, default is 10, maximum is 100. @return [Array<(Array<AccessLog>, Fixnum, Hash)>] Array<AccessLog> data, response status code and response headers
# 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
List projects This endpoint returns all projects created by Harbor, and can be filtered by project name. @param [Hash] opts the optional parameters @option opts [String] :name The name of project. @option opts [BOOLEAN] :public The project is public or private. @option opts [String] :owner The name of project owner. @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page, default is 10, maximum is 100. @return [Array<Project>]
# 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
List projects This endpoint returns all projects created by Harbor, and can be filtered by project name. @param [Hash] opts the optional parameters @option opts [String] :name The name of project. @option opts [BOOLEAN] :public The project is public or private. @option opts [String] :owner The name of project owner. @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page, default is 10, maximum is 100. @return [Array<(Array<Project>, Fixnum, Hash)>] Array<Project> data, response status code and response headers
# 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
Check if the project name user provided already exists. This endpoint is used to check if the project name user provided already exist. @param project_name Project
name for checking exists. @param [Hash] opts the optional parameters @return [nil]
# 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
Check if the project name user provided already exists. This endpoint is used to check if the project name user provided already exist. @param project_name Project
name for checking exists. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Create a new project. This endpoint is for user to create a new project. @param project New created project. @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 1847 def projects_post(project, opts = {}) projects_post_with_http_info(project, opts) nil end
Create a new project. This endpoint is for user to create a new project. @param project New created project. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Delete project by projectID This endpoint is aimed to delete project by project ID. @param project_id Project
ID of project which will be deleted. @param [Hash] opts the optional parameters @return [nil]
# 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
Delete project by projectID This endpoint is aimed to delete project by project ID. @param project_id Project
ID of project which will be deleted. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Return specific project detail information This endpoint returns specific project information by project ID. @param project_id Project
ID for filtering results. @param [Hash] opts the optional parameters @return [Project]
# 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
Return specific project detail information This endpoint returns specific project information by project ID. @param project_id Project
ID for filtering results. @param [Hash] opts the optional parameters @return [Array<(Project
, Fixnum, Hash)>] Project
data, response status code and response headers
# 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
List all immutable tag rules of current project This endpoint returns the immutable tag rules of a project @param project_id Relevant project ID. @param [Hash] opts the optional parameters @return [Array<ImmutableTagRule>]
# 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
List all immutable tag rules of current project This endpoint returns the immutable tag rules of a project @param project_id Relevant project ID. @param [Hash] opts the optional parameters @return [Array<(Array<ImmutableTagRule>, Fixnum, Hash)>] Array<ImmutableTagRule> data, response status code and response headers
# 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
Delete the immutable tag rule. @param project_id Relevant project ID. @param id Immutable tag rule ID. @param [Hash] opts the optional parameters @return [nil]
# 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
Delete the immutable tag rule. @param project_id Relevant project ID. @param id Immutable tag rule ID. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Update the immutable tag rule or enable or disable the rule @param project_id Relevant project ID. @param id Immutable tag rule ID. @param [Hash] opts the optional parameters @option opts [ImmutableTagRule] :immutabletagrule @return [nil]
# 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
Update the immutable tag rule or enable or disable the rule @param project_id Relevant project ID. @param id Immutable tag rule ID. @param [Hash] opts the optional parameters @option opts [ImmutableTagRule] :immutabletagrule @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Add an immutable tag rule to current project This endpoint add an immutable tag rule to the project @param project_id Relevant project ID. @param [Hash] opts the optional parameters @option opts [ImmutableTagRule] :immutabletagrule @return [nil]
# 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
Add an immutable tag rule to current project This endpoint add an immutable tag rule to the project @param project_id Relevant project ID. @param [Hash] opts the optional parameters @option opts [ImmutableTagRule] :immutabletagrule @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get access logs accompany with a relevant project. This endpoint let user search access logs filtered by operations and date time ranges. @param project_id Relevant project ID @param [Hash] opts the optional parameters @option opts [String] :username Username of the operator. @option opts [String] :repository The name of repository @option opts [String] :tag The name of tag @option opts [String] :operation The operation @option opts [String] :begin_timestamp The begin timestamp @option opts [String] :end_timestamp The end timestamp @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page, default is 10, maximum is 100. @return [Array<AccessLog>]
# 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
Get access logs accompany with a relevant project. This endpoint let user search access logs filtered by operations and date time ranges. @param project_id Relevant project ID @param [Hash] opts the optional parameters @option opts [String] :username Username of the operator. @option opts [String] :repository The name of repository @option opts [String] :tag The name of tag @option opts [String] :operation The operation @option opts [String] :begin_timestamp The begin timestamp @option opts [String] :end_timestamp The end timestamp @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page, default is 10, maximum is 100. @return [Array<(Array<AccessLog>, Fixnum, Hash)>] Array<AccessLog> data, response status code and response headers
# 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
Get all project member information Get all project member information @param project_id Relevant project ID. @param [Hash] opts the optional parameters @option opts [String] :entityname The entity name to search. @return [Array<ProjectMemberEntity>]
# 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
Get all project member information Get all project member information @param project_id Relevant project ID. @param [Hash] opts the optional parameters @option opts [String] :entityname The entity name to search. @return [Array<(Array<ProjectMemberEntity>, Fixnum, Hash)>] Array<ProjectMemberEntity> data, response status code and response headers
# 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
Delete project member @param project_id Relevant project ID. @param mid Member ID. @param [Hash] opts the optional parameters @return [nil]
# 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
Delete project member @param project_id Relevant project ID. @param mid Member ID. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get the project member information Get the project member information @param project_id Relevant project ID. @param mid The member ID @param [Hash] opts the optional parameters @return [ProjectMemberEntity]
# 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
Get the project member information Get the project member information @param project_id Relevant project ID. @param mid The member ID @param [Hash] opts the optional parameters @return [Array<(ProjectMemberEntity
, Fixnum, Hash)>] ProjectMemberEntity
data, response status code and response headers
# 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
Update project member Update project member relationship @param project_id Relevant project ID. @param mid Member ID. @param [Hash] opts the optional parameters @option opts [RoleRequest] :role @return [nil]
# 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
Update project member Update project member relationship @param project_id Relevant project ID. @param mid Member ID. @param [Hash] opts the optional parameters @option opts [RoleRequest] :role @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
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. @param project_id Relevant project ID. @param [Hash] opts the optional parameters @option opts [ProjectMember] :project_member @return [nil]
# 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
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. @param project_id Relevant project ID. @param [Hash] opts the optional parameters @option opts [ProjectMember] :project_member @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get project metadata. This endpoint returns metadata of the project specified by project ID. @param project_id The ID of project. @param [Hash] opts the optional parameters @return [ProjectMetadata]
# 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
Get project metadata. This endpoint returns metadata of the project specified by project ID. @param project_id The ID of project. @param [Hash] opts the optional parameters @return [Array<(ProjectMetadata
, Fixnum, Hash)>] ProjectMetadata
data, response status code and response headers
# 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
Delete metadata of a project This endpoint is aimed to delete metadata of a project. @param project_id The ID of project. @param meta_name The name of metadat. @param [Hash] opts the optional parameters @return [nil]
# 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
Delete metadata of a project This endpoint is aimed to delete metadata of a project. @param project_id The ID of project. @param meta_name The name of metadat. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get project metadata This endpoint returns specified metadata of a project. @param project_id Project
ID for filtering results. @param meta_name The name of metadat. @param [Hash] opts the optional parameters @return [ProjectMetadata]
# 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
Get project metadata This endpoint returns specified metadata of a project. @param project_id Project
ID for filtering results. @param meta_name The name of metadat. @param [Hash] opts the optional parameters @return [Array<(ProjectMetadata
, Fixnum, Hash)>] ProjectMetadata
data, response status code and response headers
# 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
Update metadata of a project. This endpoint is aimed to update the metadata of a project. @param project_id The ID of project. @param meta_name The name of metadat. @param [Hash] opts the optional parameters @return [nil]
# 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
Update metadata of a project. This endpoint is aimed to update the metadata of a project. @param project_id The ID of project. @param meta_name The name of metadat. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Add metadata for the project. This endpoint is aimed to add metadata of a project. @param project_id Selected project ID. @param metadata The metadata of project. @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 2833 def projects_project_id_metadatas_post(project_id, metadata, opts = {}) projects_project_id_metadatas_post_with_http_info(project_id, metadata, opts) nil end
Add metadata for the project. This endpoint is aimed to add metadata of a project. @param project_id Selected project ID. @param metadata The metadata of project. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/harbor1_client/api/products_api.rb, line 2844 def projects_project_id_metadatas_post_with_http_info(project_id, metadata, 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 && metadata.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(metadata) 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
Update properties for a selected project. This endpoint is aimed to update the properties of a project. @param project_id Selected project ID. @param project Updates of project. @param [Hash] opts the optional parameters @return [nil]
# 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
Update properties for a selected project. This endpoint is aimed to update the properties of a project. @param project_id Selected project ID. @param project Updates of project. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get all robot accounts of specified project Get all robot accounts of specified project @param project_id Relevant project ID. @param [Hash] opts the optional parameters @return [Array<RobotAccount>]
# 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
Get all robot accounts of specified project Get all robot accounts of specified project @param project_id Relevant project ID. @param [Hash] opts the optional parameters @return [Array<(Array<RobotAccount>, Fixnum, Hash)>] Array<RobotAccount> data, response status code and response headers
# 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
Create a robot account for project Create a robot account for project @param project_id Relevant project ID. @param robot Request body of creating a robot account. @param [Hash] opts the optional parameters @return [RobotAccountPostRep]
# 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
Create a robot account for project Create a robot account for project @param project_id Relevant project ID. @param robot Request body of creating a robot account. @param [Hash] opts the optional parameters @return [Array<(RobotAccountPostRep
, Fixnum, Hash)>] RobotAccountPostRep
data, response status code and response headers
# 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
Delete the specified robot account Delete the specified robot account @param project_id Relevant project ID. @param robot_id The ID of robot account. @param [Hash] opts the optional parameters @return [nil]
# 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
Delete the specified robot account Delete the specified robot account @param project_id Relevant project ID. @param robot_id The ID of robot account. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Return the infor of the specified robot account. Return the infor of the specified robot account. @param project_id Relevant project ID. @param robot_id The ID of robot account. @param [Hash] opts the optional parameters @return [RobotAccount]
# 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
Return the infor of the specified robot account. Return the infor of the specified robot account. @param project_id Relevant project ID. @param robot_id The ID of robot account. @param [Hash] opts the optional parameters @return [Array<(RobotAccount
, Fixnum, Hash)>] RobotAccount
data, response status code and response headers
# 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
Update status of robot account. Used to disable/enable a specified robot account. @param project_id Relevant project ID. @param robot_id The ID of robot account. @param robot Request body of enable/disable a robot account. @param [Hash] opts the optional parameters @return [nil]
# 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
Update status of robot account. Used to disable/enable a specified robot account. @param project_id Relevant project ID. @param robot_id The ID of robot account. @param robot Request body of enable/disable a robot account. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get scanner registration candidates for configurating project level scanner Retrieve the system configured scanner registrations as candidates of setting project level scanner. @param project_id The project identifier. @param [Hash] opts the optional parameters @return [Array<ScannerRegistration>]
# 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
Get scanner registration candidates for configurating project level scanner Retrieve the system configured scanner registrations as candidates of setting project level scanner. @param project_id The project identifier. @param [Hash] opts the optional parameters @return [Array<(Array<ScannerRegistration>, Fixnum, Hash)>] Array<ScannerRegistration> data, response status code and response headers
# 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
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. @param project_id The project identifier. @param [Hash] opts the optional parameters @return [ScannerRegistration]
# 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
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. @param project_id The project identifier. @param [Hash] opts the optional parameters @return [Array<(ScannerRegistration
, Fixnum, Hash)>] ScannerRegistration
data, response status code and response headers
# 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
Get summary of the project. Get summary of the project. @param project_id Relevant project ID @param [Hash] opts the optional parameters @return [ProjectSummary]
# 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
Get summary of the project. Get summary of the project. @param project_id Relevant project ID @param [Hash] opts the optional parameters @return [Array<(ProjectSummary
, Fixnum, Hash)>] ProjectSummary
data, response status code and response headers
# 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
List project webhook jobs This endpoint returns webhook jobs of a project. @param project_id Relevant project ID. @param policy_id The policy ID. @param [Hash] opts the optional parameters @return [Array<WebhookJob>]
# 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
List project webhook jobs This endpoint returns webhook jobs of a project. @param project_id Relevant project ID. @param policy_id The policy ID. @param [Hash] opts the optional parameters @return [Array<(Array<WebhookJob>, Fixnum, Hash)>] Array<WebhookJob> data, response status code and response headers
# 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
Get project webhook policy last trigger info This endpoint returns last trigger information of project webhook policy. @param project_id Relevant project ID. @param [Hash] opts the optional parameters @return [Array<WebhookLastTrigger>]
# 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
Get project webhook policy last trigger info This endpoint returns last trigger information of project webhook policy. @param project_id Relevant project ID. @param [Hash] opts the optional parameters @return [Array<(Array<WebhookLastTrigger>, Fixnum, Hash)>] Array<WebhookLastTrigger> data, response status code and response headers
# 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
List project webhook policies. This endpoint returns webhook policies of a project. @param project_id Relevant project ID. @param [Hash] opts the optional parameters @return [Array<WebhookPolicy>]
# 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
List project webhook policies. This endpoint returns webhook policies of a project. @param project_id Relevant project ID. @param [Hash] opts the optional parameters @return [Array<(Array<WebhookPolicy>, Fixnum, Hash)>] Array<WebhookPolicy> data, response status code and response headers
# 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
Delete webhook policy of a project This endpoint is aimed to delete webhookpolicy of a project. @param project_id Relevant project ID. @param policy_id The id of webhook policy. @param [Hash] opts the optional parameters @return [nil]
# 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
Delete webhook policy of a project This endpoint is aimed to delete webhookpolicy of a project. @param project_id Relevant project ID. @param policy_id The id of webhook policy. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get project webhook policy This endpoint returns specified webhook policy of a project. @param project_id Relevant project ID. @param policy_id The id of webhook policy. @param [Hash] opts the optional parameters @return [WebhookPolicy]
# 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
Get project webhook policy This endpoint returns specified webhook policy of a project. @param project_id Relevant project ID. @param policy_id The id of webhook policy. @param [Hash] opts the optional parameters @return [Array<(WebhookPolicy
, Fixnum, Hash)>] WebhookPolicy
data, response status code and response headers
# 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
Update webhook policy of a project. This endpoint is aimed to update the webhook policy of a project. @param project_id Relevant project ID. @param policy_id The id of webhook policy. @param policy All properties needed except "id", "project_id", "creation_time", "update_time". @param [Hash] opts the optional parameters @return [nil]
# 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
Update webhook policy of a project. This endpoint is aimed to update the webhook policy of a project. @param project_id Relevant project ID. @param policy_id The id of webhook policy. @param policy All properties needed except "id", "project_id", "creation_time", "update_time". @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Create project webhook policy. This endpoint create a webhook policy if the project does not have one. @param project_id Relevant project ID @param policy Properties "targets" and "event_types" needed. @param [Hash] opts the optional parameters @return [nil]
# 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
Create project webhook policy. This endpoint create a webhook policy if the project does not have one. @param project_id Relevant project ID @param policy Properties "targets" and "event_types" needed. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Test project webhook connection This endpoint tests webhook connection of a project. @param project_id Relevant project ID. @param policy Only property "targets" needed. @param [Hash] opts the optional parameters @return [nil]
# 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
Test project webhook connection This endpoint tests webhook connection of a project. @param project_id Relevant project ID. @param policy Only property "targets" needed. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
List quotas List quotas @param [Hash] opts the optional parameters @option opts [String] :reference The reference type of quota. @option opts [String] :reference_id The reference id of quota. @option opts [String] :sort Sort method, valid values include: 'hard.resource_name', '-hard.resource_name', 'used.resource_name', '-used.resource_name'. Here '-' stands for descending order, resource_name should be the real resource name of the quota. @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page, default is 10, maximum is 100. @return [Array<Quota>]
# 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
List quotas List quotas @param [Hash] opts the optional parameters @option opts [String] :reference The reference type of quota. @option opts [String] :reference_id The reference id of quota. @option opts [String] :sort Sort method, valid values include: 'hard.resource_name', '-hard.resource_name', 'used.resource_name', '-used.resource_name'. Here '-' stands for descending order, resource_name should be the real resource name of the quota. @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page, default is 10, maximum is 100. @return [Array<(Array<Quota>, Fixnum, Hash)>] Array<Quota> data, response status code and response headers
# 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
Get the specified quota Get the specified quota @param id Quota
ID @param [Hash] opts the optional parameters @return [Quota]
# 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
Get the specified quota Get the specified quota @param id Quota
ID @param [Hash] opts the optional parameters @return [Array<(Quota
, Fixnum, Hash)>] Quota
data, response status code and response headers
# 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
Update the specified quota Update hard limits of the specified quota @param id Quota
ID @param hard The new hard limits for the quota @param [Hash] opts the optional parameters @return [nil]
# 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
Update the specified quota Update hard limits of the specified quota @param id Quota
ID @param hard The new hard limits for the quota @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
List registries. This endpoint let user list filtered registries by name, if name is nil, list returns all registries. @param [Hash] opts the optional parameters @option opts [String] :name Registry's name. @return [Array<Registry>]
# 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
List registries. This endpoint let user list filtered registries by name, if name is nil, list returns all registries. @param [Hash] opts the optional parameters @option opts [String] :name Registry's name. @return [Array<(Array<Registry>, Fixnum, Hash)>] Array<Registry> data, response status code and response headers
# 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
Delete specific registry. This endpoint is for to delete specific registry. @param id The registry's ID. @param [Hash] opts the optional parameters @return [nil]
# 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
Delete specific registry. This endpoint is for to delete specific registry. @param id The registry's ID. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get registry. This endpoint is for get specific registry. @param id The registry ID. @param [Hash] opts the optional parameters @return [Registry]
# 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
Get registry. This endpoint is for get specific registry. @param id The registry ID. @param [Hash] opts the optional parameters @return [Array<(Registry
, Fixnum, Hash)>] Registry
data, response status code and response headers
# 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
Get registry info. Get the info of one specific registry. @param id The registry ID. @param [Hash] opts the optional parameters @return [RegistryInfo]
# 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
Get registry info. Get the info of one specific registry. @param id The registry ID. @param [Hash] opts the optional parameters @return [Array<(RegistryInfo
, Fixnum, Hash)>] RegistryInfo
data, response status code and response headers
# 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
List namespaces of registry This endpoint let user list namespaces of registry according to query. @param id The registry ID. @param [Hash] opts the optional parameters @option opts [String] :name The name of namespace. @return [Array<Namespace>]
# 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
List namespaces of registry This endpoint let user list namespaces of registry according to query. @param id The registry ID. @param [Hash] opts the optional parameters @option opts [String] :name The name of namespace. @return [Array<(Array<Namespace>, Fixnum, Hash)>] Array<Namespace> data, response status code and response headers
# 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
Update a given registry. This endpoint is for update a given registry. @param id The registry's ID. @param repo_target Updates registry. @param [Hash] opts the optional parameters @return [nil]
# 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
Update a given registry. This endpoint is for update a given registry. @param id The registry's ID. @param repo_target Updates registry. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Ping status of a registry. This endpoint checks status of a registry, the registry can be given by ID or URL (together with credential) @param registry Registry
to ping. @param [Hash] opts the optional parameters @return [nil]
# 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
Ping status of a registry. This endpoint checks status of a registry, the registry can be given by ID or URL (together with credential) @param registry Registry
to ping. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Create a new registry. This endpoint is for user to create a new registry. @param registry New created registry. @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 4438 def registries_post(registry, opts = {}) registries_post_with_http_info(registry, opts) nil end
Create a new registry. This endpoint is for user to create a new registry. @param registry New created registry. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
List supported adapters. This endpoint let user list supported adapters. @param [Hash] opts the optional parameters @return [Array<String>]
# 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
List supported adapters. This endpoint let user list supported adapters. @param [Hash] opts the optional parameters @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers
# 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
List replication executions. This endpoint let user list replication executions. @param [Hash] opts the optional parameters @option opts [Integer] :policy_id The policy ID. @option opts [String] :status The execution status. @option opts [String] :trigger The trigger mode. @option opts [Integer] :page The page. @option opts [Integer] :page_size The page size. @return [Array<ReplicationExecution>]
# 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
List replication executions. This endpoint let user list replication executions. @param [Hash] opts the optional parameters @option opts [Integer] :policy_id The policy ID. @option opts [String] :status The execution status. @option opts [String] :trigger The trigger mode. @option opts [Integer] :page The page. @option opts [Integer] :page_size The page size. @return [Array<(Array<ReplicationExecution>, Fixnum, Hash)>] Array<ReplicationExecution> data, response status code and response headers
# 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
Get the execution of the replication. This endpoint is for user to get one execution of the replication. @param id The execution ID. @param [Hash] opts the optional parameters @return [ReplicationExecution]
# 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
Get the execution of the replication. This endpoint is for user to get one execution of the replication. @param id The execution ID. @param [Hash] opts the optional parameters @return [Array<(ReplicationExecution
, Fixnum, Hash)>] ReplicationExecution
data, response status code and response headers
# 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
Stop the execution of the replication. This endpoint is for user to stop one execution of the replication. @param id The execution ID. @param [Hash] opts the optional parameters @return [nil]
# 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
Stop the execution of the replication. This endpoint is for user to stop one execution of the replication. @param id The execution ID. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get the task list of one execution. This endpoint is for user to get the task list of one execution. @param id The execution ID. @param [Hash] opts the optional parameters @return [Array<ReplicationTask>]
# 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
Get the task list of one execution. This endpoint is for user to get the task list of one execution. @param id The execution ID. @param [Hash] opts the optional parameters @return [Array<(Array<ReplicationTask>, Fixnum, Hash)>] Array<ReplicationTask> data, response status code and response headers
# 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
Get the log of one task. This endpoint is for user to get the log of one task. @param id The execution ID. @param task_id The task ID. @param [Hash] opts the optional parameters @return [nil]
# 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
Get the log of one task. This endpoint is for user to get the log of one task. @param id The execution ID. @param task_id The task ID. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Start one execution of the replication. This endpoint is for user to start one execution of the replication. @param execution The execution that needs to be started, only the property "policy_id" is needed. @param [Hash] opts the optional parameters @return [nil]
# 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
Start one execution of the replication. This endpoint is for user to start one execution of the replication. @param execution The execution that needs to be started, only the property "policy_id" is needed. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
List replication policies This endpoint let user list replication policies @param [Hash] opts the optional parameters @option opts [String] :name The replication policy name. @option opts [Integer] :page The page nubmer. @option opts [Integer] :page_size The size of per page. @return [Array<ReplicationPolicy>]
# 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
List replication policies This endpoint let user list replication policies @param [Hash] opts the optional parameters @option opts [String] :name The replication policy name. @option opts [Integer] :page The page nubmer. @option opts [Integer] :page_size The size of per page. @return [Array<(Array<ReplicationPolicy>, Fixnum, Hash)>] Array<ReplicationPolicy> data, response status code and response headers
# 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
Delete the replication policy specified by ID. Delete the replication policy specified by ID. @param id Replication policy ID @param [Hash] opts the optional parameters @return [nil]
# 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
Delete the replication policy specified by ID. Delete the replication policy specified by ID. @param id Replication policy ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get replication policy. This endpoint let user get replication policy by specific ID. @param id policy ID @param [Hash] opts the optional parameters @return [ReplicationPolicy]
# 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
Get replication policy. This endpoint let user get replication policy by specific ID. @param id policy ID @param [Hash] opts the optional parameters @return [Array<(ReplicationPolicy
, Fixnum, Hash)>] ReplicationPolicy
data, response status code and response headers
# 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
Update the replication policy This endpoint let user update policy. @param id policy ID @param policy The replication policy model. @param [Hash] opts the optional parameters @return [nil]
# 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
Update the replication policy This endpoint let user update policy. @param id policy ID @param policy The replication policy model. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Create a replication policy This endpoint let user create a replication policy @param policy The policy model. @param [Hash] opts the optional parameters @return [nil]
# 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
Create a replication policy This endpoint let user create a replication policy @param policy The policy model. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
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. @param project_id Relevant project ID. @param [Hash] opts the optional parameters @option opts [String] :q Repo name for filtering results. @option opts [String] :sort Sort method, valid values include: 'name', '-name', 'creation_time', '-creation_time', 'update_time', '-update_time'. Here '-' stands for descending order. @option opts [Integer] :label_id The ID of label used to filter the result. @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page, default is 10, maximum is 100. @return [Array<Repository>]
# 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
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. @param project_id Relevant project ID. @param [Hash] opts the optional parameters @option opts [String] :q Repo name for filtering results. @option opts [String] :sort Sort method, valid values include: 'name', '-name', 'creation_time', '-creation_time', 'update_time', '-update_time'. Here '-' stands for descending order. @option opts [Integer] :label_id The ID of label used to filter the result. @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page, default is 10, maximum is 100. @return [Array<(Array<Repository>, Fixnum, Hash)>] Array<Repository> data, response status code and response headers
# 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
Delete a repository. This endpoint let user delete a repository with name. @param repo_name The name of repository which will be deleted. @param [Hash] opts the optional parameters @return [nil]
# 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
Delete a repository. This endpoint let user delete a repository with name. @param repo_name The name of repository which will be deleted. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get labels of a repository. Get labels of a repository specified by the repo_name. @param repo_name The name of repository. @param [Hash] opts the optional parameters @return [Array<Label>]
# 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
Get labels of a repository. Get labels of a repository specified by the repo_name. @param repo_name The name of repository. @param [Hash] opts the optional parameters @return [Array<(Array<Label>, Fixnum, Hash)>] Array<Label> data, response status code and response headers
# 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
Delete label from the repository. Delete the label from the repository specified by the repo_name. @param repo_name The name of repository. @param label_id The ID of label. @param [Hash] opts the optional parameters @return [nil]
# 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
Delete label from the repository. Delete the label from the repository specified by the repo_name. @param repo_name The name of repository. @param label_id The ID of label. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Add a label to the repository. Add a label to the repository. @param repo_name The name of repository. @param label Only the ID property is required. @param [Hash] opts the optional parameters @return [nil]
# 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
Add a label to the repository. Add a label to the repository. @param repo_name The name of repository. @param label Only the ID property is required. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Update description of the repository. This endpoint is used to update description of the repository. @param repo_name The name of repository which will be deleted. @param description The description of the repository. @param [Hash] opts the optional parameters @return [nil]
# 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
Update description of the repository. This endpoint is used to update description of the repository. @param repo_name The name of repository which will be deleted. @param description The description of the repository. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
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 @param repo_name repository name. @param [Hash] opts the optional parameters @return [Array<RepoSignature>]
# 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
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 @param repo_name repository name. @param [Hash] opts the optional parameters @return [Array<(Array<RepoSignature>, Fixnum, Hash)>] Array<RepoSignature> data, response status code and response headers
# 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
Get public repositories which are accessed most. This endpoint aims to let users see the most popular public repositories @param [Hash] opts the optional parameters @option opts [Integer] :count The number of the requested public repositories, default is 10 if not provided. @return [Array<Repository>]
# 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
Get public repositories which are accessed most. This endpoint aims to let users see the most popular public repositories @param [Hash] opts the optional parameters @option opts [Integer] :count The number of the requested public repositories, default is 10 if not provided. @return [Array<(Array<Repository>, Fixnum, Hash)>] Array<Repository> data, response status code and response headers
# 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
Stop a Retention job Stop a Retention job, only support "stop" action now. @param id Retention ID. @param eid Retention execution ID. @param action The action, only support "stop" now. @param [Hash] opts the optional parameters @return [nil]
# 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
Stop a Retention job Stop a Retention job, only support "stop" action now. @param id Retention ID. @param eid Retention execution ID. @param action The action, only support "stop" now. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get Retention job tasks Get Retention job tasks, each repository as a task. @param id Retention ID. @param eid Retention execution ID. @param [Hash] opts the optional parameters @return [Array<RetentionExecutionTask>]
# 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
Get Retention job tasks Get Retention job tasks, each repository as a task. @param id Retention ID. @param eid Retention execution ID. @param [Hash] opts the optional parameters @return [Array<(Array<RetentionExecutionTask>, Fixnum, Hash)>] Array<RetentionExecutionTask> data, response status code and response headers
# 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
Get Retention job task log Get Retention job task log, tags ratain or deletion detail will be shown in a table. @param id Retention ID. @param eid Retention execution ID. @param tid Retention execution ID. @param [Hash] opts the optional parameters @return [String]
# 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
Get Retention job task log Get Retention job task log, tags ratain or deletion detail will be shown in a table. @param id Retention ID. @param eid Retention execution ID. @param tid Retention execution ID. @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
# 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
Get a Retention job Get a Retention job, job status may be delayed before job service schedule it up. @param id Retention ID. @param [Hash] opts the optional parameters @return [Array<RetentionExecution>]
# 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
Get a Retention job Get a Retention job, job status may be delayed before job service schedule it up. @param id Retention ID. @param [Hash] opts the optional parameters @return [Array<(Array<RetentionExecution>, Fixnum, Hash)>] Array<RetentionExecution> data, response status code and response headers
# 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
Trigger a Retention job Trigger a Retention job, if dry_run is True, nothing would be deleted actually. @param id Retention ID. @param action @param [Hash] opts the optional parameters @return [nil]
# 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
Trigger a Retention job Trigger a Retention job, if dry_run is True, nothing would be deleted actually. @param id Retention ID. @param action @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get Retention Policy Get Retention Policy. @param id Retention ID. @param [Hash] opts the optional parameters @return [RetentionPolicy]
# 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
Get Retention Policy Get Retention Policy. @param id Retention ID. @param [Hash] opts the optional parameters @return [Array<(RetentionPolicy
, Fixnum, Hash)>] RetentionPolicy
data, response status code and response headers
# 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
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. @param id Retention ID. @param policy @param [Hash] opts the optional parameters @return [nil]
# 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
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. @param id Retention ID. @param policy @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get Retention Metadatas Get Retention Metadatas. @param [Hash] opts the optional parameters @return [RetentionMetadata]
# 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
Get Retention Metadatas Get Retention Metadatas. @param [Hash] opts the optional parameters @return [Array<(RetentionMetadata
, Fixnum, Hash)>] RetentionMetadata
data, response status code and response headers
# 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
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. @param policy Create Retention Policy successfully. @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 6691 def retentions_post(policy, opts = {}) retentions_post_with_http_info(policy, opts) nil end
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. @param policy Create Retention Policy successfully. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
List scanner registrations Returns a list of currently configured scanner registrations. @param [Hash] opts the optional parameters @return [Array<ScannerRegistration>]
# 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
List scanner registrations Returns a list of currently configured scanner registrations. @param [Hash] opts the optional parameters @return [Array<(Array<ScannerRegistration>, Fixnum, Hash)>] Array<ScannerRegistration> data, response status code and response headers
# 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
Tests scanner registration settings Pings scanner adapter to test endpoint URL and authorization settings. @param settings A scanner registration settings to be tested. @param [Hash] opts the optional parameters @return [nil]
# 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
Tests scanner registration settings Pings scanner adapter to test endpoint URL and authorization settings. @param settings A scanner registration settings to be tested. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get a scanner registration details Retruns the details of the specified scanner registration. @param registration_id The scanner registration identifer. @param [Hash] opts the optional parameters @return [ScannerRegistration]
# 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
Get a scanner registration details Retruns the details of the specified scanner registration. @param registration_id The scanner registration identifer. @param [Hash] opts the optional parameters @return [Array<(ScannerRegistration
, Fixnum, Hash)>] ScannerRegistration
data, response status code and response headers
# 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
Get the metadata of the specified scanner registration Get the metadata of the specified scanner registration, including the capabilities and customzied properties. @param registration_id The scanner registration identifier. @param [Hash] opts the optional parameters @return [ScannerAdapterMetadata]
# File lib/harbor1_client/api/products_api.rb, line 6899 def scanners_registration_id_metadata_get(registration_id, opts = {}) data, _status_code, _headers = scanners_registration_id_metadata_get_with_http_info(registration_id, opts) data end
Get the metadata of the specified scanner registration Get the metadata of the specified scanner registration, including the capabilities and customzied properties. @param registration_id The scanner registration identifier. @param [Hash] opts the optional parameters @return [Array<(ScannerAdapterMetadata
, Fixnum, Hash)>] ScannerAdapterMetadata
data, response status code and response headers
# File lib/harbor1_client/api/products_api.rb, line 6909 def scanners_registration_id_metadata_get_with_http_info(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
Get the metrics of the latest scan all process Get the metrics of the latest scan all process @param [Hash] opts the optional parameters @return [Stats]
# 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
Get the metrics of the latest scan all process Get the metrics of the latest scan all process @param [Hash] opts the optional parameters @return [Array<(Stats
, Fixnum, Hash)>] Stats
data, response status code and response headers
# 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
Get the metrics of the latest scheduled scan all process Get the metrics of the latest scheduled scan all process @param [Hash] opts the optional parameters @return [Stats]
# 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
Get the metrics of the latest scheduled scan all process Get the metrics of the latest scheduled scan all process @param [Hash] opts the optional parameters @return [Array<(Stats
, Fixnum, Hash)>] Stats
data, response status code and response headers
# 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
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. @param q Search
parameter for project and repository name. @param [Hash] opts the optional parameters @return [Array<Search>]
# 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
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. @param q Search
parameter for project and repository name. @param [Hash] opts the optional parameters @return [Array<(Array<Search>, Fixnum, Hash)>] Array<Search> data, response status code and response headers
# 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
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. @param [Hash] opts the optional parameters @return [StatisticMap]
# 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
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. @param [Hash] opts the optional parameters @return [Array<(StatisticMap
, Fixnum, Hash)>] StatisticMap
data, response status code and response headers
# 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
Get the system level whitelist of CVE. Get the system level whitelist of CVE. This API can be called by all authenticated users. @param [Hash] opts the optional parameters @return [CVEWhitelist]
# 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
Get the system level whitelist of CVE. Get the system level whitelist of CVE. This API can be called by all authenticated users. @param [Hash] opts the optional parameters @return [Array<(CVEWhitelist
, Fixnum, Hash)>] CVEWhitelist
data, response status code and response headers
# 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
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. @param [Hash] opts the optional parameters @option opts [CVEWhitelist] :whitelist The whitelist with new content @return [nil]
# 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
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. @param [Hash] opts the optional parameters @option opts [CVEWhitelist] :whitelist The whitelist with new content @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get gc results. This endpoint let user get latest ten gc results. @param [Hash] opts the optional parameters @return [Array<GCResult>]
# 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
Get gc results. This endpoint let user get latest ten gc results. @param [Hash] opts the optional parameters @return [Array<(Array<GCResult>, Fixnum, Hash)>] Array<GCResult> data, response status code and response headers
# 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
Get gc status. This endpoint let user get gc status filtered by specific ID. @param id Relevant job ID @param [Hash] opts the optional parameters @return [GCResult]
# 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
Get gc status. This endpoint let user get gc status filtered by specific ID. @param id Relevant job ID @param [Hash] opts the optional parameters @return [Array<(GCResult
, Fixnum, Hash)>] GCResult
data, response status code and response headers
# 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
Get gc job log. This endpoint let user get gc job logs filtered by specific ID. @param id Relevant job ID @param [Hash] opts the optional parameters @return [String]
# 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
Get gc job log. This endpoint let user get gc job logs filtered by specific ID. @param id Relevant job ID @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
# 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
Get gc's schedule. This endpoint is for get schedule of gc job. @param [Hash] opts the optional parameters @return [AdminJobSchedule]
# 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
Get gc's schedule. This endpoint is for get schedule of gc job. @param [Hash] opts the optional parameters @return [Array<(AdminJobSchedule
, Fixnum, Hash)>] AdminJobSchedule
data, response status code and response headers
# 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
Create a gc schedule. This endpoint is for update gc schedule. @param schedule Updates of gc's schedule. @param [Hash] opts the optional parameters @return [nil]
# 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
Create a gc schedule. This endpoint is for update gc schedule. @param schedule Updates of gc's schedule. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Update gc's schedule. This endpoint is for update gc schedule. @param schedule Updates of gc's schedule. @param [Hash] opts the optional parameters @return [nil]
# 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
Update gc's schedule. This endpoint is for update gc schedule. @param schedule Updates of gc's schedule. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
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. @param endpoint Request body for OIDC endpoint to be tested. @param [Hash] opts the optional parameters @return [nil]
# 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
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. @param endpoint Request body for OIDC endpoint to be tested. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get scan_all's schedule. This endpoint is for getting a schedule for the scan all job, which scans all of images in Harbor. @param [Hash] opts the optional parameters @return [AdminJobSchedule]
# 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
Get scan_all's schedule. This endpoint is for getting a schedule for the scan all job, which scans all of images in Harbor. @param [Hash] opts the optional parameters @return [Array<(AdminJobSchedule
, Fixnum, Hash)>] AdminJobSchedule
data, response status code and response headers
# 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
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. @param schedule Create a schedule or a manual trigger for the scan all job. @param [Hash] opts the optional parameters @return [nil]
# 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
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. @param schedule Create a schedule or a manual trigger for the scan all job. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Update scan all's schedule. This endpoint is for updating the schedule of scan all job, which scans all of images in Harbor. @param schedule Updates the schedule of scan all job, which scans all of images in Harbor. @param [Hash] opts the optional parameters @return [nil]
# 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
Update scan all's schedule. This endpoint is for updating the schedule of scan all job, which scans all of images in Harbor. @param schedule Updates the schedule of scan all job, which scans all of images in Harbor. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get general system info This API is for retrieving general system info, this can be called by anonymous request. @param [Hash] opts the optional parameters @return [GeneralInfo]
# 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
Get general system info This API is for retrieving general system info, this can be called by anonymous request. @param [Hash] opts the optional parameters @return [Array<(GeneralInfo
, Fixnum, Hash)>] GeneralInfo
data, response status code and response headers
# 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
Get default root certificate. This endpoint is for downloading a default root certificate. @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 7813 def systeminfo_getcert_get(opts = {}) systeminfo_getcert_get_with_http_info(opts) nil end
Get default root certificate. This endpoint is for downloading a default root certificate. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get system volume info (total/free size). This endpoint is for retrieving system volume info that only provides for admin user. @param [Hash] opts the optional parameters @return [SystemInfo]
# 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
Get system volume info (total/free size). This endpoint is for retrieving system volume info that only provides for admin user. @param [Hash] opts the optional parameters @return [Array<(SystemInfo
, Fixnum, Hash)>] SystemInfo
data, response status code and response headers
# 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
Get all user groups information Get all user groups information @param [Hash] opts the optional parameters @return [Array<UserGroup>]
# 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
Get all user groups information Get all user groups information @param [Hash] opts the optional parameters @return [Array<(Array<UserGroup>, Fixnum, Hash)>] Array<UserGroup> data, response status code and response headers
# 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
Delete user group Delete user group @param group_id @param [Hash] opts the optional parameters @return [nil]
# 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
Delete user group Delete user group @param group_id @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get user group information Get user group information @param group_id Group ID @param [Hash] opts the optional parameters @return [UserGroup]
# 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
Get user group information Get user group information @param group_id Group ID @param [Hash] opts the optional parameters @return [Array<(UserGroup
, Fixnum, Hash)>] UserGroup
data, response status code and response headers
# 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
Update group information Update user group information @param group_id Group ID @param [Hash] opts the optional parameters @option opts [UserGroup] :usergroup @return [nil]
# 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
Update group information Update user group information @param group_id Group ID @param [Hash] opts the optional parameters @option opts [UserGroup] :usergroup @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Create user group Create user group information @param [Hash] opts the optional parameters @option opts [UserGroup] :usergroup @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 8119 def usergroups_post(opts = {}) usergroups_post_with_http_info(opts) nil end
Create user group Create user group information @param [Hash] opts the optional parameters @option opts [UserGroup] :usergroup @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get current user info. This endpoint is to get the current user information. @param [Hash] opts the optional parameters @return [User]
# 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
Get current user info. This endpoint is to get the current user information. @param [Hash] opts the optional parameters @return [Array<(User
, Fixnum, Hash)>] User
data, response status code and response headers
# 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
Get current user permissions. This endpoint is to get the current user permissions. @param [Hash] opts the optional parameters @option opts [String] :scope Get permissions of the scope @option opts [BOOLEAN] :relative If true, the resources in the response are relative to the scope, eg for resource '/project/1/repository' if relative is 'true' then the resource in response will be 'repository'. @return [Array<Permission>]
# 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
Get current user permissions. This endpoint is to get the current user permissions. @param [Hash] opts the optional parameters @option opts [String] :scope Get permissions of the scope @option opts [BOOLEAN] :relative If true, the resources in the response are relative to the scope, eg for resource '/project/1/repository' if relative is 'true' then the resource in response will be 'repository'. @return [Array<(Array<Permission>, Fixnum, Hash)>] Array<Permission> data, response status code and response headers
# 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
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. @param [Hash] opts the optional parameters @option opts [String] :username Username for filtering results. @option opts [String] :email Email for filtering results. @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page. @return [Array<User>]
# 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
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. @param [Hash] opts the optional parameters @option opts [String] :username Username for filtering results. @option opts [String] :email Email for filtering results. @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page. @return [Array<(Array<User>, Fixnum, Hash)>] Array<User> data, response status code and response headers
# 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
Creates a new user account. This endpoint is to create a user if the user does not already exist. @param user New created user. @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor1_client/api/products_api.rb, line 8330 def users_post(user, opts = {}) users_post_with_http_info(user, opts) nil end
Creates a new user account. This endpoint is to create a user if the user does not already exist. @param user New created user. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Search
users by username This endpoint is to search the users by username. @param username Username for filtering results. @param [Hash] opts the optional parameters @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page. @return [Array<UserSearch>]
# 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
Search
users by username This endpoint is to search the users by username. @param username Username for filtering results. @param [Hash] opts the optional parameters @option opts [Integer] :page The page number, default is 1. @option opts [Integer] :page_size The size of per page. @return [Array<(Array<UserSearch>, Fixnum, Hash)>] Array<UserSearch> data, response status code and response headers
# 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
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. @param user_id User
ID @param input_secret JSON object that includes the new secret @param [Hash] opts the optional parameters @return [nil]
# 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
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. @param user_id User
ID @param input_secret JSON object that includes the new secret @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
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. @param user_id User
ID for marking as to be removed. @param [Hash] opts the optional parameters @return [nil]
# 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
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. @param user_id User
ID for marking as to be removed. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Get a user's profile. Get user's profile with user id. @param user_id Registered user ID @param [Hash] opts the optional parameters @return [User]
# 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
Get a user's profile. Get user's profile with user id. @param user_id Registered user ID @param [Hash] opts the optional parameters @return [Array<(User
, Fixnum, Hash)>] User
data, response status code and response headers
# 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
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. @param user_id Registered user ID. @param password Password
to be updated, the attribute 'old_password' is optional when the API is called by the system administrator. @param [Hash] opts the optional parameters @return [nil]
# 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
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. @param user_id Registered user ID. @param password Password
to be updated, the attribute 'old_password' is optional when the API is called by the system administrator. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
Update a registered user to change his profile. This endpoint let a registered user change his profile. @param user_id Registered user ID @param profile Only email, realname and comment can be modified. @param [Hash] opts the optional parameters @return [nil]
# 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
Update a registered user to change his profile. This endpoint let a registered user change his profile. @param user_id Registered user ID @param profile Only email, realname and comment can be modified. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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
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. @param user_id Registered user ID @param has_admin_role Toggle a user to admin or not. @param [Hash] opts the optional parameters @return [nil]
# 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
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. @param user_id Registered user ID @param has_admin_role Toggle a user to admin or not. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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