Help Center/ CodeArts Deploy/ API Reference/ APIs/ DeployState/ Obtaining the Deployment Task Status
Updated on 2025-08-18 GMT+08:00

Obtaining the Deployment Task Status

Function

This API is used to obtain the deployment task status.

Calling Method

For details, see Calling APIs.

URI

GET /v2/tasks/{task_id}/state

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

task_id

Yes

String

task_id

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

record_id

No

String

record_id

step_state

No

Boolean

Whether to return the status of each step of the deployment task. true: Yes; false: No.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

User token. Obtain a token (the value of the X-Subject-Token response header) by calling the IAM API used forObtaining a User Token.

Constraints:

N/A.

Value range:

String. Max. 20,000 characters.

Default value:

N/A.

Content-Type

Yes

String

Definition:

Type (or format) of the message body.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

result

StateInfo object

Basic task information

status

String

Request status (successful or failed)

Table 5 StateInfo

Parameter

Type

Description

status

String

Task status

nick_name

String

User nickname

record_id

String

Execution record ID

task_id

String

Task ID

step

String

Action status

start_time

String

Start time

end_time

String

End time

executor

String

Executor

task_name

String

Task name

step_state

Array of StepInfo objects

Sub-action information

Table 6 StepInfo

Parameter

Type

Description

region

String

Request region

id

String

Application ID

offset

String

Offset

enable

String

Enable or not

name

String

Action name

current_offset

String

Current offset

elapsed_time

String

Task execution duration

faq_url

String

FAQ

Example Requests

None

Example Responses

Status code: 200

OK

{
  "status" : "success",
  "result" : {
    "record_id" : "2c82ffe8d00d4968a4e5f7a36d87ae17",
    "task_id" : "e700f15965694253940502911220d76b",
    "nick_name" : "A/B side account",
    "status" : "succeeded",
    "step" : "finish",
    "start_time" : "2025-07-09 11:36:28",
    "end_time" : "2025-07-09 11:36:43",
    "executor" : "devcloud_test",
    "task_name" : "test"
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.