REST API - create

vcenter content registries harbor project members: create

Create a project member for specified Harbor project.

Request:

HTTP request

POST https://{server}/rest/vcenter/content/registries/harbor/{registry}/projects/{project}/members

Path Parameters

Name Type Description
Required
registry string Identifier of the Registry.
project string Identifier for the project.

Request Body Structure:

{
    "spec"{
        "role""MASTER",
        "member_name""string",
        "type""USER"
    }
}

Request Body Parameters:

Name Type Description
bold = required
spec create_spec Information about the member to be created.
spec.member_name string
spec.type string Type of project member to be created.

Describes the type of project member to be created for a Harbor project. Value is one of:
USER: Project member type for an individual user.
GROUP: Project member type for a group of users.

spec.role string Role to be assigned.

Describes roles available in a Harbor project. Value is one of:
MASTER: This role allows image pull and push, repository and image deletion on an associated project,
GUEST: This role allows image pull on an associated project.

Response:

HTTP Status Code: 200

Representation:

{
    "value""obj-103"
}

Response Type:

Name Type Description
bold = required
value string Identifier of the newly created Harbor project member.

Errors:

HTTP Status Code Type Description
400 invalid_argument if spec contains any error.
400 not_allowed_in_current_state if Harbor is being deleted.
404 not_found if registry or project cannot be found.
400 already_exists if the specified user or group is already a member in the Harbor project.
500 error if the system reports an error while responding to the request.
401 unauthenticated if the user can not be authenticated.
403 unauthorized if the user does not have ContentLibrary.ManageRegistryProject privilege.