Skip to content

scultura-org/harborapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for swagger

These APIs provide services for manipulating Harbor project.

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 2.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

import "github.com/scultura-org/harborapi"

Documentation for API Endpoints

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

Class Method HTTP request Description
ArtifactApi AddLabel Post /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/labels Add label to artifact
ArtifactApi CopyArtifact Post /projects/{project_name}/repositories/{repository_name}/artifacts Copy artifact
ArtifactApi CreateTag Post /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/tags Create tag
ArtifactApi DeleteArtifact Delete /projects/{project_name}/repositories/{repository_name}/artifacts/{reference} Delete the specific artifact
ArtifactApi DeleteTag Delete /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/tags/{tag_name} Delete tag
ArtifactApi GetAddition Get /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/additions/{addition} Get the addition of the specific artifact
ArtifactApi GetArtifact Get /projects/{project_name}/repositories/{repository_name}/artifacts/{reference} Get the specific artifact
ArtifactApi GetVulnerabilitiesAddition Get /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/additions/vulnerabilities Get the vulnerabilities addition of the specific artifact
ArtifactApi ListAccessories Get /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/accessories List accessories
ArtifactApi ListArtifacts Get /projects/{project_name}/repositories/{repository_name}/artifacts List artifacts
ArtifactApi ListTags Get /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/tags List tags
ArtifactApi RemoveLabel Delete /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/labels/{label_id} Remove label from artifact
AuditlogApi ListAuditLogs Get /audit-logs Get recent logs of the projects which the user is a member of
ConfigureApi GetConfigurations Get /configurations Get system configurations.
ConfigureApi GetInternalconfig Get /internalconfig Get internal configurations.
ConfigureApi UpdateConfigurations Put /configurations Modify system configurations.
GcApi CreateGCSchedule Post /system/gc/schedule Create a gc schedule.
GcApi GetGC Get /system/gc/{gc_id} Get gc status.
GcApi GetGCHistory Get /system/gc Get gc results.
GcApi GetGCLog Get /system/gc/{gc_id}/log Get gc job log.
GcApi GetGCSchedule Get /system/gc/schedule Get gc's schedule.
GcApi StopGC Put /system/gc/{gc_id} Stop the specific GC execution
GcApi UpdateGCSchedule Put /system/gc/schedule Update gc's schedule.
HealthApi GetHealth Get /health Check the status of Harbor components
IconApi GetIcon Get /icons/{digest} Get artifact icon
ImmutableApi CreateImmuRule Post /projects/{project_name_or_id}/immutabletagrules Add an immutable tag rule to current project
ImmutableApi DeleteImmuRule Delete /projects/{project_name_or_id}/immutabletagrules/{immutable_rule_id} Delete the immutable tag rule.
ImmutableApi ListImmuRules Get /projects/{project_name_or_id}/immutabletagrules List all immutable tag rules of current project
ImmutableApi UpdateImmuRule Put /projects/{project_name_or_id}/immutabletagrules/{immutable_rule_id} Update the immutable tag rule or enable or disable the rule
LabelApi CreateLabel Post /labels Post creates a label
LabelApi DeleteLabel Delete /labels/{label_id} Delete the label specified by ID.
LabelApi GetLabelByID Get /labels/{label_id} Get the label specified by ID.
LabelApi ListLabels Get /labels List labels according to the query strings.
LabelApi UpdateLabel Put /labels/{label_id} Update the label properties.
LdapApi ImportLdapUser Post /ldap/users/import Import selected available ldap users.
LdapApi PingLdap Post /ldap/ping Ping available ldap service.
LdapApi SearchLdapGroup Get /ldap/groups/search Search available ldap groups.
LdapApi SearchLdapUser Get /ldap/users/search Search available ldap users.
MemberApi CreateProjectMember Post /projects/{project_name_or_id}/members Create project member
MemberApi DeleteProjectMember Delete /projects/{project_name_or_id}/members/{mid} Delete project member
MemberApi GetProjectMember Get /projects/{project_name_or_id}/members/{mid} Get the project member information
MemberApi ListProjectMembers Get /projects/{project_name_or_id}/members Get all project member information
MemberApi UpdateProjectMember Put /projects/{project_name_or_id}/members/{mid} Update project member
OidcApi PingOIDC Post /system/oidc/ping Test the OIDC endpoint.
PingApi GetPing Get /ping Ping Harbor to check if it's alive.
PreheatApi CreateInstance Post /p2p/preheat/instances Create p2p provider instances
PreheatApi CreatePolicy Post /projects/{project_name}/preheat/policies Create a preheat policy under a project
PreheatApi DeleteInstance Delete /p2p/preheat/instances/{preheat_instance_name} Delete the specified P2P provider instance
PreheatApi DeletePolicy Delete /projects/{project_name}/preheat/policies/{preheat_policy_name} Delete a preheat policy
PreheatApi GetExecution Get /projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id} Get a execution detail by id
PreheatApi GetInstance Get /p2p/preheat/instances/{preheat_instance_name} Get a P2P provider instance
PreheatApi GetPolicy Get /projects/{project_name}/preheat/policies/{preheat_policy_name} Get a preheat policy
PreheatApi GetPreheatLog Get /projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id}/tasks/{task_id}/logs Get the log text stream of the specified task for the given execution
PreheatApi ListExecutions Get /projects/{project_name}/preheat/policies/{preheat_policy_name}/executions List executions for the given policy
PreheatApi ListInstances Get /p2p/preheat/instances List P2P provider instances
PreheatApi ListPolicies Get /projects/{project_name}/preheat/policies List preheat policies
PreheatApi ListProviders Get /p2p/preheat/providers List P2P providers
PreheatApi ListProvidersUnderProject Get /projects/{project_name}/preheat/providers Get all providers at project level
PreheatApi ListTasks Get /projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id}/tasks List all the related tasks for the given execution
PreheatApi ManualPreheat Post /projects/{project_name}/preheat/policies/{preheat_policy_name} Manual preheat
PreheatApi PingInstances Post /p2p/preheat/instances/ping Ping status of a instance.
PreheatApi StopExecution Patch /projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id} Stop a execution
PreheatApi UpdateInstance Put /p2p/preheat/instances/{preheat_instance_name} Update the specified P2P provider instance
PreheatApi UpdatePolicy Put /projects/{project_name}/preheat/policies/{preheat_policy_name} Update preheat policy
ProjectApi CreateProject Post /projects Create a new project.
ProjectApi DeleteProject Delete /projects/{project_name_or_id} Delete project by projectID
ProjectApi GetLogs Get /projects/{project_name}/logs Get recent logs of the projects
ProjectApi GetProject Get /projects/{project_name_or_id} Return specific project detail information
ProjectApi GetProjectDeletable Get /projects/{project_name_or_id}/_deletable Get the deletable status of the project
ProjectApi GetProjectSummary Get /projects/{project_name_or_id}/summary Get summary of the project.
ProjectApi GetScannerOfProject Get /projects/{project_name_or_id}/scanner Get project level scanner
ProjectApi HeadProject Head /projects Check if the project name user provided already exists.
ProjectApi ListProjects Get /projects List projects
ProjectApi ListScannerCandidatesOfProject Get /projects/{project_name_or_id}/scanner/candidates Get scanner registration candidates for configurating project level scanner
ProjectApi SetScannerOfProject Put /projects/{project_name_or_id}/scanner Configure scanner for the specified project
ProjectApi UpdateProject Put /projects/{project_name_or_id} Update properties for a selected project.
ProjectMetadataApi AddProjectMetadatas Post /projects/{project_name_or_id}/metadatas/ Add metadata for the specific project
ProjectMetadataApi DeleteProjectMetadata Delete /projects/{project_name_or_id}/metadatas/{meta_name} Delete the specific metadata for the specific project
ProjectMetadataApi GetProjectMetadata Get /projects/{project_name_or_id}/metadatas/{meta_name} Get the specific metadata of the specific project
ProjectMetadataApi ListProjectMetadatas Get /projects/{project_name_or_id}/metadatas/ Get the metadata of the specific project
ProjectMetadataApi UpdateProjectMetadata Put /projects/{project_name_or_id}/metadatas/{meta_name} Update the specific metadata for the specific project
PurgeApi CreatePurgeSchedule Post /system/purgeaudit/schedule Create a purge job schedule.
PurgeApi GetPurgeHistory Get /system/purgeaudit Get purge job results.
PurgeApi GetPurgeJob Get /system/purgeaudit/{purge_id} Get purge job status.
PurgeApi GetPurgeJobLog Get /system/purgeaudit/{purge_id}/log Get purge job log.
PurgeApi GetPurgeSchedule Get /system/purgeaudit/schedule Get purge's schedule.
PurgeApi StopPurge Put /system/purgeaudit/{purge_id} Stop the specific purge audit log execution
PurgeApi UpdatePurgeSchedule Put /system/purgeaudit/schedule Update purge job's schedule.
QuotaApi GetQuota Get /quotas/{id} Get the specified quota
QuotaApi ListQuotas Get /quotas List quotas
QuotaApi UpdateQuota Put /quotas/{id} Update the specified quota
RegistryApi CreateRegistry Post /registries Create a registry
RegistryApi DeleteRegistry Delete /registries/{id} Delete the specific registry
RegistryApi GetRegistry Get /registries/{id} Get the specific registry
RegistryApi GetRegistryInfo Get /registries/{id}/info Get the registry info
RegistryApi ListRegistries Get /registries List the registries
RegistryApi ListRegistryProviderInfos Get /replication/adapterinfos List all registered registry provider information
RegistryApi ListRegistryProviderTypes Get /replication/adapters List registry adapters
RegistryApi PingRegistry Post /registries/ping Check status of a registry
RegistryApi UpdateRegistry Put /registries/{id} Update the registry
ReplicationApi CreateReplicationPolicy Post /replication/policies Create a replication policy
ReplicationApi DeleteReplicationPolicy Delete /replication/policies/{id} Delete the specific replication policy
ReplicationApi GetReplicationExecution Get /replication/executions/{id} Get the specific replication execution
ReplicationApi GetReplicationLog Get /replication/executions/{id}/tasks/{task_id}/log Get the log of the specific replication task
ReplicationApi GetReplicationPolicy Get /replication/policies/{id} Get the specific replication policy
ReplicationApi ListReplicationExecutions Get /replication/executions List replication executions
ReplicationApi ListReplicationPolicies Get /replication/policies List replication policies
ReplicationApi ListReplicationTasks Get /replication/executions/{id}/tasks List replication tasks for a specific execution
ReplicationApi StartReplication Post /replication/executions Start one replication execution
ReplicationApi StopReplication Put /replication/executions/{id} Stop the specific replication execution
ReplicationApi UpdateReplicationPolicy Put /replication/policies/{id} Update the replication policy
RepositoryApi DeleteRepository Delete /projects/{project_name}/repositories/{repository_name} Delete repository
RepositoryApi GetRepository Get /projects/{project_name}/repositories/{repository_name} Get repository
RepositoryApi ListAllRepositories Get /repositories List all authorized repositories
RepositoryApi ListRepositories Get /projects/{project_name}/repositories List repositories
RepositoryApi UpdateRepository Put /projects/{project_name}/repositories/{repository_name} Update repository
RetentionApi CreateRetention Post /retentions Create Retention Policy
RetentionApi DeleteRetention Delete /retentions/{id} Delete Retention Policy
RetentionApi GetRentenitionMetadata Get /retentions/metadatas Get Retention Metadatas
RetentionApi GetRetention Get /retentions/{id} Get Retention Policy
RetentionApi GetRetentionTaskLog Get /retentions/{id}/executions/{eid}/tasks/{tid} Get Retention job task log
RetentionApi ListRetentionExecutions Get /retentions/{id}/executions Get Retention executions
RetentionApi ListRetentionTasks Get /retentions/{id}/executions/{eid}/tasks Get Retention tasks
RetentionApi OperateRetentionExecution Patch /retentions/{id}/executions/{eid} Stop a Retention execution
RetentionApi TriggerRetentionExecution Post /retentions/{id}/executions Trigger a Retention Execution
RetentionApi UpdateRetention Put /retentions/{id} Update Retention Policy
RobotApi CreateRobot Post /robots Create a robot account
RobotApi DeleteRobot Delete /robots/{robot_id} Delete a robot account
RobotApi GetRobotByID Get /robots/{robot_id} Get a robot account
RobotApi ListRobot Get /robots Get robot account
RobotApi RefreshSec Patch /robots/{robot_id} Refresh the robot secret
RobotApi UpdateRobot Put /robots/{robot_id} Update a robot account
Robotv1Api CreateRobotV1 Post /projects/{project_name_or_id}/robots Create a robot account
Robotv1Api DeleteRobotV1 Delete /projects/{project_name_or_id}/robots/{robot_id} Delete a robot account
Robotv1Api GetRobotByIDV1 Get /projects/{project_name_or_id}/robots/{robot_id} Get a robot account
Robotv1Api ListRobotV1 Get /projects/{project_name_or_id}/robots Get all robot accounts of specified project
Robotv1Api UpdateRobotV1 Put /projects/{project_name_or_id}/robots/{robot_id} Update status of robot account.
ScanApi GetReportLog Get /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/{report_id}/log Get the log of the scan report
ScanApi ScanArtifact Post /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan Scan the artifact
ScanApi StopScanArtifact Post /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/stop Cancelling a scan job for a particular artifact
ScanAllApi CreateScanAllSchedule Post /system/scanAll/schedule Create a schedule or a manual trigger for the scan all job.
ScanAllApi GetLatestScanAllMetrics Get /scans/all/metrics Get the metrics of the latest scan all process
ScanAllApi GetLatestScheduledScanAllMetrics Get /scans/schedule/metrics Get the metrics of the latest scheduled scan all process
ScanAllApi GetScanAllSchedule Get /system/scanAll/schedule Get scan all's schedule.
ScanAllApi StopScanAll Post /system/scanAll/stop Stop scanAll job execution
ScanAllApi UpdateScanAllSchedule Put /system/scanAll/schedule Update scan all's schedule.
ScanDataExportApi DownloadScanData Get /export/cve/download/{execution_id} Download the scan data export file
ScanDataExportApi ExportScanData Post /export/cve Export scan data for selected projects
ScanDataExportApi GetScanDataExportExecution Get /export/cve/execution/{execution_id} Get the specific scan data export execution
ScanDataExportApi GetScanDataExportExecutionList Get /export/cve/executions Get a list of specific scan data export execution jobs for a specified user
ScannerApi CreateScanner Post /scanners Create a scanner registration
ScannerApi DeleteScanner Delete /scanners/{registration_id} Delete a scanner registration
ScannerApi GetScanner Get /scanners/{registration_id} Get a scanner registration details
ScannerApi GetScannerMetadata Get /scanners/{registration_id}/metadata Get the metadata of the specified scanner registration
ScannerApi ListScanners Get /scanners List scanner registrations
ScannerApi PingScanner Post /scanners/ping Tests scanner registration settings
ScannerApi SetScannerAsDefault Patch /scanners/{registration_id} Set system default scanner registration
ScannerApi UpdateScanner Put /scanners/{registration_id} Update a scanner registration
SearchApi Search Get /search Search for projects, repositories and helm charts
StatisticApi GetStatistic Get /statistics Get the statistic information about the projects and repositories
SystemCVEAllowlistApi GetSystemCVEAllowlist Get /system/CVEAllowlist Get the system level allowlist of CVE.
SystemCVEAllowlistApi PutSystemCVEAllowlist Put /system/CVEAllowlist Update the system level allowlist of CVE.
SysteminfoApi GetCert Get /systeminfo/getcert Get default root certificate.
SysteminfoApi GetSystemInfo Get /systeminfo Get general system info
SysteminfoApi GetVolumes Get /systeminfo/volumes Get system volume info (total/free size).
UserApi CreateUser Post /users Create a local user.
UserApi DeleteUser Delete /users/{user_id} Mark a registered user as be removed.
UserApi GetCurrentUserInfo Get /users/current Get current user info.
UserApi GetCurrentUserPermissions Get /users/current/permissions Get current user permissions.
UserApi GetUser Get /users/{user_id} Get a user's profile.
UserApi ListUsers Get /users List users
UserApi SearchUsers Get /users/search Search users by username
UserApi SetCliSecret Put /users/{user_id}/cli_secret Set CLI secret for a user.
UserApi SetUserSysAdmin Put /users/{user_id}/sysadmin Update a registered user to change to be an administrator of Harbor.
UserApi UpdateUserPassword Put /users/{user_id}/password Change the password on a user that already exists.
UserApi UpdateUserProfile Put /users/{user_id} Update user's profile.
UsergroupApi CreateUserGroup Post /usergroups Create user group
UsergroupApi DeleteUserGroup Delete /usergroups/{group_id} Delete user group
UsergroupApi GetUserGroup Get /usergroups/{group_id} Get user group information
UsergroupApi ListUserGroups Get /usergroups Get all user groups information
UsergroupApi SearchUserGroups Get /usergroups/search Search groups by groupname
UsergroupApi UpdateUserGroup Put /usergroups/{group_id} Update group information
WebhookApi CreateWebhookPolicyOfProject Post /projects/{project_name_or_id}/webhook/policies Create project webhook policy.
WebhookApi DeleteWebhookPolicyOfProject Delete /projects/{project_name_or_id}/webhook/policies/{webhook_policy_id} Delete webhook policy of a project
WebhookApi GetSupportedEventTypes Get /projects/{project_name_or_id}/webhook/events Get supported event types and notify types.
WebhookApi GetWebhookPolicyOfProject Get /projects/{project_name_or_id}/webhook/policies/{webhook_policy_id} Get project webhook policy
WebhookApi LastTrigger Get /projects/{project_name_or_id}/webhook/lasttrigger Get project webhook policy last trigger info
WebhookApi ListWebhookPoliciesOfProject Get /projects/{project_name_or_id}/webhook/policies List project webhook policies.
WebhookApi UpdateWebhookPolicyOfProject Put /projects/{project_name_or_id}/webhook/policies/{webhook_policy_id} Update webhook policy of a project.
WebhookjobApi ListWebhookJobs Get /projects/{project_name_or_id}/webhook/jobs List project webhook jobs

Documentation For Models

Documentation For Authorization

basic

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
	UserName: "username",
	Password: "password",
})
r, err := client.Service.Operation(auth, args)

Author

About

Harbor api generated by swagger

Resources

Stars

Watchers

Forks

Releases

No releases published