{"info": {"version": "1.10.0", "description": "These APIs provide services for manipulating Harbor project.", "title": "Harbor API"}, "paths": {"/users/{user_id}/cli_secret": {"put": {"description": "This endpoint let user generate a new CLI secret for himself.  This API only works when auth mode is set to 'OIDC'.\nOnce this API returns with successful status, the old secret will be invalid, as there will be only one CLI secret\nfor a user.\n", "summary": "Set CLI secret for a user.", "responses": {"200": {"description": "The secret is successfully updated"}, "404": {"description": "User ID does not exist."}, "403": {"description": "Non-admin user can only generate the cli secret of himself."}, "412": {"description": "The auth mode of the system is not \"oidc_auth\", or the user is not onboarded via OIDC AuthN."}, "401": {"description": "User need to log in first."}, "400": {"description": "Invalid user ID.  Or user is not onboarded via OIDC authentication. Or the secret does not meet the standard."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "User ID", "format": "int", "required": true, "type": "integer", "name": "user_id"}, {"required": true, "in": "body", "description": "JSON object that includes the new secret", "name": "input_secret", "schema": {"type": "object", "properties": {"secret": {"type": "string", "description": "The new secret"}}}}], "tags": ["Products"]}}, "/system/gc/schedule": {"put": {"description": "This endpoint is for update gc schedule.\n", "summary": "Update gc's schedule.", "responses": {"200": {"description": "Updated gc's schedule successfully."}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Invalid schedule type."}}, "parameters": [{"required": true, "in": "body", "description": "Updates of gc's schedule.", "name": "schedule", "schema": {"$ref": "#/definitions/AdminJobSchedule"}}], "tags": ["Products"]}, "post": {"description": "This endpoint is for update gc schedule.\n", "summary": "Create a gc schedule.", "responses": {"200": {"description": "GC schedule successfully."}, "403": {"description": "User does not have permission of admin role."}, "500": {"description": "Unexpected internal errors."}, "401": {"description": "User need to log in first."}, "400": {"description": "Invalid schedule type."}, "409": {"description": "There is a \"gc\" job in progress, so the request cannot be served."}}, "parameters": [{"required": true, "in": "body", "description": "Updates of gc's schedule.", "name": "schedule", "schema": {"$ref": "#/definitions/AdminJobSchedule"}}], "tags": ["Products"]}, "get": {"description": "This endpoint is for get schedule of gc job.", "summary": "Get gc's schedule.", "responses": {"200": {"description": "Get gc's schedule.", "schema": {"$ref": "#/definitions/AdminJobSchedule"}}, "403": {"description": "Only admin has this authority."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "tags": ["Products"]}}, "/chartrepo/{repo}/charts/{name}/{version}/labels": {"post": {"description": "Mark label to the specified chart version.", "summary": "Mark label to chart.", "responses": {"200": {"description": "The label is successfully marked to the chart version."}, "404": {"$ref": "#/definitions/NotFoundChartAPIError"}, "403": {"$ref": "#/definitions/ForbiddenChartAPIError"}, "409": {"$ref": "#/definitions/ConflictFormatedError"}, "401": {"$ref": "#/definitions/UnauthorizedChartAPIError"}, "400": {"$ref": "#/definitions/BadRequestFormatedError"}, "500": {"$ref": "#/definitions/InternalChartAPIError"}}, "parameters": [{"required": true, "type": "string", "description": "The project name", "in": "path", "name": "repo"}, {"required": true, "type": "string", "description": "The chart name", "in": "path", "name": "name"}, {"required": true, "type": "string", "description": "The chart version", "in": "path", "name": "version"}, {"required": true, "in": "body", "description": "The label being marked to the chart version", "name": "label", "schema": {"$ref": "#/definitions/Label"}}], "tags": ["Products", "Chart Repository", "Label"]}, "get": {"description": "Return the attahced labels of the specified chart version.", "summary": "Return the attahced labels of chart.", "responses": {"200": {"$ref": "#/definitions/Labels"}, "404": {"$ref": "#/definitions/NotFoundChartAPIError"}, "403": {"$ref": "#/definitions/ForbiddenChartAPIError"}, "401": {"$ref": "#/definitions/UnauthorizedChartAPIError"}, "500": {"$ref": "#/definitions/InternalChartAPIError"}}, "parameters": [{"required": true, "type": "string", "description": "The project name", "in": "path", "name": "repo"}, {"required": true, "type": "string", "description": "The chart name", "in": "path", "name": "name"}, {"required": true, "type": "string", "description": "The chart version", "in": "path", "name": "version"}], "tags": ["Products", "Chart Repository", "Label"]}}, "/scans/all/metrics": {"get": {"description": "Get the metrics of the latest scan all process", "summary": "Get the metrics of the latest scan all process", "responses": {"200": {"description": "OK", "schema": {"$ref": "#/definitions/Stats"}}, "403": {"description": "Request is not allowed"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}}, "tags": ["Products", "Scan"]}}, "/labels/{id}/resources": {"get": {"description": "This endpoint let user get the resources that the label is referenced by. Only the replication policies are returned for now.\n", "summary": "Get the resources that the label is referenced by.", "responses": {"200": {"description": "Get successfully.", "schema": {"$ref": "#/definitions/Resource"}}, "404": {"description": "The resource does not exist."}, "403": {"description": "Forbidden."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Label ID", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}}, "/users/search": {"get": {"description": "This endpoint is to search the users by username.\n", "summary": "Search users by username", "responses": {"200": {"description": "Search users by username, email successfully.", "schema": {"items": {"$ref": "#/definitions/UserSearch"}, "type": "array"}}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "type": "string", "description": "Username for filtering results.", "in": "query", "name": "username"}, {"in": "query", "description": "The page number, default is 1.", "format": "int32", "required": false, "type": "integer", "name": "page"}, {"in": "query", "description": "The size of per page.", "format": "int32", "required": false, "type": "integer", "name": "page_size"}], "tags": ["Products"]}}, "/repositories/top": {"get": {"description": "This endpoint aims to let users see the most popular public repositories\n", "summary": "Get public repositories which are accessed most.", "responses": {"200": {"description": "Get popular repositories successfully.", "schema": {"items": {"$ref": "#/definitions/Repository"}, "type": "array"}}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Bad request because of invalid count."}}, "parameters": [{"in": "query", "description": "The number of the requested public repositories, default is 10 if not provided.", "format": "int32", "required": false, "type": "integer", "name": "count"}], "tags": ["Products"]}}, "/replication/executions/{id}": {"put": {"description": "This endpoint is for user to stop one execution of the replication.\n", "summary": "Stop the execution of the replication.", "responses": {"200": {"description": "Success."}, "404": {"description": "Resource requested does not exist."}, "403": {"description": "User has no privilege for the operation."}, "401": {"description": "User need to login first."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}, "400": {"description": "Bad request."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "The execution ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}, "get": {"description": "This endpoint is for user to get one execution of the replication.\n", "summary": "Get the execution of the replication.", "responses": {"200": {"description": "Success.", "schema": {"$ref": "#/definitions/ReplicationExecution"}}, "404": {"description": "Resource requested does not exist."}, "403": {"description": "User has no privilege for the operation."}, "401": {"description": "User need to login first."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}, "400": {"description": "Bad request."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "The execution ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}}, "/labels": {"post": {"description": "This endpoint let user creates a label.\n", "summary": "Post creates a label", "responses": {"201": {"description": "Create successfully."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}, "500": {"description": "Unexpected internal errors."}, "401": {"description": "User need to log in first."}, "400": {"description": "Invalid parameters."}, "409": {"description": "Label with the same name and same scope already exists."}}, "parameters": [{"required": true, "in": "body", "description": "The json object of label.", "name": "label", "schema": {"$ref": "#/definitions/Label"}}], "tags": ["Products"]}, "get": {"description": "This endpoint let user list labels by name, scope and project_id\n", "summary": "List labels according to the query strings.", "responses": {"200": {"description": "Get successfully.", "schema": {"items": {"$ref": "#/definitions/Label"}, "type": "array"}}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Invalid parameters."}}, "parameters": [{"required": false, "type": "string", "description": "The label name.", "in": "query", "name": "name"}, {"required": true, "type": "string", "description": "The label scope. Valid values are g and p. g for global labels and p for project labels.", "in": "query", "name": "scope"}, {"in": "query", "description": "Relevant project ID, required when scope is p.", "format": "int64", "required": false, "type": "integer", "name": "project_id"}, {"in": "query", "description": "The page nubmer.", "format": "int32", "required": false, "type": "integer", "name": "page"}, {"in": "query", "description": "The size of per page.", "format": "int32", "required": false, "type": "integer", "name": "page_size"}], "tags": ["Products"]}}, "/repositories/{repo_name}/tags/{tag}/manifest": {"get": {"description": "This endpoint aims to retreive manifests from a relevant repository.\n", "summary": "Get manifests of a relevant repository.", "responses": {"200": {"description": "Retrieved manifests from a relevant repository successfully.", "schema": {"$ref": "#/definitions/Manifest"}}, "404": {"description": "Retrieved manifests from a relevant repository not found."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "type": "string", "description": "Repository name", "in": "path", "name": "repo_name"}, {"required": true, "type": "string", "description": "Tag name", "in": "path", "name": "tag"}, {"required": false, "type": "string", "description": "The version of manifest, valid value are \"v1\" and \"v2\", default is \"v2\"", "in": "query", "name": "version"}], "tags": ["Products"]}}, "/registries/{id}/namespace": {"get": {"description": "This endpoint let user list namespaces of registry according to query.\n", "summary": "List namespaces of registry", "responses": {"200": {"description": "Success", "schema": {"items": {"$ref": "#/definitions/Namespace"}, "type": "array"}}, "404": {"description": "No registry found."}, "403": {"description": "User has no privilege for the operation."}, "401": {"description": "User need to login first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "type": "integer", "description": "The registry ID.", "in": "path", "name": "id"}, {"required": false, "type": "string", "description": "The name of namespace.", "in": "query", "name": "name"}], "tags": ["Products"]}}, "/chartrepo/{repo}/charts/{name}": {"get": {"description": "Get all the versions of the specified chart", "summary": "Get all the versions of the specified chart", "responses": {"200": {"description": "Retrieved all versions of the specified chart", "schema": {"$ref": "#/definitions/ChartVersions"}}, "404": {"$ref": "#/definitions/NotFoundChartAPIError"}, "403": {"$ref": "#/definitions/ForbiddenChartAPIError"}, "401": {"$ref": "#/definitions/UnauthorizedChartAPIError"}, "500": {"$ref": "#/definitions/InternalChartAPIError"}}, "parameters": [{"required": true, "type": "string", "description": "The project name", "in": "path", "name": "repo"}, {"required": true, "type": "string", "description": "The chart name", "in": "path", "name": "name"}], "tags": ["Products", "Chart Repository"]}, "delete": {"description": "Delete all the versions of the specified chart", "summary": "Delete all the versions of the specified chart", "responses": {"200": {"description": "The specified chart entry is successfully deleted."}, "403": {"$ref": "#/definitions/ForbiddenChartAPIError"}, "401": {"$ref": "#/definitions/UnauthorizedChartAPIError"}, "500": {"$ref": "#/definitions/InternalChartAPIError"}}, "parameters": [{"required": true, "type": "string", "description": "The project name", "in": "path", "name": "repo"}, {"required": true, "type": "string", "description": "The chart name", "in": "path", "name": "name"}], "tags": ["Products", "Chart Repository"]}}, "/repositories/{repo_name}/tags/{tag}/labels": {"post": {"description": "Add a label to the image.\n", "summary": "Add a label to image.", "responses": {"200": {"description": "Successfully."}, "404": {"description": "Resource not found."}, "403": {"description": "Forbidden. User should have write permisson for the image to perform the action."}, "401": {"description": "Unauthorized."}}, "parameters": [{"required": true, "type": "string", "description": "The name of repository.", "in": "path", "name": "repo_name"}, {"required": true, "type": "string", "description": "The tag of the image.", "in": "path", "name": "tag"}, {"required": true, "in": "body", "description": "Only the ID property is required.", "name": "label", "schema": {"$ref": "#/definitions/Label"}}], "tags": ["Products"]}, "get": {"description": "Get labels of an image specified by the repo_name and tag.\n", "summary": "Get labels of an image.", "responses": {"200": {"description": "Successfully.", "schema": {"items": {"$ref": "#/definitions/Label"}, "type": "array"}}, "404": {"description": "Resource not found."}, "403": {"description": "Forbidden. User should have read permisson for the image to perform the action."}, "401": {"description": "Unauthorized."}}, "parameters": [{"required": true, "type": "string", "description": "The name of repository.", "in": "path", "name": "repo_name"}, {"required": true, "type": "string", "description": "The tag of the image.", "in": "path", "name": "tag"}], "tags": ["Products"]}}, "/projects/{project_id}/webhook/jobs": {"get": {"description": "This endpoint returns webhook jobs of a project.\n", "summary": "List project webhook jobs", "responses": {"200": {"description": "List project webhook jobs successfully.", "schema": {"items": {"$ref": "#/definitions/WebhookJob"}, "type": "array"}}, "403": {"description": "User have no permission to list webhook jobs of the project."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Illegal format of provided ID value."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "query", "description": "The policy ID.", "format": "int64", "required": true, "type": "integer", "name": "policy_id"}], "tags": ["Products"]}}, "/ldap/ping": {"post": {"description": "This endpoint ping the available ldap service for test related configuration parameters.\n", "summary": "Ping available ldap service.", "responses": {"200": {"description": "Ping ldap service successfully."}, "403": {"description": "Only admin has this authority."}, "401": {"description": "User need to login first."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}, "400": {"description": "Inviald ldap configuration parameters."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": false, "in": "body", "description": "ldap configuration. support input ldap service configuration. If it's a empty request, will load current configuration from the system.", "name": "ldapconf", "schema": {"$ref": "#/definitions/LdapConf"}}], "tags": ["Products"]}}, "/registries/ping": {"post": {"description": "This endpoint checks status of a registry, the registry can be given by ID or URL (together with credential)\n", "summary": "Ping status of a registry.", "responses": {"200": {"description": "Registry is healthy."}, "404": {"description": "Registry not found (when registry is provided by ID)."}, "401": {"description": "User need to log in first."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}, "400": {"description": "No proper registry information provided."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "in": "body", "description": "Registry to ping.", "name": "registry", "schema": {"$ref": "#/definitions/Registry"}}], "tags": ["Products"]}}, "/projects/{project_id}/immutabletagrules/{id}": {"put": {"summary": "Update the immutable tag rule or enable or disable the rule", "responses": {"200": {"description": "Update the immutable tag rule successfully."}, "403": {"description": "User have no permission to update the immutable tag rule of the project."}, "401": {"description": "User need to log in first."}, "500": {"description": "Internal server errors."}, "400": {"description": "Illegal format of provided ID value."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "path", "description": "Immutable tag rule ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}, {"in": "body", "name": "immutabletagrule", "schema": {"$ref": "#/definitions/ImmutableTagRule"}}], "tags": ["Products"]}, "delete": {"summary": "Delete the immutable tag rule.", "responses": {"200": {"description": "Delete the immutable tag rule successfully."}, "403": {"description": "User have no permission to delete immutable tags of the project."}, "401": {"description": "User need to log in first."}, "500": {"description": "Internal server errors."}, "400": {"description": "Illegal format of provided ID value."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "path", "description": "Immutable tag rule ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}}, "/email/ping": {"post": {"description": "Test connection and authentication with email server.\n", "summary": "Test connection and authentication with email server.", "responses": {"200": {"description": "Ping email server successfully."}, "403": {"description": "Only admin has this authority."}, "401": {"description": "User need to login first."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}, "400": {"description": "Inviald email server settings."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": false, "in": "body", "description": "Email server settings, if some of the settings are not assigned, they will be read from system configuration.", "name": "settings", "schema": {"$ref": "#/definitions/EmailServerSetting"}}], "tags": ["Products"]}}, "/projects/{project_id}/robots": {"post": {"description": "Create a robot account for project", "summary": "Create a robot account for project", "responses": {"201": {"description": "Project member created successfully.", "schema": {"$ref": "#/definitions/RobotAccountPostRep"}}, "403": {"description": "User in session does not have permission to the project."}, "500": {"description": "Unexpected internal errors."}, "401": {"description": "User need to log in first."}, "400": {"description": "Project id is not valid."}, "409": {"description": "An robot account with same name already exist in the project."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"required": true, "in": "body", "description": "Request body of creating a robot account.", "name": "robot", "schema": {"$ref": "#/definitions/RobotAccountCreate"}}], "tags": ["Products", "Robot Account"]}, "get": {"description": "Get all robot accounts of specified project", "summary": "Get all robot accounts of specified project", "responses": {"200": {"description": "Get project robot accounts successfully.", "schema": {"items": {"$ref": "#/definitions/RobotAccount"}, "type": "array"}}, "404": {"description": "Project ID does not exist."}, "403": {"description": "User in session does not have permission to the project."}, "401": {"description": "User need to log in first."}, "400": {"description": "The project id is invalid."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}], "tags": ["Products", "Robot Account"]}}, "/system/gc/{id}/log": {"get": {"description": "This endpoint let user get gc job logs filtered by specific ID.", "summary": "Get gc job log.", "responses": {"200": {"description": "Get successfully.", "schema": {"type": "string"}}, "404": {"description": "The specific gc ID's log does not exist."}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "400": {"description": "Illegal format of provided ID value."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Relevant job ID", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}}, "/retentions/metadatas": {"get": {"description": "Get Retention Metadatas.", "summary": "Get Retention Metadatas", "responses": {"200": {"description": "Get Retention Metadatas successfully.", "schema": {"$ref": "#/definitions/RetentionMetadata"}}}, "tags": ["Products", "Retention"]}}, "/repositories/{repo_name}/tags/{tag}/scan/{uuid}/log": {"get": {"responses": {"200": {"description": "OK", "schema": {"type": "string", "example": "The scan log text"}}, "404": {"description": "The target artifact is not found"}, "403": {"description": "Request is not allowed"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}}, "parameters": [{"required": true, "type": "string", "description": "Repository name", "in": "path", "name": "repo_name"}, {"required": true, "type": "string", "description": "Tag name", "in": "path", "name": "tag"}, {"required": true, "type": "string", "description": "the scan unique identifier", "in": "path", "name": "uuid"}], "produces": ["text/plain"], "description": "Get the log text stream for the given artifact and scan action.", "tags": ["Products", "Scan"], "summary": "Get scan log"}}, "/search": {"get": {"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.\n", "summary": "Search for projects, repositories and helm charts", "responses": {"200": {"description": "An array of search results", "schema": {"items": {"$ref": "#/definitions/Search"}, "type": "array"}}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "type": "string", "description": "Search parameter for project and repository name.", "in": "query", "name": "q"}], "tags": ["Products"]}}, "/logs": {"get": {"description": "This endpoint let user see the recent operation logs of the projects which he is member of\n", "summary": "Get recent logs of the projects which the user is a member of", "responses": {"200": {"description": "Get the required logs successfully.", "schema": {"items": {"$ref": "#/definitions/AccessLog"}, "type": "array"}}, "401": {"description": "User need to login first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Bad request because of invalid parameters."}}, "parameters": [{"required": false, "type": "string", "description": "Username of the operator.", "in": "query", "name": "username"}, {"required": false, "type": "string", "description": "The name of repository", "in": "query", "name": "repository"}, {"required": false, "type": "string", "description": "The name of tag", "in": "query", "name": "tag"}, {"required": false, "type": "string", "description": "The operation", "in": "query", "name": "operation"}, {"required": false, "type": "string", "description": "The begin timestamp", "in": "query", "name": "begin_timestamp"}, {"required": false, "type": "string", "description": "The end timestamp", "in": "query", "name": "end_timestamp"}, {"in": "query", "description": "The page number, default is 1.", "format": "int32", "required": false, "type": "integer", "name": "page"}, {"in": "query", "description": "The size of per page, default is 10, maximum is 100.", "format": "int32", "required": false, "type": "integer", "name": "page_size"}], "tags": ["Products"]}}, "/chartrepo/{repo}/prov": {"post": {"responses": {"201": {"description": "The provance file is successfully uploaded."}, "507": {"$ref": "#/definitions/InsufficientStorageChartAPIError"}, "403": {"$ref": "#/definitions/ForbiddenChartAPIError"}, "401": {"$ref": "#/definitions/UnauthorizedChartAPIError"}, "500": {"$ref": "#/definitions/InternalChartAPIError"}}, "parameters": [{"required": true, "type": "string", "description": "The project name", "in": "path", "name": "repo"}, {"required": true, "type": "file", "description": "The provance file", "in": "formData", "name": "prov"}], "tags": ["Products", "Chart Repository"], "description": "Upload a provance file to the specified project. The provance file should be targeted for an existing chart file.", "consumes": ["multipart/form-data"], "summary": "Upload a provance file to the specified project."}}, "/projects/{project_id}/metadatas/{meta_name}": {"put": {"description": "This endpoint is aimed to update the metadata of a project.\n", "summary": "Update metadata of a project.", "responses": {"200": {"description": "Updated metadata successfully."}, "404": {"description": "Project or metadata does not exist."}, "403": {"description": "User does not have permission to the project."}, "401": {"description": "User need to log in first."}, "400": {"description": "Invalid request."}, "500": {"description": "Internal server errors."}}, "parameters": [{"in": "path", "description": "The ID of project.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"required": true, "type": "string", "description": "The name of metadat.", "in": "path", "name": "meta_name"}], "tags": ["Products"]}, "get": {"description": "This endpoint returns specified metadata of a project.\n", "summary": "Get project metadata", "responses": {"200": {"description": "Get metadata successfully.", "schema": {"$ref": "#/definitions/ProjectMetadata"}}, "401": {"description": "User need to log in first."}, "500": {"description": "Internal server errors."}}, "parameters": [{"in": "path", "description": "Project ID for filtering results.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"required": true, "type": "string", "description": "The name of metadat.", "in": "path", "name": "meta_name"}], "tags": ["Products"]}, "delete": {"description": "This endpoint is aimed to delete metadata of a project.\n", "summary": "Delete metadata of a project", "responses": {"200": {"description": "Metadata is deleted successfully."}, "404": {"description": "Project or metadata does not exist."}, "403": {"description": "User need to log in first."}, "500": {"description": "Internal server errors."}, "400": {"description": "Invalid requst."}}, "parameters": [{"in": "path", "description": "The ID of project.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"required": true, "type": "string", "description": "The name of metadat.", "in": "path", "name": "meta_name"}], "tags": ["Products"]}}, "/projects/{project_id}/scanner": {"put": {"description": "Set one of the system configured scanner registration as the indepndent scanner of the specified project.", "summary": "Configure scanner for the specified project", "responses": {"200": {"description": "Successfully set the project level scanner"}, "404": {"description": "The requested object is not found"}, "403": {"description": "Request is not allowed"}, "401": {"description": "Unauthorized request"}, "400": {"description": "Bad project ID"}, "500": {"description": "Internal server error happened"}}, "parameters": [{"in": "path", "description": "The project identifier.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"required": true, "in": "body", "name": "payload", "schema": {"$ref": "#/definitions/ProjectScanner"}}], "tags": ["Scanners"]}, "get": {"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.", "summary": "Get project level scanner", "responses": {"200": {"description": "The details of the scanner registration.", "schema": {"$ref": "#/definitions/ScannerRegistration"}}, "404": {"description": "The requested object is not found"}, "403": {"description": "Request is not allowed"}, "401": {"description": "Unauthorized request"}, "400": {"description": "Bad project ID"}, "500": {"description": "Internal server error happened"}}, "parameters": [{"in": "path", "description": "The project identifier.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}], "tags": ["Products", "Scanners"]}}, "/retentions/{id}/executions/{eid}/tasks": {"get": {"description": "Get Retention job tasks, each repository as a task.", "summary": "Get Retention job tasks", "responses": {"200": {"description": "Get Retention job tasks successfully.", "schema": {"items": {"type": "object", "$ref": "#/definitions/RetentionExecutionTask"}, "type": "array"}}, "403": {"description": "User have no permission."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Retention ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}, {"in": "path", "description": "Retention execution ID.", "format": "int64", "required": true, "type": "integer", "name": "eid"}], "tags": ["Products", "Retention"]}}, "/repositories/{repo_name}/labels/{label_id}": {"delete": {"description": "Delete the label from the repository specified by the repo_name.\n", "summary": "Delete label from the repository.", "responses": {"200": {"description": "Successfully."}, "404": {"description": "Resource not found."}, "403": {"description": "Forbidden. User should have write permisson for the repository to perform the action."}, "401": {"description": "Unauthorized."}}, "parameters": [{"required": true, "type": "string", "description": "The name of repository.", "in": "path", "name": "repo_name"}, {"required": true, "type": "integer", "description": "The ID of label.", "in": "path", "name": "label_id"}], "tags": ["Products"]}}, "/replication/adapters": {"get": {"description": "This endpoint let user list supported adapters.\n", "summary": "List supported adapters.", "responses": {"200": {"description": "Success.", "schema": {"items": {"type": "string"}, "type": "array"}}, "403": {"description": "Forbidden."}, "401": {"description": "Unauthorized."}, "500": {"description": "Unexpected internal errors."}}, "tags": ["Products"]}}, "/retentions/{id}": {"put": {"description": "Update Retention Policy, you can reference metadatas API for the policy model.\nYou can check project metadatas to find whether a retention policy is already binded.\nThis method should only be called when retention policy has already binded to project.\n", "summary": "Update Retention Policy", "responses": {"200": {"description": "Update Retention Policy successfully."}, "403": {"description": "User have no permission."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Retention ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}, {"required": true, "in": "body", "name": "policy", "schema": {"$ref": "#/definitions/RetentionPolicy"}}], "tags": ["Products"]}, "get": {"description": "Get Retention Policy.", "summary": "Get Retention Policy", "responses": {"200": {"description": "Get Retention Policy successfully.", "schema": {"$ref": "#/definitions/RetentionPolicy"}}, "403": {"description": "User have no permission."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Retention ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products", "Retention"]}}, "/scanners": {"post": {"description": "Creats a new scanner registration with the given data.\n", "summary": "Create a scanner registration", "responses": {"201": {"description": "Created successfully"}, "403": {"description": "Request is not allowed, system role required"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}, "400": {"description": "Bad registration request"}}, "parameters": [{"required": true, "in": "body", "description": "A scanner registration to be created.", "name": "registration", "schema": {"$ref": "#/definitions/ScannerRegistrationReq"}}], "tags": ["Scanners"]}, "get": {"description": "Returns a list of currently configured scanner registrations.\n", "summary": "List scanner registrations", "responses": {"200": {"description": "A list of scanner registrations.", "schema": {"items": {"$ref": "#/definitions/ScannerRegistration"}, "type": "array"}}, "403": {"description": "Request is not allowed, system role required"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}, "400": {"description": "Bad query paramters"}}, "tags": ["Products", "Scanners"]}}, "/systeminfo/volumes": {"get": {"description": "This endpoint is for retrieving system volume info that only provides for admin user.\n", "summary": "Get system volume info (total/free size).", "responses": {"200": {"description": "Get system volumes successfully.", "schema": {"$ref": "#/definitions/SystemInfo"}}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "tags": ["Products"]}}, "/statistics": {"get": {"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.\n", "summary": "Get projects number and repositories number relevant to the user", "responses": {"200": {"description": "Get the projects number and repositories number relevant to the user successfully.", "schema": {"$ref": "#/definitions/StatisticMap"}}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "tags": ["Products"]}}, "/replication/executions/{id}/tasks": {"get": {"description": "This endpoint is for user to get the task list of one execution.\n", "summary": "Get the task list of one execution.", "responses": {"200": {"description": "Success.", "schema": {"items": {"$ref": "#/definitions/ReplicationTask"}, "type": "array"}}, "404": {"description": "Resource requested does not exist."}, "403": {"description": "User has no privilege for the operation."}, "401": {"description": "User need to login first."}, "400": {"description": "Bad request."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "The execution ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}}, "/projects/{project_id}/webhook/policies/test": {"post": {"description": "This endpoint tests webhook connection of a project.\n", "summary": "Test project webhook connection", "responses": {"200": {"description": "Test webhook connection successfully."}, "403": {"description": "User have no permission to get webhook policy of the project."}, "401": {"description": "User need to log in first."}, "500": {"description": "Internal server errors."}, "400": {"description": "Illegal format of provided ID value."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"required": true, "in": "body", "description": "Only property \"targets\" needed.", "name": "policy", "schema": {"$ref": "#/definitions/WebhookPolicy"}}], "tags": ["Products"]}}, "/users": {"post": {"description": "This endpoint is to create a user if the user does not already exist.\n", "summary": "Creates a new user account.", "responses": {"201": {"description": "User created successfully."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}, "403": {"description": "User registration can only be used by admin role user when self-registration is off."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Unsatisfied with constraints of the user creation."}}, "parameters": [{"required": true, "in": "body", "description": "New created user.", "name": "user", "schema": {"$ref": "#/definitions/User"}}], "tags": ["Products"]}, "get": {"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.\n", "summary": "Get registered users of Harbor.", "responses": {"200": {"description": "Searched for users of Harbor successfully.", "schema": {"items": {"$ref": "#/definitions/User"}, "type": "array"}}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Invalid user ID."}}, "parameters": [{"required": false, "type": "string", "description": "Username for filtering results.", "in": "query", "name": "username"}, {"required": false, "type": "string", "description": "Email for filtering results.", "in": "query", "name": "email"}, {"in": "query", "description": "The page number, default is 1.", "format": "int32", "required": false, "type": "integer", "name": "page"}, {"in": "query", "description": "The size of per page.", "format": "int32", "required": false, "type": "integer", "name": "page_size"}], "tags": ["Products"]}}, "/registries/{id}/info": {"get": {"description": "Get the info of one specific registry.", "summary": "Get registry info.", "responses": {"200": {"description": "Get registry successfully.", "schema": {"$ref": "#/definitions/RegistryInfo"}}, "404": {"description": "Registry not found"}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "The registry ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}}, "/retentions/{id}/executions/{eid}/tasks/{tid}": {"get": {"description": "Get Retention job task log, tags ratain or deletion detail will be shown in a table.", "summary": "Get Retention job task log", "responses": {"200": {"description": "Get Retention job task log successfully.", "schema": {"type": "string"}}, "403": {"description": "User have no permission."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Retention ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}, {"in": "path", "description": "Retention execution ID.", "format": "int64", "required": true, "type": "integer", "name": "eid"}, {"in": "path", "description": "Retention execution ID.", "format": "int64", "required": true, "type": "integer", "name": "tid"}], "tags": ["Products", "Retention"]}}, "/projects/{project_id}/logs": {"get": {"description": "This endpoint let user search access logs filtered by operations and date time ranges.\n", "summary": "Get access logs accompany with a relevant project.", "responses": {"200": {"headers": {"X-Total-Count": {"type": "integer", "description": "The total count of access logs"}, "Link": {"type": "string", "description": "Link refers to the previous page and next page"}}, "description": "Get access log successfully.", "schema": {"items": {"$ref": "#/definitions/AccessLog"}, "type": "array"}}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Illegal format of provided ID value."}}, "parameters": [{"in": "path", "description": "Relevant project ID", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"required": false, "type": "string", "description": "Username of the operator.", "in": "query", "name": "username"}, {"required": false, "type": "string", "description": "The name of repository", "in": "query", "name": "repository"}, {"required": false, "type": "string", "description": "The name of tag", "in": "query", "name": "tag"}, {"required": false, "type": "string", "description": "The operation", "in": "query", "name": "operation"}, {"required": false, "type": "string", "description": "The begin timestamp", "in": "query", "name": "begin_timestamp"}, {"required": false, "type": "string", "description": "The end timestamp", "in": "query", "name": "end_timestamp"}, {"in": "query", "description": "The page number, default is 1.", "format": "int32", "required": false, "type": "integer", "name": "page"}, {"in": "query", "description": "The size of per page, default is 10, maximum is 100.", "format": "int32", "required": false, "type": "integer", "name": "page_size"}], "tags": ["Products"]}}, "/usergroups": {"post": {"description": "Create user group information", "summary": "Create user group", "responses": {"201": {"description": "User group created successfully."}, "403": {"description": "User in session does not have permission to the user group."}, "500": {"description": "Unexpected internal errors."}, "401": {"description": "User need to log in first."}, "400": {"description": "Invalid LDAP group DN."}, "409": {"description": "A user group with same group name already exist, or an LDAP user group with same DN already exist."}}, "parameters": [{"in": "body", "name": "usergroup", "schema": {"$ref": "#/definitions/UserGroup"}}], "tags": ["Products"]}, "get": {"description": "Get all user groups information", "summary": "Get all user groups information", "responses": {"200": {"description": "Get user group successfully.", "schema": {"items": {"$ref": "#/definitions/UserGroup"}, "type": "array"}}, "403": {"description": "User in session does not have permission to the user group."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "tags": ["Products"]}}, "/usergroups/{group_id}": {"put": {"description": "Update user group information", "summary": "Update group information", "responses": {"200": {"description": "User group updated successfully."}, "404": {"description": "User group does not exist."}, "403": {"description": "Only admin has this authority."}, "401": {"description": "User need to log in first."}, "400": {"description": "The user group id is invalid."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Group ID", "format": "int64", "required": true, "type": "integer", "name": "group_id"}, {"required": false, "in": "body", "name": "usergroup", "schema": {"$ref": "#/definitions/UserGroup"}}], "tags": ["Products"]}, "get": {"description": "Get user group information", "summary": "Get user group information", "responses": {"200": {"description": "User group get successfully.", "schema": {"$ref": "#/definitions/UserGroup"}}, "404": {"description": "User group does not exist."}, "403": {"description": "User in session does not have permission to the user group."}, "401": {"description": "User need to log in first."}, "400": {"description": "The user group id is invalid."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Group ID", "format": "int64", "required": true, "type": "integer", "name": "group_id"}], "tags": ["Products"]}, "delete": {"description": "Delete user group", "summary": "Delete user group", "responses": {"200": {"description": "User group deleted successfully."}, "403": {"description": "Only admin has this authority."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "The user group id is invalid."}}, "parameters": [{"required": true, "type": "integer", "name": "group_id", "in": "path"}], "tags": ["Products"]}}, "/quotas": {"get": {"description": "List quotas", "summary": "List quotas", "responses": {"200": {"headers": {"X-Total-Count": {"type": "integer", "description": "The total count of access logs"}, "Link": {"type": "string", "description": "Link refers to the previous page and next page"}}, "description": "Successfully retrieved the quotas.", "schema": {"items": {"$ref": "#/definitions/Quota"}, "type": "array"}}, "403": {"description": "User does not have permission to call this API."}, "401": {"description": "User is not authenticated."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": false, "type": "string", "description": "The reference type of quota.", "in": "query", "name": "reference"}, {"required": false, "type": "string", "description": "The reference id of quota.", "in": "query", "name": "reference_id"}, {"required": false, "type": "string", "description": "Sort method, valid values include:\n'hard.resource_name', '-hard.resource_name', 'used.resource_name', '-used.resource_name'.\nHere '-' stands for descending order, resource_name should be the real resource name of the quota.\n", "in": "query", "name": "sort"}, {"in": "query", "description": "The page number, default is 1.", "format": "int32", "required": false, "type": "integer", "name": "page"}, {"in": "query", "description": "The size of per page, default is 10, maximum is 100.", "format": "int32", "required": false, "type": "integer", "name": "page_size"}], "tags": ["Products"]}}, "/chartrepo/{repo}/charts": {"post": {"responses": {"201": {"description": "The specified chart is successfully uploaded."}, "507": {"$ref": "#/definitions/InsufficientStorageChartAPIError"}, "403": {"$ref": "#/definitions/ForbiddenChartAPIError"}, "401": {"$ref": "#/definitions/UnauthorizedChartAPIError"}, "500": {"$ref": "#/definitions/InternalChartAPIError"}}, "parameters": [{"required": true, "type": "string", "description": "The project name", "in": "path", "name": "repo"}, {"required": true, "type": "file", "description": "The chart file", "in": "formData", "name": "chart"}, {"required": false, "type": "file", "description": "The provance file", "in": "formData", "name": "prov"}], "tags": ["Products", "Chart Repository"], "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.", "consumes": ["multipart/form-data"], "summary": "Upload a chart file to the specified project."}, "get": {"description": "Get all the charts under the specified project", "summary": "Get all the charts under the specified project", "responses": {"200": {"description": "Searched for charts of project in Harbor successfully.", "schema": {"items": {"$ref": "#/definitions/ChartInfoEntry"}, "type": "array"}}, "403": {"$ref": "#/definitions/ForbiddenChartAPIError"}, "401": {"$ref": "#/definitions/UnauthorizedChartAPIError"}, "500": {"$ref": "#/definitions/InternalChartAPIError"}}, "parameters": [{"required": true, "type": "string", "description": "The project name", "in": "path", "name": "repo"}], "tags": ["Products", "Chart Repository"]}}, "/projects/{project_id}": {"put": {"description": "This endpoint is aimed to update the properties of a project.\n", "summary": "Update properties for a selected project.", "responses": {"200": {"description": "Updated project properties successfully."}, "404": {"description": "Project ID does not exist."}, "403": {"description": "User does not have permission to the project."}, "401": {"description": "User need to log in first."}, "400": {"description": "Illegal format of provided ID value."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Selected project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"required": true, "in": "body", "description": "Updates of project.", "name": "project", "schema": {"$ref": "#/definitions/ProjectReq"}}], "tags": ["Products"]}, "get": {"description": "This endpoint returns specific project information by project ID.\n", "summary": "Return specific project detail information", "responses": {"200": {"description": "Return matched project information.", "schema": {"$ref": "#/definitions/Project"}}, "401": {"description": "User need to log in first."}, "500": {"description": "Internal errors."}}, "parameters": [{"in": "path", "description": "Project ID for filtering results.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}], "tags": ["Products"]}, "delete": {"description": "This endpoint is aimed to delete project by project ID.\n", "summary": "Delete project by projectID", "responses": {"200": {"description": "Project is deleted successfully."}, "404": {"description": "Project does not exist."}, "403": {"description": "User need to log in first."}, "412": {"description": "Project contains policies, can not be deleted."}, "400": {"description": "Invalid project id."}, "500": {"description": "Internal errors."}}, "parameters": [{"in": "path", "description": "Project ID of project which will be deleted.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}], "tags": ["Products"]}}, "/users/current/permissions": {"get": {"description": "This endpoint is to get the current user permissions.\n", "summary": "Get current user permissions.", "responses": {"200": {"description": "Get current user permission successfully.", "schema": {"items": {"$ref": "#/definitions/Permission"}, "type": "array"}}, "401": {"description": "User need to log in first."}, "500": {"description": "Internal errors."}}, "parameters": [{"required": false, "type": "string", "description": "Get permissions of the scope", "in": "query", "name": "scope"}, {"required": false, "type": "boolean", "description": "If true, the resources in the response are relative to the scope,\neg for resource '/project/1/repository' if relative is 'true' then the resource in response will be 'repository'.\n", "in": "query", "name": "relative"}], "tags": ["Products"]}}, "/users/current": {"get": {"description": "This endpoint is to get the current user information.\n", "summary": "Get current user info.", "responses": {"200": {"description": "Get current user information successfully.", "schema": {"$ref": "#/definitions/User"}}, "401": {"description": "User need to log in first."}}, "tags": ["Products"]}}, "/labels/{id}": {"put": {"description": "This endpoint let user update label properties.\n", "summary": "Update the label properties.", "responses": {"200": {"description": "Update successfully."}, "404": {"description": "The resource does not exist."}, "500": {"description": "Unexpected internal errors."}, "401": {"description": "User need to log in first."}, "400": {"description": "Invalid parameters."}, "409": {"description": "The label with the same name already exists."}}, "parameters": [{"in": "path", "description": "Label ID", "format": "int64", "required": true, "type": "integer", "name": "id"}, {"required": true, "in": "body", "description": "The updated label json object.", "name": "label", "schema": {"$ref": "#/definitions/Label"}}], "tags": ["Products"]}, "get": {"description": "This endpoint let user get the label by specific ID.\n", "summary": "Get the label specified by ID.", "responses": {"200": {"description": "Get successfully.", "schema": {"$ref": "#/definitions/Label"}}, "404": {"description": "The resource does not exist."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Label ID", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}, "delete": {"description": "Delete the label specified by ID.\n", "summary": "Delete the label specified by ID.", "responses": {"200": {"description": "Delete successfully."}, "404": {"description": "The resource does not exist."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Invalid parameters."}}, "parameters": [{"in": "path", "description": "Label ID", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}}, "/projects/{project_id}/webhook/policies/{policy_id}": {"put": {"description": "This endpoint is aimed to update the webhook policy of a project.\n", "summary": "Update webhook policy of a project.", "responses": {"200": {"description": "Update webhook policy successfully."}, "404": {"description": "Webhook policy ID does not exist."}, "403": {"description": "User have no permission to update webhook policy of the project."}, "401": {"description": "User need to log in first."}, "400": {"description": "Illegal format of provided ID value."}, "500": {"description": "Internal server errors."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "path", "description": "The id of webhook policy.", "format": "int64", "required": true, "type": "integer", "name": "policy_id"}, {"required": true, "in": "body", "description": "All properties needed except \"id\", \"project_id\", \"creation_time\", \"update_time\".", "name": "policy", "schema": {"$ref": "#/definitions/WebhookPolicy"}}], "tags": ["Products"]}, "get": {"description": "This endpoint returns specified webhook policy of a project.\n", "summary": "Get project webhook policy", "responses": {"200": {"description": "Get webhook policy successfully.", "schema": {"$ref": "#/definitions/WebhookPolicy"}}, "404": {"description": "Webhook policy ID does not exist."}, "403": {"description": "User have no permission to get webhook policy of the project."}, "401": {"description": "User need to log in first."}, "400": {"description": "Illegal format of provided ID value."}, "500": {"description": "Internal server errors."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "path", "description": "The id of webhook policy.", "format": "int64", "required": true, "type": "integer", "name": "policy_id"}], "tags": ["Products"]}, "delete": {"description": "This endpoint is aimed to delete webhookpolicy of a project.\n", "summary": "Delete webhook policy of a project", "responses": {"200": {"description": "Delete webhook policy successfully."}, "404": {"description": "Webhook policy ID does not exist."}, "403": {"description": "User have no permission to delete webhook policy of the project."}, "401": {"description": "User need to log in first."}, "400": {"description": "Illegal format of provided ID value."}, "500": {"description": "Internal server errors."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "path", "description": "The id of webhook policy.", "format": "int64", "required": true, "type": "integer", "name": "policy_id"}], "tags": ["Products"]}}, "/system/scanAll/schedule": {"put": {"description": "This endpoint is for updating the schedule of scan all job, which scans all of images in Harbor.\n", "summary": "Update scan all's schedule.", "responses": {"200": {"description": "Updated scan_all's schedule successfully."}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Invalid schedule type."}}, "parameters": [{"required": true, "in": "body", "description": "Updates the schedule of scan all job, which scans all of images in Harbor.", "name": "schedule", "schema": {"$ref": "#/definitions/AdminJobSchedule"}}], "tags": ["Products"]}, "post": {"description": "This endpoint is for creating a schedule or a manual trigger for the scan all job, which scans all of images in Harbor.\n", "summary": "Create a schedule or a manual trigger for the scan all job.", "responses": {"200": {"description": "Updated scan_all's schedule successfully."}, "403": {"description": "User does not have permission of admin role."}, "500": {"description": "Unexpected internal errors."}, "401": {"description": "User need to log in first."}, "400": {"description": "Invalid schedule type."}, "503": {"description": "Harbor is not deployed with Clair."}, "409": {"description": "There is a \"scanall\" job in progress, so the request cannot be served."}}, "parameters": [{"required": true, "in": "body", "description": "Create a schedule or a manual trigger for the scan all job.", "name": "schedule", "schema": {"$ref": "#/definitions/AdminJobSchedule"}}], "tags": ["Products"]}, "get": {"description": "This endpoint is for getting a schedule for the scan all job, which scans all of images in Harbor.", "summary": "Get scan_all's schedule.", "responses": {"200": {"description": "Get a schedule for the scan all job, which scans all of images in Harbor.", "schema": {"$ref": "#/definitions/AdminJobSchedule"}}, "403": {"description": "Only admin has this authority."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "tags": ["Products"]}}, "/projects": {"head": {"description": "This endpoint is used to check if the project name user provided already exist.\n", "summary": "Check if the project name user provided already exists.", "responses": {"200": {"description": "Project name exists."}, "404": {"description": "Project name does not exist."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "type": "string", "description": "Project name for checking exists.", "in": "query", "name": "project_name"}], "tags": ["Products"]}, "post": {"description": "This endpoint is for user to create a new project.\n", "summary": "Create a new project.", "responses": {"201": {"description": "Project created successfully."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}, "500": {"description": "Unexpected internal errors."}, "401": {"description": "User need to log in first."}, "400": {"description": "Unsatisfied with constraints of the project creation."}, "409": {"description": "Project name already exists."}}, "parameters": [{"required": true, "in": "body", "description": "New created project.", "name": "project", "schema": {"$ref": "#/definitions/ProjectReq"}}], "tags": ["Products"]}, "get": {"description": "This endpoint returns all projects created by Harbor, and can be filtered by project name.\n", "summary": "List projects", "responses": {"200": {"headers": {"X-Total-Count": {"type": "integer", "description": "The total count of projects"}, "Link": {"type": "string", "description": "Link refers to the previous page and next page"}}, "description": "Return all matched projects.", "schema": {"items": {"$ref": "#/definitions/Project"}, "type": "array"}}, "401": {"description": "User need to log in first."}, "500": {"description": "Internal errors."}}, "parameters": [{"required": false, "type": "string", "description": "The name of project.", "in": "query", "name": "name"}, {"in": "query", "description": "The project is public or private.", "format": "int32", "required": false, "type": "boolean", "name": "public"}, {"required": false, "type": "string", "description": "The name of project owner.", "in": "query", "name": "owner"}, {"in": "query", "description": "The page number, default is 1.", "format": "int32", "required": false, "type": "integer", "name": "page"}, {"in": "query", "description": "The size of per page, default is 10, maximum is 100.", "format": "int32", "required": false, "type": "integer", "name": "page_size"}], "tags": ["Products"]}}, "/projects/{project_id}/metadatas": {"post": {"description": "This endpoint is aimed to add metadata of a project.\n", "summary": "Add metadata for the project.", "responses": {"200": {"description": "Add metadata successfully."}, "404": {"description": "Project ID does not exist."}, "403": {"description": "User does not have permission to the project."}, "401": {"description": "User need to log in first."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}, "400": {"description": "Invalid request."}, "500": {"description": "Internal server errors."}}, "parameters": [{"in": "path", "description": "Selected project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"required": true, "in": "body", "description": "The metadata of project.", "name": "metadata", "schema": {"$ref": "#/definitions/ProjectMetadata"}}], "tags": ["Products"]}, "get": {"description": "This endpoint returns metadata of the project specified by project ID.\n", "summary": "Get project metadata.", "responses": {"200": {"description": "Get metadata successfully.", "schema": {"$ref": "#/definitions/ProjectMetadata"}}, "401": {"description": "User need to login first."}, "500": {"description": "Internal server errors."}}, "parameters": [{"in": "path", "description": "The ID of project.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}], "tags": ["Products"]}}, "/repositories/{repo_name}/signatures": {"get": {"description": "This endpoint aims to retrieve signature information of a repository, the data is\nfrom the nested notary instance of Harbor.\nIf the repository does not have any signature information in notary, this API will\nreturn an empty list with response code 200, instead of 404\n", "summary": "Get signature information of a repository", "responses": {"200": {"description": "Retrieved signatures.", "schema": {"items": {"$ref": "#/definitions/RepoSignature"}, "type": "array"}}, "500": {"description": "Server side error."}}, "parameters": [{"required": true, "type": "string", "description": "repository name.", "in": "path", "name": "repo_name"}], "tags": ["Products"]}}, "/ldap/groups/search": {"get": {"description": "This endpoint searches the available ldap groups based on related configuration parameters. support to search by groupname or groupdn.\n", "summary": "Search available ldap groups.", "responses": {"200": {"description": "Search ldap group successfully.", "schema": {"items": {"$ref": "#/definitions/UserGroup"}, "type": "array"}}, "404": {"description": "No ldap group found."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "The Ldap group DN is invalid."}}, "parameters": [{"required": false, "type": "string", "description": "Ldap group name", "in": "query", "name": "groupname"}, {"required": false, "type": "string", "description": "The LDAP group DN", "in": "query", "name": "groupdn"}], "tags": ["Products"]}}, "/projects/{project_id}/robots/{robot_id}": {"put": {"description": "Used to disable/enable a specified robot account.", "summary": "Update status of robot account.", "responses": {"200": {"description": "Robot account has been modified success."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "path", "description": "The ID of robot account.", "format": "int64", "required": true, "type": "integer", "name": "robot_id"}, {"required": true, "in": "body", "description": "Request body of enable/disable a robot account.", "name": "robot", "schema": {"$ref": "#/definitions/RobotAccountUpdate"}}], "tags": ["Products", "Robot Account"]}, "get": {"description": "Return the infor of the specified robot account.", "summary": "Return the infor of the specified robot account.", "responses": {"200": {"description": "Robot account information.", "schema": {"$ref": "#/definitions/RobotAccount"}}, "404": {"description": "The robot account is not found."}, "403": {"description": "User in session does not have permission to the project."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "path", "description": "The ID of robot account.", "format": "int64", "required": true, "type": "integer", "name": "robot_id"}], "tags": ["Products", "Robot Account"]}, "delete": {"description": "Delete the specified robot account", "summary": "Delete the specified robot account", "responses": {"200": {"description": "The specified robot account is successfully deleted."}, "404": {"description": "The robot account is not found."}, "403": {"description": "User in session does not have permission to the project."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "path", "description": "The ID of robot account.", "format": "int64", "required": true, "type": "integer", "name": "robot_id"}], "tags": ["Products", "Robot Account"]}}, "/repositories/{repo_name}/tags/{tag}": {"get": {"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.\n", "summary": "Get the tag of the repository.", "responses": {"200": {"description": "Get tag successfully.", "schema": {"$ref": "#/definitions/DetailedTag"}}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "type": "string", "description": "Relevant repository name.", "in": "path", "name": "repo_name"}, {"required": true, "type": "string", "description": "Tag of the repository.", "in": "path", "name": "tag"}], "tags": ["Products"]}, "delete": {"description": "This endpoint let user delete tags with repo name and tag.\n", "summary": "Delete a tag in a repository.", "responses": {"200": {"description": "Delete tag successfully."}, "404": {"description": "Repository or tag not found."}, "403": {"description": "Forbidden."}, "401": {"description": "Unauthorized."}, "400": {"description": "Invalid repo_name."}}, "parameters": [{"required": true, "type": "string", "description": "The name of repository which will be deleted.", "in": "path", "name": "repo_name"}, {"required": true, "type": "string", "description": "Tag of a repository.", "in": "path", "name": "tag"}], "tags": ["Products"]}}, "/users/{user_id}": {"put": {"description": "This endpoint let a registered user change his profile.\n", "summary": "Update a registered user to change his profile.", "responses": {"200": {"description": "Updated user's profile successfully."}, "404": {"description": "User ID does not exist."}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "400": {"description": "Invalid user ID."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Registered user ID", "format": "int", "required": true, "type": "integer", "name": "user_id"}, {"required": true, "in": "body", "description": "Only email, realname and comment can be modified.", "name": "profile", "schema": {"$ref": "#/definitions/UserProfile"}}], "tags": ["Products"]}, "get": {"description": "Get user's profile with user id.\n", "summary": "Get a user's profile.", "responses": {"200": {"description": "Get user's profile successfully.", "schema": {"$ref": "#/definitions/User"}}, "404": {"description": "User ID does not exist."}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "400": {"description": "Invalid user ID."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Registered user ID", "format": "int", "required": true, "type": "integer", "name": "user_id"}], "tags": ["Products"]}, "delete": {"description": "This endpoint let administrator of Harbor mark a registered user as\nbe removed.It actually won't be deleted from DB.\n", "summary": "Mark a registered user as be removed.", "responses": {"200": {"description": "Marked user as be removed successfully."}, "404": {"description": "User ID does not exist."}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "400": {"description": "Invalid user ID."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "User ID for marking as to be removed.", "format": "int", "required": true, "type": "integer", "name": "user_id"}], "tags": ["Products"]}}, "/replication/policies": {"post": {"description": "This endpoint let user create a replication policy\n", "summary": "Create a replication policy", "responses": {"201": {"$ref": "#/responses/Created"}, "415": {"$ref": "#/responses/UnsupportedMediaType"}, "403": {"$ref": "#/responses/Forbidden"}, "409": {"$ref": "#/responses/Conflict"}, "401": {"$ref": "#/responses/Unauthorized"}, "400": {"$ref": "#/responses/BadRequest"}, "500": {"$ref": "#/responses/InternalServerError"}}, "parameters": [{"required": true, "in": "body", "description": "The policy model.", "name": "policy", "schema": {"$ref": "#/definitions/ReplicationPolicy"}}], "tags": ["Products"]}, "get": {"description": "This endpoint let user list replication policies\n", "summary": "List replication policies", "responses": {"200": {"description": "Get policy successfully.", "schema": {"items": {"$ref": "#/definitions/ReplicationPolicy"}, "type": "array"}}, "403": {"$ref": "#/responses/Forbidden"}, "401": {"$ref": "#/responses/Unauthorized"}, "500": {"$ref": "#/responses/InternalServerError"}, "400": {"$ref": "#/responses/BadRequest"}}, "parameters": [{"required": false, "type": "string", "description": "The replication policy name.", "in": "query", "name": "name"}, {"in": "query", "description": "The page nubmer.", "format": "int32", "required": false, "type": "integer", "name": "page"}, {"in": "query", "description": "The size of per page.", "format": "int32", "required": false, "type": "integer", "name": "page_size"}], "tags": ["Products"]}}, "/retentions/{id}/executions": {"post": {"description": "Trigger a Retention job, if dry_run is True, nothing would be deleted actually.", "summary": "Trigger a Retention job", "responses": {"200": {"description": "Trigger a Retention job successfully."}, "403": {"description": "User have no permission."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Retention ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}, {"required": true, "in": "body", "name": "action", "schema": {"type": "object", "properties": {"dry_run": {"type": "boolean"}}}}], "tags": ["Products", "Retention"]}, "get": {"description": "Get a Retention job, job status may be delayed before job service schedule it up.", "summary": "Get a Retention job", "responses": {"200": {"description": "Get a Retention job successfully.", "schema": {"items": {"type": "object", "$ref": "#/definitions/RetentionExecution"}, "type": "array"}}, "403": {"description": "User have no permission."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Retention ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products", "Retention"]}}, "/projects/{project_id}/summary": {"get": {"description": "Get summary of the project.", "summary": "Get summary of the project.", "responses": {"200": {"description": "Get summary of the project successfully.", "schema": {"$ref": "#/definitions/ProjectSummary"}}, "404": {"description": "Project ID does not exist."}, "403": {"description": "User does not have permission to get summary of the project."}, "401": {"description": "User need to log in first."}, "400": {"description": "Illegal format of provided ID value."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Relevant project ID", "format": "int64", "required": true, "type": "integer", "name": "project_id"}], "tags": ["Products"]}}, "/projects/{project_id}/scanner/candidates": {"get": {"description": "Retrieve the system configured scanner registrations as candidates of setting project level scanner.\n", "summary": "Get scanner registration candidates for configurating project level scanner", "responses": {"200": {"description": "A list of scanner registrations.", "schema": {"items": {"$ref": "#/definitions/ScannerRegistration"}, "type": "array"}}, "403": {"description": "Request is not allowed"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}, "400": {"description": "Bad project ID or query parameters"}}, "parameters": [{"in": "path", "description": "The project identifier.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}], "tags": ["Products", "Scanners"]}}, "/users/{user_id}/sysadmin": {"put": {"description": "This endpoint let a registered user change to be an administrator\nof Harbor.\n", "summary": "Update a registered user to change to be an administrator of Harbor.", "responses": {"200": {"description": "Updated user's admin role successfully."}, "404": {"description": "User ID does not exist."}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "400": {"description": "Invalid user ID."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Registered user ID", "format": "int", "required": true, "type": "integer", "name": "user_id"}, {"required": true, "in": "body", "description": "Toggle a user to admin or not.", "name": "has_admin_role", "schema": {"$ref": "#/definitions/HasAdminRole"}}], "tags": ["Products"]}}, "/users/{user_id}/password": {"put": {"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.\n", "summary": "Change the password on a user that already exists.", "responses": {"200": {"description": "Updated password successfully."}, "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."}, "401": {"description": "Don't have authority to change password. Please check login status."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Invalid user ID; Old password is blank; New password is blank."}}, "parameters": [{"in": "path", "description": "Registered user ID.", "format": "int", "required": true, "type": "integer", "name": "user_id"}, {"required": true, "in": "body", "description": "Password to be updated, the attribute 'old_password' is optional when the API is called by the system administrator.", "name": "password", "schema": {"$ref": "#/definitions/Password"}}], "tags": ["Products"]}}, "/projects/{project_id}/webhook/policies": {"post": {"description": "This endpoint create a webhook policy if the project does not have one.\n", "summary": "Create project webhook policy.", "responses": {"201": {"description": "Project webhook policy create successfully."}, "403": {"description": "User have no permission to create webhook policy of the project."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Illegal format of provided ID value."}}, "parameters": [{"in": "path", "description": "Relevant project ID", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"required": true, "in": "body", "description": "Properties \"targets\" and \"event_types\" needed.", "name": "policy", "schema": {"$ref": "#/definitions/WebhookPolicy"}}], "tags": ["Products"]}, "get": {"description": "This endpoint returns webhook policies of a project.\n", "summary": "List project webhook policies.", "responses": {"200": {"description": "List project webhook policies successfully.", "schema": {"items": {"$ref": "#/definitions/WebhookPolicy"}, "type": "array"}}, "403": {"description": "User have no permission to list webhook policies of the project."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Illegal format of provided ID value."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}], "tags": ["Products"]}}, "/chartrepo/{repo}/charts/{name}/{version}/labels/{id}": {"delete": {"description": "Remove label from the specified chart version.", "summary": "Remove label from chart.", "responses": {"200": {"description": "The label is successfully unmarked from the chart version."}, "404": {"$ref": "#/definitions/NotFoundChartAPIError"}, "403": {"$ref": "#/definitions/ForbiddenChartAPIError"}, "401": {"$ref": "#/definitions/UnauthorizedChartAPIError"}, "400": {"$ref": "#/definitions/BadRequestFormatedError"}, "500": {"$ref": "#/definitions/InternalChartAPIError"}}, "parameters": [{"required": true, "type": "string", "description": "The project name", "in": "path", "name": "repo"}, {"required": true, "type": "string", "description": "The chart name", "in": "path", "name": "name"}, {"required": true, "type": "string", "description": "The chart version", "in": "path", "name": "version"}, {"required": true, "type": "integer", "description": "The label ID", "in": "path", "name": "id"}], "tags": ["Products", "Chart Repository", "Label"]}}, "/system/gc": {"get": {"description": "This endpoint let user get latest ten gc results.", "summary": "Get gc results.", "responses": {"200": {"description": "Get gc results successfully.", "schema": {"items": {"$ref": "#/definitions/GCResult"}, "type": "array"}}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "tags": ["Products"]}}, "/scans/schedule/metrics": {"get": {"description": "Get the metrics of the latest scheduled scan all process", "summary": "Get the metrics of the latest scheduled scan all process", "responses": {"200": {"description": "OK", "schema": {"$ref": "#/definitions/Stats"}}, "403": {"description": "Request is not allowed"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}}, "tags": ["Products", "Scan"]}}, "/system/gc/{id}": {"get": {"description": "This endpoint let user get gc status filtered by specific ID.", "summary": "Get gc status.", "responses": {"200": {"description": "Get gc results successfully.", "schema": {"$ref": "#/definitions/GCResult"}}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Relevant job ID", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}}, "/replication/executions": {"post": {"description": "This endpoint is for user to start one execution of the replication.\n", "summary": "Start one execution of the replication.", "responses": {"201": {"description": "Success."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}, "403": {"description": "User has no privilege for the operation."}, "401": {"description": "User need to login first."}, "400": {"description": "Bad request."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "in": "body", "description": "The execution that needs to be started, only the property \"policy_id\" is needed.", "name": "execution", "schema": {"$ref": "#/definitions/ReplicationExecution"}}], "tags": ["Products"]}, "get": {"description": "This endpoint let user list replication executions.\n", "summary": "List replication executions.", "responses": {"200": {"description": "Success", "schema": {"items": {"$ref": "#/definitions/ReplicationExecution"}, "type": "array"}}, "403": {"description": "User has no privilege for the operation."}, "401": {"description": "User need to login first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": false, "type": "integer", "description": "The policy ID.", "in": "query", "name": "policy_id"}, {"required": false, "type": "string", "description": "The execution status.", "in": "query", "name": "status"}, {"required": false, "type": "string", "description": "The trigger mode.", "in": "query", "name": "trigger"}, {"required": false, "type": "integer", "description": "The page.", "in": "query", "name": "page"}, {"required": false, "type": "integer", "description": "The page size.", "in": "query", "name": "page_size"}], "tags": ["Products"]}}, "/system/CVEWhitelist": {"put": {"description": "This API overwrites the system level whitelist of CVE with the list in request body.  Only system Admin has permission to call this API.", "summary": "Update the system level whitelist of CVE.", "responses": {"200": {"description": "Successfully updated the CVE whitelist."}, "403": {"description": "User does not have permission to call this API."}, "401": {"description": "User is not authenticated."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "body", "description": "The whitelist with new content", "name": "whitelist", "schema": {"$ref": "#/definitions/CVEWhitelist"}}], "tags": ["Products", "System"]}, "get": {"description": "Get the system level whitelist of CVE.  This API can be called by all authenticated users.", "summary": "Get the system level whitelist of CVE.", "responses": {"200": {"description": "Successfully retrieved the CVE whitelist.", "schema": {"$ref": "#/definitions/CVEWhitelist"}}, "401": {"description": "User is not authenticated."}, "500": {"description": "Unexpected internal errors."}}, "tags": ["Products", "System"]}}, "/internal/syncquota": {"post": {"description": "This endpoint is for syncing quota usage of registry/chart with database.\n", "summary": "Sync quota from registry/chart to DB.", "responses": {"200": {"description": "Sync repositories successfully."}, "403": {"description": "User does not have permission of system admin role."}, "401": {"description": "User need to log in first."}}, "tags": ["Products"]}}, "/chartrepo/charts": {"post": {"responses": {"201": {"description": "The specified chart is successfully uploaded."}, "507": {"$ref": "#/definitions/InsufficientStorageChartAPIError"}, "403": {"$ref": "#/definitions/ForbiddenChartAPIError"}, "401": {"$ref": "#/definitions/UnauthorizedChartAPIError"}, "500": {"$ref": "#/definitions/InternalChartAPIError"}}, "parameters": [{"required": true, "type": "file", "description": "The chart file", "in": "formData", "name": "chart"}, {"required": false, "type": "file", "description": "The provance file", "in": "formData", "name": "prov"}], "tags": ["Products", "Chart Repository"], "description": "Upload a chart file to the default 'library' project. Uploading together with the prov file at the same time is also supported.", "consumes": ["multipart/form-data"], "summary": "Upload a chart file to the defult 'library' project."}}, "/repositories/{repo_name}/labels": {"post": {"description": "Add a label to the repository.\n", "summary": "Add a label to the repository.", "responses": {"200": {"description": "Successfully."}, "404": {"description": "Resource not found."}, "403": {"description": "Forbidden. User should have write permisson for the repository to perform the action."}, "401": {"description": "Unauthorized."}}, "parameters": [{"required": true, "type": "string", "description": "The name of repository.", "in": "path", "name": "repo_name"}, {"required": true, "in": "body", "description": "Only the ID property is required.", "name": "label", "schema": {"$ref": "#/definitions/Label"}}], "tags": ["Products"]}, "get": {"description": "Get labels of a repository specified by the repo_name.\n", "summary": "Get labels of a repository.", "responses": {"200": {"description": "Successfully.", "schema": {"items": {"$ref": "#/definitions/Label"}, "type": "array"}}, "404": {"description": "Repository not found."}, "403": {"description": "Forbidden. User should have read permisson for the repository to perform the action."}, "401": {"description": "Unauthorized."}}, "parameters": [{"required": true, "type": "string", "description": "The name of repository.", "in": "path", "name": "repo_name"}], "tags": ["Products"]}}, "/health": {"get": {"description": "The endpoint returns the health stauts of the system.\n", "summary": "Health check API", "responses": {"200": {"description": "The system health status.", "schema": {"$ref": "#/definitions/OverallHealthStatus"}}}, "tags": ["Products"]}}, "/chartrepo/{repo}/charts/{name}/{version}": {"get": {"description": "Get the specified chart version", "summary": "Get the specified chart version", "responses": {"200": {"description": "Successfully retrieved the chart version", "schema": {"$ref": "#/definitions/ChartVersionDetails"}}, "404": {"$ref": "#/definitions/NotFoundChartAPIError"}, "403": {"$ref": "#/definitions/ForbiddenChartAPIError"}, "401": {"$ref": "#/definitions/UnauthorizedChartAPIError"}, "500": {"$ref": "#/definitions/InternalChartAPIError"}}, "parameters": [{"required": true, "type": "string", "description": "The project name", "in": "path", "name": "repo"}, {"required": true, "type": "string", "description": "The chart name", "in": "path", "name": "name"}, {"required": true, "type": "string", "description": "The chart version", "in": "path", "name": "version"}], "tags": ["Products", "Chart Repository"]}, "delete": {"description": "Delete the specified chart version", "summary": "Delete the specified chart version", "responses": {"200": {"description": "The specified chart entry is successfully deleted."}, "404": {"$ref": "#/definitions/NotFoundChartAPIError"}, "403": {"$ref": "#/definitions/ForbiddenChartAPIError"}, "401": {"$ref": "#/definitions/UnauthorizedChartAPIError"}, "500": {"$ref": "#/definitions/InternalChartAPIError"}}, "parameters": [{"required": true, "type": "string", "description": "The project name", "in": "path", "name": "repo"}, {"required": true, "type": "string", "description": "The chart name", "in": "path", "name": "name"}, {"required": true, "type": "string", "description": "The chart version", "in": "path", "name": "version"}], "tags": ["Products", "Chart Repository"]}}, "/repositories/{repo_name}/tags": {"post": {"description": "This endpoint tags an existing image with another tag in this repo, source images can be in different repos or projects.\n", "summary": "Retag an image", "responses": {"200": {"description": "Image retag successfully."}, "404": {"description": "Project or repository not found."}, "403": {"description": "Forbiden as quota exceeded."}, "409": {"description": "Target tag already exists."}, "401": {"description": "User has no permission to the source project or destination project."}, "400": {"description": "Invalid image values provided."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "type": "string", "description": "Relevant repository name.", "in": "path", "name": "repo_name"}, {"required": true, "in": "body", "description": "Request to give source image and target tag.", "name": "request", "schema": {"$ref": "#/definitions/RetagReq"}}], "tags": ["Products"]}, "get": {"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.\n", "summary": "Get tags of a relevant repository.", "responses": {"200": {"description": "Get tags successfully.", "schema": {"items": {"$ref": "#/definitions/DetailedTag"}, "type": "array"}}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "type": "string", "description": "Relevant repository name.", "in": "path", "name": "repo_name"}, {"required": false, "type": "string", "description": "A label ID.", "in": "query", "name": "label_id"}, {"required": false, "type": "boolean", "description": "Bool value indicating whether return detailed information of the tag, such as vulnerability scan info, if set to false, only tag name is returned.", "in": "query", "name": "detail"}], "tags": ["Products"]}}, "/retentions/{id}/executions/{eid}": {"patch": {"description": "Stop a Retention job, only support \"stop\" action now.", "summary": "Stop a Retention job", "responses": {"200": {"description": "Stop a Retention job successfully."}, "403": {"description": "User have no permission."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Retention ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}, {"in": "path", "description": "Retention execution ID.", "format": "int64", "required": true, "type": "integer", "name": "eid"}, {"required": true, "in": "body", "description": "The action, only support \"stop\" now.", "name": "action", "schema": {"type": "object", "properties": {"action": {"type": "string"}}}}], "tags": ["Products", "Retention"]}}, "/registries/{id}": {"put": {"description": "This endpoint is for update a given registry.\n", "summary": "Update a given registry.", "responses": {"200": {"description": "Updated registry successfully."}, "404": {"description": "Registry does not exist."}, "500": {"description": "Unexpected internal errors."}, "401": {"description": "User need to log in first."}, "400": {"description": "The registry is associated with policy which is enabled."}, "409": {"description": "Registry name is already used."}}, "parameters": [{"in": "path", "description": "The registry's ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}, {"required": true, "in": "body", "description": "Updates registry.", "name": "repo_target", "schema": {"$ref": "#/definitions/PutRegistry"}}], "tags": ["Products"]}, "get": {"description": "This endpoint is for get specific registry.", "summary": "Get registry.", "responses": {"200": {"description": "Get registry successfully.", "schema": {"$ref": "#/definitions/Registry"}}, "404": {"description": "Registry not found"}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "The registry ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}, "delete": {"description": "This endpoint is for to delete specific registry.\n", "summary": "Delete specific registry.", "responses": {"200": {"description": "Registry deleted successfully."}, "404": {"description": "Registry does not exist."}, "401": {"description": "Only admin has this authority."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Registry's ID is invalid or the registry is used by policies."}}, "parameters": [{"in": "path", "description": "The registry's ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}}, "/ldap/users/search": {"get": {"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.\n", "summary": "Search available ldap users.", "responses": {"200": {"description": "Search ldap users successfully.", "schema": {"items": {"$ref": "#/definitions/LdapUsers"}, "type": "array"}}, "403": {"description": "Only admin has this authority."}, "401": {"description": "User need to login first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": false, "type": "string", "description": "Registered user ID", "in": "query", "name": "username"}], "tags": ["Products"]}}, "/chartrepo/health": {"get": {"description": "Check the health of chart repository service.", "summary": "Check the health of chart repository service.", "responses": {"200": {"description": "Health status of chart repository service is returned.", "schema": {"type": "object", "properties": {"healthy": {"type": "boolean"}}}}, "403": {"$ref": "#/definitions/ForbiddenChartAPIError"}, "401": {"$ref": "#/definitions/UnauthorizedChartAPIError"}}, "tags": ["Products", "Chart Repository"]}}, "/retentions": {"post": {"description": "Create Retention Policy, you can reference metadatas API for the policy model.\nYou can check project metadatas to find whether a retention policy is already binded.\nThis method should only be called when no retention policy binded to project yet.\n", "summary": "Create Retention Policy", "responses": {"201": {"description": "Project created successfully."}, "403": {"description": "User have no permission."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Illegal format of provided ID value."}}, "parameters": [{"required": true, "in": "body", "description": "Create Retention Policy successfully.", "name": "policy", "schema": {"$ref": "#/definitions/RetentionPolicy"}}], "tags": ["Products", "Retention"]}}, "/repositories/{repo_name}": {"put": {"description": "This endpoint is used to update description of the repository.\n", "summary": "Update description of the repository.", "responses": {"200": {"description": "Update successfully."}, "404": {"description": "Repository not found."}, "403": {"description": "Forbidden."}, "401": {"description": "Unauthorized."}}, "parameters": [{"required": true, "type": "string", "description": "The name of repository which will be deleted.", "in": "path", "name": "repo_name"}, {"required": true, "in": "body", "description": "The description of the repository.", "name": "description", "schema": {"$ref": "#/definitions/RepositoryDescription"}}], "tags": ["Products"]}, "delete": {"description": "This endpoint let user delete a repository with name.\n", "summary": "Delete a repository.", "responses": {"200": {"description": "Delete successfully."}, "404": {"description": "Repository not found."}, "403": {"description": "Forbidden."}, "412": {"description": "Precondition Failed."}, "401": {"description": "Unauthorized."}, "400": {"description": "Invalid repo_name."}}, "parameters": [{"required": true, "type": "string", "description": "The name of repository which will be deleted.", "in": "path", "name": "repo_name"}], "tags": ["Products"]}}, "/scanners/{registration_id}": {"put": {"description": "Updates the specified scanner registration.\n", "summary": "Update a scanner registration", "responses": {"200": {"description": "Updated successfully"}, "404": {"description": "The requested object is not found"}, "403": {"description": "Request is not allowed, system role required"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}}, "parameters": [{"required": true, "type": "string", "description": "The scanner registration identifier.", "in": "path", "name": "registration_id"}, {"required": true, "in": "body", "description": "A scanner registraiton to be updated.", "name": "registration", "schema": {"$ref": "#/definitions/ScannerRegistrationReq"}}], "tags": ["Scanners"]}, "get": {"description": "Retruns the details of the specified scanner registration.\n", "summary": "Get a scanner registration details", "responses": {"200": {"description": "The details of the scanner registration.", "schema": {"$ref": "#/definitions/ScannerRegistration"}}, "404": {"description": "The requested object is not found"}, "403": {"description": "Request is not allowed, system role required"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}}, "parameters": [{"required": true, "type": "string", "description": "The scanner registration identifer.", "in": "path", "name": "registration_id"}], "tags": ["Products", "Scanners"]}, "delete": {"description": "Deletes the specified scanner registration.\n", "summary": "Delete a scanner registration", "responses": {"200": {"description": "Deleted successfully and return the deleted registration", "schema": {"$ref": "#/definitions/ScannerRegistration"}}, "404": {"description": "The requested object is not found"}, "403": {"description": "Request is not allowed, system role required or registration is immutable"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}}, "parameters": [{"required": true, "type": "string", "description": "The scanner registration identifier.", "in": "path", "name": "registration_id"}], "tags": ["Scanners"]}, "patch": {"description": "Set the specified scanner registration as the system default one.\n", "summary": "Set system default scanner registration", "responses": {"200": {"description": "Successfully set the specified scanner registration as system default"}, "403": {"description": "Request is not allowed"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}}, "parameters": [{"required": true, "type": "string", "description": "The scanner registration identifier.", "in": "path", "name": "registration_id"}, {"required": true, "in": "body", "name": "payload", "schema": {"$ref": "#/definitions/IsDefault"}}], "tags": ["Scanners"]}}, "/projects/{project_id}/members/{mid}": {"put": {"description": "Update project member relationship", "summary": "Update project member", "responses": {"200": {"description": "Project member updated successfully."}, "404": {"description": "project or project member does not exist."}, "403": {"description": "User in session does not have permission to the project."}, "401": {"description": "User need to log in first."}, "400": {"description": "Invalid role id, it should be 1,2 or 3, or invalid project id, or invalid member id."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "path", "description": "Member ID.", "format": "int64", "required": true, "type": "integer", "name": "mid"}, {"in": "body", "name": "role", "schema": {"$ref": "#/definitions/RoleRequest"}}], "tags": ["Products"]}, "get": {"description": "Get the project member information", "summary": "Get the project member information", "responses": {"200": {"description": "Project member retrieved successfully.", "schema": {"$ref": "#/definitions/ProjectMemberEntity"}}, "404": {"description": "Project or projet member does not exist."}, "403": {"description": "User in session does not have permission to the project."}, "401": {"description": "User need to log in first."}, "400": {"description": "Illegal format of project member or invalid project id, member id."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "path", "description": "The member ID", "format": "int64", "required": true, "type": "integer", "name": "mid"}], "tags": ["Products"]}, "delete": {"summary": "Delete project member", "responses": {"200": {"description": "Project member deleted successfully."}, "403": {"description": "User in session does not have permission to the project."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "The project id or project member id is invalid."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "path", "description": "Member ID.", "format": "int64", "required": true, "type": "integer", "name": "mid"}], "tags": ["Products"]}}, "/ldap/users/import": {"post": {"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.\nIf have errors when import user, will return the list of importing failed uid and the failed reason.\n", "summary": "Import selected available ldap users.", "responses": {"200": {"description": "Add ldap users successfully."}, "404": {"description": "Failed import some users.", "schema": {"items": {"$ref": "#/definitions/LdapFailedImportUsers"}, "type": "array"}}, "403": {"description": "Only admin has this authority."}, "401": {"description": "User need to login first."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}}, "parameters": [{"required": true, "in": "body", "description": "The uid listed for importing. This list will check users validity of ldap service based on configuration from the system.", "name": "uid_list", "schema": {"$ref": "#/definitions/LdapImportUsers"}}], "tags": ["Products"]}}, "/systeminfo/getcert": {"get": {"description": "This endpoint is for downloading a default root certificate.\n", "summary": "Get default root certificate.", "responses": {"200": {"description": "Get default root certificate successfully."}, "404": {"description": "Not found the default root certificate."}, "500": {"description": "Unexpected internal errors."}}, "tags": ["Products"]}}, "/quotas/{id}": {"put": {"description": "Update hard limits of the specified quota", "summary": "Update the specified quota", "responses": {"200": {"description": "Updated quota hard limits successfully."}, "404": {"description": "Quota ID does not exist."}, "403": {"description": "User does not have permission to the quota."}, "401": {"description": "User need to log in first."}, "400": {"description": "Illegal format of quota update request."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "type": "integer", "description": "Quota ID", "in": "path", "name": "id"}, {"required": true, "in": "body", "description": "The new hard limits for the quota", "name": "hard", "schema": {"$ref": "#/definitions/QuotaUpdateReq"}}], "tags": ["Products", "Quota"]}, "get": {"description": "Get the specified quota", "summary": "Get the specified quota", "responses": {"200": {"description": "Successfully retrieved the quota.", "schema": {"$ref": "#/definitions/Quota"}}, "404": {"description": "Quota does not exist."}, "403": {"description": "User does not have permission to call this API"}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "type": "integer", "description": "Quota ID", "in": "path", "name": "id"}], "tags": ["Products", "Quota"]}}, "/projects/{project_id}/immutabletagrules": {"post": {"description": "This endpoint add an immutable tag rule to the project\n", "summary": "Add an immutable tag rule to current project", "responses": {"200": {"description": "Add the immutable tag rule successfully."}, "403": {"description": "User have no permission to get immutable tag rule of the project."}, "401": {"description": "User need to log in first."}, "500": {"description": "Internal server errors."}, "400": {"description": "Illegal format of provided ID value."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "body", "name": "immutabletagrule", "schema": {"$ref": "#/definitions/ImmutableTagRule"}}], "tags": ["Products"]}, "get": {"description": "This endpoint returns the immutable tag rules of a project\n", "summary": "List all immutable tag rules of current project", "responses": {"200": {"description": "List project immutable tag rules successfully.", "schema": {"items": {"$ref": "#/definitions/ImmutableTagRule"}, "type": "array"}}, "403": {"description": "User have no permission to list immutable tag rules of the project."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Illegal format of provided ID value."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}], "tags": ["Products"]}}, "/replication/policies/{id}": {"put": {"description": "This endpoint let user update policy.\n", "summary": "Update the replication policy", "responses": {"200": {"$ref": "#/responses/OK"}, "404": {"$ref": "#/responses/NotFound"}, "403": {"$ref": "#/responses/Forbidden"}, "409": {"$ref": "#/responses/Conflict"}, "401": {"$ref": "#/responses/Unauthorized"}, "400": {"$ref": "#/responses/BadRequest"}, "500": {"$ref": "#/responses/InternalServerError"}}, "parameters": [{"in": "path", "description": "policy ID", "format": "int64", "required": true, "type": "integer", "name": "id"}, {"required": true, "in": "body", "description": "The replication policy model.", "name": "policy", "schema": {"$ref": "#/definitions/ReplicationPolicy"}}], "tags": ["Products"]}, "get": {"description": "This endpoint let user get replication policy by specific ID.\n", "summary": "Get replication policy.", "responses": {"200": {"description": "Get the replication policy successfully.", "schema": {"$ref": "#/definitions/ReplicationPolicy"}}, "404": {"$ref": "#/responses/NotFound"}, "403": {"$ref": "#/responses/Forbidden"}, "401": {"$ref": "#/responses/Unauthorized"}, "400": {"$ref": "#/responses/BadRequest"}, "500": {"$ref": "#/responses/InternalServerError"}}, "parameters": [{"in": "path", "description": "policy ID", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}, "delete": {"description": "Delete the replication policy specified by ID.\n", "summary": "Delete the replication policy specified by ID.", "responses": {"200": {"$ref": "#/responses/OK"}, "404": {"$ref": "#/responses/NotFound"}, "403": {"$ref": "#/responses/Forbidden"}, "412": {"$ref": "#/responses/PreconditionFailed"}, "401": {"$ref": "#/responses/Unauthorized"}, "400": {"$ref": "#/responses/BadRequest"}, "500": {"$ref": "#/responses/InternalServerError"}}, "parameters": [{"in": "path", "description": "Replication policy ID", "format": "int64", "required": true, "type": "integer", "name": "id"}], "tags": ["Products"]}}, "/registries": {"post": {"description": "This endpoint is for user to create a new registry.\n", "summary": "Create a new registry.", "responses": {"201": {"description": "Registry created successfully."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}, "500": {"description": "Unexpected internal errors."}, "401": {"description": "User need to log in first."}, "400": {"description": "Unsatisfied with constraints of the registry creation."}, "409": {"description": "Registry name already exists."}}, "parameters": [{"required": true, "in": "body", "description": "New created registry.", "name": "registry", "schema": {"$ref": "#/definitions/Registry"}}], "tags": ["Products"]}, "get": {"description": "This endpoint let user list filtered registries by name, if name is nil, list returns all registries.\n", "summary": "List registries.", "responses": {"200": {"description": "List registries successfully.", "schema": {"items": {"$ref": "#/definitions/Registry"}, "type": "array"}}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": false, "type": "string", "description": "Registry's name.", "in": "query", "name": "name"}], "tags": ["Products"]}}, "/projects/{project_id}/members": {"post": {"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. ", "summary": "Create project member", "responses": {"201": {"description": "Project member created successfully."}, "403": {"description": "User in session does not have permission to the project."}, "500": {"description": "Unexpected internal errors."}, "401": {"description": "User need to log in first."}, "400": {"description": "Illegal format of project member or project id is invalid, or LDAP DN is invalid."}, "409": {"description": "A user group with same group name already exist or an LDAP user group with same DN already exist."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "body", "name": "project_member", "schema": {"$ref": "#/definitions/ProjectMember"}}], "tags": ["Products"]}, "get": {"description": "Get all project member information", "summary": "Get all project member information", "responses": {"200": {"description": "Get project members successfully.", "schema": {"items": {"$ref": "#/definitions/ProjectMemberEntity"}, "type": "array"}}, "404": {"description": "Project ID does not exist."}, "403": {"description": "User in session does not have permission to the project."}, "401": {"description": "User need to log in first."}, "400": {"description": "The project id is invalid."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}, {"in": "query", "type": "string", "description": "The entity name to search.", "name": "entityname"}], "tags": ["Products"]}}, "/internal/switchquota": {"put": {"description": "This endpoint is for enable/disable quota. When quota is disabled, no resource require/release in image/chart push and delete.\n", "summary": "Enable or disable quota.", "responses": {"200": {"description": "Enable/Disable quota successfully."}, "403": {"description": "User does not have permission of system admin role."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "in": "body", "name": "switcher", "schema": {"$ref": "#/definitions/QuotaSwitcher"}}], "tags": ["Products"]}}, "/configurations": {"put": {"description": "This endpoint is for modifying system configurations that only provides for admin user.\n", "summary": "Modify system configurations.", "responses": {"200": {"description": "Modify system configurations successfully."}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"required": true, "in": "body", "description": "The configuration map can contain a subset of the attributes of the schema, which are to be updated.", "name": "configurations", "schema": {"$ref": "#/definitions/Configurations"}}], "tags": ["Products"]}, "get": {"description": "This endpoint is for retrieving system configurations that only provides for admin user.\n", "summary": "Get system configurations.", "responses": {"200": {"description": "Get system configurations successfully. The response body is a map.", "schema": {"$ref": "#/definitions/ConfigurationsResponse"}}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first.\u00df"}, "500": {"description": "Unexpected internal errors."}}, "tags": ["Products"]}}, "/system/oidc/ping": {"post": {"description": "Test the OIDC endpoint, the setting of the endpoint is provided in the request.  This API can only be called by system admin.", "summary": "Test the OIDC endpoint.", "responses": {"200": {"description": "Ping succeeded.  The OIDC endpoint is valid."}, "403": {"description": "User does not have permission to call this API"}, "401": {"description": "User need to log in first."}, "400": {"description": "The ping failed"}}, "parameters": [{"required": true, "in": "body", "description": "Request body for OIDC endpoint to be tested.", "name": "endpoint", "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"}}}}], "tags": ["Products", "System"]}}, "/scanners/ping": {"post": {"description": "Pings scanner adapter to test endpoint URL and authorization settings.\n", "summary": "Tests scanner registration settings", "responses": {"200": {"description": "Test succeeded"}, "403": {"description": "Request is not allowed, system role required"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}, "400": {"description": "Bad registration settings"}}, "parameters": [{"required": true, "in": "body", "description": "A scanner registration settings to be tested.", "name": "settings", "schema": {"$ref": "#/definitions/ScannerRegistrationSettings"}}], "tags": ["Products", "Scanners"]}}, "/repositories/{repo_name}/tags/{tag}/scan": {"post": {"description": "Trigger a scan targeting the artifact identified by the repo_name and tag.\n", "summary": "Scan the image.", "responses": {"401": {"description": "Unauthorized request"}, "404": {"description": "The target artifact is not found"}, "403": {"description": "Request is not allowed"}, "500": {"description": "Internal server error happened"}, "202": {"description": "Scan request is successfully accepted"}}, "parameters": [{"required": true, "type": "string", "description": "Repository name", "in": "path", "name": "repo_name"}, {"required": true, "type": "string", "description": "Tag name", "in": "path", "name": "tag"}], "tags": ["Products", "Scan"]}, "get": {"description": "Retrieve the scan report for the artifact identified by the repo_name and tag.\n", "summary": "Get the scan report", "responses": {"200": {"description": "The report details of the specified artifact identified by the repo_name and tag.", "schema": {"$ref": "#/definitions/Report"}}, "404": {"description": "The target artifact is not found"}, "403": {"description": "Request is not allowed"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}}, "parameters": [{"required": true, "type": "string", "description": "Repository name", "in": "path", "name": "repo_name"}, {"required": true, "type": "string", "description": "Tag name", "in": "path", "name": "tag"}, {"in": "header", "type": "string", "description": "Mimetype in header. e.g: \"application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0\"\n", "name": "Accept"}], "tags": ["Scan"]}}, "/systeminfo": {"get": {"description": "This API is for retrieving general system info, this can be called by anonymous request.\n", "summary": "Get general system info", "responses": {"200": {"description": "Get general info successfully.", "schema": {"$ref": "#/definitions/GeneralInfo"}}, "500": {"description": "Unexpected internal error."}}, "tags": ["Products"]}}, "/repositories": {"get": {"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.\n", "summary": "Get repositories accompany with relevant project and repo name.", "responses": {"200": {"headers": {"X-Total-Count": {"type": "integer", "description": "The total count of repositories"}, "Link": {"type": "string", "description": "Link refers to the previous page and next page"}}, "description": "Get repositories successfully.", "schema": {"items": {"$ref": "#/definitions/Repository"}, "type": "array"}}, "404": {"description": "Project ID does not exist."}, "403": {"description": "Project is not public or current user is irrelevant to the repository."}, "500": {"description": "Unexpected internal errors."}, "400": {"description": "Invalid project ID."}}, "parameters": [{"in": "query", "description": "Relevant project ID.", "format": "int32", "required": true, "type": "integer", "name": "project_id"}, {"required": false, "type": "string", "description": "Repo name for filtering results.", "in": "query", "name": "q"}, {"required": false, "type": "string", "description": "Sort method, valid values include: 'name', '-name', 'creation_time', '-creation_time', 'update_time', '-update_time'. Here '-' stands for descending order.\n", "in": "query", "name": "sort"}, {"required": false, "type": "integer", "description": "The ID of label used to filter the result.", "in": "query", "name": "label_id"}, {"in": "query", "description": "The page number, default is 1.", "format": "int32", "required": false, "type": "integer", "name": "page"}, {"in": "query", "description": "The size of per page, default is 10, maximum is 100.", "format": "int32", "required": false, "type": "integer", "name": "page_size"}], "tags": ["Products"]}}, "/replication/executions/{id}/tasks/{task_id}/log": {"get": {"description": "This endpoint is for user to get the log of one task.\n", "summary": "Get the log of one task.", "responses": {"200": {"description": "Success."}, "404": {"description": "Resource requested does not exist."}, "403": {"description": "User has no privilege for the operation."}, "401": {"description": "User need to login first."}, "400": {"description": "Bad request."}, "500": {"description": "Unexpected internal errors."}}, "parameters": [{"in": "path", "description": "The execution ID.", "format": "int64", "required": true, "type": "integer", "name": "id"}, {"in": "path", "description": "The task ID.", "format": "int64", "required": true, "type": "integer", "name": "task_id"}], "tags": ["Products"]}}, "/repositories/{repo_name}/tags/{tag}/labels/{label_id}": {"delete": {"description": "Delete the label from the image specified by the repo_name and tag.\n", "summary": "Delete label from the image.", "responses": {"200": {"description": "Successfully."}, "404": {"description": "Resource not found."}, "403": {"description": "Forbidden. User should have write permisson for the image to perform the action."}, "401": {"description": "Unauthorized."}}, "parameters": [{"required": true, "type": "string", "description": "The name of repository.", "in": "path", "name": "repo_name"}, {"required": true, "type": "string", "description": "The tag of the image.", "in": "path", "name": "tag"}, {"required": true, "type": "integer", "description": "The ID of label.", "in": "path", "name": "label_id"}], "tags": ["Products"]}}, "/scanners/{registration_id}/metadata": {"get": {"description": "Get the metadata of the specified scanner registration, including the capabilities and customzied properties.\n", "summary": "Get the metadata of the specified scanner registration", "responses": {"200": {"description": "The metadata of the specified scanner adapter", "schema": {"$ref": "#/definitions/ScannerAdapterMetadata"}}, "403": {"description": "Request is not allowed"}, "401": {"description": "Unauthorized request"}, "500": {"description": "Internal server error happened"}}, "parameters": [{"required": true, "type": "string", "description": "The scanner registration identifier.", "in": "path", "name": "registration_id"}], "tags": ["Products", "Scanners"]}}, "/internal/syncregistry": {"post": {"description": "This endpoint is for syncing all repositories of registry with database.\n", "summary": "Sync repositories from registry to DB.", "responses": {"200": {"description": "Sync repositories successfully."}, "403": {"description": "User does not have permission of admin role."}, "401": {"description": "User need to log in first."}, "500": {"description": "Unexpected internal errors."}, "415": {"$ref": "#/responses/UnsupportedMediaType"}}, "tags": ["Products"]}}, "/projects/{project_id}/webhook/lasttrigger": {"get": {"description": "This endpoint returns last trigger information of project webhook policy.\n", "summary": "Get project webhook policy last trigger info", "responses": {"200": {"description": "Test webhook connection successfully.", "schema": {"items": {"$ref": "#/definitions/WebhookLastTrigger"}, "type": "array"}}, "403": {"description": "User have no permission to get webhook policy of the project."}, "401": {"description": "User need to log in first."}, "500": {"description": "Internal server errors."}, "400": {"description": "Illegal format of provided ID value."}}, "parameters": [{"in": "path", "description": "Relevant project ID.", "format": "int64", "required": true, "type": "integer", "name": "project_id"}], "tags": ["Products"]}}}, "schemes": ["http", "https"], "responses": {"NotFound": {"description": "Not Found"}, "OK": {"description": "Success"}, "Unauthorized": {"description": "Unauthorized"}, "Created": {"description": "Created"}, "Forbidden": {"description": "Forbidden"}, "PreconditionFailed": {"description": "Precondition Failed"}, "InternalServerError": {"description": "Internal Server Error"}, "BadRequest": {"description": "Bad Request"}, "UnsupportedMediaType": {"description": "The Media Type of the request is not supported, it has to be \"application/json\""}, "Conflict": {"description": "Conflict"}}, "produces": ["application/json", "text/plain"], "basePath": "/api", "securityDefinitions": {"basicAuth": {"type": "basic"}}, "host": "localhost", "definitions": {"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/TriggerSettings"}}}, "Namespace": {"type": "object", "description": "The namespace of registry", "properties": {"name": {"type": "string", "description": "The name of namespace"}, "metadata": {"type": "object", "description": "The metadata of namespace"}}}, "ConfigurationsResponse": {"type": "object", "properties": {"oidc_verify_cert": {"description": "Whether verify your OIDC server certificate, disable it if your OIDC server is hosted via self-hosted certificate.", "$ref": "#/definitions/BoolConfigItem"}, "email_identity": {"description": "By default it's empty so the email_username is picked.", "$ref": "#/definitions/StringConfigItem"}, "ldap_group_search_filter": {"description": "The filter to search the ldap group.", "$ref": "#/definitions/StringConfigItem"}, "auth_mode": {"description": "The auth mode of current system, such as \"db_auth\", \"ldap_auth\"", "$ref": "#/definitions/StringConfigItem"}, "self_registration": {"description": "Whether the Harbor instance supports self-registration.  If it's set to false, admin need to add user to the instance.", "$ref": "#/definitions/BoolConfigItem"}, "oidc_scope": {"description": "The scope sent to OIDC server during authentication, should be separated by comma. It has to contain \u201copenid\u201d, and \u201coffline_access\u201d. If you are using google, please remove \u201coffline_access\u201d from this field.", "$ref": "#/definitions/StringConfigItem"}, "ldap_search_dn": {"type": "string", "description": "The DN of the user to do the search."}, "storage_per_project": {"description": "The default storage quota for the new created projects.", "$ref": "#/definitions/IntegerConfigItem"}, "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\""}}, "description": "The parameters of the policy, the values are dependant on the type of the policy."}}}, "verify_remote_cert": {"description": "Whether or not the certificate will be verified when Harbor tries to access a remote Harbor instance for replication.", "$ref": "#/definitions/BoolConfigItem"}, "ldap_timeout": {"description": "timeout in seconds for connection to LDAP server.", "$ref": "#/definitions/IntegerConfigItem"}, "ldap_base_dn": {"description": "The Base DN for LDAP binding.", "$ref": "#/definitions/StringConfigItem"}, "ldap_filter": {"description": "The filter for LDAP binding.", "$ref": "#/definitions/StringConfigItem"}, "read_only": {"description": "'docker push' is prohibited by Harbor if you set it to true.   ", "$ref": "#/definitions/BoolConfigItem"}, "quota_per_project_enable": {"description": "This attribute indicates whether quota per project enabled in harbor", "$ref": "#/definitions/BoolConfigItem"}, "ldap_url": {"description": "The URL of LDAP server.", "$ref": "#/definitions/StringConfigItem"}, "oidc_name": {"description": "The name of the OIDC provider.", "$ref": "#/definitions/StringConfigItem"}, "project_creation_restriction": {"description": "This attribute restricts what users have the permission to create project.  It can be \"everyone\" or \"adminonly\".", "$ref": "#/definitions/StringConfigItem"}, "ldap_uid": {"description": "The attribute which is used as identity for the LDAP binding, such as \"CN\" or \"SAMAccountname\"", "$ref": "#/definitions/StringConfigItem"}, "oidc_client_id": {"description": "The client id of the OIDC.", "$ref": "#/definitions/StringConfigItem"}, "ldap_group_base_dn": {"description": "The base DN to search LDAP group.", "$ref": "#/definitions/StringConfigItem"}, "ldap_group_attribute_name": {"description": "The attribute which is used as identity of the LDAP group, default is cn.", "$ref": "#/definitions/StringConfigItem"}, "email_insecure": {"description": "Whether or not the certificate will be verified when Harbor tries to access the email server.", "$ref": "#/definitions/BoolConfigItem"}, "ldap_group_admin_dn": {"description": "Specify the ldap group which have the same privilege with Harbor admin.", "$ref": "#/definitions/StringConfigItem"}, "email_username": {"description": "The username for authenticate against SMTP server.", "$ref": "#/definitions/StringConfigItem"}, "oidc_endpoint": {"description": "The URL of an OIDC-complaint server, must start with 'https://'.", "$ref": "#/definitions/StringConfigItem"}, "ldap_scope": {"type": "integer", "description": "0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE"}, "count_per_project": {"description": "The default count quota for the new created projects.", "$ref": "#/definitions/IntegerConfigItem"}, "token_expiration": {"description": "The expiration time of the token for internal Registry, in minutes.", "$ref": "#/definitions/IntegerConfigItem"}, "ldap_group_search_scope": {"description": "The scope to search ldap. '0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'", "$ref": "#/definitions/IntegerConfigItem"}, "email_ssl": {"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.", "$ref": "#/definitions/BoolConfigItem"}, "email_port": {"description": "The port of SMTP server.", "$ref": "#/definitions/IntegerConfigItem"}, "email_host": {"description": "The hostname of SMTP server that sends Email notification.", "$ref": "#/definitions/StringConfigItem"}, "email_from": {"description": "The sender name for Email notification.", "$ref": "#/definitions/StringConfigItem"}}}, "VulnNamespaceTimestamp": {"type": "object", "properties": {"namespace": {"type": "string", "description": "The namespace of the Vulnerability"}, "last_update": {"type": "integer", "description": "The UTC timestamp in miliseconds of last successful update for vulnerability data."}}}, "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"}, "supported_resource_filters": {"items": {"$ref": "#/definitions/FilterStyle"}, "type": "array", "description": "The filters that the registry supports"}, "supported_triggers": {"items": {"type": "string"}, "type": "array", "description": "The triggers that the registry supports"}, "description": {"type": "string", "description": "The description"}}}, "UserGroup": {"type": "object", "properties": {"group_name": {"type": "string", "description": "The name of the user group"}, "ldap_group_dn": {"type": "string", "description": "The DN of the LDAP group if group type is 1 (LDAP group)."}, "group_type": {"type": "integer", "description": "The group type, 1 for LDAP group, 2 for HTTP group."}, "id": {"type": "integer", "description": "The ID of the user group"}}}, "QuotaSwitcher": {"type": "object", "properties": {"enabled": {"type": "boolean", "description": "The quota is enable or disable"}}}, "PutRegistry": {"type": "object", "properties": {"access_key": {"type": "string", "description": "The registry access key."}, "credential_type": {"type": "string", "description": "Credential type of the registry, e.g. 'basic'."}, "name": {"type": "string", "description": "The registry name."}, "access_secret": {"type": "string", "description": "The registry access secret."}, "url": {"type": "string", "description": "The registry address URL string."}, "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."}}}, "LdapImportUsers": {"type": "object", "properties": {"ldap_uid_list": {"items": {"type": "string"}, "type": "array", "description": "selected uid list"}}}, "Role": {"type": "object", "properties": {"role_mask": {"type": "string"}, "role_name": {"type": "string", "description": "Name the the role."}, "role_code": {"type": "string", "description": "Description of permissions for the role."}, "role_id": {"type": "integer", "description": "ID in table.", "format": "int32"}}}, "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": {"items": {"type": "string"}, "type": "array", "description": "The filter values"}}}, "AdminJobSchedule": {"type": "object", "properties": {"schedule": {"$ref": "#/definitions/AdminJobScheduleObj"}}}, "ChartVersion": {"allOf": [{"$ref": "#/definitions/ChartMetadata"}, {"type": "object", "properties": {"removed": {"type": "boolean", "description": "A flag to indicate if the chart entry is removed"}, "digest": {"type": "string", "description": "The digest value of the chart entry"}, "urls": {"items": {"type": "string"}, "type": "array", "description": "The urls of the chart entry"}, "created": {"type": "string", "description": "The created time of the chart entry"}}}], "type": "object", "properties": {"labels": {"$ref": "#/definitions/Labels"}}, "description": "A specified chart entry"}, "UserProfile": {"type": "object", "properties": {"comment": {"type": "string", "description": "The new comment."}, "email": {"type": "string", "description": "The new email."}, "realname": {"type": "string", "description": "The new realname."}}}, "RetentionRule": {"type": "object", "properties": {"priority": {"type": "integer"}, "scope_selectors": {"additionalProperties": {"items": {"$ref": "#/definitions/RetentionSelector"}, "type": "array"}, "type": "object"}, "disabled": {"type": "boolean"}, "params": {"additionalProperties": {"type": "object"}, "type": "object"}, "template": {"type": "string"}, "action": {"type": "string"}, "tag_selectors": {"items": {"$ref": "#/definitions/RetentionSelector"}, "type": "array"}, "id": {"type": "integer"}}}, "Repository": {"type": "object", "properties": {"update_time": {"type": "string", "description": "The update time of repository."}, "description": {"type": "string", "description": "The description of repository."}, "tags_count": {"type": "integer", "description": "The tags count of repository."}, "labels": {"items": {"$ref": "#/definitions/Label"}, "type": "array", "description": "The label list."}, "creation_time": {"type": "string", "description": "The creation time of repository."}, "star_count": {"type": "integer", "description": "The star count of repository."}, "project_id": {"type": "integer", "description": "The project ID of repository."}, "pull_count": {"type": "integer", "description": "The pull count of repository."}, "id": {"type": "integer", "description": "The ID of repository."}, "name": {"type": "string", "description": "The name of repository."}}}, "RetentionSelectorMetadata": {"type": "object", "description": "retention selector", "properties": {"display_text": {"type": "string"}, "kind": {"type": "string"}, "decorations": {"items": {"type": "string"}, "type": "array"}}}, "UnauthorizedChartAPIError": {"type": "object", "description": "Unauthorized", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "BadRequestFormatedError": {"type": "object", "description": "Bad request", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "RoleParam": {"type": "object", "properties": {"username": {"type": "string", "description": "Username relevant to a project role member."}, "roles": {"items": {"type": "integer", "format": "int32"}, "type": "array", "description": "Role ID for updating project role member."}}}, "Registry": {"type": "object", "properties": {"status": {"type": "string", "description": "Health status of the registry."}, "credential": {"$ref": "#/definitions/RegistryCredential"}, "update_time": {"type": "string", "description": "The update time of the policy."}, "name": {"type": "string", "description": "The registry name."}, "url": {"type": "string", "description": "The registry URL string."}, "insecure": {"type": "boolean", "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."}, "type": {"type": "string", "description": "Type of the registry, e.g. 'harbor'."}, "id": {"type": "integer", "description": "The registry ID.", "format": "int64"}, "description": {"type": "string", "description": "Description of the registry."}}}, "PingRegistry": {"type": "object", "properties": {"access_key": {"type": "string", "description": "The registry access key."}, "credential_type": {"type": "string", "description": "Credential type of the registry, e.g. 'basic'."}, "access_secret": {"type": "string", "description": "The registry access secret."}, "url": {"type": "string", "description": "The registry address URL string."}, "insecure": {"type": "boolean", "description": "Whether or not the certificate will be verified when Harbor tries to access the server."}, "type": {"type": "string", "description": "Type of the registry, e.g. 'harbor'."}, "id": {"type": "integer", "description": "The ID of the registry"}}}, "ReplicationExecution": {"type": "object", "description": "The replication execution", "properties": {"status": {"type": "string", "description": "The status"}, "status_text": {"type": "string", "description": "The status text"}, "trigger": {"type": "string", "description": "The trigger mode"}, "start_time": {"type": "string", "description": "The start time"}, "failed": {"type": "integer", "description": "The count of failed tasks"}, "succeed": {"type": "integer", "description": "The count of succeed tasks"}, "stopped": {"type": "integer", "description": "The count of stopped tasks"}, "end_time": {"type": "string", "description": "The end time"}, "in_progress": {"type": "integer", "description": "The count of in_progress tasks"}, "total": {"type": "integer", "description": "The total count of all tasks"}, "id": {"type": "integer", "description": "The ID"}, "policy_id": {"type": "integer", "description": "The policy ID"}}}, "RepoSignature": {"type": "object", "properties": {"hashes": {"type": "object", "description": "The JSON object of the hash of the image."}, "tag": {"type": "string", "description": "The tag of image."}}}, "ChartMetadata": {"required": ["name", "version", "engine", "icon", "apiVersion", "appVersion"], "type": "object", "description": "The metadata of chart version", "properties": {"engine": {"type": "string", "description": "The name of template engine"}, "description": {"type": "string", "description": "A one-sentence description of chart"}, "deprecated": {"type": "boolean", "description": "Whether or not this chart is deprecated"}, "appVersion": {"type": "string", "description": "The version of the application enclosed in the chart"}, "apiVersion": {"type": "string", "description": "The API version of this chart"}, "name": {"type": "string", "description": "The name of the chart"}, "sources": {"items": {"type": "string"}, "type": "array", "description": "The URL to the source code of chart"}, "version": {"type": "string", "description": "A SemVer 2 version of chart"}, "keywords": {"items": {"type": "string"}, "type": "array", "description": "A list of string keywords"}, "home": {"type": "string", "description": "The URL to the relevant project page"}, "icon": {"type": "string", "description": "The URL to an icon file"}}}, "DetailedTag": {"type": "object", "properties": {"name": {"type": "string", "description": "The name of the tag."}, "scan_overview": {"description": "The overview of the scan result.", "$ref": "#/definitions/ScanOverview"}, "author": {"type": "string", "description": "The author of the image."}, "docker_version": {"type": "string", "description": "The version of docker which builds the image."}, "labels": {"items": {"$ref": "#/definitions/Label"}, "type": "array", "description": "The label list."}, "created": {"type": "string", "description": "The build time of the image."}, "architecture": {"type": "string", "description": "The architecture of the image."}, "signature": {"type": "object", "description": "The signature of image, defined by RepoSignature. If it is null, the image is unsigned."}, "os": {"type": "string", "description": "The os of the image."}, "digest": {"type": "string", "description": "The digest of the tag."}, "size": {"type": "integer", "description": "The size of the image."}}}, "HasAdminRole": {"type": "object", "properties": {"has_admin_role": {"type": "boolean", "description": "1-has admin, 0-not."}}}, "ChartAPIError": {"required": ["error"], "type": "object", "description": "The error object returned by chart repository API", "properties": {"error": {"type": "string", "description": "The error message returned by the chart API"}}}, "RegistryCredential": {"type": "object", "properties": {"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'."}, "type": {"type": "string", "description": "Credential type, such as 'basic', 'oauth'."}}}, "RetentionMetadata": {"type": "object", "description": "the tag retention metadata", "properties": {"templates": {"items": {"$ref": "#/definitions/RetentionRuleMetadata"}, "type": "array", "description": "templates"}, "tag_selectors": {"items": {"$ref": "#/definitions/RetentionSelectorMetadata"}, "type": "array", "description": "supported tag selectors"}, "scope_selectors": {"items": {"$ref": "#/definitions/RetentionSelectorMetadata"}, "type": "array", "description": "supported scope selectors"}}}, "RetentionRuleParamMetadata": {"type": "object", "description": "rule param", "properties": {"required": {"type": "boolean"}, "type": {"type": "string"}, "unit": {"type": "string"}}}, "WebhookJob": {"type": "object", "description": "The webhook job.", "properties": {"status": {"type": "string", "description": "The webhook job status."}, "update_time": {"type": "string", "description": "The webhook job update time."}, "event_type": {"type": "string", "description": "The webhook job event type."}, "creation_time": {"type": "string", "description": "The webhook job creation time."}, "job_detail": {"type": "string", "description": "The webhook job notify detailed data."}, "id": {"type": "integer", "description": "The webhook job ID.", "format": "int64"}, "notify_type": {"type": "string", "description": "The webhook job notify type."}, "policy_id": {"type": "integer", "description": "The webhook policy ID.", "format": "int64"}}}, "NativeReportSummary": {"type": "object", "description": "The summary for the native report", "properties": {"end_time": {"format": "date-time", "type": "string", "example": "2006-01-02T15:04:05", "description": "The end time of the scan process that generating report"}, "severity": {"type": "string", "description": "The overall severity", "example": "High"}, "duration": {"format": "int64", "type": "integer", "example": 300, "description": "The seconds spent for generating the report"}, "start_time": {"format": "date-time", "type": "string", "example": "2006-01-02T14:04:05", "description": "The start time of the scan process that generating report"}, "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"}, "summary": {"$ref": "#/definitions/VulnerabilitySummary"}}}, "ScannerRegistrationSettings": {"type": "object", "properties": {"url": {"format": "url", "type": "string", "example": "http://harbor-scanner-clair:8080", "description": "A base URL of the scanner adapter."}, "access_credential": {"type": "string", "description": "An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API.\n", "example": "Bearer: JWTTOKENGOESHERE"}, "name": {"type": "string", "description": "The name of this registration", "example": "Clair"}, "auth": {"default": "", "type": "string", "description": "Specify what authentication approach is adopted for the HTTP communications.\nSupported types Basic\", \"Bearer\" and api key header \"X-ScannerAdapter-API-Key\"\n"}}}, "Project": {"type": "object", "properties": {"update_time": {"type": "string", "description": "The update time of the project."}, "owner_name": {"type": "string", "description": "The owner name of the project."}, "name": {"type": "string", "description": "The name of the project."}, "deleted": {"type": "boolean", "description": "A deletion mark of the project."}, "owner_id": {"type": "integer", "description": "The owner ID of the project always means the creator of the project.", "format": "int32"}, "repo_count": {"type": "integer", "description": "The number of the repositories under this project."}, "creation_time": {"type": "string", "description": "The creation time of the project."}, "togglable": {"type": "boolean", "description": "Correspond to the UI about whether the project's publicity is  updatable (for UI)"}, "project_id": {"type": "integer", "description": "Project ID", "format": "int32"}, "current_user_role_id": {"deprecated": true, "type": "integer", "description": "The role ID with highest permission of the current user who triggered the API (for UI)"}, "current_user_role_ids": {"items": {"type": "integer", "format": "int32"}, "type": "array", "description": "The list of role ID of the current user who triggered the API (for UI)"}, "chart_count": {"type": "integer", "description": "The total number of charts under this project."}, "cve_whitelist": {"description": "The CVE whitelist of this project.", "$ref": "#/definitions/CVEWhitelist"}, "metadata": {"description": "The metadata of the project.", "$ref": "#/definitions/ProjectMetadata"}}}, "Dependency": {"required": ["name", "version"], "type": "object", "description": "Another chart the chart depends on", "properties": {"version": {"type": "string", "description": "The version of the chart dependency"}, "name": {"type": "string", "description": "The name of the chart denpendency"}, "repository": {"type": "string", "description": "The URL to the repository"}}}, "RetentionExecution": {"type": "object", "properties": {"status": {"type": "string"}, "trigger": {"type": "string"}, "end_time": {"type": "string"}, "dry_run": {"type": "boolean"}, "start_time": {"type": "string"}, "id": {"type": "integer", "format": "int64"}, "policy_id": {"type": "integer", "format": "int64"}}}, "RetentionPolicyScope": {"type": "object", "properties": {"ref": {"type": "integer"}, "level": {"type": "string"}}}, "GeneralInfo": {"type": "object", "properties": {"with_notary": {"type": "boolean", "description": "If the Harbor instance is deployed with nested notary."}, "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."}, "auth_mode": {"type": "string", "description": "The auth mode of current Harbor instance."}, "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."}, "details": {"items": {"$ref": "#/definitions/VulnNamespaceTimestamp"}, "type": "array", "description": "Detail timestamp of different namespace.  This is introduced to handle the case when some updaters are executed successfully and some not."}}}, "with_clair": {"type": "boolean", "description": "If the Harbor instance is deployed with nested clair."}, "admiral_endpoint": {"type": "string", "description": "The url of the endpoint of admiral instance."}, "with_admiral": {"type": "boolean", "description": "If the Harbor instance is deployed with Admiral."}, "external_url": {"type": "string", "description": "The external URL of Harbor, with protocol."}, "project_creation_restriction": {"type": "string", "description": "Indicate who can create projects, it could be 'adminonly' or 'everyone'."}, "has_ca_root": {"type": "boolean", "description": "Indicate whether there is a ca root cert file ready for download in the file system."}, "self_registration": {"type": "boolean", "description": "Indicate whether the Harbor instance enable user to register himself."}, "registry_url": {"type": "string", "description": "The url of registry against which the docker command should be issued."}}}, "ProjectMember": {"type": "object", "properties": {"role_id": {"type": "integer", "description": "The role id 1 for projectAdmin, 2 for developer, 3 for guest, 4 for master"}, "member_group": {"$ref": "#/definitions/UserGroup"}, "member_user": {"$ref": "#/definitions/UserEntity"}}}, "VulnerabilitySummary": {"type": "object", "description": "VulnerabilitySummary contains the total number of the foun d vulnerabilities number and numbers of each severity level.\n", "properties": {"fixable": {"format": "int", "type": "integer", "example": 100, "description": "The number of the fixable vulnerabilities"}, "total": {"format": "int", "type": "integer", "example": 500, "description": "The total number of the found vulnerabilities"}, "summary": {"additionalProperties": {"type": "integer", "example": 10, "format": "int"}, "type": "object", "description": "Numbers of the vulnerabilities with different severity", "example": {"High": 5, "Critical": 5}}}}, "AccessLog": {"type": "object", "properties": {"username": {"type": "string", "description": "Username of the user in this log entry."}, "log_id": {"type": "integer", "description": "The ID of the log entry."}, "operation": {"type": "string", "description": "The operation against the repository in this log entry."}, "op_time": {"type": "string", "description": "The time when this operation is triggered."}, "repo_tag": {"type": "string", "description": "Tag of the repository in this log entry."}, "repo_name": {"type": "string", "description": "Name of the repository in this log entry."}}}, "VulnerabilityItem": {"type": "object", "properties": {"version": {"type": "string", "description": "The version of the package containing the vulnerability.", "example": "1.17.27"}, "severity": {"type": "string", "description": "A standard scale for measuring the severity of a vulnerability.", "example": "high"}, "links": {"items": {"type": "string", "example": "https://security-tracker.debian.org/tracker/CVE-2017-8283"}, "type": "array", "description": "The list of link to the upstream database with the full description of the vulnerability."}, "package": {"type": "string", "description": "An operating system or software dependency package containing the vulnerability.", "example": "dpkg"}, "fix_version": {"type": "string", "description": "The version of the package containing the fix if available.", "example": "1.18.0"}, "id": {"type": "string", "description": "ID of the CVE.", "example": "CVE-2017-8283"}, "description": {"type": "string", "description": "Description of the CVE", "example": "dpkg-source in dpkg 1.3.0 through 1.18.23 is able to use a non-GNU patch program"}}}, "UserSearch": {"type": "object", "properties": {"username": {"type": "string"}, "user_id": {"type": "integer", "description": "The ID of the user.", "format": "int"}}}, "Scanner": {"type": "object", "properties": {"version": {"type": "string", "description": "Version of the scanner adapter", "example": "1.0.1"}, "vendor": {"type": "string", "description": "Name of the scanner provider", "example": "CentOS"}, "name": {"type": "string", "description": "Name of the scanner", "example": "Clair"}}}, "RobotAccountCreate": {"type": "object", "properties": {"access": {"items": {"$ref": "#/definitions/RobotAccountAccess"}, "type": "array", "description": "The permission of robot account"}, "name": {"type": "string", "description": "The name of robot account"}, "description": {"type": "string", "description": "The description of robot account"}}}, "NotFoundChartAPIError": {"type": "object", "description": "Not found", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "Labels": {"items": {"$ref": "#/definitions/Label"}, "type": "array", "description": "A list of label"}, "LdapUsers": {"type": "object", "properties": {"ldap_email": {"type": "string", "description": "system will try to guess the user email address form \"mail\" or \"email\" attribute."}, "ldap_realname": {"type": "string", "description": "system will try to guess the user realname form \"uid\" or \"cn\" attribute."}, "ldap_username": {"type": "string", "description": "search ldap user name based on ldapconf."}}}, "ImmutableTagRule": {"type": "object", "properties": {"project_id": {"type": "integer", "format": "int64"}, "enabled": {"type": "boolean"}, "id": {"type": "integer", "format": "int64"}, "tag_filter": {"type": "string"}}}, "ProjectMetadata": {"type": "object", "properties": {"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\"."}, "auto_scan": {"type": "string", "description": "Whether scan images automatically when pushing. The valid values are \"true\", \"false\"."}, "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\"."}, "reuse_sys_cve_whitelist": {"type": "string", "description": "Whether this project reuse the system level CVE whitelist as the whitelist of its own.  The valid values are \"true\", \"false\". If it is set to \"true\" the actual whitelist associate with this project, if any, will be ignored."}, "public": {"type": "string", "description": "The public status of the project. The valid values are \"true\", \"false\"."}, "prevent_vul": {"type": "string", "description": "Whether prevent the vulnerable images from running. The valid values are \"true\", \"false\"."}}}, "RobotAccount": {"type": "object", "description": "The object of robot account", "properties": {"update_time": {"type": "string", "description": "The update time of the robot account"}, "description": {"type": "string", "description": "The description of robot account"}, "creation_time": {"type": "string", "description": "The creation time of the robot account"}, "expires_at": {"type": "integer", "description": "The expiration of robot account (in seconds)"}, "disabled": {"type": "boolean", "description": "The robot account is disable or enable"}, "project_id": {"type": "integer", "description": "The project id of robot account"}, "id": {"type": "integer", "description": "The id of robot account"}, "name": {"type": "string", "description": "The name of robot account"}}}, "RetentionPolicy": {"type": "object", "description": "retention policy", "properties": {"rules": {"items": {"$ref": "#/definitions/RetentionRule"}, "type": "array"}, "scope": {"type": "object", "$ref": "#/definitions/RetentionPolicyScope"}, "trigger": {"type": "object", "$ref": "#/definitions/RetentionRuleTrigger"}, "id": {"type": "integer", "format": "int64"}, "algorithm": {"type": "string"}}}, "LdapFailedImportUsers": {"type": "object", "properties": {"ldap_uid": {"type": "string", "description": "the uid can't add to system."}, "error": {"type": "string", "description": "fail reason."}}}, "ScanOverview": {"additionalProperties": {"$ref": "#/definitions/NativeReportSummary"}, "type": "object", "description": "The scan overview attached in the metadata of tag"}, "ResourceList": {"additionalProperties": {"type": "integer"}, "type": "object"}, "RobotAccountPostRep": {"type": "object", "properties": {"token": {"type": "string", "description": "the token of robot account"}, "name": {"type": "string", "description": "the name of robot account"}}}, "ForbiddenChartAPIError": {"type": "object", "description": "Operation is forbidden or quota exceeded", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "CVEWhitelistItem": {"type": "object", "description": "The item in CVE whitelist", "properties": {"cve_id": {"type": "string", "description": "The ID of the CVE, such as \"CVE-2019-10164\""}}}, "QuotaRefObject": {"additionalProperties": {}, "type": "object"}, "WebhookLastTrigger": {"type": "object", "description": "The webhook policy and last trigger time group by event type.", "properties": {"enabled": {"type": "boolean", "description": "Whether or not the webhook policy enabled."}, "creation_time": {"type": "string", "description": "The creation time of webhook policy."}, "event_type": {"type": "string", "description": "The webhook event type."}, "last_trigger_time": {"type": "string", "description": "The last trigger time of webhook policy."}}}, "Stats": {"type": "object", "description": "Stats provides the overall progress of the scan all process.", "properties": {"metrics": {"additionalProperties": {"type": "integer", "example": 10, "format": "int"}, "type": "object", "description": "The metrics data for the each status", "example": {"Running": 3, "Success": 5, "Error": "2,"}}, "completed": {"format": "int", "type": "integer", "example": 90, "description": "The number of the finished scan processes triggered by the scan all action"}, "total": {"format": "int", "type": "integer", "example": 100, "description": "The total number of scan processes triggered by the scan all action"}, "requester": {"type": "string", "description": "The requester identity which usually uses the ID of the scan all job", "example": "28"}}}, "InternalChartAPIError": {"type": "object", "description": "Internal server error occurred", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "CVEWhitelist": {"type": "object", "description": "The CVE Whitelist for system or project", "properties": {"items": {"items": {"$ref": "#/definitions/CVEWhitelistItem"}, "type": "array"}, "project_id": {"type": "integer", "description": "ID of the project which the whitelist belongs to.  For system level whitelist this attribute is zero."}, "id": {"type": "integer", "description": "ID of the whitelist"}, "expires_at": {"type": "integer", "description": "the time for expiration of the whitelist, in the form of seconds since epoch.  This is an optional attribute, if it's not set the CVE whitelist does not expire."}}}, "SystemInfo": {"type": "object", "properties": {"storage": {"items": {"$ref": "#/definitions/Storage"}, "type": "array", "description": "The storage of system."}}}, "Storage": {"type": "object", "properties": {"total": {"type": "integer", "description": "Total volume size.", "format": "int64"}, "free": {"type": "integer", "description": "Free volume size.", "format": "int64"}}}, "Search": {"type": "object", "properties": {"project": {"items": {"$ref": "#/definitions/Project"}, "type": "array", "description": "Search results of the projects that matched the filter keywords."}, "chart": {"items": {"$ref": "#/definitions/SearchResult"}, "type": "array", "description": "Search results of the charts that macthed the filter keywords."}, "repository": {"items": {"$ref": "#/definitions/SearchRepository"}, "type": "array", "description": "Search results of the repositories that matched the filter keywords."}}}, "Label": {"type": "object", "properties": {"update_time": {"type": "string", "description": "The update time of label."}, "description": {"type": "string", "description": "The description of label."}, "color": {"type": "string", "description": "The color of label."}, "creation_time": {"type": "string", "description": "The creation time of label."}, "deleted": {"type": "boolean", "description": "The label is deleted or not."}, "scope": {"type": "string", "description": "The scope of label, g for global labels and p for project labels."}, "project_id": {"type": "integer", "description": "The project ID if the label is a project label."}, "id": {"type": "integer", "description": "The ID of label."}, "name": {"type": "string", "description": "The name of label."}}}, "SearchRepository": {"type": "object", "properties": {"repository_name": {"type": "string", "description": "The name of the repository"}, "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)"}, "tags_count": {"type": "integer", "description": "The count of tags in the repository"}, "project_id": {"type": "integer", "description": "The ID of the project that the repository belongs to"}, "pull_count": {"type": "integer", "description": "The count how many times the repository is pulled"}}}, "RetentionExecutionTask": {"type": "object", "properties": {"status": {"type": "string"}, "retained": {"type": "integer"}, "job_id": {"type": "string"}, "repository": {"type": "string"}, "status_code": {"type": "integer"}, "start_time": {"type": "string"}, "status_revision": {"type": "integer", "format": "int64"}, "end_time": {"type": "string"}, "total": {"type": "integer"}, "id": {"type": "integer", "format": "int64"}, "execution_id": {"type": "integer", "format": "int64"}}}, "SecurityReport": {"type": "object", "description": "The security information of the chart", "properties": {"signature": {"$ref": "#/definitions/DigitalSignature"}}}, "StringConfigItem": {"type": "object", "properties": {"editable": {"type": "boolean", "description": "The configure item can be updated or not"}, "value": {"type": "string", "description": "The string value of current config item"}}}, "UserEntity": {"type": "object", "properties": {"username": {"type": "string", "description": "The name of the user."}, "user_id": {"type": "integer", "description": "The ID of the user."}}}, "InsufficientStorageChartAPIError": {"type": "object", "description": "Insufficient storage", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "Resource": {"type": "object", "properties": {"replication_policies": {"items": {"$ref": "#/definitions/ReplicationPolicy"}, "type": "array", "description": "The replication policy list."}}}, "ProjectSummary": {"type": "object", "properties": {"master_count": {"type": "integer", "description": "The total number of master members."}, "project_admin_count": {"type": "integer", "description": "The total number of project admin members."}, "developer_count": {"type": "integer", "description": "The total number of developer members."}, "chart_count": {"type": "integer", "description": "The total number of charts under this project."}, "repo_count": {"type": "integer", "description": "The number of the repositories under this project."}, "quota": {"type": "object", "properties": {"hard": {"description": "The hard limits of the quota", "$ref": "#/definitions/ResourceList"}, "used": {"description": "The used status of the quota", "$ref": "#/definitions/ResourceList"}}}, "guest_count": {"type": "integer", "description": "The total number of guest members."}}}, "ScannerCapability": {"type": "object", "properties": {"produces_mime_types": {"items": {"type": "string", "example": "application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0"}, "type": "array"}, "consumes_mime_types": {"items": {"type": "string", "example": "application/vnd.docker.distribution.manifest.v2+json"}, "type": "array"}}}, "IsDefault": {"type": "object", "properties": {"is_default": {"type": "boolean", "description": "A flag indicating whether a scanner registration is default."}}}, "BoolConfigItem": {"type": "object", "properties": {"editable": {"type": "boolean", "description": "The configure item can be updated or not"}, "value": {"type": "boolean", "description": "The boolean value of current config item"}}}, "TriggerSettings": {"type": "object", "properties": {"cron": {"type": "string", "description": "The cron string for scheduled trigger"}}}, "ChartVersionDetails": {"type": "object", "description": "The detailed information of the chart entry", "properties": {"files": {"additionalProperties": {"type": "string"}, "type": "object"}, "dependencies": {"items": {"$ref": "#/definitions/Dependency"}, "type": "array"}, "values": {"additionalProperties": {"type": "object"}, "type": "object"}, "security": {"$ref": "#/definitions/SecurityReport"}, "labels": {"$ref": "#/definitions/Labels"}, "metadata": {"$ref": "#/definitions/ChartVersion"}}}, "Permission": {"type": "object", "description": "The permission", "properties": {"action": {"type": "string", "description": "The permission action"}, "resource": {"type": "string", "description": "The permission resoruce"}}}, "ChartVersions": {"items": {"$ref": "#/definitions/ChartVersion"}, "type": "array", "description": "A list of chart entry"}, "SearchResult": {"type": "object", "description": "The chart search result item", "properties": {"score": {"type": "integer", "description": "The matched level"}, "name": {"type": "string", "description": "The chart name with repo name"}, "chart": {"$ref": "#/definitions/ChartVersion"}}}, "Quota": {"type": "object", "description": "The quota object", "properties": {"update_time": {"type": "string", "description": "the update time of the quota"}, "used": {"description": "The used status of the quota", "$ref": "#/definitions/ResourceList"}, "ref": {"description": "The reference object of the quota", "$ref": "#/definitions/QuotaRefObject"}, "hard": {"description": "The hard limits of the quota", "$ref": "#/definitions/ResourceList"}, "creation_time": {"type": "string", "description": "the creation time of the quota"}, "id": {"type": "integer", "description": "ID of the quota"}}}, "RepositoryDescription": {"type": "object", "properties": {"description": {"type": "string", "description": "The description of the repository."}}}, "RetentionRuleTrigger": {"type": "object", "properties": {"kind": {"type": "string"}, "references": {"type": "object"}, "settings": {"type": "object"}}}, "EmailServerSetting": {"type": "object", "properties": {"email_ssl": {"type": "boolean", "description": "Use ssl/tls or not."}, "email_password": {"type": "string", "description": "The password of email server."}, "email_identity": {"type": "string", "description": "The dentity of email server."}, "email_port": {"type": "integer", "description": "The port of email server."}, "email_username": {"type": "string", "description": "The username of email server."}, "email_host": {"type": "string", "description": "The host of email server."}}}, "ProjectScanner": {"type": "object", "properties": {"uuid": {"type": "string", "description": "The identifier of the scanner registration"}}}, "Report": {"type": "object", "description": "The harbor native report format", "properties": {"generated_at": {"type": "string", "description": "Time of generating this report", "example": "2006-01-02T15:04:05"}, "vulnerabilities": {"items": {"$ref": "#/definitions/VulnerabilityItem"}, "type": "array"}, "scanner": {"$ref": "#/definitions/Scanner"}, "severity": {"type": "string", "description": "A standard scale for measuring the severity of a vulnerability.", "example": "high"}}}, "Password": {"type": "object", "properties": {"new_password": {"type": "string", "description": "New password for marking as to be updated."}, "old_password": {"type": "string", "description": "The user's existing password."}}}, "ReplicationTask": {"type": "object", "description": "The replication task", "properties": {"status": {"type": "string", "description": "The status"}, "job_id": {"type": "string", "description": "The job ID"}, "start_time": {"type": "string", "description": "The start time"}, "dst_resource": {"type": "string", "description": "The destination resource"}, "src_resource": {"type": "string", "description": "The source resource"}, "resource_type": {"type": "string", "description": "The resource type"}, "id": {"type": "integer", "description": "The ID"}, "execution_id": {"type": "integer", "description": "The execution ID"}, "end_time": {"type": "string", "description": "The end time"}}}, "RetagReq": {"type": "object", "properties": {"override": {"type": "boolean", "description": "If target tag already exists, whether to override it"}, "src_image": {"type": "string", "description": "Source image to be retagged, e.g. 'stage/app:v1.0'"}, "tag": {"type": "string", "description": "new tag to be created"}}}, "RetentionRuleMetadata": {"type": "object", "description": "the tag retention rule metadata", "properties": {"display_text": {"type": "string", "description": "rule display text"}, "action": {"type": "string", "description": "rule action"}, "params": {"items": {"$ref": "#/definitions/RetentionRuleParamMetadata"}, "type": "array", "description": "rule params"}, "rule_template": {"type": "string", "description": "rule id"}}}, "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": {"items": {"$ref": "#/definitions/ComponentHealthStatus"}, "type": "array"}}}, "GCResult": {"type": "object", "properties": {"job_status": {"type": "string", "description": "the status of gc job."}, "update_time": {"type": "string", "description": "the update time of gc job."}, "schedule": {"$ref": "#/definitions/AdminJobScheduleObj"}, "deleted": {"type": "boolean", "description": "if gc job was deleted."}, "job_kind": {"type": "string", "description": "the job kind of gc job."}, "creation_time": {"type": "string", "description": "the creation time of gc job."}, "id": {"type": "integer", "description": "the id of gc job."}, "job_name": {"type": "string", "description": "the job name of gc job."}}}, "ChartInfoList": {"items": {"$ref": "#/definitions/ChartInfoEntry"}, "type": "array", "description": "The chart list under the project"}, "JobStatus": {"type": "object", "properties": {"status": {"type": "string", "description": "The status of the job."}, "update_time": {"type": "string", "description": "The update time of the job."}, "repository": {"type": "string", "description": "The repository handled by the job."}, "tags": {"items": {"$ref": "#/definitions/Tags"}, "type": "array", "description": "The repository's used tag list."}, "creation_time": {"type": "string", "description": "The creation time of the job."}, "operation": {"type": "string", "description": "The operation of the job."}, "id": {"type": "integer", "description": "The job ID.", "format": "int64"}, "policy_id": {"type": "integer", "description": "The ID of the policy that triggered this job.", "format": "int64"}}}, "Manifest": {"type": "object", "properties": {"config": {"type": "string", "description": "The config of the repository."}, "manifest": {"type": "object", "description": "The detail of manifest."}}}, "RoleRequest": {"type": "object", "properties": {"role_id": {"type": "integer", "description": "The role id 1 for projectAdmin, 2 for developer, 3 for guest, 4 for master"}}}, "ScannerRegistrationReq": {"type": "object", "properties": {"name": {"type": "string", "description": "The name of this registration", "example": "Clair"}, "url": {"format": "url", "type": "string", "example": "http://harbor-scanner-clair:8080", "description": "A base URL of the scanner adapter."}, "access_credential": {"type": "string", "description": "An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API.\n", "example": "Bearer: JWTTOKENGOESHERE"}, "auth": {"default": "", "type": "string", "description": "Specify what authentication approach is adopted for the HTTP communications.\nSupported types Basic\", \"Bearer\" and api key header \"X-ScannerAdapter-API-Key\"\n", "example": "Bearer"}, "disabled": {"default": false, "type": "boolean", "description": "Indicate whether the registration is enabled or not"}, "use_internal_addr": {"default": false, "type": "boolean", "description": "Indicate whether use internal registry addr for the scanner to pull content or not"}, "skip_certVerify": {"default": false, "type": "boolean", "description": "Indicate if skip the certificate verification when sending HTTP requests"}, "description": {"type": "string", "description": "An optional description of this registration.", "example": "A free-to-use tool that scans container images for package vulnerabilities.\n"}}}, "ComponentOverviewEntry": {"type": "object", "properties": {"count": {"type": "integer", "description": "number of the components with certain severity."}, "severity": {"type": "integer", "description": "1-None/Negligible, 2-Unknown, 3-Low, 4-Medium, 5-High"}}}, "QuotaUpdateReq": {"type": "object", "properties": {"hard": {"description": "The new hard limits for the quota", "$ref": "#/definitions/ResourceList"}}}, "WebhookPolicy": {"type": "object", "description": "The webhook policy object", "properties": {"update_time": {"type": "string", "description": "The update time of the webhook policy."}, "description": {"type": "string", "description": "The description of webhook policy."}, "creator": {"type": "string", "description": "The creator of the webhook policy."}, "creation_time": {"type": "string", "description": "The create time of the webhook policy."}, "enabled": {"type": "boolean", "description": "Whether the webhook policy is enabled or not."}, "targets": {"items": {"$ref": "#/definitions/WebhookTargetObject"}, "type": "array"}, "event_types": {"items": {"type": "string"}, "type": "array"}, "project_id": {"type": "integer", "description": "The project ID of webhook policy."}, "id": {"type": "integer", "description": "The webhook policy ID.", "format": "int64"}, "name": {"type": "string", "description": "The name of webhook policy."}}}, "RobotAccountAccess": {"type": "object", "properties": {"action": {"type": "string", "description": "the action to resource that perdefined in harbor rbac"}, "resource": {"type": "string", "description": "the resource of harbor"}}}, "ScannerAdapterMetadata": {"type": "object", "description": "The metadata info of the scanner adapter", "properties": {"name": {"$ref": "#/definitions/Scanner"}, "capabilities": {"items": {"$ref": "#/definitions/ScannerCapability"}, "type": "array"}, "properties": {"additionalProperties": {"type": "string"}, "type": "object", "example": {"harbor.scanner-adapter/registry-authorization-type": "Bearer"}}}}, "ProjectMemberEntity": {"type": "object", "properties": {"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."}, "role_name": {"type": "string", "description": "the name of the role"}, "entity_name": {"type": "string", "description": "the name of the group member."}, "entity_type": {"type": "string", "description": "the entity's type, u for user entity, g for group entity."}, "project_id": {"type": "integer", "description": "the project id"}, "id": {"type": "integer", "description": "the project member id"}, "role_id": {"type": "integer", "description": "the role id"}}}, "IntegerConfigItem": {"type": "object", "properties": {"editable": {"type": "boolean", "description": "The configure item can be updated or not"}, "value": {"type": "integer", "description": "The integer value of current config item"}}}, "ProjectReq": {"type": "object", "properties": {"count_limit": {"type": "integer", "description": "The count quota of the project.", "format": "int64"}, "project_name": {"type": "string", "description": "The name of the project."}, "cve_whitelist": {"description": "The CVE whitelist of the project.", "$ref": "#/definitions/CVEWhitelist"}, "storage_limit": {"type": "integer", "description": "The storage quota of the project.", "format": "int64"}, "metadata": {"description": "The metadata of the project.", "$ref": "#/definitions/ProjectMetadata"}}}, "DigitalSignature": {"type": "object", "description": "The signature of the chart", "properties": {"prov_file": {"type": "string", "description": "The URL of the provance file"}, "signed": {"type": "boolean", "description": "A flag to indicate if the chart is signed"}}}, "Configurations": {"type": "object", "properties": {"oidc_verify_cert": {"type": "boolean", "description": "Whether verify your OIDC server certificate, disable it if your OIDC server is hosted via self-hosted certificate."}, "email_identity": {"type": "string", "description": "By default it's empty so the email_username is picked."}, "ldap_group_search_filter": {"type": "string", "description": "The filter to search the ldap group."}, "auth_mode": {"type": "string", "description": "The auth mode of current system, such as \"db_auth\", \"ldap_auth\""}, "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."}, "oidc_scope": {"type": "string", "description": "The scope sent to OIDC server during authentication, should be separated by comma. It has to contain \u201copenid\u201d, and \u201coffline_access\u201d. If you are using google, please remove \u201coffline_access\u201d from this field."}, "ldap_search_dn": {"type": "string", "description": "The DN of the user to do the search."}, "storage_per_project": {"type": "string", "description": "The default storage quota for the new created projects."}, "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\""}}, "description": "The parameters of the policy, the values are dependant on the type of the policy."}}}, "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."}, "ldap_timeout": {"type": "integer", "description": "timeout in seconds for connection to LDAP server."}, "ldap_base_dn": {"type": "string", "description": "The Base DN for LDAP binding."}, "ldap_filter": {"type": "string", "description": "The filter for LDAP binding."}, "read_only": {"type": "boolean", "description": "'docker push' is prohibited by Harbor if you set it to true.   "}, "quota_per_project_enable": {"type": "boolean", "description": "This attribute indicates whether quota per project enabled in harbor"}, "ldap_url": {"type": "string", "description": "The URL of LDAP server."}, "oidc_name": {"type": "string", "description": "The name of the OIDC provider."}, "project_creation_restriction": {"type": "string", "description": "This attribute restricts what users have the permission to create project.  It can be \"everyone\" or \"adminonly\"."}, "ldap_uid": {"type": "string", "description": "The attribute which is used as identity for the LDAP binding, such as \"CN\" or \"SAMAccountname\""}, "oidc_client_id": {"type": "string", "description": "The client id of the OIDC."}, "ldap_group_base_dn": {"type": "string", "description": "The base DN to search LDAP group."}, "ldap_group_attribute_name": {"type": "string", "description": "The attribute which is used as identity of the LDAP group, default is cn."}, "email_insecure": {"type": "boolean", "description": "Whether or not the certificate will be verified when Harbor tries to access the email server."}, "ldap_group_admin_dn": {"type": "string", "description": "Specify the ldap group which have the same privilege with Harbor admin."}, "email_username": {"type": "string", "description": "The username for authenticate against SMTP server."}, "oidc_endpoint": {"type": "string", "description": "The URL of an OIDC-complaint server, must start with 'https://'."}, "oidc_client_secret": {"type": "string", "description": "The client secret of the OIDC."}, "ldap_scope": {"type": "integer", "description": "0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE"}, "count_per_project": {"type": "string", "description": "The default count quota for the new created projects."}, "token_expiration": {"type": "integer", "description": "The expiration time of the token for internal Registry, in minutes."}, "ldap_group_search_scope": {"type": "integer", "description": "The scope to search ldap. '0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'"}, "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."}, "email_port": {"type": "integer", "description": "The port of SMTP server."}, "email_host": {"type": "string", "description": "The hostname of SMTP server that sends Email notification."}, "email_from": {"type": "string", "description": "The sender name for Email notification."}}}, "RobotAccountUpdate": {"type": "object", "properties": {"disabled": {"type": "boolean", "description": "The robot account is disable or enable"}}}, "WebhookTargetObject": {"type": "object", "description": "The webhook policy target object.", "properties": {"type": {"type": "string", "description": "The webhook target notify type."}, "auth_header": {"type": "string", "description": "The webhook auth header."}, "skip_cert_verify": {"type": "boolean", "description": "Whether or not to skip cert verify."}, "address": {"type": "string", "description": "The webhook target address."}}}, "AdminJobScheduleObj": {"type": "object", "properties": {"cron": {"type": "string", "description": "A cron expression, a time-based job scheduler."}, "type": {"type": "string", "description": "The schedule type. The valid values are 'Hourly', 'Daily', 'Weekly', 'Custom', 'Manually' and 'None'.\n'Manually' means to trigger it right away and 'None' means to cancel the schedule.\n"}}}, "ChartInfoEntry": {"required": ["name", "total_versions", "created"], "type": "object", "description": "The object contains basic chart information", "properties": {"updated": {"type": "string", "description": "The created time of chart"}, "name": {"type": "string", "description": "Name of chart"}, "created": {"type": "string", "description": "The created time of chart"}, "deprecated": {"type": "boolean", "description": "Flag to indicate if the chart is deprecated"}, "total_versions": {"type": "integer", "description": "Total count of chart versions"}, "latest_version": {"type": "string", "description": "latest version of chart"}, "home": {"type": "string", "description": "The home website of chart"}, "icon": {"type": "string", "description": "The icon path of chart"}}}, "ReplicationPolicy": {"type": "object", "properties": {"update_time": {"type": "string", "description": "The update time of the policy."}, "description": {"type": "string", "description": "The description of the policy."}, "enabled": {"type": "boolean", "description": "Whether the policy is enabled or not."}, "filters": {"items": {"$ref": "#/definitions/ReplicationFilter"}, "type": "array", "description": "The replication policy filter array."}, "dest_registry": {"description": "The destination registry.", "$ref": "#/definitions/Registry"}, "creation_time": {"type": "string", "description": "The create time of the policy."}, "src_registry": {"description": "The source registry.", "$ref": "#/definitions/Registry"}, "dest_namespace": {"type": "string", "description": "The destination namespace."}, "trigger": {"$ref": "#/definitions/ReplicationTrigger"}, "deletion": {"type": "boolean", "description": "Whether to replicate the deletion operation."}, "override": {"type": "boolean", "description": "Whether to override the resources on the destination registry."}, "id": {"type": "integer", "description": "The policy ID.", "format": "int64"}, "name": {"type": "string", "description": "The policy name."}}}, "LdapConf": {"type": "object", "properties": {"ldap_url": {"type": "string", "description": "The url of ldap service."}, "ldap_uid": {"type": "string", "description": "The serach uid from ldap service attributes."}, "ldap_search_dn": {"type": "string", "description": "The search dn of ldap service."}, "ldap_connection_timeout": {"type": "integer", "description": "The connect timeout of ldap service(second).", "format": "int64"}, "ldap_search_password": {"type": "string", "description": "The search password of ldap service."}, "ldap_scope": {"type": "integer", "description": "The serach scope of ldap service.", "format": "int64"}, "ldap_base_dn": {"type": "string", "description": "The base dn of ldap service."}, "ldap_filter": {"type": "string", "description": "The serach filter of ldap service."}}}, "Tags": {"type": "object", "properties": {"tag": {"type": "string", "description": "The repository's used tag."}}}, "ComponentHealthStatus": {"type": "object", "description": "The health status of component", "properties": {"status": {"type": "string", "description": "The health status of component"}, "name": {"type": "string", "description": "The component name"}, "error": {"type": "string", "description": "(optional) The error message when the status is \"unhealthy\""}}}, "ConflictFormatedError": {"type": "object", "description": "Conflicts", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "StatisticMap": {"type": "object", "properties": {"total_project_count": {"type": "integer", "description": "The count of the total projects, only be seen when the is admin.", "format": "int32"}, "public_project_count": {"type": "integer", "description": "The count of the public projects.", "format": "int32"}, "private_project_count": {"type": "integer", "description": "The count of the private projects which the user is a member of.", "format": "int32"}, "public_repo_count": {"type": "integer", "description": "The count of the public repositories belonging to the public projects which the user is a member of.", "format": "int32"}, "total_repo_count": {"type": "integer", "description": "The count of the total repositories, only be seen when the user is admin.", "format": "int32"}, "private_repo_count": {"type": "integer", "description": "The count of the private repositories belonging to the projects which the user is a member of.", "format": "int32"}}}, "User": {"type": "object", "properties": {"username": {"type": "string"}, "comment": {"type": "string"}, "update_time": {"type": "string"}, "password": {"type": "string"}, "user_id": {"type": "integer", "description": "The ID of the user.", "format": "int"}, "realname": {"type": "string"}, "deleted": {"type": "boolean"}, "creation_time": {"type": "string"}, "role_id": {"type": "integer", "format": "int"}, "has_admin_role": {"type": "boolean"}, "role_name": {"type": "string"}, "reset_uuid": {"type": "string"}, "Salt": {"type": "string"}, "email": {"type": "string"}}}, "ScannerRegistration": {"type": "object", "description": "Registration represents a named configuration for invoking a scanner via its adapter.\n", "properties": {"disabled": {"default": false, "type": "boolean", "description": "Indicate whether the registration is enabled or not"}, "vendor": {"type": "string", "description": "Optional property to describe the vendor of the scanner registration", "example": "CentOS"}, "description": {"type": "string", "description": "An optional description of this registration.", "example": "A free-to-use tool that scans container images for package vulnerabilities.\n"}, "url": {"format": "url", "type": "string", "example": "http://harbor-scanner-clair:8080", "description": "A base URL of the scanner adapter"}, "adapter": {"type": "string", "description": "Optional property to describe the name of the scanner registration", "example": "Clair"}, "access_credential": {"type": "string", "description": "An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API.\n", "example": "Bearer: JWTTOKENGOESHERE"}, "uuid": {"type": "string", "description": "The unique identifier of this registration."}, "auth": {"default": "", "type": "string", "description": "Specify what authentication approach is adopted for the HTTP communications.\nSupported types Basic\", \"Bearer\" and api key header \"X-ScannerAdapter-API-Key\"\n", "example": "Bearer"}, "is_default": {"default": false, "type": "boolean", "description": "Indicate if the registration is set as the system default one"}, "version": {"type": "string", "description": "Optional property to describe the version of the scanner registration", "example": "1.0.1"}, "health": {"default": "", "type": "string", "description": "Indicate the healthy of the registration", "example": "healthy"}, "use_internal_addr": {"default": false, "type": "boolean", "description": "Indicate whether use internal registry addr for the scanner to pull content or not"}, "skip_certVerify": {"default": false, "type": "boolean", "description": "Indicate if skip the certificate verification when sending HTTP requests"}, "name": {"type": "string", "example": "Clair", "description": "The name of this registration."}}}, "ReplicationFilter": {"type": "object", "properties": {"type": {"type": "string", "description": "The replication policy filter type."}, "value": {"type": "string", "description": "The value of replication policy filter."}}}, "RetentionSelector": {"type": "object", "properties": {"decoration": {"type": "string"}, "pattern": {"type": "string"}, "kind": {"type": "string"}}}}, "security": [{"basicAuth": []}], "swagger": "2.0", "consumes": ["application/json"]}
