{"info": {"version": "2.0", "description": "These APIs provide services for manipulating Harbor project.", "title": "Harbor API"}, "paths": {"/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"]}}, "/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"]}}, "/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 attached labels of the specified chart version.", "summary": "Return the attached 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"]}}}, "schemes": ["http", "https"], "responses": {"NotFound": {"description": "Not Found"}, "OK": {"description": "Success"}, "Unauthorized": {"description": "Unauthorized"}, "Created": {"headers": {"Location": {"type": "string", "description": "The URL of the created resource"}}, "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/v2.0", "securityDefinitions": {"basic": {"type": "basic"}}, "host": "localhost", "definitions": {"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"}}}, "InternalChartAPIError": {"type": "object", "description": "Internal server error occurred", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "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"}}}, "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"}}}, "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."}}}, "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"}, "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"}}}, "InsufficientStorageChartAPIError": {"type": "object", "description": "Insufficient storage", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "BadRequestFormatedError": {"type": "object", "description": "Bad request", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "Permission": {"type": "object", "description": "The permission", "properties": {"action": {"type": "string", "description": "The permission action"}, "resource": {"type": "string", "description": "The permission resoruce"}}}, "NotFoundChartAPIError": {"type": "object", "description": "Not found", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "UnauthorizedChartAPIError": {"type": "object", "description": "Unauthorized", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "Labels": {"items": {"$ref": "#/definitions/Label"}, "type": "array", "description": "A list of label"}, "ConflictFormatedError": {"type": "object", "description": "Conflicts", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}, "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."}}}, "ForbiddenChartAPIError": {"type": "object", "description": "Operation is forbidden or quota exceeded", "allOf": [{"$ref": "#/definitions/ChartAPIError"}]}}, "security": [{"basic": []}, {}], "swagger": "2.0", "consumes": ["application/json"]}
