class Harbor2LegacyClient::ProductsApi
Attributes
Public Class Methods
# File lib/harbor2_legacy_client/api/products_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
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/harbor2_legacy_client/api/products_api.rb, line 29 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/harbor2_legacy_client/api/products_api.rb, line 41 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/harbor2_legacy_client/api/products_api.rb, line 95 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/harbor2_legacy_client/api/products_api.rb, line 108 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/harbor2_legacy_client/api/products_api.rb, line 166 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/harbor2_legacy_client/api/products_api.rb, line 179 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
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/harbor2_legacy_client/api/products_api.rb, line 233 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/harbor2_legacy_client/api/products_api.rb, line 242 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/harbor2_legacy_client/api/products_api.rb, line 282 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/harbor2_legacy_client/api/products_api.rb, line 292 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/harbor2_legacy_client/api/products_api.rb, line 335 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/harbor2_legacy_client/api/products_api.rb, line 345 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/harbor2_legacy_client/api/products_api.rb, line 383 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/harbor2_legacy_client/api/products_api.rb, line 392 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
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/harbor2_legacy_client/api/products_api.rb, line 436 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/harbor2_legacy_client/api/products_api.rb, line 450 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/harbor2_legacy_client/api/products_api.rb, line 499 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/harbor2_legacy_client/api/products_api.rb, line 509 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/harbor2_legacy_client/api/products_api.rb, line 552 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/harbor2_legacy_client/api/products_api.rb, line 562 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/harbor2_legacy_client/api/products_api.rb, line 607 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/harbor2_legacy_client/api/products_api.rb, line 618 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
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/harbor2_legacy_client/api/products_api.rb, line 665 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/harbor2_legacy_client/api/products_api.rb, line 675 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/harbor2_legacy_client/api/products_api.rb, line 719 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/harbor2_legacy_client/api/products_api.rb, line 730 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/harbor2_legacy_client/api/products_api.rb, line 772 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/harbor2_legacy_client/api/products_api.rb, line 782 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/harbor2_legacy_client/api/products_api.rb, line 821 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/harbor2_legacy_client/api/products_api.rb, line 831 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/harbor2_legacy_client/api/products_api.rb, line 874 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/harbor2_legacy_client/api/products_api.rb, line 884 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
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<RetentionRule>]
# File lib/harbor2_legacy_client/api/products_api.rb, line 925 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<RetentionRule>, Fixnum, Hash)>] Array<RetentionRule> data, response status code and response headers
# File lib/harbor2_legacy_client/api/products_api.rb, line 935 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<RetentionRule>') 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/harbor2_legacy_client/api/products_api.rb, line 979 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/harbor2_legacy_client/api/products_api.rb, line 989 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 retention_rule @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor2_legacy_client/api/products_api.rb, line 1037 def projects_project_id_immutabletagrules_id_put(project_id, id, retention_rule, opts = {}) projects_project_id_immutabletagrules_id_put_with_http_info(project_id, id, retention_rule, 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 retention_rule @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/harbor2_legacy_client/api/products_api.rb, line 1048 def projects_project_id_immutabletagrules_id_put_with_http_info(project_id, id, retention_rule, 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 # verify the required parameter 'retention_rule' is set if @api_client.config.client_side_validation && retention_rule.nil? fail ArgumentError, "Missing the required parameter 'retention_rule' 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(retention_rule) 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 retention_rule @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor2_legacy_client/api/products_api.rb, line 1100 def projects_project_id_immutabletagrules_post(project_id, retention_rule, opts = {}) projects_project_id_immutabletagrules_post_with_http_info(project_id, retention_rule, 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 retention_rule @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/harbor2_legacy_client/api/products_api.rb, line 1111 def projects_project_id_immutabletagrules_post_with_http_info(project_id, retention_rule, 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 # verify the required parameter 'retention_rule' is set if @api_client.config.client_side_validation && retention_rule.nil? fail ArgumentError, "Missing the required parameter 'retention_rule' 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(retention_rule) 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 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/harbor2_legacy_client/api/products_api.rb, line 1159 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/harbor2_legacy_client/api/products_api.rb, line 1170 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/harbor2_legacy_client/api/products_api.rb, line 1215 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/harbor2_legacy_client/api/products_api.rb, line 1225 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/harbor2_legacy_client/api/products_api.rb, line 1273 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/harbor2_legacy_client/api/products_api.rb, line 1284 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/harbor2_legacy_client/api/products_api.rb, line 1334 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/harbor2_legacy_client/api/products_api.rb, line 1346 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/harbor2_legacy_client/api/products_api.rb, line 1394 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/harbor2_legacy_client/api/products_api.rb, line 1405 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/harbor2_legacy_client/api/products_api.rb, line 1448 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/harbor2_legacy_client/api/products_api.rb, line 1458 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/harbor2_legacy_client/api/products_api.rb, line 1503 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/harbor2_legacy_client/api/products_api.rb, line 1514 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/harbor2_legacy_client/api/products_api.rb, line 1562 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/harbor2_legacy_client/api/products_api.rb, line 1573 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/harbor2_legacy_client/api/products_api.rb, line 1622 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/harbor2_legacy_client/api/products_api.rb, line 1633 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/harbor2_legacy_client/api/products_api.rb, line 1681 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/harbor2_legacy_client/api/products_api.rb, line 1692 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
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/harbor2_legacy_client/api/products_api.rb, line 1739 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/harbor2_legacy_client/api/products_api.rb, line 1749 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/harbor2_legacy_client/api/products_api.rb, line 1794 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/harbor2_legacy_client/api/products_api.rb, line 1805 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/harbor2_legacy_client/api/products_api.rb, line 1854 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/harbor2_legacy_client/api/products_api.rb, line 1865 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/harbor2_legacy_client/api/products_api.rb, line 1913 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/harbor2_legacy_client/api/products_api.rb, line 1924 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/harbor2_legacy_client/api/products_api.rb, line 1974 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/harbor2_legacy_client/api/products_api.rb, line 1986 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/harbor2_legacy_client/api/products_api.rb, line 2037 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/harbor2_legacy_client/api/products_api.rb, line 2047 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/harbor2_legacy_client/api/products_api.rb, line 2091 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/harbor2_legacy_client/api/products_api.rb, line 2101 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 supported event types and notify types. Get supportted event types and notify types. @param project_id Relevant project ID. @param [Hash] opts the optional parameters @return [SupportedWebhookEventTypes]
# File lib/harbor2_legacy_client/api/products_api.rb, line 2145 def projects_project_id_webhook_events_get(project_id, opts = {}) data, _status_code, _headers = projects_project_id_webhook_events_get_with_http_info(project_id, opts) data end
Get supported event types and notify types. Get supportted event types and notify types. @param project_id Relevant project ID. @param [Hash] opts the optional parameters @return [Array<(SupportedWebhookEventTypes
, Fixnum, Hash)>] SupportedWebhookEventTypes
data, response status code and response headers
# File lib/harbor2_legacy_client/api/products_api.rb, line 2155 def projects_project_id_webhook_events_get_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProductsApi.projects_project_id_webhook_events_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_events_get" end # resource path local_var_path = '/projects/{project_id}/webhook/events'.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 => 'SupportedWebhookEventTypes') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProductsApi#projects_project_id_webhook_events_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/harbor2_legacy_client/api/products_api.rb, line 2200 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/harbor2_legacy_client/api/products_api.rb, line 2211 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/harbor2_legacy_client/api/products_api.rb, line 2260 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/harbor2_legacy_client/api/products_api.rb, line 2270 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/harbor2_legacy_client/api/products_api.rb, line 2314 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/harbor2_legacy_client/api/products_api.rb, line 2324 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/harbor2_legacy_client/api/products_api.rb, line 2369 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/harbor2_legacy_client/api/products_api.rb, line 2380 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/harbor2_legacy_client/api/products_api.rb, line 2428 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/harbor2_legacy_client/api/products_api.rb, line 2439 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/harbor2_legacy_client/api/products_api.rb, line 2489 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/harbor2_legacy_client/api/products_api.rb, line 2501 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/harbor2_legacy_client/api/products_api.rb, line 2553 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/harbor2_legacy_client/api/products_api.rb, line 2564 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/harbor2_legacy_client/api/products_api.rb, line 2612 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/harbor2_legacy_client/api/products_api.rb, line 2623 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/harbor2_legacy_client/api/products_api.rb, line 2674 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/harbor2_legacy_client/api/products_api.rb, line 2688 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/harbor2_legacy_client/api/products_api.rb, line 2733 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/harbor2_legacy_client/api/products_api.rb, line 2743 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/harbor2_legacy_client/api/products_api.rb, line 2788 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/harbor2_legacy_client/api/products_api.rb, line 2799 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. List registries according to the query. @param [Hash] opts the optional parameters @option opts [String] :name Deprecated, use `q` instead. @option opts [String] :q Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k=~v)", "range(k=[min~max])", "list with union releationship(k={v1 v2 v3})" and "list with intersetion relationship(k=(v1 v2 v3))". The value of range and list can be string(enclosed by " or '), integer or time(in format "2020-04-09 02:36:00"). All of these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g. q=k1=v1,k2=~v2,k3= @return [Array<Registry>]
# File lib/harbor2_legacy_client/api/products_api.rb, line 2847 def registries_get(opts = {}) data, _status_code, _headers = registries_get_with_http_info(opts) data end
List registries. List registries according to the query. @param [Hash] opts the optional parameters @option opts [String] :name Deprecated, use `q` instead. @option opts [String] :q Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k=~v)", "range(k=[min~max])", "list with union releationship(k={v1 v2 v3})" and "list with intersetion relationship(k=(v1 v2 v3))". The value of range and list can be string(enclosed by " or '), integer or time(in format "2020-04-09 02:36:00"). All of these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g. q=k1=v1,k2=~v2,k3= @return [Array<(Array<Registry>, Fixnum, Hash)>] Array<Registry> data, response status code and response headers
# File lib/harbor2_legacy_client/api/products_api.rb, line 2858 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? query_params[:'q'] = opts[:'q'] if !opts[:'q'].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/harbor2_legacy_client/api/products_api.rb, line 2900 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/harbor2_legacy_client/api/products_api.rb, line 2910 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/harbor2_legacy_client/api/products_api.rb, line 2953 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/harbor2_legacy_client/api/products_api.rb, line 2963 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/harbor2_legacy_client/api/products_api.rb, line 3007 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/harbor2_legacy_client/api/products_api.rb, line 3017 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/harbor2_legacy_client/api/products_api.rb, line 3062 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/harbor2_legacy_client/api/products_api.rb, line 3073 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/harbor2_legacy_client/api/products_api.rb, line 3119 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/harbor2_legacy_client/api/products_api.rb, line 3130 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/harbor2_legacy_client/api/products_api.rb, line 3177 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/harbor2_legacy_client/api/products_api.rb, line 3187 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/harbor2_legacy_client/api/products_api.rb, line 3230 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/harbor2_legacy_client/api/products_api.rb, line 3240 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/harbor2_legacy_client/api/products_api.rb, line 3282 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/harbor2_legacy_client/api/products_api.rb, line 3291 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/harbor2_legacy_client/api/products_api.rb, line 3335 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/harbor2_legacy_client/api/products_api.rb, line 3349 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/harbor2_legacy_client/api/products_api.rb, line 3394 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/harbor2_legacy_client/api/products_api.rb, line 3404 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/harbor2_legacy_client/api/products_api.rb, line 3448 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/harbor2_legacy_client/api/products_api.rb, line 3458 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/harbor2_legacy_client/api/products_api.rb, line 3501 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/harbor2_legacy_client/api/products_api.rb, line 3511 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/harbor2_legacy_client/api/products_api.rb, line 3556 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/harbor2_legacy_client/api/products_api.rb, line 3567 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/harbor2_legacy_client/api/products_api.rb, line 3614 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/harbor2_legacy_client/api/products_api.rb, line 3624 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/harbor2_legacy_client/api/products_api.rb, line 3669 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/harbor2_legacy_client/api/products_api.rb, line 3681 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/harbor2_legacy_client/api/products_api.rb, line 3724 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/harbor2_legacy_client/api/products_api.rb, line 3734 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/harbor2_legacy_client/api/products_api.rb, line 3777 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/harbor2_legacy_client/api/products_api.rb, line 3787 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/harbor2_legacy_client/api/products_api.rb, line 3832 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/harbor2_legacy_client/api/products_api.rb, line 3843 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/harbor2_legacy_client/api/products_api.rb, line 3890 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/harbor2_legacy_client/api/products_api.rb, line 3900 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
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/harbor2_legacy_client/api/products_api.rb, line 3945 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/harbor2_legacy_client/api/products_api.rb, line 3957 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/harbor2_legacy_client/api/products_api.rb, line 4009 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/harbor2_legacy_client/api/products_api.rb, line 4020 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/harbor2_legacy_client/api/products_api.rb, line 4070 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/harbor2_legacy_client/api/products_api.rb, line 4082 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/harbor2_legacy_client/api/products_api.rb, line 4134 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/harbor2_legacy_client/api/products_api.rb, line 4144 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/harbor2_legacy_client/api/products_api.rb, line 4189 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/harbor2_legacy_client/api/products_api.rb, line 4200 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/harbor2_legacy_client/api/products_api.rb, line 4247 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/harbor2_legacy_client/api/products_api.rb, line 4257 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/harbor2_legacy_client/api/products_api.rb, line 4302 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/harbor2_legacy_client/api/products_api.rb, line 4313 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/harbor2_legacy_client/api/products_api.rb, line 4359 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/harbor2_legacy_client/api/products_api.rb, line 4368 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/harbor2_legacy_client/api/products_api.rb, line 4408 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/harbor2_legacy_client/api/products_api.rb, line 4418 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/harbor2_legacy_client/api/products_api.rb, line 4460 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/harbor2_legacy_client/api/products_api.rb, line 4469 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/harbor2_legacy_client/api/products_api.rb, line 4509 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/harbor2_legacy_client/api/products_api.rb, line 4519 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/harbor2_legacy_client/api/products_api.rb, line 4562 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/harbor2_legacy_client/api/products_api.rb, line 4572 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/harbor2_legacy_client/api/products_api.rb, line 4616 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/harbor2_legacy_client/api/products_api.rb, line 4626 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/harbor2_legacy_client/api/products_api.rb, line 4669 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/harbor2_legacy_client/api/products_api.rb, line 4678 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/harbor2_legacy_client/api/products_api.rb, line 4717 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/harbor2_legacy_client/api/products_api.rb, line 4726 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/harbor2_legacy_client/api/products_api.rb, line 4766 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/harbor2_legacy_client/api/products_api.rb, line 4776 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/harbor2_legacy_client/api/products_api.rb, line 4820 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/harbor2_legacy_client/api/products_api.rb, line 4829 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 allowlist of CVE. Get the system level allowlist of CVE. This API can be called by all authenticated users. @param [Hash] opts the optional parameters @return [CVEAllowlist]
# File lib/harbor2_legacy_client/api/products_api.rb, line 4868 def system_cve_allowlist_get(opts = {}) data, _status_code, _headers = system_cve_allowlist_get_with_http_info(opts) data end
Get the system level allowlist of CVE. Get the system level allowlist of CVE. This API can be called by all authenticated users. @param [Hash] opts the optional parameters @return [Array<(CVEAllowlist
, Fixnum, Hash)>] CVEAllowlist
data, response status code and response headers
# File lib/harbor2_legacy_client/api/products_api.rb, line 4877 def system_cve_allowlist_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProductsApi.system_cve_allowlist_get ...' end # resource path local_var_path = '/system/CVEAllowlist' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain']) # HTTP 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 => 'CVEAllowlist') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProductsApi#system_cve_allowlist_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update the system level allowlist of CVE. This API overwrites the system level allowlist 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 [CVEAllowlist] :allowlist The allowlist with new content @return [nil]
# File lib/harbor2_legacy_client/api/products_api.rb, line 4917 def system_cve_allowlist_put(opts = {}) system_cve_allowlist_put_with_http_info(opts) nil end
Update the system level allowlist of CVE. This API overwrites the system level allowlist 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 [CVEAllowlist] :allowlist The allowlist with new content @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/harbor2_legacy_client/api/products_api.rb, line 4927 def system_cve_allowlist_put_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProductsApi.system_cve_allowlist_put ...' end # resource path local_var_path = '/system/CVEAllowlist' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain']) # HTTP 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[:'allowlist']) 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_allowlist_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/harbor2_legacy_client/api/products_api.rb, line 4965 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/harbor2_legacy_client/api/products_api.rb, line 4974 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/harbor2_legacy_client/api/products_api.rb, line 5014 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/harbor2_legacy_client/api/products_api.rb, line 5024 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/harbor2_legacy_client/api/products_api.rb, line 5068 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/harbor2_legacy_client/api/products_api.rb, line 5078 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/harbor2_legacy_client/api/products_api.rb, line 5121 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/harbor2_legacy_client/api/products_api.rb, line 5130 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/harbor2_legacy_client/api/products_api.rb, line 5170 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/harbor2_legacy_client/api/products_api.rb, line 5180 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/harbor2_legacy_client/api/products_api.rb, line 5223 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/harbor2_legacy_client/api/products_api.rb, line 5233 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/harbor2_legacy_client/api/products_api.rb, line 5276 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/harbor2_legacy_client/api/products_api.rb, line 5286 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/harbor2_legacy_client/api/products_api.rb, line 5328 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/harbor2_legacy_client/api/products_api.rb, line 5337 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/harbor2_legacy_client/api/products_api.rb, line 5377 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/harbor2_legacy_client/api/products_api.rb, line 5387 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/harbor2_legacy_client/api/products_api.rb, line 5430 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/harbor2_legacy_client/api/products_api.rb, line 5440 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/harbor2_legacy_client/api/products_api.rb, line 5482 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/harbor2_legacy_client/api/products_api.rb, line 5491 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/harbor2_legacy_client/api/products_api.rb, line 5530 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/harbor2_legacy_client/api/products_api.rb, line 5539 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/harbor2_legacy_client/api/products_api.rb, line 5577 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/harbor2_legacy_client/api/products_api.rb, line 5586 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/harbor2_legacy_client/api/products_api.rb, line 5625 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/harbor2_legacy_client/api/products_api.rb, line 5634 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/harbor2_legacy_client/api/products_api.rb, line 5674 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/harbor2_legacy_client/api/products_api.rb, line 5684 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/harbor2_legacy_client/api/products_api.rb, line 5727 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/harbor2_legacy_client/api/products_api.rb, line 5737 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/harbor2_legacy_client/api/products_api.rb, line 5782 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/harbor2_legacy_client/api/products_api.rb, line 5793 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/harbor2_legacy_client/api/products_api.rb, line 5836 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/harbor2_legacy_client/api/products_api.rb, line 5846 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/harbor2_legacy_client/api/products_api.rb, line 5884 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/harbor2_legacy_client/api/products_api.rb, line 5893 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/harbor2_legacy_client/api/products_api.rb, line 5934 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/harbor2_legacy_client/api/products_api.rb, line 5945 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/harbor2_legacy_client/api/products_api.rb, line 5990 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/harbor2_legacy_client/api/products_api.rb, line 6003 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/harbor2_legacy_client/api/products_api.rb, line 6047 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/harbor2_legacy_client/api/products_api.rb, line 6057 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/harbor2_legacy_client/api/products_api.rb, line 6102 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/harbor2_legacy_client/api/products_api.rb, line 6114 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/harbor2_legacy_client/api/products_api.rb, line 6162 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/harbor2_legacy_client/api/products_api.rb, line 6173 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/harbor2_legacy_client/api/products_api.rb, line 6220 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/harbor2_legacy_client/api/products_api.rb, line 6230 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/harbor2_legacy_client/api/products_api.rb, line 6273 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/harbor2_legacy_client/api/products_api.rb, line 6283 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/harbor2_legacy_client/api/products_api.rb, line 6328 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/harbor2_legacy_client/api/products_api.rb, line 6339 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/harbor2_legacy_client/api/products_api.rb, line 6387 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/harbor2_legacy_client/api/products_api.rb, line 6398 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 sysadmin_flag Toggle a user to admin or not. @param [Hash] opts the optional parameters @return [nil]
# File lib/harbor2_legacy_client/api/products_api.rb, line 6446 def users_user_id_sysadmin_put(user_id, sysadmin_flag, opts = {}) users_user_id_sysadmin_put_with_http_info(user_id, sysadmin_flag, 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 sysadmin_flag 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/harbor2_legacy_client/api/products_api.rb, line 6457 def users_user_id_sysadmin_put_with_http_info(user_id, sysadmin_flag, 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 'sysadmin_flag' is set if @api_client.config.client_side_validation && sysadmin_flag.nil? fail ArgumentError, "Missing the required parameter 'sysadmin_flag' 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(sysadmin_flag) 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