全部产品
Search
文档中心

大数据开发治理平台 DataWorks:GetDeployment

更新时间:Oct 11, 2023

获取发布包的详情。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称

类型

是否必选

示例值

描述

Action String GetDeployment

系统规定参数。取值:GetDeployment

ProjectId Long 10000

DataWorks工作空间的ID,您可以单击页面右上角的小扳手图标,进入工作空间管理页面查看。

ProjectIdentifier String dw_project

DataWorks工作空间的唯一标识符,即数据开发页面顶部切换工作空间处的英文标识。

该参数与ProjectId参数二者必须设置其一,以确定本次API调用操作的DataWorks工作空间。

DeploymentId Long 3000001

发布包的ID。执行SubmitFileDeployFile时,都会生成一个对应的发布包ID。

返回数据

名称

类型

示例值

描述

HttpStatusCode Integer 200

HTTP状态码。

ErrorMessage String The connection does not exist.

错误信息。

RequestId String 0000-ABCD-EFG****

本次调用的唯一ID。出现错误后,您可以根据该ID排查问题。

ErrorCode String Invalid.Tenant.ConnectionNotExists

错误码。

Success Boolean true

调用是否成功。

Data Object

发布包的详情。

Deployment Object

发布包的详情。

Status Integer 1

发布包当前的状态,包括0(就绪)、1(成功)和2(失败)。

ErrorMessage String 成功

当发布包执行失败(status为2)后,该字段记录具体的错误信息。

FromEnvironment Integer 0

执行本次发布所在的环境,包括0(本地)和1(开发环境)。

ToEnvironment Integer 1

发布文件信息的目标环境,包括1(开发环境)和2(生产环境)。

CheckingStatus Integer 7

当前发布包涉及节点的检查状态,当发布包的目标环境是开发环境(toEnviroment=1)时,只有发布包的Status为1并且CheckingStatus为空时,才可以继续进行文件到生产环境的发布。

  • 7:检查未通过
  • 8:正在处于检查中的状态
CreateTime Long 1593877765000

发布包生成的毫秒时间戳。

HandlerId String 2003****

发布包执行者的阿里云用户ID。

CreatorId String 20030****

发布包创建者的阿里云用户ID。

ExecuteTime Long 1593877765000

发布包开始执行的毫秒时间戳。

Name String ods_user_info_d-2020-07-04_20030****

发布包的名称,显示在任务发布>发布包列表页面。

DeployedItems Array of DeployedItem

发布项列表。

FileId Long 507642378

文件的ID。

FileVersion Long 7

文件的版本。

Status Integer 1
  • UNPUBLISHED(0): 未发布
  • SUCCESS(1): 发布成功
  • ERROR(2): 发布失败
  • CLONED(3): 克隆成功
  • DEPLOY_ERROR(4): 发布失败
  • CLONING(5): 克隆中
  • REJECT(6): 发布驳回

示例

请求示例

http(s)://[Endpoint]/?Action=GetDeployment
&ProjectId=10000
&ProjectIdentifier=dw_project
&DeploymentId=3000001
&公共请求参数

正常返回示例

XML格式

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

<GetDeploymentResponse>
    <HttpStatusCode>200</HttpStatusCode>
    <ErrorMessage>The connection does not exist.</ErrorMessage>
    <RequestId>0000-ABCD-EFG****</RequestId>
    <ErrorCode>Invalid.Tenant.ConnectionNotExists</ErrorCode>
    <Success>true</Success>
    <Data>
        <Deployment>
            <Status>1</Status>
            <ErrorMessage>成功</ErrorMessage>
            <FromEnvironment>0</FromEnvironment>
            <ToEnvironment>1</ToEnvironment>
            <CheckingStatus>7</CheckingStatus>
            <CreateTime>1593877765000</CreateTime>
            <HandlerId>2003****</HandlerId>
            <CreatorId>20030****</CreatorId>
            <ExecuteTime>1593877765000</ExecuteTime>
            <Name>ods_user_info_d-2020-07-04_20030****</Name>
        </Deployment>
        <DeployedItems>
            <FileId>507642378</FileId>
            <FileVersion>7</FileVersion>
            <Status>1</Status>
        </DeployedItems>
    </Data>
</GetDeploymentResponse>

JSON格式

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

{
  "HttpStatusCode" : 200,
  "ErrorMessage" : "The connection does not exist.",
  "RequestId" : "0000-ABCD-EFG****",
  "ErrorCode" : "Invalid.Tenant.ConnectionNotExists",
  "Success" : true,
  "Data" : {
    "Deployment" : {
      "Status" : 1,
      "ErrorMessage" : "成功",
      "FromEnvironment" : 0,
      "ToEnvironment" : 1,
      "CheckingStatus" : 7,
      "CreateTime" : 1593877765000,
      "HandlerId" : "2003****",
      "CreatorId" : "20030****",
      "ExecuteTime" : 1593877765000,
      "Name" : "ods_user_info_d-2020-07-04_20030****"
    },
    "DeployedItems" : {
      "FileId" : 507642378,
      "FileVersion" : 7,
      "Status" : 1
    }
  }
}

错误码

HttpCode

错误码

错误信息

描述

429 Throttling.Api The request for this resource has exceeded your available limit. 对该资源的请求已超过您的可用上限。
429 Throttling.System The DataWorks system is busy. Try again later. DataWorks系统繁忙,请稍后再试。
429 Throttling.User Your request is too frequent. Try again later. 您的请求过于频繁,请尝试放缓请求速度。
500 InternalError.System An internal system error occurred. Try again later. 系统内部错误,请稍后再试。
500 InternalError.UserId.Missing An internal system error occurred. Try again later. 系统内部错误,请稍后再试。

访问错误中心查看更多错误码。