Updated on 2025-10-09 GMT+08:00

Querying Anti-DDoS Tasks

Function

This API enables you to query the execution status of a specified Anti-DDoS configuration task.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{project_id}/query-task-status

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

task_id

Yes

String

Task ID (non-negative integer) string.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Content-Type

Yes

String

Content-Type request header.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

task_status

String

Task status. The options are as follows:

  • success: successful

  • failed: failed

  • waiting: waiting

  • running: running

  • preprocess: preprocessing

  • ready: ready

task_msg

String

Additional information about a task.

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "task_status" : "success",
  "task_msg" : ""
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.