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

ParameterTypeRequiredExampleDescription
ActionStringYesListProjects

The operation that you want to perform. Set the value to ListProjects.

PageNumberIntegerYes1

The number of the page to return.

PageSizeIntegerNo10

The number of entries to return on each page. Default value: 10. Maximum value: 100.

ResourceManagerResourceGroupIdStringNorg-acfmzbn7pti3zfa

The ID of the resource group.

TagsArrayNo

The tags.

KeyStringNoEnv

The tag key.

ValueStringNoTest

The tag value.

Response parameters

ParameterTypeExampleDescription
RequestIdString20658801***

The ID of the request.

PageResultObject

The results that are returned.

PageNumberInteger1

The page number of the returned page.

PageSizeInteger10

The number of entries returned per page. Default value: 10. Maximum value: 100.

TotalCountInteger123

The total number of entries returned.

ProjectListArray of Project

The DataWorks workspaces returned.

ProjectStatusCodeStringAVAILABLE

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 compute engine and updates the workspace.
  • UPDATE_FAILED: 9, which indicates that the workspace fails to be updated.
ProjectStatusInteger0

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 compute engine and updates the workspace.
  • 9: UPDATE_FAILED, which indicates that the workspace fails to be updated.
ProjectNameStringTest

The name of the workspace.

ProjectIdentifierStringtest

The identifier of the workspace.

ProjectIdLong1212

The ID of the workspace.

ProjectDescriptionStringTest

The description of the workspace.

ProjectOwnerBaseIdString122222

The ID of the user used by the workspace owner.

ResourceManagerResourceGroupIdStringrg-acfmzbn7pti3zfa

The ID of the resource group.

TagsArray of Tag

The tags.

KeyStringEnv

The tag key.

ValueStringTest

The tag value.

DisableDevelopmentBooleantrue

Indicates whether the Development role is disabled. Valid values:

  • false: enabled
  • true: disabled
  • Default value: false
UseProxyOdpsAccountBooleantrue

Indicates whether a proxy account is used to access the MaxCompute compute engine associated with the workspace.

TablePrivacyModeInteger1

Indicates whether the MaxCompute tables in the workspace are visible to the users within a tenant. Valid values:

  • 0: invisible
  • 1: visible
IsDefaultInteger1

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 codeError codeError messageDescription
400Invalid.Tenant.ConnectionNotExistsThe connection does not exist.The error message returned because the specified data source does not exist.
400Invalid.Tenant.ProjectNotExistsThe project does not exist.The error message returned because the specified workspace does not exist.
400Invalid.Tenant.UserAlreadyInProjectThe user already exists in the project.The error message returned because the user to be added is in the workspace.
400Invalid.Tenant.UserNotInProjectThe user is not in the project.The error message returned because the user is not added to the workspace.
403Invalid.Tenant.UserIsNotProjectOwnerOrAdminThe user is not a project administrator or owner.The error message returned because the user is not the workspace owner or workspace administrator.
403Invalid.Tenant.UserNotInTenantThe user is not in tenant.The error message returned because the user does not belong to the tenant.

For a list of error codes, see Service error codes.