Updated on 2025-11-28 GMT+08:00

Stopping a Deployment Task

Function

This API is used to stop a deployment task based on the deployment task ID and execution record ID.

Calling Method

For details, see Calling APIs.

URI

PUT /v2/tasks/{task_id}/records/{record_id}/stop

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

task_id

Yes

String

Definition

Deployment task ID. Obtain the application details by calling the API forobtaining the application details. In the response body, result.arrange_infos[0].id is the desired application details.

Constraints

N/A

Range

The value contains 32 characters. Only letters and digits are allowed.

Default value

N/A

record_id

Yes

String

Definition

Deployment record ID. Obtain the historical deployment record list by calling the API forquerying the historical deployment record list of the specified application under a project according to the start time and end time. In the response body, result[0].execution_id is the desired historical deployment record list.

Constraints

N/A

Range

The value contains 32 characters. Only letters and digits are allowed.

Default value

N/A

Request Parameters

Table 2 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.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

StopDeployTaskRecordV2RequestBody

Yes

Object

Definition

Request body for stopping the deployment task execution. The request body is compatible with the requirement that the Web Security Framework (WSF) request body cannot be empty. The request body transfers an empty JSON object.

Constraints

N/A

Range

N/A

Default value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

result

CancelInfo object

Definition

Information about operations of stopping a task.

Range

N/A

status

String

Definition

Result of stopping task execution.

Range

  • success: The task execution is stopped.

  • error: Failed to stop the task execution.

Table 5 CancelInfo

Parameter

Type

Description

id

String

Definition

Execution record ID.

Range

The value contains 32 characters. Only letters and digits are allowed.

task_id

String

Definition

Task ID.

Range

The value contains 32 characters. Only letters and digits are allowed.

Example Requests

https://{endpoint}/v2/tasks/e700f15965694253940502911220d76b/records/2c82ffe8d00d4968a4e5f7a36d87ae17/stop

{ }

Example Responses

Status code: 200

OK indicates that the task is stopped.

{
  "status" : "success",
  "result" : {
    "id" : "2c82ffe8d00d4968a4e5f7a36d87ae17",
    "task_id" : "e700f15965694253940502911220d76b"
  }
}

Status Codes

Status Code

Description

200

OK indicates that the task is stopped.

Error Codes

See Error Codes.