All Products
Search
Document Center

:ListProjects

更新時間:May 06, 2024

Queries the DataWorks workspaces of the tenant to which a user belongs by page.

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 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:

  • AVAILABLE: 0, which indicates that the workspace is running as expected.
  • DELETED: 1, which indicates that the workspace is deleted.
  • INITIALIZING: 2, which indicates that the workspace is being initialized.
  • INIT_FAILED: 3, which indicates that the workspace fails to be initialized.
  • FORBIDDEN: 4, which indicates that the workspace is manually disabled.
  • DELETING: 5, which indicates that the workspace is being deleted.
  • DEL_FAILED: 6, which indicates that the workspace fails to be deleted.
  • FROZEN: 7, which indicates that the workspace is frozen due to overdue payments.
  • UPDATING: 8, which indicates that the workspace is being updated. After you associate a compute engine with the workspace, the system initializes the compute engine and updates the workspace.
  • UPDATE_FAILED: 9, which indicates that the workspace fails to be updated.
ProjectStatus Integer 0

The status of the workspace. Valid values:

  • 0: AVAILABLE, which indicates that the workspace is running as expected.
  • 1: DELETED, which indicates that the workspace is deleted.
  • 2: INITIALIZING, which indicates that the workspace is being initialized.
  • 3: INIT_FAILED, which indicates that the workspace fails to be initialized.
  • 4: FORBIDDEN, which indicates that the workspace is manually disabled.
  • 5: DELETING, which indicates that the workspace is being deleted.
  • 6: DEL_FAILED, which indicates that the workspace fails to be deleted.
  • 7: FROZEN, which indicates that the workspace is frozen due to overdue payments.
  • 8: UPDATING, which indicates that the workspace is being updated. After you associate a compute engine with the workspace, the system initializes the compute engine and updates the workspace.
  • 9: UPDATE_FAILED, which indicates that the workspace fails to be updated.
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:

  • false: enabled
  • true: disabled
  • Default value: false
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:

  • 0: invisible
  • 1: visible
IsDefault Integer 1

Indicates whether the workspace is a default workspace. Valid values:

  • 1: The workspace is a default workspace.
  • 0: The workspace is not a default workspace.

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.