All Products
Search
Document Center

DataWorks:GetProject

Last Updated:Nov 21, 2024

Queries the information about a DataWorks workspace.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:GetProjectget
*Project
acs:dataworks:{#regionId}:{#accountId}:workspace/{#ProjectIdentifier}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectIdlongYes

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

27
ProjectIdentifierstringNo

The name of the DataWorks workspace. You can call the ListProjects operation to query the name.

test_project

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

HttpStatusCodeinteger

The HTTP status code.

200
RequestIdstring

The request ID.

0bc1411515937635973****
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Dataobject

The information about the workspace.

Statusinteger

The status of the workspace. Valid values:

  • 0: AVAILABLE, which indicates that the workspace runs 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. The workspace enters this state after you associate a new compute engine with the workspace and the compute engine is initialized.
  • 9: UPDATE_FAILED, which indicates that the workspace fails to be updated.
0
MaxFlowNodeinteger

This parameter is deprecated.

1
ProjectIdinteger

The ID of the workspace.

27
IsAllowDownloadinteger

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.
1
ProjectModeinteger

The mode of the workspace. Valid values:

  • 2: The workspace is in basic mode.
  • 3: The workspace is in standard mode.
2
GmtModifiedstring

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

Dec 3, 2019 9:12:20 PM
ProdStorageQuotastring

This parameter is deprecated.

1
ProjectDescriptionstring

The description of the workspace.

abc
DevelopmentTypeinteger

This parameter is deprecated.

4
TablePrivacyModeinteger

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

  • 0: invisible
  • 1: visible
1
DefaultDiResourceGroupIdentifierstring

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

group_280749521****
SchedulerMaxRetryTimesinteger

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

3
ProtectedModeinteger

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

  • 1: enabled
  • 0: disabled
1
SchedulerRetryIntervalinteger

The default 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.

120000
Appkeystring

This parameter is deprecated.

0
DevStorageQuotastring

This parameter is deprecated.

0
ResidentAreastring

The type of the workspace. Valid values:

  • private
  • swap
private
IsDefaultinteger

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.
1
Destinationinteger

This parameter is deprecated.

0
ProjectNamestring

The display name of the workspace.

abc
ProjectIdentifierstring

The name of the workspace.

abc
DisableDevelopmentboolean

Indicates whether the Develop role is disabled. Valid values:

  • false (default)
  • true
true
ProjectOwnerBaseIdstring

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

18229311****
BaseProjectboolean

This parameter is deprecated.

false
UseProxyOdpsAccountboolean

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

true
GmtCreatestring

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

Oct 10, 2019 3:42:53 PM
TenantIdlong

The tenant ID.

280749521
EnvTypesarray

The environment information of the workspace.

EnvTypesstring

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.
["PROD"]
ResourceManagerResourceGroupIdstring

The resource group ID.

rg-acfmzbn7pti3zfa
Tagsarray<object>

The tags added to the workspace.

Tagobject
Keystring

The tag key.

Env
Valuestring

The tag value.

Test

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400Invalid.Tenant.ProjectNotExistsThe project does not exist.The project does not exist.
400Invalid.Tenant.UserNotInProjectThe user is not in the project.The user is not in the project.
403Invalid.Tenant.UserIsNotProjectOwnerOrAdminThe user is not a project administrator or owner.The user is not a project administrator or owner.
403Invalid.Tenant.UserNotInTenantThe user is not in tenant.The user is not in tenant.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-19The Error code has changed. The request parameters of the API has changedView Change Details
2022-11-07The Error code has changedView Change Details
2022-10-31API Description Update. The Error code has changed. The response structure of the API has changedView Change Details