调用GetProject查询一个DataWorks工作空间的信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetProject |
系统规定参数。取值:GetProject。 |
ProjectId | Long | 是 | 27 |
DataWorks工作空间ID。您可以通过ListProjects接口获取工作空间ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
HttpStatusCode | Integer | 200 |
HTTP状态码。 |
RequestId | String | 0bc1411515937635973**** |
请求的ID。用于定位日志,排查问题。 |
Success | Boolean | true |
是否成功查询工作空间的信息。 |
Data | Object |
工作空间的描述信息。 |
|
Status | Integer | 0 |
工作空间的状态,取值如下:
|
MaxFlowNode | Integer | 1 |
该字段已废弃。 |
ProjectId | Integer | 27 |
工作空间的ID。 |
IsAllowDownload | Integer | 1 |
是否允许下载ide上查询的结果,取值如下:
|
ProjectMode | Integer | 2 |
工作空间的模式,取值如下:
|
GmtModified | String | Dec 3, 2019 9:12:20 PM |
修改工作空间的时间,示例格式为Dec 3, 2019 9:12:20 PM。 |
ProdStorageQuota | String | 1 |
该字段已废弃。 |
ProjectDescription | String | abc |
工作空间的描述。 |
DevelopmentType | Integer | 4 |
工作空间的开发类型,目前均为4。该字段已废弃。 |
TablePrivacyMode | Integer | 1 |
MaxCompute表的可见性权限,取值如下:
|
DefaultDiResourceGroupIdentifier | String | group_280749521**** |
购买MaxCompute独享资源组时,默认分配的资源组的标识。 |
SchedulerMaxRetryTimes | Integer | 3 |
默认出错自动重跑的次数。 |
ProtectedMode | Integer | 1 |
工作空间是否开启了保护模式,取值如下:
|
SchedulerRetryInterval | Integer | 120000 |
默认出错自动重跑的时间间隔,单位为ms。取值最大为30分钟,注意单位转换。 |
Appkey | String | 0 |
该字段已废弃。 |
DevStorageQuota | String | 0 |
该字段已废弃。 |
ResidentArea | String | private |
工作空间的类型,private为私有区,swap为交换区。 |
IsDefault | Integer | 1 |
是否为默认工作空间,取值如下:
|
Destination | Integer | 0 |
该字段已废弃。 |
ProjectName | String | abc |
工作空间的显示名称。 |
ProjectIdentifier | String | abc |
工作空间的标识。 |
DisableDevelopment | Boolean | true |
是否禁用开发角色,取值如下:
|
ProjectOwnerBaseId | String | 18229311**** |
工作空间所有者的阿里云ID。 |
BaseProject | Boolean | false |
该字段已废弃。 |
UseProxyOdpsAccount | Boolean | true |
访问MaxCompute引擎是否使用代理账号。 |
GmtCreate | String | Oct 10, 2019 3:42:53 PM |
创建工作空间时间,示例格式Dec 3, 2019 9:12:20 PM。 |
TenantId | Long | 280749521 |
租户ID。 |
EnvTypes | Array of String | ["PROD"] |
工作空间包含的环境:
|
ResourceManagerResourceGroupId | String | rg-acfmzbn7pti3zfa |
资源组ID。 |
Tags | Array of Tag |
标签。 用于给资源打标签,为权限鉴权与分账时使用。 |
|
Key | String | Env |
资源的标签键。使用如下:
|
Value | String | Test |
资源的标签值。使用如下:
|
示例
请求示例
http(s)://[Endpoint]/?Action=GetProject
&ProjectId=27
&公共请求参数
正常返回示例
XML
格式
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
格式
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"
}
}
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | Invalid.Tenant.ProjectNotExists | The project does not exist. | 项目不存在。 |
400 | Invalid.Tenant.UserNotInProject | The user is not in the project. | 用户不在项目中。 |
403 | Invalid.Tenant.UserIsNotProjectOwnerOrAdmin | The user is not a project administrator or owner. | 用户不是项目负责人或者项目管理员。 |
403 | Invalid.Tenant.UserNotInTenant | The user is not in tenant. | 用户不在租户中。 |
访问错误中心查看更多错误码。