Queries the details of a deployment task.

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 GetDeployment

The operation that you want to perform.

DeploymentId Long Yes 3000001

The ID of the deployment task. A deployment task ID is generated when you call the SubmitFile or DeployFile operation.

RegionId String Yes cn-zhangjiakou

The ID of the region in which DataWorks is activated.

ProjectId Long No 10000

The ID of the DataWorks workspace. You can click the Workspace Manage icon in the upper-right corner of the DataStudio page to go to the Workspace Management page and view the workspace ID.

ProjectIdentifier String No dw_project

The GUID of the DataWorks workspace. You can view the GUID in the upper part of the DataStudio page. You can also select another GUID to switch to another workspace.

You must specify either this parameter or the ProjectId parameter to determine the DataWorks workspace to which the operation is applied.

Response parameters

Parameter Type Example Description
Data Struct

The data about the deployment task.

Deployment Struct

The details of the deployment task.

CheckingStatus Integer 7

The check status of one or more files in the deployment task. If the value of the ToEnvironment parameter is 1, the files can be deployed to the production environment only when the value of the Status parameter is 1 and the CheckingStatus parameter is empty. Valid values:

  • 7: The file failed the check.
  • 8: The file is being checked.
CreateTime Long 1593877765000

The time when the deployment task was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

CreatorId String 20030****

The ID of the Alibaba Cloud account used by the user who created the deployment task.

ErrorMessage String Success

The error message that was returned when the deployment task failed. In this case, the value of the Status parameter is 2.

ExecuteTime Long 1593877765000

The time when the deployment task was run. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

FromEnvironment Integer 0

The environment in which the deployment task was run. Valid values: 0 and 1. A value of 0 indicates the on-premises environment. A value of 1 indicates the development environment.

HandlerId String 2003****

The ID of the Alibaba Cloud account used by the user who ran the deployment task.

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

The name of the deployment task. The value is the same as the name of the specific deployment task that is displayed on the Release Package page in the Deploy module.

Status Integer 1

The status of the deployment task. Valid values: 0, 1, and 2. A value of 0 indicates that the task is ready. A value of 1 indicates that the task was successful. A value of 2 indicates that the task failed.

ToEnvironment Integer 1

The environment to which the file was deployed. Valid values: 1 and 2. A value of 1 indicates the development environment. A value of 2 indicates the production environment.

ErrorCode String Invalid.Tenant.ConnectionNotExists

The error code returned.

ErrorMessage String The connection does not exist.

The error message returned.

HttpStatusCode Integer 200

The HTTP status code returned.

RequestId String 0000-ABCD-EFG****

The ID of the request. You can troubleshoot errors based on the ID.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetDeployment
&DeploymentId=3000001
&ProjectId=10000
&RegionId=cn-zhangjiakou
&<Common request parameters>

Sample success responses

XML format

<RequestId>0000-ABCD-EFG****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>
    <Deployment>
        <Status>1</Status>
        <HandlerId>2003****</HandlerId>
        <ExecuteTime>1593877765000</ExecuteTime>
        <CreatorId>20030****</CreatorId>
        <CreateTime>1593877765000</CreateTime>
        <ToEnvironment>1</ToEnvironment>
        <FromEnvironment>0</FromEnvironment>
        <ErrorMessage>Success</ErrorMessage>
        <Name>ods_user_info_d-2020-07-04_20030****</Name>
    </Deployment>
</Data>
<Success>true</Success>

JSON format

{
    "RequestId": "0000-ABCD-EFG****",
    "HttpStatusCode": 200,
    "Data": {
        "Deployment": {
            "Status": 1,
            "HandlerId": "2003****",
            "ExecuteTime": 1593877765000,
            "CreatorId": "20030****",
            "CreateTime": 1593877765000,
            "ToEnvironment": 1,
            "FromEnvironment": 0,
            "ErrorMessage": "Success",
            "Name": "ods_user_info_d-2020-07-04_20030****"
        }
    },
    "Success": true
}

Error codes

HttpCode Error code Error message Description
500 InternalError.System An internal system error occurred. Try again later. The error message returned because an internal error has occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. The error message returned because an internal error has occurred. Try again later.
429 Throttling.Api The request for this resource has exceeded your available limit. The error message returned because the number of requests for the resource has exceeded the upper limit.
429 Throttling.System The DataWorks system is busy. Try again later. The error message returned because the DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later. The error message returned because excessive requests have been submitted within a short period of time. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. The error message returned because you are not allowed to perform this operation. Activate DataWorks Enterprise Edition or DataWorks Ultimate Edition.

For a list of error codes, visit the API Error Center.