diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 3b8a1e03f..7db7d4602 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -21,12 +21,9 @@ security: paths: /search: get: - summary: Search for projects, repositories and helm charts - description: > - The Search endpoint returns information about the projects ,repositories - and helm charts offered at public status or related to the current logged in user. The - response includes the project, repository list and charts in a proper - display order. + summary: 'Search for projects, repositories and helm charts' + description: | + The Search endpoint returns information about the projects ,repositories and helm charts offered at public status or related to the current logged in user. The response includes the project, repository list and charts in a proper display order. parameters: - name: q in: query @@ -47,9 +44,8 @@ paths: /projects: get: summary: List projects - description: > - This endpoint returns all projects created by Harbor, and can be - filtered by project name. + description: | + This endpoint returns all projects created by Harbor, and can be filtered by project name. parameters: - name: name in: query @@ -101,9 +97,8 @@ paths: description: Internal errors. head: summary: Check if the project name user provided already exists. - description: > - This endpoint is used to check if the project name user provided already - exist. + description: | + This endpoint is used to check if the project name user provided already exist. parameters: - name: project_name in: query @@ -231,9 +226,8 @@ paths: '/projects/{project_id}/logs': get: summary: Get access logs accompany with a relevant project. - description: > - This endpoint let user search access logs filtered by operations and - date time ranges. + description: | + This endpoint let user search access logs filtered by operations and date time ranges. parameters: - name: project_id in: path @@ -486,14 +480,7 @@ paths: description: Unexpected internal errors. post: summary: Create project member - 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. + 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: - Products parameters: @@ -511,17 +498,13 @@ paths: '201': description: Project member created successfully. '400': - description: >- - Illegal format of project member or project id is invalid, or LDAP - DN is invalid. + description: 'Illegal format of project member or project id is invalid, or LDAP DN is invalid.' '401': description: User need to log in first. '403': description: User in session does not have permission to the project. '404': - description: >- - Project does not exist, or the username does not found, or the user - group does not found. + description: 'Project does not exist, or the username does not found, or the user group does not found.' '409': description: An LDAP user group with same DN already exist. '500': @@ -586,9 +569,7 @@ paths: '200': description: Project member updated successfully. '400': - description: >- - Invalid role id, it should be 1,2 or 3, or invalid project id, or - invalid member id. + description: 'Invalid role id, it should be 1,2 or 3, or invalid project id, or invalid member id.' '401': description: User need to log in first. '403': @@ -628,18 +609,13 @@ paths: /statistics: get: summary: Get projects number and repositories number relevant to the user - description: > - This endpoint is aimed to statistic all of the projects number and - repositories number relevant to the logined user, also the public - projects number and repositories number. If the user is admin, he can - also get total projects number and total repositories number. + description: | + This endpoint is aimed to statistic all of the projects number and repositories number relevant to the logined user, also the public projects number and repositories number. If the user is admin, he can also get total projects number and total repositories number. tags: - Products responses: '200': - description: >- - Get the projects number and repositories number relevant to the user - successfully. + description: Get the projects number and repositories number relevant to the user successfully. schema: $ref: '#/definitions/StatisticMap' '401': @@ -649,10 +625,8 @@ paths: /users: get: summary: Get registered users of Harbor. - description: > - This endpoint is for user to search registered users, support for - filtering results with username.Notice, by now this operation is only - for administrator. + description: | + This endpoint is for user to search registered users, support for filtering results with username.Notice, by now this operation is only for administrator. parameters: - name: username in: query @@ -712,9 +686,7 @@ paths: '400': description: Unsatisfied with constraints of the user creation. '403': - description: >- - User registration can only be used by admin role user when - self-registration is off. + description: User registration can only be used by admin role user when self-registration is off. '415': $ref: '#/responses/UnsupportedMediaType' '500': @@ -822,10 +794,8 @@ paths: '/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. Guest users can change only their own - password. + description: | + This endpoint is for user to update password. Users with the admin role can change any user's password. Guest users can change only their own password. parameters: - name: user_id in: path @@ -835,7 +805,7 @@ paths: description: Registered user ID. - name: password in: body - description: Password to be updated. + 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/Password' @@ -849,7 +819,7 @@ paths: '401': description: Don't have authority to change password. Please check login status. '403': - description: Old password is not correct. + 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': description: Unexpected internal errors. '/users/{user_id}/sysadmin': @@ -889,10 +859,8 @@ paths: /repositories: get: summary: Get repositories accompany with relevant project and repo name. - description: > - This endpoint lets user search repositories accompanying with relevant - project ID and repo name. Repositories can be sorted by repo name, creation_time, - update_time in either ascending or descending order. + description: | + This endpoint lets user search repositories accompanying with relevant project ID and repo name. Repositories can be sorted by repo name, creation_time, update_time in either ascending or descending order. parameters: - name: project_id in: query @@ -909,9 +877,8 @@ paths: in: query type: string required: false - description: > - Sort method, valid values include: 'name', '-name', 'creation_time', '-creation_time', - 'update_time', '-update_time'. Here '-' stands for descending order. + description: | + Sort method, valid values include: 'name', '-name', 'creation_time', '-creation_time', 'update_time', '-update_time'. Here '-' stands for descending order. - name: label_id in: query type: integer @@ -948,9 +915,7 @@ paths: '400': description: Invalid project ID. '403': - description: >- - Project is not public or current user is irrelevant to the - repository. + description: Project is not public or current user is irrelevant to the repository. '404': description: Project ID does not exist. '500': @@ -1029,9 +994,7 @@ paths: '401': description: Unauthorized. '403': - description: >- - Forbidden. User should have read permisson for the repository to - perform the action. + description: Forbidden. User should have read permisson for the repository to perform the action. '404': description: Repository not found. post: @@ -1058,9 +1021,7 @@ paths: '401': description: Unauthorized. '403': - description: >- - Forbidden. User should have write permisson for the repository to - perform the action. + description: Forbidden. User should have write permisson for the repository to perform the action. '404': description: Resource not found. '/repositories/{repo_name}/labels/{label_id}': @@ -1087,18 +1048,14 @@ paths: '401': description: Unauthorized. '403': - description: >- - Forbidden. User should have write permisson for the repository to - perform the action. + description: Forbidden. User should have write permisson for the repository to perform the action. '404': description: Resource not found. '/repositories/{repo_name}/tags/{tag}': get: summary: Get the tag of the repository. - description: > - This endpoint aims to retrieve the tag of the repository. If deployed - with Notary, the signature property of response represents whether the - image is singed or not. If the property is null, the image is unsigned. + description: | + This endpoint aims to retrieve the tag of the repository. If deployed with Notary, the signature property of response represents whether the image is singed or not. If the property is null, the image is unsigned. parameters: - name: repo_name in: path @@ -1150,11 +1107,8 @@ paths: '/repositories/{repo_name}/tags': get: summary: Get tags of a relevant repository. - description: > - This endpoint aims to retrieve tags from a relevant repository. If - deployed with Notary, the signature property of response represents - whether the image is singed or not. If the property is null, the image - is unsigned. + description: | + This endpoint aims to retrieve tags from a relevant repository. If deployed with Notary, the signature property of response represents whether the image is singed or not. If the property is null, the image is unsigned. parameters: - name: repo_name in: path @@ -1205,9 +1159,7 @@ paths: '401': description: Unauthorized. '403': - description: >- - Forbidden. User should have read permisson for the image to perform - the action. + description: Forbidden. User should have read permisson for the image to perform the action. '404': description: Resource not found. post: @@ -1239,9 +1191,7 @@ paths: '401': description: Unauthorized. '403': - description: >- - Forbidden. User should have write permisson for the image to perform - the action. + description: Forbidden. User should have write permisson for the image to perform the action. '404': description: Resource not found. '/repositories/{repo_name}/tags/{tag}/labels/{label_id}': @@ -1273,9 +1223,7 @@ paths: '401': description: Unauthorized. '403': - description: >- - Forbidden. User should have write permisson for the image to perform - the action. + description: Forbidden. User should have write permisson for the image to perform the action. '404': description: Resource not found. '/repositories/{repo_name}/tags/{tag}/manifest': @@ -1298,9 +1246,7 @@ paths: in: query type: string required: false - description: >- - The version of manifest, valid value are "v1" and "v2", default is - "v2" + description: 'The version of manifest, valid value are "v1" and "v2", default is "v2"' tags: - Products responses: @@ -1315,10 +1261,8 @@ paths: '/repositories/{repo_name}/tags/{tag}/scan': post: summary: Scan the image. - description: > - Trigger jobservice to call Clair API to scan the image identified by the - repo_name and tag. Only project admins have permission to scan images - under the project. + description: | + Trigger jobservice to call Clair API to scan the image identified by the repo_name and tag. Only project admins have permission to scan images under the project. parameters: - name: repo_name in: path @@ -1348,24 +1292,16 @@ paths: /repositories/scanAll: post: summary: Scan all images of the registry. - description: > - The server will launch different jobs to scan each image on the - regsitry, so this is equivalent to calling the API to scan the image - one by one in background, so there's no way to track the overall status - of the "scan all" action. Only system adim has permission to call this - API. + description: | + The server will launch different jobs to scan each image on the regsitry, so this is equivalent to calling the API to scan the image one by one in background, so there's no way to track the overall status of the "scan all" action. Only system adim has permission to call this API. parameters: - name: project_id in: query type: integer - description: >- - When this parm is set only the images under the project identified - by the project_id will be scanned. + description: When this parm is set only the images under the project identified by the project_id will be scanned. responses: '202': - description: >- - The action is successully taken in the background. If some images - are failed to scan it will only be reflected in the job status. + description: The action is successully taken in the background. If some images are failed to scan it will only be reflected in the job status. '401': description: User needs to login or call the API with correct credentials. '403': @@ -1379,9 +1315,8 @@ paths: '/repositories/{repo_name}/tags/{tag}/vulnerability/details': get: summary: Get vulnerability details of the image. - description: > - Call Clair API to get the vulnerability based on the previous successful - scan. + description: | + Call Clair API to get the vulnerability based on the previous successful scan. parameters: - name: repo_name in: path @@ -1413,15 +1348,10 @@ paths: '/repositories/{repo_name}/signatures': get: summary: Get signature information of a repository - description: > - This endpoint aims to retrieve signature information of a repository, - the data is - + description: | + This endpoint aims to retrieve signature information of a repository, the data is from the nested notary instance of Harbor. - - If the repository does not have any signature information in notary, - this API will - + If the repository does not have any signature information in notary, this API will return an empty list with response code 200, instead of 404 parameters: - name: repo_name @@ -1451,9 +1381,7 @@ paths: type: integer format: int32 required: false - description: >- - The number of the requested public repositories, default is 10 if - not provided. + description: 'The number of the requested public repositories, default is 10 if not provided.' tags: - Products responses: @@ -1470,9 +1398,8 @@ paths: /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 + description: | + This endpoint let user see the recent operation logs of the projects which he is member of parameters: - name: username in: query @@ -1534,10 +1461,8 @@ paths: /jobs/replication: get: summary: List filters jobs according to the policy and repository - description: > - This endpoint let user list filters jobs according to the policy and - repository. (if start_time and end_time are both null, list jobs of last - 10 days) + description: | + This endpoint let user list filters jobs according to the policy and repository. (if start_time and end_time are both null, list jobs of last 10 days) tags: - Products parameters: @@ -1711,9 +1636,8 @@ paths: /policies/replication: get: summary: List filters policies by name and project_id - description: > - This endpoint let user list filters policies by name and project_id, if - name and project_id are nil, list returns all policies + description: | + This endpoint let user list filters policies by name and project_id, if name and project_id are nil, list returns all policies parameters: - name: name in: query @@ -1755,9 +1679,8 @@ paths: description: Unexpected internal errors. post: summary: Post creates a policy - description: > - This endpoint let user creates a policy, and if it is enabled, the - replication will be triggered right now. + description: | + This endpoint let user creates a policy, and if it is enabled, the replication will be triggered right now. parameters: - name: policyinfo in: body @@ -1775,9 +1698,7 @@ paths: '401': description: User need to log in first. '409': - description: >- - Policy name already used or policy already exists with the same - project and target. + description: Policy name already used or policy already exists with the same project and target. '415': $ref: '#/responses/UnsupportedMediaType' '500': @@ -1809,9 +1730,8 @@ paths: description: Unexpected internal errors. put: summary: 'Put modifies name, description, target and enablement of policy.' - description: > - This endpoint let user update policy name, description, target and - enablement. + description: | + This endpoint let user update policy name, description, target and enablement. parameters: - name: id in: path @@ -1837,9 +1757,7 @@ paths: '404': description: The specific repository ID's policy does not exist. '409': - description: >- - Policy name already used or policy already exists with the same - project and target. + description: Policy name already used or policy already exists with the same project and target. '500': description: Unexpected internal errors. /labels: @@ -1857,9 +1775,7 @@ paths: in: query type: string required: true - description: >- - The label scope. Valid values are g and p. g for global labels and p - for project labels. + 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 @@ -2003,9 +1919,8 @@ paths: '/labels/{id}/resources': get: summary: Get the resources that the label is referenced by. - description: > - This endpoint let user get the resources that the label is referenced - by. Only the replication policies are returned for now. + description: | + This endpoint let user get the resources that the label is referenced by. Only the replication policies are returned for now. parameters: - name: id in: path @@ -2056,9 +1971,8 @@ paths: /targets: get: summary: List filters targets by name. - description: > - This endpoint let user list filters targets by name, if name is nil, - list returns all targets. + description: | + This endpoint let user list filters targets by name, if name is nil, list returns all targets. parameters: - name: name in: query @@ -2107,9 +2021,8 @@ paths: /targets/ping: post: summary: Ping validates target. - description: > - This endpoint is for ping validates whether the target is reachable and - whether the credential is valid. + description: | + This endpoint is for ping validates whether the target is reachable and whether the credential is valid. parameters: - name: target in: body @@ -2123,13 +2036,9 @@ paths: '200': description: Ping target successfully. '400': - description: >- - Target id is invalid/ endpoint is needed/ invaild URL/ network - issue. + description: Target id is invalid/ endpoint is needed/ invaild URL/ network issue. '401': - description: >- - User need to log in first or wrong username/password for remote - target. + description: User need to log in first or wrong username/password for remote target. '404': description: Target not found. '415': @@ -2209,9 +2118,7 @@ paths: '200': description: Replication's target deleted successfully. '400': - description: >- - Replication's target ID is invalid or the target is used by - policies. + description: Replication's target ID is invalid or the target is used by policies. '401': description: Only admin has this authority. '404': @@ -2221,9 +2128,8 @@ paths: '/targets/{id}/policies/': get: summary: List the target relevant policies. - description: > - This endpoint list policies filter with specific replication's target - ID. + description: | + This endpoint list policies filter with specific replication's target ID. parameters: - name: id in: path @@ -2249,9 +2155,8 @@ paths: /internal/syncregistry: post: summary: Sync repositories from registry to DB. - description: > - This endpoint is for syncing all repositories of registry with - database. + description: | + This endpoint is for syncing all repositories of registry with database. tags: - Products responses: @@ -2268,9 +2173,8 @@ paths: /systeminfo: get: summary: Get general system info - description: > - This API is for retrieving general system info, this can be called by - anonymous request. + description: | + This API is for retrieving general system info, this can be called by anonymous request. tags: - Products responses: @@ -2283,9 +2187,8 @@ paths: /systeminfo/volumes: get: summary: Get system volume info (total/free size). - description: > - This endpoint is for retrieving system volume info that only provides - for admin user. + description: | + This endpoint is for retrieving system volume info that only provides for admin user. tags: - Products responses: @@ -2302,7 +2205,7 @@ paths: /systeminfo/getcert: get: summary: Get default root certificate. - description: > + description: | This endpoint is for downloading a default root certificate. tags: - Products @@ -2320,16 +2223,12 @@ paths: /ldap/ping: post: summary: Ping available ldap service. - description: > - This endpoint ping the available ldap service for test related - configuration parameters. + description: | + This endpoint ping the available ldap service for test related configuration parameters. parameters: - name: ldapconf in: body - description: >- - ldap configuration. support input ldap service configuration. If - it's a empty request, will load current configuration from the - system. + description: 'ldap configuration. support input ldap service configuration. If it''s a empty request, will load current configuration from the system.' required: false schema: $ref: '#/definitions/LdapConf' @@ -2351,9 +2250,8 @@ paths: /ldap/groups/search: get: summary: Search available ldap groups. - description: > - This endpoint searches the available ldap groups based on related - configuration parameters. support to search by groupname or groupdn. + description: | + This endpoint searches the available ldap groups based on related configuration parameters. support to search by groupname or groupdn. parameters: - name: groupname in: query @@ -2383,10 +2281,8 @@ paths: /ldap/users/search: get: summary: Search available ldap users. - description: > - This endpoint searches the available ldap users based on related - configuration parameters. Support searched by input ladp configuration, - load configuration from the system and specific filter. + description: | + This endpoint searches the available ldap users based on related configuration parameters. Support searched by input ladp configuration, load configuration from the system and specific filter. parameters: - name: username in: query @@ -2411,20 +2307,13 @@ paths: /ldap/users/import: post: 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. + 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: - 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. + 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' @@ -2573,7 +2462,7 @@ paths: summary: Get gc results. description: This endpoint let user get latest ten gc results. tags: - - Products + - Products responses: '200': description: Get gc results successfully. @@ -2587,19 +2476,19 @@ paths: description: User does not have permission of admin role. '500': description: Unexpected internal errors. - /system/gc/{id}: + '/system/gc/{id}': get: summary: Get gc status. description: This endpoint let user get gc status filtered by specific ID. parameters: - - name: id - in: path - type: integer - format: int64 - required: true - description: Relevant job ID + - name: id + in: path + type: integer + format: int64 + required: true + description: Relevant job ID tags: - - Products + - Products responses: '200': description: Get gc results successfully. @@ -2613,19 +2502,19 @@ paths: description: User does not have permission of admin role. '500': description: Unexpected internal errors. - /system/gc/{id}/log: + '/system/gc/{id}/log': get: summary: Get gc job log. description: This endpoint let user get gc job logs filtered by specific ID. parameters: - - name: id - in: path - type: integer - format: int64 - required: true - description: Relevant job ID + - name: id + in: path + type: integer + format: int64 + required: true + description: Relevant job ID tags: - - Products + - Products responses: '200': description: Get job log successfully. @@ -2644,7 +2533,7 @@ paths: summary: Get gc's schedule. description: This endpoint is for get schedule of gc job. tags: - - Products + - Products responses: '200': description: Get gc's schedule. @@ -2663,14 +2552,14 @@ paths: description: | This endpoint is for update gc schedule. parameters: - - name: schedule - in: body - required: true - schema: - $ref: '#/definitions/GCSchedule' - description: Updates of gs's schedule. + - name: schedule + in: body + required: true + schema: + $ref: '#/definitions/GCSchedule' + description: Updates of gs's schedule. tags: - - Products + - Products responses: '200': description: Updated replication's target successfully. @@ -2689,14 +2578,14 @@ paths: description: | This endpoint is for update gc schedule. parameters: - - name: schedule - in: body - required: true - schema: - $ref: '#/definitions/GCSchedule' - description: Updates of gs's schedule. + - name: schedule + in: body + required: true + schema: + $ref: '#/definitions/GCSchedule' + description: Updates of gs's schedule. tags: - - Products + - Products responses: '200': description: Updated replication's target successfully. @@ -2713,9 +2602,8 @@ paths: /configurations: get: summary: Get system configurations. - description: > - This endpoint is for retrieving system configurations that only provides - for admin user. + description: | + This endpoint is for retrieving system configurations that only provides for admin user. tags: - Products responses: @@ -2731,9 +2619,8 @@ paths: description: Unexpected internal errors. put: summary: Modify system configurations. - description: > - This endpoint is for modifying system configurations that only provides - for admin user. + description: | + This endpoint is for modifying system configurations that only provides for admin user. tags: - Products parameters: @@ -2742,9 +2629,7 @@ paths: 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. + 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. @@ -2757,9 +2642,8 @@ paths: /configurations/reset: post: summary: Reset system configurations. - description: > - Reset system configurations from environment variables. Can only be - accessed by admin user. + description: | + Reset system configurations from environment variables. Can only be accessed by admin user. tags: - Products responses: @@ -2781,9 +2665,7 @@ paths: parameters: - name: settings in: body - description: >- - Email server settings, if some of the settings are not assigned, - they will be read from system configuration. + description: 'Email server settings, if some of the settings are not assigned, they will be read from system configuration.' required: false schema: $ref: '#/definitions/EmailServerSetting' @@ -2821,7 +2703,7 @@ paths: $ref: '#/definitions/UnauthorizedChartAPIError' '403': $ref: '#/definitions/ForbiddenChartAPIError' - /chartrepo/{repo}/charts: + '/chartrepo/{repo}/charts': get: summary: Get all the charts under the specified project description: Get all the charts under the specified project @@ -2835,39 +2717,41 @@ paths: required: true description: The project name responses: + '200': + $ref: '#/definitions/ChartInfoList' '401': $ref: '#/definitions/UnauthorizedChartAPIError' '403': $ref: '#/definitions/ForbiddenChartAPIError' '500': $ref: '#/definitions/InternalChartAPIError' - '200': - $ref: '#/definitions/ChartInfoList' post: summary: Upload a chart file to the specified project. - description: Upload a chart file to the specified project. With this API, the corresponding provance file can be uploaded together with chart file at once. + description: 'Upload a chart file to the specified project. With this API, the corresponding provance file can be uploaded together with chart file at once.' tags: - - Products - - Chart Repository + - Products + - Chart Repository consumes: - - multipart/form-data + - multipart/form-data parameters: - - name: repo - in: path - type: string - required: true - description: The project name - - name: chart - in: formData - type: file - required: true - description: The chart file - - name: prov - in: formData - type: file - required: false - description: The provance file + - name: repo + in: path + type: string + required: true + description: The project name + - name: chart + in: formData + type: file + required: true + description: The chart file + - name: prov + in: formData + type: file + required: false + description: The provance file responses: + '201': + description: The specified chart is successfully uploaded. '401': $ref: '#/definitions/UnauthorizedChartAPIError' '403': @@ -2876,9 +2760,7 @@ paths: $ref: '#/definitions/InternalChartAPIError' '507': $ref: '#/definitions/InsufficientStorageChartAPIError' - '201': - description: The specified chart is successfully uploaded. - /chartrepo/{repo}/charts/{name}: + '/chartrepo/{repo}/charts/{name}': get: summary: Get all the versions of the specified chart description: Get all the versions of the specified chart @@ -2897,6 +2779,8 @@ paths: required: true description: The chart name responses: + '200': + $ref: '#/definitions/ChartVersions' '401': $ref: '#/definitions/UnauthorizedChartAPIError' '403': @@ -2905,8 +2789,6 @@ paths: $ref: '#/definitions/NotFoundChartAPIError' '500': $ref: '#/definitions/InternalChartAPIError' - '200': - $ref: '#/definitions/ChartVersions' delete: summary: Delete all the versions of the specified chart description: Delete all the versions of the specified chart @@ -2925,15 +2807,15 @@ paths: required: true description: The chart name responses: + '200': + description: The specified chart entry is successfully deleted. '401': $ref: '#/definitions/UnauthorizedChartAPIError' '403': $ref: '#/definitions/ForbiddenChartAPIError' '500': $ref: '#/definitions/InternalChartAPIError' - '200': - description: The specified chart entry is successfully deleted. - /chartrepo/{repo}/charts/{name}/{version}: + '/chartrepo/{repo}/charts/{name}/{version}': get: summary: Get the specified chart version description: Get the specified chart version @@ -2957,6 +2839,8 @@ paths: required: true description: The chart version responses: + '200': + $ref: '#/definitions/ChartVersionDetails' '401': $ref: '#/definitions/UnauthorizedChartAPIError' '403': @@ -2965,8 +2849,6 @@ paths: $ref: '#/definitions/NotFoundChartAPIError' '500': $ref: '#/definitions/InternalChartAPIError' - '200': - $ref: '#/definitions/ChartVersionDetails' delete: summary: Delete the specified chart version description: Delete the specified chart version @@ -2990,6 +2872,8 @@ paths: required: true description: The chart version responses: + '200': + description: The specified chart entry is successfully deleted. '401': $ref: '#/definitions/UnauthorizedChartAPIError' '403': @@ -2998,9 +2882,7 @@ paths: $ref: '#/definitions/NotFoundChartAPIError' '500': $ref: '#/definitions/InternalChartAPIError' - '200': - description: The specified chart entry is successfully deleted. - /chartrepo/{repo}/prov: + '/chartrepo/{repo}/prov': post: summary: Upload a provance file to the specified project. description: Upload a provance file to the specified project. The provance file should be targeted for an existing chart file. @@ -3021,6 +2903,8 @@ paths: required: true description: The provance file responses: + '201': + description: The provance file is successfully uploaded. '401': $ref: '#/definitions/UnauthorizedChartAPIError' '403': @@ -3029,8 +2913,6 @@ paths: $ref: '#/definitions/InternalChartAPIError' '507': $ref: '#/definitions/InsufficientStorageChartAPIError' - '201': - description: The provance file is successfully uploaded. /chartrepo/charts: post: summary: Upload a chart file to the defult 'library' project. @@ -3052,6 +2934,8 @@ paths: required: false description: The provance file responses: + '201': + description: The specified chart is successfully uploaded. '401': $ref: '#/definitions/UnauthorizedChartAPIError' '403': @@ -3060,13 +2944,9 @@ paths: $ref: '#/definitions/InternalChartAPIError' '507': $ref: '#/definitions/InsufficientStorageChartAPIError' - '201': - description: The specified chart is successfully uploaded. responses: UnsupportedMediaType: - description: >- - The Media Type of the request is not supported, it has to be - "application/json" + description: 'The Media Type of the request is not supported, it has to be "application/json"' definitions: Search: type: object @@ -3097,9 +2977,7 @@ definitions: 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) + 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 @@ -3146,9 +3024,7 @@ definitions: 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) + 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 of the current user who triggered the API (for UI) @@ -3163,31 +3039,19 @@ definitions: properties: public: type: string - description: >- - The public status of the project. The valid values are "true", - "false". + 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 cann't - pull unsigned images from this project. The valid values are "true", - "false". + description: 'Whether content trust is enabled or not. If it is enabled, user cann''t pull unsigned images from this project. The valid values are "true", "false".' prevent_vulnerable_images_from_running: type: string - description: >- - Whether prevent the vulnerable images from running. The valid values - are "true", "false". + description: 'Whether prevent the vulnerable images from running. The valid values are "true", "false".' prevent_vulnerable_images_from_running_severity: type: string - description: >- - If the vulnerability is high than severity defined here, the images - cann't be pulled. The valid values are "negligible", "low", "medium", - "high", "critical". + description: 'If the vulnerability is high than severity defined here, the images cann''t be pulled. The valid values are "negligible", "low", "medium", "high", "critical".' automatically_scan_images_on_push: type: string - description: >- - Whether scan images automatically when pushing. The valid values are - "true", "false". + description: 'Whether scan images automatically when pushing. The valid values are "true", "false".' Manifest: type: object properties: @@ -3299,9 +3163,7 @@ definitions: private_repo_count: type: integer format: int32 - description: >- - The count of the private repositories belonging to the projects which - the user is a member of. + description: The count of the private repositories belonging to the projects which the user is a member of. public_project_count: type: integer format: int32 @@ -3309,9 +3171,7 @@ definitions: public_repo_count: type: integer format: int32 - description: >- - The count of the public repositories belonging to the public projects - which the user is a member of. + description: The count of the public repositories belonging to the public projects which the user is a member of. total_project_count: type: integer format: int32 @@ -3319,9 +3179,7 @@ definitions: total_repo_count: type: integer format: int32 - description: >- - The count of the total repositories, only be seen when the user is - admin. + description: 'The count of the total repositories, only be seen when the user is admin.' JobStatus: type: object properties: @@ -3409,9 +3267,7 @@ definitions: properties: kind: type: string - description: >- - The replication policy trigger kind. The valid values are manual, - immediate and schedule. + description: 'The replication policy trigger kind. The valid values are manual, immediate and schedule.' schedule_param: $ref: '#/definitions/ScheduleParam' ScheduleParam: @@ -3433,15 +3289,10 @@ definitions: properties: kind: type: string - description: >- - The replication policy filter kind. The valid values are project, - repository and tag. + description: 'The replication policy filter kind. The valid values are project, repository and tag.' value: type: string - description: >- - The value of replication policy filter. When creating repository and - tag filter, filling it with the pattern as string. When creating label - filter, filling it with label ID as integer. + description: 'The value of replication policy filter. When creating repository and tag filter, filling it with the pattern as string. When creating label filter, filling it with label ID as integer.' pattern: type: string description: 'Depraceted, use value instead. The replication policy filter pattern.' @@ -3473,9 +3324,7 @@ definitions: description: Reserved field. insecure: type: boolean - description: >- - Whether or not the certificate will be verified when Harbor tries to - access the server. + description: Whether or not the certificate will be verified when Harbor tries to access the server. creation_time: type: string description: The create time of the policy. @@ -3499,9 +3348,7 @@ definitions: description: The target server password. insecure: type: boolean - description: >- - Whether or not the certificate will be verified when Harbor tries to - access the server. + description: Whether or not the certificate will be verified when Harbor tries to access the server. PingTarget: type: object properties: @@ -3520,9 +3367,7 @@ definitions: description: The target server password. insecure: type: boolean - description: >- - Whether or not the certificate will be verified when Harbor tries to - access the server. + description: Whether or not the certificate will be verified when Harbor tries to access the server. PutTarget: type: object properties: @@ -3540,9 +3385,7 @@ definitions: description: The target server password. insecure: type: boolean - description: >- - Whether or not the certificate will be verified when Harbor tries to - access the server. + description: Whether or not the certificate will be verified when Harbor tries to access the server. HasAdminRole: type: object properties: @@ -3592,41 +3435,29 @@ definitions: description: The auth mode of current Harbor instance. project_creation_restriction: type: string - description: >- - Indicate who can create projects, it could be 'adminonly' or - 'everyone'. + description: 'Indicate who can create projects, it could be ''adminonly'' or ''everyone''.' self_registration: type: boolean description: Indicate whether the Harbor instance enable user to register himself. has_ca_root: type: boolean - description: >- - Indicate whether there is a ca root cert file ready for download in - the file system. + description: Indicate whether there is a ca root cert file ready for download in the file system. harbor_version: type: string description: The build version of Harbor. next_scan_all: type: integer - description: >- - The UTC time in milliseconds, after which user can call scanAll API to - scan all images. + description: 'The UTC time in milliseconds, after which user can call scanAll API to scan all images.' clair_vulnerability_status: type: object description: The status of vulnerability data of Clair. properties: overall_last_update: type: integer - description: >- - The UTC timestamp in milliseconds of last successful update for - Clair vulnerability data, when all the updaters are successfully - executed. + description: 'The UTC timestamp in milliseconds of last successful update for Clair vulnerability data, when all the updaters are successfully executed.' details: type: array - description: >- - Detail timestamp of different namespace. This is introduced to - handle the case when some updaters are executed successfully and - some not. + description: Detail timestamp of different namespace. This is introduced to handle the case when some updaters are executed successfully and some not. items: $ref: '#/definitions/VulnNamespaceTimestamp' VulnNamespaceTimestamp: @@ -3637,9 +3468,7 @@ definitions: description: The namespace of the Vulnerability last_update: type: integer - description: >- - The UTC timestamp in miliseconds of last successful update for - vulnerability data. + description: The UTC timestamp in miliseconds of last successful update for vulnerability data. SystemInfo: type: object properties: @@ -3685,14 +3514,10 @@ definitions: description: search ldap user name based on ldapconf. ldap_realname: type: string - description: >- - system will try to guess the user realname form "uid" or "cn" - attribute. + description: system will try to guess the user realname form "uid" or "cn" attribute. ldap_email: type: string - description: >- - system will try to guess the user email address form "mail" or "email" - attribute. + description: system will try to guess the user email address form "mail" or "email" attribute. LdapImportUsers: type: object properties: @@ -3769,9 +3594,7 @@ definitions: description: The build time of the image. signature: type: object - description: >- - The signature of image, defined by RepoSignature. If it is null, the - image is unsigned. + description: 'The signature of image, defined by RepoSignature. If it is null, the image is unsigned.' scan_overview: type: object description: The overview of the scan result. This is an optional property. @@ -3781,9 +3604,7 @@ definitions: description: The digest of the image. scan_status: type: string - description: >- - The status of the scan job, it can be "pendnig", "running", - "finished", "error". + description: 'The status of the scan job, it can be "pendnig", "running", "finished", "error".' job_id: type: integer description: The ID of the job on jobservice to scan the image. @@ -3792,9 +3613,7 @@ definitions: description: '0-Not scanned, 1-Negligible, 2-Unknown, 3-Low, 4-Medium, 5-High' details_key: type: string - description: >- - The top layer name of this image in Clair, this is for calling - Clair API to get the vulnerability list of this image. + description: 'The top layer name of this image in Clair, this is for calling Clair API to get the vulnerability list of this image.' components: type: object description: The components overview of the image. @@ -3876,9 +3695,7 @@ definitions: description: The description of the vulnerability. fixedVersion: type: string - description: >- - The version which the vulnerability is fixed, this is an optional - property. + description: 'The version which the vulnerability is fixed, this is an optional property.' Configurations: type: object properties: @@ -3902,15 +3719,10 @@ definitions: description: The username for authenticate against SMTP server. email_ssl: type: boolean - description: >- - When it's set to true the system will access Email server via TLS by - default. If it's set to false, it still will handle "STARTTLS" from - server side. + description: 'When it''s set to true the system will access Email server via TLS by default. If it''s set to false, it still will handle "STARTTLS" from server side.' email_insecure: type: boolean - description: >- - Whether or not the certificate will be verified when Harbor tries to - access the email server. + description: Whether or not the certificate will be verified when Harbor tries to access the email server. ldap_url: type: string description: The URL of LDAP server. @@ -3925,9 +3737,7 @@ definitions: description: '0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE' ldap_uid: type: string - description: >- - The attribute which is used as identity for the LDAP binding, such as - "CN" or "SAMAccountname" + description: 'The attribute which is used as identity for the LDAP binding, such as "CN" or "SAMAccountname"' ldap_search_dn: type: string description: The DN of the user to do the search. @@ -3936,9 +3746,7 @@ definitions: description: timeout in seconds for connection to LDAP server. ldap_group_attribute_name: type: string - description: >- - The attribute which is used as identity of the LDAP group, default is - cn. + description: 'The attribute which is used as identity of the LDAP group, default is cn.' ldap_group_base_dn: type: string description: The base DN to search LDAP group. @@ -3947,54 +3755,38 @@ definitions: description: The filter to search the ldap group. ldap_group_search_scope: type: integer - description: >- - The scope to search ldap. '0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, - 2-LDAP_SCOPE_SUBTREE' + description: 'The scope to search ldap. ''0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE''' ldap_group_admin_dn: type: string - description: >- - Specify the ldap group which have the same privilege with Harbor - admin. + description: Specify the ldap group which have the same privilege with Harbor admin. project_creation_restriction: type: string - description: >- - This attribute restricts what users have the permission to create - project. It can be "everyone" or "adminonly". + description: This attribute restricts what users have the permission to create project. It can be "everyone" or "adminonly". read_only: type: boolean description: '''docker push'' is prohibited by Harbor if you set it to true. ' self_registration: type: boolean - description: >- - Whether the Harbor instance supports self-registration. If it's set - to false, admin need to add user to the instance. + description: 'Whether the Harbor instance supports self-registration. If it''s set to false, admin need to add user to the instance.' token_expiration: type: integer description: 'The expiration time of the token for internal Registry, in minutes.' verify_remote_cert: type: boolean - description: >- - Whether or not the certificate will be verified when Harbor tries to - access a remote Harbor instance for replication. + description: Whether or not the certificate will be verified when Harbor tries to access a remote Harbor instance for replication. scan_all_policy: type: object properties: type: type: string - description: >- - The type of scan all policy, currently the valid values are "none" - and "daily" + 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 offest in seconds of UTC 0 o'clock, only valid when the - policy type is "daily" - description: >- - The parameters of the policy, the values are dependant on the type - of the policy. + description: 'The offest in seconds of UTC 0 o''clock, only valid when the policy type is "daily"' + description: 'The parameters of the policy, the values are dependant on the type of the policy.' ConfigurationsResponse: type: object properties: @@ -4003,7 +3795,7 @@ definitions: description: 'The auth mode of current system, such as "db_auth", "ldap_auth"' email_from: $ref: '#/definitions/StringConfigItem' - description: "The sender name for Email notification." + description: The sender name for Email notification. email_host: $ref: '#/definitions/StringConfigItem' description: The hostname of SMTP server that sends Email notification. @@ -4018,15 +3810,10 @@ definitions: description: The username for authenticate against SMTP server. email_ssl: $ref: '#/definitions/BoolConfigItem' - description: >- - When it's set to true the system will access Email server via TLS by - default. If it's set to false, it still will handle "STARTTLS" from - server side. + description: 'When it''s set to true the system will access Email server via TLS by default. If it''s set to false, it still will handle "STARTTLS" from server side.' email_insecure: $ref: '#/definitions/BoolConfigItem' - description: >- - Whether or not the certificate will be verified when Harbor tries to - access the email server. + description: Whether or not the certificate will be verified when Harbor tries to access the email server. ldap_url: $ref: '#/definitions/StringConfigItem' description: The URL of LDAP server. @@ -4041,9 +3828,7 @@ definitions: description: '0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE' ldap_uid: $ref: '#/definitions/StringConfigItem' - description: >- - The attribute which is used as identity for the LDAP binding, such as - "CN" or "SAMAccountname" + description: 'The attribute which is used as identity for the LDAP binding, such as "CN" or "SAMAccountname"' ldap_search_dn: type: string description: The DN of the user to do the search. @@ -4052,9 +3837,7 @@ definitions: description: timeout in seconds for connection to LDAP server. ldap_group_attribute_name: $ref: '#/definitions/StringConfigItem' - description: >- - The attribute which is used as identity of the LDAP group, default is - cn. + description: 'The attribute which is used as identity of the LDAP group, default is cn.' ldap_group_base_dn: $ref: '#/definitions/StringConfigItem' description: The base DN to search LDAP group. @@ -4063,54 +3846,38 @@ definitions: description: The filter to search the ldap group. ldap_group_search_scope: $ref: '#/definitions/IntegerConfigItem' - description: >- - The scope to search ldap. '0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, - 2-LDAP_SCOPE_SUBTREE' + description: 'The scope to search ldap. ''0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE''' ldap_group_admin_dn: $ref: '#/definitions/StringConfigItem' - description: >- - Specify the ldap group which have the same privilege with Harbor - admin. + description: Specify the ldap group which have the same privilege with Harbor admin. project_creation_restriction: $ref: '#/definitions/StringConfigItem' - description: >- - This attribute restricts what users have the permission to create - project. It can be "everyone" or "adminonly". + description: This attribute restricts what users have the permission to create project. It can be "everyone" or "adminonly". read_only: $ref: '#/definitions/BoolConfigItem' description: '''docker push'' is prohibited by Harbor if you set it to true. ' 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. + 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.' verify_remote_cert: $ref: '#/definitions/BoolConfigItem' - description: >- - Whether or not the certificate will be verified when Harbor tries to - access a remote Harbor instance for replication. + description: Whether or not the certificate will be verified when Harbor tries to access a remote Harbor instance for replication. scan_all_policy: type: object properties: type: type: string - description: >- - The type of scan all policy, currently the valid values are "none" - and "daily" + 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 offest in seconds of UTC 0 o'clock, only valid when the - policy type is "daily" - description: >- - The parameters of the policy, the values are dependant on the type - of the policy. + description: 'The offest in seconds of UTC 0 o''clock, only valid when the policy type is "daily"' + description: 'The parameters of the policy, the values are dependant on the type of the policy.' Replication: type: object properties: @@ -4182,10 +3949,7 @@ definitions: description: the role id entity_id: type: integer - description: >- - the id of entity, if the member is an user, it is user_id in user - table. if the member is an user group, it is the user group's ID in - user_group table. + description: 'the id of entity, if the member is an user, it is user_id in user table. if the member is an user group, it is the user group''s ID in user_group table.' entity_type: type: string description: 'the entity''s type, u for user entity, g for group entity.' @@ -4494,7 +4258,3 @@ definitions: description: The matched level chart: $ref: '#/definitions/ChartVersion' - - - -