A topic is added to describe how to call the CreateProjectMember operation to add a user to your DataWorks workspace.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Required CreateProjectMember

The operation that you want to perform.

ProjectId Long Yes 27

Dataworks ID of the workspace.

RegionId String Required cn-shanghai

Dataworks region ID of the workspace.

UserId String Required 1234

The ID of the user to be added.

ClientToken String No 1AFAE64E-D1BE-432B-A9****

An idempotent string. We recommend that you use a UUID.

RoleCode String No role_project_guest

The role code. This parameter is optional. If you specify this parameter, the user is added to the role.

Response parameters

Parameter Type Example Description
RequestId String 1AFAE64E-D1BE-432B-A9****

The ID of the request.


Sample requests

http(s)://[Endpoint]/? Action=CreateProjectMember
&<Common request parameters>

Sample success responses

XML format


JSON format

    "RequestId": "1AFAE64E-D1BE-432B-A9****"

Error codes

HttpCode Error code Error message Description
400 Invalid.Tenant.ConnectionNotExists The connection does not exist. The data source does not exist.
400 Invalid.Tenant.ProjectNotExists The project does not exist. The error message returned because the specified project does not exist.
403 Invalid.Tenant.UserIsNotProjectOwnerOrAdmin The user is not a project administrator or owner. The user is not the project owner or project administrator.
400 Invalid.Tenant.UserNotInProject The user is not in the project. The user is not in the project.
403 Invalid.Tenant.UserNotInTenant The user is not in tenant. User is not in tenant.
400 Invalid.Tenant.UserAlreadyInProject The user already exists in the project. The user to be added already exists in the workspace.
400 Invalid.Tenant.UserNotInTenant The user is not in the tenant. The member to be added does not exist in the tenant.

For a list of error codes, visit the API Error Center.