openapi: 3.2.0 info: title: Harbor Project Metadata API description: These APIs provide services for manipulating Harbor project. version: '2.0' servers: - url: http://localhost/api/v2.0 - url: https://localhost/api/v2.0 security: - basic: [] - {} tags: - name: projectMetadata paths: /projects/{project_name_or_id}/metadatas/: get: summary: Get the metadata of the specific project operationId: listProjectMetadatas parameters: - $ref: '#/components/parameters/requestId' - $ref: '#/components/parameters/isResourceName' - $ref: '#/components/parameters/projectNameOrId' tags: - projectMetadata responses: '200': description: Success content: application/json: schema: type: object additionalProperties: type: string '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' '500': $ref: '#/components/responses/500' post: summary: Add metadata for the specific project operationId: addProjectMetadatas tags: - projectMetadata parameters: - $ref: '#/components/parameters/requestId' - $ref: '#/components/parameters/isResourceName' - $ref: '#/components/parameters/projectNameOrId' responses: '200': $ref: '#/components/responses/200' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' '409': $ref: '#/components/responses/409' '500': $ref: '#/components/responses/500' requestBody: content: application/json: schema: type: object additionalProperties: type: string /projects/{project_name_or_id}/metadatas/{meta_name}: get: summary: Get the specific metadata of the specific project operationId: getProjectMetadata parameters: - $ref: '#/components/parameters/requestId' - $ref: '#/components/parameters/isResourceName' - $ref: '#/components/parameters/projectNameOrId' - name: meta_name in: path description: The name of metadata. required: true schema: type: string tags: - projectMetadata responses: '200': description: Success content: application/json: schema: type: object additionalProperties: type: string '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' '500': $ref: '#/components/responses/500' put: summary: Update the specific metadata for the specific project operationId: updateProjectMetadata tags: - projectMetadata parameters: - $ref: '#/components/parameters/requestId' - $ref: '#/components/parameters/isResourceName' - $ref: '#/components/parameters/projectNameOrId' - name: meta_name in: path description: The name of metadata. required: true schema: type: string responses: '200': $ref: '#/components/responses/200' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' '409': $ref: '#/components/responses/409' '500': $ref: '#/components/responses/500' requestBody: content: application/json: schema: type: object additionalProperties: type: string delete: summary: Delete the specific metadata for the specific project operationId: deleteProjectMetadata tags: - projectMetadata parameters: - $ref: '#/components/parameters/requestId' - $ref: '#/components/parameters/isResourceName' - $ref: '#/components/parameters/projectNameOrId' - name: meta_name in: path description: The name of metadata. required: true schema: type: string responses: '200': $ref: '#/components/responses/200' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' '409': $ref: '#/components/responses/409' '500': $ref: '#/components/responses/500' components: responses: '403': description: Forbidden. The caller does not have sufficient permission to perform the requested operation. headers: X-Request-Id: description: The ID of the corresponding request for the response schema: type: string content: application/json: schema: $ref: '#/components/schemas/Errors' '500': description: Internal server error. Inspect the `errors` array in the response body for details. headers: X-Request-Id: description: The ID of the corresponding request for the response schema: type: string content: application/json: schema: $ref: '#/components/schemas/Errors' '409': description: Conflict. The resource already exists or the current state prevents the operation. headers: X-Request-Id: description: The ID of the corresponding request for the response schema: type: string content: application/json: schema: $ref: '#/components/schemas/Errors' '401': description: Unauthorized. Authentication is required to access this resource. headers: X-Request-Id: description: The ID of the corresponding request for the response schema: type: string content: application/json: schema: $ref: '#/components/schemas/Errors' '400': description: Bad request. The request body or query parameters are invalid. Inspect the `errors` array in the response body for details. headers: X-Request-Id: description: The ID of the corresponding request for the response schema: type: string content: application/json: schema: $ref: '#/components/schemas/Errors' '200': description: Success headers: X-Request-Id: description: The ID of the corresponding request for the response schema: type: string '404': description: Not found. The requested resource does not exist. headers: X-Request-Id: description: The ID of the corresponding request for the response schema: type: string content: application/json: schema: $ref: '#/components/schemas/Errors' parameters: isResourceName: name: X-Is-Resource-Name description: The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. in: header required: false schema: type: boolean default: false projectNameOrId: name: project_name_or_id in: path description: The name or id of the project required: true schema: type: string requestId: name: X-Request-Id description: An unique ID for the request in: header required: false schema: type: string minLength: 1 schemas: Errors: description: The error array that describe the errors got during the handling of request type: object properties: errors: type: array items: $ref: '#/components/schemas/Error' Error: description: a model for all the error response coming from harbor type: object properties: code: type: string description: The error code message: type: string description: The error message example: code: NOT_FOUND message: artifact library/hello-world:latest not found securitySchemes: basic: type: http scheme: basic