2016-03-10 11:05:12 +01:00
swagger : '2.0'
info :
title : Harbor API
description : These APIs provide services for manipulating Harbor project.
2018-12-19 10:18:54 +01:00
version : 1.7 .0
2017-01-20 09:25:03 +01:00
host : localhost
2016-03-10 11:05:12 +01:00
schemes :
- http
2018-08-01 00:38:23 +02:00
- https
2016-03-10 11:05:12 +01:00
basePath : /api
produces :
- application/json
- text/plain
consumes :
- application/json
2018-08-01 00:38:23 +02:00
securityDefinitions :
basicAuth :
type : basic
security :
- basicAuth : [ ]
2016-03-10 11:05:12 +01:00
paths :
2019-01-11 05:53:34 +01:00
/health :
get :
summary : 'Health check API'
description : |
The endpoint returns the health stauts of the system.
tags :
- Products
responses :
'200' :
description : The system health status.
schema :
$ref : '#/definitions/OverallHealthStatus'
2016-03-10 11:05:12 +01:00
/search :
get :
2018-09-12 13:57:40 +02:00
summary : 'Search for projects, repositories and helm charts'
description : |
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.
2016-03-10 11:05:12 +01:00
parameters :
- name : q
in : query
description : Search parameter for project and repository name.
required : true
type : string
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-03-10 11:05:12 +01:00
description : An array of search results
schema :
type : array
items :
$ref : '#/definitions/Search'
2017-07-20 12:47:46 +02:00
'500' :
2016-03-10 11:05:12 +01:00
description : Unexpected internal errors.
/projects :
get :
2017-06-09 08:11:44 +02:00
summary : List projects
2018-09-12 13:57:40 +02:00
description : |
This endpoint returns all projects created by Harbor, and can be filtered by project name.
2016-03-10 11:05:12 +01:00
parameters :
2017-07-20 12:47:46 +02:00
- name : name
2016-03-10 11:05:12 +01:00
in : query
2017-06-09 08:11:44 +02:00
description : The name of project.
2016-03-10 11:05:12 +01:00
required : false
type : string
2017-06-09 08:11:44 +02:00
- name : public
2016-03-10 11:05:12 +01:00
in : query
2017-06-09 08:11:44 +02:00
description : The project is public or private.
2016-03-10 11:05:12 +01:00
required : false
2017-06-09 08:11:44 +02:00
type : boolean
2016-03-10 11:05:12 +01:00
format : int32
2017-07-20 12:47:46 +02:00
- name : owner
2017-06-09 08:11:44 +02:00
in : query
description : The name of project owner.
required : false
type : string
2016-08-22 07:53:19 +02:00
- name : page
in : query
type : integer
format : int32
required : false
2017-07-20 12:47:46 +02:00
description : 'The page nubmer, default is 1.'
2016-08-22 07:53:19 +02:00
- name : page_size
in : query
type : integer
format : int32
required : false
2017-07-20 12:47:46 +02:00
description : 'The size of per page, default is 10, maximum is 100.'
2016-03-10 11:05:12 +01:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-03-10 11:05:12 +01:00
description : Return all matched projects.
schema :
type : array
items :
$ref : '#/definitions/Project'
2016-08-22 07:53:19 +02:00
headers :
X-Total-Count :
description : The total count of projects
type : integer
Link :
description : Link refers to the previous page and next page
type : string
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'500' :
2016-03-10 11:05:12 +01:00
description : Internal errors.
head :
summary : Check if the project name user provided already exists.
2018-09-12 13:57:40 +02:00
description : |
This endpoint is used to check if the project name user provided already exist.
2016-03-10 11:05:12 +01:00
parameters :
- name : project_name
in : query
description : Project name for checking exists.
required : true
type : string
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-03-10 11:05:12 +01:00
description : Project name exists.
2017-07-20 12:47:46 +02:00
'401' :
2016-03-10 11:05:12 +01:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'404' :
2016-03-10 11:05:12 +01:00
description : Project name does not exist.
2017-07-20 12:47:46 +02:00
'500' :
2016-03-10 11:05:12 +01:00
description : Unexpected internal errors.
post :
summary : Create a new project.
description : |
This endpoint is for user to create a new project.
parameters :
- name : project
in : body
description : New created project.
required : true
schema :
2016-09-02 10:05:55 +02:00
$ref : '#/definitions/ProjectReq'
2016-03-10 11:05:12 +01:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'201' :
2016-03-10 11:05:12 +01:00
description : Project created successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-03-10 11:05:12 +01:00
description : Unsatisfied with constraints of the project creation.
2017-07-20 12:47:46 +02:00
'401' :
2016-03-10 11:05:12 +01:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'409' :
2016-03-10 11:05:12 +01:00
description : Project name already exists.
2018-01-28 18:43:03 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2017-07-20 12:47:46 +02:00
'500' :
2016-03-10 11:05:12 +01:00
description : Unexpected internal errors.
2017-07-20 12:47:46 +02:00
'/projects/{project_id}' :
2016-08-11 11:39:36 +02:00
get :
summary : Return specific project detail infomation
description : |
This endpoint returns specific project information by project ID.
parameters :
- name : project_id
in : path
description : Project ID for filtering results.
required : true
type : integer
format : int64
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Return matched project information.
schema :
2016-09-02 10:05:55 +02:00
$ref : '#/definitions/Project'
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Internal errors.
2016-06-07 14:38:56 +02:00
put :
2016-03-10 11:05:12 +01:00
summary : Update properties for a selected project.
description : |
2017-09-29 10:37:43 +02:00
This endpoint is aimed to update the properties of a project.
2016-03-10 11:05:12 +01:00
parameters :
- name : project_id
in : path
type : integer
2016-08-11 11:39:36 +02:00
format : int64
2016-03-10 11:05:12 +01:00
required : true
description : Selected project ID.
- name : project
in : body
2017-07-20 12:47:46 +02:00
required : true
2016-03-10 11:05:12 +01:00
schema :
2018-05-03 08:37:00 +02:00
$ref : '#/definitions/ProjectReq'
2016-03-10 11:05:12 +01:00
description : Updates of project.
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-09-29 10:37:43 +02:00
description : Updated project properties successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-03-10 11:05:12 +01:00
description : Illegal format of provided ID value.
2017-07-20 12:47:46 +02:00
'401' :
2016-03-10 11:05:12 +01:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'403' :
2016-03-10 11:05:12 +01:00
description : User does not have permission to the project.
2017-07-20 12:47:46 +02:00
'404' :
2016-03-10 11:05:12 +01:00
description : Project ID does not exist.
2017-07-20 12:47:46 +02:00
'500' :
2016-03-10 11:05:12 +01:00
description : Unexpected internal errors.
2017-09-29 10:37:43 +02:00
delete :
summary : Delete project by projectID
description : |
This endpoint is aimed to delete project by project ID.
parameters :
- name : project_id
in : path
description : Project ID of project which will be deleted.
required : true
type : integer
format : int64
tags :
- Products
responses :
'200' :
description : Project is deleted successfully.
'400' :
description : Invalid project id.
'403' :
description : User need to log in first.
'404' :
description : Project does not exist.
'412' :
description : 'Project contains policies, can not be deleted.'
'500' :
description : Internal errors.
2017-07-20 12:47:46 +02:00
'/projects/{project_id}/logs' :
2017-06-07 12:26:25 +02:00
get :
2016-03-10 11:05:12 +01:00
summary : Get access logs accompany with a relevant project.
2018-09-12 13:57:40 +02:00
description : |
This endpoint let user search access logs filtered by operations and date time ranges.
2016-03-10 11:05:12 +01:00
parameters :
- name : project_id
in : path
type : integer
2016-08-11 11:39:36 +02:00
format : int64
2016-03-10 11:05:12 +01:00
required : true
description : Relevant project ID
2017-06-07 12:26:25 +02:00
- name : username
in : query
type : string
required : false
description : Username of the operator.
- name : repository
in : query
type : string
required : false
description : The name of repository
- name : tag
in : query
type : string
required : false
description : The name of tag
- name : operation
in : query
type : string
required : false
description : The operation
- name : begin_timestamp
in : query
type : string
required : false
description : The begin timestamp
- name : end_timestamp
in : query
type : string
required : false
description : The end timestamp
2016-08-22 07:53:19 +02:00
- name : page
in : query
type : integer
format : int32
required : false
2017-07-20 12:47:46 +02:00
description : 'The page nubmer, default is 1.'
2016-08-22 07:53:19 +02:00
- name : page_size
in : query
type : integer
format : int32
required : false
2017-07-20 12:47:46 +02:00
description : 'The size of per page, default is 10, maximum is 100.'
2016-03-10 11:05:12 +01:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-03-10 11:05:12 +01:00
description : Get access log successfully.
schema :
type : array
items :
$ref : '#/definitions/AccessLog'
2016-08-22 07:53:19 +02:00
headers :
X-Total-Count :
description : The total count of access logs
type : integer
Link :
description : Link refers to the previous page and next page
type : string
2017-07-20 12:47:46 +02:00
'400' :
2016-03-10 11:05:12 +01:00
description : Illegal format of provided ID value.
2017-07-20 12:47:46 +02:00
'401' :
2016-03-10 11:05:12 +01:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'500' :
2016-03-10 11:05:12 +01:00
description : Unexpected internal errors.
2017-10-23 08:42:30 +02:00
'/projects/{project_id}/metadatas' :
get :
summary : Get project metadata.
description : |
This endpoint returns metadata of the project specified by project ID.
parameters :
- name : project_id
in : path
description : The ID of project.
required : true
type : integer
format : int64
tags :
- Products
responses :
'200' :
description : Get metadata successfully.
schema :
$ref : '#/definitions/ProjectMetadata'
'401' :
description : User need to login first.
'500' :
description : Internal server errors.
post :
summary : Add metadata for the project.
description : |
This endpoint is aimed to add metadata of a project.
parameters :
- name : project_id
in : path
type : integer
format : int64
required : true
description : Selected project ID.
- name : metadata
in : body
required : true
schema :
$ref : '#/definitions/ProjectMetadata'
description : The metadata of project.
tags :
- Products
responses :
'200' :
description : Add metadata successfully.
'400' :
description : Invalid request.
'401' :
description : User need to log in first.
'403' :
description : User does not have permission to the project.
'404' :
description : Project ID does not exist.
2018-01-28 18:43:03 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2017-10-23 08:42:30 +02:00
'500' :
description : Internal server errors.
'/projects/{project_id}/metadatas/{meta_name}' :
get :
summary : Get project metadata
description : |
This endpoint returns specified metadata of a project.
parameters :
- name : project_id
in : path
description : Project ID for filtering results.
required : true
type : integer
format : int64
- name : meta_name
in : path
description : The name of metadat.
required : true
type : string
tags :
- Products
responses :
'200' :
description : Get metadata successfully.
schema :
$ref : '#/definitions/ProjectMetadata'
'401' :
description : User need to log in first.
'500' :
description : Internal server errors.
put :
summary : Update metadata of a project.
description : |
This endpoint is aimed to update the metadata of a project.
parameters :
- name : project_id
in : path
type : integer
format : int64
required : true
description : The ID of project.
- name : meta_name
in : path
description : The name of metadat.
required : true
type : string
tags :
- Products
responses :
'200' :
description : Updated metadata successfully.
'400' :
description : Invalid request.
'401' :
description : User need to log in first.
'403' :
description : User does not have permission to the project.
'404' :
description : Project or metadata does not exist.
'500' :
description : Internal server errors.
delete :
summary : Delete metadata of a project
description : |
This endpoint is aimed to delete metadata of a project.
parameters :
- name : project_id
in : path
description : The ID of project.
required : true
type : integer
format : int64
- name : meta_name
in : path
description : The name of metadat.
required : true
type : string
tags :
- Products
responses :
'200' :
description : Metadata is deleted successfully.
'400' :
description : Invalid requst.
'403' :
description : User need to log in first.
'404' :
description : Project or metadata does not exist.
'500' :
description : Internal server errors.
2018-04-11 11:12:33 +02:00
'/projects/{project_id}/members' :
2018-03-26 07:18:52 +02:00
get :
2018-08-15 12:53:49 +02:00
summary : Get all project member information
description : Get all project member information
parameters :
- name : project_id
in : path
type : integer
format : int64
required : true
description : Relevant project ID.
- name : entityname
in : query
type : string
description : The entity name to search.
tags :
- Products
responses :
'200' :
description : Get project members successfully.
schema :
type : array
items :
$ref : '#/definitions/ProjectMemberEntity'
'400' :
description : The project id is invalid.
'401' :
description : User need to log in first.
'403' :
description : User in session does not have permission to the project.
'404' :
description : Project ID does not exist.
'500' :
description : Unexpected internal errors.
2018-03-26 07:18:52 +02:00
post :
summary : Create project member
2018-09-12 13:57:40 +02:00
description : '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. '
2018-03-26 07:18:52 +02:00
tags :
2018-08-15 12:53:49 +02:00
- Products
2018-03-26 07:18:52 +02:00
parameters :
- name : project_id
in : path
type : integer
format : int64
required : true
description : Relevant project ID.
- name : project_member
in : body
schema :
$ref : '#/definitions/ProjectMember'
responses :
'201' :
description : Project member created successfully.
'400' :
2018-09-12 13:57:40 +02:00
description : 'Illegal format of project member or project id is invalid, or LDAP DN is invalid.'
2018-03-26 07:18:52 +02:00
'401' :
description : User need to log in first.
'403' :
description : User in session does not have permission to the project.
'404' :
2018-09-12 13:57:40 +02:00
description : 'Project does not exist, or the username does not found, or the user group does not found.'
2018-08-03 10:05:09 +02:00
'409' :
2018-08-15 12:53:49 +02:00
description : An LDAP user group with same DN already exist.
2018-03-26 07:18:52 +02:00
'500' :
2018-08-15 12:53:49 +02:00
description : Unexpected internal errors.
2018-04-11 11:12:33 +02:00
'/projects/{project_id}/members/{mid}' :
2018-03-26 07:18:52 +02:00
get :
2018-08-15 12:53:49 +02:00
summary : Get the project member information
description : Get the project member information
tags :
- Products
parameters :
- name : project_id
in : path
type : integer
format : int64
required : true
description : Relevant project ID.
- name : mid
in : path
type : integer
format : int64
required : true
description : The member ID
responses :
2018-03-26 07:18:52 +02:00
'200' :
description : Project member retrieved successfully.
schema :
$ref : '#/definitions/ProjectMemberEntity'
'400' :
2018-08-15 12:53:49 +02:00
description : 'Illegal format of project member or invalid project id, member id.'
2018-03-26 07:18:52 +02:00
'401' :
description : User need to log in first.
'403' :
description : User in session does not have permission to the project.
'404' :
description : Project or projet member does not exist.
'500' :
2018-08-15 12:53:49 +02:00
description : Unexpected internal errors.
2018-03-26 07:18:52 +02:00
put :
2018-08-15 12:53:49 +02:00
summary : Update project member
description : Update project member relationship
tags :
2018-03-26 07:18:52 +02:00
- Products
2018-08-15 12:53:49 +02:00
parameters :
- name : project_id
in : path
type : integer
format : int64
required : true
description : Relevant project ID.
- name : mid
in : path
type : integer
format : int64
required : true
description : Member ID.
- name : role
in : body
schema :
$ref : '#/definitions/RoleRequest'
responses :
'200' :
description : Project member updated successfully.
'400' :
2018-09-12 13:57:40 +02:00
description : 'Invalid role id, it should be 1,2 or 3, or invalid project id, or invalid member id.'
2018-08-15 12:53:49 +02:00
'401' :
description : User need to log in first.
'403' :
description : User in session does not have permission to the project.
'404' :
description : project or project member does not exist.
'500' :
description : Unexpected internal errors.
2018-03-26 07:18:52 +02:00
delete :
2018-08-15 12:53:49 +02:00
summary : Delete project member
tags :
- Products
parameters :
- name : project_id
in : path
type : integer
format : int64
required : true
description : Relevant project ID.
- name : mid
in : path
type : integer
format : int64
required : true
description : Member ID.
responses :
'200' :
description : Project member deleted successfully.
'400' :
description : The project id or project member id is invalid.
'401' :
description : User need to log in first.
'403' :
description : User in session does not have permission to the project.
'500' :
description : Unexpected internal errors.
2016-05-26 10:48:49 +02:00
/statistics :
2016-06-07 14:38:56 +02:00
get :
2016-06-08 09:14:41 +02:00
summary : Get projects number and repositories number relevant to the user
2018-09-12 13:57:40 +02:00
description : |
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.
2016-06-07 14:38:56 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2018-09-12 13:57:40 +02:00
description : Get the projects number and repositories number relevant to the user successfully.
2016-06-08 09:14:41 +02:00
schema :
2016-06-08 11:00:25 +02:00
$ref : '#/definitions/StatisticMap'
2017-07-20 12:47:46 +02:00
'401' :
2016-05-26 10:48:49 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'500' :
2016-05-26 10:48:49 +02:00
description : Unexpected internal errors.
2016-03-10 11:05:12 +01:00
/users :
get :
summary : Get registered users of Harbor.
2018-09-12 13:57:40 +02:00
description : |
This endpoint is for user to search registered users, support for filtering results with username.Notice, by now this operation is only for administrator.
2016-03-10 11:05:12 +01:00
parameters :
2016-08-11 11:39:36 +02:00
- name : username
2016-03-10 11:05:12 +01:00
in : query
type : string
required : false
description : Username for filtering results.
2017-06-12 11:49:18 +02:00
- name : email
in : query
type : string
required : false
description : Email for filtering results.
- name : page
in : query
type : integer
format : int32
required : false
2017-07-20 12:47:46 +02:00
description : 'The page nubmer, default is 1.'
2017-06-12 11:49:18 +02:00
- name : page_size
in : query
type : integer
format : int32
required : false
description : The size of per page.
2016-03-10 11:05:12 +01:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-03-10 11:05:12 +01:00
description : Searched for users of Harbor successfully.
schema :
type : array
items :
$ref : '#/definitions/User'
2017-07-20 12:47:46 +02:00
'400' :
2016-03-10 11:05:12 +01:00
description : Invalid user ID.
2017-07-20 12:47:46 +02:00
'401' :
2016-03-10 11:05:12 +01:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'403' :
2016-03-10 11:05:12 +01:00
description : User does not have permission of admin role.
2017-07-20 12:47:46 +02:00
'500' :
2016-03-10 11:05:12 +01:00
description : Unexpected internal errors.
2016-05-03 05:58:50 +02:00
post :
summary : Creates a new user account.
description : |
This endpoint is to create a user if the user does not already exist.
parameters :
2016-05-04 03:27:07 +02:00
- name : user
2016-05-03 05:58:50 +02:00
in : body
2016-05-04 03:27:07 +02:00
description : New created user.
2016-05-03 05:58:50 +02:00
required : true
2016-05-04 03:27:07 +02:00
schema :
$ref : '#/definitions/User'
2016-05-03 05:58:50 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'201' :
2016-05-03 05:58:50 +02:00
description : User created successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-05-03 05:58:50 +02:00
description : Unsatisfied with constraints of the user creation.
2017-07-20 12:47:46 +02:00
'403' :
2018-09-12 13:57:40 +02:00
description : User registration can only be used by admin role user when self-registration is off.
2018-01-28 18:43:03 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2017-07-20 12:47:46 +02:00
'500' :
2016-05-03 05:58:50 +02:00
description : Unexpected internal errors.
2016-11-18 10:05:11 +01:00
/users/current :
get :
summary : Get current user info.
description : |
This endpoint is to get the current user infomation.
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-11-18 10:05:11 +01:00
description : Get current user information successfully.
schema :
$ref : '#/definitions/User'
2017-07-20 12:47:46 +02:00
'401' :
2016-11-18 10:05:11 +01:00
description : User need to log in first.
2019-01-28 11:06:52 +01:00
/users/current/permissions :
get :
summary : Get current user permissions.
description : |
This endpoint is to get the current user permissions.
parameters :
- name : scope
in : query
type : string
required : false
description : Get permissions of the scope
- name : relative
in : query
type : boolean
required : false
description : |
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'.
tags :
- Products
responses :
'200' :
description : Get current user permission successfully.
schema :
type : array
items :
$ref : '#/definitions/Permission'
'401' :
description : User need to log in first.
'500' :
description : Internal errors.
2017-07-20 12:47:46 +02:00
'/users/{user_id}' :
2017-06-27 12:08:49 +02:00
get :
summary : Get a user's profile.
description : |
2017-07-20 12:47:46 +02:00
Get user's profile with user id.
2017-06-27 12:08:49 +02:00
parameters :
- name : user_id
in : path
type : integer
format : int
required : true
2017-07-20 12:47:46 +02:00
description : Registered user ID
2017-06-27 12:08:49 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-06-27 12:08:49 +02:00
description : Get user's profile successfully.
2018-10-24 07:23:09 +02:00
schema :
$ref : '#/definitions/User'
2017-07-20 12:47:46 +02:00
'400' :
2017-06-27 12:08:49 +02:00
description : Invalid user ID.
2017-07-20 12:47:46 +02:00
'401' :
2017-06-27 12:08:49 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'403' :
2017-06-27 12:08:49 +02:00
description : User does not have permission of admin role.
2017-07-20 12:47:46 +02:00
'404' :
2017-06-27 12:08:49 +02:00
description : User ID does not exist.
2017-07-20 12:47:46 +02:00
'500' :
2017-06-27 12:08:49 +02:00
description : Unexpected internal errors.
2016-03-10 11:05:12 +01:00
put :
2016-05-26 10:48:49 +02:00
summary : Update a registered user to change his profile.
2016-03-10 11:05:12 +01:00
description : |
2017-07-20 12:47:46 +02:00
This endpoint let a registered user change his profile.
2016-03-10 11:05:12 +01:00
parameters :
- name : user_id
in : path
type : integer
2016-08-11 11:39:36 +02:00
format : int
2016-03-10 11:05:12 +01:00
required : true
description : Registered user ID
2016-06-07 14:38:56 +02:00
- name : profile
2016-05-27 11:54:25 +02:00
in : body
2017-07-20 12:47:46 +02:00
description : 'Only email, realname and comment can be modified.'
2016-05-27 11:54:25 +02:00
required : true
2016-06-07 14:38:56 +02:00
schema :
2017-07-20 12:47:46 +02:00
$ref : '#/definitions/UserProfile'
2016-03-10 11:05:12 +01:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-06-27 12:08:49 +02:00
description : Updated user's profile successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-03-10 11:05:12 +01:00
description : Invalid user ID.
2017-07-20 12:47:46 +02:00
'401' :
2016-03-10 11:05:12 +01:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'403' :
2016-03-10 11:05:12 +01:00
description : User does not have permission of admin role.
2017-07-20 12:47:46 +02:00
'404' :
2016-03-10 11:05:12 +01:00
description : User ID does not exist.
2017-07-20 12:47:46 +02:00
'500' :
2016-03-10 11:05:12 +01:00
description : Unexpected internal errors.
delete :
summary : Mark a registered user as be removed.
description : |
This endpoint let administrator of Harbor mark a registered user as
be removed.It actually won't be deleted from DB.
parameters :
- name : user_id
in : path
type : integer
2016-08-11 11:39:36 +02:00
format : int
2016-03-10 11:05:12 +01:00
required : true
description : User ID for marking as to be removed.
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-03-10 11:05:12 +01:00
description : Marked user as be removed successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-03-10 11:05:12 +01:00
description : Invalid user ID.
2017-07-20 12:47:46 +02:00
'401' :
2016-03-10 11:05:12 +01:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'403' :
2016-03-10 11:05:12 +01:00
description : User does not have permission of admin role.
2017-07-20 12:47:46 +02:00
'404' :
2016-03-10 11:05:12 +01:00
description : User ID does not exist.
2017-07-20 12:47:46 +02:00
'500' :
2016-03-10 11:05:12 +01:00
description : Unexpected internal errors.
2017-07-20 12:47:46 +02:00
'/users/{user_id}/password' :
2016-05-03 05:58:50 +02:00
put :
summary : Change the password on a user that already exists.
2018-09-12 13:57:40 +02:00
description : |
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.
2016-05-03 05:58:50 +02:00
parameters :
- name : user_id
in : path
type : integer
2016-08-11 11:39:36 +02:00
format : int
2016-05-03 05:58:50 +02:00
required : true
description : Registered user ID.
2016-05-04 03:27:07 +02:00
- name : password
2016-05-03 05:58:50 +02:00
in : body
2018-09-12 13:57:40 +02:00
description : Password to be updated, the attribute 'old_password' is optional when the API is called by the system administrator.
2016-05-03 05:58:50 +02:00
required : true
2016-05-04 03:27:07 +02:00
schema :
2017-07-20 12:47:46 +02:00
$ref : '#/definitions/Password'
2016-05-03 05:58:50 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-05-03 05:58:50 +02:00
description : Updated password successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-05-03 06:05:06 +02:00
description : Invalid user ID; Old password is blank; New password is blank.
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : Don't have authority to change password. Please check login status.
2017-07-20 12:47:46 +02:00
'403' :
2018-09-12 13:57:40 +02:00
description : The caller does not have permission to update the password of the user with given ID, or the old password in request body is not correct.
2017-07-20 12:47:46 +02:00
'500' :
2016-05-26 10:48:49 +02:00
description : Unexpected internal errors.
2017-07-20 12:47:46 +02:00
'/users/{user_id}/sysadmin' :
put :
2016-05-26 10:48:49 +02:00
summary : Update a registered user to change to be an administrator of Harbor.
description : |
This endpoint let a registered user change to be an administrator
of Harbor.
parameters :
- name : user_id
in : path
type : integer
2016-08-11 11:39:36 +02:00
format : int
2016-05-26 10:48:49 +02:00
required : true
description : Registered user ID
2016-09-22 07:20:10 +02:00
- name : has_admin_role
in : body
2017-07-20 12:47:46 +02:00
description : Toggle a user to admin or not.
2016-09-22 07:20:10 +02:00
required : true
schema :
$ref : '#/definitions/HasAdminRole'
2016-05-26 10:48:49 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-05-26 10:48:49 +02:00
description : Updated user's admin role successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-05-26 10:48:49 +02:00
description : Invalid user ID.
2017-07-20 12:47:46 +02:00
'401' :
2016-05-26 10:48:49 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'403' :
2016-05-26 10:48:49 +02:00
description : User does not have permission of admin role.
2017-07-20 12:47:46 +02:00
'404' :
2016-05-26 10:48:49 +02:00
description : User ID does not exist.
2017-07-20 12:47:46 +02:00
'500' :
2016-05-26 10:48:49 +02:00
description : Unexpected internal errors.
2017-03-24 08:02:46 +01:00
/repositories :
get :
summary : Get repositories accompany with relevant project and repo name.
2018-09-12 13:57:40 +02:00
description : |
This endpoint lets user search repositories accompanying with relevant project ID and repo name. Repositories can be sorted by repo name, creation_time, update_time in either ascending or descending order.
2017-03-24 08:02:46 +01:00
parameters :
- name : project_id
in : query
type : integer
format : int32
required : true
description : Relevant project ID.
- name : q
in : query
type : string
required : false
description : Repo name for filtering results.
2018-08-28 12:11:03 +02:00
- name : sort
in : query
type : string
required : false
2018-09-12 13:57:40 +02:00
description : |
Sort method, valid values include : 'name' , '-name' , 'creation_time' , '-creation_time' , 'update_time' , '-update_time' . Here '-' stands for descending order.
2018-03-15 09:56:43 +01:00
- name : label_id
in : query
type : integer
required : false
description : The ID of label used to filter the result.
2017-03-24 08:02:46 +01:00
- name : page
in : query
type : integer
format : int32
required : false
2017-07-20 12:47:46 +02:00
description : 'The page nubmer, default is 1.'
2017-03-24 08:02:46 +01:00
- name : page_size
in : query
type : integer
format : int32
required : false
2017-07-20 12:47:46 +02:00
description : 'The size of per page, default is 10, maximum is 100.'
2017-03-24 08:02:46 +01:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-05-10 11:09:24 +02:00
description : Get repositories successfully.
2017-03-24 08:02:46 +01:00
schema :
type : array
items :
$ref : '#/definitions/Repository'
headers :
X-Total-Count :
description : The total count of repositories
type : integer
Link :
description : Link refers to the previous page and next page
type : string
2017-07-20 12:47:46 +02:00
'400' :
2017-03-24 08:02:46 +01:00
description : Invalid project ID.
2017-07-20 12:47:46 +02:00
'403' :
2018-09-12 13:57:40 +02:00
description : Project is not public or current user is irrelevant to the repository.
2017-07-20 12:47:46 +02:00
'404' :
2017-03-24 08:02:46 +01:00
description : Project ID does not exist.
2017-07-20 12:47:46 +02:00
'500' :
2017-03-24 08:02:46 +01:00
description : Unexpected internal errors.
2017-07-20 12:47:46 +02:00
'/repositories/{repo_name}' :
2017-05-11 11:34:08 +02:00
delete :
summary : Delete a repository.
description : |
This endpoint let user delete a repository with name.
parameters :
- name : repo_name
in : path
type : string
required : true
description : The name of repository which will be deleted.
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-05-11 11:34:08 +02:00
description : Delete successfully.
2017-07-20 12:47:46 +02:00
'400' :
2017-05-11 11:34:08 +02:00
description : Invalid repo_name.
2017-07-20 12:47:46 +02:00
'401' :
2017-05-11 11:34:08 +02:00
description : Unauthorized.
2017-07-20 12:47:46 +02:00
'403' :
2017-05-11 11:34:08 +02:00
description : Forbidden.
2017-07-20 12:47:46 +02:00
'404' :
description : Repository not found.
2017-11-27 07:18:57 +01:00
put :
summary : Update description of the repository.
description : |
This endpoint is used to update description of the repository.
parameters :
- name : repo_name
in : path
type : string
required : true
description : The name of repository which will be deleted.
- name : description
in : body
description : The description of the repository.
required : true
schema :
$ref : '#/definitions/RepositoryDescription'
tags :
- Products
responses :
'200' :
description : Update successfully.
'401' :
description : Unauthorized.
'403' :
description : Forbidden.
'404' :
description : Repository not found.
2018-03-12 10:13:01 +01:00
'/repositories/{repo_name}/labels' :
get :
summary : Get labels of a repository.
description : |
Get labels of a repository specified by the repo_name.
parameters :
- name : repo_name
in : path
type : string
required : true
description : The name of repository.
tags :
- Products
responses :
'200' :
description : Successfully.
2018-03-14 06:42:19 +01:00
schema :
type : array
items :
$ref : '#/definitions/Label'
2018-03-12 10:13:01 +01:00
'401' :
description : Unauthorized.
'403' :
2018-09-12 13:57:40 +02:00
description : Forbidden. User should have read permisson for the repository to perform the action.
2018-03-12 10:13:01 +01:00
'404' :
description : Repository not found.
post :
summary : Add a label to the repository.
description : |
Add a label to the repository.
parameters :
- name : repo_name
in : path
type : string
required : true
description : The name of repository.
- name : label
in : body
description : Only the ID property is required.
required : true
schema :
$ref : '#/definitions/Label'
tags :
- Products
responses :
'200' :
description : Successfully.
'401' :
description : Unauthorized.
'403' :
2018-09-12 13:57:40 +02:00
description : Forbidden. User should have write permisson for the repository to perform the action.
2018-03-12 10:13:01 +01:00
'404' :
description : Resource not found.
'/repositories/{repo_name}/labels/{label_id}' :
delete :
summary : Delete label from the repository.
description : |
Delete the label from the repository specified by the repo_name.
parameters :
- name : repo_name
in : path
type : string
required : true
description : The name of repository.
- name : label_id
in : path
type : integer
required : true
description : The ID of label.
tags :
- Products
responses :
'200' :
description : Successfully.
'401' :
description : Unauthorized.
'403' :
2018-09-12 13:57:40 +02:00
description : Forbidden. User should have write permisson for the repository to perform the action.
2018-03-12 10:13:01 +01:00
'404' :
description : Resource not found.
2017-07-20 12:47:46 +02:00
'/repositories/{repo_name}/tags/{tag}' :
2017-06-20 07:46:32 +02:00
get :
summary : Get the tag of the repository.
2018-09-12 13:57:40 +02:00
description : |
This endpoint aims to retrieve the tag of the repository. If deployed with Notary, the signature property of response represents whether the image is singed or not. If the property is null, the image is unsigned.
2017-06-20 07:46:32 +02:00
parameters :
- name : repo_name
in : path
type : string
required : true
description : Relevant repository name.
- name : tag
in : path
type : string
required : true
description : Tag of the repository.
tags :
2017-07-20 12:47:46 +02:00
- Products
2017-06-20 07:46:32 +02:00
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-06-20 07:46:32 +02:00
description : Get tag successfully.
schema :
$ref : '#/definitions/DetailedTag'
2017-07-20 12:47:46 +02:00
'500' :
2017-06-20 07:46:32 +02:00
description : Unexpected internal errors.
2016-04-20 07:31:47 +02:00
delete :
2017-03-21 10:54:02 +01:00
summary : Delete a tag in a repository.
2016-04-20 07:31:47 +02:00
description : |
2017-03-21 10:54:02 +01:00
This endpoint let user delete tags with repo name and tag.
2016-04-20 07:31:47 +02:00
parameters :
- name : repo_name
2017-03-21 10:54:02 +01:00
in : path
2016-04-20 07:31:47 +02:00
type : string
required : true
description : The name of repository which will be deleted.
- name : tag
2017-03-21 10:54:02 +01:00
in : path
2016-04-20 07:31:47 +02:00
type : string
2017-03-21 10:54:02 +01:00
required : true
2016-04-20 07:31:47 +02:00
description : Tag of a repository.
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-03-21 10:54:02 +01:00
description : Delete tag successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-04-20 07:31:47 +02:00
description : Invalid repo_name.
2017-07-20 12:47:46 +02:00
'401' :
2016-04-20 07:31:47 +02:00
description : Unauthorized.
2017-07-20 12:47:46 +02:00
'403' :
2016-09-02 10:05:55 +02:00
description : Forbidden.
2017-07-20 12:47:46 +02:00
'404' :
description : Repository or tag not found.
'/repositories/{repo_name}/tags' :
2016-03-10 11:05:12 +01:00
get :
summary : Get tags of a relevant repository.
2018-09-12 13:57:40 +02:00
description : |
This endpoint aims to retrieve tags from a relevant repository. If deployed with Notary, the signature property of response represents whether the image is singed or not. If the property is null, the image is unsigned.
2016-03-10 11:05:12 +01:00
parameters :
- name : repo_name
2017-03-21 10:54:02 +01:00
in : path
2016-03-10 11:05:12 +01:00
type : string
required : true
description : Relevant repository name.
2018-03-15 09:56:43 +01:00
- name : label_ids
in : query
type : string
required : false
description : A list of comma separated label IDs.
2016-03-10 11:05:12 +01:00
tags :
2017-07-20 12:47:46 +02:00
- Products
2016-03-10 11:05:12 +01:00
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-05-10 11:09:24 +02:00
description : Get tags successfully.
2016-11-07 10:29:01 +01:00
schema :
type : array
items :
2017-03-09 10:30:00 +01:00
$ref : '#/definitions/DetailedTag'
2017-07-20 12:47:46 +02:00
'500' :
2016-03-10 11:05:12 +01:00
description : Unexpected internal errors.
2018-09-18 08:05:35 +02:00
post :
summary : Retag an image
description : >
This endpoint tags an existing image with another tag in this repo, source images
can be in different repos or projects.
parameters :
2018-11-06 06:38:53 +01:00
- name : repo_name
in : path
type : string
required : true
description : Relevant repository name.
2018-09-18 08:05:35 +02:00
- name : request
in : body
2018-10-08 13:23:45 +02:00
description : Request to give source image and target tag.
2018-09-18 08:05:35 +02:00
required : true
schema :
$ref : '#/definitions/RetagReq'
tags :
- Products
responses :
'200' :
description : Image retag successfully.
'400' :
2018-10-08 13:23:45 +02:00
description : Invalid image values provided.
2018-09-18 08:05:35 +02:00
'401' :
description : User has no permission to the source project or destination project.
'404' :
description : Project or repository not found.
'409' :
description : Target tag already exists.
'500' :
description : Unexpected internal errors.
2018-03-12 10:13:01 +01:00
'/repositories/{repo_name}/tags/{tag}/labels' :
get :
summary : Get labels of an image.
description : |
Get labels of an image specified by the repo_name and tag.
parameters :
- name : repo_name
in : path
type : string
required : true
description : The name of repository.
- name : tag
in : path
type : string
required : true
description : The tag of the image.
tags :
- Products
responses :
'200' :
description : Successfully.
2018-03-14 06:42:19 +01:00
schema :
type : array
items :
$ref : '#/definitions/Label'
2018-03-12 10:13:01 +01:00
'401' :
description : Unauthorized.
'403' :
2018-09-12 13:57:40 +02:00
description : Forbidden. User should have read permisson for the image to perform the action.
2018-03-12 10:13:01 +01:00
'404' :
description : Resource not found.
post :
summary : Add a label to image.
description : |
Add a label to the image.
parameters :
- name : repo_name
in : path
type : string
required : true
description : The name of repository.
- name : tag
in : path
type : string
required : true
description : The tag of the image.
- name : label
in : body
description : Only the ID property is required.
required : true
schema :
$ref : '#/definitions/Label'
tags :
- Products
responses :
'200' :
description : Successfully.
'401' :
description : Unauthorized.
'403' :
2018-09-12 13:57:40 +02:00
description : Forbidden. User should have write permisson for the image to perform the action.
2018-03-12 10:13:01 +01:00
'404' :
description : Resource not found.
'/repositories/{repo_name}/tags/{tag}/labels/{label_id}' :
delete :
summary : Delete label from the image.
description : |
Delete the label from the image specified by the repo_name and tag.
parameters :
- name : repo_name
in : path
type : string
required : true
description : The name of repository.
- name : tag
in : path
type : string
required : true
description : The tag of the image.
- name : label_id
in : path
type : integer
required : true
description : The ID of label.
tags :
- Products
responses :
'200' :
description : Successfully.
'401' :
description : Unauthorized.
'403' :
2018-09-12 13:57:40 +02:00
description : Forbidden. User should have write permisson for the image to perform the action.
2018-03-12 10:13:01 +01:00
'404' :
description : Resource not found.
2017-07-20 12:47:46 +02:00
'/repositories/{repo_name}/tags/{tag}/manifest' :
2016-03-10 11:05:12 +01:00
get :
summary : Get manifests of a relevant repository.
description : |
This endpoint aims to retreive manifests from a relevant repository.
parameters :
- name : repo_name
2017-03-21 10:54:02 +01:00
in : path
2016-03-10 11:05:12 +01:00
type : string
required : true
description : Repository name
- name : tag
2017-03-21 10:54:02 +01:00
in : path
2016-03-10 11:05:12 +01:00
type : string
required : true
description : Tag name
2016-08-22 07:53:19 +02:00
- name : version
in : query
type : string
required : false
2018-09-12 13:57:40 +02:00
description : 'The version of manifest, valid value are "v1" and "v2", default is "v2"'
2016-03-10 11:05:12 +01:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-03-10 11:05:12 +01:00
description : Retrieved manifests from a relevant repository successfully.
2016-08-11 11:39:36 +02:00
schema :
2017-03-09 10:30:00 +01:00
$ref : '#/definitions/Manifest'
2017-07-20 12:47:46 +02:00
'404' :
2016-08-11 11:39:36 +02:00
description : Retrieved manifests from a relevant repository not found.
2017-07-20 12:47:46 +02:00
'500' :
2016-03-10 11:05:12 +01:00
description : Unexpected internal errors.
2017-07-20 12:47:46 +02:00
'/repositories/{repo_name}/tags/{tag}/scan' :
2017-06-20 18:15:01 +02:00
post :
summary : Scan the image.
2018-09-12 13:57:40 +02:00
description : |
Trigger jobservice to call Clair API to scan the image identified by the repo_name and tag. Only project admins have permission to scan images under the project.
2017-06-20 18:15:01 +02:00
parameters :
- name : repo_name
in : path
type : string
required : true
description : Repository name
- name : tag
in : path
type : string
required : true
description : Tag name
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-06-20 18:15:01 +02:00
description : Successfully created the job to scan image.
2017-07-20 12:47:46 +02:00
'401' :
2017-06-20 18:15:01 +02:00
description : User needs to login or call the API with correct credentials.
2017-07-20 12:47:46 +02:00
'403' :
2017-06-20 18:15:01 +02:00
description : User doesn't have permission to perform the action.
2017-07-20 12:47:46 +02:00
'404' :
2017-06-20 18:15:01 +02:00
description : The image does not exist in Harbor.
2018-01-28 18:43:03 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2017-07-20 12:47:46 +02:00
'503' :
2017-06-20 18:15:01 +02:00
description : Harbor is not deployed with Clair.
2017-07-20 12:47:46 +02:00
/repositories/scanAll :
post :
summary : Scan all images of the registry.
2018-09-12 13:57:40 +02:00
description : |
The server will launch different jobs to scan each image on the regsitry, so this is equivalent to calling the API to scan the image one by one in background, so there's no way to track the overall status of the "scan all" action. Only system adim has permission to call this API.
2017-08-30 10:39:54 +02:00
parameters :
- name : project_id
in : query
type : integer
2018-09-12 13:57:40 +02:00
description : When this parm is set only the images under the project identified by the project_id will be scanned.
2018-12-03 10:05:06 +01:00
tags :
- Products
2017-07-20 12:47:46 +02:00
responses :
'202' :
2018-09-12 13:57:40 +02:00
description : The action is successully taken in the background. If some images are failed to scan it will only be reflected in the job status.
2017-07-20 12:47:46 +02:00
'401' :
description : User needs to login or call the API with correct credentials.
'403' :
description : User doesn't have permission to perform the action.
2018-12-06 04:46:38 +01:00
'409' :
description : There is a "scanall" job in progress, so the request cannot be served.
2018-01-28 18:43:03 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2017-07-20 12:47:46 +02:00
'500' :
description : Failed to initiate the action.
'503' :
description : Harbor is not deployed with Clair.
'/repositories/{repo_name}/tags/{tag}/vulnerability/details' :
2017-06-20 18:15:01 +02:00
get :
summary : Get vulnerability details of the image.
2018-09-12 13:57:40 +02:00
description : |
Call Clair API to get the vulnerability based on the previous successful scan.
2017-06-20 18:15:01 +02:00
parameters :
- name : repo_name
in : path
type : string
required : true
description : Repository name
- name : tag
in : path
type : string
required : true
description : Tag name
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-06-20 18:15:01 +02:00
description : Successfully retrieved the vulnerabilities.
schema :
type : array
items :
2017-11-27 07:18:57 +01:00
$ref : '#/definitions/VulnerabilityItem'
2017-07-20 12:47:46 +02:00
'401' :
2017-06-20 18:15:01 +02:00
description : User needs to login or call the API with correct credentials.
2017-07-20 12:47:46 +02:00
'403' :
2017-06-20 18:15:01 +02:00
description : User doesn't have permission to perform the action.
2017-07-20 12:47:46 +02:00
'404' :
2017-06-20 18:15:01 +02:00
description : The image does not exist in Harbor.
2017-07-20 12:47:46 +02:00
'503' :
2017-06-20 18:15:01 +02:00
description : Harbor is not deployed with Clair.
2017-07-20 12:47:46 +02:00
'/repositories/{repo_name}/signatures' :
2017-03-08 06:57:34 +01:00
get :
summary : Get signature information of a repository
2018-09-12 13:57:40 +02:00
description : |
This endpoint aims to retrieve signature information of a repository, the data is
2017-03-08 06:57:34 +01:00
from the nested notary instance of Harbor.
2018-09-12 13:57:40 +02:00
If the repository does not have any signature information in notary, this API will
2017-03-08 06:57:34 +01:00
return an empty list with response code 200, instead of 404
parameters :
- name : repo_name
2017-03-21 10:54:02 +01:00
in : path
2017-03-08 06:57:34 +01:00
type : string
required : true
description : repository name.
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-03-08 06:57:34 +01:00
description : Retrieved signatures.
schema :
type : array
items :
$ref : '#/definitions/RepoSignature'
2017-07-20 12:47:46 +02:00
'500' :
2017-03-08 06:57:34 +01:00
description : Server side error.
2016-06-07 14:38:56 +02:00
/repositories/top :
get :
summary : Get public repositories which are accessed most.
description : |
This endpoint aims to let users see the most popular public repositories
parameters :
- name : count
in : query
type : integer
format : int32
required : false
2018-09-12 13:57:40 +02:00
description : 'The number of the requested public repositories, default is 10 if not provided.'
2016-06-07 14:38:56 +02:00
tags :
2017-07-20 12:47:46 +02:00
- Products
2016-06-07 14:38:56 +02:00
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-05-10 11:09:24 +02:00
description : Get popular repositories successfully.
2016-06-07 14:38:56 +02:00
schema :
type : array
items :
2017-03-10 08:31:05 +01:00
$ref : '#/definitions/Repository'
2017-07-20 12:47:46 +02:00
'400' :
2016-06-08 05:20:41 +02:00
description : Bad request because of invalid count.
2017-07-20 12:47:46 +02:00
'500' :
2016-06-07 14:38:56 +02:00
description : Unexpected internal errors.
2016-05-26 10:48:49 +02:00
/logs :
get :
2016-06-07 14:38:56 +02:00
summary : Get recent logs of the projects which the user is a member of
2018-09-12 13:57:40 +02:00
description : |
This endpoint let user see the recent operation logs of the projects which he is member of
2016-05-26 10:48:49 +02:00
parameters :
2017-06-07 12:26:25 +02:00
- name : username
in : query
type : string
required : false
description : Username of the operator.
- name : repository
in : query
type : string
required : false
description : The name of repository
- name : tag
in : query
type : string
required : false
description : The name of tag
- name : operation
in : query
type : string
required : false
description : The operation
- name : begin_timestamp
in : query
type : string
required : false
description : The begin timestamp
- name : end_timestamp
in : query
type : string
required : false
description : The end timestamp
2017-05-26 08:58:00 +02:00
- name : page
2016-05-26 10:48:49 +02:00
in : query
type : integer
format : int32
required : false
2017-07-20 12:47:46 +02:00
description : 'The page nubmer, default is 1.'
2017-05-26 08:58:00 +02:00
- name : page_size
2016-05-26 10:48:49 +02:00
in : query
2016-06-07 14:38:56 +02:00
type : integer
2017-05-26 08:58:00 +02:00
format : int32
2016-05-30 11:22:38 +02:00
required : false
2017-07-20 12:47:46 +02:00
description : 'The size of per page, default is 10, maximum is 100.'
2016-05-26 10:48:49 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-05-26 10:48:49 +02:00
description : Get the required logs successfully.
schema :
type : array
items :
$ref : '#/definitions/AccessLog'
2017-07-20 12:47:46 +02:00
'400' :
2017-05-26 08:58:00 +02:00
description : Bad request because of invalid parameters.
2017-07-20 12:47:46 +02:00
'401' :
2016-06-08 05:20:41 +02:00
description : User need to login first.
2017-07-20 12:47:46 +02:00
'500' :
2016-05-26 10:48:49 +02:00
description : Unexpected internal errors.
2016-08-11 11:39:36 +02:00
/jobs/replication :
get :
summary : List filters jobs according to the policy and repository
2018-09-12 13:57:40 +02:00
description : |
This endpoint let user list filters jobs according to the policy and repository. (if start_time and end_time are both null, list jobs of last 10 days)
2016-08-11 11:39:36 +02:00
tags :
- Products
parameters :
- name : policy_id
in : query
type : integer
format : int
2017-06-27 12:08:49 +02:00
required : true
2016-08-11 11:39:36 +02:00
description : The ID of the policy that triggered this job.
2018-10-21 15:05:34 +02:00
- name : op_uuid
in : query
type : string
required : false
description : The UUID of one trigger of replication policy.
2016-08-11 11:39:36 +02:00
- name : num
in : query
type : integer
format : int32
required : false
2017-07-20 12:47:46 +02:00
description : The return list length number.
2016-08-11 11:39:36 +02:00
- name : end_time
in : query
type : integer
format : int64
required : false
description : The end time of jobs done. (Timestamp)
- name : start_time
in : query
type : integer
format : int64
required : false
description : The start time of jobs. (Timestamp)
- name : repository
in : query
type : string
required : false
description : The respond jobs list filter by repository name.
- name : status
in : query
type : string
required : false
description : The respond jobs list filter by status.
2016-08-22 07:53:19 +02:00
- name : page
in : query
type : integer
format : int32
required : false
2017-07-20 12:47:46 +02:00
description : 'The page nubmer, default is 1.'
2016-08-22 07:53:19 +02:00
- name : page_size
in : query
type : integer
format : int32
required : false
2017-07-20 12:47:46 +02:00
description : 'The size of per page, default is 10, maximum is 100.'
2016-08-11 11:39:36 +02:00
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Get the required logs successfully.
schema :
type : array
items :
2017-06-27 12:08:49 +02:00
$ref : '#/definitions/JobStatus'
2016-08-22 07:53:19 +02:00
headers :
X-Total-Count :
description : The total count of jobs
type : integer
Link :
description : Link refers to the previous page and next page
type : string
2017-07-20 12:47:46 +02:00
'400' :
2016-08-11 11:39:36 +02:00
description : Bad request because of invalid parameters.
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to login first.
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
2017-12-16 14:52:29 +01:00
put :
summary : Update status of jobs. Only stop is supported for now.
2018-01-28 18:43:03 +01:00
description : |
2017-12-16 14:52:29 +01:00
The endpoint is used to stop the replication jobs of a policy.
tags :
- Products
parameters :
- name : policyinfo
in : body
description : The policy ID and status.
required : true
schema :
$ref : '#/definitions/UpdateJobs'
responses :
'200' :
description : Update the status successfully.
'400' :
description : Bad request because of invalid parameters.
'401' :
description : User need to login first.
'403' :
description : User has no privilege for the operation.
'404' :
description : Resource requested does not exist.
'500' :
description : Unexpected internal errors.
2018-01-28 18:43:03 +01:00
'/jobs/replication/{id}' :
2016-08-11 11:39:36 +02:00
delete :
summary : Delete specific ID job.
description : |
This endpoint is aimed to remove specific ID job from jobservice.
parameters :
- name : id
in : path
type : integer
format : int64
required : true
description : Delete job ID.
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Job deleted successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-08-11 11:39:36 +02:00
description : Job ID is invalid or can't remove this job.
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : Only admin has this authority.
2017-07-20 12:47:46 +02:00
'404' :
2016-08-11 11:39:36 +02:00
description : Project ID does not exist.
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
2018-01-28 18:43:03 +01:00
'/jobs/replication/{id}/log' :
2016-08-11 11:39:36 +02:00
get :
2016-08-12 09:12:35 +02:00
summary : Get job logs.
2016-08-11 11:39:36 +02:00
description : |
2016-08-12 09:12:35 +02:00
This endpoint let user search job logs filtered by specific ID.
2016-08-11 11:39:36 +02:00
parameters :
2016-08-12 09:12:35 +02:00
- name : id
2016-08-11 11:39:36 +02:00
in : path
type : integer
format : int64
required : true
2017-06-01 08:22:19 +02:00
description : Relevant job ID
2016-08-11 11:39:36 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Get job log successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-08-11 11:39:36 +02:00
description : Illegal format of provided ID value.
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'404' :
2016-08-11 11:39:36 +02:00
description : The specific repository ID's log does not exist.
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
2018-01-28 18:43:03 +01:00
'/jobs/scan/{id}/log' :
2017-08-30 10:39:54 +02:00
get :
summary : Get job logs.
description : |
This endpoint let user get scan job logs filtered by specific ID.
parameters :
- name : id
in : path
type : integer
format : int64
required : true
description : Relevant job ID
tags :
- Products
responses :
'200' :
description : Get job log successfully.
'400' :
description : Illegal format of provided ID value.
'401' :
description : User need to log in first.
'404' :
description : The specific repository ID's log does not exist.
'500' :
description : Unexpected internal errors.
2016-08-11 11:39:36 +02:00
/policies/replication :
get :
summary : List filters policies by name and project_id
2018-09-12 13:57:40 +02:00
description : |
This endpoint let user list filters policies by name and project_id, if name and project_id are nil, list returns all policies
2016-08-11 11:39:36 +02:00
parameters :
- name : name
in : query
type : string
required : false
description : The replication's policy name.
- name : project_id
in : query
type : integer
format : int64
required : false
description : Relevant project ID.
2018-01-18 07:47:00 +01:00
- name : page
in : query
type : integer
format : int32
required : false
2018-01-28 18:43:03 +01:00
description : The page nubmer.
2018-01-18 07:47:00 +01:00
- name : page_size
in : query
type : integer
format : int32
required : false
2018-01-28 18:43:03 +01:00
description : The size of per page.
2016-08-11 11:39:36 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Get policy successfully.
schema :
type : array
items :
2017-06-27 12:08:49 +02:00
$ref : '#/definitions/RepPolicy'
2017-07-20 12:47:46 +02:00
'400' :
2016-08-11 11:39:36 +02:00
description : Invalid project ID.
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
post :
summary : Post creates a policy
2018-09-12 13:57:40 +02:00
description : |
This endpoint let user creates a policy, and if it is enabled, the replication will be triggered right now.
2016-08-11 11:39:36 +02:00
parameters :
- name : policyinfo
in : body
description : Create new policy.
required : true
schema :
2017-11-23 06:47:56 +01:00
$ref : '#/definitions/RepPolicy'
2016-08-11 11:39:36 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'201' :
2016-08-11 11:39:36 +02:00
description : Create policy successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-08-11 11:39:36 +02:00
description : Invalid project ID or target ID.
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'409' :
2018-09-12 13:57:40 +02:00
description : Policy name already used or policy already exists with the same project and target.
2018-01-28 18:43:03 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
2018-01-28 18:43:03 +01:00
'/policies/replication/{id}' :
2016-08-11 11:39:36 +02:00
get :
2016-08-12 09:12:35 +02:00
summary : Get replication policy.
2016-08-11 11:39:36 +02:00
description : |
2016-08-12 09:12:35 +02:00
This endpoint let user search replication policy by specific ID.
2016-08-11 11:39:36 +02:00
parameters :
2016-08-12 09:12:35 +02:00
- name : id
2016-08-11 11:39:36 +02:00
in : path
type : integer
format : int64
required : true
2016-08-12 09:12:35 +02:00
description : policy ID
2016-08-11 11:39:36 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Get job policy successfully.
schema :
$ref : '#/definitions/RepPolicy'
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'404' :
2016-08-11 11:39:36 +02:00
description : The specific repository ID's policy does not exist.
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
put :
2017-07-20 12:47:46 +02:00
summary : 'Put modifies name, description, target and enablement of policy.'
2018-09-12 13:57:40 +02:00
description : |
This endpoint let user update policy name, description, target and enablement.
2016-08-11 11:39:36 +02:00
parameters :
2016-08-12 09:12:35 +02:00
- name : id
2016-08-11 11:39:36 +02:00
in : path
type : integer
format : int64
required : true
2016-08-12 09:12:35 +02:00
description : policy ID
2016-08-11 11:39:36 +02:00
- name : policyupdate
in : body
2018-01-28 18:43:03 +01:00
description : Updated properties of the replication policy.
2016-08-11 11:39:36 +02:00
required : true
schema :
2017-11-23 06:47:56 +01:00
$ref : '#/definitions/RepPolicy'
2016-08-11 11:39:36 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Update job policy content successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-08-11 11:39:36 +02:00
description : policy is enabled or target does not exist
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'404' :
2016-08-11 11:39:36 +02:00
description : The specific repository ID's policy does not exist.
2017-07-20 12:47:46 +02:00
'409' :
2018-09-12 13:57:40 +02:00
description : Policy name already used or policy already exists with the same project and target.
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
2018-11-06 06:38:53 +01:00
delete :
summary : Delete the replication policy specified by ID.
description : |
Delete the replication policy specified by ID.
parameters :
- name : id
in : path
type : integer
format : int64
required : true
description : Replication policy ID
tags :
- Products
responses :
'200' :
description : Delete successfully.
'400' :
description : Invalid parameters.
'401' :
description : User need to log in first.
'404' :
description : The resource does not exist.
'500' :
description : Unexpected internal errors.
2018-03-07 06:20:28 +01:00
/labels :
get :
summary : List labels according to the query strings.
2018-08-15 12:53:49 +02:00
description : |
2018-03-07 06:20:28 +01:00
This endpoint let user list labels by name, scope and project_id
parameters :
- name : name
in : query
type : string
required : false
description : The label name.
- name : scope
in : query
type : string
required : true
2018-09-12 13:57:40 +02:00
description : The label scope. Valid values are g and p. g for global labels and p for project labels.
2018-03-07 06:20:28 +01:00
- name : project_id
in : query
type : integer
format : int64
required : false
2018-08-15 12:53:49 +02:00
description : 'Relevant project ID, required when scope is p.'
2018-03-07 06:20:28 +01:00
- name : page
in : query
type : integer
format : int32
required : false
description : The page nubmer.
- name : page_size
in : query
type : integer
format : int32
required : false
description : The size of per page.
tags :
- Products
responses :
'200' :
description : Get successfully.
schema :
type : array
items :
$ref : '#/definitions/Label'
'400' :
description : Invalid parameters.
'401' :
description : User need to log in first.
'500' :
description : Unexpected internal errors.
post :
summary : Post creates a label
2018-08-15 12:53:49 +02:00
description : |
2018-03-07 06:20:28 +01:00
This endpoint let user creates a label.
parameters :
- name : label
in : body
description : The json object of label.
required : true
schema :
$ref : '#/definitions/Label'
tags :
- Products
responses :
'201' :
description : Create successfully.
'400' :
description : Invalid parameters.
'401' :
description : User need to log in first.
'409' :
2018-08-15 12:53:49 +02:00
description : Label with the same name and same scope already exists.
2018-03-07 06:20:28 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
'500' :
description : Unexpected internal errors.
'/labels/{id}' :
get :
summary : Get the label specified by ID.
description : |
This endpoint let user get the label by specific ID.
parameters :
- name : id
in : path
type : integer
format : int64
required : true
description : Label ID
tags :
- Products
responses :
'200' :
description : Get successfully.
schema :
$ref : '#/definitions/Label'
'401' :
description : User need to log in first.
'404' :
description : The resource does not exist.
'500' :
description : Unexpected internal errors.
put :
summary : Update the label properties.
2018-08-15 12:53:49 +02:00
description : |
2018-03-07 06:20:28 +01:00
This endpoint let user update label properties.
parameters :
- name : id
in : path
type : integer
format : int64
required : true
description : Label ID
- name : label
in : body
description : The updated label json object.
required : true
schema :
$ref : '#/definitions/Label'
tags :
- Products
responses :
'200' :
description : Update successfully.
'400' :
description : Invalid parameters.
'401' :
description : User need to log in first.
'404' :
description : The resource does not exist.
'409' :
2018-08-15 12:53:49 +02:00
description : The label with the same name already exists.
2018-03-07 06:20:28 +01:00
'500' :
description : Unexpected internal errors.
delete :
summary : Delete the label specified by ID.
2018-08-15 12:53:49 +02:00
description : |
2018-03-07 06:20:28 +01:00
Delete the label specified by ID.
parameters :
- name : id
in : path
type : integer
format : int64
required : true
description : Label ID
tags :
- Products
responses :
'200' :
description : Delete successfully.
'400' :
description : Invalid parameters.
'401' :
description : User need to log in first.
'404' :
description : The resource does not exist.
'500' :
description : Unexpected internal errors.
2018-06-13 10:49:43 +02:00
'/labels/{id}/resources' :
get :
summary : Get the resources that the label is referenced by.
2018-09-12 13:57:40 +02:00
description : |
This endpoint let user get the resources that the label is referenced by. Only the replication policies are returned for now.
2018-06-13 10:49:43 +02:00
parameters :
- name : id
in : path
type : integer
format : int64
required : true
description : Label ID
tags :
- Products
responses :
'200' :
description : Get successfully.
schema :
$ref : '#/definitions/Resource'
'401' :
description : User need to log in first.
'403' :
description : Forbidden.
'404' :
description : The resource does not exist.
'500' :
description : Unexpected internal errors.
2017-11-23 06:47:56 +01:00
/replications :
post :
summary : Trigger the replication according to the specified policy.
2016-08-11 11:39:36 +02:00
description : |
2017-11-23 06:47:56 +01:00
This endpoint is used to trigger a replication.
2016-08-11 11:39:36 +02:00
parameters :
2017-11-23 06:47:56 +01:00
- name : policy ID
2016-08-11 11:39:36 +02:00
in : body
2017-11-23 06:47:56 +01:00
description : The ID of replication policy.
2016-08-11 11:39:36 +02:00
required : true
schema :
2017-11-23 06:47:56 +01:00
$ref : '#/definitions/Replication'
2016-08-11 11:39:36 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-11-23 06:47:56 +01:00
description : Trigger the replication successfully.
2018-10-21 15:05:34 +02:00
schema :
$ref : '#/definitions/ReplicationResponse'
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'404' :
2017-11-23 06:47:56 +01:00
description : The policy does not exist.
2018-01-28 18:43:03 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
/targets :
get :
summary : List filters targets by name.
2018-09-12 13:57:40 +02:00
description : |
This endpoint let user list filters targets by name, if name is nil, list returns all targets.
2016-08-11 11:39:36 +02:00
parameters :
- name : name
in : query
type : string
required : false
description : The replication's target name.
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Get policy successfully.
schema :
type : array
items :
$ref : '#/definitions/RepTarget'
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
post :
summary : Create a new replication target.
description : |
This endpoint is for user to create a new replication target.
parameters :
- name : reptarget
in : body
description : New created replication target.
required : true
schema :
$ref : '#/definitions/RepTargetPost'
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'201' :
2016-08-11 11:39:36 +02:00
description : Replication target created successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-08-11 11:39:36 +02:00
description : Unsatisfied with constraints of the target creation.
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'409' :
2016-08-11 11:39:36 +02:00
description : Replication target name already exists.
2018-01-28 18:43:03 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
2017-07-20 12:47:46 +02:00
/targets/ping :
2016-08-11 11:39:36 +02:00
post :
summary : Ping validates target.
2018-09-12 13:57:40 +02:00
description : |
This endpoint is for ping validates whether the target is reachable and whether the credential is valid.
2016-08-11 11:39:36 +02:00
parameters :
2017-04-08 10:42:17 +02:00
- name : target
in : body
description : The target object.
required : true
schema :
$ref : '#/definitions/PingTarget'
2016-08-11 11:39:36 +02:00
tags :
2017-07-20 12:47:46 +02:00
- Products
2016-08-11 11:39:36 +02:00
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Ping target successfully.
2017-07-20 12:47:46 +02:00
'400' :
2018-09-12 13:57:40 +02:00
description : Target id is invalid/ endpoint is needed/ invaild URL/ network issue.
2017-07-20 12:47:46 +02:00
'401' :
2018-09-12 13:57:40 +02:00
description : User need to log in first or wrong username/password for remote target.
2017-07-20 12:47:46 +02:00
'404' :
2016-08-11 11:39:36 +02:00
description : Target not found.
2018-01-28 18:43:03 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
2017-07-20 12:47:46 +02:00
'/targets/{id}' :
2016-08-11 11:39:36 +02:00
put :
summary : Update replication's target.
description : |
This endpoint is for update specific replication's target.
parameters :
2016-08-12 09:12:35 +02:00
- name : id
2016-08-11 11:39:36 +02:00
in : path
type : integer
format : int64
required : true
description : The replication's target ID.
- name : repo_target
in : body
2017-07-20 12:47:46 +02:00
required : true
2016-08-11 11:39:36 +02:00
schema :
2017-04-08 10:42:17 +02:00
$ref : '#/definitions/PutTarget'
2016-08-11 11:39:36 +02:00
description : Updates of replication's target.
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Updated replication's target successfully.
2017-07-20 12:47:46 +02:00
'400' :
2016-08-11 11:39:36 +02:00
description : The target is associated with policy which is enabled.
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'404' :
2016-08-11 11:39:36 +02:00
description : Target ID does not exist.
2017-07-20 12:47:46 +02:00
'409' :
2016-08-11 11:39:36 +02:00
description : Target name or endpoint is already used.
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
get :
summary : Get replication's target.
description : This endpoint is for get specific replication's target.
tags :
- Products
parameters :
2016-08-12 09:12:35 +02:00
- name : id
2016-08-11 11:39:36 +02:00
in : path
type : integer
format : int64
required : true
description : The replication's target ID.
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Get replication's target successfully.
schema :
2016-09-21 04:43:04 +02:00
$ref : '#/definitions/RepTarget'
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'404' :
2016-08-11 11:39:36 +02:00
description : Replication's target not found
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
delete :
summary : Delete specific replication's target.
description : |
This endpoint is for to delete specific replication's target.
parameters :
2016-08-12 09:12:35 +02:00
- name : id
2016-08-11 11:39:36 +02:00
in : path
type : integer
format : int64
required : true
2017-07-20 12:47:46 +02:00
description : The replication's target ID.
2016-08-11 11:39:36 +02:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Replication's target deleted successfully.
2017-07-20 12:47:46 +02:00
'400' :
2018-09-12 13:57:40 +02:00
description : Replication's target ID is invalid or the target is used by policies.
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : Only admin has this authority.
2017-07-20 12:47:46 +02:00
'404' :
2016-08-11 11:39:36 +02:00
description : Replication's target does not exist.
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
2017-07-20 12:47:46 +02:00
'/targets/{id}/policies/' :
2016-08-11 11:39:36 +02:00
get :
summary : List the target relevant policies.
2018-09-12 13:57:40 +02:00
description : |
This endpoint list policies filter with specific replication's target ID.
2016-08-11 11:39:36 +02:00
parameters :
2016-08-12 09:12:35 +02:00
- name : id
2016-08-11 11:39:36 +02:00
in : path
type : integer
format : int64
required : true
2017-07-20 12:47:46 +02:00
description : The replication's target ID.
2016-08-11 11:39:36 +02:00
tags :
2017-07-20 12:47:46 +02:00
- Products
2016-08-11 11:39:36 +02:00
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-08-11 11:39:36 +02:00
description : Get relevant policies successfully.
schema :
type : array
items :
$ref : '#/definitions/RepPolicy'
2017-07-20 12:47:46 +02:00
'401' :
2016-08-11 11:39:36 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'404' :
2016-08-11 11:39:36 +02:00
description : Replication's target not found
2017-07-20 12:47:46 +02:00
'500' :
2016-08-11 11:39:36 +02:00
description : Unexpected internal errors.
2017-07-20 12:47:46 +02:00
/internal/syncregistry :
2016-09-05 07:13:54 +02:00
post :
2017-07-20 12:47:46 +02:00
summary : Sync repositories from registry to DB.
2018-09-12 13:57:40 +02:00
description : |
This endpoint is for syncing all repositories of registry with database.
2016-09-05 07:13:54 +02:00
tags :
2017-07-20 12:47:46 +02:00
- Products
2016-09-05 07:13:54 +02:00
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-09-05 07:13:54 +02:00
description : Sync repositories successfully.
2017-07-20 12:47:46 +02:00
'401' :
2016-09-05 07:13:54 +02:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'403' :
2016-09-05 07:13:54 +02:00
description : User does not have permission of admin role.
2018-01-28 18:43:03 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2017-07-20 12:47:46 +02:00
'500' :
description : Unexpected internal errors.
2017-03-09 13:12:33 +01:00
/systeminfo :
get :
summary : Get general system info
2018-09-12 13:57:40 +02:00
description : |
This API is for retrieving general system info, this can be called by anonymous request.
2017-03-09 13:12:33 +01:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-03-09 13:12:33 +01:00
description : Get general info successfully.
schema :
2018-08-01 00:38:23 +02:00
$ref : '#/definitions/GeneralInfo'
2017-07-20 12:47:46 +02:00
'500' :
2017-03-09 13:12:33 +01:00
description : Unexpected internal error.
2016-11-22 12:19:17 +01:00
/systeminfo/volumes :
get :
summary : Get system volume info (total/free size).
2018-09-12 13:57:40 +02:00
description : |
This endpoint is for retrieving system volume info that only provides for admin user.
2016-11-22 12:19:17 +01:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-11-22 12:19:17 +01:00
description : Get system volumes successfully.
schema :
2018-08-01 00:38:23 +02:00
$ref : '#/definitions/SystemInfo'
2017-07-20 12:47:46 +02:00
'401' :
2016-11-22 12:19:17 +01:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'403' :
2016-11-22 12:19:17 +01:00
description : User does not have permission of admin role.
2017-07-20 12:47:46 +02:00
'500' :
2016-11-22 12:19:17 +01:00
description : Unexpected internal errors.
/systeminfo/getcert :
get :
2018-08-16 05:04:39 +02:00
summary : Get default root certificate.
2018-09-12 13:57:40 +02:00
description : |
2018-08-16 05:04:39 +02:00
This endpoint is for downloading a default root certificate.
2016-11-22 12:19:17 +01:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2016-11-22 12:19:17 +01:00
description : Get default root certificate successfully.
2017-07-20 12:47:46 +02:00
'404' :
2016-11-22 12:19:17 +01:00
description : Not found the default root certificate.
2017-07-20 12:47:46 +02:00
'500' :
2017-01-09 11:24:31 +01:00
description : Unexpected internal errors.
/ldap/ping :
post :
summary : Ping available ldap service.
2018-09-12 13:57:40 +02:00
description : |
This endpoint ping the available ldap service for test related configuration parameters.
2017-01-09 11:24:31 +01:00
parameters :
- name : ldapconf
in : body
2018-09-12 13:57:40 +02:00
description : 'ldap configuration. support input ldap service configuration. If it' 's a empty request, will load current configuration from the system.'
2017-02-24 11:30:57 +01:00
required : false
2017-01-09 11:24:31 +01:00
schema :
$ref : '#/definitions/LdapConf'
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-01-09 11:24:31 +01:00
description : Ping ldap service successfully.
2017-07-20 12:47:46 +02:00
'400' :
2017-02-24 11:30:57 +01:00
description : Inviald ldap configuration parameters.
2017-07-20 12:47:46 +02:00
'401' :
2017-02-24 11:30:57 +01:00
description : User need to login first.
2017-07-20 12:47:46 +02:00
'403' :
2017-02-24 11:30:57 +01:00
description : Only admin has this authority.
2018-01-28 18:43:03 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2017-07-20 12:47:46 +02:00
'500' :
description : Unexpected internal errors.
2018-03-26 07:18:52 +02:00
/ldap/groups/search :
get :
summary : Search available ldap groups.
2018-09-12 13:57:40 +02:00
description : |
This endpoint searches the available ldap groups based on related configuration parameters. support to search by groupname or groupdn.
2018-03-26 07:18:52 +02:00
parameters :
- name : groupname
in : query
type : string
required : false
description : Ldap group name
2018-07-05 06:21:00 +02:00
- name : groupdn
in : query
type : string
required : false
description : The LDAP group DN
2018-03-26 07:18:52 +02:00
tags :
- Products
responses :
'200' :
description : Search ldap group successfully.
schema :
type : array
items :
$ref : '#/definitions/UserGroup'
2018-08-15 12:53:49 +02:00
'400' :
2018-07-05 06:21:00 +02:00
description : The Ldap group DN is invalid.
'404' :
description : No ldap group found.
2018-03-26 07:18:52 +02:00
'500' :
description : Unexpected internal errors.
2018-04-11 11:12:33 +02:00
/ldap/users/search :
get :
summary : Search available ldap users.
2018-09-12 13:57:40 +02:00
description : |
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.
2018-04-11 11:12:33 +02:00
parameters :
- name : username
in : query
type : string
required : false
description : Registered user ID
tags :
- Products
responses :
'200' :
description : Search ldap users successfully.
schema :
type : array
items :
$ref : '#/definitions/LdapUsers'
'401' :
description : User need to login first.
'403' :
description : Only admin has this authority.
'500' :
description : Unexpected internal errors.
/ldap/users/import :
post :
summary : Import selected available ldap users.
2018-09-12 13:57:40 +02:00
description : |
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.
2018-04-11 11:12:33 +02:00
parameters :
- name : uid_list
in : body
2018-09-12 13:57:40 +02:00
description : The uid listed for importing. This list will check users validity of ldap service based on configuration from the system.
2018-04-11 11:12:33 +02:00
required : true
schema :
$ref : '#/definitions/LdapImportUsers'
tags :
- Products
responses :
'200' :
description : Add ldap users successfully.
'401' :
description : User need to login first.
'403' :
description : Only admin has this authority.
'404' :
description : Failed import some users.
schema :
type : array
items :
$ref : '#/definitions/LdapFailedImportUsers'
2018-08-15 12:53:49 +02:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2018-03-26 07:18:52 +02:00
/usergroups :
2018-08-15 12:53:49 +02:00
get :
summary : Get all user groups information
description : Get all user groups information
tags :
- Products
responses :
'200' :
description : Get user group successfully.
schema :
type : array
items :
$ref : '#/definitions/UserGroup'
'401' :
description : User need to log in first.
'403' :
description : User in session does not have permission to the user group.
'500' :
description : Unexpected internal errors.
post :
2018-03-26 07:18:52 +02:00
summary : Create user group
description : Create user group information
tags :
2018-08-15 12:53:49 +02:00
- Products
2018-03-26 07:18:52 +02:00
parameters :
- name : usergroup
in : body
schema :
$ref : '#/definitions/UserGroup'
responses :
'201' :
description : User group created successfully.
2018-06-13 12:35:54 +02:00
'400' :
description : Invalid LDAP group DN.
2018-03-26 07:18:52 +02:00
'401' :
description : User need to log in first.
'403' :
description : User in session does not have permission to the user group.
'404' :
2018-08-15 12:53:49 +02:00
description : The LDAP group is not found.
2018-03-26 07:18:52 +02:00
'409' :
2018-08-15 12:53:49 +02:00
description : An LDAP user group with same DN already exist.
'500' :
description : Unexpected internal errors.
'/usergroups/{group_id}' :
get :
summary : Get user group information
description : Get user group information
tags :
- Products
parameters :
- name : group_id
in : path
type : integer
format : int64
required : true
description : Group ID
responses :
'200' :
description : User group get successfully.
schema :
$ref : '#/definitions/UserGroup'
'400' :
description : The user group id is invalid.
'401' :
description : User need to log in first.
'403' :
description : User in session does not have permission to the user group.
'404' :
description : User group does not exist.
'500' :
description : Unexpected internal errors.
put :
summary : Update group information
description : Update user group information
tags :
- Products
parameters :
- name : group_id
in : path
type : integer
format : int64
required : true
description : Group ID
- name : usergroup
in : body
required : false
schema :
$ref : '#/definitions/UserGroup'
responses :
'200' :
description : User group updated successfully.
'400' :
description : The user group id is invalid.
'401' :
description : User need to log in first.
'403' :
description : Only admin has this authority.
'404' :
description : User group does not exist.
'500' :
description : Unexpected internal errors.
delete :
summary : Delete user group
description : Delete user group
tags :
- Products
parameters :
- name : group_id
type : integer
in : path
required : true
responses :
'200' :
description : User group deleted successfully.
'400' :
description : The user group id is invalid.
'401' :
description : User need to log in first.
'403' :
description : Only admin has this authority.
'500' :
description : Unexpected internal errors.
2018-08-17 10:43:51 +02:00
/system/gc :
get :
summary : Get gc results.
description : This endpoint let user get latest ten gc results.
tags :
2018-09-12 13:57:40 +02:00
- Products
2018-08-17 10:43:51 +02:00
responses :
'200' :
description : Get gc results successfully.
schema :
type : array
items :
$ref : '#/definitions/GCResult'
'401' :
description : User need to log in first.
'403' :
description : User does not have permission of admin role.
'500' :
description : Unexpected internal errors.
2018-09-12 13:57:40 +02:00
'/system/gc/{id}' :
2018-08-17 10:43:51 +02:00
get :
summary : Get gc status.
description : This endpoint let user get gc status filtered by specific ID.
parameters :
2018-09-12 13:57:40 +02:00
- name : id
in : path
type : integer
format : int64
required : true
description : Relevant job ID
2018-08-17 10:43:51 +02:00
tags :
2018-09-12 13:57:40 +02:00
- Products
2018-08-17 10:43:51 +02:00
responses :
'200' :
description : Get gc results successfully.
schema :
type : array
items :
$ref : '#/definitions/GCResult'
'401' :
description : User need to log in first.
'403' :
description : User does not have permission of admin role.
'500' :
description : Unexpected internal errors.
2018-09-12 13:57:40 +02:00
'/system/gc/{id}/log' :
2018-08-17 10:43:51 +02:00
get :
summary : Get gc job log.
description : This endpoint let user get gc job logs filtered by specific ID.
parameters :
2018-09-12 13:57:40 +02:00
- name : id
in : path
type : integer
format : int64
required : true
description : Relevant job ID
2018-08-17 10:43:51 +02:00
tags :
2018-09-12 13:57:40 +02:00
- Products
2018-08-17 10:43:51 +02:00
responses :
'200' :
2018-11-27 12:17:41 +01:00
description : Get successfully.
schema :
type : string
2018-08-17 10:43:51 +02:00
'400' :
description : Illegal format of provided ID value.
'401' :
description : User need to log in first.
'403' :
description : User does not have permission of admin role.
'404' :
description : The specific gc ID's log does not exist.
'500' :
description : Unexpected internal errors.
/system/gc/schedule :
get :
summary : Get gc's schedule.
description : This endpoint is for get schedule of gc job.
tags :
2018-09-12 13:57:40 +02:00
- Products
2018-08-17 10:43:51 +02:00
responses :
'200' :
description : Get gc's schedule.
schema :
type : array
items :
$ref : '#/definitions/GCSchedule'
'401' :
description : User need to log in first.
'403' :
description : Only admin has this authority.
'500' :
description : Unexpected internal errors.
put :
summary : Update gc's schedule.
description : |
This endpoint is for update gc schedule.
parameters :
2018-09-12 13:57:40 +02:00
- name : schedule
in : body
required : true
schema :
$ref : '#/definitions/GCSchedule'
description : Updates of gs's schedule.
2018-08-17 10:43:51 +02:00
tags :
2018-09-12 13:57:40 +02:00
- Products
2018-08-17 10:43:51 +02:00
responses :
'200' :
description : Updated replication's target successfully.
'400' :
description : The target is associated with policy which is enabled.
'401' :
description : User need to log in first.
'403' :
description : User does not have permission of admin role.
'404' :
description : Target ID does not exist.
'500' :
description : Unexpected internal errors.
post :
summary : Create a gc schedule.
description : |
This endpoint is for update gc schedule.
parameters :
2018-09-12 13:57:40 +02:00
- name : schedule
in : body
required : true
schema :
$ref : '#/definitions/GCSchedule'
description : Updates of gs's schedule.
2018-08-17 10:43:51 +02:00
tags :
2018-09-12 13:57:40 +02:00
- Products
2018-08-17 10:43:51 +02:00
responses :
'200' :
description : Updated replication's target successfully.
'400' :
description : The target is associated with policy which is enabled.
'401' :
description : User need to log in first.
'403' :
description : User does not have permission of admin role.
'404' :
description : Target ID does not exist.
'500' :
description : Unexpected internal errors.
2017-02-09 06:58:48 +01:00
/configurations :
get :
summary : Get system configurations.
2018-09-12 13:57:40 +02:00
description : |
This endpoint is for retrieving system configurations that only provides for admin user.
2017-02-09 06:58:48 +01:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-02-09 06:58:48 +01:00
description : Get system configurations successfully. The response body is a map.
schema :
2018-08-01 00:38:23 +02:00
$ref : '#/definitions/ConfigurationsResponse'
2017-07-20 12:47:46 +02:00
'401' :
2018-08-01 00:38:23 +02:00
description : User need to log in first.ß
2017-07-20 12:47:46 +02:00
'403' :
2017-02-09 06:58:48 +01:00
description : User does not have permission of admin role.
2017-07-20 12:47:46 +02:00
'500' :
2017-02-09 06:58:48 +01:00
description : Unexpected internal errors.
put :
summary : Modify system configurations.
2018-09-12 13:57:40 +02:00
description : |
This endpoint is for modifying system configurations that only provides for admin user.
2017-02-09 06:58:48 +01:00
tags :
- Products
parameters :
- name : configurations
in : body
2017-07-20 12:47:46 +02:00
required : true
2017-02-09 06:58:48 +01:00
schema :
2017-08-30 10:39:54 +02:00
$ref : '#/definitions/Configurations'
2018-09-12 13:57:40 +02:00
description : 'The configuration map can contain a subset of the attributes of the schema, which are to be updated.'
2017-02-09 06:58:48 +01:00
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-02-09 06:58:48 +01:00
description : Modify system configurations successfully.
2017-07-20 12:47:46 +02:00
'401' :
2017-03-14 05:52:44 +01:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'403' :
2017-03-14 05:52:44 +01:00
description : User does not have permission of admin role.
2017-07-20 12:47:46 +02:00
'500' :
2017-03-14 05:52:44 +01:00
description : Unexpected internal errors.
/configurations/reset :
post :
summary : Reset system configurations.
2018-09-12 13:57:40 +02:00
description : |
Reset system configurations from environment variables. Can only be accessed by admin user.
2017-03-14 05:52:44 +01:00
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-03-14 05:52:44 +01:00
description : Reset system configurations successfully.
2017-07-20 12:47:46 +02:00
'401' :
2017-02-09 06:58:48 +01:00
description : User need to log in first.
2017-07-20 12:47:46 +02:00
'403' :
2017-02-09 06:58:48 +01:00
description : User does not have permission of admin role.
2018-01-28 18:43:03 +01:00
'415' :
$ref : '#/responses/UnsupportedMediaType'
2017-07-20 12:47:46 +02:00
'500' :
2017-02-09 06:58:48 +01:00
description : Unexpected internal errors.
2017-03-03 11:02:08 +01:00
/email/ping :
post :
summary : Test connection and authentication with email server.
description : |
Test connection and authentication with email server.
parameters :
- name : settings
in : body
2018-09-12 13:57:40 +02:00
description : 'Email server settings, if some of the settings are not assigned, they will be read from system configuration.'
2017-03-03 11:02:08 +01:00
required : false
schema :
$ref : '#/definitions/EmailServerSetting'
tags :
- Products
responses :
2017-07-20 12:47:46 +02:00
'200' :
2017-03-03 11:02:08 +01:00
description : Ping email server successfully.
2017-07-20 12:47:46 +02:00
'400' :
2017-03-03 11:02:08 +01:00
description : Inviald email server settings.
2017-07-20 12:47:46 +02:00
'401' :
2017-03-03 11:02:08 +01:00
description : User need to login first.
2017-07-20 12:47:46 +02:00
'403' :
2017-03-03 11:02:08 +01:00
description : Only admin has this authority.
2018-01-28 18:43:03 +01:00
'415' :
2018-03-19 02:22:10 +01:00
$ref : '#/responses/UnsupportedMediaType'
2017-07-20 12:47:46 +02:00
'500' :
description : Unexpected internal errors.
2018-08-15 12:53:49 +02:00
/chartrepo/health :
get :
summary : Check the health of chart repository service.
description : Check the health of chart repository service.
tags :
- Products
- Chart Repository
responses :
'200' :
description : Health status of chart repository service is returned.
schema :
type : object
properties :
healthy :
type : boolean
'401' :
$ref : '#/definitions/UnauthorizedChartAPIError'
'403' :
$ref : '#/definitions/ForbiddenChartAPIError'
2018-10-11 10:08:34 +02:00
/chartrepo/{repo}/charts:
2018-08-15 12:53:49 +02:00
get :
summary : Get all the charts under the specified project
description : Get all the charts under the specified project
tags :
- Products
- Chart Repository
parameters :
- name : repo
in : path
type : string
required : true
description : The project name
responses :
2018-09-12 13:57:40 +02:00
'200' :
2018-11-27 12:17:41 +01:00
description : Searched for charts of project in Harbor successfully.
schema :
type : array
items :
$ref : '#/definitions/ChartInfoEntry'
2018-08-15 12:53:49 +02:00
'401' :
$ref : '#/definitions/UnauthorizedChartAPIError'
'403' :
$ref : '#/definitions/ForbiddenChartAPIError'
'500' :
$ref : '#/definitions/InternalChartAPIError'
2018-08-17 10:43:51 +02:00
post :
summary : Upload a chart file to the specified project.
2018-09-12 13:57:40 +02:00
description : 'Upload a chart file to the specified project. With this API, the corresponding provance file can be uploaded together with chart file at once.'
2018-08-17 10:43:51 +02:00
tags :
2018-09-12 13:57:40 +02:00
- Products
- Chart Repository
2018-08-17 10:43:51 +02:00
consumes :
2018-09-12 13:57:40 +02:00
- multipart/form-data
2018-08-17 10:43:51 +02:00
parameters :
2018-09-12 13:57:40 +02:00
- name : repo
in : path
type : string
required : true
description : The project name
- name : chart
in : formData
type : file
required : true
description : The chart file
- name : prov
in : formData
type : file
required : false
description : The provance file
2018-08-17 10:43:51 +02:00
responses :
2018-09-12 13:57:40 +02:00
'201' :
description : The specified chart is successfully uploaded.
2018-08-17 10:43:51 +02:00
'401' :
$ref : '#/definitions/UnauthorizedChartAPIError'
'403' :
$ref : '#/definitions/ForbiddenChartAPIError'
'500' :
$ref : '#/definitions/InternalChartAPIError'
'507' :
$ref : '#/definitions/InsufficientStorageChartAPIError'
2018-10-11 10:08:34 +02:00
/chartrepo/{repo}/charts/{name}:
2018-08-15 12:53:49 +02:00
get :
summary : Get all the versions of the specified chart
description : Get all the versions of the specified chart
tags :
- Products
- Chart Repository
parameters :
- name : repo
in : path
type : string
required : true
description : The project name
- name : name
in : path
type : string
required : true
description : The chart name
responses :
2018-09-12 13:57:40 +02:00
'200' :
$ref : '#/definitions/ChartVersions'
2018-08-15 12:53:49 +02:00
'401' :
$ref : '#/definitions/UnauthorizedChartAPIError'
'403' :
$ref : '#/definitions/ForbiddenChartAPIError'
'404' :
$ref : '#/definitions/NotFoundChartAPIError'
'500' :
$ref : '#/definitions/InternalChartAPIError'
2018-08-30 05:26:46 +02:00
delete :
summary : Delete all the versions of the specified chart
description : Delete all the versions of the specified chart
tags :
- Products
- Chart Repository
parameters :
- name : repo
in : path
type : string
required : true
description : The project name
- name : name
in : path
type : string
required : true
description : The chart name
responses :
2018-09-12 13:57:40 +02:00
'200' :
description : The specified chart entry is successfully deleted.
2018-08-30 05:26:46 +02:00
'401' :
$ref : '#/definitions/UnauthorizedChartAPIError'
'403' :
$ref : '#/definitions/ForbiddenChartAPIError'
'500' :
$ref : '#/definitions/InternalChartAPIError'
2018-10-11 10:08:34 +02:00
/chartrepo/{repo}/charts/{name}/{version}:
2018-08-15 12:53:49 +02:00
get :
summary : Get the specified chart version
description : Get the specified chart version
tags :
- Products
- Chart Repository
parameters :
- name : repo
in : path
type : string
required : true
description : The project name
- name : name
in : path
type : string
required : true
description : The chart name
- name : version
in : path
type : string
required : true
description : The chart version
responses :
2018-09-12 13:57:40 +02:00
'200' :
$ref : '#/definitions/ChartVersionDetails'
2018-08-15 12:53:49 +02:00
'401' :
$ref : '#/definitions/UnauthorizedChartAPIError'
'403' :
$ref : '#/definitions/ForbiddenChartAPIError'
'404' :
$ref : '#/definitions/NotFoundChartAPIError'
'500' :
$ref : '#/definitions/InternalChartAPIError'
delete :
summary : Delete the specified chart version
description : Delete the specified chart version
tags :
- Products
- Chart Repository
parameters :
- name : repo
in : path
type : string
required : true
description : The project name
- name : name
in : path
type : string
required : true
description : The chart name
- name : version
in : path
type : string
required : true
description : The chart version
responses :
2018-09-12 13:57:40 +02:00
'200' :
description : The specified chart entry is successfully deleted.
2018-08-15 12:53:49 +02:00
'401' :
$ref : '#/definitions/UnauthorizedChartAPIError'
'403' :
$ref : '#/definitions/ForbiddenChartAPIError'
'404' :
$ref : '#/definitions/NotFoundChartAPIError'
'500' :
$ref : '#/definitions/InternalChartAPIError'
2018-10-11 10:08:34 +02:00
/chartrepo/{repo}/prov:
2018-08-15 12:53:49 +02:00
post :
summary : Upload a provance file to the specified project.
description : Upload a provance file to the specified project. The provance file should be targeted for an existing chart file.
tags :
- Products
- Chart Repository
consumes :
- multipart/form-data
parameters :
- name : repo
in : path
type : string
required : true
description : The project name
- name : prov
in : formData
type : file
required : true
description : The provance file
responses :
2018-09-12 13:57:40 +02:00
'201' :
description : The provance file is successfully uploaded.
2018-08-15 12:53:49 +02:00
'401' :
$ref : '#/definitions/UnauthorizedChartAPIError'
'403' :
$ref : '#/definitions/ForbiddenChartAPIError'
'500' :
$ref : '#/definitions/InternalChartAPIError'
'507' :
$ref : '#/definitions/InsufficientStorageChartAPIError'
/chartrepo/charts :
post :
summary : Upload a chart file to the defult 'library' project.
description : Upload a chart file to the default 'library' project. Uploading together with the prov file at the same time is also supported.
tags :
- Products
- Chart Repository
consumes :
- multipart/form-data
parameters :
- name : chart
in : formData
type : file
required : true
description : The chart file
- name : prov
in : formData
type : file
required : false
description : The provance file
responses :
2018-09-12 13:57:40 +02:00
'201' :
description : The specified chart is successfully uploaded.
2018-08-15 12:53:49 +02:00
'401' :
$ref : '#/definitions/UnauthorizedChartAPIError'
'403' :
$ref : '#/definitions/ForbiddenChartAPIError'
'500' :
$ref : '#/definitions/InternalChartAPIError'
'507' :
$ref : '#/definitions/InsufficientStorageChartAPIError'
2018-12-12 04:54:22 +01:00
/chartrepo/{repo}/charts/{name}/{version}/labels:
2018-10-11 10:08:34 +02:00
get :
summary : Return the attahced labels of chart.
description : Return the attahced labels of the specified chart version.
tags :
- Products
- Chart Repository
- Label
parameters :
- name : repo
in : path
type : string
required : true
description : The project name
- name : name
in : path
type : string
required : true
description : The chart name
- name : version
in : path
type : string
required : true
description : The chart version
responses :
'200' :
$ref : '#/definitions/Labels'
'401' :
$ref : '#/definitions/UnauthorizedChartAPIError'
'403' :
$ref : '#/definitions/ForbiddenChartAPIError'
'404' :
$ref : '#/definitions/NotFoundChartAPIError'
'500' :
$ref : '#/definitions/InternalChartAPIError'
post :
summary : Mark label to chart.
description : Mark label to the specified chart version.
tags :
- Products
- Chart Repository
- Label
parameters :
- name : repo
in : path
type : string
required : true
description : The project name
- name : name
in : path
type : string
required : true
description : The chart name
- name : version
in : path
type : string
required : true
description : The chart version
- name : label
in : body
required : true
schema :
$ref : '#/definitions/Label'
description : 'The label being marked to the chart version'
responses :
'200' :
description : The label is successfully marked to the chart version.
'400' :
$ref : '#/definitions/BadRequestFormatedError'
'401' :
$ref : '#/definitions/UnauthorizedChartAPIError'
'403' :
$ref : '#/definitions/ForbiddenChartAPIError'
'404' :
$ref : '#/definitions/NotFoundChartAPIError'
'409' :
$ref : '#/definitions/ConflictFormatedError'
'500' :
$ref : '#/definitions/InternalChartAPIError'
2018-12-12 04:54:22 +01:00
/chartrepo/{repo}/charts/{name}/{version}/labels/{id}:
2018-10-11 10:08:34 +02:00
delete :
summary : Remove label from chart.
description : Remove label from the specified chart version.
tags :
- Products
- Chart Repository
- Label
parameters :
- name : repo
in : path
type : string
required : true
description : The project name
- name : name
in : path
type : string
required : true
description : The chart name
- name : version
in : path
type : string
required : true
description : The chart version
- name : id
in : path
type : integer
required : true
description : The label ID
responses :
'200' :
description : The label is successfully unmarked from the chart version.
'400' :
$ref : '#/definitions/BadRequestFormatedError'
'401' :
$ref : '#/definitions/UnauthorizedChartAPIError'
'403' :
$ref : '#/definitions/ForbiddenChartAPIError'
'404' :
$ref : '#/definitions/NotFoundChartAPIError'
'500' :
$ref : '#/definitions/InternalChartAPIError'
2019-01-30 07:10:26 +01:00
'/projects/{project_id}/robots' :
get :
summary : Get all robot accounts of specified project
description : Get all robot accounts of specified project
parameters :
- name : project_id
in : path
type : integer
format : int64
required : true
description : Relevant project ID.
tags :
- Products
- Robot Account
responses :
'200' :
description : Get project robot accounts successfully.
schema :
type : array
items :
$ref : '#/definitions/RobotAccount'
'400' :
description : The project id is invalid.
'401' :
description : User need to log in first.
'403' :
description : User in session does not have permission to the project.
'404' :
description : Project ID does not exist.
'500' :
description : Unexpected internal errors.
post :
summary : Create a robot account for project
description : Create a robot account for project
tags :
- Products
- Robot Account
parameters :
- name : project_id
in : path
type : integer
format : int64
required : true
description : Relevant project ID.
- name : robot
in : body
description : Request body of creating a robot account.
required : true
schema :
$ref : '#/definitions/RobotAccountCreate'
responses :
'201' :
description : Project member created successfully.
2019-02-13 07:40:04 +01:00
schema :
$ref : '#/definitions/RobotAccountPostRep'
2019-01-30 07:10:26 +01:00
'400' :
description : Project id is not valid.
'401' :
description : User need to log in first.
'403' :
description : User in session does not have permission to the project.
'409' :
description : An robot account with same name already exist in the project.
'500' :
description : Unexpected internal errors.
'/projects/{project_id}/robots/{robot_id}' :
get :
summary : Return the infor of the specified robot account.
description : Return the infor of the specified robot account.
tags :
- Products
- Robot Account
parameters :
- name : project_id
in : path
type : integer
format : int64
required : true
description : Relevant project ID.
- name : robot_id
in : path
type : integer
format : int64
required : true
description : The ID of robot account.
responses :
'200' :
description : '#/definitions/RobotAccount'
'401' :
description : User need to log in first.
'403' :
description : User in session does not have permission to the project.
'404' :
description : The robot account is not found.
'500' :
description : Unexpected internal errors.
put :
summary : Update status of robot account.
description : Used to disable/enable a specified robot account.
tags :
- Products
- Robot Account
parameters :
- name : project_id
in : path
type : integer
format : int64
required : true
description : Relevant project ID.
- name : robot_id
in : path
type : integer
format : int64
required : true
description : The ID of robot account.
- name : robot
in : body
description : Request body of enable/disable a robot account.
required : true
schema :
$ref : '#/definitions/RobotAccountUpdate'
responses :
'200' :
description : Robot account has been modified success.
'500' :
description : Unexpected internal errors.
delete :
summary : Delete the specified robot account
description : Delete the specified robot account
tags :
- Products
- Robot Account
parameters :
- name : project_id
in : path
type : integer
format : int64
required : true
description : Relevant project ID.
- name : robot_id
in : path
type : integer
format : int64
required : true
description : The ID of robot account.
responses :
'200' :
description : The specified robot account is successfully deleted.
'401' :
description : User need to log in first.
'403' :
description : User in session does not have permission to the project.
'404' :
description : The robot account is not found.
'500' :
description : Unexpected internal errors.
2018-01-28 18:43:03 +01:00
responses :
2018-08-15 12:53:49 +02:00
UnsupportedMediaType :
2018-09-12 13:57:40 +02:00
description : 'The Media Type of the request is not supported, it has to be "application/json"'
2016-03-10 11:05:12 +01:00
definitions :
Search :
type : object
properties :
2018-09-05 14:13:27 +02:00
project :
2016-03-10 11:05:12 +01:00
description : Search results of the projects that matched the filter keywords.
type : array
items :
2017-03-06 10:12:09 +01:00
$ref : '#/definitions/Project'
2018-09-05 14:13:27 +02:00
repository :
2016-03-10 11:05:12 +01:00
description : Search results of the repositories that matched the filter keywords.
type : array
items :
2016-06-03 12:50:42 +02:00
$ref : '#/definitions/SearchRepository'
2018-09-05 14:13:27 +02:00
chart :
description : Search results of the charts that macthed the filter keywords.
type : array
items :
$ref : '#/definitions/SearchResult'
2018-09-01 09:10:28 +02:00
RetagReq :
type : object
properties :
2018-09-18 08:05:35 +02:00
tag :
description : new tag to be created
type : string
2018-09-01 09:10:28 +02:00
src_image :
description : Source image to be retagged, e.g. 'stage/app:v1.0'
type : string
2018-09-18 08:05:35 +02:00
override :
description : If target tag already exists, whether to override it
type : boolean
2016-06-03 12:50:42 +02:00
SearchRepository :
type : object
properties :
project_id :
type : integer
description : The ID of the project that the repository belongs to
2016-09-21 04:43:04 +02:00
project_name :
type : string
description : The name of the project that the repository belongs to
2016-06-03 12:50:42 +02:00
project_public :
2018-08-01 00:38:23 +02:00
type : boolean
2018-09-12 13:57:40 +02:00
description : 'The flag to indicate the publicity of the project that the repository belongs to (1 is public, 0 is not)'
2016-09-21 04:43:04 +02:00
repository_name :
type : string
description : The name of the repository
2017-03-06 10:12:09 +01:00
pull_count :
type : integer
description : The count how many times the repository is pulled
tags_count :
type : integer
2017-07-20 12:47:46 +02:00
description : The count of tags in the repository
2016-09-02 10:05:55 +02:00
ProjectReq :
type : object
properties :
project_name :
type : string
description : The name of the project.
2018-05-03 08:37:00 +02:00
metadata :
description : The metadata of the project.
$ref : '#/definitions/ProjectMetadata'
2016-03-10 11:05:12 +01:00
Project :
type : object
properties :
project_id :
type : integer
format : int32
description : Project ID
owner_id :
type : integer
format : int32
description : The owner ID of the project always means the creator of the project.
2016-09-02 10:05:55 +02:00
name :
2016-03-10 11:05:12 +01:00
type : string
description : The name of the project.
creation_time :
type : string
description : The creation time of the project.
2016-06-03 12:50:42 +02:00
update_time :
type : string
description : The update time of the project.
2016-03-10 11:05:12 +01:00
deleted :
2018-08-01 00:38:23 +02:00
type : boolean
description : A deletion mark of the project.
2016-03-10 11:05:12 +01:00
owner_name :
type : string
2016-09-02 10:05:55 +02:00
description : The owner name of the project.
2018-05-03 08:37:00 +02:00
togglable :
2016-03-10 11:05:12 +01:00
type : boolean
2018-09-12 13:57:40 +02:00
description : Correspond to the UI about whether the project's publicity is updatable (for UI)
2016-06-03 12:50:42 +02:00
current_user_role_id :
type : integer
description : The role ID of the current user who triggered the API (for UI)
repo_count :
type : integer
description : The number of the repositories under this project.
2018-09-25 08:30:29 +02:00
chart_count :
type : integer
description : The total number of charts under this project.
2017-09-29 10:37:43 +02:00
metadata :
description : The metadata of the project.
2018-05-03 08:37:00 +02:00
$ref : '#/definitions/ProjectMetadata'
2017-09-29 10:37:43 +02:00
ProjectMetadata :
type : object
properties :
public :
2018-06-29 11:32:08 +02:00
type : string
2018-09-12 13:57:40 +02:00
description : 'The public status of the project. The valid values are "true", "false".'
2017-06-22 08:01:17 +02:00
enable_content_trust :
2018-06-29 11:32:08 +02:00
type : string
2018-09-12 13:57:40 +02:00
description : 'Whether content trust is enabled or not. If it is enabled, user cann' 't pull unsigned images from this project. The valid values are "true", "false".'
2018-10-24 07:23:09 +02:00
prevent_vul :
2018-06-29 11:32:08 +02:00
type : string
2018-09-12 13:57:40 +02:00
description : 'Whether prevent the vulnerable images from running. The valid values are "true", "false".'
2018-10-24 07:23:09 +02:00
severity :
2017-06-22 08:01:17 +02:00
type : string
2018-09-12 13:57:40 +02:00
description : 'If the vulnerability is high than severity defined here, the images cann' 't be pulled. The valid values are "negligible", "low", "medium", "high", "critical".'
2018-10-24 07:23:09 +02:00
auto_scan :
2018-06-29 11:32:08 +02:00
type : string
2018-09-12 13:57:40 +02:00
description : 'Whether scan images automatically when pushing. The valid values are "true", "false".'
2017-03-09 10:30:00 +01:00
Manifest :
2016-08-11 11:39:36 +02:00
type : object
properties :
2016-08-22 07:53:19 +02:00
manifest :
type : object
description : The detail of manifest.
config :
2016-08-11 11:39:36 +02:00
type : string
2016-08-22 07:53:19 +02:00
description : The config of the repository.
2016-03-10 11:05:12 +01:00
User :
type : object
properties :
user_id :
type : integer
2016-09-02 10:05:55 +02:00
format : int
2016-06-03 12:50:42 +02:00
description : The ID of the user.
2016-03-10 11:05:12 +01:00
username :
type : string
email :
type : string
2016-09-02 10:05:55 +02:00
password :
2016-03-10 11:05:12 +01:00
type : string
2016-09-02 10:05:55 +02:00
realname :
2016-03-10 11:05:12 +01:00
type : string
comment :
type : string
deleted :
2018-08-01 00:38:23 +02:00
type : boolean
2016-09-02 10:05:55 +02:00
role_name :
type : string
role_id :
type : integer
format : int
has_admin_role :
2018-10-24 07:23:09 +02:00
type : boolean
2016-09-02 10:05:55 +02:00
reset_uuid :
type : string
Salt :
type : string
creation_time :
type : string
update_time :
type : string
2016-05-04 03:27:07 +02:00
Password :
type : object
properties :
old_password :
type : string
description : The user's existing password.
new_password :
type : string
2016-09-02 10:05:55 +02:00
description : New password for marking as to be updated.
2016-06-03 12:50:42 +02:00
AccessLog :
type : object
properties :
log_id :
type : integer
description : The ID of the log entry.
2017-05-04 06:01:46 +02:00
username :
type : string
description : Username of the user in this log entry.
2016-06-03 12:50:42 +02:00
repo_name :
type : string
description : Name of the repository in this log entry.
repo_tag :
type : string
description : Tag of the repository in this log entry.
operation :
type : string
description : The operation against the repository in this log entry.
op_time :
2016-07-19 09:40:35 +02:00
type : string
2016-06-03 12:50:42 +02:00
description : The time when this operation is triggered.
2016-03-10 11:05:12 +01:00
Role :
type : object
properties :
2017-07-20 12:47:46 +02:00
role_id :
2016-03-10 11:05:12 +01:00
type : integer
format : int32
description : ID in table.
2017-07-20 12:47:46 +02:00
role_code :
2016-03-10 11:05:12 +01:00
type : string
description : Description of permissions for the role.
role_name :
type : string
description : Name the the role.
2016-09-21 04:43:04 +02:00
role_mask :
type : string
2016-03-10 11:05:12 +01:00
RoleParam :
type : object
properties :
roles :
type : array
items :
2017-07-20 12:47:46 +02:00
type : integer
2016-03-10 11:05:12 +01:00
format : int32
description : Role ID for updating project role member.
2016-06-03 12:50:42 +02:00
username :
2016-03-10 11:05:12 +01:00
type : string
description : Username relevant to a project role member.
2016-06-08 09:14:41 +02:00
StatisticMap :
type : object
properties :
2017-07-20 12:47:46 +02:00
private_project_count :
2016-06-08 09:14:41 +02:00
type : integer
format : int32
2017-06-26 08:15:01 +02:00
description : The count of the private projects which the user is a member of.
2017-07-20 12:47:46 +02:00
private_repo_count :
2016-06-08 09:14:41 +02:00
type : integer
format : int32
2018-09-12 13:57:40 +02:00
description : The count of the private repositories belonging to the projects which the user is a member of.
2017-07-20 12:47:46 +02:00
public_project_count :
2016-06-08 09:14:41 +02:00
type : integer
format : int32
description : The count of the public projects.
2017-07-20 12:47:46 +02:00
public_repo_count :
2016-06-08 09:14:41 +02:00
type : integer
format : int32
2018-09-12 13:57:40 +02:00
description : The count of the public repositories belonging to the public projects which the user is a member of.
2017-07-20 12:47:46 +02:00
total_project_count :
2016-06-08 09:14:41 +02:00
type : integer
format : int32
2017-07-20 12:47:46 +02:00
description : 'The count of the total projects, only be seen when the is admin.'
total_repo_count :
2016-06-08 09:14:41 +02:00
type : integer
format : int32
2018-09-12 13:57:40 +02:00
description : 'The count of the total repositories, only be seen when the user is admin.'
2016-08-11 11:39:36 +02:00
JobStatus :
type : object
properties :
id :
type : integer
format : int64
description : The job ID.
2017-07-20 12:47:46 +02:00
status :
2016-08-11 11:39:36 +02:00
type : string
description : The status of the job.
2017-07-20 12:47:46 +02:00
repository :
2016-08-11 11:39:36 +02:00
type : string
description : The repository handled by the job.
policy_id :
type : integer
format : int64
description : The ID of the policy that triggered this job.
2017-07-20 12:47:46 +02:00
operation :
2016-08-11 11:39:36 +02:00
type : string
description : The operation of the job.
tags :
type : array
description : The repository's used tag list.
items :
$ref : '#/definitions/Tags'
creation_time :
type : string
description : The creation time of the job.
update_time :
type : string
2017-07-20 12:47:46 +02:00
description : The update time of the job.
2016-08-11 11:39:36 +02:00
Tags :
type : object
properties :
tag :
type : string
description : The repository's used tag.
RepPolicy :
type : object
properties :
id :
type : integer
format : int64
description : The policy ID.
2017-07-20 12:47:46 +02:00
name :
2016-08-11 11:39:36 +02:00
type : string
description : The policy name.
2017-07-20 12:47:46 +02:00
description :
2016-08-11 11:39:36 +02:00
type : string
description : The description of the policy.
2017-11-23 06:47:56 +01:00
projects :
2017-12-04 08:39:40 +01:00
type : array
2017-11-23 06:47:56 +01:00
description : The project list that the policy applys to.
items :
$ref : '#/definitions/Project'
targets :
2017-12-04 08:39:40 +01:00
type : array
2017-11-23 06:47:56 +01:00
description : The target list.
items :
$ref : '#/definitions/RepTarget'
2017-11-02 05:53:01 +01:00
trigger :
2017-12-04 08:39:40 +01:00
$ref : '#/definitions/RepTrigger'
2017-11-02 05:53:01 +01:00
filters :
type : array
2017-11-08 10:53:06 +01:00
description : The replication policy filter array.
2017-11-02 05:53:01 +01:00
items :
$ref : '#/definitions/RepFilter'
2017-11-08 10:53:06 +01:00
replicate_existing_image_now :
2017-11-23 06:47:56 +01:00
type : boolean
2017-11-08 10:53:06 +01:00
description : Whether to replicate the existing images now.
2017-11-02 05:53:01 +01:00
replicate_deletion :
2017-11-23 06:47:56 +01:00
type : boolean
2017-11-08 10:53:06 +01:00
description : Whether to replicate the deletion operation.
2016-08-11 11:39:36 +02:00
creation_time :
type : string
description : The create time of the policy.
update_time :
type : string
description : The update time of the policy.
error_job_count :
2017-12-04 08:39:40 +01:00
type : integer
2016-08-11 11:39:36 +02:00
description : The error job count number for the policy.
2017-11-08 10:53:06 +01:00
RepTrigger :
type : object
properties :
2017-11-23 06:47:56 +01:00
kind :
2017-11-08 10:53:06 +01:00
type : string
2018-09-12 13:57:40 +02:00
description : 'The replication policy trigger kind. The valid values are manual, immediate and schedule.'
2017-12-16 14:52:29 +01:00
schedule_param :
$ref : '#/definitions/ScheduleParam'
ScheduleParam :
type : object
properties :
type :
2017-11-23 06:47:56 +01:00
type : string
2018-01-28 18:43:03 +01:00
description : The schedule type. The valid values are daily and weekly.
2017-12-16 14:52:29 +01:00
weekday :
type : integer
format : int8
2018-01-28 18:43:03 +01:00
description : 'Optional, only used when the type is weedly. The valid values are 1-7.'
2017-12-16 14:52:29 +01:00
offtime :
type : integer
format : int64
2018-01-28 18:43:03 +01:00
description : 'The time offset with the UTC 00:00 in seconds.'
2017-11-02 05:53:01 +01:00
RepFilter :
type : object
properties :
2017-11-23 06:47:56 +01:00
kind :
2017-11-02 05:53:01 +01:00
type : string
2018-09-12 13:57:40 +02:00
description : 'The replication policy filter kind. The valid values are project, repository and tag.'
2018-05-17 09:45:41 +02:00
value :
2018-06-29 11:32:08 +02:00
type : string
2018-09-12 13:57:40 +02:00
description : 'The value of replication policy filter. When creating repository and tag filter, filling it with the pattern as string. When creating label filter, filling it with label ID as integer.'
2017-12-04 08:39:40 +01:00
pattern :
2017-11-02 05:53:01 +01:00
type : string
2018-08-15 12:53:49 +02:00
description : 'Depraceted, use value instead. The replication policy filter pattern.'
2017-11-23 06:47:56 +01:00
metadata :
type : object
description : This map object is the replication policy filter metadata.
2016-08-11 11:39:36 +02:00
RepTarget :
type : object
properties :
2017-07-20 12:47:46 +02:00
id :
2016-08-11 11:39:36 +02:00
type : integer
format : int64
description : The target ID.
endpoint :
type : string
description : The target address URL string.
2017-07-20 12:47:46 +02:00
name :
2016-08-11 11:39:36 +02:00
type : string
description : The target name.
2017-07-20 12:47:46 +02:00
username :
2016-08-11 11:39:36 +02:00
type : string
description : The target server username.
2017-07-20 12:47:46 +02:00
password :
2016-08-11 11:39:36 +02:00
type : string
description : The target server password.
type :
type : integer
format : int
description : Reserved field.
2017-09-22 09:08:10 +02:00
insecure :
type : boolean
2018-09-12 13:57:40 +02:00
description : Whether or not the certificate will be verified when Harbor tries to access the server.
2016-08-11 11:39:36 +02:00
creation_time :
type : string
description : The create time of the policy.
update_time :
type : string
description : The update time of the policy.
RepTargetPost :
type : object
properties :
endpoint :
type : string
description : The target address URL string.
2017-07-20 12:47:46 +02:00
name :
2016-08-11 11:39:36 +02:00
type : string
description : The target name.
2017-07-20 12:47:46 +02:00
username :
2016-08-11 11:39:36 +02:00
type : string
description : The target server username.
2017-07-20 12:47:46 +02:00
password :
2016-08-11 11:39:36 +02:00
type : string
description : The target server password.
2017-09-22 09:08:10 +02:00
insecure :
type : boolean
2018-09-12 13:57:40 +02:00
description : Whether or not the certificate will be verified when Harbor tries to access the server.
2017-04-08 10:42:17 +02:00
PingTarget :
type : object
properties :
2017-11-22 09:24:59 +01:00
id :
type : integer
format : int
description : Target ID.
2017-04-08 10:42:17 +02:00
endpoint :
type : string
description : The target address URL string.
2017-07-20 12:47:46 +02:00
username :
2017-04-08 10:42:17 +02:00
type : string
description : The target server username.
2017-07-20 12:47:46 +02:00
password :
2017-04-08 10:42:17 +02:00
type : string
description : The target server password.
2017-09-22 09:08:10 +02:00
insecure :
type : boolean
2018-09-12 13:57:40 +02:00
description : Whether or not the certificate will be verified when Harbor tries to access the server.
2017-04-08 10:42:17 +02:00
PutTarget :
type : object
properties :
2017-07-20 12:47:46 +02:00
name :
2017-04-08 10:42:17 +02:00
type : string
description : The target name.
endpoint :
type : string
description : The target address URL string.
2017-07-20 12:47:46 +02:00
username :
2017-04-08 10:42:17 +02:00
type : string
description : The target server username.
2017-07-20 12:47:46 +02:00
password :
2017-04-08 10:42:17 +02:00
type : string
description : The target server password.
2017-09-22 09:08:10 +02:00
insecure :
type : boolean
2018-09-12 13:57:40 +02:00
description : Whether or not the certificate will be verified when Harbor tries to access the server.
2016-09-22 07:20:10 +02:00
HasAdminRole :
type : object
properties :
2017-07-20 12:47:46 +02:00
has_admin_role :
2018-10-24 07:23:09 +02:00
type : boolean
2017-07-20 12:47:46 +02:00
description : '1-has admin, 0-not.'
2016-09-22 07:20:10 +02:00
UserProfile :
type : object
properties :
email :
type : string
description : The new email.
realname :
type : string
description : The new realname.
comment :
type : string
description : The new comment.
2016-11-22 12:19:17 +01:00
Storage :
type : object
properties :
2017-07-20 12:47:46 +02:00
total :
2016-11-22 12:19:17 +01:00
type : integer
format : int64
description : Total volume size.
free :
type : integer
format : int64
description : Free volume size.
2017-03-09 13:12:33 +01:00
GeneralInfo :
type : object
properties :
with_notary :
type : boolean
description : If the Harbor instance is deployed with nested notary.
2017-06-15 09:44:04 +02:00
with_clair :
type : boolean
description : If the Harbor instance is deployed with nested clair.
2017-03-09 13:12:33 +01:00
with_admiral :
type : boolean
description : If the Harbor instance is deployed with Admiral.
admiral_endpoint :
type : string
description : The url of the endpoint of admiral instance.
auth_mode :
type : string
description : The auth mode of current Harbor instance.
project_creation_restriction :
type : string
2018-09-12 13:57:40 +02:00
description : 'Indicate who can create projects, it could be ' 'adminonly' ' or ' 'everyone' '.'
2017-03-09 13:12:33 +01:00
self_registration :
type : boolean
description : Indicate whether the Harbor instance enable user to register himself.
2017-03-16 09:53:40 +01:00
has_ca_root :
type : boolean
2018-09-12 13:57:40 +02:00
description : Indicate whether there is a ca root cert file ready for download in the file system.
2017-03-22 02:56:42 +01:00
harbor_version :
type : string
2017-07-20 12:47:46 +02:00
description : The build version of Harbor.
next_scan_all :
type : integer
2018-09-12 13:57:40 +02:00
description : 'The UTC time in milliseconds, after which user can call scanAll API to scan all images.'
2017-07-20 12:47:46 +02:00
clair_vulnerability_status :
type : object
description : The status of vulnerability data of Clair.
properties :
overall_last_update :
type : integer
2018-09-12 13:57:40 +02:00
description : 'The UTC timestamp in milliseconds of last successful update for Clair vulnerability data, when all the updaters are successfully executed.'
2017-07-20 12:47:46 +02:00
details :
type : array
2018-09-12 13:57:40 +02:00
description : Detail timestamp of different namespace. This is introduced to handle the case when some updaters are executed successfully and some not.
2017-07-20 12:47:46 +02:00
items :
$ref : '#/definitions/VulnNamespaceTimestamp'
VulnNamespaceTimestamp :
type : object
properties :
namespace :
type : string
description : The namespace of the Vulnerability
last_update :
type : integer
2018-09-12 13:57:40 +02:00
description : The UTC timestamp in miliseconds of last successful update for vulnerability data.
2016-11-22 12:19:17 +01:00
SystemInfo :
type : object
properties :
2017-07-20 12:47:46 +02:00
storage :
2016-11-22 12:19:17 +01:00
type : array
description : The storage of system.
items :
$ref : '#/definitions/Storage'
2017-01-09 11:24:31 +01:00
LdapConf :
type : object
properties :
2017-07-20 12:47:46 +02:00
ldap_url :
2017-01-09 11:24:31 +01:00
type : string
description : The url of ldap service.
2017-01-20 09:15:56 +01:00
ldap_search_dn :
2017-01-09 11:24:31 +01:00
type : string
description : The search dn of ldap service.
2017-01-20 09:15:56 +01:00
ldap_search_password :
2017-01-09 11:24:31 +01:00
type : string
description : The search password of ldap service.
2017-01-20 09:15:56 +01:00
ldap_base_dn :
2017-01-09 11:24:31 +01:00
type : string
description : The base dn of ldap service.
ldap_filter :
type : string
description : The serach filter of ldap service.
ldap_uid :
type : string
2017-02-24 11:30:57 +01:00
description : The serach uid from ldap service attributes.
2017-01-09 11:24:31 +01:00
ldap_scope :
type : integer
format : int64
description : The serach scope of ldap service.
2017-01-20 09:15:56 +01:00
ldap_connection_timeout :
2017-01-09 11:24:31 +01:00
type : integer
format : int64
description : The connect timeout of ldap service(second).
2017-02-24 11:30:57 +01:00
LdapUsers :
type : object
properties :
2017-07-20 12:47:46 +02:00
ldap_username :
2017-02-24 11:30:57 +01:00
type : string
description : search ldap user name based on ldapconf.
ldap_realname :
type : string
2018-09-12 13:57:40 +02:00
description : system will try to guess the user realname form "uid" or "cn" attribute.
2017-02-24 11:30:57 +01:00
ldap_email :
type : string
2018-09-12 13:57:40 +02:00
description : system will try to guess the user email address form "mail" or "email" attribute.
2017-02-24 11:30:57 +01:00
LdapImportUsers :
type : object
properties :
ldap_uid_list :
type : array
description : selected uid list
items :
type : string
LdapFailedImportUsers :
type : object
properties :
ldap_uid :
type : string
description : the uid can't add to system.
error :
type : string
description : fail reason.
2017-03-03 11:02:08 +01:00
EmailServerSetting :
type : object
properties :
2017-07-20 12:47:46 +02:00
email_host :
2017-03-03 11:02:08 +01:00
type : string
description : The host of email server.
email_port :
2017-03-16 09:53:40 +01:00
type : integer
2017-03-03 11:02:08 +01:00
description : The port of email server.
email_username :
type : string
description : The username of email server.
email_password :
type : string
description : The password of email server.
email_ssl :
2017-03-16 09:53:40 +01:00
type : boolean
2017-03-03 11:02:08 +01:00
description : Use ssl/tls or not.
email_identity :
type : string
description : The dentity of email server.
2017-03-08 06:57:34 +01:00
RepoSignature :
type : object
properties :
tag :
type : string
description : The tag of image.
hashes :
type : object
description : The JSON object of the hash of the image.
2017-03-09 10:30:00 +01:00
DetailedTag :
type : object
properties :
2017-05-22 09:29:33 +02:00
digest :
2017-03-09 10:30:00 +01:00
type : string
2017-05-22 09:29:33 +02:00
description : The digest of the tag.
name :
type : string
description : The name of the tag.
2017-09-15 07:29:27 +02:00
size :
type : integer
description : The size of the image.
2017-05-22 09:29:33 +02:00
architecture :
type : string
description : The architecture of the image.
os :
type : string
description : The os of the image.
docker_version :
type : string
description : The version of docker which builds the image.
author :
type : string
description : The author of the image.
created :
type : string
description : The build time of the image.
signature :
2017-03-09 10:30:00 +01:00
type : object
2018-09-12 13:57:40 +02:00
description : 'The signature of image, defined by RepoSignature. If it is null, the image is unsigned.'
2017-06-20 18:15:01 +02:00
scan_overview :
type : object
description : The overview of the scan result. This is an optional property.
properties :
digest :
type : string
description : The digest of the image.
scan_status :
type : string
2018-09-12 13:57:40 +02:00
description : 'The status of the scan job, it can be "pendnig", "running", "finished", "error".'
2017-06-20 18:15:01 +02:00
job_id :
type : integer
description : The ID of the job on jobservice to scan the image.
severity :
type : integer
2017-07-20 12:47:46 +02:00
description : '0-Not scanned, 1-Negligible, 2-Unknown, 3-Low, 4-Medium, 5-High'
2017-06-20 18:15:01 +02:00
details_key :
type : string
2018-09-12 13:57:40 +02:00
description : 'The top layer name of this image in Clair, this is for calling Clair API to get the vulnerability list of this image.'
2017-06-20 18:15:01 +02:00
components :
type : object
description : The components overview of the image.
properties :
total :
type : integer
description : Total number of the components in this image.
summary :
description : List of number of components of different severities.
type : array
items :
$ref : '#/definitions/ComponentOverviewEntry'
2018-03-12 10:13:01 +01:00
labels :
type : array
description : The label list.
items :
$ref : '#/definitions/Label'
2017-06-20 18:15:01 +02:00
ComponentOverviewEntry :
type : object
properties :
severity :
type : integer
2017-07-20 12:47:46 +02:00
description : '1-None/Negligible, 2-Unknown, 3-Low, 4-Medium, 5-High'
2017-06-20 18:15:01 +02:00
count :
type : integer
description : number of the components with certain severity.
2017-03-09 10:30:00 +01:00
Repository :
type : object
properties :
id :
2017-09-27 05:18:16 +02:00
type : integer
2017-03-09 10:30:00 +01:00
description : The ID of repository.
name :
type : string
description : The name of repository.
project_id :
type : integer
description : The project ID of repository.
description :
type : string
description : The description of repository.
pull_count :
type : integer
description : The pull count of repository.
star_count :
type : integer
description : The star count of repository.
tags_count :
type : integer
description : The tags count of repository.
2018-03-12 10:13:01 +01:00
labels :
type : array
description : The label list.
items :
$ref : '#/definitions/Label'
2017-03-09 10:30:00 +01:00
creation_time :
type : string
description : The creation time of repository.
update_time :
type : string
2017-03-16 09:53:40 +01:00
description : The update time of repository.
2017-06-20 18:15:01 +02:00
VulnerabilityItem :
type : object
properties :
id :
type : string
2017-07-20 12:47:46 +02:00
description : 'ID of the vulnerability, normally it is the CVE ID'
severity :
2017-06-20 18:15:01 +02:00
type : integer
2017-07-20 12:47:46 +02:00
description : '1-Negligible, 2-Unknown, 3-Low, 4-Medium, 5-High'
2017-06-20 18:15:01 +02:00
package :
type : string
description : The packge that introduces the vulnerability.
version :
type : string
description : The version of the package.
description :
type : string
description : The description of the vulnerability.
fixedVersion :
type : string
2018-09-12 13:57:40 +02:00
description : 'The version which the vulnerability is fixed, this is an optional property.'
2017-08-30 10:39:54 +02:00
Configurations :
type : object
properties :
auth_mode :
type : string
2018-01-28 18:43:03 +01:00
description : 'The auth mode of current system, such as "db_auth", "ldap_auth"'
2017-08-30 10:39:54 +02:00
email_from :
type : string
description : The sender name for Email notification.
email_host :
type : string
description : The hostname of SMTP server that sends Email notification.
email_port :
type : integer
description : The port of SMTP server.
email_identity :
type : string
description : By default it's empty so the email_username is picked.
email_username :
type : string
description : The username for authenticate against SMTP server.
email_ssl :
type : boolean
2018-09-12 13:57:40 +02:00
description : 'When it' 's set to true the system will access Email server via TLS by default. If it' 's set to false, it still will handle "STARTTLS" from server side.'
2017-09-04 09:12:54 +02:00
email_insecure :
type : boolean
2018-09-12 13:57:40 +02:00
description : Whether or not the certificate will be verified when Harbor tries to access the email server.
2017-08-30 10:39:54 +02:00
ldap_url :
type : string
description : The URL of LDAP server.
ldap_base_dn :
type : string
description : The Base DN for LDAP binding.
ldap_filter :
type : string
description : The filter for LDAP binding.
ldap_scope :
type : integer
2018-01-28 18:43:03 +01:00
description : '0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'
2017-08-30 10:39:54 +02:00
ldap_uid :
type : string
2018-09-12 13:57:40 +02:00
description : 'The attribute which is used as identity for the LDAP binding, such as "CN" or "SAMAccountname"'
2017-08-30 10:39:54 +02:00
ldap_search_dn :
type : string
description : The DN of the user to do the search.
ldap_timeout :
type : integer
description : timeout in seconds for connection to LDAP server.
2018-05-03 06:36:16 +02:00
ldap_group_attribute_name :
type : string
2018-09-12 13:57:40 +02:00
description : 'The attribute which is used as identity of the LDAP group, default is cn.'
2018-05-03 06:36:16 +02:00
ldap_group_base_dn :
type : string
description : The base DN to search LDAP group.
ldap_group_search_filter :
type : string
description : The filter to search the ldap group.
ldap_group_search_scope :
type : integer
2018-09-12 13:57:40 +02:00
description : 'The scope to search ldap. ' '0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE' ''
2018-07-01 03:22:25 +02:00
ldap_group_admin_dn :
type : string
2018-09-12 13:57:40 +02:00
description : Specify the ldap group which have the same privilege with Harbor admin.
2017-08-30 10:39:54 +02:00
project_creation_restriction :
type : string
2018-09-12 13:57:40 +02:00
description : This attribute restricts what users have the permission to create project. It can be "everyone" or "adminonly".
2018-03-23 11:16:08 +01:00
read_only :
type : boolean
2018-08-15 12:53:49 +02:00
description : '' 'docker push' ' is prohibited by Harbor if you set it to true. '
2017-08-30 10:39:54 +02:00
self_registration :
type : boolean
2018-09-12 13:57:40 +02:00
description : 'Whether the Harbor instance supports self-registration. If it' 's set to false, admin need to add user to the instance.'
2017-08-30 10:39:54 +02:00
token_expiration :
type : integer
2018-01-28 18:43:03 +01:00
description : 'The expiration time of the token for internal Registry, in minutes.'
2017-08-30 10:39:54 +02:00
verify_remote_cert :
type : boolean
2018-09-12 13:57:40 +02:00
description : Whether or not the certificate will be verified when Harbor tries to access a remote Harbor instance for replication.
2017-08-30 10:39:54 +02:00
scan_all_policy :
type : object
properties :
type :
type : string
2018-09-12 13:57:40 +02:00
description : 'The type of scan all policy, currently the valid values are "none" and "daily"'
2017-08-30 10:39:54 +02:00
parameter :
type : object
properties :
daily_time :
type : integer
2018-09-12 13:57:40 +02:00
description : 'The offest in seconds of UTC 0 o' 'clock, only valid when the policy type is "daily"'
description : 'The parameters of the policy, the values are dependant on the type of the policy.'
2018-08-01 00:38:23 +02:00
ConfigurationsResponse :
type : object
properties :
auth_mode :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-08-01 00:38:23 +02:00
description : 'The auth mode of current system, such as "db_auth", "ldap_auth"'
email_from :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-09-12 13:57:40 +02:00
description : The sender name for Email notification.
2018-08-01 00:38:23 +02:00
email_host :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-08-01 00:38:23 +02:00
description : The hostname of SMTP server that sends Email notification.
email_port :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/IntegerConfigItem'
2018-08-01 00:38:23 +02:00
description : The port of SMTP server.
email_identity :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-08-01 00:38:23 +02:00
description : By default it's empty so the email_username is picked.
email_username :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-08-01 00:38:23 +02:00
description : The username for authenticate against SMTP server.
email_ssl :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/BoolConfigItem'
2018-09-12 13:57:40 +02:00
description : 'When it' 's set to true the system will access Email server via TLS by default. If it' 's set to false, it still will handle "STARTTLS" from server side.'
2018-08-01 00:38:23 +02:00
email_insecure :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/BoolConfigItem'
2018-09-12 13:57:40 +02:00
description : Whether or not the certificate will be verified when Harbor tries to access the email server.
2018-08-01 00:38:23 +02:00
ldap_url :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-08-01 00:38:23 +02:00
description : The URL of LDAP server.
ldap_base_dn :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-08-01 00:38:23 +02:00
description : The Base DN for LDAP binding.
ldap_filter :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-08-01 00:38:23 +02:00
description : The filter for LDAP binding.
ldap_scope :
type : integer
description : '0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'
ldap_uid :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-09-12 13:57:40 +02:00
description : 'The attribute which is used as identity for the LDAP binding, such as "CN" or "SAMAccountname"'
2018-08-01 00:38:23 +02:00
ldap_search_dn :
type : string
description : The DN of the user to do the search.
ldap_timeout :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/IntegerConfigItem'
2018-08-01 00:38:23 +02:00
description : timeout in seconds for connection to LDAP server.
ldap_group_attribute_name :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-09-12 13:57:40 +02:00
description : 'The attribute which is used as identity of the LDAP group, default is cn.'
2018-08-01 00:38:23 +02:00
ldap_group_base_dn :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-08-01 00:38:23 +02:00
description : The base DN to search LDAP group.
ldap_group_search_filter :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-08-01 00:38:23 +02:00
description : The filter to search the ldap group.
ldap_group_search_scope :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/IntegerConfigItem'
2018-09-12 13:57:40 +02:00
description : 'The scope to search ldap. ' '0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE' ''
2018-08-01 00:38:23 +02:00
ldap_group_admin_dn :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-09-12 13:57:40 +02:00
description : Specify the ldap group which have the same privilege with Harbor admin.
2018-08-01 00:38:23 +02:00
project_creation_restriction :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/StringConfigItem'
2018-09-12 13:57:40 +02:00
description : This attribute restricts what users have the permission to create project. It can be "everyone" or "adminonly".
2018-08-01 00:38:23 +02:00
read_only :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/BoolConfigItem'
description : '' 'docker push' ' is prohibited by Harbor if you set it to true. '
2018-08-01 00:38:23 +02:00
self_registration :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/BoolConfigItem'
2018-09-12 13:57:40 +02:00
description : 'Whether the Harbor instance supports self-registration. If it' 's set to false, admin need to add user to the instance.'
2018-08-01 00:38:23 +02:00
token_expiration :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/IntegerConfigItem'
2018-08-01 00:38:23 +02:00
description : 'The expiration time of the token for internal Registry, in minutes.'
verify_remote_cert :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/BoolConfigItem'
2018-09-12 13:57:40 +02:00
description : Whether or not the certificate will be verified when Harbor tries to access a remote Harbor instance for replication.
2018-08-01 00:38:23 +02:00
scan_all_policy :
type : object
properties :
type :
type : string
2018-09-12 13:57:40 +02:00
description : 'The type of scan all policy, currently the valid values are "none" and "daily"'
2018-08-01 00:38:23 +02:00
parameter :
type : object
properties :
daily_time :
type : integer
2018-09-12 13:57:40 +02:00
description : 'The offest in seconds of UTC 0 o' 'clock, only valid when the policy type is "daily"'
description : 'The parameters of the policy, the values are dependant on the type of the policy.'
2017-11-23 06:47:56 +01:00
Replication :
type : object
properties :
policy_id :
type : integer
description : The ID of replication policy
2018-10-21 15:05:34 +02:00
ReplicationResponse :
type : object
properties :
uuid :
type : string
description : UUID of the replication
2017-11-27 07:18:57 +01:00
RepositoryDescription :
type : object
properties :
description :
type : string
description : The description of the repository.
2017-12-16 14:52:29 +01:00
UpdateJobs :
type : object
properties :
policy_id :
type : integer
2018-01-28 18:43:03 +01:00
description : The ID of replication policy
2017-12-16 14:52:29 +01:00
status :
type : string
2018-01-28 18:43:03 +01:00
description : The status of jobs. The only valid value is stop for now.
2018-03-07 06:20:28 +01:00
Label :
type : object
properties :
id :
type : integer
description : The ID of label.
name :
type : string
description : The name of label.
description :
type : string
description : The description of label.
color :
type : string
description : The color of label.
scope :
2018-05-17 09:45:41 +02:00
type : string
2018-08-15 12:53:49 +02:00
description : 'The scope of label, g for global labels and p for project labels.'
2018-03-07 06:20:28 +01:00
project_id :
type : integer
description : The project ID if the label is a project label.
creation_time :
type : string
description : The creation time of label.
update_time :
type : string
description : The update time of label.
2018-06-07 10:05:50 +02:00
deleted :
2018-05-22 10:08:19 +02:00
type : boolean
2018-06-07 10:05:50 +02:00
description : The label is deleted or not.
2018-03-26 07:18:52 +02:00
ProjectMemberEntity :
type : object
properties :
id :
type : integer
description : the project member id
project_id :
type : integer
description : the project id
entity_name :
type : string
2018-08-15 12:53:49 +02:00
description : the name of the group member.
2018-03-26 07:18:52 +02:00
role_name :
type : string
description : the name of the role
2018-08-15 12:53:49 +02:00
role_id :
2018-03-26 07:18:52 +02:00
type : integer
description : the role id
2018-08-15 12:53:49 +02:00
entity_id :
2018-03-26 07:18:52 +02:00
type : integer
2018-09-12 13:57:40 +02:00
description : 'the id of entity, if the member is an user, it is user_id in user table. if the member is an user group, it is the user group' 's ID in user_group table.'
2018-03-26 07:18:52 +02:00
entity_type :
type : string
2018-08-15 12:53:49 +02:00
description : 'the entity' 's type, u for user entity, g for group entity.'
2018-03-26 07:18:52 +02:00
ProjectMember :
type : object
properties :
role_id :
type : integer
2019-01-23 07:56:23 +01:00
description : 'The role id 1 for projectAdmin, 2 for developer, 3 for guest, 4 for master'
2018-03-26 07:18:52 +02:00
member_user :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/UserEntity'
2018-03-26 07:18:52 +02:00
member_group :
2018-08-15 12:53:49 +02:00
$ref : '#/definitions/UserGroup'
2018-03-26 07:18:52 +02:00
RoleRequest :
type : object
properties :
role_id :
type : integer
2019-01-23 07:56:23 +01:00
description : 'The role id 1 for projectAdmin, 2 for developer, 3 for guest, 4 for master'
2018-03-26 07:18:52 +02:00
UserEntity :
type : object
properties :
user_id :
type : integer
description : The ID of the user.
username :
type : string
description : The name of the user.
UserGroup :
type : object
properties :
id :
type : integer
description : The ID of the user group
group_name :
type : string
description : The name of the user group
2018-08-15 12:53:49 +02:00
group_type :
2018-03-26 07:18:52 +02:00
type : integer
2018-08-15 12:53:49 +02:00
description : 'The group type, 1 for LDAP group.'
2018-03-26 07:18:52 +02:00
ldap_group_dn :
type : string
description : The DN of the LDAP group if group type is 1 (LDAP group).
2018-06-13 10:49:43 +02:00
Resource :
type : object
properties :
replication_policies :
type : array
description : The replication policy list.
items :
$ref : '#/definitions/RepPolicy'
2018-08-01 00:38:23 +02:00
StringConfigItem :
type : object
properties :
value :
type : string
2018-08-15 12:53:49 +02:00
description : The string value of current config item
2018-08-01 00:38:23 +02:00
editable :
type : boolean
description : The configure item can be updated or not
BoolConfigItem :
type : object
properties :
value :
type : boolean
2018-08-15 12:53:49 +02:00
description : The boolean value of current config item
2018-08-01 00:38:23 +02:00
editable :
type : boolean
description : The configure item can be updated or not
IntegerConfigItem :
type : object
properties :
value :
2018-08-15 12:53:49 +02:00
type : integer
description : The integer value of current config item
2018-08-01 00:38:23 +02:00
editable :
type : boolean
description : The configure item can be updated or not
2018-08-15 12:53:49 +02:00
ChartAPIError :
description : The error object returned by chart repository API
type : object
required :
- error
properties :
error :
type : string
description : The error message returned by the chart API
UnauthorizedChartAPIError :
description : Unauthorized
type : object
allOf :
- $ref : '#/definitions/ChartAPIError'
ForbiddenChartAPIError :
description : Operation is forbidden
type : object
allOf :
- $ref : '#/definitions/ChartAPIError'
InternalChartAPIError :
description : Internal server error occurred
type : object
allOf :
- $ref : '#/definitions/ChartAPIError'
NotFoundChartAPIError :
description : Not found
type : object
allOf :
- $ref : '#/definitions/ChartAPIError'
InsufficientStorageChartAPIError :
description : Insufficient storage
type : object
allOf :
- $ref : '#/definitions/ChartAPIError'
2018-10-11 10:08:34 +02:00
BadRequestFormatedError :
description : Bad request
type : object
allOf :
- $ref : '#/definitions/ChartAPIError'
ConflictFormatedError :
description : Conflicts
type : object
allOf :
- $ref : '#/definitions/ChartAPIError'
2018-08-15 12:53:49 +02:00
ChartInfoEntry :
type : object
description : The object contains basic chart information
required :
- name
- total_versions
- created
properties :
name :
type : string
description : Name of chart
total_versions :
type : integer
description : Total count of chart versions
2018-11-27 12:17:41 +01:00
latest_version :
type : string
description : latest version of chart
2018-08-15 12:53:49 +02:00
created :
type : string
description : The created time of chart
2018-11-27 12:17:41 +01:00
updated :
type : string
description : The created time of chart
2018-08-15 12:53:49 +02:00
icon :
type : string
description : The icon path of chart
home :
type : string
description : The home website of chart
deprecated :
type : boolean
description : Flag to indicate if the chart is deprecated
ChartInfoList :
type : array
description : The chart list under the project
items :
$ref : '#/definitions/ChartInfoEntry'
ChartMetadata :
type : object
description : The metadata of chart version
required :
- name
- version
- engine
- icon
- apiVersion
- appVersion
properties :
name :
type : string
description : The name of the chart
home :
type : string
description : The URL to the relevant project page
sources :
type : array
description : The URL to the source code of chart
items :
type : string
version :
type : string
description : A SemVer 2 version of chart
description :
type : string
description : A one-sentence description of chart
keywords :
type : array
description : A list of string keywords
items :
type : string
engine :
type : string
description : The name of template engine
icon :
type : string
description : The URL to an icon file
apiVersion :
type : string
description : The API version of this chart
appVersion :
type : string
description : The version of the application enclosed in the chart
deprecated :
type : boolean
description : Whether or not this chart is deprecated
ChartVersion :
type : object
description : A specified chart entry
allOf :
- $ref : '#/definitions/ChartMetadata'
- type : object
properties :
created :
type : string
description : The created time of the chart entry
removed :
type : boolean
description : A flag to indicate if the chart entry is removed
digest :
type : string
description : The digest value of the chart entry
urls :
type : array
description : The urls of the chart entry
items :
type : string
2018-10-11 10:08:34 +02:00
properties :
labels :
$ref : '#/definitions/Labels'
2018-08-15 12:53:49 +02:00
ChartVersions :
type : array
description : A list of chart entry
items :
$ref : '#/definitions/ChartVersion'
DigitalSignature :
type : object
description : The signature of the chart
properties :
signed :
type : boolean
description : A flag to indicate if the chart is signed
prov_file :
type : string
description : The URL of the provance file
SecurityReport :
type : object
description : The security information of the chart
properties :
signature :
$ref : '#/definitions/DigitalSignature'
Dependency :
type : object
description : Another chart the chart depends on
required :
- name
- version
properties :
name :
type : string
description : The name of the chart denpendency
version :
type : string
description : The version of the chart dependency
repository :
type : string
description : The URL to the repository
ChartVersionDetails :
type : object
description : The detailed information of the chart entry
properties :
metadata :
$ref : '#/definitions/ChartVersion'
security :
$ref : '#/definitions/SecurityReport'
dependencies :
2018-10-11 10:08:34 +02:00
type : array
items :
$ref : '#/definitions/Dependency'
2018-08-15 12:53:49 +02:00
values :
type : object
additionalProperties :
type : object
files :
type : object
additionalProperties :
type : string
2018-10-11 10:08:34 +02:00
labels :
$ref : '#/definitions/Labels'
2018-08-17 10:43:51 +02:00
GCResult :
type : object
properties :
2018-11-27 12:17:41 +01:00
id :
type : integer
description : the id of gc job.
job_name :
type : string
description : the job name of gc job.
job_kind :
2018-08-17 10:43:51 +02:00
type : string
2018-11-27 12:17:41 +01:00
description : the job kind of gc job.
schedule :
$ref : '#/definitions/GCScheduleSchedule'
job_status :
type : string
description : the status of gc job.
deleted :
type : boolean
description : if gc job was deleted.
creation_time :
2018-08-17 10:43:51 +02:00
type : string
2018-11-27 12:17:41 +01:00
description : the creation time of gc job.
update_time :
2018-08-17 10:43:51 +02:00
type : string
2018-11-27 12:17:41 +01:00
description : the update time of gc job.
2018-08-17 10:43:51 +02:00
GCSchedule :
2018-11-27 12:17:41 +01:00
type : object
properties :
schedule :
$ref : '#/definitions/GCScheduleSchedule'
GCScheduleSchedule :
2018-08-17 10:43:51 +02:00
type : object
properties :
type :
type : string
description : The schedule type. The valid values are daily, weekly and None. 'None' means to cancel the schedule.
weekday :
type : integer
format : int8
description : 'Optional, only used when the type is weekly. The valid values are 1-7.'
offtime :
type : integer
format : int64
description : 'The time offset with the UTC 00:00 in seconds.'
2018-09-05 14:13:27 +02:00
SearchResult :
type : object
description : The chart search result item
properties :
name :
type : string
description : The chart name with repo name
score :
type : integer
description : The matched level
chart :
$ref : '#/definitions/ChartVersion'
2018-10-11 10:08:34 +02:00
Labels :
type : array
description : A list of label
items :
2018-12-12 04:54:22 +01:00
$ref : '#/definitions/Label'
2019-01-11 05:53:34 +01:00
OverallHealthStatus :
type : object
description : The system health status
properties :
status :
type : string
description : The overall health status. It is "healthy" only when all the components' status are "healthy"
components :
type : array
items :
$ref : '#/definitions/ComponentHealthStatus'
ComponentHealthStatus :
type : object
description : The health status of component
properties :
name :
type : string
description : The component name
status :
type : string
description : The health status of component
error :
type : string
description : (optional) The error message when the status is "unhealthy"
2019-01-30 07:10:26 +01:00
RobotAccount :
type : object
description : The object of robot account
properties :
id :
type : integer
description : The id of robot account
name :
type : string
description : The name of robot account
description :
type : string
description : The description of robot account
project_id :
type : integer
description : The project id of robot account
disabled :
type : boolean
description : The robot account is disable or enable
creation_time :
type : string
description : The creation time of the robot account
update_time :
type : string
description : The update time of the robot account
RobotAccountCreate :
type : object
properties :
name :
type : string
description : The name of robot account
description :
type : string
description : The description of robot account
access :
type : array
description : The permission of robot account
items :
$ref : '#/definitions/RobotAccountAccess'
2019-02-13 07:40:04 +01:00
RobotAccountPostRep :
type : object
properties :
name :
type : string
description : the name of robot account
token :
type : string
description : the token of robot account
2019-01-30 07:10:26 +01:00
RobotAccountAccess :
type : object
properties :
resource :
type : string
description : the resource of harbor
action :
type : string
description : the action to resource that perdefined in harbor rbac
RobotAccountUpdate :
type : object
properties :
disable :
type : boolean
description : The robot account is disable or enable
2019-01-28 11:06:52 +01:00
Permission :
type : object
description : The permission
properties :
resource :
type : string
description : The permission resoruce
action :
type : string
2019-01-30 07:10:26 +01:00
description : The permission action