Queries the IDs of the workspaces on which a specific Alibaba Cloud account or RAM user has permissions.
For example, an Alibaba Cloud account can assume the developer, O&M engineer, or workspace administrator role in a workspace. For more information, see Manage members and roles.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListProjectIds |
The operation that you want to perform. Set the value to ListProjectIds. |
RegionId | String | Yes | cn-shanghai |
The ID of the region in which DataWorks is activated. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation. |
UserId | String | Yes | 171111 |
The ID of the specific Alibaba Cloud account. You can log on to the DataWorks console and move the pointer over the profile picture in the upper-right corner to view the ID. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ProjectIds | List | 75777 |
The IDs of the DataWorks workspaces. The IDs of the workspaces on which the specific Alibaba Cloud account has permissions were returned. In this example, a single workspace ID is used. |
RequestId | String | 0b57ff7216278945532771749d**** |
The ID of the request. You can troubleshoot errors based on the ID. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListProjectIds
&RegionId=cn-shanghai
&UserId=171111
&<Common request parameters>
Sample success responses
XML
format
<RequestId>0b57ff7216278945532771749d****</RequestId>
<ProjectIds>75777</ProjectIds>
JSON
format
{
"RequestId": "0b57ff7216278945532771749d****",
"ProjectIds": 75777
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | Invalid.Tenant.ConnectionNotExists | The connection does not exist. | The error message returned because the specified data source does not exist. |
400 | Invalid.Tenant.ProjectNotExists | The project does not exist. | The error message returned because the specified workspace does not exist. |
403 | Invalid.Tenant.UserIsNotProjectOwnerOrAdmin | The user is not a project administrator or owner. | The error message returned because the user is not the workspace owner or administrator. |
400 | Invalid.Tenant.UserNotInProject | The user is not in the project. | The error message returned because the user is not added to the workspace. |
403 | Invalid.Tenant.UserNotInTenant | The user is not in tenant. | The error message returned because the user does not belong to the tenant. |
For a list of error codes, visit the API Error Center.