Queries a list of roles 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 ListProjectRoles

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

ProjectId Long Yes 27

The ID of the DataWorks workspace.

Response parameters

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

The request ID.

ProjectRoleList Array of Role

The roles in the DataWorks workspace.

ProjectRoleId Integer 1

The ID of the role in the DataWorks workspace.

ProjectRoleType String 0

The type of the role in the DataWorks workspace.

ProjectRoleName String Visitor

The name of the role in the DataWorks workspace.

ProjectRoleCode String role_project_guest

The code of the role in the DataWorks workspace.

Examples

Sample requests

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

Sample success responses

XML format

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

<ListProjectRolesResponse>
    <RequestId>1AFAE64E-D1BE-432B-A9****</RequestId>
    <ProjectRoleList>
        <ProjectRoleId>1</ProjectRoleId>
        <ProjectRoleType>0</ProjectRoleType>
        <ProjectRoleName>Visitor</ProjectRoleName>
        <ProjectRoleCode>role_project_guest</ProjectRoleCode>
    </ProjectRoleList>
</ListProjectRolesResponse>

JSON format

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

{
  "RequestId" : "1AFAE64E-D1BE-432B-A9****",
  "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 is not found.
400 Invalid.Tenant.ProjectNotExists The project does not exist. The specified workspace is not found.
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.