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

Deleting a Background Task

Function

Deleting a background task.

URI

DELETE /v2/{project_id}/instances/{instance_id}/tasks/{task_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For details, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID. It can be viewed on the instance details page on the DCS console.

Constraints

N/A

Range

N/A

Default Value

N/A

task_id

Yes

String

Definition

Background task ID.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

message

String

Definition

Returned message.

Range

N/A

Status code: 204

Background task deleted successfully.

Status code: 400

Table 3 Response body parameters

Parameter

Type

Description

error_msg

String

Definition

Error information.

Range

N/A

error_code

String

Definition

Error code.

Range

For details, see Error Codes.

error_ext_msg

String

Definition

Extended error information. This parameter is not used currently and is set to null.

Range

N/A

Status code: 401

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

Definition

Error information.

Range

N/A

error_code

String

Definition

Error code.

Range

For details, see Error Codes.

error_ext_msg

String

Definition

Extended error information. This parameter is not used currently and is set to null.

Range

N/A

Status code: 403

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Definition

Error information.

Range

N/A

error_code

String

Definition

Error code.

Range

For details, see Error Codes.

error_ext_msg

String

Definition

Extended error information. This parameter is not used currently and is set to null.

Range

N/A

Status code: 404

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Definition

Error information.

Range

N/A

error_code

String

Definition

Error code.

Range

For details, see Error Codes.

error_ext_msg

String

Definition

Extended error information. This parameter is not used currently and is set to null.

Range

N/A

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Definition

Error information.

Range

N/A

error_code

String

Definition

Error code.

Range

For details, see Error Codes.

error_ext_msg

String

Definition

Extended error information. This parameter is not used currently and is set to null.

Range

N/A

Example Requests

Deleting a background task.

DELETE https://{dcs_endpoint}/v2/a4d31cb6-3d72-4fdc-8ec9-6e3a41e47f71/instances/5560df16-cebf-4473-95c4-d1b573c16e79/tasks/8abf6e1e72c12e7c0172c15b508500aa

Example Responses

Status code: 200

Background task deleted successfully.

{
  "message" : ""
}

Status Codes

Status Code

Description

200

Background task deleted successfully.

204

Background task deleted successfully.

400

Invalid request.

401

Invalid authentication information.

403

The request is rejected.

404

The requested resource is not found.

500

Internal service error.

Error Codes

See Error Codes.