You can call this operation to list DataWorks workspaces of the tenant to which a user belongs by page.
Debugging
Request parameters
Parameter | Position | Type | Required | Example | Description |
---|---|---|---|---|---|
Action | Query | String | Required | ListProjects |
The operation that you want to perform. |
PageNumber | Query | Integer | Yes | 1 |
The number of the page to return. |
RegionId | Host | String | Required | cn-shanghai |
The region ID of the DataWorks. |
PageSize | Query | Integer | No | 10 |
The number of entries to return on each page. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageResult | Struct |
The results of the query. |
|
PageNumber | Integer | 1 |
The current page number. |
PageSize | Integer | 10 |
The number of entries on each page. |
ProjectList | Array of Project |
DataWorks results of the workspace. |
|
ProjectDescription | String | Test Space |
The detailed description of the workspace. |
ProjectId | Long | 1212 |
The ID of the DataWorks workspace. |
ProjectIdentifier | String | test |
The code of the workspace. |
ProjectName | String | Test Space |
The name of the workspace. |
ProjectOwnerBaseId | String | 122222 |
The user ID of the workspace owner. |
ProjectStatus | Integer | 0 |
The status of the workspace. |
ProjectStatusCode | String | AVAILABLE |
The status code of the workspace. |
TotalCount | Integer | 123 |
The total number of entries returned. |
RequestId | String | 20658801*** |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=ListProjects
&PageNumber=1
&RegionId=cn-shanghai
&<Common request parameters>
Sample success responses
XML
format
<RequestId>20658801***</RequestId>
<PageResult>
<TotalCount>123</TotalCount>
<PageSize>10</PageSize>
<PageNumber>1</PageNumber>
<ProjectList>
<ProjectIdentifier>test</ProjectIdentifier>
<ProjectOwnerBaseId>122222</ProjectOwnerBaseId>
<ProjectStatus>0</ProjectStatus>
<ProjectStatusCode>AVAILABLE</ProjectStatusCode>
<ProjectName> test space </ProjectName>
<ProjectId>1212</ProjectId>
<ProjectDescription> test space </ProjectDescription>
</ProjectList>
</PageResult>
JSON
format
{
"RequestId":"20658801***",
"PageResult":{
"TotalCount":"123",
"PageSize":"10",
"PageNumber":"1",
"ProjectList":[
{
"ProjectIdentifier":"test",
"ProjectOwnerBaseId":"122222",
"ProjectStatus":"0",
"ProjectStatusCode":"AVAILABLE",
"ProjectName":"Test Space",
"ProjectId":"1212",
"ProjectDescription":"Test Space"
}
]
}
}
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. |
400 | Invalid.Tenant.UserAlreadyInProject | The user already exists in the project. | The user to be added already exists in the workspace. |
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.