A topic is added to describe how to call the ListProjectRoles operation to query all roles in a workspace.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Required | ListProjectRoles |
The operation that you want to perform. |
ProjectId | Long | Yes | 27 |
Dataworks ID of the workspace. |
RegionId | String | Required | cn-shanghai |
Dataworks ID of the region where the workspace is located. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ProjectRoleList | Array |
The roles of the workspace. |
|
ProjectRoleCode | String | role_project_guest |
The role Code of the workspace. |
ProjectRoleId | Integer | 1 |
The role ID of the workspace. |
ProjectRoleName | String | Visitor |
The role name of the workspace. |
ProjectRoleType | String | 0 |
The role type of the workspace. Valid values: |
RequestId | String | 1AFAE64E-D1BE-432B-A9**** |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=ListProjectRoles
&ProjectId=27
&RegionId=cn-shanghai
&<Common request parameters>
Sample success responses
XML
format
<RequestId>1AFAE64E-D1BE-432B-A9****</RequestId>
<ProjectRoleList>
<ProjectRoleName> visitor </ProjectRoleName>
<ProjectRoleType>0</ProjectRoleType>
<ProjectRoleCode>role_project_guest</ProjectRoleCode>
<ProjectRoleId>1</ProjectRoleId>
</ProjectRoleList>
JSON
format
{
"RequestId": "1AFAE64E-D1BE-432B-A9****",
"ProjectRoleList": {
"ProjectRoleName": "Visitor",
"ProjectRoleType": 0,
"ProjectRoleCode": "role_project_guest",
"ProjectRoleId": 1
}
}
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. |
For a list of error codes, visit the API Error Center.