All Products
Search
Document Center

:GetProject

更新時間:Oct 19, 2023

Queries the information about a DataWorks workspace.

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

GetProject

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

ProjectId

Long

Yes

27

The ID of the DataWorks workspace. You can call the ListProjects operation to obtain the ID.

ProjectIdentifier

String

No

dw_project

The name of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Management page to obtain the workspace name.

Response parameters

Parameter

Type

Example

Description

HttpStatusCode

Integer

200

The HTTP status code.

RequestId

String

0bc1411515937635973****

The request ID. You can locate logs and troubleshoot issues based on the ID.

Success

Boolean

true

Indicates whether the request was successful.

Data

Object

The description of the workspace.

Status

Integer

0

The status of the workspace. Valid values:

  • AVAILABLE(0): The workspace is in a normal state.

  • DELETED(1): The workspace is deleted.

  • INITIALIZING(2): The workspace is being initialized.

  • INIT_FAILED(3): The workspace fails to be initialized.

  • FORBIDDEN(4): The workspace is manually disabled.

  • DELETING(5): The workspace is being deleted.

  • DEL_FAILED(6): The workspace fails to be deleted.

  • FROZEN(7): The workspace is frozen due to overdue payments.

  • UPDATING(8): The workspace is being updated. The workspace enters this state after you associate a new compute engine with the workspace and the compute engine is initialized.

  • UPDATE_FAILED(9): The workspace fails to be updated.

MaxFlowNode

Integer

1

This parameter is deprecated.

ProjectId

Integer

27

The ID of the workspace.

IsAllowDownload

Integer

1

Indicates whether you are allowed to download the query result from DataStudio. Valid values:

  • 1: You are allowed to download the query result from DataStudio.

  • 0: You are not allowed to download the query result from DataStudio.

ProjectMode

Integer

2

The mode of the workspace. Valid values:

  • 2: The workspace is in basic mode.

  • 3: The workspace is in standard mode.

GmtModified

String

Dec 3, 2019 9:12:20 PM

The time when the workspace was last modified. Example: Dec 3, 2019 9:12:20 PM.

ProdStorageQuota

String

1

This parameter is deprecated.

ProjectDescription

String

abc

The description of the workspace.

DevelopmentType

Integer

4

The development type of the workspace. The value is fixed as 4. This parameter is deprecated.

TablePrivacyMode

Integer

1

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

  • 0: The MaxCompute tables are invisible to the users within a tenant.

  • 1: The MaxCompute tables are visible to the users within a tenant.

DefaultDiResourceGroupIdentifier

String

group_280749521****

The resource group ID that was allocated by default when you purchased an exclusive resource group for MaxCompute.

SchedulerMaxRetryTimes

Integer

3

The default maximum number of automatic reruns that are allowed after an error occurs.

ProtectedMode

Integer

1

Indicates whether the workspace protection feature is enabled. Valid values:

  • 1: The workspace protection feature is enabled.

  • 0: The workspace protection feature is disabled.

SchedulerRetryInterval

Integer

120000

The interval between automatic reruns after an error occurs. Unit: milliseconds. The maximum interval is 30 minutes. You must pay attention to the conversion between units.

Appkey

String

0

This parameter is deprecated.

DevStorageQuota

String

0

This parameter is deprecated.

ResidentArea

String

private

The type of the workspace. Valid values: private and swap.

IsDefault

Integer

1

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

  • 1: The workspace is the default workspace.

  • 0: The workspace is not the default workspace.

Destination

Integer

0

This parameter is deprecated.

ProjectName

String

abc

The display name of the workspace.

ProjectIdentifier

String

abc

The unique identifier of the workspace.

DisableDevelopment

Boolean

true

Indicates whether the Development role is disabled. Valid values:

  • false: The Development role is enabled.

  • true: The Development role is disabled.

  • Default value: false.

ProjectOwnerBaseId

String

18229311****

The ID of the Alibaba Cloud account used by the workspace owner.

BaseProject

Boolean

false

This parameter is deprecated.

UseProxyOdpsAccount

Boolean

true

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

GmtCreate

String

Oct 10, 2019 3:42:53 PM

The time when the workspace was created. Example: Dec 3, 2019 9:12:20 PM.

TenantId

Long

280749521

The ID of the tenant.

EnvTypes

Array of String

["PROD"]

The environment of the workspace. Valid values: PROD and DEV.

  • The value PROD indicates the production environment. Workspaces in basic mode provide only the production environment.

  • The value DEV indicates the development environment. Workspaces in standard mode provide both the development environment and the production environment.

ResourceManagerResourceGroupId

String

rg-acfmzbn7pti3zfa

The ID of the resource group used in the workspace.

Tags

Array of Tag

The list of tags.

The tags are added to resources in the workspace and used for authentication and cost allocation.

Key

String

Env

The keys of the tags that are added to resources in the workspace. The tag keys must meet the following conditions:

  • The number of tag keys that can be added to resources ranges from 1 to 20.

  • Each tag value can be up to 128 characters in length.

  • The tag keys cannot start with acs: or aliyun:.

  • The tag keys cannot contain http:// or https://.

Value

String

Test

The values of the tags that are added to resources in the workspace. The tag values must meet the following conditions:

  • The number of tag values that can be added to resources ranges from 1 to 20.

  • Each tag value can be up to 128 characters in length.

  • The tag values cannot start with acs:.

  • The tag values cannot contain http:// or https://.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetProject
&ProjectId=27
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetProjectResponse>
    <HttpStatusCode>200</HttpStatusCode>
    <RequestId>0bc1411515937635973****</RequestId>
    <Success>true</Success>
    <Data>
        <Status>0</Status>
        <MaxFlowNode>1</MaxFlowNode>
        <ProjectId>27</ProjectId>
        <IsAllowDownload>1</IsAllowDownload>
        <ProjectMode>2</ProjectMode>
        <GmtModified>Dec 3, 2019 9:12:20 PM</GmtModified>
        <ProdStorageQuota> 1</ProdStorageQuota>
        <ProjectDescription>abc</ProjectDescription>
        <DevelopmentType>4</DevelopmentType>
        <TablePrivacyMode>1</TablePrivacyMode>
        <DefaultDiResourceGroupIdentifier>group_280749521****</DefaultDiResourceGroupIdentifier>
        <SchedulerMaxRetryTimes>3</SchedulerMaxRetryTimes>
        <ProtectedMode>1</ProtectedMode>
        <SchedulerRetryInterval>120000</SchedulerRetryInterval>
        <Appkey>0</Appkey>
        <DevStorageQuota>0</DevStorageQuota>
        <ResidentArea>private</ResidentArea>
        <IsDefault>1</IsDefault>
        <Destination>0</Destination>
        <ProjectName>abc</ProjectName>
        <ProjectIdentifier>abc</ProjectIdentifier>
        <DisableDevelopment>true</DisableDevelopment>
        <ProjectOwnerBaseId>18229311****</ProjectOwnerBaseId>
        <BaseProject>false</BaseProject>
        <UseProxyOdpsAccount>true</UseProxyOdpsAccount>
        <GmtCreate>Oct 10, 2019 3:42:53 PM</GmtCreate>
        <TenantId>280749521</TenantId>
        <EnvTypes>["PROD"]</EnvTypes>
        <ResourceManagerResourceGroupId>rg-acfmzbn7pti3zfa</ResourceManagerResourceGroupId>
        <Tags>
            <Key>Env</Key>
            <Value>Test</Value>
        </Tags>
    </Data>
</GetProjectResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "HttpStatusCode" : 200,
  "RequestId" : "0bc1411515937635973****",
  "Success" : true,
  "Data" : {
    "Status" : 0,
    "MaxFlowNode" : 1,
    "ProjectId" : 27,
    "IsAllowDownload" : 1,
    "ProjectMode" : 2,
    "GmtModified" : "Dec 3, 2019 9:12:20 PM",
    "ProdStorageQuota" : 1,
    "ProjectDescription" : "abc",
    "DevelopmentType" : 4,
    "TablePrivacyMode" : 1,
    "DefaultDiResourceGroupIdentifier" : "group_280749521****",
    "SchedulerMaxRetryTimes" : 3,
    "ProtectedMode" : 1,
    "SchedulerRetryInterval" : 120000,
    "Appkey" : 0,
    "DevStorageQuota" : 0,
    "ResidentArea" : "private",
    "IsDefault" : 1,
    "Destination" : 0,
    "ProjectName" : "abc",
    "ProjectIdentifier" : "abc",
    "DisableDevelopment" : true,
    "ProjectOwnerBaseId" : "18229311****",
    "BaseProject" : false,
    "UseProxyOdpsAccount" : true,
    "GmtCreate" : "Oct 10, 2019 3:42:53 PM",
    "TenantId" : 280749521,
    "EnvTypes" : "[\"PROD\"]",
    "ResourceManagerResourceGroupId" : "rg-acfmzbn7pti3zfa",
    "Tags" : {
      "Key" : "Env",
      "Value" : "Test"
    }
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400

Invalid.Tenant.ProjectNotExists

The project does not exist.

The specified workspace does not exist.

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.