2020-01-14 03:20:18 +01:00
swagger : '2.0'
info :
title : Harbor API
description : These APIs provide services for manipulating Harbor project.
version : '2.0'
host : localhost
schemes :
- http
- https
basePath : /api/v2.0
produces :
- application/json
consumes :
- application/json
securityDefinitions :
2020-04-28 04:34:34 +02:00
basic :
2020-01-14 03:20:18 +01:00
type : basic
2020-04-28 04:34:34 +02:00
security :
- basic : [ ]
- {}
2020-01-14 03:20:18 +01:00
paths :
2021-04-09 09:30:20 +02:00
/health :
get :
summary : Check the status of Harbor components
2023-02-23 12:57:50 +01:00
description : Check the status of Harbor components. This path does not require authentication.
2021-04-09 09:30:20 +02:00
tags :
- health
operationId : getHealth
2021-05-19 04:36:09 +02:00
parameters :
- $ref : '#/parameters/requestId'
2021-04-09 09:30:20 +02:00
responses :
'200' :
description : The health status of Harbor components
schema :
$ref : '#/definitions/OverallHealthStatus'
'500' :
$ref : '#/responses/500'
2021-03-22 07:35:44 +01:00
/search :
get :
2023-02-24 07:47:42 +01:00
summary : 'Search for projects and repositories'
2021-03-22 07:35:44 +01:00
description : |-
2023-02-24 07:47:42 +01:00
The Search endpoint returns information about the projects and repositories offered at public status or related to the current logged in user. The response includes the project and repository list in a proper display order.
2021-03-22 07:35:44 +01:00
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-03-22 07:35:44 +01:00
- name : q
in : query
description : Search parameter for project and repository name.
required : true
type : string
tags :
- search
operationId : search
responses :
'200' :
description : An array of search results
schema :
$ref : '#/definitions/Search'
'500' :
$ref : '#/responses/500'
2021-04-15 04:57:52 +02:00
/statistics :
get :
summary : Get the statistic information about the projects and repositories
description : Get the statistic information about the projects and repositories
tags :
- statistic
operationId : getStatistic
2021-05-19 04:36:09 +02:00
parameters :
- $ref : '#/parameters/requestId'
2021-04-15 04:57:52 +02:00
responses :
'200' :
description : The statistic information
schema :
$ref : '#/definitions/Statistic'
'401' :
$ref : '#/responses/401'
'500' :
$ref : '#/responses/500'
2021-02-28 02:07:20 +01:00
/ldap/ping :
post :
operationId : pingLdap
summary : Ping available ldap service.
description : |
This endpoint ping the available ldap service for test related configuration parameters.
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-02-28 02:07:20 +01:00
- name : ldapconf
in : body
description : 'ldap configuration. support input ldap service configuration. If it is a empty request, will load current configuration from the system.'
required : false
schema :
$ref : '#/definitions/LdapConf'
tags :
- Ldap
responses :
'200' :
description : Ping ldap service successfully.
schema :
$ref : '#/definitions/LdapPingResult'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/ldap/users/search :
get :
operationId : searchLdapUser
summary : Search available ldap users.
description : |
2024-08-13 10:31:10 +02:00
This endpoint searches the available ldap users based on related configuration parameters. Support searched by input ldap configuration, load configuration from the system and specific filter.
2021-02-28 02:07:20 +01:00
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-02-28 02:07:20 +01:00
- name : username
in : query
type : string
required : false
description : Registered user ID
tags :
- Ldap
responses :
'200' :
description : Search ldap users successfully.
schema :
type : array
items :
$ref : '#/definitions/LdapUser'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/ldap/users/import :
post :
operationId : importLdapUser
summary : Import selected available ldap users.
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.
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-02-28 02:07:20 +01:00
- name : uid_list
in : body
description : The uid listed for importing. This list will check users validity of ldap service based on configuration from the system.
required : true
schema :
$ref : '#/definitions/LdapImportUsers'
tags :
- Ldap
responses :
'200' :
description : Add ldap users successfully.
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
description : Failed import some users.
schema :
type : array
items :
$ref : '#/definitions/LdapFailedImportUser'
'500' :
$ref : '#/responses/500'
/ldap/groups/search :
get :
summary : Search available ldap groups.
operationId : searchLdapGroup
description : |
This endpoint searches the available ldap groups based on related configuration parameters. support to search by groupname or groupdn.
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-02-28 02:07:20 +01:00
- name : groupname
in : query
type : string
required : false
description : Ldap group name
- name : groupdn
in : query
type : string
required : false
description : The LDAP group DN
tags :
- Ldap
responses :
'200' :
description : Search ldap group successfully.
schema :
type : array
items :
$ref : '#/definitions/UserGroup'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2021-03-11 13:25:51 +01:00
/internalconfig :
get :
summary : Get internal configurations.
2021-04-27 06:35:00 +02:00
operationId : getInternalconfig
2021-03-11 13:25:51 +01:00
description : |
This endpoint is for retrieving system configurations that only provides for internal api call.
tags :
- configure
parameters :
- $ref : '#/parameters/requestId'
responses :
'200' :
description : Get system configurations successfully. The response body is a map.
schema :
$ref : '#/definitions/InternalConfigurationsResponse'
'401' :
description : User need to log in first.
'403' :
description : User does not have permission of admin role.
'500' :
2021-04-15 04:52:48 +02:00
description : Unexpected internal errors.
2021-03-11 13:25:51 +01:00
/configurations :
get :
summary : Get system configurations.
2021-04-27 06:35:00 +02:00
operationId : getConfigurations
2021-03-11 13:25:51 +01:00
description : |
This endpoint is for retrieving system configurations that only provides for admin user.
tags :
- configure
parameters :
2021-04-15 04:52:48 +02:00
- $ref : '#/parameters/requestId'
2021-03-11 13:25:51 +01:00
responses :
'200' :
description : Get system configurations successfully. The response body is a map.
schema :
$ref : '#/definitions/ConfigurationsResponse'
'401' :
2023-05-09 04:54:41 +02:00
description : User need to log in first.
2021-03-11 13:25:51 +01:00
'403' :
description : User does not have permission of admin role.
'500' :
description : Unexpected internal errors.
put :
summary : Modify system configurations.
2021-04-27 06:35:00 +02:00
operationId : updateConfigurations
2021-03-11 13:25:51 +01:00
description : |
This endpoint is for modifying system configurations that only provides for admin user.
tags :
- configure
parameters :
- $ref : '#/parameters/requestId'
- name : configurations
in : body
required : true
schema :
$ref : '#/definitions/Configurations'
description : 'The configuration map can contain a subset of the attributes of the schema, which are to be updated.'
responses :
'200' :
description : Modify system configurations successfully.
'401' :
description : User need to log in first.
'403' :
description : User does not have permission of admin role.
'500' :
description : Unexpected internal errors.
2020-08-15 18:09:06 +02:00
/projects :
get :
summary : List projects
description : This endpoint returns projects created by Harbor.
tags :
- project
operationId : listProjects
parameters :
- $ref : '#/parameters/requestId'
2021-03-12 08:04:08 +01:00
- $ref : '#/parameters/query'
2020-08-15 18:09:06 +02:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-08-15 18:09:06 +02:00
- name : name
in : query
description : The name of project.
required : false
type : string
- name : public
in : query
description : The project is public or private.
required : false
type : boolean
- name : owner
in : query
description : The name of project owner.
required : false
type : string
2020-11-30 09:13:07 +01:00
- name : with_detail
in : query
description : Bool value indicating whether return detailed information of the project
type : boolean
required : false
default : true
2020-08-15 18:09:06 +02:00
responses :
'200' :
description : Return all matched projects.
schema :
type : array
items :
$ref : '#/definitions/Project'
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
'401' :
$ref : '#/responses/401'
'500' :
$ref : '#/responses/500'
head :
summary : Check if the project name user provided already exists.
description : This endpoint is used to check if the project name provided already exist.
tags :
- project
operationId : headProject
parameters :
- $ref : '#/parameters/requestId'
- name : project_name
in : query
description : Project name for checking exists.
required : true
type : string
responses :
'200' :
$ref : '#/responses/200'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
post :
summary : Create a new project.
description : This endpoint is for user to create a new project.
tags :
- project
operationId : createProject
parameters :
- $ref : '#/parameters/requestId'
2020-12-14 08:48:52 +01:00
- $ref : '#/parameters/resourceNameInLocation'
2020-08-15 18:09:06 +02:00
- name : project
in : body
description : New created project.
required : true
schema :
$ref : '#/definitions/ProjectReq'
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
2020-12-14 08:48:52 +01:00
'/projects/{project_name_or_id}' :
2020-08-15 18:09:06 +02:00
get :
summary : Return specific project detail information
description : This endpoint returns specific project information by project ID.
tags :
- project
operationId : getProject
parameters :
- $ref : '#/parameters/requestId'
2020-12-14 08:48:52 +01:00
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
2020-08-15 18:09:06 +02:00
responses :
'200' :
description : Return matched project information.
schema :
$ref : '#/definitions/Project'
'401' :
$ref : '#/responses/401'
'500' :
$ref : '#/responses/500'
put :
summary : Update properties for a selected project.
description : This endpoint is aimed to update the properties of a project.
tags :
- project
operationId : updateProject
parameters :
- $ref : '#/parameters/requestId'
2020-12-14 08:48:52 +01:00
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
2020-08-15 18:09:06 +02:00
- name : project
in : body
required : true
schema :
$ref : '#/definitions/ProjectReq'
description : Updates of project.
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete project by projectID
description : This endpoint is aimed to delete project by project ID.
tags :
- project
operationId : deleteProject
parameters :
- $ref : '#/parameters/requestId'
2020-12-14 08:48:52 +01:00
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
2020-08-15 18:09:06 +02:00
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'412' :
$ref : '#/responses/412'
'500' :
$ref : '#/responses/500'
2020-12-14 08:48:52 +01:00
/projects/{project_name_or_id}/_deletable:
2020-08-15 18:09:06 +02:00
get :
summary : Get the deletable status of the project
description : Get the deletable status of the project
tags :
- project
operationId : getProjectDeletable
parameters :
- $ref : '#/parameters/requestId'
2020-12-14 08:48:52 +01:00
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
2020-08-15 18:09:06 +02:00
responses :
'200' :
description : Return deletable status of the project.
schema :
$ref : '#/definitions/ProjectDeletable'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-12-14 08:48:52 +01:00
'/projects/{project_name_or_id}/summary' :
2020-08-15 18:09:06 +02:00
get :
summary : Get summary of the project.
description : Get summary of the project.
tags :
- project
operationId : getProjectSummary
parameters :
- $ref : '#/parameters/requestId'
2020-12-14 08:48:52 +01:00
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
2020-08-15 18:09:06 +02:00
responses :
'200' :
description : Get summary of the project successfully.
schema :
$ref : '#/definitions/ProjectSummary'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2021-04-02 08:22:18 +02:00
'/projects/{project_name_or_id}/members' :
get :
summary : Get all project member information
description : Get all project member information
operationId : listProjectMembers
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
2021-04-15 04:52:48 +02:00
- $ref : '#/parameters/projectNameOrId'
2021-04-02 08:22:18 +02:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- name : entityname
in : query
type : string
description : The entity name to search.
tags :
- member
responses :
'200' :
description : Get project members successfully.
headers :
X-Total-Count :
description : The total count of members
type : integer
Link :
description : Link refers to the previous page and next page
2021-04-15 04:52:48 +02:00
type : string
2021-04-02 08:22:18 +02:00
schema :
type : array
items :
$ref : '#/definitions/ProjectMemberEntity'
2021-04-15 04:52:48 +02:00
2021-04-02 08:22:18 +02:00
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
post :
summary : Create project member
operationId : createProjectMember
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. '
tags :
- member
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
2021-04-15 04:52:48 +02:00
- $ref : '#/parameters/projectNameOrId'
2021-04-02 08:22:18 +02:00
- name : project_member
in : body
schema :
$ref : '#/definitions/ProjectMember'
responses :
'201' :
description : Project member created successfully.
headers :
Location :
type : string
description : The URL of the created resource
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
'/projects/{project_name_or_id}/members/{mid}' :
get :
summary : Get the project member information
description : Get the project member information
operationId : getProjectMember
tags :
- member
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
2021-04-15 04:52:48 +02:00
- $ref : '#/parameters/projectNameOrId'
2021-04-02 08:22:18 +02:00
- name : mid
in : path
type : integer
format : int64
required : true
description : The member ID
responses :
'200' :
description : Project member retrieved successfully.
schema :
$ref : '#/definitions/ProjectMemberEntity'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Update project member
description : Update project member relationship
operationId : updateProjectMember
tags :
- member
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
2021-04-15 04:52:48 +02:00
- $ref : '#/parameters/projectNameOrId'
2021-04-02 08:22:18 +02:00
- name : mid
in : path
type : integer
format : int64
required : true
description : Member ID.
- name : role
in : body
schema :
$ref : '#/definitions/RoleRequest'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete project member
operationId : deleteProjectMember
tags :
- member
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
2021-04-15 04:52:48 +02:00
- $ref : '#/parameters/projectNameOrId'
2021-04-02 08:22:18 +02:00
- name : mid
in : path
type : integer
format : int64
required : true
description : Member ID.
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
2021-04-15 04:52:48 +02:00
$ref : '#/responses/500'
2021-04-20 16:18:20 +02:00
'/projects/{project_name_or_id}/metadatas/' :
get :
summary : Get the metadata of the specific project
description : Get the metadata of the specific project
operationId : listProjectMetadatas
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
tags :
- projectMetadata
responses :
'200' :
description : Success
schema :
type : object
additionalProperties :
type : string
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
post :
summary : Add metadata for the specific project
operationId : addProjectMetadatas
description : Add metadata for the specific project
tags :
- projectMetadata
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- name : metadata
in : body
schema :
type : object
additionalProperties :
type : string
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
'/projects/{project_name_or_id}/metadatas/{meta_name}' :
get :
summary : Get the specific metadata of the specific project
description : Get the specific metadata of the specific project
operationId : getProjectMetadata
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- name : meta_name
in : path
description : The name of metadata.
required : true
type : string
tags :
- projectMetadata
responses :
'200' :
description : Success
schema :
type : object
additionalProperties :
type : string
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Update the specific metadata for the specific project
description : Update the specific metadata for the specific project
operationId : updateProjectMetadata
tags :
- projectMetadata
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- name : meta_name
in : path
description : The name of metadata.
required : true
type : string
- name : metadata
in : body
schema :
type : object
additionalProperties :
type : string
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete the specific metadata for the specific project
description : Delete the specific metadata for the specific project
operationId : deleteProjectMetadata
tags :
- projectMetadata
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- name : meta_name
in : path
description : The name of metadata.
required : true
type : string
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
2021-03-18 16:07:21 +01:00
/repositories :
get :
summary : List all authorized repositories
description : List all authorized repositories
tags :
- repository
operationId : listAllRepositories
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : Success
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
schema :
type : array
items :
$ref : '#/definitions/Repository'
'400' :
$ref : '#/responses/400'
'500' :
$ref : '#/responses/500'
2020-02-18 08:51:38 +01:00
/projects/{project_name}/repositories:
get :
summary : List repositories
description : List repositories of the specified project
tags :
- repository
operationId : listRepositories
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
2020-03-09 15:19:42 +01:00
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-02-18 08:51:38 +01:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : Success
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
schema :
type : array
items :
$ref : '#/definitions/Repository'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-04-04 05:06:22 +02:00
/projects/{project_name}/repositories/{repository_name}:
2020-02-25 05:02:50 +01:00
get :
summary : Get repository
description : Get the repository specified by name
tags :
- repository
operationId : getRepository
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
responses :
'200' :
description : Success
schema :
$ref : '#/definitions/Repository'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-02-18 08:51:38 +01:00
put :
summary : Update repository
description : Update the repository specified by name
tags :
- repository
operationId : updateRepository
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- name : repository
in : body
description : The JSON object of repository.
required : true
schema :
$ref : '#/definitions/Repository'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete repository
description : Delete the repository specified by name
tags :
- repository
operationId : deleteRepository
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-01-26 05:52:51 +01:00
/projects/{project_name}/repositories/{repository_name}/artifacts:
2020-01-14 03:20:18 +01:00
get :
2020-01-26 05:52:51 +01:00
summary : List artifacts
2020-04-07 10:28:51 +02:00
description : List artifacts under the specific project and repository. Except the basic properties, the other supported queries in "q" includes "tags=*" to list only tagged artifacts, "tags=nil" to list only untagged artifacts, "tags=~v" to list artifacts whose tag fuzzy matches "v", "tags=v" to list artifact whose tag exactly matches "v", "labels=(id1, id2)" to list artifacts that both labels with id1 and id2 are added to
2020-01-14 03:20:18 +01:00
tags :
- artifact
2020-01-26 05:52:51 +01:00
operationId : listArtifacts
2020-01-14 03:20:18 +01:00
parameters :
- $ref : '#/parameters/requestId'
2020-01-16 01:04:22 +01:00
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
2020-03-09 15:19:42 +01:00
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-01-26 05:52:51 +01:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
2021-01-06 10:54:36 +01:00
- $ref : '#/parameters/acceptVulnerabilities'
2020-01-16 01:04:22 +01:00
- name : with_tag
in : query
2020-02-22 06:29:58 +01:00
description : Specify whether the tags are included inside the returning artifacts
2020-01-16 01:04:22 +01:00
type : boolean
required : false
default : true
- name : with_label
in : query
2020-02-22 06:29:58 +01:00
description : Specify whether the labels are included inside the returning artifacts
2020-01-16 01:04:22 +01:00
type : boolean
required : false
default : false
- name : with_scan_overview
in : query
2020-02-22 06:29:58 +01:00
description : Specify whether the scan overview is included inside the returning artifacts
2020-01-16 01:04:22 +01:00
type : boolean
required : false
default : false
2024-04-03 10:38:09 +02:00
- name : with_sbom_overview
in : query
description : Specify whether the SBOM overview is included in returning artifacts, when this option is true, the SBOM overview will be included in the response
type : boolean
required : false
2024-04-16 15:34:19 +02:00
default : false
2020-01-26 05:52:51 +01:00
- name : with_signature
2020-01-16 01:04:22 +01:00
in : query
2020-02-22 06:29:58 +01:00
description : Specify whether the signature is included inside the tags of the returning artifacts. Only works when setting "with_tag=true"
2020-01-16 01:04:22 +01:00
type : boolean
required : false
default : false
- name : with_immutable_status
in : query
2022-01-05 04:13:40 +01:00
description : Specify whether the immutable status is included inside the tags of the returning artifacts. Only works when setting "with_immutable_status=true"
type : boolean
required : false
default : false
- name : with_accessory
in : query
description : Specify whether the accessories are included of the returning artifacts. Only works when setting "with_accessory=true"
2020-01-16 01:04:22 +01:00
type : boolean
required : false
default : false
2020-01-14 03:20:18 +01:00
responses :
'200' :
2020-01-16 01:04:22 +01:00
description : Success
2020-01-26 05:52:51 +01:00
headers :
X-Total-Count :
description : The total count of artifacts
type : integer
Link :
description : Link refers to the previous page and next page
type : string
2020-01-14 03:20:18 +01:00
schema :
2020-01-26 05:52:51 +01:00
type : array
items :
$ref : '#/definitions/Artifact'
'400' :
$ref : '#/responses/400'
2020-01-14 03:20:18 +01:00
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
2020-01-26 05:52:51 +01:00
'404' :
$ref : '#/responses/404'
2020-01-14 03:20:18 +01:00
'500' :
$ref : '#/responses/500'
2020-02-13 09:04:47 +01:00
post :
summary : Copy artifact
description : Copy the artifact specified in the "from" parameter to the repository.
tags :
- artifact
operationId : CopyArtifact
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- name : from
in : query
description : The artifact from which the new artifact is copied from, the format should be "project/repository:tag" or "project/repository@digest".
type : string
required : true
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
2020-07-17 09:24:18 +02:00
'405' :
$ref : '#/responses/405'
2020-02-13 09:04:47 +01:00
'500' :
$ref : '#/responses/500'
2020-01-26 05:52:51 +01:00
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}:
2020-01-14 03:20:18 +01:00
get :
2020-01-26 05:52:51 +01:00
summary : Get the specific artifact
description : Get the artifact specified by the reference under the project and repository. The reference can be digest or tag.
2020-01-14 03:20:18 +01:00
tags :
- artifact
2020-01-26 05:52:51 +01:00
operationId : getArtifact
2020-01-14 03:20:18 +01:00
parameters :
- $ref : '#/parameters/requestId'
2020-01-16 01:04:22 +01:00
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
2020-01-26 05:52:51 +01:00
- $ref : '#/parameters/reference'
2020-01-25 08:26:44 +01:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
2021-01-06 10:54:36 +01:00
- $ref : '#/parameters/acceptVulnerabilities'
2020-01-16 01:04:22 +01:00
- name : with_tag
in : query
description : Specify whether the tags are inclued inside the returning artifacts
type : boolean
required : false
default : true
- name : with_label
in : query
description : Specify whether the labels are inclued inside the returning artifacts
2020-01-14 03:20:18 +01:00
type : boolean
required : false
default : false
2020-01-16 01:04:22 +01:00
- name : with_scan_overview
2020-01-14 03:20:18 +01:00
in : query
2020-01-16 01:04:22 +01:00
description : Specify whether the scan overview is inclued inside the returning artifacts
2020-01-14 03:20:18 +01:00
type : boolean
required : false
default : false
2024-04-03 10:38:09 +02:00
- name : with_sbom_overview
in : query
description : Specify whether the SBOM overview is included in returning artifact, when this option is true, the SBOM overview will be included in the response
type : boolean
required : false
default : false
2022-01-05 04:13:40 +01:00
- name : with_accessory
in : query
description : Specify whether the accessories are included of the returning artifacts.
type : boolean
required : false
default : false
2020-01-16 01:04:22 +01:00
# should be in tag level
2020-01-26 05:52:51 +01:00
- name : with_signature
2020-01-14 03:20:18 +01:00
in : query
2020-01-16 01:04:22 +01:00
description : Specify whether the signature is inclued inside the returning artifacts
2020-01-14 03:20:18 +01:00
type : boolean
required : false
default : false
2020-01-16 01:04:22 +01:00
- name : with_immutable_status
in : query
2022-01-05 04:13:40 +01:00
description : Specify whether the immutable status is inclued inside the tags of the returning artifacts.
2020-01-16 01:04:22 +01:00
type : boolean
required : false
default : false
2020-01-14 03:20:18 +01:00
responses :
'200' :
2020-01-16 01:04:22 +01:00
description : Success
2020-01-14 03:20:18 +01:00
schema :
2020-01-26 05:52:51 +01:00
$ref : '#/definitions/Artifact'
'400' :
$ref : '#/responses/400'
2020-01-14 03:20:18 +01:00
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
2020-01-26 05:52:51 +01:00
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete the specific artifact
description : Delete the artifact specified by the reference under the project and repository. The reference can be digest or tag
tags :
- artifact
operationId : deleteArtifact
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- $ref : '#/parameters/reference'
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-02-25 07:01:29 +01:00
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan:
post :
summary : Scan the artifact
description : Scan the specified artifact
tags :
2020-03-12 12:30:12 +01:00
- scan
2020-02-25 07:01:29 +01:00
operationId : scanArtifact
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- $ref : '#/parameters/reference'
2024-04-17 11:52:50 +02:00
- name : scanType
2024-04-03 10:38:09 +02:00
in : body
required : false
2024-04-16 15:34:19 +02:00
schema :
2024-04-17 11:52:50 +02:00
$ref : '#/definitions/ScanType'
2020-02-25 07:01:29 +01:00
responses :
'202' :
$ref : '#/responses/202'
2020-12-17 09:58:49 +01:00
'400' :
$ref : '#/responses/400'
2020-02-25 07:01:29 +01:00
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
2024-04-24 03:57:46 +02:00
'422' :
$ref : '#/responses/422'
2020-02-25 07:01:29 +01:00
'500' :
$ref : '#/responses/500'
2021-08-15 11:21:39 +02:00
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/stop:
post :
summary : Cancelling a scan job for a particular artifact
description : Cancelling a scan job for a particular artifact
tags :
- scan
operationId : stopScanArtifact
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- $ref : '#/parameters/reference'
2024-04-09 10:07:47 +02:00
- name : scanType
in : body
required : true
schema :
$ref : '#/definitions/ScanType'
description: 'The scan type : Vulnerabilities, SBOM'
2021-08-15 11:21:39 +02:00
responses :
'202' :
$ref : '#/responses/202'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
2024-04-24 03:57:46 +02:00
'422' :
$ref : '#/responses/422'
2021-08-15 11:21:39 +02:00
'500' :
$ref : '#/responses/500'
2020-03-12 12:30:12 +01:00
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/{report_id}/log:
get :
summary : Get the log of the scan report
description : Get the log of the scan report
tags :
- scan
operationId : getReportLog
produces :
- text/plain
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- $ref : '#/parameters/reference'
- name : report_id
type : string
in : path
required : true
description : The report id to get the log
responses :
'200' :
description : Successfully get scan log file
schema :
type : string
2024-04-08 06:57:38 +02:00
'400' :
$ref : '#/responses/400'
2020-03-12 12:30:12 +01:00
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-01-26 05:52:51 +01:00
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/tags:
post :
summary : Create tag
description : Create a tag for the specified artifact
tags :
- artifact
operationId : createTag
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- $ref : '#/parameters/reference'
- name : tag
in : body
description : The JSON object of tag.
required : true
schema :
$ref : '#/definitions/Tag'
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
2020-08-16 16:02:30 +02:00
'405' :
$ref : '#/responses/405'
2020-01-26 05:52:51 +01:00
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
2020-04-07 10:28:51 +02:00
get :
summary : List tags
description : List tags of the specific artifact
tags :
- artifact
operationId : listTags
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- $ref : '#/parameters/reference'
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-04-07 10:28:51 +02:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- name : with_signature
in : query
description : Specify whether the signature is included inside the returning tags
type : boolean
required : false
default : false
- name : with_immutable_status
in : query
description : Specify whether the immutable status is included inside the returning tags
type : boolean
required : false
default : false
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of tags
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/Tag'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-01-26 05:52:51 +01:00
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/tags/{tag_name}:
delete :
summary : Delete tag
description : Delete the tag of the specified artifact
tags :
- artifact
operationId : deleteTag
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- $ref : '#/parameters/reference'
- $ref : '#/parameters/tagName'
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
2020-01-14 03:20:18 +01:00
'500' :
$ref : '#/responses/500'
2022-01-05 04:13:40 +01:00
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/accessories:
get :
summary : List accessories
description : List accessories of the specific artifact
tags :
- artifact
operationId : listAccessories
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- $ref : '#/parameters/reference'
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of accessories
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/Accessory'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2021-01-06 10:54:36 +01:00
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/additions/vulnerabilities:
get :
summary : Get the vulnerabilities addition of the specific artifact
description : Get the vulnerabilities addition of the artifact specified by the reference under the project and repository.
tags :
- artifact
operationId : getVulnerabilitiesAddition
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- $ref : '#/parameters/reference'
- $ref : '#/parameters/acceptVulnerabilities'
responses :
'200' :
description : Success
headers :
Content-Type :
description : The content type of the vulnerabilities addition
type : string
schema :
type : string
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-01-29 04:34:55 +01:00
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/additions/{addition}:
get :
summary : Get the addition of the specific artifact
description : Get the addition of the artifact specified by the reference under the project and repository.
tags :
- artifact
operationId : getAddition
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- $ref : '#/parameters/reference'
- name : addition
in : path
2020-01-27 13:32:14 +01:00
description : The type of addition.
2020-01-29 04:34:55 +01:00
type : string
2024-04-03 10:38:09 +02:00
enum : [ build_history, values.yaml, readme.md, dependencies, sbom]
2020-01-29 04:34:55 +01:00
required : true
responses :
'200' :
2020-03-16 03:13:28 +01:00
description : Success
headers :
Content-Type :
description : The content type of the addition
type : string
schema :
type : string
2020-01-27 13:32:14 +01:00
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
2024-04-24 03:57:46 +02:00
'422' :
$ref : '#/responses/422'
2020-01-27 13:32:14 +01:00
'500' :
$ref : '#/responses/500'
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/labels:
post :
summary : Add label to artifact
description : Add label to the specified artiact.
tags :
- artifact
operationId : addLabel
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- $ref : '#/parameters/reference'
- name : label
in : body
description : The label that added to the artifact. Only the ID property is needed.
required : true
2020-01-29 04:34:55 +01:00
schema :
2020-01-27 13:32:14 +01:00
$ref : '#/definitions/Label'
responses :
'200' :
$ref : '#/responses/200'
2020-01-29 04:34:55 +01:00
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
2020-01-27 13:32:14 +01:00
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/labels/{label_id}:
delete :
summary : Remove label from artifact
description : Remove the label from the specified artiact.
tags :
- artifact
operationId : removeLabel
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/repositoryName'
- $ref : '#/parameters/reference'
- name : label_id
in : path
description : The ID of the label that removed from the artifact.
type : integer
format : int64
required : true
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'409' :
$ref : '#/responses/409'
2020-01-29 04:34:55 +01:00
'500' :
$ref : '#/responses/500'
2024-08-06 12:29:13 +02:00
/projects/{project_name_or_id}/artifacts:
get :
summary : List artifacts
description : List artifacts of the specified project
tags :
- project
operationId : listArtifactsOfProject
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- $ref : '#/parameters/acceptVulnerabilities'
- name : with_tag
in : query
description : Specify whether the tags are included inside the returning artifacts
type : boolean
required : false
default : true
- name : with_label
in : query
description : Specify whether the labels are included inside the returning artifacts
type : boolean
required : false
default : false
- name : with_scan_overview
in : query
description : Specify whether the scan overview is included inside the returning artifacts
type : boolean
required : false
default : false
- name : with_sbom_overview
in : query
description : Specify whether the SBOM overview is included in returning artifacts, when this option is true, the SBOM overview will be included in the response
type : boolean
required : false
default : false
- name : with_immutable_status
in : query
description : Specify whether the immutable status is included inside the tags of the returning artifacts. Only works when setting "with_immutable_status=true"
type : boolean
required : false
default : false
- name : with_accessory
in : query
description : Specify whether the accessories are included of the returning artifacts. Only works when setting "with_accessory=true"
type : boolean
required : false
default : false
- name : latest_in_repository
in : query
description : Specify whether only the latest pushed artifact of each repository is included inside the returning artifacts. Only works when either artifact_type or media_type is included in the query.
type : boolean
required : false
default : false
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of artifacts
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/Artifact'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2021-03-03 05:23:36 +01:00
'/projects/{project_name_or_id}/scanner' :
get :
summary : Get project level scanner
description : Get the scanner registration of the specified project. If no scanner registration is configured for the specified project, the system default scanner registration will be returned.
tags :
- project
operationId : getScannerOfProject
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
responses :
'200' :
description : The details of the scanner registration.
schema :
$ref : '#/definitions/ScannerRegistration'
'400' :
description : Bad project ID
'401' :
description : Unauthorized request
'403' :
description : Request is not allowed
'404' :
description : The requested object is not found
'500' :
description : Internal server error happened
put :
summary : Configure scanner for the specified project
description : Set one of the system configured scanner registration as the indepndent scanner of the specified project.
tags :
- project
operationId : setScannerOfProject
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- name : payload
in : body
required : true
schema :
$ref : '#/definitions/ProjectScanner'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
'/projects/{project_name_or_id}/scanner/candidates' :
get :
summary : Get scanner registration candidates for configurating project level scanner
description : Retrieve the system configured scanner registrations as candidates of setting project level scanner.
tags :
- project
operationId : listScannerCandidatesOfProject
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : A list of scanner registrations.
schema :
type : array
items :
$ref : '#/definitions/ScannerRegistration'
headers :
X-Total-Count :
description : The total count of available items
type : integer
Link :
description : Link to previous page and next page
type : string
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2020-03-04 03:45:17 +01:00
/audit-logs :
get :
summary : Get recent logs of the projects which the user is a member of
description : |
This endpoint let user see the recent operation logs of the projects which he is member of
tags :
- auditlog
operationId : listAuditLogs
parameters :
- $ref : '#/parameters/requestId'
2020-03-18 06:46:49 +01:00
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-03-04 03:45:17 +01:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of auditlogs
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/AuditLog'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'500' :
$ref : '#/responses/500'
2020-03-17 04:58:43 +01:00
/projects/{project_name}/logs:
get :
summary : Get recent logs of the projects
description : Get recent logs of the projects
tags :
- project
operationId : getLogs
parameters :
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-03-17 04:58:43 +01:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of auditlogs
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/AuditLog'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'500' :
$ref : '#/responses/500'
2020-06-26 19:06:47 +02:00
/p2p/preheat/providers :
get :
summary : List P2P providers
description : List P2P providers
tags :
- preheat
operationId : ListProviders
parameters :
- $ref : '#/parameters/requestId'
responses :
'200' :
description : Success
schema :
type : array
items :
$ref : '#/definitions/Metadata'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-07-08 17:58:20 +02:00
/p2p/preheat/instances/ping :
post :
summary : Ping status of a instance.
description : |
This endpoint checks status of a instance, the instance can be given by ID or Endpoint URL (together with credential)
operationId : PingInstances
parameters :
- $ref : '#/parameters/requestId'
- name : instance
in : body
description : The JSON object of instance.
required : true
schema :
$ref : '#/definitions/Instance'
tags :
- preheat
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
description : Instance not found (when instance is provided by ID).
'500' :
$ref : '#/responses/500'
2020-06-26 19:06:47 +02:00
/p2p/preheat/instances :
get :
summary : List P2P provider instances
description : List P2P provider instances
tags :
- preheat
operationId : ListInstances
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-06-26 19:06:47 +02:00
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of preheating provider instances
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/Instance'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
post :
summary : Create p2p provider instances
description : Create p2p provider instances
tags :
- preheat
operationId : CreateInstance
parameters :
- $ref : '#/parameters/requestId'
- name : instance
in : body
description : The JSON object of instance.
required : true
schema :
$ref : '#/definitions/Instance'
responses :
'201' :
2020-10-29 11:11:09 +01:00
$ref : '#/responses/201'
2020-06-26 19:06:47 +02:00
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
2020-07-07 15:07:56 +02:00
/p2p/preheat/instances/{preheat_instance_name}:
2020-06-26 19:06:47 +02:00
get :
summary : Get a P2P provider instance
description : Get a P2P provider instance
tags :
- preheat
operationId : GetInstance
parameters :
- $ref : '#/parameters/requestId'
2020-07-07 15:07:56 +02:00
- $ref : '#/parameters/instanceName'
2020-06-26 19:06:47 +02:00
responses :
'200' :
description : Success
schema :
$ref : '#/definitions/Instance'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete the specified P2P provider instance
description : Delete the specified P2P provider instance
tags :
- preheat
operationId : DeleteInstance
parameters :
- $ref : '#/parameters/requestId'
2020-07-07 15:07:56 +02:00
- $ref : '#/parameters/instanceName'
2020-06-26 19:06:47 +02:00
responses :
'200' :
2020-10-29 11:11:09 +01:00
$ref : '#/responses/200'
2020-06-26 19:06:47 +02:00
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Update the specified P2P provider instance
description : Update the specified P2P provider instance
tags :
- preheat
operationId : UpdateInstance
parameters :
- $ref : '#/parameters/requestId'
2020-07-07 15:07:56 +02:00
- $ref : '#/parameters/instanceName'
2020-07-17 06:54:25 +02:00
- name : instance
2020-06-26 19:06:47 +02:00
in : body
2020-07-17 06:54:25 +02:00
description : The instance to update
2020-06-26 19:06:47 +02:00
required : true
schema :
2020-07-17 06:54:25 +02:00
$ref : '#/definitions/Instance'
2020-06-26 19:06:47 +02:00
responses :
'200' :
2020-10-29 11:11:09 +01:00
$ref : '#/responses/200'
2020-06-26 19:06:47 +02:00
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-07-04 11:02:54 +02:00
/projects/{project_name}/preheat/policies:
post :
summary : Create a preheat policy under a project
description : Create a preheat policy under a project
tags :
- preheat
operationId : CreatePolicy
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- name : policy
in : body
description : The policy schema info
required : true
schema :
$ref : '#/definitions/PreheatPolicy'
responses :
'201' :
2020-07-07 12:25:23 +02:00
$ref : '#/responses/201'
2020-07-04 11:02:54 +02:00
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
get :
summary : List preheat policies
description : List preheat policies
tags :
- preheat
operationId : ListPolicies
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-07-04 11:02:54 +02:00
responses :
'200' :
description : List preheat policies success
headers :
X-Total-Count :
2020-08-07 08:06:35 +02:00
description : The total count of policies
2020-07-04 11:02:54 +02:00
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/PreheatPolicy'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/projects/{project_name}/preheat/policies/{preheat_policy_name}:
get :
summary : Get a preheat policy
description : Get a preheat policy
tags :
- preheat
operationId : GetPolicy
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/preheatPolicyName'
responses :
'200' :
description : Get a preheat policy success
schema :
$ref : '#/definitions/PreheatPolicy'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
put :
summary : Update preheat policy
description : Update preheat policy
tags :
- preheat
operationId : UpdatePolicy
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/preheatPolicyName'
- name : policy
in : body
description : The policy schema info
required : true
schema :
$ref : '#/definitions/PreheatPolicy'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
2020-07-08 17:58:20 +02:00
post :
summary : Manual preheat
description : Manual preheat
tags :
- preheat
operationId : ManualPreheat
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/preheatPolicyName'
- name : policy
in : body
description : The policy schema info
required : true
schema :
$ref : '#/definitions/PreheatPolicy'
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2020-07-04 11:02:54 +02:00
delete :
summary : Delete a preheat policy
description : Delete a preheat policy
tags :
- preheat
operationId : DeletePolicy
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/preheatPolicyName'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2020-07-12 09:53:08 +02:00
/projects/{project_name}/preheat/policies/{preheat_policy_name}/executions:
get :
summary : List executions for the given policy
description : List executions for the given policy
tags :
- preheat
operationId : ListExecutions
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/preheatPolicyName'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-07-12 09:53:08 +02:00
responses :
'200' :
description : List executions success
2020-08-06 10:59:38 +02:00
headers :
X-Total-Count :
2020-08-07 08:06:35 +02:00
description : The total count of executions
2020-08-06 10:59:38 +02:00
type : integer
Link :
description : Link refers to the previous page and next page
type : string
2020-07-12 09:53:08 +02:00
schema :
type : array
items :
$ref : '#/definitions/Execution'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id}:
get :
summary : Get a execution detail by id
description : Get a execution detail by id
tags :
- preheat
operationId : GetExecution
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/preheatPolicyName'
- $ref : '#/parameters/executionId'
responses :
'200' :
description : Get execution success
schema :
$ref : '#/definitions/Execution'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
patch :
summary : Stop a execution
description : Stop a execution
tags :
- preheat
operationId : StopExecution
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/preheatPolicyName'
- $ref : '#/parameters/executionId'
- name : execution
description : The data of execution
in : body
required : true
schema :
$ref : '#/definitions/Execution'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id}/tasks:
get :
summary : List all the related tasks for the given execution
description : List all the related tasks for the given execution
tags :
- preheat
operationId : ListTasks
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/preheatPolicyName'
- $ref : '#/parameters/executionId'
2020-08-06 10:59:38 +02:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-07-12 09:53:08 +02:00
responses :
'200' :
description : List tasks success
2020-08-06 10:59:38 +02:00
headers :
X-Total-Count :
2020-08-07 08:06:35 +02:00
description : The total count of tasks
2020-08-06 10:59:38 +02:00
type : integer
Link :
description : Link refers to the previous page and next page
type : string
2020-07-12 09:53:08 +02:00
schema :
type : array
items :
$ref : '#/definitions/Task'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id}/tasks/{task_id}/logs:
get :
summary : Get the log text stream of the specified task for the given execution
description : Get the log text stream of the specified task for the given execution
tags :
- preheat
2020-08-17 06:41:02 +02:00
operationId : GetPreheatLog
produces :
- text/plain
2020-07-12 09:53:08 +02:00
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
- $ref : '#/parameters/preheatPolicyName'
- $ref : '#/parameters/executionId'
- $ref : '#/parameters/taskId'
responses :
'200' :
description : Get log success
2020-08-03 03:45:18 +02:00
headers :
Content-Type :
description : Content type of response
type : string
2020-07-12 09:53:08 +02:00
schema :
type : string
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2020-07-13 15:53:50 +02:00
/projects/{project_name}/preheat/providers:
get :
summary : Get all providers at project level
description : Get all providers at project level
tags :
- preheat
operationId : ListProvidersUnderProject
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/projectName'
responses :
'200' :
description : Success
schema :
type : array
items :
$ref : '#/definitions/ProviderUnderProject'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-12-14 08:48:52 +01:00
/projects/{project_name_or_id}/robots:
2020-11-19 10:57:57 +01:00
get :
summary : Get all robot accounts of specified project
description : Get all robot accounts of specified project
parameters :
- $ref : '#/parameters/requestId'
2020-12-14 08:48:52 +01:00
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
2020-11-19 10:57:57 +01:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-11-19 10:57:57 +01:00
tags :
- robotv1
operationId : ListRobotV1
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of robot accounts
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/Robot'
'400' :
$ref : '#/responses/400'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
post :
summary : Create a robot account
description : Create a robot account
tags :
- robotv1
operationId : CreateRobotV1
parameters :
- $ref : '#/parameters/requestId'
2020-12-14 08:48:52 +01:00
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
2020-11-19 10:57:57 +01:00
- name : robot
in : body
description : The JSON object of a robot account.
required : true
schema :
$ref : '#/definitions/RobotCreateV1'
responses :
'201' :
description : Created
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
Location :
description : The location of the resource
type : string
schema :
$ref : '#/definitions/RobotCreated'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-12-14 08:48:52 +01:00
/projects/{project_name_or_id}/robots/{robot_id}:
2020-11-19 10:57:57 +01:00
get :
summary : Get a robot account
description : This endpoint returns specific robot account information by robot ID.
tags :
- robotv1
operationId : GetRobotByIDV1
parameters :
- $ref : '#/parameters/requestId'
2020-12-14 08:48:52 +01:00
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
2020-11-19 10:57:57 +01:00
- $ref : '#/parameters/robotId'
responses :
'200' :
description : Return matched robot information.
schema :
$ref : '#/definitions/Robot'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Update status of robot account.
description : Used to disable/enable a specified robot account.
tags :
- robotv1
operationId : UpdateRobotV1
parameters :
- $ref : '#/parameters/requestId'
2020-12-14 08:48:52 +01:00
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
2020-11-19 10:57:57 +01:00
- $ref : '#/parameters/robotId'
- name : robot
in : body
description : The JSON object of a robot account.
required : true
schema :
$ref : '#/definitions/Robot'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete a robot account
description : This endpoint deletes specific robot account information by robot ID.
tags :
- robotv1
operationId : DeleteRobotV1
parameters :
- $ref : '#/parameters/requestId'
2020-12-14 08:48:52 +01:00
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
2020-11-19 10:57:57 +01:00
- $ref : '#/parameters/robotId'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2021-03-08 10:10:12 +01:00
'/projects/{project_name_or_id}/immutabletagrules' :
get :
summary : List all immutable tag rules of current project
description : |
This endpoint returns the immutable tag rules of a project
tags :
- immutable
operationId : ListImmuRules
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2021-03-08 10:10:12 +01:00
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of immutable tag
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/ImmutableRule'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
post :
summary : Add an immutable tag rule to current project
description : |
This endpoint add an immutable tag rule to the project
tags :
- immutable
operationId : CreateImmuRule
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- name : ImmutableRule
in : body
required : true
schema :
$ref : '#/definitions/ImmutableRule'
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
'/projects/{project_name_or_id}/immutabletagrules/{immutable_rule_id}' :
put :
summary : Update the immutable tag rule or enable or disable the rule
tags :
- immutable
operationId : UpdateImmuRule
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/immutableRuleId'
- name : ImmutableRule
in : body
required : true
schema :
$ref : '#/definitions/ImmutableRule'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete the immutable tag rule.
tags :
- immutable
operationId : DeleteImmuRule
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/immutableRuleId'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2021-03-22 10:27:23 +01:00
'/projects/{project_name_or_id}/webhook/policies' :
get :
summary : List project webhook policies.
description : |
This endpoint returns webhook policies of a project.
tags :
- webhook
operationId : ListWebhookPoliciesOfProject
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/sort'
- $ref : '#/parameters/query'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of webhook policies.
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/WebhookPolicy'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
post :
summary : Create project webhook policy.
description : |
This endpoint create a webhook policy if the project does not have one.
tags :
- webhook
operationId : CreateWebhookPolicyOfProject
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- name : policy
in : body
description : Properties "targets" and "event_types" needed.
required : true
schema :
$ref : '#/definitions/WebhookPolicy'
responses :
'201' :
description : Project webhook policy create successfully.
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
Location :
description : The location of the resource
type : string
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
'/projects/{project_name_or_id}/webhook/policies/{webhook_policy_id}' :
get :
summary : Get project webhook policy
description : |
This endpoint returns specified webhook policy of a project.
tags :
- webhook
operationId : GetWebhookPolicyOfProject
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/webhookPolicyId'
responses :
'200' :
description : Get webhook policy successfully.
schema :
$ref : '#/definitions/WebhookPolicy'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Update webhook policy of a project.
description : |
This endpoint is aimed to update the webhook policy of a project.
tags :
- webhook
operationId : UpdateWebhookPolicyOfProject
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/webhookPolicyId'
- name : policy
in : body
description : All properties needed except "id", "project_id", "creation_time", "update_time".
required : true
schema :
$ref : '#/definitions/WebhookPolicy'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete webhook policy of a project
description : |
This endpoint is aimed to delete webhookpolicy of a project.
tags :
- webhook
operationId : DeleteWebhookPolicyOfProject
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/webhookPolicyId'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2023-03-03 03:17:47 +01:00
'/projects/{project_name_or_id}/webhook/policies/{webhook_policy_id}/executions' :
get :
summary : List executions for a specific webhook policy
description : |
This endpoint returns the executions of a specific webhook policy.
tags :
- webhook
operationId : ListExecutionsOfWebhookPolicy
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/webhookPolicyId'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
responses :
'200' :
description : List webhook executions success
headers :
X-Total-Count :
description : The total count of executions
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/Execution'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
'/projects/{project_name_or_id}/webhook/policies/{webhook_policy_id}/executions/{execution_id}/tasks' :
get :
summary : List tasks for a specific webhook execution
description : |
This endpoint returns the tasks of a specific webhook execution.
tags :
- webhook
operationId : ListTasksOfWebhookExecution
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/webhookPolicyId'
- $ref : '#/parameters/executionId'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
responses :
'200' :
description : List tasks of webhook executions success
headers :
X-Total-Count :
description : The total count of tasks
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/Task'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
'/projects/{project_name_or_id}/webhook/policies/{webhook_policy_id}/executions/{execution_id}/tasks/{task_id}/log' :
get :
summary : Get logs for a specific webhook task
description : |
This endpoint returns the logs of a specific webhook task.
tags :
- webhook
operationId : GetLogsOfWebhookTask
produces :
- text/plain
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/webhookPolicyId'
- $ref : '#/parameters/executionId'
- $ref : '#/parameters/taskId'
responses :
'200' :
description : Get log success
headers :
Content-Type :
description : Content type of response
type : string
schema :
type : string
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2021-03-22 10:27:23 +01:00
'/projects/{project_name_or_id}/webhook/lasttrigger' :
get :
2023-03-03 03:17:47 +01:00
deprecated : true
2021-03-22 10:27:23 +01:00
summary : Get project webhook policy last trigger info
description : |
This endpoint returns last trigger information of project webhook policy.
tags :
- webhook
operationId : LastTrigger
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
responses :
'200' :
description : Test webhook connection successfully.
schema :
type : array
items :
$ref : '#/definitions/WebhookLastTrigger'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
'/projects/{project_name_or_id}/webhook/jobs' :
get :
2023-03-03 03:17:47 +01:00
deprecated : true
2021-03-22 10:27:23 +01:00
summary : List project webhook jobs
description : |
This endpoint returns webhook jobs of a project.
tags :
- webhookjob
operationId : ListWebhookJobs
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- name : policy_id
in : query
type : integer
format : int64
required : true
description : The policy ID.
- name : status
in : query
description : The status of webhook job.
required : false
type : array
items :
type : string
responses :
'200' :
description : List project webhook jobs successfully.
headers :
X-Total-Count :
description : The total count of available items
type : integer
Link :
description : Link to previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/WebhookJob'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
'/projects/{project_name_or_id}/webhook/events' :
get :
summary : Get supported event types and notify types.
2023-03-03 03:17:47 +01:00
description : Get supported event types and notify types.
2021-03-22 10:27:23 +01:00
tags :
- webhook
operationId : GetSupportedEventTypes
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/isResourceName'
- $ref : '#/parameters/projectNameOrId'
responses :
'200' :
description : Success
schema :
$ref : '#/definitions/SupportedWebhookEventTypes'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2021-03-30 07:53:42 +02:00
/usergroups :
get :
summary : Get all user groups information
2022-02-24 07:22:32 +01:00
description : Get all user groups information, it is open for system admin
2021-03-30 07:53:42 +02:00
operationId : listUserGroups
tags :
- usergroup
parameters :
- $ref : '#/parameters/requestId'
2021-09-02 03:04:33 +02:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
2021-06-29 14:20:47 +02:00
- name : ldap_group_dn
in : query
type : string
required : false
description : search with ldap group DN
2022-02-24 07:22:32 +01:00
- name : group_name
in : query
type : string
required : false
description : group name need to search, fuzzy matches
2021-03-30 07:53:42 +02:00
responses :
'200' :
description : Get user group successfully.
schema :
type : array
items :
$ref : '#/definitions/UserGroup'
2021-09-02 03:04:33 +02:00
headers :
X-Total-Count :
description : The total count of available items
type : integer
Link :
description : Link to previous page and next page
2021-11-04 16:39:36 +01:00
type : string
2021-03-30 07:53:42 +02:00
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
post :
summary : Create user group
description : Create user group information
operationId : createUserGroup
tags :
- usergroup
parameters :
- $ref : '#/parameters/requestId'
- name : usergroup
in : body
schema :
$ref : '#/definitions/UserGroup'
responses :
'201' :
description : User group created successfully.
headers :
Location :
type : string
description : The URL of the created resource
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
2021-09-02 03:04:33 +02:00
/usergroups/search :
get :
summary : Search groups by groupname
description : |
This endpoint is to search groups by group name. It's open for all authenticated requests.
tags :
- usergroup
operationId : searchUserGroups
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- name : groupname
in : query
type : string
required : true
description : Group name for filtering results.
responses :
'200' :
description : Search groups successfully.
schema :
type : array
items :
$ref : '#/definitions/UserGroupSearchItem'
headers :
X-Total-Count :
description : The total count of available items
type : integer
Link :
description : Link to previous page and next page
type : string
'401' :
$ref : '#/responses/401'
'500' :
$ref : '#/responses/500'
2021-03-30 07:53:42 +02:00
'/usergroups/{group_id}' :
get :
summary : Get user group information
description : Get user group information
operationId : getUserGroup
tags :
- usergroup
parameters :
- $ref : '#/parameters/requestId'
- 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' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Update group information
description : Update user group information
operationId : updateUserGroup
tags :
- usergroup
parameters :
- $ref : '#/parameters/requestId'
- 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' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete user group
description : Delete user group
operationId : deleteUserGroup
tags :
- usergroup
parameters :
- $ref : '#/parameters/requestId'
- name : group_id
type : integer
in : path
required : true
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2020-08-05 10:14:36 +02:00
/icons/{digest}:
get :
summary : Get artifact icon
description : Get the artifact icon with the specified digest. As the original icon image is resized and encoded before returning, the parameter "digest" in the path doesn't match the hash of the returned content
tags :
- icon
operationId : getIcon
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/digest'
responses :
'200' :
description : Success
schema :
$ref : '#/definitions/Icon'
'400' :
$ref : '#/responses/400'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-11-19 10:57:57 +01:00
/robots :
get :
summary : Get robot account
description : List the robot accounts with the specified level and project.
tags :
- robot
operationId : ListRobot
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-11-19 10:57:57 +01:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of robot accounts
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/Robot'
'400' :
$ref : '#/responses/400'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
post :
summary : Create a robot account
description : Create a robot account
tags :
- robot
operationId : CreateRobot
parameters :
- $ref : '#/parameters/requestId'
- name : robot
in : body
description : The JSON object of a robot account.
required : true
schema :
$ref : '#/definitions/RobotCreate'
responses :
'201' :
description : Created
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
Location :
description : The location of the resource
type : string
schema :
$ref : '#/definitions/RobotCreated'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2021-02-25 09:19:55 +01:00
'/quotas' :
get :
summary : List quotas
description : List quotas
tags :
- quota
operationId : listQuotas
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- name : reference
in : query
description : The reference type of quota.
required : false
type : string
- name : reference_id
in : query
description : The reference id of quota.
required : false
type : string
- name : sort
in : query
type : string
required : false
description : |
Sort method, valid values include :
'hard.resource_name' , '-hard.resource_name' , 'used.resource_name' , '-used.resource_name' .
Here '-' stands for descending order, resource_name should be the real resource name of the quota.
responses :
'200' :
description : Successfully retrieved the quotas.
schema :
type : array
items :
$ref : '#/definitions/Quota'
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
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
'/quotas/{id}' :
get :
summary : Get the specified quota
description : Get the specified quota
tags :
- quota
operationId : getQuota
parameters :
- $ref : '#/parameters/requestId'
- name : id
in : path
type : integer
required : true
description : Quota ID
responses :
'200' :
description : Successfully retrieved the quota.
schema :
$ref : '#/definitions/Quota'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Update the specified quota
description : Update hard limits of the specified quota
tags :
- quota
operationId : updateQuota
parameters :
- $ref : '#/parameters/requestId'
- name : id
in : path
type : integer
required : true
description : Quota ID
- name : hard
in : body
required : true
description : The new hard limits for the quota
schema :
$ref : '#/definitions/QuotaUpdateReq'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-11-19 10:57:57 +01:00
/robots/{robot_id}:
get :
summary : Get a robot account
description : This endpoint returns specific robot account information by robot ID.
tags :
- robot
operationId : GetRobotByID
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/robotId'
responses :
'200' :
description : Return matched robot information.
schema :
$ref : '#/definitions/Robot'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Update a robot account
description : This endpoint updates specific robot account information by robot ID.
tags :
- robot
operationId : UpdateRobot
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/robotId'
- name : robot
in : body
description : The JSON object of a robot account.
required : true
schema :
2020-12-01 11:31:34 +01:00
$ref : '#/definitions/Robot'
2020-11-19 10:57:57 +01:00
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
2020-12-01 11:31:34 +01:00
patch :
summary : Refresh the robot secret
description : Refresh the robot secret
tags :
- robot
operationId : RefreshSec
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/robotId'
2020-12-03 11:13:06 +01:00
- name : robotSec
2020-12-01 11:31:34 +01:00
description : The JSON object of a robot account.
in : body
required : true
schema :
2020-12-03 11:13:06 +01:00
$ref : '#/definitions/RobotSec'
2020-12-01 11:31:34 +01:00
responses :
'200' :
description : Return refreshed robot sec.
schema :
$ref : '#/definitions/RobotSec'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2020-11-19 10:57:57 +01:00
delete :
summary : Delete a robot account
description : This endpoint deletes specific robot account information by robot ID.
tags :
- robot
operationId : DeleteRobot
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/robotId'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2021-03-03 04:45:33 +01:00
/replication/policies :
get :
summary : List replication policies
description : List replication policies
tags :
- replication
operationId : listReplicationPolicies
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-03-03 04:45:33 +01:00
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- name : name
in : query
type : string
required : false
description : Deprecated, use "query" instead. The policy name.
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of the resources
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/ReplicationPolicy'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
post :
summary : Create a replication policy
description : Create a replication policy
tags :
- replication
operationId : createReplicationPolicy
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-03-03 04:45:33 +01:00
- name : policy
in : body
description : The replication policy
required : true
schema :
$ref : '#/definitions/ReplicationPolicy'
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
/replication/policies/{id}:
get :
summary : Get the specific replication policy
description : Get the specific replication policy
tags :
- replication
operationId : getReplicationPolicy
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-03-03 04:45:33 +01:00
- name : id
in : path
type : integer
format : int64
required : true
description : Policy ID
responses :
'200' :
description : Success
schema :
$ref : '#/definitions/ReplicationPolicy'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete the specific replication policy
description : Delete the specific replication policy
tags :
- replication
operationId : deleteReplicationPolicy
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-03-03 04:45:33 +01:00
- name : id
in : path
type : integer
format : int64
required : true
description : Replication policy ID
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'412' :
$ref : '#/responses/412'
'500' :
$ref : '#/responses/500'
put :
summary : Update the replication policy
description : Update the replication policy
tags :
- replication
operationId : updateReplicationPolicy
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-03-03 04:45:33 +01:00
- name : id
in : path
type : integer
format : int64
required : true
description : The policy ID
- name : policy
in : body
description : The replication policy
required : true
schema :
$ref : '#/definitions/ReplicationPolicy'
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
2020-09-30 09:14:00 +02:00
/replication/executions :
get :
summary : List replication executions
description : List replication executions
tags :
- replication
operationId : listReplicationExecutions
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-09-30 09:14:00 +02:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- name : policy_id
in : query
type : integer
required : false
description : The ID of the policy that the executions belong to.
- name : status
in : query
type : string
required : false
description : The execution status.
- name : trigger
in : query
type : string
required : false
description : The trigger mode.
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of the resources
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/ReplicationExecution'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
post :
summary : Start one replication execution
description : Start one replication execution according to the policy
tags :
- replication
operationId : startReplication
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2020-09-30 09:14:00 +02:00
- name : execution
in : body
description : The ID of policy that the execution belongs to
required : true
schema :
$ref : '#/definitions/StartReplicationExecution'
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/replication/executions/{id}:
get :
summary : Get the specific replication execution
description : Get the replication execution specified by ID
tags :
- replication
operationId : getReplicationExecution
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2020-09-30 09:14:00 +02:00
- name : id
in : path
type : integer
format : int64
description : The ID of the execution.
required : true
responses :
'200' :
description : Success
schema :
$ref : '#/definitions/ReplicationExecution'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Stop the specific replication execution
description : Stop the replication execution specified by ID
tags :
- replication
operationId : stopReplication
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2020-09-30 09:14:00 +02:00
- name : id
in : path
type : integer
format : int64
description : The ID of the execution.
required : true
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
/replication/executions/{id}/tasks:
get :
summary : List replication tasks for a specific execution
description : List replication tasks for a specific execution
tags :
- replication
operationId : listReplicationTasks
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-09-30 09:14:00 +02:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- name : id
in : path
type : integer
format : int64
description : The ID of the execution that the tasks belongs to.
required : true
- name : status
in : query
type : string
required : false
description : The task status.
- name : resource_type
in : query
type : string
required : false
description : The resource type.
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of the resources
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/ReplicationTask'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/replication/executions/{id}/tasks/{task_id}/log:
get :
summary : Get the log of the specific replication task
description : Get the log of the specific replication task
tags :
- replication
operationId : getReplicationLog
2020-12-10 13:26:54 +01:00
produces :
- text/plain
2020-09-30 09:14:00 +02:00
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2020-09-30 09:14:00 +02:00
- name : id
in : path
type : integer
format : int64
description : The ID of the execution that the tasks belongs to.
required : true
- name : task_id
in : path
type : integer
format : int64
description : The ID of the task.
required : true
responses :
'200' :
description : Success
headers :
Content-Type :
description : The content type of response body
type : string
schema :
type : string
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2021-03-31 09:49:23 +02:00
/replication/adapters :
get :
summary : List registry adapters
description : List registry adapters
tags :
- registry
operationId : listRegistryProviderTypes
parameters :
- $ref : '#/parameters/requestId'
responses :
'200' :
description : Success.
schema :
type : array
items :
type : string
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/replication/adapterinfos :
get :
summary : List all registered registry provider information
description : List all registered registry provider information
tags :
- registry
operationId : listRegistryProviderInfos
parameters :
- $ref : '#/parameters/requestId'
responses :
'200' :
description : Success.
schema :
type : object
additionalProperties :
$ref : '#/definitions/RegistryProviderInfo'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/registries :
post :
summary : Create a registry
description : Create a registry
tags :
- registry
operationId : createRegistry
parameters :
- $ref : '#/parameters/requestId'
- name : registry
in : body
description : The registry
required : true
schema :
$ref : '#/definitions/Registry'
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
get :
summary : List the registries
description : List the registries
tags :
- registry
operationId : listRegistries
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- name : name
in : query
type : string
required : false
description : Deprecated, use `q` instead.
responses :
'200' :
description : Success
headers :
X-Total-Count :
description : The total count of the resources
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/Registry'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/registries/ping :
post :
summary : Check status of a registry
description : Check status of a registry
tags :
- registry
operationId : pingRegistry
parameters :
- $ref : '#/parameters/requestId'
- name : registry
in : body
description : The registry
required : true
schema :
$ref : '#/definitions/RegistryPing'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
/registries/{id}:
get :
summary : Get the specific registry
description : Get the specific registry
tags :
- registry
operationId : getRegistry
parameters :
- $ref : '#/parameters/requestId'
- name : id
in : path
type : integer
format : int64
required : true
description : Registry ID
responses :
'200' :
description : Success
schema :
$ref : '#/definitions/Registry'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete the specific registry
description : Delete the specific registry
tags :
- registry
operationId : deleteRegistry
parameters :
- $ref : '#/parameters/requestId'
- name : id
in : path
type : integer
format : int64
required : true
description : Registry ID
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'412' :
$ref : '#/responses/412'
'500' :
$ref : '#/responses/500'
put :
summary : Update the registry
description : Update the registry
tags :
- registry
operationId : updateRegistry
parameters :
- $ref : '#/parameters/requestId'
- name : id
in : path
type : integer
format : int64
required : true
description : The registry ID
- name : registry
in : body
description : The registry
required : true
schema :
$ref : '#/definitions/RegistryUpdate'
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
/registries/{id}/info:
get :
summary : Get the registry info
description : Get the registry info
tags :
- registry
operationId : getRegistryInfo
parameters :
- $ref : '#/parameters/requestId'
- name : id
in : path
type : integer
format : int64
required : true
description : Registry ID
responses :
'200' :
description : Success
schema :
$ref : '#/definitions/RegistryInfo'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-12-21 03:17:02 +01:00
/scans/all/metrics :
get :
summary : Get the metrics of the latest scan all process
description : Get the metrics of the latest scan all process
tags :
- scanAll
operationId : getLatestScanAllMetrics
2021-05-19 04:36:09 +02:00
parameters :
- $ref : '#/parameters/requestId'
2020-12-21 03:17:02 +01:00
responses :
'200' :
description : OK
schema :
$ref : '#/definitions/Stats'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'412' :
$ref : '#/responses/412'
'500' :
$ref : '#/responses/500'
/scans/schedule/metrics :
get :
summary : Get the metrics of the latest scheduled scan all process
description : Get the metrics of the latest scheduled scan all process
tags :
- scanAll
operationId : getLatestScheduledScanAllMetrics
deprecated : true
2021-05-19 04:36:09 +02:00
parameters :
- $ref : '#/parameters/requestId'
2020-12-21 03:17:02 +01:00
responses :
'200' :
description : OK
schema :
$ref : '#/definitions/Stats'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'412' :
$ref : '#/responses/412'
'500' :
$ref : '#/responses/500'
2020-11-30 07:15:18 +01:00
/systeminfo :
get :
summary : Get general system info
2021-04-27 06:35:00 +02:00
operationId : getSystemInfo
2020-11-30 07:15:18 +01:00
description : |
This API is for retrieving general system info, this can be called by anonymous request. Some attributes will be omitted in the response when this API is called by anonymous request.
tags :
- systeminfo
2021-05-19 04:36:09 +02:00
parameters :
- $ref : '#/parameters/requestId'
2020-11-30 07:15:18 +01:00
responses :
'200' :
description : Get general info successfully.
schema :
$ref : '#/definitions/GeneralInfo'
'500' :
$ref : '#/responses/500'
/systeminfo/volumes :
get :
summary : Get system volume info (total/free size).
2021-04-27 06:35:00 +02:00
operationId : getVolumes
2020-11-30 07:15:18 +01:00
description : |
This endpoint is for retrieving system volume info that only provides for admin user. Note that the response only reflects the storage status of local disk.
tags :
- systeminfo
2021-05-19 04:36:09 +02:00
parameters :
- $ref : '#/parameters/requestId'
2020-11-30 07:15:18 +01:00
responses :
'200' :
description : Get system volumes successfully.
schema :
$ref : '#/definitions/SystemInfo'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
/systeminfo/getcert :
get :
summary : Get default root certificate.
2021-04-27 06:35:00 +02:00
operationId : getCert
2020-11-30 07:15:18 +01:00
description : |
This endpoint is for downloading a default root certificate.
tags :
- systeminfo
produces :
- application/octet-stream
2021-05-19 04:36:09 +02:00
parameters :
- $ref : '#/parameters/requestId'
2020-11-30 07:15:18 +01:00
responses :
'200' :
description : Get default root certificate successfully.
schema :
type : file
headers :
Content-Disposition :
description : To set the filename of the downloaded file.
type : string
'404' :
description : Not found the default root certificate.
'500' :
$ref : '#/responses/500'
2021-03-04 04:47:09 +01:00
/system/oidc/ping :
post :
summary : Test the OIDC endpoint.
description : |
Test the OIDC endpoint, the setting of the endpoint is provided in the request. This API can only be called by system admin.
tags :
- oidc
operationId : pingOIDC
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-03-04 04:47:09 +01:00
- name : endpoint
in : body
description : Request body for OIDC endpoint to be tested.
required : true
schema :
type : object
properties :
url :
type : string
description : The URL of OIDC endpoint to be tested.
verify_cert :
type : boolean
description : Whether the certificate should be verified
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
2020-09-23 07:59:42 +02:00
/system/gc :
get :
summary : Get gc results.
description : This endpoint let user get gc execution history.
tags :
- gc
operationId : getGCHistory
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2020-09-23 07:59:42 +02:00
- $ref : '#/parameters/query'
2021-03-03 09:31:02 +01:00
- $ref : '#/parameters/sort'
2020-09-23 07:59:42 +02:00
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : Get gc results successfully.
headers :
X-Total-Count :
description : The total count of history
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/GCHistory'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/system/gc/{gc_id}:
get :
summary : Get gc status.
description : This endpoint let user get gc status filtered by specific ID.
operationId : getGC
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2020-09-23 07:59:42 +02:00
- $ref : '#/parameters/gcId'
tags :
- gc
responses :
'200' :
description : Get gc results successfully.
schema :
$ref : '#/definitions/GCHistory'
'401' :
$ref : '#/responses/401'
'403' :
2022-06-17 14:03:24 +02:00
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Stop the specific GC execution
description : Stop the GC execution specified by ID
tags :
- gc
operationId : stopGC
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/gcId'
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
2020-09-23 07:59:42 +02:00
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
/system/gc/{gc_id}/log:
get :
summary : Get gc job log.
description : This endpoint let user get gc job logs filtered by specific ID.
operationId : getGCLog
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2020-09-23 07:59:42 +02:00
- $ref : '#/parameters/gcId'
tags :
- gc
2020-09-23 10:18:11 +02:00
produces :
- text/plain
2020-09-23 07:59:42 +02:00
responses :
'200' :
description : Get successfully.
schema :
type : string
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
/system/gc/schedule :
get :
summary : Get gc's schedule.
description : This endpoint is for get schedule of gc job.
2020-09-23 10:18:11 +02:00
operationId : getGCSchedule
2020-09-23 07:59:42 +02:00
tags :
- gc
2021-05-19 04:36:09 +02:00
parameters :
- $ref : '#/parameters/requestId'
2020-09-23 07:59:42 +02:00
responses :
'200' :
description : Get gc's schedule.
schema :
$ref : '#/definitions/GCHistory'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
post :
summary : Create a gc schedule.
description : |
This endpoint is for update gc schedule.
2020-09-23 10:18:11 +02:00
operationId : createGCSchedule
2020-09-23 07:59:42 +02:00
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2020-09-23 07:59:42 +02:00
- name : schedule
in : body
required : true
schema :
$ref : '#/definitions/Schedule'
description : Updates of gc's schedule.
tags :
- gc
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
put :
summary : Update gc's schedule.
description : |
This endpoint is for update gc schedule.
2020-09-23 10:18:11 +02:00
operationId : updateGCSchedule
2020-09-23 07:59:42 +02:00
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2020-09-23 07:59:42 +02:00
- name : schedule
in : body
required : true
schema :
$ref : '#/definitions/Schedule'
description : Updates of gc's schedule.
tags :
- gc
responses :
'200' :
description : Updated gc's schedule successfully.
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2022-03-21 08:49:42 +01:00
/system/purgeaudit :
get :
summary : Get purge job results.
description : get purge job execution history.
tags :
- purge
operationId : getPurgeHistory
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : Get purge job results successfully.
headers :
X-Total-Count :
description : The total count of history
type : integer
Link :
description : Link refers to the previous page and next page
type : string
schema :
type : array
items :
$ref : '#/definitions/ExecHistory'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/system/purgeaudit/{purge_id}:
get :
summary : Get purge job status.
description : This endpoint let user get purge job status filtered by specific ID.
operationId : getPurgeJob
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/purgeId'
tags :
- purge
responses :
'200' :
description : Get purge job results successfully.
schema :
$ref : '#/definitions/ExecHistory'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2022-06-28 05:15:11 +02:00
put :
summary : Stop the specific purge audit log execution
description : Stop the purge audit log execution specified by ID
tags :
- purge
operationId : stopPurge
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/purgeId'
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
2023-02-08 18:11:08 +01:00
$ref : '#/responses/500'
2022-03-21 08:49:42 +01:00
/system/purgeaudit/{purge_id}/log:
get :
summary : Get purge job log.
description : This endpoint let user get purge job logs filtered by specific ID.
operationId : getPurgeJobLog
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/purgeId'
tags :
- purge
produces :
- text/plain
responses :
'200' :
description : Get successfully.
schema :
type : string
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
/system/purgeaudit/schedule :
get :
summary : Get purge's schedule.
description : This endpoint is for get schedule of purge job.
operationId : getPurgeSchedule
tags :
- purge
parameters :
- $ref : '#/parameters/requestId'
responses :
'200' :
description : Get purge job's schedule.
schema :
$ref : '#/definitions/ExecHistory'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
post :
summary : Create a purge job schedule.
description : |
This endpoint is for update purge job schedule.
operationId : createPurgeSchedule
parameters :
- $ref : '#/parameters/requestId'
- name : schedule
in : body
required : true
schema :
$ref : '#/definitions/Schedule'
description : |
2023-05-09 04:54:41 +02:00
The purge job's schedule, it is a json object. |
The sample format is |
{"parameters" : {"audit_retention_hour" : 168 , "dry_run" : true , "include_operations" : "create,delete,pull" }, "schedule" : {"type" : "Hourly" , "cron" : "0 0 * * * *" }} |
2022-03-21 08:49:42 +01:00
the include_operation should be a comma separated string, e.g. create,delete,pull, if it is empty, no operation will be purged.
tags :
- purge
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
put :
summary : Update purge job's schedule.
description : |
This endpoint is for update purge job schedule.
operationId : updatePurgeSchedule
parameters :
- $ref : '#/parameters/requestId'
- name : schedule
in : body
required : true
schema :
$ref : '#/definitions/Schedule'
description : |
2023-05-09 04:54:41 +02:00
The purge job's schedule, it is a json object. |
The sample format is |
{"parameters" : {"audit_retention_hour" : 168 , "dry_run" : true , "include_operations" : "create,delete,pull" }, "schedule" : {"type" : "Hourly" , "cron" : "0 0 * * * *" }} |
2022-03-21 08:49:42 +01:00
the include_operation should be a comma separated string, e.g. create,delete,pull, if it is empty, no operation will be purged.
tags :
- purge
responses :
'200' :
description : Updated purge's schedule successfully.
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2021-03-12 03:23:48 +01:00
/system/CVEAllowlist :
get :
summary : Get the system level allowlist of CVE.
description : Get the system level allowlist of CVE. This API can be called by all authenticated users.
operationId : getSystemCVEAllowlist
tags :
- SystemCVEAllowlist
2021-05-19 04:36:09 +02:00
parameters :
- $ref : '#/parameters/requestId'
2021-03-12 03:23:48 +01:00
responses :
'200' :
description : Successfully retrieved the CVE allowlist.
schema :
$ref : "#/definitions/CVEAllowlist"
'401' :
$ref : '#/responses/401'
'500' :
$ref : '#/responses/500'
put :
summary : Update the system level allowlist of CVE.
description : This API overwrites the system level allowlist of CVE with the list in request body. Only system Admin
has permission to call this API.
operationId : putSystemCVEAllowlist
tags :
- SystemCVEAllowlist
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-03-12 03:23:48 +01:00
- in : body
name : allowlist
description : The allowlist with new content
schema :
$ref : "#/definitions/CVEAllowlist"
responses :
'200' :
description : Successfully updated the CVE allowlist.
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2020-12-21 03:17:02 +01:00
/system/scanAll/schedule :
get :
summary : Get scan all's schedule.
description : This endpoint is for getting a schedule for the scan all job, which scans all of images in Harbor.
tags :
- scanAll
operationId : getScanAllSchedule
2021-05-19 04:36:09 +02:00
parameters :
- $ref : '#/parameters/requestId'
2020-12-21 03:17:02 +01:00
responses :
'200' :
description : Get a schedule for the scan all job, which scans all of images in Harbor.
schema :
$ref : '#/definitions/Schedule'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'412' :
$ref : '#/responses/412'
'500' :
$ref : '#/responses/500'
put :
summary : Update scan all's schedule.
description : This endpoint is for updating the schedule of scan all job, which scans all of images in Harbor.
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2020-12-21 03:17:02 +01:00
- name : schedule
in : body
required : true
schema :
$ref : '#/definitions/Schedule'
description : Updates the schedule of scan all job, which scans all of images in Harbor.
tags :
- scanAll
operationId : updateScanAllSchedule
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'412' :
$ref : '#/responses/412'
'500' :
$ref : '#/responses/500'
post :
summary : Create a schedule or a manual trigger for the scan all job.
description : This endpoint is for creating a schedule or a manual trigger for the scan all job, which scans all of images in Harbor.
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2020-12-21 03:17:02 +01:00
- name : schedule
in : body
required : true
schema :
$ref : '#/definitions/Schedule'
description : Create a schedule or a manual trigger for the scan all job.
tags :
- scanAll
operationId : createScanAllSchedule
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'409' :
$ref : '#/responses/409'
'412' :
$ref : '#/responses/412'
'500' :
$ref : '#/responses/500'
2021-08-15 11:21:39 +02:00
/system/scanAll/stop :
post :
summary : Stop scanAll job execution
description : Stop scanAll job execution
parameters :
- $ref : '#/parameters/requestId'
tags :
- scanAll
operationId : stopScanAll
responses :
'202' :
$ref : '#/responses/202'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2022-11-03 03:47:40 +01:00
/jobservice/pools :
get :
operationId : getWorkerPools
summary : Get worker pools
description : Get worker pools
tags :
- jobservice
parameters :
- $ref : '#/parameters/requestId'
responses :
'200' :
description : Get worker pools successfully.
schema :
type : array
items :
$ref : '#/definitions/WorkerPool'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/jobservice/pools/{pool_id}/workers:
get :
operationId : getWorkers
summary : Get workers
description : Get workers in current pool
tags :
- jobservice
parameters :
- $ref : '#/parameters/requestId'
- name : pool_id
in : path
required : true
type : string
description : The name of the pool. 'all' stands for all pools
responses :
'200' :
description : Get workers successfully.
schema :
type : array
items :
$ref : '#/definitions/Worker'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
/jobservice/jobs/{job_id}:
put :
operationId : stopRunningJob
summary : Stop running job
description : Stop running job
tags :
- jobservice
parameters :
- $ref : '#/parameters/requestId'
- name : job_id
in : path
required : true
type : string
description : The id of the job.
responses :
'200' :
description : Stop worker successfully.
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2023-03-06 06:19:10 +01:00
/jobservice/jobs/{job_id}/log:
get :
operationId : actionGetJobLog
summary : Get job log by job id
description : Get job log by job id, it is only used by administrator
produces :
2024-01-15 06:25:56 +01:00
- text/plain
2023-03-06 06:19:10 +01:00
tags :
- jobservice
parameters :
- $ref : '#/parameters/requestId'
- name : job_id
in : path
required : true
type : string
description : The id of the job.
responses :
'200' :
description : Get job log successfully.
headers :
Content-Type :
description : The content type of response body
type : string
schema :
type : string
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2022-11-17 13:12:07 +01:00
/jobservice/queues :
get :
operationId : listJobQueues
summary : list job queues
description : list job queue
tags :
- jobservice
parameters :
- $ref : '#/parameters/requestId'
responses :
'200' :
description : List job queue successfully.
schema :
type : array
items :
$ref : '#/definitions/JobQueue'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
/jobservice/queues/{job_type}:
put :
operationId : actionPendingJobs
summary : stop and clean, pause, resume pending jobs in the queue
description : stop and clean, pause, resume pending jobs in the queue
tags :
- jobservice
parameters :
- $ref : '#/parameters/requestId'
- name : job_type
in : path
required : true
type : string
description : The type of the job. 'all' stands for all job types
- name : action_request
in : body
required : true
schema :
$ref : '#/definitions/ActionRequest'
responses :
'200' :
description : take action to the jobs in the queue successfully.
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
2024-04-24 03:57:46 +02:00
'422' :
$ref : '#/responses/422'
2022-11-17 13:12:07 +01:00
'500' :
$ref : '#/responses/500'
/schedules :
get :
operationId : listSchedules
description : List schedules
tags :
- schedule
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : list schedule successfully.
schema :
type : array
items :
type : object
$ref : '#/definitions/ScheduleTask'
headers :
X-Total-Count :
description : The total count of available items
type : integer
Link :
description : Link to previous page and next page
type : string
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
/schedules/{job_type}/paused:
get :
operationId : getSchedulePaused
description : Get scheduler paused status
tags :
- schedule
parameters :
- $ref : '#/parameters/requestId'
- name : job_type
in : path
required : true
type : string
description : The type of the job. 'all' stands for all job types, current only support query with all
responses :
'200' :
description : Get scheduler status successfully.
schema :
$ref : '#/definitions/SchedulerStatus'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2020-11-30 07:15:18 +01:00
/ping :
get :
2021-05-19 04:36:09 +02:00
operationId : getPing
2023-02-23 12:57:50 +01:00
summary : Ping Harbor to check if the API server is alive.
description : This API simply replies a pong to indicate the process to handle API is up, disregarding the health status of dependent components. This path does not require any authentication.
2020-11-30 07:15:18 +01:00
tags :
- ping
produces :
- text/plain
2021-05-19 04:36:09 +02:00
parameters :
- $ref : '#/parameters/requestId'
2020-11-30 07:15:18 +01:00
responses :
'200' :
description : The API server is alive
schema :
type : string
2021-01-08 01:09:34 +01:00
/retentions/metadatas :
get :
summary : Get Retention Metadatas
description : Get Retention Metadatas.
operationId : getRentenitionMetadata
tags :
- Retention
2021-05-14 08:15:42 +02:00
parameters :
- $ref : '#/parameters/requestId'
2021-01-08 01:09:34 +01:00
responses :
'200' :
description : Get Retention Metadatas successfully.
schema :
$ref : '#/definitions/RetentionMetadata'
/retentions :
post :
summary : Create Retention Policy
operationId : createRetention
description : >-
Create Retention Policy, you can reference metadatas API for the policy model.
You can check project metadatas to find whether a retention policy is already binded.
This method should only be called when no retention policy binded to project yet.
tags :
- Retention
parameters :
2021-05-14 08:15:42 +02:00
- $ref : '#/parameters/requestId'
2021-01-08 01:09:34 +01:00
- name : policy
in : body
description : Create Retention Policy successfully.
required : true
schema :
$ref : '#/definitions/RetentionPolicy'
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/retentions/{id}:
get :
summary : Get Retention Policy
operationId : getRetention
description : Get Retention Policy.
tags :
- Retention
parameters :
2021-05-14 08:15:42 +02:00
- $ref : '#/parameters/requestId'
2021-01-08 01:09:34 +01:00
- name : id
in : path
type : integer
format : int64
required : true
description : Retention ID.
responses :
'200' :
description : Get Retention Policy successfully.
schema :
$ref : '#/definitions/RetentionPolicy'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
put :
summary : Update Retention Policy
operationId : updateRetention
description : >-
Update Retention Policy, you can reference metadatas API for the policy model.
You can check project metadatas to find whether a retention policy is already binded.
This method should only be called when retention policy has already binded to project.
tags :
- Retention
parameters :
2021-05-14 08:15:42 +02:00
- $ref : '#/parameters/requestId'
2021-01-08 01:09:34 +01:00
- name : id
in : path
type : integer
format : int64
required : true
description : Retention ID.
- name : policy
in : body
required : true
schema :
$ref : '#/definitions/RetentionPolicy'
responses :
'200' :
description : Update Retention Policy successfully.
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2021-05-14 08:15:42 +02:00
delete :
summary : Delete Retention Policy
operationId : deleteRetention
description : >-
Delete Retention Policy, you can reference metadatas API for the policy model.
You can check project metadatas to find whether a retention policy is already binded.
This method should only be called when retention policy has already binded to project.
tags :
- Retention
parameters :
- $ref : '#/parameters/requestId'
- name : id
in : path
type : integer
format : int64
required : true
description : Retention ID.
responses :
'200' :
description : Update Retention Policy successfully.
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2021-01-08 01:09:34 +01:00
/retentions/{id}/executions:
post :
2021-01-08 12:05:42 +01:00
summary : Trigger a Retention Execution
operationId : triggerRetentionExecution
description : Trigger a Retention Execution, if dry_run is True, nothing would be deleted actually.
2021-01-08 01:09:34 +01:00
tags :
- Retention
produces :
- text/plain
parameters :
2021-05-14 08:15:42 +02:00
- $ref : '#/parameters/requestId'
2021-01-08 01:09:34 +01:00
- name : id
in : path
type : integer
format : int64
required : true
description : Retention ID.
- name : body
in : body
required : true
schema :
type : object
properties :
dry_run :
type : boolean
responses :
'200' :
description : Trigger a Retention job successfully.
'201' :
2021-01-08 12:05:42 +01:00
$ref : '#/responses/201'
2021-01-08 01:09:34 +01:00
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
get :
2021-01-08 12:05:42 +01:00
summary : Get Retention executions
operationId : listRetentionExecutions
description : Get Retention executions, execution status may be delayed before job service schedule it up.
2021-01-08 01:09:34 +01:00
tags :
- Retention
parameters :
2021-05-14 08:15:42 +02:00
- $ref : '#/parameters/requestId'
2021-01-08 01:09:34 +01:00
- name : id
in : path
type : integer
format : int64
required : true
description : Retention ID.
- name : page
in : query
type : integer
format : int64
required : false
description : The page number.
- name : page_size
in : query
type : integer
format : int64
required : false
description : The size of per page.
responses :
'200' :
2021-01-08 12:05:42 +01:00
description : Get a Retention execution successfully.
2021-01-08 01:09:34 +01:00
schema :
type : array
items :
type : object
$ref : '#/definitions/RetentionExecution'
headers :
X-Total-Count :
description : The total count of available items
type : integer
Link :
description : Link to previous page and next page
type : string
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/retentions/{id}/executions/{eid}:
patch :
2021-01-08 12:05:42 +01:00
summary : Stop a Retention execution
operationId : operateRetentionExecution
description : Stop a Retention execution, only support "stop" action now.
2021-01-08 01:09:34 +01:00
tags :
- Retention
parameters :
2021-05-14 08:15:42 +02:00
- $ref : '#/parameters/requestId'
2021-01-08 01:09:34 +01:00
- name : id
in : path
type : integer
format : int64
required : true
description : Retention ID.
- name : eid
in : path
type : integer
format : int64
required : true
description : Retention execution ID.
- name : body
in : body
description : The action, only support "stop" now.
required : true
schema :
type : object
properties :
action :
type : string
responses :
'200' :
description : Stop a Retention job successfully.
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/retentions/{id}/executions/{eid}/tasks:
get :
2021-01-08 12:05:42 +01:00
summary : Get Retention tasks
2021-01-08 01:09:34 +01:00
operationId : listRetentionTasks
2021-01-08 12:05:42 +01:00
description : Get Retention tasks, each repository as a task.
2021-01-08 01:09:34 +01:00
tags :
- Retention
parameters :
2021-05-14 08:15:42 +02:00
- $ref : '#/parameters/requestId'
2021-01-08 01:09:34 +01:00
- name : id
in : path
type : integer
format : int64
required : true
description : Retention ID.
- name : eid
in : path
type : integer
format : int64
required : true
description : Retention execution ID.
- name : page
in : query
type : integer
format : int64
required : false
description : The page number.
- name : page_size
in : query
type : integer
format : int64
required : false
description : The size of per page.
responses :
'200' :
description : Get Retention job tasks successfully.
schema :
type : array
items :
type : object
$ref : '#/definitions/RetentionExecutionTask'
headers :
X-Total-Count :
description : The total count of available items
type : integer
Link :
description : Link to previous page and next page
type : string
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
/retentions/{id}/executions/{eid}/tasks/{tid}:
get :
summary : Get Retention job task log
operationId : getRetentionTaskLog
description : Get Retention job task log, tags ratain or deletion detail will be shown in a table.
tags :
- Retention
produces :
- text/plain
parameters :
2021-05-14 08:15:42 +02:00
- $ref : '#/parameters/requestId'
2021-01-08 01:09:34 +01:00
- name : id
in : path
type : integer
format : int64
required : true
description : Retention ID.
- name : eid
in : path
type : integer
format : int64
required : true
description : Retention execution ID.
- name : tid
in : path
type : integer
format : int64
required : true
description : Retention execution ID.
responses :
'200' :
description : Get Retention job task log successfully.
schema :
type : string
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2021-03-03 05:23:36 +01:00
'/scanners' :
get :
summary : List scanner registrations
description : |
Returns a list of currently configured scanner registrations.
tags :
- scanner
operationId : listScanners
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : A list of scanner registrations.
schema :
type : array
items :
$ref : '#/definitions/ScannerRegistration'
headers :
X-Total-Count :
description : The total count of available items
type : integer
Link :
description : Link to previous page and next page
type : string
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
post :
summary : Create a scanner registration
description : |
Creats a new scanner registration with the given data.
tags :
- scanner
operationId : createScanner
parameters :
- $ref : '#/parameters/requestId'
- name : registration
in : body
description : A scanner registration to be created.
required : true
schema :
$ref : '#/definitions/ScannerRegistrationReq'
responses :
'201' :
description : Created successfully
headers :
Location :
type : string
description : The URL of the created resource
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
'/scanners/ping' :
post :
summary : Tests scanner registration settings
description : |
Pings scanner adapter to test endpoint URL and authorization settings.
tags :
- scanner
operationId : pingScanner
parameters :
- $ref : '#/parameters/requestId'
- name : settings
in : body
description : A scanner registration settings to be tested.
required : true
schema :
$ref : '#/definitions/ScannerRegistrationSettings'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
'/scanners/{registration_id}' :
get :
summary : Get a scanner registration details
description : |
Retruns the details of the specified scanner registration.
tags :
- scanner
operationId : getScanner
parameters :
- $ref : '#/parameters/requestId'
- name : registration_id
in : path
description : The scanner registration identifer.
required : true
type : string
responses :
'200' :
description : The details of the scanner registration.
schema :
$ref : '#/definitions/ScannerRegistration'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Update a scanner registration
description : |
Updates the specified scanner registration.
tags :
- scanner
operationId : updateScanner
parameters :
- $ref : '#/parameters/requestId'
- name : registration_id
in : path
description : The scanner registration identifier.
required : true
type : string
- name : registration
in : body
required : true
description : A scanner registraiton to be updated.
schema :
$ref : '#/definitions/ScannerRegistrationReq'
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete a scanner registration
description : |
Deletes the specified scanner registration.
tags :
- scanner
operationId : deleteScanner
parameters :
- $ref : '#/parameters/requestId'
- name : registration_id
in : path
description : The scanner registration identifier.
required : true
type : string
responses :
'200' :
description : Deleted successfully and return the deleted registration
schema :
$ref : '#/definitions/ScannerRegistration'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
patch :
summary : Set system default scanner registration
description : |
Set the specified scanner registration as the system default one.
tags :
- scanner
operationId : setScannerAsDefault
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-03-03 05:23:36 +01:00
- name : registration_id
in : path
description : The scanner registration identifier.
required : true
type : string
- name : payload
in : body
required : true
schema :
$ref : '#/definitions/IsDefault'
responses :
'200' :
description : Successfully set the specified scanner registration as system default
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
'/scanners/{registration_id}/metadata' :
get :
summary : Get the metadata of the specified scanner registration
description : |
Get the metadata of the specified scanner registration, including the capabilities and customized properties.
tags :
- scanner
operationId : getScannerMetadata
parameters :
- $ref : '#/parameters/requestId'
- name : registration_id
in : path
required : true
description : The scanner registration identifier.
type : string
responses :
'200' :
description : The metadata of the specified scanner adapter
schema :
$ref : '#/definitions/ScannerAdapterMetadata'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
2021-04-09 13:40:29 +02:00
/users :
get :
summary : List users
tags :
2021-04-15 04:52:48 +02:00
- user
2021-04-09 13:40:29 +02:00
operationId : listUsers
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
responses :
'200' :
description : return the list of users.
schema :
type : array
items :
$ref : '#/definitions/UserResp'
headers :
X-Total-Count :
description : The total count of users
type : integer
Link :
description : Link to previous page and next page
type : string
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'500' :
$ref : '#/responses/500'
post :
summary : Create a local user.
description : This API can be used only when the authentication mode is for local DB. When self registration is disabled.
tags :
2021-04-15 04:52:48 +02:00
- user
2021-04-09 13:40:29 +02:00
operationId : createUser
parameters :
- $ref : '#/parameters/requestId'
- name : userReq
in : body
description : The new user
required : true
schema :
$ref : '#/definitions/UserCreationReq'
responses :
'201' :
$ref : '#/responses/201'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
description : When the self registration is disabled, non-admin does not have permission to create user. When self registration is enabled, this API can only be called from UI portal, calling it via script will get a 403 error.
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
/users/current :
get :
summary : Get current user info.
tags :
2021-04-15 04:52:48 +02:00
- user
2021-04-09 13:40:29 +02:00
operationId : getCurrentUserInfo
parameters :
- $ref : '#/parameters/requestId'
responses :
'200' :
description : Get current user information successfully.
schema :
$ref : '#/definitions/UserResp'
'401' :
$ref : '#/responses/401'
'500' :
$ref : '#/responses/500'
/users/search :
get :
summary : Search users by username
description : |
This endpoint is to search the users by username. It's open for all authenticated requests.
tags :
2021-04-15 04:52:48 +02:00
- user
2021-04-09 13:40:29 +02:00
operationId : searchUsers
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- name : username
in : query
type : string
required : true
description : Username for filtering results.
responses :
'200' :
description : Search users by username successfully.
schema :
type : array
items :
$ref : '#/definitions/UserSearchRespItem'
headers :
X-Total-Count :
description : The total count of available items
type : integer
Link :
description : Link to previous page and next page
type : string
'401' :
$ref : '#/responses/401'
'500' :
$ref : '#/responses/500'
'/users/{user_id}' :
get :
summary : Get a user's profile.
parameters :
- $ref : '#/parameters/requestId'
- name : user_id
in : path
type : integer
format : int
required : true
tags :
2021-04-15 04:52:48 +02:00
- user
2021-04-09 13:40:29 +02:00
operationId : getUser
responses :
'200' :
description : Get user's info successfully.
schema :
$ref : '#/definitions/UserResp'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Update user's profile.
parameters :
- $ref : '#/parameters/requestId'
- name : user_id
in : path
type : integer
format : int
required : true
description : Registered user ID
- name : profile
in : body
description : 'Only email, realname and comment can be modified.'
required : true
schema :
$ref : '#/definitions/UserProfile'
tags :
2021-04-15 04:52:48 +02:00
- user
2021-04-09 13:40:29 +02:00
operationId : updateUserProfile
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
delete :
summary : Mark a registered user as be removed.
description : |
This endpoint let administrator of Harbor mark a registered user as removed.It actually won't be deleted from DB.
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-04-09 13:40:29 +02:00
- name : user_id
in : path
type : integer
format : int
required : true
description : User ID for marking as to be removed.
tags :
2021-04-15 04:52:48 +02:00
- user
2021-04-09 13:40:29 +02:00
operationId : deleteUser
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
/users/{user_id}/sysadmin:
put :
summary : Update a registered user to change to be an administrator of Harbor.
tags :
2021-04-15 04:52:48 +02:00
- user
2021-04-09 13:40:29 +02:00
operationId : setUserSysAdmin
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-04-09 13:40:29 +02:00
- name : user_id
in : path
type : integer
format : int
required : true
- name : sysadmin_flag
in : body
description : Toggle a user to admin or not.
required : true
schema :
$ref : '#/definitions/UserSysAdminFlag'
responses :
'200' :
$ref : '#/responses/200'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
description : Unexpected internal errors.
'/users/{user_id}/password' :
put :
summary : Change the password on a user that already exists.
description : |
This endpoint is for user to update password. Users with the admin role can change any user's password. Regular users can change only their own password.
tags :
2021-04-15 04:52:48 +02:00
- user
2021-04-09 13:40:29 +02:00
operationId : updateUserPassword
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-04-09 13:40:29 +02:00
- name : user_id
in : path
type : integer
format : int
required : true
- name : password
in : body
description : Password to be updated, the attribute 'old_password' is optional when the API is called by the system administrator.
required : true
schema :
$ref : '#/definitions/PasswordReq'
responses :
'200' :
$ref : '#/responses/200'
'400' :
description : Invalid user ID; Password does not meet requirement
'401' :
$ref : '#/responses/401'
'403' :
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.
'500' :
$ref : '#/responses/500'
/users/current/permissions :
get :
summary : Get current user permissions.
tags :
2021-04-15 04:52:48 +02:00
- user
2021-04-09 13:40:29 +02:00
operationId : getCurrentUserPermissions
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-04-09 13:40:29 +02:00
- name : scope
in : query
type : string
required : false
description : The scope for the permission
- 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'.
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.
'/users/{user_id}/cli_secret' :
put :
summary : Set CLI secret for a user.
description : >-
This endpoint let user generate a new CLI secret for himself. This API only works when auth mode is set to 'OIDC'.
Once this API returns with successful status, the old secret will be invalid, as there will be only one CLI secret
for a user.
tags :
2021-04-15 04:52:48 +02:00
- user
2021-04-09 13:40:29 +02:00
operationId : setCliSecret
parameters :
- $ref : '#/parameters/requestId'
- name : user_id
in : path
type : integer
format : int
required : true
description : User ID
- name : secret
in : body
required : true
schema :
$ref : '#/definitions/OIDCCliSecretReq'
responses :
'200' :
description : The secret is successfully updated
'400' :
description : Invalid user ID. Or user is not onboarded via OIDC authentication. Or the secret does not meet the standard.
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'412' :
description : The auth mode of the system is not "oidc_auth", or the user is not onboarded via OIDC AuthN.
'500' :
$ref : '#/responses/500'
2021-04-15 11:27:58 +02:00
/labels :
get :
summary : List labels according to the query strings.
description : |
This endpoint let user list labels by name, scope and project_id
tags :
- label
operationId : ListLabels
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/query'
- $ref : '#/parameters/sort'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- name : name
in : query
type : string
required : false
description : The label name.
- name : scope
in : query
type : string
required : false
description : The label scope. Valid values are g and p. g for global labels and p for project labels.
- name : project_id
in : query
type : integer
format : int64
required : false
description : Relevant project ID, required when scope is p.
responses :
'200' :
description : Get successfully.
schema :
type : array
items :
$ref : '#/definitions/Label'
headers :
X-Total-Count :
description : The total count of available items
type : integer
Link :
description : Link to previous page and next page
type : string
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'500' :
$ref : '#/responses/500'
post :
summary : Post creates a label
description : |
This endpoint let user creates a label.
tags :
- label
operationId : CreateLabel
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-04-15 11:27:58 +02:00
- name : label
in : body
description : The json object of label.
required : true
schema :
$ref : '#/definitions/Label'
responses :
'201' :
description : Create successfully.
headers :
Location :
type : string
description : The URL of the created resource
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'409' :
$ref : '#/responses/409'
'415' :
$ref : '#/responses/415'
'500' :
$ref : '#/responses/500'
'/labels/{label_id}' :
get :
summary : Get the label specified by ID.
description : |
This endpoint let user get the label by specific ID.
tags :
- label
operationId : GetLabelByID
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-04-15 11:27:58 +02:00
- $ref : '#/parameters/labelId'
responses :
'200' :
description : Get successfully.
schema :
$ref : '#/definitions/Label'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
put :
summary : Update the label properties.
description : |
This endpoint let user update label properties.
tags :
- label
operationId : UpdateLabel
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-04-15 11:27:58 +02:00
- $ref : '#/parameters/labelId'
- name : label
in : body
description : The updated label json object.
required : true
schema :
$ref : '#/definitions/Label'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
delete :
summary : Delete the label specified by ID.
description : |
Delete the label specified by ID.
tags :
- label
operationId : DeleteLabel
parameters :
2021-05-19 04:36:09 +02:00
- $ref : '#/parameters/requestId'
2021-04-15 11:27:58 +02:00
- $ref : '#/parameters/labelId'
responses :
'200' :
$ref : '#/responses/200'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2022-07-11 10:35:04 +02:00
/export/cve :
post :
summary : Export scan data for selected projects
description : Export scan data for selected projects
tags :
- scan data export
operationId : exportScanData
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/scanDataType'
- name : criteria
in : body
description : The criteria for the export
required : true
schema :
$ref : '#/definitions/ScanDataExportRequest'
responses :
'200' :
description : Success.
schema :
$ref : '#/definitions/ScanDataExportJob'
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'405' :
$ref : '#/responses/405'
'409' :
$ref : '#/responses/409'
'500' :
$ref : '#/responses/500'
/export/cve/execution/{execution_id}:
get :
summary : Get the specific scan data export execution
description : Get the scan data export execution specified by ID
tags :
- scan data export
operationId : getScanDataExportExecution
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/executionId'
responses :
'200' :
description : Success
schema :
$ref : '#/definitions/ScanDataExportExecution'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
/export/cve/executions :
get :
summary : Get a list of specific scan data export execution jobs for a specified user
2022-08-05 14:07:02 +02:00
description : Get a list of specific scan data export execution jobs for a specified user
2022-07-11 10:35:04 +02:00
tags :
- scan data export
operationId : getScanDataExportExecutionList
parameters :
- $ref : '#/parameters/requestId'
responses :
'200' :
description : Success
schema :
$ref : '#/definitions/ScanDataExportExecutionList'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
/export/cve/download/{execution_id}:
get :
summary : Download the scan data export file
description : Download the scan data report. Default format is CSV
tags :
- scan data export
operationId : downloadScanData
produces :
- text/csv
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/executionId'
- name : format
in : query
type : string
required : false
description : The format of the data to be exported. e.g. CSV or PDF
responses :
'200' :
description : Data file containing the export data
schema :
type : file
headers :
Content-Disposition :
type : string
description : Value is a CSV formatted file; filename=export.csv
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2023-07-12 13:18:08 +02:00
/security/summary :
get :
summary : Get vulnerability system summary
description : Retrieve the vulnerability summary of the system
tags :
- securityhub
operationId : getSecuritySummary
parameters :
- $ref : '#/parameters/requestId'
- name : with_dangerous_cve
in : query
2023-07-19 04:17:14 +02:00
description : Specify whether the dangerous CVEs are included inside summary information
2023-07-12 13:18:08 +02:00
type : boolean
required : false
default : false
- name : with_dangerous_artifact
in : query
2023-07-19 04:17:14 +02:00
description : Specify whether the dangerous Artifact are included inside summary information
2023-07-12 13:18:08 +02:00
type : boolean
required : false
2024-01-15 06:25:56 +01:00
default : false
2023-07-12 13:18:08 +02:00
responses :
'200' :
description : Success
schema :
$ref : '#/definitions/SecuritySummary'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2023-07-19 04:17:14 +02:00
/security/vul :
get :
summary : Get the vulnerability list.
description : |
2024-01-15 06:25:56 +01:00
Get the vulnerability list. use q to pass the query condition,
2023-07-19 04:17:14 +02:00
supported conditions :
cve_id(exact match)
cvss_score_v3(range condition)
severity(exact match)
2024-01-15 06:25:56 +01:00
repository_name(exact match)
project_id(exact match)
2023-07-19 04:17:14 +02:00
package(exact match)
2024-01-15 06:25:56 +01:00
tag(exact match)
2023-08-07 03:24:44 +02:00
digest(exact match)
2023-07-19 04:17:14 +02:00
tags :
- securityhub
operationId : ListVulnerabilities
parameters :
- $ref : '#/parameters/requestId'
- $ref : '#/parameters/query'
- $ref : '#/parameters/page'
- $ref : '#/parameters/pageSize'
- name : tune_count
in : query
description : Enable to ignore X-Total-Count when the total count > 1000, if the total count is less than 1000, the real total count is returned, else -1.
type : boolean
required : false
default : false
- name : with_tag
in : query
description : Specify whether the tag information is included inside vulnerability information
type : boolean
required : false
default : false
responses :
'200' :
description : The vulnerability list.
schema :
type : array
items :
$ref : '#/definitions/VulnerabilityItem'
headers :
X-Total-Count :
description : The total count of vulnerabilities
type : integer
Link :
description : Link refers to the previous page and next page
type : string
'400' :
$ref : '#/responses/400'
'401' :
$ref : '#/responses/401'
'500' :
2023-11-09 02:47:07 +01:00
$ref : '#/responses/500'
/permissions :
get :
summary : Get system or project level permissions info.
operationId : getPermissions
description : |
This endpoint is for retrieving resource and action info that only provides for admin user(system admin and project admin).
tags :
- permissions
parameters :
- $ref : '#/parameters/requestId'
responses :
'200' :
description : Get permissions successfully.
schema :
$ref : '#/definitions/Permissions'
'401' :
$ref : '#/responses/401'
'403' :
$ref : '#/responses/403'
'404' :
$ref : '#/responses/404'
'500' :
$ref : '#/responses/500'
2023-07-19 04:17:14 +02:00
2020-01-14 03:20:18 +01:00
parameters :
2020-03-04 15:10:21 +01:00
query :
name : q
2020-04-09 05:03:42 +02:00
description : Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k=~v)", "range(k=[min~max])", "list with union releationship(k={v1 v2 v3})" and "list with intersetion relationship(k=(v1 v2 v3))". The value of range and list can be string(enclosed by " or '), integer or time(in format "2020-04-09 02:36:00"). All of these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g. q=k1=v1,k2=~v2,k3=[min~max]
2020-03-04 15:10:21 +01:00
in : query
type : string
required : false
2021-03-03 09:31:02 +01:00
sort :
name : sort
2023-11-13 07:37:41 +01:00
description : Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending order and field2 in descending order with "sort=field1,-field2"
2021-03-03 09:31:02 +01:00
in : query
type : string
required : false
page :
name : page
in : query
type : integer
format : int64
required : false
description : The page number
default : 1
pageSize :
name : page_size
in : query
type : integer
format : int64
required : false
description : The size of per page
default : 10
maximum : 100
2020-01-14 03:20:18 +01:00
requestId :
name : X-Request-Id
2020-01-16 01:04:22 +01:00
description : An unique ID for the request
2020-01-14 03:20:18 +01:00
in : header
type : string
required : false
minLength : 1
2020-12-14 08:48:52 +01:00
resourceNameInLocation :
name : X-Resource-Name-In-Location
description : The flag to indicate whether to return the name of the resource in Location. When X-Resource-Name-In-Location is true, the Location will return the name of the resource.
in : header
type : boolean
required : false
default : false
isResourceName :
name : X-Is-Resource-Name
description : The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name.
in : header
type : boolean
required : false
default : false
2021-01-06 10:54:36 +01:00
acceptVulnerabilities :
name : X-Accept-Vulnerabilities
in : header
type : string
2022-06-10 10:38:43 +02:00
default : 'application/vnd.security.vulnerability.report; version=1.1, application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0'
2021-01-06 10:54:36 +01:00
description : |-
A comma-separated lists of MIME types for the scan report or scan summary. The first mime type will be used when the report found for it.
Currently the mime type supports 'application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' and 'application/vnd.security.vulnerability.report; version=1.1'
2020-01-16 01:04:22 +01:00
projectName :
name : project_name
2020-01-14 03:20:18 +01:00
in : path
2020-01-16 01:04:22 +01:00
description : The name of the project
2020-01-14 03:20:18 +01:00
required : true
2020-01-16 01:04:22 +01:00
type : string
2020-12-14 08:48:52 +01:00
projectNameOrId :
name : project_name_or_id
2020-11-19 10:57:57 +01:00
in : path
2020-12-14 08:48:52 +01:00
description : The name or id of the project
2020-11-19 10:57:57 +01:00
required : true
type : string
2020-01-16 01:04:22 +01:00
repositoryName :
name : repository_name
2020-01-14 03:20:18 +01:00
in : path
2023-11-30 10:17:05 +01:00
description : The name of the repository. If it contains slash, encode it twice over with URL encoding. e.g. a/b -> a%2Fb -> a%252Fb
2020-01-14 03:20:18 +01:00
required : true
2020-01-16 01:04:22 +01:00
type : string
2020-01-26 05:52:51 +01:00
reference :
name : reference
in : path
description : The reference of the artifact, can be digest or tag
required : true
type : string
2020-08-05 10:14:36 +02:00
digest :
name : digest
in : path
description : The digest of the resource
required : true
type : string
2020-01-26 05:52:51 +01:00
tagName :
name : tag_name
2020-01-14 03:20:18 +01:00
in : path
2020-01-26 05:52:51 +01:00
description : The name of the tag
2020-01-14 03:20:18 +01:00
required : true
2020-01-16 01:04:22 +01:00
type : string
2020-07-07 15:07:56 +02:00
instanceName :
name : preheat_instance_name
2020-06-26 19:06:47 +02:00
in : path
2020-07-07 15:07:56 +02:00
description : Instance Name
2020-06-26 19:06:47 +02:00
required : true
2020-07-07 15:07:56 +02:00
type : string
2020-07-04 11:02:54 +02:00
preheatPolicyName :
name : preheat_policy_name
in : path
description : Preheat Policy Name
required : true
type : string
2020-07-12 09:53:08 +02:00
executionId :
name : execution_id
in : path
description : Execution ID
required : true
type : integer
taskId :
name : task_id
in : path
description : Task ID
required : true
type : integer
2020-11-19 10:57:57 +01:00
robotId :
name : robot_id
in : path
description : Robot ID
required : true
type : integer
2020-09-23 07:59:42 +02:00
gcId :
name : gc_id
in : path
description : The ID of the gc log
required : true
type : integer
format : int64
2022-03-21 08:49:42 +01:00
purgeId :
name : purge_id
in : path
description : The ID of the purge log
required : true
type : integer
format : int64
2021-04-15 11:27:58 +02:00
labelId :
name : label_id
in : path
description : Label ID
required : true
type : integer
format : int64
2021-03-22 10:27:23 +01:00
webhookPolicyId :
name : webhook_policy_id
in : path
description : The ID of the webhook policy
required : true
type : integer
format : int64
2021-03-08 10:10:12 +01:00
immutableRuleId :
name : immutable_rule_id
in : path
description : The ID of the immutable rule
required : true
type : integer
format : int64
2022-01-05 04:13:40 +01:00
accessoryId :
name : accessory_id
in : path
description : The ID of the accessory
required : true
type : integer
format : int64
2022-07-11 10:35:04 +02:00
scanDataType :
name : X-Scan-Data-Type
description : The type of scan data to export
in : header
type : string
required : true
userName :
name : user_name
description : The name of the user
in : query
type : string
required : true
2021-04-02 08:22:18 +02:00
2020-01-14 03:20:18 +01:00
responses :
2020-01-26 05:52:51 +01:00
'200' :
description : Success
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
'201' :
description : Created
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
2020-02-27 08:04:43 +01:00
Location :
description : The location of the resource
type : string
2020-02-25 07:01:29 +01:00
'202' :
description : Accepted
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
2020-01-26 05:52:51 +01:00
'400' :
description : Bad request
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
schema :
2020-01-26 03:36:25 +01:00
$ref : '#/definitions/Errors'
2020-01-14 03:20:18 +01:00
'401' :
2020-01-16 01:04:22 +01:00
description : Unauthorized
2020-01-14 03:20:18 +01:00
headers :
X-Request-Id :
2020-01-16 01:04:22 +01:00
description : The ID of the corresponding request for the response
2020-01-14 03:20:18 +01:00
type : string
schema :
2020-01-26 03:36:25 +01:00
$ref : '#/definitions/Errors'
2020-01-14 03:20:18 +01:00
'403' :
2020-01-16 01:04:22 +01:00
description : Forbidden
2020-01-14 03:20:18 +01:00
headers :
X-Request-Id :
2020-01-16 01:04:22 +01:00
description : The ID of the corresponding request for the response
2020-01-14 03:20:18 +01:00
type : string
schema :
2020-01-26 03:36:25 +01:00
$ref : '#/definitions/Errors'
2020-01-26 05:52:51 +01:00
'404' :
description : Not found
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
schema :
2020-01-26 03:36:25 +01:00
$ref : '#/definitions/Errors'
2020-07-17 09:24:18 +02:00
'405' :
description : Method not allowed
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
schema :
$ref : '#/definitions/Errors'
2020-01-26 05:52:51 +01:00
'409' :
description : Conflict
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
schema :
2020-01-26 03:36:25 +01:00
$ref : '#/definitions/Errors'
2020-08-15 18:09:06 +02:00
'412' :
description : Precondition failed
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
schema :
$ref : '#/definitions/Errors'
2021-04-15 11:27:58 +02:00
'415' :
description : Unsupported MediaType
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
schema :
$ref : '#/definitions/Errors'
2024-04-24 03:57:46 +02:00
'422' :
description : Unsupported Type
headers :
X-Request-Id :
description : The ID of the corresponding request for the response
type : string
schema :
$ref : '#/definitions/Errors'
2020-01-14 03:20:18 +01:00
'500' :
2020-01-16 01:04:22 +01:00
description : Internal server error
2020-01-14 03:20:18 +01:00
headers :
X-Request-Id :
2020-01-16 01:04:22 +01:00
description : The ID of the corresponding request for the response
2020-01-14 03:20:18 +01:00
type : string
schema :
2020-01-26 03:36:25 +01:00
$ref : '#/definitions/Errors'
2020-01-14 03:20:18 +01:00
definitions :
2020-01-26 03:36:25 +01:00
Errors :
description : The error array that describe the errors got during the handling of request
2020-08-04 06:21:50 +02:00
type : object
properties :
errors :
type : array
items :
$ref : '#/definitions/Error'
2020-01-14 03:20:18 +01:00
Error :
description : a model for all the error response coming from harbor
type : object
properties :
code :
type : string
description : The error code
message :
type : string
description : The error message
2021-03-22 07:35:44 +01:00
Search :
type : object
properties :
project :
description : Search results of the projects that matched the filter keywords.
type : array
items :
$ref : '#/definitions/Project'
repository :
description : Search results of the repositories that matched the filter keywords.
type : array
items :
$ref : '#/definitions/SearchRepository'
SearchRepository :
type : object
properties :
project_id :
type : integer
description : The ID of the project that the repository belongs to
project_name :
type : string
description : The name of the project that the repository belongs to
project_public :
type : boolean
description : 'The flag to indicate the publicity of the project that the repository belongs to (1 is public, 0 is not)'
repository_name :
type : string
description : The name of the repository
pull_count :
type : integer
description : The count how many times the repository is pulled
artifact_count :
type : integer
description : The count of artifacts in the repository
2020-02-18 08:51:38 +01:00
Repository :
type : object
properties :
id :
type : integer
format : int64
description : The ID of the repository
project_id :
type : integer
format : int64
description : The ID of the project that the repository belongs to
name :
type : string
description : The name of the repository
description :
type : string
description : The description of the repository
artifact_count :
type : integer
format : int64
description : The count of the artifacts inside the repository
2021-06-09 05:17:23 +02:00
x-omitempty : false
2020-02-18 08:51:38 +01:00
pull_count :
type : integer
format : int64
description : The count that the artifact inside the repository pulled
2021-06-09 05:17:23 +02:00
x-omitempty : false
2020-02-18 08:51:38 +01:00
creation_time :
type : string
format : date-time
description : The creation time of the repository
2022-11-17 13:12:07 +01:00
x-nullable : true
x-omitempty : true
2020-02-18 08:51:38 +01:00
update_time :
type : string
format : date-time
description : The update time of the repository
2020-01-14 03:20:18 +01:00
Artifact :
type : object
properties :
id :
type : integer
format : int64
2020-01-16 01:04:22 +01:00
description : The ID of the artifact
2020-01-14 03:20:18 +01:00
type :
type : string
2020-01-16 01:04:22 +01:00
description : The type of the artifact, e.g. image, chart, etc
2020-01-14 03:20:18 +01:00
media_type :
type : string
2020-01-16 01:04:22 +01:00
description : The media type of the artifact
manifest_media_type :
type : string
description : The manifest media type of the artifact
2024-08-06 12:29:13 +02:00
artifact_type :
type : string
description : The artifact_type in the manifest of the artifact
2020-01-16 01:04:22 +01:00
project_id :
type : integer
format : int64
description : The ID of the project that the artifact belongs to
repository_id :
type : integer
format : int64
description : The ID of the repository that the artifact belongs to
2024-08-06 12:29:13 +02:00
repository_name :
type : string
description : The name of the repository that the artifact belongs to
2020-01-14 03:20:18 +01:00
digest :
type : string
description : The digest of the artifact
size :
2020-01-16 01:04:22 +01:00
type : integer
2020-01-14 03:20:18 +01:00
format : int64
description : The size of the artifact
2020-08-05 10:14:36 +02:00
icon :
type : string
description : The digest of the icon
2020-01-16 01:04:22 +01:00
push_time :
2020-01-14 03:20:18 +01:00
type : string
format : date-time
2020-01-16 01:04:22 +01:00
description : The push time of the artifact
pull_time :
type : string
format : date-time
description : The latest pull time of the artifact
extra_attrs :
$ref : '#/definitions/ExtraAttrs'
annotations :
$ref : '#/definitions/Annotations'
references :
type : array
items :
$ref : '#/definitions/Reference'
tags :
type : array
items :
$ref : '#/definitions/Tag'
2020-01-29 04:34:55 +01:00
addition_links :
$ref : '#/definitions/AdditionLinks'
2020-01-27 13:32:14 +01:00
labels :
type : array
items :
$ref : '#/definitions/Label'
2020-02-22 06:29:58 +01:00
scan_overview :
$ref : '#/definitions/ScanOverview'
description : The overview of the scan result.
2024-04-03 10:38:09 +02:00
sbom_overview :
$ref : '#/definitions/SBOMOverview'
description : The overview of the generating SBOM progress
2022-01-05 04:13:40 +01:00
accessories :
type : array
items :
$ref : '#/definitions/Accessory'
description : The accessory of the artifact.
2020-01-16 01:04:22 +01:00
Tag :
2020-01-14 03:20:18 +01:00
type : object
properties :
id :
type : integer
format : int64
2020-01-16 01:04:22 +01:00
description : The ID of the tag
repository_id :
type : integer
format : int64
description : The ID of the repository that the tag belongs to
artifact_id :
type : integer
format : int64
description : The ID of the artifact that the tag attached to
2020-01-14 03:20:18 +01:00
name :
type : string
2020-01-16 01:04:22 +01:00
description : The name of the tag
push_time :
type : string
format : date-time
description : The push time of the tag
pull_time :
type : string
format : date-time
description : The latest pull time of the tag
2020-02-04 10:34:56 +01:00
immutable :
type : boolean
2020-01-29 04:34:55 +01:00
x-omitempty : false
2020-02-04 10:34:56 +01:00
description : The immutable status of the tag
2020-01-16 01:04:22 +01:00
ExtraAttrs :
type : object
additionalProperties :
type : object
Annotations :
type : object
additionalProperties :
type : string
2020-01-29 04:34:55 +01:00
AdditionLinks :
2020-01-16 01:04:22 +01:00
type : object
additionalProperties :
2020-01-29 04:34:55 +01:00
$ref : '#/definitions/AdditionLink'
AdditionLink :
2020-01-16 01:04:22 +01:00
type : object
properties :
href :
type : string
2020-01-29 04:34:55 +01:00
description : The link of the addition
2020-01-16 01:04:22 +01:00
absolute :
type : boolean
2020-01-29 04:34:55 +01:00
x-omitempty : false
2020-01-16 01:04:22 +01:00
description : Determine whether the link is an absolute URL or not
Reference :
type : object
properties :
parent_id :
type : integer
format : int64
description : The parent ID of the reference
child_id :
type : integer
format : int64
description : The child ID of the reference
2020-02-02 02:13:51 +01:00
child_digest :
type : string
description : The digest of the child artifact
2020-01-16 01:04:22 +01:00
platform :
$ref : '#/definitions/Platform'
2020-03-05 07:26:53 +01:00
annotations :
$ref : '#/definitions/Annotations'
urls :
type : array
description : The download URLs
items :
type : string
2020-01-16 01:04:22 +01:00
Platform :
type : object
properties :
architecture :
type : string
description : The architecture that the artifact applys to
os :
type : string
description : The OS that the artifact applys to
2020-02-14 04:41:34 +01:00
'''os.version''' :
2020-01-16 01:04:22 +01:00
type : string
description : The version of the OS that the artifact applys to
2020-02-14 04:41:34 +01:00
'''os.features''' :
2020-01-16 01:04:22 +01:00
type : array
description : The features of the OS that the artifact applys to
items :
type : string
variant :
type : string
description : The variant of the CPU
2020-01-27 13:32:14 +01:00
Label :
type : object
properties :
id :
type : integer
format : int64
description : The ID of the label
name :
type : string
description : The name the label
description :
type : string
description : The description the label
color :
type : string
description : The color the label
scope :
type : string
description : The scope the label
project_id :
type : integer
format : int64
description : The ID of project that the label belongs to
creation_time :
type : string
format : date-time
description : The creation time the label
update_time :
type : string
format : date-time
description : The update time of the label
2021-01-08 04:00:43 +01:00
Scanner :
type : object
properties :
name :
type : string
description : Name of the scanner
example : "Trivy"
vendor :
type : string
description : Name of the scanner provider
example : "Aqua Security"
version :
type : string
description : Version of the scanner adapter
example : "v0.9.1"
2020-02-22 06:29:58 +01:00
ScanOverview :
type : object
description : 'The scan overview attached in the metadata of tag'
additionalProperties :
$ref : '#/definitions/NativeReportSummary'
2024-04-03 10:38:09 +02:00
SBOMOverview :
type : object
description : 'The generate SBOM overview information'
properties :
start_time :
type : string
format : date-time
description : 'The start time of the generating sbom report task'
example : '2006-01-02T14:04:05Z'
end_time :
type : string
format : date-time
description : 'The end time of the generating sbom report task'
example : '2006-01-02T15:04:05Z'
scan_status :
type : string
description : 'The status of the generating SBOM task'
sbom_digest :
type : string
2024-04-16 15:34:19 +02:00
description : 'The digest of the generated SBOM accessory'
2024-04-03 10:38:09 +02:00
report_id :
type : string
description : 'id of the native scan report'
2024-04-16 15:34:19 +02:00
example : '5f62c830-f996-11e9-957f-0242c0a89008'
duration :
2024-04-03 10:38:09 +02:00
type : integer
format : int64
description : 'Time in seconds required to create the report'
example : 300
2024-04-25 11:00:35 +02:00
scanner :
$ref : '#/definitions/Scanner'
2020-02-22 06:29:58 +01:00
NativeReportSummary :
type : object
description : 'The summary for the native report'
properties :
report_id :
type : string
description : 'id of the native scan report'
example : '5f62c830-f996-11e9-957f-0242c0a89008'
scan_status :
type : string
description : 'The status of the report generating process'
example : 'Success'
severity :
type : string
description : 'The overall severity'
example : 'High'
duration :
type : integer
format : int64
description : 'The seconds spent for generating the report'
example : 300
summary :
$ref : '#/definitions/VulnerabilitySummary'
start_time :
type : string
format : date-time
description : 'The start time of the scan process that generating report'
2021-05-19 04:36:09 +02:00
example : '2006-01-02T14:04:05Z'
2020-02-22 06:29:58 +01:00
end_time :
type : string
format : date-time
description : 'The end time of the scan process that generating report'
2021-05-19 04:36:09 +02:00
example : '2006-01-02T15:04:05Z'
2020-03-12 12:30:12 +01:00
complete_percent :
type : integer
description : 'The complete percent of the scanning which value is between 0 and 100'
example : 100
2021-01-08 04:00:43 +01:00
scanner :
$ref : '#/definitions/Scanner'
2020-02-22 06:29:58 +01:00
VulnerabilitySummary :
type : object
description : |
VulnerabilitySummary contains the total number of the foun d vulnerabilities number and numbers of each severity level.
properties :
total :
type : integer
format : int
description : 'The total number of the found vulnerabilities'
example : 500
2021-01-08 04:00:43 +01:00
x-omitempty : false
2020-02-22 06:29:58 +01:00
fixable :
type : integer
format : int
description : 'The number of the fixable vulnerabilities'
example : 100
2021-01-08 04:00:43 +01:00
x-omitempty : false
2020-02-22 06:29:58 +01:00
summary :
type : object
description : 'Numbers of the vulnerabilities with different severity'
additionalProperties :
type : integer
format : int
example : 10
example :
'Critical' : 5
'High' : 5
2021-01-08 04:00:43 +01:00
x-omitempty : false
2020-03-04 03:45:17 +01:00
AuditLog :
type : object
properties :
id :
type : integer
description : The ID of the audit log entry.
username :
type : string
description : Username of the user in this log entry.
resource :
type : string
description : Name of the repository in this log entry.
resource_type :
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 :
type : string
2020-07-30 11:29:25 +02:00
format : date-time
2021-05-19 04:36:09 +02:00
example : '2006-01-02T15:04:05Z'
2020-03-04 03:45:17 +01:00
description : The time when this operation is triggered.
2020-06-26 19:06:47 +02:00
Metadata :
type : object
properties :
id :
type : string
description : id
name :
type : string
description : name
icon :
type : string
description : icon
maintainers :
type : array
description : maintainers
items :
type : string
version :
type : string
description : version
source :
type : string
description : source
Instance :
type : object
properties :
id :
type : integer
description : Unique ID
name :
type : string
description : Instance name
description :
type : string
description : Description of instance
vendor :
type : string
description : Based on which driver, identified by ID
endpoint :
type : string
description : The service endpoint of this instance
auth_mode :
type : string
description : The authentication way supported
auth_info :
type : object
description : The auth credential data if exists
additionalProperties :
type : string
status :
type : string
description : The health status
enabled :
type : boolean
description : Whether the instance is activated or not
2020-10-28 10:54:11 +01:00
x-omitempty : false
2020-06-26 19:06:47 +02:00
default :
type : boolean
description : Whether the instance is default or not
2020-10-28 10:54:11 +01:00
x-omitempty : false
2020-06-26 19:06:47 +02:00
insecure :
type : boolean
description : Whether the instance endpoint is insecure or not
2020-10-28 10:54:11 +01:00
x-omitempty : false
2020-06-26 19:06:47 +02:00
setup_timestamp :
type : integer
format : int64
description : The timestamp of instance setting up
2020-07-04 11:02:54 +02:00
PreheatPolicy :
type : object
properties :
id :
type : integer
description : The ID of preheat policy
name :
type : string
description : The Name of preheat policy
description :
type : string
description : The Description of preheat policy
project_id :
type : integer
description : The ID of preheat policy project
provider_id :
type : integer
description : The ID of preheat policy provider
2020-07-17 06:54:25 +02:00
provider_name :
type : string
description : The Name of preheat policy provider
2020-07-04 11:02:54 +02:00
filters :
type : string
description : The Filters of preheat policy
trigger :
type : string
description : The Trigger of preheat policy
enabled :
type : boolean
description : Whether the preheat policy enabled
2020-10-28 10:54:11 +01:00
x-omitempty : false
2020-07-04 11:02:54 +02:00
creation_time :
type : string
format : date-time
description : The Create Time of preheat policy
update_time :
type : string
format : date-time
description : The Update Time of preheat policy
2020-07-12 09:53:08 +02:00
Metrics :
type : object
properties :
task_count :
type : integer
description : The count of task
success_task_count :
type : integer
description : The count of success task
error_task_count :
type : integer
description : The count of error task
pending_task_count :
type : integer
description : The count of pending task
running_task_count :
type : integer
description : The count of running task
scheduled_task_count :
type : integer
description : The count of scheduled task
stopped_task_count :
type : integer
description : The count of stopped task
Execution :
type : object
properties :
id :
type : integer
description : The ID of execution
vendor_type :
type : string
description : The vendor type of execution
vendor_id :
type : integer
description : The vendor id of execution
status :
type : string
description : The status of execution
status_message :
type : string
description : The status message of execution
metrics :
$ref : '#/definitions/Metrics'
trigger :
type : string
description : The trigger of execution
extra_attrs :
$ref : '#/definitions/ExtraAttrs'
start_time :
type : string
description : The start time of execution
end_time :
type : string
description : The end time of execution
Task :
type : object
properties :
id :
type : integer
description : The ID of task
execution_id :
type : integer
description : The ID of task execution
status :
type : string
description : The status of task
status_message :
type : string
description : The status message of task
run_count :
type : integer
2020-09-30 09:14:00 +02:00
format : int32
2020-07-12 09:53:08 +02:00
description : The count of task run
extra_attrs :
$ref : '#/definitions/ExtraAttrs'
creation_time :
type : string
description : The creation time of task
update_time :
type : string
description : The update time of task
start_time :
type : string
description : The start time of task
end_time :
type : string
description : The end time of task
2020-07-13 15:53:50 +02:00
ProviderUnderProject :
type : object
properties :
id :
type : integer
provider :
type : string
2020-08-05 11:23:43 +02:00
enabled :
type : boolean
default :
type : boolean
2020-08-05 10:14:36 +02:00
Icon :
type : object
properties :
content-type :
type : string
description : The content type of the icon
content :
type : string
description : The base64 encoded content of the icon
2020-08-15 18:09:06 +02:00
ProjectReq :
type : object
properties :
project_name :
type : string
description : The name of the project.
2021-05-18 11:17:41 +02:00
maxLength : 255
2020-08-15 18:09:06 +02:00
public :
type : boolean
description : deprecated, reserved for project creation in replication
x-nullable : true
metadata :
description : The metadata of the project.
$ref : '#/definitions/ProjectMetadata'
cve_allowlist :
description : The CVE allowlist of the project.
$ref : '#/definitions/CVEAllowlist'
storage_limit :
type : integer
format : int64
description : The storage quota of the project.
x-nullable : true
registry_id :
type : integer
format : int64
description : The ID of referenced registry when creating the proxy cache project
x-nullable : true
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.
name :
type : string
description : The name of the project.
registry_id :
type : integer
format : int64
description : The ID of referenced registry when the project is a proxy cache project.
creation_time :
type : string
format : date-time
description : The creation time of the project.
update_time :
type : string
format : date-time
description : The update time of the project.
deleted :
type : boolean
description : A deletion mark of the project.
owner_name :
type : string
description : The owner name of the project.
togglable :
type : boolean
description : Correspond to the UI about whether the project's publicity is updatable (for UI)
current_user_role_id :
type : integer
description : The role ID with highest permission of the current user who triggered the API (for UI). This attribute is deprecated and will be removed in future versions.
current_user_role_ids :
type : array
items :
type : integer
format : int32
description : The list of 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.
2021-05-17 04:22:51 +02:00
x-omitempty : false
2020-08-15 18:09:06 +02:00
metadata :
description : The metadata of the project.
$ref : '#/definitions/ProjectMetadata'
cve_allowlist :
description : The CVE allowlist of this project.
$ref : '#/definitions/CVEAllowlist'
ProjectDeletable :
type : object
properties :
deletable :
type : boolean
description : Whether the project can be deleted.
message :
type : string
description : The detail message when the project can not be deleted.
ProjectMetadata :
type : object
properties :
public :
type : string
description : 'The public status of the project. The valid values are "true", "false".'
enable_content_trust :
type : string
description : 'Whether content trust is enabled or not. If it is enabled, user can' 't pull unsigned images from this project. The valid values are "true", "false".'
2022-01-10 10:44:01 +01:00
x-nullable : true
enable_content_trust_cosign :
type : string
description : 'Whether cosign content trust is enabled or not. If it is enabled, user can' 't pull images without cosign signature from this project. The valid values are "true", "false".'
2020-08-15 18:09:06 +02:00
x-nullable : true
prevent_vul :
type : string
description : 'Whether prevent the vulnerable images from running. The valid values are "true", "false".'
x-nullable : true
severity :
type : string
description : 'If the vulnerability is high than severity defined here, the images can' 't be pulled. The valid values are "none", "low", "medium", "high", "critical".'
x-nullable : true
auto_scan :
type : string
description : 'Whether scan images automatically when pushing. The valid values are "true", "false".'
x-nullable : true
2024-01-24 07:13:46 +01:00
auto_sbom_generation :
type : string
description : 'Whether generating SBOM automatically when pushing a subject artifact. The valid values are "true", "false".'
x-nullable : true
2020-08-15 18:09:06 +02:00
reuse_sys_cve_allowlist :
type : string
description : 'Whether this project reuse the system level CVE allowlist as the allowlist of its own. The valid values are "true", "false".
If it is set to "true" the actual allowlist associate with this project, if any, will be ignored.'
x-nullable : true
retention_id :
type : string
description : 'The ID of the tag retention policy for the project'
x-nullable : true
2024-08-08 13:02:54 +02:00
proxy_speed_kb :
type : string
description : 'The bandwidth limit of proxy cache, in Kbps (kilobits per second). It limits the communication between Harbor and the upstream registry, not the client and the Harbor.'
x-nullable : true
2020-08-15 18:09:06 +02:00
ProjectSummary :
type : object
properties :
repo_count :
type : integer
description : The number of the repositories under this project.
2021-05-17 04:22:51 +02:00
x-omitempty : false
2020-08-15 18:09:06 +02:00
project_admin_count :
type : integer
description : The total number of project admin members.
maintainer_count :
type : integer
description : The total number of maintainer members.
developer_count :
type : integer
description : The total number of developer members.
guest_count :
type : integer
description : The total number of guest members.
limited_guest_count :
type : integer
description : The total number of limited guest members.
quota :
2021-02-25 09:19:55 +01:00
$ref : "#/definitions/ProjectSummaryQuota"
2020-08-15 18:09:06 +02:00
registry :
2020-11-19 10:57:57 +01:00
$ref : "#/definitions/Registry"
2021-02-25 09:19:55 +01:00
ProjectSummaryQuota :
type : object
properties :
hard :
$ref : "#/definitions/ResourceList"
description : The hard limits of the quota
used :
$ref : "#/definitions/ResourceList"
description : The used status of the quota
2021-03-03 05:23:36 +01:00
ProjectScanner :
type : object
required :
- uuid
properties :
uuid :
type : string
description : The identifier of the scanner registration
2020-08-15 18:09:06 +02:00
CVEAllowlist :
type : object
description : The CVE Allowlist for system or project
properties :
id :
type : integer
description : ID of the allowlist
project_id :
type : integer
description : ID of the project which the allowlist belongs to. For system level allowlist this attribute is zero.
expires_at :
type : integer
description : the time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.
x-nullable : true
items :
type : array
items :
$ref : "#/definitions/CVEAllowlistItem"
creation_time :
type : string
format : date-time
description : The creation time of the allowlist.
update_time :
type : string
format : date-time
description : The update time of the allowlist.
CVEAllowlistItem :
type : object
description : The item in CVE allowlist
properties :
cve_id :
type : string
description : The ID of the CVE, such as "CVE-2019-10164"
2021-03-03 04:45:33 +01:00
ReplicationPolicy :
type : object
properties :
id :
type : integer
format : int64
description : The policy ID.
name :
type : string
description : The policy name.
description :
type : string
description : The description of the policy.
src_registry :
description : The source registry.
$ref : '#/definitions/Registry'
dest_registry :
description : The destination registry.
$ref : '#/definitions/Registry'
dest_namespace :
type : string
description : The destination namespace.
2021-04-14 05:21:44 +02:00
dest_namespace_replace_count :
type : integer
format : int8
description : |-
Specify how many path components will be replaced by the provided destination namespace.
The default value is -1 in which case the legacy mode will be applied.
x-isnullable : true # make this field optional to keep backward compatibility
2021-03-03 04:45:33 +01:00
trigger :
$ref : '#/definitions/ReplicationTrigger'
filters :
type : array
description : The replication policy filter array.
items :
$ref : '#/definitions/ReplicationFilter'
replicate_deletion :
type : boolean
description : Whether to replicate the deletion operation.
deletion :
type : boolean
description : Deprecated, use "replicate_deletion" instead. Whether to replicate the deletion operation.
override :
type : boolean
description : Whether to override the resources on the destination registry.
enabled :
type : boolean
description : Whether the policy is enabled or not.
creation_time :
type : string
format : date-time
description : The create time of the policy.
update_time :
type : string
format : date-time
description : The update time of the policy.
2021-09-03 15:56:27 +02:00
speed :
type : integer
format : int32
description : speed limit for each task
x-isnullable : true # make this field optional to keep backward compatibility
2022-11-01 04:19:17 +01:00
copy_by_chunk :
type : boolean
description : Whether to enable copy by chunk.
x-isnullable : true
2021-03-03 04:45:33 +01:00
ReplicationTrigger :
type : object
properties :
type :
type : string
description : 'The replication policy trigger type. The valid values are manual, event_based and scheduled.'
trigger_settings :
$ref : '#/definitions/ReplicationTriggerSettings'
ReplicationTriggerSettings :
type : object
properties :
cron :
type : string
description : The cron string for scheduled trigger
ReplicationFilter :
type : object
properties :
type :
type : string
description : 'The replication policy filter type.'
value :
type : object
description : 'The value of replication policy filter.'
2021-07-21 04:59:55 +02:00
decoration :
type : string
description : 'matches or excludes the result'
2020-08-15 18:09:06 +02:00
RegistryCredential :
type : object
properties :
type :
type : string
description : Credential type, such as 'basic', 'oauth'.
access_key :
type : string
description : Access key, e.g. user name when credential type is 'basic'.
access_secret :
type : string
description : Access secret, e.g. password when credential type is 'basic'.
Registry :
type : object
properties :
id :
type : integer
format : int64
description : The registry ID.
2021-03-03 04:45:33 +01:00
x-omitempty : false
2020-08-15 18:09:06 +02:00
url :
type : string
description : The registry URL string.
name :
type : string
description : The registry name.
credential :
$ref : '#/definitions/RegistryCredential'
type :
type : string
description : Type of the registry, e.g. 'harbor'.
insecure :
type : boolean
description : Whether or not the certificate will be verified when Harbor tries to access the server.
description :
type : string
description : Description of the registry.
status :
type : string
description : Health status of the registry.
creation_time :
type : string
2021-03-03 04:45:33 +01:00
format : date-time
2020-08-15 18:09:06 +02:00
description : The create time of the policy.
update_time :
type : string
2021-03-03 04:45:33 +01:00
format : date-time
2020-08-15 18:09:06 +02:00
description : The update time of the policy.
2021-03-31 09:49:23 +02:00
RegistryUpdate :
type : object
properties :
name :
type : string
description : The registry name.
x-nullable : true
description :
type : string
description : Description of the registry.
x-nullable : true
url :
type : string
description : The registry URL.
x-nullable : true
credential_type :
type : string
description : Credential type of the registry, e.g. 'basic'.
x-nullable : true
access_key :
type : string
description : The registry access key.
x-nullable : true
access_secret :
type : string
description : The registry access secret.
x-nullable : true
insecure :
type : boolean
description : Whether or not the certificate will be verified when Harbor tries to access the server.
x-nullable : true
RegistryPing :
type : object
properties :
id :
type : integer
format : int64
description : The registry ID.
x-nullable : true
type :
type : string
description : Type of the registry, e.g. 'harbor'.
x-nullable : true
url :
type : string
description : The registry URL.
x-nullable : true
credential_type :
type : string
description : Credential type of the registry, e.g. 'basic'.
x-nullable : true
access_key :
type : string
description : The registry access key.
x-nullable : true
access_secret :
type : string
description : The registry access secret.
x-nullable : true
insecure :
type : boolean
description : Whether or not the certificate will be verified when Harbor tries to access the server.
x-nullable : true
RegistryInfo :
type : object
description : The registry info contains the base info and capability declarations of the registry
properties :
type :
type : string
description : The registry type
description :
type : string
description : The description
supported_resource_filters :
type : array
description : The filters that the registry supports
items :
$ref : '#/definitions/FilterStyle'
supported_triggers :
type : array
description : The triggers that the registry supports
items :
type : string
2022-11-01 04:19:17 +01:00
supported_copy_by_chunk :
type : boolean
description : The registry whether support copy by chunk.
x-omitempty : true
x-isnullable : true
2021-03-31 09:49:23 +02:00
RegistryProviderInfo :
type : object
description : The registry provider info contains the base info and capability declarations of the registry provider
properties :
endpoint_pattern :
description : The endpoint pattern
$ref : '#/definitions/RegistryProviderEndpointPattern'
credential_pattern :
description : The credential pattern
$ref : '#/definitions/RegistryProviderCredentialPattern'
RegistryProviderEndpointPattern :
type : object
description : The registry endpoint pattern
properties :
endpoint_type :
type : string
description : The endpoint type
endpoints :
type : array
description : The endpoint list
items :
$ref : '#/definitions/RegistryEndpoint'
RegistryProviderCredentialPattern :
type : object
description : The registry credential pattern
properties :
access_key_type :
type : string
description : The access key type
access_key_data :
type : string
description : The access key data
access_secret_type :
type : string
description : The access secret type
access_secret_data :
type : string
description : The access secret data
RegistryEndpoint :
type : object
description : The style of the resource filter
properties :
key :
type : string
description : The endpoint key
value :
type : string
description : The endpoint value
FilterStyle :
type : object
description : The style of the resource filter
properties :
type :
type : string
description : The filter type
style :
type : string
description : The filter style
values :
type : array
description : The filter values
items :
type : string
2020-08-15 18:09:06 +02:00
ResourceList :
type : object
additionalProperties :
type : integer
format : int64
2020-09-30 09:14:00 +02:00
ReplicationExecution :
type : object
description : The replication execution
properties :
id :
type : integer
description : The ID of the execution
policy_id :
type : integer
description : The ID if the policy that the execution belongs to
status :
type : string
description : The status of the execution
trigger :
type : string
description : The trigger mode
start_time :
type : string
format : date-time
description : The start time
end_time :
type : string
format : date-time
description : The end time
status_text :
type : string
x-omitempty : false
description : The status text
total :
type : integer
x-omitempty : false
description : The total count of all executions
failed :
type : integer
x-omitempty : false
description : The count of failed executions
succeed :
type : integer
x-omitempty : false
description : The count of succeed executions
in_progress :
type : integer
x-omitempty : false
description : The count of in_progress executions
stopped :
type : integer
x-omitempty : false
description : The count of stopped executions
StartReplicationExecution :
type : object
properties :
policy_id :
type : integer
format : int64
description : The ID of policy that the execution belongs to.
ReplicationTask :
type : object
description : The replication task
properties :
id :
type : integer
description : The ID of the task
execution_id :
type : integer
description : The ID of the execution that the task belongs to
status :
type : string
description : The status of the task
job_id :
type : string
description : The ID of the underlying job that the task related to
operation :
type : string
description : The operation of the task
resource_type :
type : string
description : The type of the resource that the task operates
src_resource :
type : string
description : The source resource that the task operates
dst_resource :
type : string
description : The destination resource that the task operates
start_time :
type : string
format : date-time
description : The start time of the task
end_time :
type : string
format : date-time
description : The end time of the task
2020-11-19 10:57:57 +01:00
Robot :
type : object
properties :
id :
type : integer
format : int64
description : The ID of the robot
name :
type : string
2023-02-23 12:57:50 +01:00
description : The name of the robot
2020-11-19 10:57:57 +01:00
description :
type : string
description : The description of the robot
secret :
type : string
description : The secret of the robot
level :
type : string
description : The level of the robot, project or system
2020-12-01 11:31:34 +01:00
duration :
type : integer
2024-01-15 06:25:56 +01:00
x-nullable : true
2020-12-01 11:31:34 +01:00
format : int64
2024-01-15 06:25:56 +01:00
description : The duration of the robot in days, duration must be either -1(Never) or a positive integer
2020-12-01 11:31:34 +01:00
editable :
type : boolean
x-omitempty : false
description : The editable status of the robot
2020-11-19 10:57:57 +01:00
disable :
type : boolean
x-omitempty : false
description : The disable status of the robot
expires_at :
type : integer
format : int64
2023-02-23 12:57:50 +01:00
description : The expiration date of the robot
2020-11-19 10:57:57 +01:00
permissions :
type : array
items :
2021-02-04 08:32:44 +01:00
$ref : '#/definitions/RobotPermission'
2024-08-15 08:43:19 +02:00
creator :
type : string
description : The creator of the robot
2020-11-19 10:57:57 +01:00
creation_time :
type : string
format : date-time
description : The creation time of the robot.
update_time :
type : string
format : date-time
description : The update time of the robot.
RobotCreate :
type : object
description : The request for robot account creation.
properties :
name :
type : string
2023-02-23 12:57:50 +01:00
description : The name of the robot
2020-11-19 10:57:57 +01:00
description :
type : string
description : The description of the robot
secret :
type : string
description : The secret of the robot
level :
type : string
description : The level of the robot, project or system
disable :
type : boolean
description : The disable status of the robot
2020-12-01 11:31:34 +01:00
duration :
2020-11-19 10:57:57 +01:00
type : integer
format : int64
2024-01-15 06:25:56 +01:00
description : The duration of the robot in days, duration must be either -1(Never) or a positive integer
2020-11-19 10:57:57 +01:00
permissions :
type : array
items :
2021-02-04 08:32:44 +01:00
$ref : '#/definitions/RobotPermission'
2020-11-19 10:57:57 +01:00
RobotCreated :
type : object
description : The response for robot account creation.
properties :
id :
type : integer
format : int64
description : The ID of the robot
name :
type : string
2023-02-23 12:57:50 +01:00
description : The name of the robot
2020-11-19 10:57:57 +01:00
secret :
type : string
description : The secret of the robot
creation_time :
type : string
format : date-time
description : The creation time of the robot.
2020-12-01 11:31:34 +01:00
expires_at :
type : integer
format : int64
2023-02-23 12:57:50 +01:00
description : The expiration date of the robot
2020-12-01 11:31:34 +01:00
RobotSec :
type : object
description : The response for refresh/update robot account secret.
properties :
secret :
type : string
description : The secret of the robot
2021-02-04 08:32:44 +01:00
RobotPermission :
2020-11-19 10:57:57 +01:00
type : object
properties :
kind :
type : string
description : The kind of the permission
namespace :
type : string
description : The namespace of the permission
access :
type : array
items :
$ref : '#/definitions/Access'
Access :
type : object
properties :
resource :
type : string
2024-03-12 04:00:42 +01:00
description : The resource of the access. Possible resources are listed here for system and project level https://github.com/goharbor/harbor/blob/main/src/common/rbac/const.go
2020-11-19 10:57:57 +01:00
action :
type : string
2023-02-23 12:57:50 +01:00
description : The action of the access. Possible actions are *, pull, push, create, read, update, delete, list, operate, scanner-pull and stop.
2020-11-19 10:57:57 +01:00
effect :
type : string
description : The effect of the access
RobotCreateV1 :
type : object
properties :
name :
type : string
description : The name of robot account
description :
type : string
description : The description of robot account
expires_at :
type : integer
description : The expiration time on or after which the JWT MUST NOT be accepted for processing.
access :
type : array
description : The permission of robot account
items :
$ref : '#/definitions/Access'
2020-11-30 07:15:18 +01:00
Storage :
type : object
properties :
total :
type : integer
format : uint64
description : Total volume size.
free :
type : integer
format : uint64
description : Free volume size.
GeneralInfo :
type : object
properties :
2023-07-03 09:58:37 +02:00
banner_message :
type : string
x-nullable : true
x-omitempty : true
description : The banner message for the UI. It is the stringified result of the banner message object.
example : "{\"closable\":true,\"message\":\"your banner message content\",\"type\":\"warning\",\"fromDate\":\"06/19/2023\",\"toDate\":\"06/21/2023\"}"
2022-01-11 08:39:34 +01:00
current_time :
type : string
format : date-time
x-nullable : true
x-omitempty : true
description : The current time of the server.
2020-11-30 07:15:18 +01:00
registry_url :
type : string
x-nullable : true
x-omitempty : true
description : The url of registry against which the docker command should be issued.
external_url :
type : string
x-nullable : true
x-omitempty : true
description : The external URL of Harbor, with protocol.
auth_mode :
type : string
x-nullable : true
x-omitempty : true
description : The auth mode of current Harbor instance.
2023-02-08 18:11:08 +01:00
primary_auth_mode :
type : boolean
x-nullable : true
x-omitempty : true
description : The flag to indicate whether the current auth mode should consider as a primary one.
2020-11-30 07:15:18 +01:00
project_creation_restriction :
type : string
x-nullable : true
x-omitempty : true
description : 'Indicate who can create projects, it could be ' 'adminonly' ' or ' 'everyone' '.'
self_registration :
type : boolean
x-nullable : true
x-omitempty : true
description : Indicate whether the Harbor instance enable user to register himself.
has_ca_root :
type : boolean
x-nullable : true
x-omitempty : true
description : Indicate whether there is a ca root cert file ready for download in the file system.
harbor_version :
type : string
x-nullable : true
x-omitempty : true
description : The build version of Harbor.
registry_storage_provider_name :
type : string
x-nullable : true
x-omitempty : true
description : The storage provider's name of Harbor registry
read_only :
type : boolean
x-nullable : true
x-omitempty : true
description : The flag to indicate whether Harbor is in readonly mode.
notification_enable :
type : boolean
x-nullable : true
x-omitempty : true
description : The flag to indicate whether notification mechanism is enabled on Harbor instance.
authproxy_settings :
description : The setting of auth proxy this is only available when Harbor relies on authproxy for authentication.
x-nullable : true
x-omitempty : true
$ref : '#/definitions/AuthproxySetting'
2023-11-15 04:00:39 +01:00
oidc_provider_name :
type : string
x-nullable : true
x-omitempty : true
description : The OIDC provider name, empty if current auth is not OIDC_auth or OIDC provider is not configured.
2020-11-30 07:15:18 +01:00
AuthproxySetting :
type : object
properties :
endpoint :
type : string
description : The fully qualified URI of login endpoint of authproxy, such as 'https://192.168.1.2:8443/login'
tokenreivew_endpoint :
type : string
description : The fully qualified URI of token review endpoint of authproxy, such as 'https://192.168.1.2:8443/tokenreview'
skip_search :
type : boolean
description : The flag to determine whether Harbor can skip search the user/group when adding him as a member.
verify_cert :
type : boolean
description : The flag to determine whether Harbor should verify the certificate when connecting to the auth proxy.
server_certificate :
type : string
description : The certificate to be pinned when connecting auth proxy.
SystemInfo :
type : object
properties :
storage :
type : array
description : The storage of system.
items :
$ref : '#/definitions/Storage'
2020-09-23 07:59:42 +02:00
GCHistory :
type : object
properties :
id :
type : integer
description : the id of gc job.
job_name :
type : string
description : the job name of gc job.
job_kind :
type : string
description : the job kind of gc job.
job_parameters :
type : string
description : the job parameters of gc job.
schedule :
$ref : '#/definitions/ScheduleObj'
job_status :
type : string
description : the status of gc job.
deleted :
type : boolean
description : if gc job was deleted.
creation_time :
type : string
format : date-time
description : the creation time of gc job.
update_time :
type : string
format : date-time
description : the update time of gc job.
2022-03-21 08:49:42 +01:00
ExecHistory :
type : object
properties :
id :
type : integer
description : the id of purge job.
job_name :
type : string
description : the job name of purge job.
job_kind :
type : string
description : the job kind of purge job.
job_parameters :
type : string
description : the job parameters of purge job.
schedule :
$ref : '#/definitions/ScheduleObj'
job_status :
type : string
description : the status of purge job.
deleted :
type : boolean
description : if purge job was deleted.
creation_time :
type : string
format : date-time
description : the creation time of purge job.
update_time :
type : string
format : date-time
2023-02-08 18:11:08 +01:00
description : the update time of purge job.
2020-09-23 07:59:42 +02:00
Schedule :
type : object
properties :
2020-12-21 03:17:02 +01:00
id :
type : integer
description : The id of the schedule.
readOnly : true
status :
type : string
description : The status of the schedule.
readOnly : true
creation_time :
type : string
format : date-time
description : the creation time of the schedule.
readOnly : true
update_time :
type : string
format : date-time
description : the update time of the schedule.
readOnly : true
2020-09-23 07:59:42 +02:00
schedule :
$ref : '#/definitions/ScheduleObj'
parameters :
type : object
2020-12-21 03:17:02 +01:00
description : The parameters of schedule job
2020-09-23 07:59:42 +02:00
additionalProperties :
type : object
ScheduleObj :
type : object
properties :
type :
type : string
description : |
2023-08-07 05:08:25 +02:00
The schedule type. The valid values are 'Hourly', 'Daily', 'Weekly', 'Custom', 'Manual', 'None' and 'Schedule'.
2024-01-15 06:25:56 +01:00
'Manual' means to trigger it right away, 'Schedule' means to trigger it by a specified cron schedule and
2023-08-07 05:08:25 +02:00
'None' means to cancel the schedule.
2020-12-21 03:17:02 +01:00
enum :
- Hourly
- Daily
- Weekly
- Custom
- Manual
- None
2023-08-07 05:08:25 +02:00
- Schedule
2020-09-23 07:59:42 +02:00
cron :
type : string
description : A cron expression, a time-based job scheduler.
2022-06-06 16:17:41 +02:00
next_scheduled_time :
type : string
format : date-time
description : The next time to schedule to run the job.
2020-12-21 03:17:02 +01:00
Stats :
type : object
description : Stats provides the overall progress of the scan all process.
properties :
total :
type : integer
format : int
description : 'The total number of scan processes triggered by the scan all action'
example : 100
x-omitempty : false
completed :
type : integer
format : int
description : 'The number of the finished scan processes triggered by the scan all action'
example : 90
x-omitempty : false
metrics :
type : object
description : 'The metrics data for the each status'
additionalProperties :
type : integer
format : int
example : 10
example :
'Success' : 5
'Error' : 2
'Running' : 3
ongoing :
type : boolean
description : A flag indicating job status of scan all.
x-omitempty : false
2020-12-24 07:30:43 +01:00
trigger :
type : string
description : The trigger of the scan all job.
enum :
- Manual
- Schedule
- Event
2021-01-08 01:09:34 +01:00
RetentionMetadata :
type : object
description : the tag retention metadata
properties :
templates :
type : array
description : templates
items :
$ref : '#/definitions/RetentionRuleMetadata'
scope_selectors :
type : array
description : supported scope selectors
items :
$ref : '#/definitions/RetentionSelectorMetadata'
tag_selectors :
type : array
description : supported tag selectors
items :
$ref : '#/definitions/RetentionSelectorMetadata'
RetentionRuleMetadata :
type : object
description : the tag retention rule metadata
properties :
rule_template :
type : string
description : rule id
display_text :
type : string
description : rule display text
action :
type : string
description : rule action
params :
type : array
description : rule params
items :
$ref : '#/definitions/RetentionRuleParamMetadata'
RetentionRuleParamMetadata :
type : object
description : rule param
properties :
type :
type : string
unit :
type : string
required :
type : boolean
RetentionSelectorMetadata :
type : object
description : retention selector
properties :
display_text :
type : string
kind :
type : string
decorations :
type : array
items :
type : string
RetentionPolicy :
type : object
description : retention policy
properties :
id :
type : integer
format : int64
algorithm :
type : string
rules :
type : array
items :
$ref : '#/definitions/RetentionRule'
trigger :
type : object
$ref : '#/definitions/RetentionRuleTrigger'
scope :
type : object
$ref : '#/definitions/RetentionPolicyScope'
RetentionRuleTrigger :
type : object
properties :
kind :
type : string
settings :
type : object
references :
type : object
RetentionPolicyScope :
type : object
properties :
level :
type : string
ref :
type : integer
RetentionRule :
type : object
properties :
id :
type : integer
priority :
type : integer
disabled :
type : boolean
action :
type : string
template :
type : string
params :
type : object
additionalProperties :
type : object
tag_selectors :
type : array
items :
$ref : '#/definitions/RetentionSelector'
scope_selectors :
type : object
additionalProperties :
type : array
items :
$ref : '#/definitions/RetentionSelector'
RetentionSelector :
type : object
properties :
kind :
type : string
decoration :
type : string
pattern :
type : string
extras :
type : string
RetentionExecution :
type : object
properties :
id :
type : integer
format : int64
policy_id :
type : integer
format : int64
start_time :
type : string
end_time :
type : string
status :
type : string
trigger :
type : string
dry_run :
type : boolean
RetentionExecutionTask :
type : object
properties :
id :
type : integer
format : int64
execution_id :
type : integer
format : int64
repository :
type : string
job_id :
type : string
status :
type : string
status_code :
type : integer
2021-01-12 11:31:15 +01:00
x-omitempty : false
2021-01-08 01:09:34 +01:00
status_revision :
type : integer
format : int64
start_time :
type : string
end_time :
type : string
total :
type : integer
2021-01-12 11:31:15 +01:00
x-omitempty : false
2021-01-08 01:09:34 +01:00
retained :
type : integer
2021-01-12 11:31:15 +01:00
x-omitempty : false
2021-03-03 05:23:36 +01:00
2021-02-25 09:19:55 +01:00
QuotaUpdateReq :
type : object
properties :
hard :
$ref : "#/definitions/ResourceList"
description : The new hard limits for the quota
2021-03-03 05:23:36 +01:00
2021-02-25 09:19:55 +01:00
QuotaRefObject :
type : object
additionalProperties : {}
2021-03-03 05:23:36 +01:00
2021-02-25 09:19:55 +01:00
Quota :
type : object
description : The quota object
properties :
id :
type : integer
description : ID of the quota
ref :
$ref : "#/definitions/QuotaRefObject"
description : The reference object of the quota
hard :
$ref : "#/definitions/ResourceList"
description : The hard limits of the quota
x-omitempty : false
used :
$ref : "#/definitions/ResourceList"
description : The used status of the quota
x-omitempty : false
creation_time :
type : string
format : date-time
description : the creation time of the quota
update_time :
type : string
format : date-time
description : the update time of the quota
2021-03-03 05:23:36 +01:00
ScannerRegistration :
type : object
description : |
Registration represents a named configuration for invoking a scanner via its adapter.
properties :
uuid :
type : string
description : The unique identifier of this registration.
name :
type : string
example : Trivy
description : The name of this registration.
description :
type : string
description : An optional description of this registration.
example : |
A free-to-use tool that scans container images for package vulnerabilities.
x-omitempty : false
url :
type : string
2023-07-05 11:57:06 +02:00
format : uri
2021-03-03 05:23:36 +01:00
description : A base URL of the scanner adapter
example : http://harbor-scanner-trivy:8080
disabled :
type : boolean
default : false
description : Indicate whether the registration is enabled or not
x-omitempty : false
is_default :
type : boolean
default : false
description : Indicate if the registration is set as the system default one
x-omitempty : false
auth :
type : string
default : ""
description : |
Specify what authentication approach is adopted for the HTTP communications.
Supported types Basic", "Bearer" and api key header "X-ScannerAdapter-API-Key"
example : "Bearer"
x-omitempty : false
access_credential :
type : string
description : |
An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API.
example : "Bearer: JWTTOKENGOESHERE"
x-omitempty : false
skip_certVerify :
type : boolean
default : false
description : Indicate if skip the certificate verification when sending HTTP requests
x-omitempty : false
use_internal_addr :
type : boolean
default : false
description : Indicate whether use internal registry addr for the scanner to pull content or not
x-omitempty : false
create_time :
type : string
format : date-time
description : The creation time of this registration
update_time :
type : string
format : date-time
description : The update time of this registration
adapter :
type : string
description : Optional property to describe the name of the scanner registration
2021-05-19 04:36:09 +02:00
example : "Trivy"
2021-03-03 05:23:36 +01:00
vendor :
type : string
description : Optional property to describe the vendor of the scanner registration
example : "CentOS"
version :
type : string
description : Optional property to describe the version of the scanner registration
example : "1.0.1"
health :
type : string
default : ""
description : Indicate the healthy of the registration
example : "healthy"
2024-04-03 10:38:09 +02:00
capabilities :
type : object
description : Indicates the capabilities of the scanner, e.g. support_vulnerability or support_sbom.
additionalProperties : True
example : {"support_vulnerability": true, "support_sbom": true }
2024-04-16 15:34:19 +02:00
2021-03-03 05:23:36 +01:00
ScannerRegistrationReq :
type : object
required :
- name
- url
properties :
name :
type : string
description : The name of this registration
example : Trivy
description :
type : string
description : An optional description of this registration.
example : |
A free-to-use tool that scans container images for package vulnerabilities.
url :
type : string
format : uri
description : A base URL of the scanner adapter.
example : http://harbor-scanner-trivy:8080
auth :
type : string
description : |
Specify what authentication approach is adopted for the HTTP communications.
Supported types Basic", "Bearer" and api key header "X-ScannerAdapter-API-Key"
example : "Bearer"
access_credential :
type : string
description : |
An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API.
example : "Bearer: JWTTOKENGOESHERE"
skip_certVerify :
type : boolean
default : false
description : Indicate if skip the certificate verification when sending HTTP requests
use_internal_addr :
type : boolean
default : false
description : Indicate whether use internal registry addr for the scanner to pull content or not
disabled :
type : boolean
default : false
description : Indicate whether the registration is enabled or not
ScannerRegistrationSettings :
type : object
required :
- name
- url
properties :
name :
type : string
description : The name of this registration
example : Trivy
url :
type : string
format : uri
description : A base URL of the scanner adapter.
example : http://harbor-scanner-trivy:8080
auth :
type : string
default : ""
description : |
Specify what authentication approach is adopted for the HTTP communications.
Supported types Basic", "Bearer" and api key header "X-ScannerAdapter-API-Key"
access_credential :
type : string
description : |
An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API.
example : "Bearer: JWTTOKENGOESHERE"
IsDefault :
type : object
properties :
is_default :
type : boolean
description : A flag indicating whether a scanner registration is default.
ScannerCapability :
type : object
properties :
2024-03-25 08:02:39 +01:00
type :
type : string
description : |
Specify the type of scanner capability, like vulnerability or sbom
x-omitempty : false
example : "sbom"
2021-03-03 05:23:36 +01:00
consumes_mime_types :
type : array
items :
type : string
example : "application/vnd.docker.distribution.manifest.v2+json"
produces_mime_types :
type : array
items :
type : string
example : "application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0"
ScannerAdapterMetadata :
type : object
description : The metadata info of the scanner adapter
properties :
scanner :
$ref : '#/definitions/Scanner'
capabilities :
type : array
items :
$ref : '#/definitions/ScannerCapability'
properties :
type : object
additionalProperties :
type : string
example :
'harbor.scanner-adapter/registry-authorization-type' : 'Bearer'
2021-03-08 10:10:12 +01:00
ImmutableRule :
type : object
properties :
id :
type : integer
priority :
type : integer
disabled :
type : boolean
action :
type : string
template :
type : string
params :
type : object
additionalProperties :
type : object
tag_selectors :
type : array
items :
$ref : '#/definitions/ImmutableSelector'
scope_selectors :
type : object
additionalProperties :
type : array
items :
$ref : '#/definitions/ImmutableSelector'
ImmutableSelector :
type : object
properties :
kind :
type : string
decoration :
type : string
pattern :
type : string
extras :
type : string
2021-02-28 02:07:20 +01:00
LdapConf :
type : object
description : The ldap configure properties
properties :
ldap_url :
type : string
description : The url of ldap service.
ldap_search_dn :
type : string
description : The search dn of ldap service.
ldap_search_password :
type : string
description : The search password of ldap service.
ldap_base_dn :
type : string
description : The base dn of ldap service.
ldap_filter :
type : string
description : The serach filter of ldap service.
ldap_uid :
type : string
description : The serach uid from ldap service attributes.
ldap_scope :
type : integer
format : int64
description : The serach scope of ldap service.
ldap_connection_timeout :
type : integer
format : int64
description : The connect timeout of ldap service(second).
ldap_verify_cert :
type : boolean
description : Verify Ldap server certificate.
LdapPingResult :
type : object
description : The ldap ping result
properties :
success :
type : boolean
description : Test success
message :
type : string
description : The ping operation output message.
LdapImportUsers :
type : object
properties :
ldap_uid_list :
type : array
description : selected uid list
items :
type : string
LdapFailedImportUser :
type : object
2021-03-26 07:03:02 +01:00
properties :
uid :
type : string
description : the uid can't add to system.
error :
type : string
description : fail reason.
2021-02-28 02:07:20 +01:00
LdapUser :
type : object
2021-03-26 07:03:02 +01:00
properties :
username :
type : string
description : ldap username.
realname :
type : string
description : The user realname from "uid" or "cn" attribute.
email :
type : string
description : The user email address from "mail" or "email" attribute.
2021-02-28 02:07:20 +01:00
UserGroup :
type : object
2021-03-26 07:03:02 +01:00
properties :
id :
type : integer
description : The ID of the user group
group_name :
type : string
description : The name of the user group
group_type :
type : integer
2022-07-05 08:55:23 +02:00
description : 'The group type, 1 for LDAP group, 2 for HTTP group, 3 for OIDC group.'
2021-03-26 07:03:02 +01:00
ldap_group_dn :
type : string
description : The DN of the LDAP group if group type is 1 (LDAP group).
2021-09-02 03:04:33 +02:00
UserGroupSearchItem :
type : object
properties :
id :
type : integer
description : The ID of the user group
group_name :
type : string
description : The name of the user group
group_type :
type : integer
2022-07-05 08:55:23 +02:00
description : 'The group type, 1 for LDAP group, 2 for HTTP group, 3 for OIDC group.'
2021-03-22 10:27:23 +01:00
SupportedWebhookEventTypes :
type : object
2023-03-03 03:17:47 +01:00
description : Supported webhook event types and notify types.
2021-03-22 10:27:23 +01:00
properties :
event_type :
type : array
items :
$ref : '#/definitions/EventType'
notify_type :
type : array
items :
$ref : '#/definitions/NotifyType'
2023-03-03 03:17:47 +01:00
payload_formats :
type : array
items :
$ref : '#/definitions/PayloadFormat'
2021-03-22 10:27:23 +01:00
EventType :
type : string
2023-03-03 03:17:47 +01:00
description : Webhook supported event type.
example : 'PULL_ARTIFACT'
2021-03-22 10:27:23 +01:00
NotifyType :
type : string
2023-03-03 03:17:47 +01:00
description : Webhook supported notify type.
2021-03-22 10:27:23 +01:00
example : 'http'
2023-03-03 03:17:47 +01:00
PayloadFormatType :
type : string
description : The type of webhook paylod format.
2023-03-14 03:44:25 +01:00
example : 'CloudEvents'
2023-03-03 03:17:47 +01:00
PayloadFormat :
type : object
description : Webhook supported payload format type collections.
properties :
notify_type :
$ref : '#/definitions/NotifyType'
formats :
type : array
description : The supported payload formats for this notify type.
items :
$ref : '#/definitions/PayloadFormatType'
2021-03-22 10:27:23 +01:00
WebhookTargetObject :
type : object
description : The webhook policy target object.
properties :
type :
type : string
description : The webhook target notify type.
address :
type : string
description : The webhook target address.
auth_header :
type : string
description : The webhook auth header.
skip_cert_verify :
type : boolean
description : Whether or not to skip cert verify.
2023-03-03 03:17:47 +01:00
payload_format :
$ref : '#/definitions/PayloadFormatType'
2023-04-02 09:33:33 +02:00
description : The payload format of webhook, by default is Default for http type.
2021-03-22 10:27:23 +01:00
WebhookPolicy :
type : object
description : The webhook policy object
properties :
id :
type : integer
format : int64
description : The webhook policy ID.
name :
type : string
description : The name of webhook policy.
description :
type : string
description : The description of webhook policy.
project_id :
type : integer
description : The project ID of webhook policy.
targets :
type : array
items :
$ref : '#/definitions/WebhookTargetObject'
event_types :
type : array
items :
type : string
creator :
type : string
description : The creator of the webhook policy.
creation_time :
type : string
description : The create time of the webhook policy.
format : date-time
update_time :
type : string
description : The update time of the webhook policy.
format : date-time
enabled :
type : boolean
description : Whether the webhook policy is enabled or not.
2021-03-23 09:45:41 +01:00
x-omitempty : false
2021-03-22 10:27:23 +01:00
WebhookLastTrigger :
type : object
description : The webhook policy and last trigger time group by event type.
properties :
policy_name :
type : string
description : The webhook policy name.
event_type :
type : string
description : The webhook event type.
enabled :
type : boolean
description : Whether or not the webhook policy enabled.
creation_time :
type : string
description : The creation time of webhook policy.
format : date-time
last_trigger_time :
type : string
description : The last trigger time of webhook policy.
format : date-time
WebhookJob :
type : object
description : The webhook job.
properties :
id :
type : integer
format : int64
description : The webhook job ID.
policy_id :
type : integer
format : int64
description : The webhook policy ID.
event_type :
type : string
description : The webhook job event type.
notify_type :
type : string
description : The webhook job notify type.
status :
type : string
description : The webhook job status.
job_detail :
type : string
description : The webhook job notify detailed data.
creation_time :
type : string
description : The webhook job creation time.
format : date-time
update_time :
type : string
description : The webhook job update time.
format : date-time
2021-03-11 13:25:51 +01:00
InternalConfigurationsResponse :
type : object
2021-11-04 16:39:36 +01:00
additionalProperties :
$ref : '#/definitions/InternalConfigurationValue'
InternalConfigurationValue :
type : object
properties :
value :
type : object
description : The value of current config item
editable :
type : boolean
x-omitempty : false
description : The configure item can be updated or not
2021-03-11 13:25:51 +01:00
ConfigurationsResponse :
type : object
properties :
auth_mode :
$ref : '#/definitions/StringConfigItem'
description : The auth mode of current system, such as "db_auth", "ldap_auth", "oidc_auth"
2023-02-08 18:11:08 +01:00
primary_auth_mode :
$ref : '#/definitions/BoolConfigItem'
description : The flag to indicate whether the current auth mode should consider as a primary one.
2021-03-11 13:25:51 +01:00
ldap_base_dn :
$ref : '#/definitions/StringConfigItem'
description : The Base DN for LDAP binding.
ldap_filter :
$ref : '#/definitions/StringConfigItem'
description : The filter for LDAP search
ldap_group_base_dn :
$ref : '#/definitions/StringConfigItem'
description : The base DN to search LDAP group.
ldap_group_admin_dn :
$ref : '#/definitions/StringConfigItem'
description : Specify the ldap group which have the same privilege with Harbor admin
ldap_group_attribute_name :
$ref : '#/definitions/StringConfigItem'
description : The attribute which is used as identity of the LDAP group, default is cn.'
ldap_group_search_filter :
$ref : '#/definitions/StringConfigItem'
description : The filter to search the ldap group
ldap_group_search_scope :
$ref : '#/definitions/IntegerConfigItem'
description : The scope to search ldap group. ''0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE''
2024-08-09 09:24:25 +02:00
ldap_group_attach_parallel :
$ref : '#/definitions/BoolConfigItem'
description : Attach LDAP user group information in parallel.
2021-03-11 13:25:51 +01:00
ldap_scope :
$ref : '#/definitions/IntegerConfigItem'
description : The scope to search ldap users,'0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'
ldap_search_dn :
$ref : '#/definitions/StringConfigItem'
description : The DN of the user to do the search.
ldap_timeout :
$ref : '#/definitions/IntegerConfigItem'
description : Timeout in seconds for connection to LDAP server
ldap_uid :
$ref : '#/definitions/StringConfigItem'
description : The attribute which is used as identity for the LDAP binding, such as "CN" or "SAMAccountname"
ldap_url :
$ref : '#/definitions/StringConfigItem'
description : The URL of LDAP server
ldap_verify_cert :
$ref : '#/definitions/BoolConfigItem'
description : Whether verify your OIDC server certificate, disable it if your OIDC server is hosted via self-hosted certificate.
ldap_group_membership_attribute :
$ref : '#/definitions/StringConfigItem'
description : The user attribute to identify the group membership
project_creation_restriction :
$ref : '#/definitions/StringConfigItem'
description : Indicate who can create projects, it could be ''adminonly'' or ''everyone''.
read_only :
$ref : '#/definitions/BoolConfigItem'
description : The flag to indicate whether Harbor is in readonly mode.
self_registration :
$ref : '#/definitions/BoolConfigItem'
description : Whether the Harbor instance supports self-registration. If it''s set to false, admin need to add user to the instance.
token_expiration :
$ref : '#/definitions/IntegerConfigItem'
description : The expiration time of the token for internal Registry, in minutes.
uaa_client_id :
$ref : '#/definitions/StringConfigItem'
description : The client id of UAA
uaa_client_secret :
$ref : '#/definitions/StringConfigItem'
description : The client secret of the UAA
uaa_endpoint :
$ref : '#/definitions/StringConfigItem'
description : The endpoint of the UAA
uaa_verify_cert :
$ref : '#/definitions/BoolConfigItem'
description : Verify the certificate in UAA server
http_authproxy_endpoint :
$ref : '#/definitions/StringConfigItem'
description : The endpoint of the HTTP auth
http_authproxy_tokenreview_endpoint :
$ref : '#/definitions/StringConfigItem'
description : The token review endpoint
http_authproxy_admin_groups :
$ref : '#/definitions/StringConfigItem'
description : The group which has the harbor admin privileges
http_authproxy_admin_usernames :
$ref : '#/definitions/StringConfigItem'
description : The usernames which has the harbor admin privileges
http_authproxy_verify_cert :
$ref : '#/definitions/BoolConfigItem'
description : Verify the HTTP auth provider's certificate
http_authproxy_skip_search :
$ref : '#/definitions/BoolConfigItem'
description : Search user before onboard
http_authproxy_server_certificate :
$ref : '#/definitions/StringConfigItem'
description : The certificate of the HTTP auth provider
oidc_name :
$ref : '#/definitions/StringConfigItem'
description : The OIDC provider name
oidc_endpoint :
$ref : '#/definitions/StringConfigItem'
description : The endpoint of the OIDC provider
oidc_client_id :
$ref : '#/definitions/StringConfigItem'
description : The client ID of the OIDC provider
oidc_groups_claim :
$ref : '#/definitions/StringConfigItem'
description : The attribute claims the group name
oidc_admin_group :
$ref : '#/definitions/StringConfigItem'
description : The OIDC group which has the harbor admin privileges
2022-11-11 02:55:11 +01:00
oidc_group_filter :
$ref : '#/definitions/StringConfigItem'
2023-02-08 18:11:08 +01:00
description : The OIDC group filter which filters out the group doesn't match the regular expression
2021-03-11 13:25:51 +01:00
oidc_scope :
$ref : '#/definitions/StringConfigItem'
description : The scope of the OIDC provider
oidc_user_claim :
$ref : '#/definitions/StringConfigItem'
description : The attribute claims the username
oidc_verify_cert :
$ref : '#/definitions/BoolConfigItem'
description : Verify the OIDC provider's certificate'
oidc_auto_onboard :
$ref : '#/definitions/BoolConfigItem'
description : Auto onboard the OIDC user
oidc_extra_redirect_parms :
$ref : '#/definitions/StringConfigItem'
description : Extra parameters to add when redirect request to OIDC provider
robot_token_duration :
$ref : '#/definitions/IntegerConfigItem'
description : The robot account token duration in days
robot_name_prefix :
$ref : '#/definitions/StringConfigItem'
description : The rebot account name prefix
notification_enable :
$ref : '#/definitions/BoolConfigItem'
description : Enable notification
quota_per_project_enable :
$ref : '#/definitions/BoolConfigItem'
description : Enable quota per project
storage_per_project :
$ref : '#/definitions/IntegerConfigItem'
description : The storage quota per project
2022-06-10 04:59:40 +02:00
audit_log_forward_endpoint :
$ref : '#/definitions/StringConfigItem'
description : The endpoint of the audit log forwarder
skip_audit_log_database :
$ref : '#/definitions/BoolConfigItem'
description : Whether skip the audit log in database
2023-02-20 08:09:21 +01:00
scanner_skip_update_pulltime :
$ref : '#/definitions/BoolConfigItem'
description : Whether or not to skip update the pull time for scanner
2021-03-11 13:25:51 +01:00
scan_all_policy :
type : object
properties :
type :
type : string
description : 'The type of scan all policy, currently the valid values are "none" and "daily"'
parameter :
type : object
properties :
daily_time :
type : integer
description : 'The offset in seconds of UTC 0 o' 'clock, only valid when the policy type is "daily"'
2021-05-12 11:08:20 +02:00
description : 'The parameters of the policy, the values are dependent on the type of the policy.'
2022-11-15 04:30:01 +01:00
session_timeout :
$ref : '#/definitions/IntegerConfigItem'
description : The session timeout in minutes
2023-07-03 09:58:37 +02:00
banner_message :
$ref : '#/definitions/StringConfigItem'
description : The banner message for the UI.It is the stringified result of the banner message object
2021-03-11 13:25:51 +01:00
Configurations :
type : object
2021-11-04 16:39:36 +01:00
properties :
2021-05-24 13:13:55 +02:00
auth_mode :
type : string
2021-11-04 16:39:36 +01:00
description : The auth mode of current system, such as "db_auth", "ldap_auth", "oidc_auth"
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
2023-02-08 18:11:08 +01:00
primary_auth_mode :
type : boolean
x-nullable : true
x-omitempty : true
description : The flag to indicate whether the current auth mode should consider as a primary one.
2021-05-24 13:13:55 +02:00
ldap_base_dn :
type : string
2021-11-04 16:39:36 +01:00
description : The Base DN for LDAP binding.
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_filter :
type : string
2021-11-04 16:39:36 +01:00
description : The filter for LDAP search
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_group_base_dn :
type : string
2021-11-04 16:39:36 +01:00
description : The base DN to search LDAP group.
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_group_admin_dn :
type : string
2021-11-04 16:39:36 +01:00
description : Specify the ldap group which have the same privilege with Harbor admin
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_group_attribute_name :
type : string
2021-11-04 16:39:36 +01:00
description : The attribute which is used as identity of the LDAP group, default is cn.'
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_group_search_filter :
type : string
2021-11-04 16:39:36 +01:00
description : The filter to search the ldap group
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_group_search_scope :
type : integer
2021-11-04 16:39:36 +01:00
description : The scope to search ldap group. ''0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE''
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
2024-08-09 09:24:25 +02:00
ldap_group_attach_parallel :
type : boolean
description : Attach LDAP user group information in parallel, the parallel worker count is 5
x-omitempty : true
x-isnullable : true
2021-05-24 13:13:55 +02:00
ldap_scope :
type : integer
2021-11-04 16:39:36 +01:00
description : The scope to search ldap users,'0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_search_dn :
type : string
2021-11-04 16:39:36 +01:00
description : The DN of the user to do the search.
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_search_password :
type : string
2021-11-04 16:39:36 +01:00
description : The password of the ldap search dn
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_timeout :
type : integer
2021-11-04 16:39:36 +01:00
description : Timeout in seconds for connection to LDAP server
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_uid :
type : string
2021-11-04 16:39:36 +01:00
description : The attribute which is used as identity for the LDAP binding, such as "CN" or "SAMAccountname"
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_url :
type : string
2021-11-04 16:39:36 +01:00
description : The URL of LDAP server
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_verify_cert :
type : boolean
2021-11-04 16:39:36 +01:00
description : Whether verify your OIDC server certificate, disable it if your OIDC server is hosted via self-hosted certificate.
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
ldap_group_membership_attribute :
type : string
2021-11-04 16:39:36 +01:00
description : The user attribute to identify the group membership
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
project_creation_restriction :
type : string
2021-11-04 16:39:36 +01:00
description : Indicate who can create projects, it could be ''adminonly'' or ''everyone''.
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
read_only :
type : boolean
2021-11-04 16:39:36 +01:00
description : The flag to indicate whether Harbor is in readonly mode.
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
self_registration :
type : boolean
2021-11-04 16:39:36 +01:00
description : Whether the Harbor instance supports self-registration. If it''s set to false, admin need to add user to the instance.
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
token_expiration :
type : integer
2021-11-04 16:39:36 +01:00
description : The expiration time of the token for internal Registry, in minutes.
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
uaa_client_id :
type : string
2021-11-04 16:39:36 +01:00
description : The client id of UAA
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
uaa_client_secret :
type : string
2021-11-04 16:39:36 +01:00
description : The client secret of the UAA
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
uaa_endpoint :
type : string
2021-11-04 16:39:36 +01:00
description : The endpoint of the UAA
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
uaa_verify_cert :
type : boolean
2021-11-04 16:39:36 +01:00
description : Verify the certificate in UAA server
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
http_authproxy_endpoint :
type : string
2021-11-04 16:39:36 +01:00
description : The endpoint of the HTTP auth
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
http_authproxy_tokenreview_endpoint :
type : string
2021-11-04 16:39:36 +01:00
description : The token review endpoint
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
http_authproxy_admin_groups :
type : string
2021-11-04 16:39:36 +01:00
description : The group which has the harbor admin privileges
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
http_authproxy_admin_usernames :
type : string
2021-11-04 16:39:36 +01:00
description : The username which has the harbor admin privileges
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
http_authproxy_verify_cert :
type : boolean
2021-11-04 16:39:36 +01:00
description : Verify the HTTP auth provider's certificate
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
http_authproxy_skip_search :
type : boolean
2021-11-04 16:39:36 +01:00
description : Search user before onboard
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
http_authproxy_server_certificate :
type : string
2021-11-04 16:39:36 +01:00
description : The certificate of the HTTP auth provider
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
oidc_name :
type : string
2021-11-04 16:39:36 +01:00
description : The OIDC provider name
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
oidc_endpoint :
type : string
2021-11-04 16:39:36 +01:00
description : The endpoint of the OIDC provider
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
oidc_client_id :
type : string
2021-11-04 16:39:36 +01:00
description : The client ID of the OIDC provider
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
oidc_client_secret :
type : string
2021-11-04 16:39:36 +01:00
description : The OIDC provider secret
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
oidc_groups_claim :
type : string
2021-11-04 16:39:36 +01:00
description : The attribute claims the group name
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
oidc_admin_group :
type : string
2021-11-04 16:39:36 +01:00
description : The OIDC group which has the harbor admin privileges
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
2022-11-11 02:55:11 +01:00
oidc_group_filter :
type : string
description : The OIDC group filter which filters out the group name doesn't match the regular expression
x-omitempty : true
2023-02-08 18:11:08 +01:00
x-isnullable : true
2021-05-24 13:13:55 +02:00
oidc_scope :
type : string
2021-11-04 16:39:36 +01:00
description : The scope of the OIDC provider
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
oidc_user_claim :
type : string
2021-11-04 16:39:36 +01:00
description : The attribute claims the username
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
oidc_verify_cert :
type : boolean
2021-11-04 16:39:36 +01:00
description : Verify the OIDC provider's certificate'
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
oidc_auto_onboard :
type : boolean
2021-11-04 16:39:36 +01:00
description : Auto onboard the OIDC user
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
oidc_extra_redirect_parms :
type : string
2021-11-04 16:39:36 +01:00
description : Extra parameters to add when redirect request to OIDC provider
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
robot_token_duration :
type : integer
2021-11-04 16:39:36 +01:00
description : The robot account token duration in days
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
robot_name_prefix :
type : string
2021-11-04 16:39:36 +01:00
description : The rebot account name prefix
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
notification_enable :
type : boolean
2021-11-04 16:39:36 +01:00
description : Enable notification
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
quota_per_project_enable :
type : boolean
2021-11-04 16:39:36 +01:00
description : Enable quota per project
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
storage_per_project :
type : integer
2021-11-04 16:39:36 +01:00
description : The storage quota per project
2021-05-24 13:13:55 +02:00
x-omitempty : true
x-isnullable : true
2022-06-10 04:59:40 +02:00
audit_log_forward_endpoint :
type : string
description : The audit log forward endpoint
x-omitempty : true
2023-02-08 18:11:08 +01:00
x-isnullable : true
2022-06-10 04:59:40 +02:00
skip_audit_log_database :
type : boolean
description : Skip audit log database
x-omitempty : true
2022-11-15 04:30:01 +01:00
x-isnullable : true
session_timeout :
type : integer
description : The session timeout for harbor, in minutes.
x-omitempty : true
x-isnullable : true
2023-02-20 08:09:21 +01:00
scanner_skip_update_pulltime :
type : boolean
description : Whether or not to skip update pull time for scanner
x-omitempty : true
x-isnullable : true
2023-07-03 09:58:37 +02:00
banner_message :
type : string
description : The banner message for the UI.It is the stringified result of the banner message object
x-omitempty : true
x-isnullable : true
2021-03-11 13:25:51 +01:00
StringConfigItem :
type : object
properties :
value :
type : string
2021-06-29 15:50:39 +02:00
x-omitempty : false
2021-03-11 13:25:51 +01:00
description : The string value of current config item
editable :
type : boolean
2021-06-29 15:50:39 +02:00
x-omitempty : false
2021-03-11 13:25:51 +01:00
description : The configure item can be updated or not
BoolConfigItem :
type : object
properties :
value :
type : boolean
2021-06-29 15:50:39 +02:00
x-omitempty : false
2021-03-11 13:25:51 +01:00
description : The boolean value of current config item
editable :
type : boolean
2021-06-29 15:50:39 +02:00
x-omitempty : false
2021-03-11 13:25:51 +01:00
description : The configure item can be updated or not
IntegerConfigItem :
type : object
properties :
value :
type : integer
2021-06-29 15:50:39 +02:00
x-omitempty : false
2021-03-11 13:25:51 +01:00
description : The integer value of current config item
editable :
type : boolean
2021-06-29 15:50:39 +02:00
x-omitempty : false
2021-03-11 13:25:51 +01:00
description : The configure item can be updated or not
2021-04-02 08:22:18 +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
description : the name of the group member.
role_name :
type : string
description : the name of the role
role_id :
type : integer
description : the role id
entity_id :
type : integer
description : 'the id of entity, if the member is a user, it is user_id in user table. if the member is a user group, it is the user group' 's ID in user_group table.'
entity_type :
type : string
description : 'the entity' 's type, u for user entity, g for group entity.'
ProjectMember :
type : object
properties :
role_id :
type : integer
description : 'The role id 1 for projectAdmin, 2 for developer, 3 for guest, 4 for maintainer'
member_user :
$ref : '#/definitions/UserEntity'
member_group :
$ref : '#/definitions/UserGroup'
RoleRequest :
type : object
properties :
role_id :
type : integer
description : 'The role id 1 for projectAdmin, 2 for developer, 3 for guest, 4 for maintainer'
UserEntity :
type : object
properties :
user_id :
type : integer
description : The ID of the user.
username :
type : string
description : The name of the user.
2021-04-09 13:40:29 +02:00
UserProfile :
type : object
properties :
email :
type : string
realname :
type : string
comment :
type : string
UserCreationReq :
type : object
properties :
email :
type : string
2021-05-18 11:17:41 +02:00
maxLength : 255
2021-04-09 13:40:29 +02:00
realname :
type : string
comment :
type : string
password :
type : string
username :
type : string
2021-05-18 11:17:41 +02:00
maxLength : 255
2021-04-09 13:40:29 +02:00
OIDCUserInfo :
type : object
properties :
id :
type : integer
format : int
description : the ID of the OIDC info record
user_id :
type : integer
format : int
description : the ID of the user
subiss :
type : string
description : the concatenation of sub and issuer in the ID token
secret :
type : string
description : the secret of the OIDC user that can be used for CLI to push/pull artifacts
creation_time :
type : string
format : date-time
description : The creation time of the OIDC user info record.
update_time :
type : string
format : date-time
description : The update time of the OIDC user info record.
UserResp :
type : object
properties :
email :
type : string
realname :
type : string
comment :
type : string
user_id :
type : integer
format : int
username :
type : string
sysadmin_flag :
type : boolean
x-omitempty : false
admin_role_in_auth :
type : boolean
x-omitempty : false
description : indicate the admin privilege is grant by authenticator (LDAP), is always false unless it is the current login user
oidc_user_meta :
$ref : '#/definitions/OIDCUserInfo'
creation_time :
type : string
format : date-time
description : The creation time of the user.
update_time :
type : string
format : date-time
description : The update time of the user.
UserSysAdminFlag :
type : object
properties :
sysadmin_flag :
type : boolean
description : 'true-admin, false-not admin.'
UserSearch :
type : object
properties :
user_id :
type : integer
format : int
description : The ID of the user.
username :
type : string
PasswordReq :
type : object
properties :
old_password :
type : string
description : The user's existing password.
new_password :
type : string
description : New password for marking as to be updated.
UserSearchRespItem :
type : object
properties :
user_id :
type : integer
format : int
description : The ID of the user.
username :
type : string
Permission :
type : object
properties :
resource :
type : string
description : The permission resoruce
action :
type : string
description : The permission action
2023-11-09 02:47:07 +01:00
Permissions :
type : object
properties :
system :
type : array
description : The system level permissions
items :
$ref : '#/definitions/Permission'
project :
type : array
description : The project level permissions
items :
$ref : '#/definitions/Permission'
2021-04-09 13:40:29 +02:00
OIDCCliSecretReq :
type : object
properties :
secret :
type : string
description : The new secret
2021-04-09 09:30:20 +02: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
2023-02-23 12:57:50 +01:00
description : The health status of component. Is either "healthy" or "unhealthy".
2021-04-09 09:30:20 +02:00
error :
type : string
description : (optional) The error message when the status is "unhealthy"
2021-04-15 04:57:52 +02:00
Statistic :
type : object
properties :
private_project_count :
type : integer
format : int64
description : The count of the private projects
x-omitempty : false
private_repo_count :
type : integer
format : int64
description : The count of the private repositories
x-omitempty : false
public_project_count :
type : integer
format : int64
description : The count of the public projects
x-omitempty : false
public_repo_count :
type : integer
format : int64
description : The count of the public repositories
x-omitempty : false
total_project_count :
type : integer
format : int64
description : The count of the total projects, only be seen by the system admin
x-omitempty : false
total_repo_count :
type : integer
format : int64
description : The count of the total repositories, only be seen by the system admin
x-omitempty : false
2021-04-29 06:36:25 +02:00
total_storage_consumption :
type : integer
format : int64
description : The total storage consumption of blobs, only be seen by the system admin
2021-05-19 04:36:09 +02:00
x-omitempty : false
2022-01-05 04:13:40 +01:00
Accessory :
type : object
description : 'The accessory of the artifact'
properties :
id :
type : integer
format : int64
description : The ID of the accessory
artifact_id :
type : integer
format : int64
description : The artifact id of the accessory
x-omitempty : false
2023-03-22 03:58:30 +01:00
subject_artifact_id :
type : integer
format : int64
2023-03-22 14:48:09 +01:00
description : Going to be deprecated, use repo and digest for insteand. The subject artifact id of the accessory.
2023-03-08 10:03:12 +01:00
subject_artifact_digest :
type : string
description : The subject artifact digest of the accessory
2022-01-05 04:13:40 +01:00
x-omitempty : false
2023-03-22 14:48:09 +01:00
subject_artifact_repo :
type : string
description : The subject artifact repository name of the accessory
x-omitempty : false
2022-01-05 04:13:40 +01:00
size :
type : integer
format : int64
description : The artifact size of the accessory
x-omitempty : false
digest :
type : string
description : The artifact digest of the accessory
x-omitempty : false
type :
type : string
description : The artifact size of the accessory
x-omitempty : false
icon :
type : string
description : The icon of the accessory
x-omitempty : false
creation_time :
type : string
format : date-time
description : The creation time of the accessory
2022-07-11 10:35:04 +02:00
ScanDataExportRequest :
type : object
description : The criteria to select the scan data to export.
properties :
job_name :
type : string
description : Name of the scan data export job
projects :
type : array
items :
type : integer
format : int64
2022-08-22 04:51:25 +02:00
description : A list of one or more projects for which to export the scan data, currently only one project is supported due to performance concerns, but define as array for extension in the future.
2022-07-11 10:35:04 +02:00
labels :
type : array
items :
type : integer
format : int64
description : A list of one or more labels for which to export the scan data, defaults to all if empty
repositories :
type : string
description : A list of repositories for which to export the scan data, defaults to all if empty
cveIds :
type : string
description : CVE-IDs for which to export data. Multiple CVE-IDs can be specified by separating using ',' and enclosed between '{}'. Defaults to all if empty
tags :
type : string
description : A list of tags enclosed within '{}'. Defaults to all if empty
ScanDataExportJob :
type : object
description : The metadata associated with the scan data export job
properties :
id :
type : integer
format : int64
description : The id of the scan data export job
ScanDataExportExecution :
type : object
description : The replication execution
properties :
id :
type : integer
description : The ID of the execution
user_id :
type : integer
description : The ID if the user triggering the export job
status :
type : string
description : The status of the execution
trigger :
type : string
description : The trigger mode
start_time :
type : string
format : date-time
description : The start time
end_time :
type : string
format : date-time
description : The end time
status_text :
type : string
x-omitempty : false
description : The status text
user_name :
type : string
x-omitempty : false
description : The name of the user triggering the job
file_present :
type : boolean
x-omitempty : false
description : Indicates whether the export artifact is present in registry
ScanDataExportExecutionList :
type : object
description : The list of scan data export executions
properties :
items :
type : array
items :
$ref : '#/definitions/ScanDataExportExecution'
2022-11-03 03:47:40 +01:00
description : The list of scan data export executions
2023-02-08 18:11:08 +01:00
2022-11-03 03:47:40 +01:00
WorkerPool :
type : object
description : the worker pool of job service
2023-02-08 18:11:08 +01:00
properties :
2022-11-03 03:47:40 +01:00
pid :
type : integer
description : the process id of jobservice
worker_pool_id :
type : string
description : the id of the worker pool
start_at :
type : string
format : date-time
description : The start time of the work pool
heartbeat_at :
type : string
format : date-time
description : The heartbeat time of the work pool
concurrency :
type : integer
description : The concurrency of the work pool
2023-02-08 18:11:08 +01:00
host :
2022-11-03 03:47:40 +01:00
type : string
2023-02-08 18:11:08 +01:00
description : The host of the work pool
2022-11-03 03:47:40 +01:00
Worker :
type : object
description : worker in the pool
2023-02-08 18:11:08 +01:00
properties :
2022-11-03 03:47:40 +01:00
id :
type : string
description : the id of the worker
pool_id :
type : string
description : the id of the worker pool
job_name :
type : string
description : the name of the running job in the worker
job_id :
type : string
description : the id of the running job in the worker
start_at :
type : string
format : date-time
description : The start time of the worker
2022-11-17 13:12:07 +01:00
x-nullable : true
x-omitempty : true
2022-11-03 03:47:40 +01:00
check_in :
type : string
description : the checkin of the running job in the worker
checkin_at :
type : string
format : date-time
2022-11-17 13:12:07 +01:00
description : The checkin time of the worker
x-nullable : true
x-omitempty : true
ActionRequest :
type : object
description : The request to stop, pause or resume
properties :
action :
type : string
description : The action of the request, should be stop, pause or resume
2023-02-08 18:11:08 +01:00
enum :
2022-11-17 13:12:07 +01:00
- stop
- pause
- resume
JobQueue :
type : object
description : the job queue info
properties :
job_type :
type : string
description : The type of the job queue
count :
type : integer
description : The count of jobs in the job queue
latency :
type : integer
description : The latency the job queue (seconds)
paused :
type : boolean
description : The paused status of the job queue
x-omitempty : false
ScheduleTask :
type : object
description : the schedule task info
properties :
id :
type : integer
description : the id of the Schedule task
vendor_type :
type : string
description : the vendor type of the current schedule task
vendor_id :
type : integer
description : the vendor id of the current task
2022-11-24 03:38:52 +01:00
cron :
type : string
description : the cron of the current schedule task
update_time :
2022-11-17 13:12:07 +01:00
type : string
format : date-time
2022-11-24 03:38:52 +01:00
description : the update time of the schedule task
2022-11-17 13:12:07 +01:00
SchedulerStatus :
type : object
description : the scheduler status
properties :
paused :
type : boolean
description : if the scheduler is paused
2023-02-08 18:11:08 +01:00
x-omitempty : false
2023-07-12 13:18:08 +02:00
SecuritySummary :
type : object
description : the security summary
properties :
critical_cnt :
type : integer
format : int64
x-omitempty : false
description : the count of critical vulnerabilities
high_cnt :
type : integer
format : int64
description : the count of high vulnerabilities
medium_cnt :
type : integer
format : int64
x-omitempty : false
description : the count of medium vulnerabilities
low_cnt :
type : integer
format : int64
x-omitempty : false
description : the count of low vulnerabilities
none_cnt :
type : integer
format : int64
description : the count of none vulnerabilities
unknown_cnt :
type : integer
format : int64
description : the count of unknown vulnerabilities
total_vuls :
type : integer
format : int64
x-omitempty : false
description : the count of total vulnerabilities
scanned_cnt :
type : integer
format : int64
x-omitempty : false
description : the count of scanned artifacts
total_artifact :
type : integer
format : int64
x-omitempty : false
description : the total count of artifacts
fixable_cnt :
type : integer
format : int64
x-omitempty : false
description : the count of fixable vulnerabilities
dangerous_cves :
type : array
x-omitempty : true
description : the list of dangerous CVEs
items :
$ref : '#/definitions/DangerousCVE'
dangerous_artifacts :
type : array
x-omitempty : true
description : the list of dangerous artifacts
items :
$ref : '#/definitions/DangerousArtifact'
DangerousCVE :
type : object
description : the dangerous CVE information
properties :
2024-01-15 06:25:56 +01:00
cve_id :
2023-07-12 13:18:08 +02:00
type : string
description : the cve id
severity :
type : string
2024-01-15 06:25:56 +01:00
description : the severity of the CVE
2023-07-12 13:18:08 +02:00
cvss_score_v3 :
type : number
format : float64
description : the cvss score v3
desc :
type : string
description : the description of the CVE
package :
type : string
2024-01-15 06:25:56 +01:00
description : the package of the CVE
2023-07-12 13:18:08 +02:00
version :
type : string
description : the version of the package
DangerousArtifact :
type : object
description : the dangerous artifact information
properties :
2024-01-15 06:25:56 +01:00
project_id :
2023-07-12 13:18:08 +02:00
type : integer
format : int64
description : the project id of the artifact
repository_name :
type : string
description : the repository name of the artifact
2024-01-15 06:25:56 +01:00
digest :
2023-07-12 13:18:08 +02:00
type : string
description : the digest of the artifact
critical_cnt :
type : integer
x-omitempty : false
description : the count of critical vulnerabilities
high_cnt :
type : integer
format : int64
x-omitempty : false
description : the count of high vulnerabilities
medium_cnt :
type : integer
x-omitempty : false
description : the count of medium vulnerabilities
2023-07-19 04:17:14 +02:00
VulnerabilityItem :
type : object
description : the vulnerability item info
properties :
project_id :
type : integer
format : int64
description : the project ID of the artifact
repository_name :
type : string
description : the repository name of the artifact
digest :
type : string
description : the digest of the artifact
tags :
type : array
items :
type : string
description : the tags of the artifact
cve_id :
type : string
description : the CVE id of the vulnerability.
severity :
type : string
description : the severity of the vulnerability
cvss_v3_score :
type : number
format : float
description : the nvd cvss v3 score of the vulnerability
package :
type : string
description : the package of the vulnerability
version :
type : string
description : the version of the package
fixed_version :
type : string
description : the fixed version of the package
desc :
type : string
description : The description of the vulnerability
links :
type : array
2024-01-15 06:25:56 +01:00
items :
2023-07-19 04:17:14 +02:00
type : string
description : Links of the vulnerability
2024-04-09 10:07:47 +02:00
ScanType :
type : object
properties :
scan_type :
type : string
description : 'The scan type for the scan request. Two options are currently supported, vulnerability and sbom'
enum : [ vulnerability, sbom ]