All Products
Search
Document Center

:ListProjectMembers

更新時間:May 06, 2024

Queries members in a DataWorks workspace.

Debugging

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 Yes ListProjectMembers

The operation that you want to perform. Set the value to ListProjectMembers.

ProjectId Long Yes 27

The DataWorks workspace ID.

PageNumber Integer No 1

The page number.

PageSize Integer No 10

The number of entries per page. Valid values: 1 to 100. Default value: 10.

Response parameters

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

The request ID.

Data Object

The results that are returned.

PageNumber Integer 1

The page number.

PageSize Integer 10

The number of entries per page. Valid values: 1 to 100. Default value: 10.

TotalCount Integer 3

The total number of entries returned.

ProjectMemberList Array of ProjectMember

The information of members in the DataWorks workspace.

Status String 0

The status of the member. Valid values:

  • 0: NORMAL, which indicates that the member is in a normal state.
  • 1: FORBIDDEN, which indicates that the member is disabled.
  • 2: DELETED, which indicates that the member is deleted.
ProjectMemberId String 121

The member ID.

Nick String zhangsan

The nickname of the member.

ProjectMemberName String Bob

The name of the member.

ProjectMemberType String 1

The type of the member. Valid values:

  • 1: USER_ALIYUN, which indicates that the member is an Alibaba Cloud account.
  • 5: USER_UBACCOUNT, which indicates that the member is a RAM user.
  • 6: USER_STS_ROLE, which indicates that the member is a RAM role.
ProjectRoleList Array of Role

The roles that are assigned to the member.

ProjectRoleId Integer 1

The role ID.

ProjectRoleType String 0

The type of the role. Valid values:

  • 0: SYSTEM, which indicates that the role is a built-in role.
  • 2: USER_CUSTOM, which indicates that the role is a custom role.
ProjectRoleName String Visitor

The name of the role.

DataWorks provides built-in roles and allows you to create custom roles based on your business requirements. For more information about roles, see Overview of users, roles, and permissions.

ProjectRoleCode String role_project_guest

The code of the role.

DataWorks provides built-in roles and allows you to create custom roles based on your business requirements. For more information about roles, see Overview of users, roles, and permissions.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListProjectMembers
&ProjectId=27
&PageNumber=1
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListProjectMembersResponse>
    <RequestId>1AFAE64E-D1BE-432B-A9****</RequestId>
    <Data>
        <PageNumber>1</PageNumber>
        <PageSize>10</PageSize>
        <TotalCount>3</TotalCount>
        <ProjectMemberList>
            <Status>0</Status>
            <ProjectMemberId>121</ProjectMemberId>
            <Nick>zhangsan</Nick>
            <ProjectMemberName>Bob</ProjectMemberName>
            <ProjectMemberType>1</ProjectMemberType>
            <ProjectRoleList>
                <ProjectRoleId>1</ProjectRoleId>
                <ProjectRoleType>0</ProjectRoleType>
                <ProjectRoleName>Visitor</ProjectRoleName>
                <ProjectRoleCode>role_project_guest</ProjectRoleCode>
            </ProjectRoleList>
        </ProjectMemberList>
    </Data>
</ListProjectMembersResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "1AFAE64E-D1BE-432B-A9****",
  "Data" : {
    "PageNumber" : 1,
    "PageSize" : 10,
    "TotalCount" : 3,
    "ProjectMemberList" : {
      "Status" : "0",
      "ProjectMemberId" : "121",
      "Nick" : "zhangsan",
      "ProjectMemberName" : "Bob",
      "ProjectMemberType" : "1",
      "ProjectRoleList" : {
        "ProjectRoleId" : 1,
        "ProjectRoleType" : "0",
        "ProjectRoleName" : "Visitor",
        "ProjectRoleCode" : "role_project_guest"
      }
    }
  }
}

Error codes

HTTP status code Error code Error message Description
400 Invalid.Tenant.ConnectionNotExists The connection does not exist. The specified data source does not exist.
400 Invalid.Tenant.ProjectNotExists The project does not exist. The specified workspace does not exist.
400 Invalid.Tenant.UserNotInProject The user is not in the project. The user is not added to the workspace.
403 Invalid.Tenant.UserIsNotProjectOwnerOrAdmin The user is not a project administrator or owner. The user is not the workspace owner or administrator.
403 Invalid.Tenant.UserNotInTenant The user is not in tenant. The user does not belong to the tenant.

For a list of error codes, see Service error codes.