harbor_api
v0.3.2
Published
These_APIs_provide_services_for_manipulating_Harbor_project_
Downloads
1
Readme
harbor_api
HarborApi - JavaScript client for harbor_api These APIs provide services for manipulating Harbor project. This SDK is automatically generated by the Swagger Codegen project:
- API version: 0.3.0
- Package version: 0.3.0
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install harbor_api --save
git
If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/harbor_api then install it via:
npm install YOUR_USERNAME/harbor_api --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Getting Started
Please follow the installation instruction and execute the following JS code:
var HarborApi = require('harbor_api');
var api = new HarborApi.ProductsApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.configurationsGet(callback);
Documentation for API Endpoints
All URIs are relative to http://localhost/api
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- HarborApi.ProductsApi | configurationsGet | GET /configurations | Get system configurations. HarborApi.ProductsApi | configurationsPut | PUT /configurations | Modify system configurations. HarborApi.ProductsApi | configurationsResetPost | POST /configurations/reset | Reset system configurations. HarborApi.ProductsApi | emailPingPost | POST /email/ping | Test connection and authentication with email server. HarborApi.ProductsApi | internalSyncregistryPost | POST /internal/syncregistry | Sync repositories from registry to DB. HarborApi.ProductsApi | jobsReplicationGet | GET /jobs/replication | List filters jobs according to the policy and repository HarborApi.ProductsApi | jobsReplicationIdDelete | DELETE /jobs/replication/{id} | Delete specific ID job. HarborApi.ProductsApi | jobsReplicationIdLogGet | GET /jobs/replication/{id}/log | Get job logs. HarborApi.ProductsApi | ldapPingPost | POST /ldap/ping | Ping available ldap service. HarborApi.ProductsApi | ldapUsersImportPost | POST /ldap/users/import | Import selected available ldap users. HarborApi.ProductsApi | ldapUsersSearchPost | POST /ldap/users/search | Search available ldap users. HarborApi.ProductsApi | logsGet | GET /logs | Get recent logs of the projects which the user is a member of HarborApi.ProductsApi | policiesReplicationGet | GET /policies/replication | List filters policies by name and project_id HarborApi.ProductsApi | policiesReplicationIdEnablementPut | PUT /policies/replication/{id}/enablement | Put modifies enablement of the policy. HarborApi.ProductsApi | policiesReplicationIdGet | GET /policies/replication/{id} | Get replication policy. HarborApi.ProductsApi | policiesReplicationIdPut | PUT /policies/replication/{id} | Put modifies name, description, target and enablement of policy. HarborApi.ProductsApi | policiesReplicationPost | POST /policies/replication | Post creates a policy HarborApi.ProductsApi | projectsGet | GET /projects | Return projects created by Harbor HarborApi.ProductsApi | projectsHead | HEAD /projects | Check if the project name user provided already exists. HarborApi.ProductsApi | projectsPost | POST /projects | Create a new project. HarborApi.ProductsApi | projectsProjectIdDelete | DELETE /projects/{project_id} | Delete project by projectID HarborApi.ProductsApi | projectsProjectIdGet | GET /projects/{project_id} | Return specific project detail infomation HarborApi.ProductsApi | projectsProjectIdLogsFilterPost | POST /projects/{project_id}/logs/filter | Get access logs accompany with a relevant project. HarborApi.ProductsApi | projectsProjectIdMembersGet | GET /projects/{project_id}/members/ | Return a project's relevant role members. HarborApi.ProductsApi | projectsProjectIdMembersPost | POST /projects/{project_id}/members/ | Add project role member accompany with relevant project and user. HarborApi.ProductsApi | projectsProjectIdMembersUserIdDelete | DELETE /projects/{project_id}/members/{user_id} | Delete project role members accompany with relevant project and user. HarborApi.ProductsApi | projectsProjectIdMembersUserIdGet | GET /projects/{project_id}/members/{user_id} | Return role members accompany with relevant project and user. HarborApi.ProductsApi | projectsProjectIdMembersUserIdPut | PUT /projects/{project_id}/members/{user_id} | Update project role members accompany with relevant project and user. HarborApi.ProductsApi | projectsProjectIdPublicityPut | PUT /projects/{project_id}/publicity | Update properties for a selected project. HarborApi.ProductsApi | repositoriesGet | GET /repositories | Get repositories accompany with relevant project and repo name. HarborApi.ProductsApi | repositoriesRepoNameDelete | DELETE /repositories/{repo_name} | Delete a repository. HarborApi.ProductsApi | repositoriesRepoNameSignaturesGet | GET /repositories/{repo_name}/signatures | Get signature information of a repository HarborApi.ProductsApi | repositoriesRepoNameTagsGet | GET /repositories/{repo_name}/tags | Get tags of a relevant repository. HarborApi.ProductsApi | repositoriesRepoNameTagsTagDelete | DELETE /repositories/{repo_name}/tags/{tag} | Delete a tag in a repository. HarborApi.ProductsApi | repositoriesRepoNameTagsTagManifestGet | GET /repositories/{repo_name}/tags/{tag}/manifest | Get manifests of a relevant repository. HarborApi.ProductsApi | repositoriesTopGet | GET /repositories/top | Get public repositories which are accessed most. HarborApi.ProductsApi | searchGet | GET /search | Search for projects and repositories HarborApi.ProductsApi | statisticsGet | GET /statistics | Get projects number and repositories number relevant to the user HarborApi.ProductsApi | systeminfoGet | GET /systeminfo | Get general system info HarborApi.ProductsApi | systeminfoGetcertGet | GET /systeminfo/getcert | Get default root certificate under OVA deployment. HarborApi.ProductsApi | systeminfoVolumesGet | GET /systeminfo/volumes | Get system volume info (total/free size). HarborApi.ProductsApi | targetsGet | GET /targets | List filters targets by name. HarborApi.ProductsApi | targetsIdDelete | DELETE /targets/{id} | Delete specific replication's target. HarborApi.ProductsApi | targetsIdGet | GET /targets/{id} | Get replication's target. HarborApi.ProductsApi | targetsIdPingPost | POST /targets/{id}/ping | Ping target. HarborApi.ProductsApi | targetsIdPoliciesGet | GET /targets/{id}/policies/ | List the target relevant policies. HarborApi.ProductsApi | targetsIdPut | PUT /targets/{id} | Update replication's target. HarborApi.ProductsApi | targetsPingPost | POST /targets/ping | Ping validates target. HarborApi.ProductsApi | targetsPost | POST /targets | Create a new replication target. HarborApi.ProductsApi | usersCurrentGet | GET /users/current | Get current user info. HarborApi.ProductsApi | usersGet | GET /users | Get registered users of Harbor. HarborApi.ProductsApi | usersPost | POST /users | Creates a new user account. HarborApi.ProductsApi | usersUserIdDelete | DELETE /users/{user_id} | Mark a registered user as be removed. HarborApi.ProductsApi | usersUserIdPasswordPut | PUT /users/{user_id}/password | Change the password on a user that already exists. HarborApi.ProductsApi | usersUserIdPut | PUT /users/{user_id} | Update a registered user to change his profile. HarborApi.ProductsApi | usersUserIdSysadminPut | PUT /users/{user_id}/sysadmin | Update a registered user to change to be an administrator of Harbor.
Documentation for Models
- HarborApi.AccessLog
- HarborApi.AccessLogFilter
- HarborApi.DetailedTag
- HarborApi.EmailServerSetting
- HarborApi.Enabledflag
- HarborApi.GeneralInfo
- HarborApi.HasAdminRole
- HarborApi.InlineResponse200
- HarborApi.InlineResponse2001
- HarborApi.InlineResponse20010
- HarborApi.InlineResponse20011
- HarborApi.InlineResponse20012
- HarborApi.InlineResponse2002
- HarborApi.InlineResponse2003
- HarborApi.InlineResponse2004
- HarborApi.InlineResponse2005
- HarborApi.InlineResponse2006
- HarborApi.InlineResponse2007
- HarborApi.InlineResponse2008
- HarborApi.InlineResponse2009
- HarborApi.InlineResponse500
- HarborApi.JobStatus
- HarborApi.LdapConf
- HarborApi.LdapFailedImportUsers
- HarborApi.LdapImportUsers
- HarborApi.LdapUsers
- HarborApi.Ldapconf
- HarborApi.Manifest
- HarborApi.Password
- HarborApi.PingTarget
- HarborApi.PoliciesreplicationTags
- HarborApi.Policyinfo
- HarborApi.Policyupdate
- HarborApi.Profile
- HarborApi.Project
- HarborApi.Project1
- HarborApi.ProjectReq
- HarborApi.PutTarget
- HarborApi.RepPolicy
- HarborApi.RepPolicyEnablementReq
- HarborApi.RepPolicyPost
- HarborApi.RepPolicyUpdate
- HarborApi.RepTarget
- HarborApi.RepTargetPost
- HarborApi.RepoSignature
- HarborApi.RepoTarget
- HarborApi.Repository
- HarborApi.Reptarget
- HarborApi.Role
- HarborApi.RoleParam
- HarborApi.Roles
- HarborApi.Roles1
- HarborApi.Search
- HarborApi.SearchProjects
- HarborApi.SearchRepositories
- HarborApi.SearchRepository
- HarborApi.Settings
- HarborApi.StatisticMap
- HarborApi.Storage
- HarborApi.SystemInfo
- HarborApi.SystemInfoStorage
- HarborApi.Tags
- HarborApi.Target
- HarborApi.TopRepo
- HarborApi.UidList
- HarborApi.User
- HarborApi.UserProfile
Documentation for Authorization
All endpoints do not require authorization.