Queries the DataWorks workspaces of the tenant to which a user belongs by page.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | ListProjects | The operation that you want to perform. Set the value to ListProjects. |
PageNumber | Integer | Yes | 1 | The page number. |
PageSize | Integer | No | 10 | The number of entries per page. Valid values: 1 to 100. Default value: 10. |
ResourceManagerResourceGroupId | String | No | rg-acfmzbn7pti3zfa | The resource group ID. |
Tags | Array | No | The tags. |
|
Key | String | No | Env | The tag key. |
Value | String | No | Test | The tag value. |
Response parameters
Parameter | Type | Example | Description |
RequestId | String | 20658801*** | The request ID. |
PageResult | 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 | 123 | The total number of entries returned. |
ProjectList | Array of Project | The DataWorks workspaces returned. |
|
ProjectStatusCode | String | AVAILABLE | The status code of the workspace. Valid values:
|
ProjectStatus | Integer | 0 | The status of the workspace. Valid values:
|
ProjectName | String | Test | The name of the workspace. |
ProjectIdentifier | String | test | The identifier of the workspace. |
ProjectId | Long | 1212 | The workspace ID. |
ProjectDescription | String | Test | The description of the workspace. |
ProjectOwnerBaseId | String | 122222 | The ID of the user used by the workspace owner. |
ResourceManagerResourceGroupId | String | rg-acfmzbn7pti3zfa | The resource group ID. |
Tags | Array of Tag | The tags. |
|
Key | String | Env | The tag key. |
Value | String | Test | The tag value. |
DisableDevelopment | Boolean | true | Indicates whether the Development role is disabled. Valid values:
|
UseProxyOdpsAccount | Boolean | true | Indicates whether a proxy account is used to access the MaxCompute compute engine associated with the workspace. |
TablePrivacyMode | Integer | 1 | Indicates whether the MaxCompute tables in the workspace are visible to the users within a tenant. Valid values:
|
IsDefault | Integer | 1 | Indicates whether the workspace is a default workspace. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListProjects
&PageNumber=1
&PageSize=10
&ResourceManagerResourceGroupId=rg-acfmzbn7pti3zfa
&Tags=[{"Key":"Env","Value":"Test"}]
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListProjectsResponse>
<RequestId>20658801***</RequestId>
<PageResult>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<TotalCount>123</TotalCount>
<ProjectList>
<ProjectStatusCode>AVAILABLE</ProjectStatusCode>
<ProjectStatus>0</ProjectStatus>
<ProjectName>Test</ProjectName>
<ProjectIdentifier>test</ProjectIdentifier>
<ProjectId>1212</ProjectId>
<ProjectDescription>Test</ProjectDescription>
<ProjectOwnerBaseId>122222</ProjectOwnerBaseId>
<ResourceManagerResourceGroupId>rg-acfmzbn7pti3zfa</ResourceManagerResourceGroupId>
<Tags>
<Key>Env</Key>
<Value>Test</Value>
</Tags>
<DisableDevelopment>true</DisableDevelopment>
<UseProxyOdpsAccount>true</UseProxyOdpsAccount>
<TablePrivacyMode>1</TablePrivacyMode>
<IsDefault>1</IsDefault>
</ProjectList>
</PageResult>
</ListProjectsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "20658801***",
"PageResult" : {
"PageNumber" : 1,
"PageSize" : 10,
"TotalCount" : 123,
"ProjectList" : {
"ProjectStatusCode" : "AVAILABLE",
"ProjectStatus" : 0,
"ProjectName" : "Test",
"ProjectIdentifier" : "test",
"ProjectId" : 1212,
"ProjectDescription" : "Test",
"ProjectOwnerBaseId" : "122222",
"ResourceManagerResourceGroupId" : "rg-acfmzbn7pti3zfa",
"Tags" : {
"Key" : "Env",
"Value" : "Test"
},
"DisableDevelopment" : true,
"UseProxyOdpsAccount" : true,
"TablePrivacyMode" : 1,
"IsDefault" : 1
}
}
}
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.UserAlreadyInProject | The user already exists in the project. | The user to be added is in the workspace. |
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.