Create Registries Harbor Projects
Creates a project in a Harbor registry using the supplied specification. In vSphere 7.0, a Harbor registry is deployed in a vSphere cluster with vSphere namespaces enabled. When a namespace is created, a project with same name as the namespace is created in the Harbor registry, so this operation should not be called.
Request
URLURL
Path Parameters
Path Parameters
Identifier of the Registry. The parameter must be an identifier for the resource type: com.vmware.vcenter.content.Registry.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
Information used to create the Harbor project.
{
"name": "string",
"scope": "PUBLIC"
}
Name of the Harbor project. Should be between 1-63 characters long alphanumeric string and may contain the following characters: a-z,0-9, and ‘-’. Must be starting with characters or numbers, with the ‘-’ character allowed anywhere except the first or last character.
The Projects.Scope enumerated type in a project defines access levels of the project.
PUBLIC : A Harbor project can be accessed by everyone.
PRIVATE : A Harbor project can only be accessed by assigned users.
Possible values are: PUBLIC , PRIVATE
Authentication
Response
Response BodyResponse Body
Identifier of the newly created Harbor project. The result will be an identifier for the resource type: com.vmware.vcenter.content.Registry.Harbor.Project.
Errors
com.vmware.vapi.std.errors.invalid_argument : if spec contains any error. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if Harbor registry is being deleted. | com.vmware.vapi.std.errors.already_exists : if a project with the same name already exists in the registry. In vSphere 7.0, the existing project could have been created automatically when a namespace with the same name is created.
com.vmware.vapi.std.errors.unauthorized : if the user does not have ContentLibrary.ManageRegistryProject privilege.
com.vmware.vapi.std.errors.not_found : if a registry specified by registry could not be found.
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: post
x-vmw-doc-deprecated-path: /rest/vcenter/content/registries/harbor/{registry}/projects
x-vmw-doc-operation: create