harbor2_legacy_client

Harbor2LegacyClient - the Ruby gem for the Harbor 2 legacy API.

These APIs provide services for manipulating Harbor projects.

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 2.0
  • Package version: 0.2.0
  • Build package: io.swagger.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build harbor2_legacy_client.gemspec

Then either install the gem locally:

gem install ./harbor2_legacy_client-0.2.0.gem

(for development, run gem install --dev ./harbor2_legacy_client-0.2.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'harbor2_legacy_client', '~> 0.2.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO, then add the following in the Gemfile:

gem 'harbor2_legacy_client', :git => 'https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'harbor2_legacy_client'

# Setup authorization
Harbor2LegacyClient.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = Harbor2LegacyClient::ChartRepositoryApi.new

repo = 'repo_example' # String | The project name

name = 'name_example' # String | The chart name

version = 'version_example' # String | The chart version


begin
  #Return the attahced labels of chart.
  api_instance.chartrepo_repo_charts_name_version_labels_get(repo, name, version)
rescue Harbor2LegacyClient::ApiError => e
  puts "Exception when calling ChartRepositoryApi->chartrepo_repo_charts_name_version_labels_get: #{e}"
end

Documentation for API Endpoints

All URIs are relative to http://localhost/api/v2.0

Class Method HTTP request Description
Harbor2LegacyClient::ChartRepositoryApi chartrepo_repo_charts_name_version_labels_get GET /chartrepo/repo/charts/name/version/labels Return the attahced labels of chart.
Harbor2LegacyClient::ChartRepositoryApi chartrepo_repo_charts_name_version_labels_id_delete DELETE /chartrepo/repo/charts/name/version/labels/id Remove label from chart.
Harbor2LegacyClient::ChartRepositoryApi chartrepo_repo_charts_name_version_labels_post POST /chartrepo/repo/charts/name/version/labels Mark label to chart.
Harbor2LegacyClient::LabelApi chartrepo_repo_charts_name_version_labels_get GET /chartrepo/repo/charts/name/version/labels Return the attahced labels of chart.
Harbor2LegacyClient::LabelApi chartrepo_repo_charts_name_version_labels_id_delete DELETE /chartrepo/repo/charts/name/version/labels/id Remove label from chart.
Harbor2LegacyClient::LabelApi chartrepo_repo_charts_name_version_labels_post POST /chartrepo/repo/charts/name/version/labels Mark label to chart.
Harbor2LegacyClient::ProductsApi chartrepo_repo_charts_name_version_labels_get GET /chartrepo/repo/charts/name/version/labels Return the attahced labels of chart.
Harbor2LegacyClient::ProductsApi chartrepo_repo_charts_name_version_labels_id_delete DELETE /chartrepo/repo/charts/name/version/labels/id Remove label from chart.
Harbor2LegacyClient::ProductsApi chartrepo_repo_charts_name_version_labels_post POST /chartrepo/repo/charts/name/version/labels Mark label to chart.
Harbor2LegacyClient::ProductsApi configurations_get GET /configurations Get system configurations.
Harbor2LegacyClient::ProductsApi configurations_put PUT /configurations Modify system configurations.
Harbor2LegacyClient::ProductsApi email_ping_post POST /email/ping Test connection and authentication with email server.
Harbor2LegacyClient::ProductsApi health_get GET /health Health check API
Harbor2LegacyClient::ProductsApi labels_get GET /labels List labels according to the query strings.
Harbor2LegacyClient::ProductsApi labels_id_delete DELETE /labels/id Delete the label specified by ID.
Harbor2LegacyClient::ProductsApi labels_id_get GET /labels/id Get the label specified by ID.
Harbor2LegacyClient::ProductsApi labels_id_put PUT /labels/id Update the label properties.
Harbor2LegacyClient::ProductsApi labels_post POST /labels Post creates a label
Harbor2LegacyClient::ProductsApi ldap_groups_search_get GET /ldap/groups/search Search available ldap groups.
Harbor2LegacyClient::ProductsApi ldap_ping_post POST /ldap/ping Ping available ldap service.
Harbor2LegacyClient::ProductsApi ldap_users_import_post POST /ldap/users/import Import selected available ldap users.
Harbor2LegacyClient::ProductsApi ldap_users_search_get GET /ldap/users/search Search available ldap users.
Harbor2LegacyClient::ProductsApi projects_project_id_immutabletagrules_get GET /projects/project_id/immutabletagrules List all immutable tag rules of current project
Harbor2LegacyClient::ProductsApi projects_project_id_immutabletagrules_id_delete DELETE /projects/project_id/immutabletagrules/id Delete the immutable tag rule.
Harbor2LegacyClient::ProductsApi projects_project_id_immutabletagrules_id_put PUT /projects/project_id/immutabletagrules/id Update the immutable tag rule or enable or disable the rule
Harbor2LegacyClient::ProductsApi projects_project_id_immutabletagrules_post POST /projects/project_id/immutabletagrules Add an immutable tag rule to current project
Harbor2LegacyClient::ProductsApi projects_project_id_members_get GET /projects/project_id/members Get all project member information
Harbor2LegacyClient::ProductsApi projects_project_id_members_mid_delete DELETE /projects/project_id/members/mid Delete project member
Harbor2LegacyClient::ProductsApi projects_project_id_members_mid_get GET /projects/project_id/members/mid Get the project member information
Harbor2LegacyClient::ProductsApi projects_project_id_members_mid_put PUT /projects/project_id/members/mid Update project member
Harbor2LegacyClient::ProductsApi projects_project_id_members_post POST /projects/project_id/members Create project member
Harbor2LegacyClient::ProductsApi projects_project_id_metadatas_get GET /projects/project_id/metadatas Get project metadata.
Harbor2LegacyClient::ProductsApi projects_project_id_metadatas_meta_name_delete DELETE /projects/project_id/metadatas/meta_name Delete metadata of a project
Harbor2LegacyClient::ProductsApi projects_project_id_metadatas_meta_name_get GET /projects/project_id/metadatas/meta_name Get project metadata
Harbor2LegacyClient::ProductsApi projects_project_id_metadatas_meta_name_put PUT /projects/project_id/metadatas/meta_name Update metadata of a project.
Harbor2LegacyClient::ProductsApi projects_project_id_metadatas_post POST /projects/project_id/metadatas Add metadata for the project.
Harbor2LegacyClient::ProductsApi projects_project_id_robots_get GET /projects/project_id/robots Get all robot accounts of specified project
Harbor2LegacyClient::ProductsApi projects_project_id_robots_post POST /projects/project_id/robots Create a robot account for project
Harbor2LegacyClient::ProductsApi projects_project_id_robots_robot_id_delete DELETE /projects/project_id/robots/robot_id Delete the specified robot account
Harbor2LegacyClient::ProductsApi projects_project_id_robots_robot_id_get GET /projects/project_id/robots/robot_id Return the infor of the specified robot account.
Harbor2LegacyClient::ProductsApi projects_project_id_robots_robot_id_put PUT /projects/project_id/robots/robot_id Update status of robot account.
Harbor2LegacyClient::ProductsApi projects_project_id_scanner_candidates_get GET /projects/project_id/scanner/candidates Get scanner registration candidates for configurating project level scanner
Harbor2LegacyClient::ProductsApi projects_project_id_scanner_get GET /projects/project_id/scanner Get project level scanner
Harbor2LegacyClient::ProductsApi projects_project_id_webhook_events_get GET /projects/project_id/webhook/events Get supported event types and notify types.
Harbor2LegacyClient::ProductsApi projects_project_id_webhook_jobs_get GET /projects/project_id/webhook/jobs List project webhook jobs
Harbor2LegacyClient::ProductsApi projects_project_id_webhook_lasttrigger_get GET /projects/project_id/webhook/lasttrigger Get project webhook policy last trigger info
Harbor2LegacyClient::ProductsApi projects_project_id_webhook_policies_get GET /projects/project_id/webhook/policies List project webhook policies.
Harbor2LegacyClient::ProductsApi projects_project_id_webhook_policies_policy_id_delete DELETE /projects/project_id/webhook/policies/policy_id Delete webhook policy of a project
Harbor2LegacyClient::ProductsApi projects_project_id_webhook_policies_policy_id_get GET /projects/project_id/webhook/policies/policy_id Get project webhook policy
Harbor2LegacyClient::ProductsApi projects_project_id_webhook_policies_policy_id_put PUT /projects/project_id/webhook/policies/policy_id Update webhook policy of a project.
Harbor2LegacyClient::ProductsApi projects_project_id_webhook_policies_post POST /projects/project_id/webhook/policies Create project webhook policy.
Harbor2LegacyClient::ProductsApi projects_project_id_webhook_policies_test_post POST /projects/project_id/webhook/policies/test Test project webhook connection
Harbor2LegacyClient::ProductsApi quotas_get GET /quotas List quotas
Harbor2LegacyClient::ProductsApi quotas_id_get GET /quotas/id Get the specified quota
Harbor2LegacyClient::ProductsApi quotas_id_put PUT /quotas/id Update the specified quota
Harbor2LegacyClient::ProductsApi registries_get GET /registries List registries.
Harbor2LegacyClient::ProductsApi registries_id_delete DELETE /registries/id Delete specific registry.
Harbor2LegacyClient::ProductsApi registries_id_get GET /registries/id Get registry.
Harbor2LegacyClient::ProductsApi registries_id_info_get GET /registries/id/info Get registry info.
Harbor2LegacyClient::ProductsApi registries_id_namespace_get GET /registries/id/namespace List namespaces of registry
Harbor2LegacyClient::ProductsApi registries_id_put PUT /registries/id Update a given registry.
Harbor2LegacyClient::ProductsApi registries_ping_post POST /registries/ping Ping status of a registry.
Harbor2LegacyClient::ProductsApi registries_post POST /registries Create a new registry.
Harbor2LegacyClient::ProductsApi replication_adapters_get GET /replication/adapters List supported adapters.
Harbor2LegacyClient::ProductsApi replication_executions_get GET /replication/executions List replication executions.
Harbor2LegacyClient::ProductsApi replication_executions_id_get GET /replication/executions/id Get the execution of the replication.
Harbor2LegacyClient::ProductsApi replication_executions_id_put PUT /replication/executions/id Stop the execution of the replication.
Harbor2LegacyClient::ProductsApi replication_executions_id_tasks_get GET /replication/executions/id/tasks Get the task list of one execution.
Harbor2LegacyClient::ProductsApi replication_executions_id_tasks_task_id_log_get GET /replication/executions/id/tasks/task_id/log Get the log of one task.
Harbor2LegacyClient::ProductsApi replication_executions_post POST /replication/executions Start one execution of the replication.
Harbor2LegacyClient::ProductsApi replication_policies_get GET /replication/policies List replication policies
Harbor2LegacyClient::ProductsApi replication_policies_id_delete DELETE /replication/policies/id Delete the replication policy specified by ID.
Harbor2LegacyClient::ProductsApi replication_policies_id_get GET /replication/policies/id Get replication policy.
Harbor2LegacyClient::ProductsApi replication_policies_id_put PUT /replication/policies/id Update the replication policy
Harbor2LegacyClient::ProductsApi replication_policies_post POST /replication/policies Create a replication policy
Harbor2LegacyClient::ProductsApi retentions_id_executions_eid_patch PATCH /retentions/id/executions/eid Stop a Retention job
Harbor2LegacyClient::ProductsApi retentions_id_executions_eid_tasks_get GET /retentions/id/executions/eid/tasks Get Retention job tasks
Harbor2LegacyClient::ProductsApi retentions_id_executions_eid_tasks_tid_get GET /retentions/id/executions/eid/tasks/tid Get Retention job task log
Harbor2LegacyClient::ProductsApi retentions_id_executions_get GET /retentions/id/executions Get a Retention job
Harbor2LegacyClient::ProductsApi retentions_id_executions_post POST /retentions/id/executions Trigger a Retention job
Harbor2LegacyClient::ProductsApi retentions_id_get GET /retentions/id Get Retention Policy
Harbor2LegacyClient::ProductsApi retentions_id_put PUT /retentions/id Update Retention Policy
Harbor2LegacyClient::ProductsApi retentions_metadatas_get GET /retentions/metadatas Get Retention Metadatas
Harbor2LegacyClient::ProductsApi retentions_post POST /retentions Create Retention Policy
Harbor2LegacyClient::ProductsApi scanners_get GET /scanners List scanner registrations
Harbor2LegacyClient::ProductsApi scanners_ping_post POST /scanners/ping Tests scanner registration settings
Harbor2LegacyClient::ProductsApi scanners_registration_id_get GET /scanners/registration_id Get a scanner registration details
Harbor2LegacyClient::ProductsApi scanners_registration_id_metadata_get GET /scanners/registration_id/metadata Get the metadata of the specified scanner registration
Harbor2LegacyClient::ProductsApi scans_all_metrics_get GET /scans/all/metrics Get the metrics of the latest scan all process
Harbor2LegacyClient::ProductsApi scans_schedule_metrics_get GET /scans/schedule/metrics Get the metrics of the latest scheduled scan all process
Harbor2LegacyClient::ProductsApi search_get GET /search Search for projects, repositories and helm charts
Harbor2LegacyClient::ProductsApi statistics_get GET /statistics Get projects number and repositories number relevant to the user
Harbor2LegacyClient::ProductsApi system_cve_allowlist_get GET /system/CVEAllowlist Get the system level allowlist of CVE.
Harbor2LegacyClient::ProductsApi system_cve_allowlist_put PUT /system/CVEAllowlist Update the system level allowlist of CVE.
Harbor2LegacyClient::ProductsApi system_gc_get GET /system/gc Get gc results.
Harbor2LegacyClient::ProductsApi system_gc_id_get GET /system/gc/id Get gc status.
Harbor2LegacyClient::ProductsApi system_gc_id_log_get GET /system/gc/id/log Get gc job log.
Harbor2LegacyClient::ProductsApi system_gc_schedule_get GET /system/gc/schedule Get gc's schedule.
Harbor2LegacyClient::ProductsApi system_gc_schedule_post POST /system/gc/schedule Create a gc schedule.
Harbor2LegacyClient::ProductsApi system_gc_schedule_put PUT /system/gc/schedule Update gc's schedule.
Harbor2LegacyClient::ProductsApi system_oidc_ping_post POST /system/oidc/ping Test the OIDC endpoint.
Harbor2LegacyClient::ProductsApi system_scan_all_schedule_get GET /system/scanAll/schedule Get scan_all's schedule.
Harbor2LegacyClient::ProductsApi system_scan_all_schedule_post POST /system/scanAll/schedule Create a schedule or a manual trigger for the scan all job.
Harbor2LegacyClient::ProductsApi system_scan_all_schedule_put PUT /system/scanAll/schedule Update scan all's schedule.
Harbor2LegacyClient::ProductsApi systeminfo_get GET /systeminfo Get general system info
Harbor2LegacyClient::ProductsApi systeminfo_getcert_get GET /systeminfo/getcert Get default root certificate.
Harbor2LegacyClient::ProductsApi systeminfo_volumes_get GET /systeminfo/volumes Get system volume info (total/free size).
Harbor2LegacyClient::ProductsApi usergroups_get GET /usergroups Get all user groups information
Harbor2LegacyClient::ProductsApi usergroups_group_id_delete DELETE /usergroups/group_id Delete user group
Harbor2LegacyClient::ProductsApi usergroups_group_id_get GET /usergroups/group_id Get user group information
Harbor2LegacyClient::ProductsApi usergroups_group_id_put PUT /usergroups/group_id Update group information
Harbor2LegacyClient::ProductsApi usergroups_post POST /usergroups Create user group
Harbor2LegacyClient::ProductsApi users_current_get GET /users/current Get current user info.
Harbor2LegacyClient::ProductsApi users_current_permissions_get GET /users/current/permissions Get current user permissions.
Harbor2LegacyClient::ProductsApi users_get GET /users Get registered users of Harbor.
Harbor2LegacyClient::ProductsApi users_post POST /users Creates a new user account.
Harbor2LegacyClient::ProductsApi users_search_get GET /users/search Search users by username
Harbor2LegacyClient::ProductsApi users_user_id_cli_secret_put PUT /users/user_id/cli_secret Set CLI secret for a user.
Harbor2LegacyClient::ProductsApi users_user_id_delete DELETE /users/user_id Mark a registered user as be removed.
Harbor2LegacyClient::ProductsApi users_user_id_get GET /users/user_id Get a user's profile.
Harbor2LegacyClient::ProductsApi users_user_id_password_put PUT /users/user_id/password Change the password on a user that already exists.
Harbor2LegacyClient::ProductsApi users_user_id_put PUT /users/user_id Update a registered user to change his profile.
Harbor2LegacyClient::ProductsApi users_user_id_sysadmin_put PUT /users/user_id/sysadmin Update a registered user to change to be an administrator of Harbor.
Harbor2LegacyClient::QuotaApi quotas_id_get GET /quotas/id Get the specified quota
Harbor2LegacyClient::QuotaApi quotas_id_put PUT /quotas/id Update the specified quota
Harbor2LegacyClient::RetentionApi retentions_id_executions_eid_patch PATCH /retentions/id/executions/eid Stop a Retention job
Harbor2LegacyClient::RetentionApi retentions_id_executions_eid_tasks_get GET /retentions/id/executions/eid/tasks Get Retention job tasks
Harbor2LegacyClient::RetentionApi retentions_id_executions_eid_tasks_tid_get GET /retentions/id/executions/eid/tasks/tid Get Retention job task log
Harbor2LegacyClient::RetentionApi retentions_id_executions_get GET /retentions/id/executions Get a Retention job
Harbor2LegacyClient::RetentionApi retentions_id_executions_post POST /retentions/id/executions Trigger a Retention job
Harbor2LegacyClient::RetentionApi retentions_id_get GET /retentions/id Get Retention Policy
Harbor2LegacyClient::RetentionApi retentions_metadatas_get GET /retentions/metadatas Get Retention Metadatas
Harbor2LegacyClient::RetentionApi retentions_post POST /retentions Create Retention Policy
Harbor2LegacyClient::RobotAccountApi projects_project_id_robots_get GET /projects/project_id/robots Get all robot accounts of specified project
Harbor2LegacyClient::RobotAccountApi projects_project_id_robots_post POST /projects/project_id/robots Create a robot account for project
Harbor2LegacyClient::RobotAccountApi projects_project_id_robots_robot_id_delete DELETE /projects/project_id/robots/robot_id Delete the specified robot account
Harbor2LegacyClient::RobotAccountApi projects_project_id_robots_robot_id_get GET /projects/project_id/robots/robot_id Return the infor of the specified robot account.
Harbor2LegacyClient::RobotAccountApi projects_project_id_robots_robot_id_put PUT /projects/project_id/robots/robot_id Update status of robot account.
Harbor2LegacyClient::ScanApi scans_all_metrics_get GET /scans/all/metrics Get the metrics of the latest scan all process
Harbor2LegacyClient::ScanApi scans_schedule_metrics_get GET /scans/schedule/metrics Get the metrics of the latest scheduled scan all process
Harbor2LegacyClient::ScannersApi projects_project_id_scanner_candidates_get GET /projects/project_id/scanner/candidates Get scanner registration candidates for configurating project level scanner
Harbor2LegacyClient::ScannersApi projects_project_id_scanner_get GET /projects/project_id/scanner Get project level scanner
Harbor2LegacyClient::ScannersApi projects_project_id_scanner_put PUT /projects/project_id/scanner Configure scanner for the specified project
Harbor2LegacyClient::ScannersApi scanners_get GET /scanners List scanner registrations
Harbor2LegacyClient::ScannersApi scanners_ping_post POST /scanners/ping Tests scanner registration settings
Harbor2LegacyClient::ScannersApi scanners_post POST /scanners Create a scanner registration
Harbor2LegacyClient::ScannersApi scanners_registration_id_delete DELETE /scanners/registration_id Delete a scanner registration
Harbor2LegacyClient::ScannersApi scanners_registration_id_get GET /scanners/registration_id Get a scanner registration details
Harbor2LegacyClient::ScannersApi scanners_registration_id_metadata_get GET /scanners/registration_id/metadata Get the metadata of the specified scanner registration
Harbor2LegacyClient::ScannersApi scanners_registration_id_patch PATCH /scanners/registration_id Set system default scanner registration
Harbor2LegacyClient::ScannersApi scanners_registration_id_put PUT /scanners/registration_id Update a scanner registration
Harbor2LegacyClient::SystemApi system_cve_allowlist_get GET /system/CVEAllowlist Get the system level allowlist of CVE.
Harbor2LegacyClient::SystemApi system_cve_allowlist_put PUT /system/CVEAllowlist Update the system level allowlist of CVE.
Harbor2LegacyClient::SystemApi system_oidc_ping_post POST /system/oidc/ping Test the OIDC endpoint.

Documentation for Models

Documentation for Authorization

basicAuth

  • Type: HTTP basic authentication