Help Center/ Content Delivery Network/ API Reference/ API/ Cache Purge and Prefetch/ Querying URL Blocking or Unblocking Tasks
Updated on 2025-11-27 GMT+08:00

Querying URL Blocking or Unblocking Tasks

Function

This API is used to query URL blocking or unblocking tasks. To use this API, submit a service ticket.

  • A single tenant can call this API 30 times per second.

Calling Method

For details, see Calling APIs.

URI

GET /v1.0/cdn/content/access-control-tasks

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

start_time

No

Long

Query start timestamp, in milliseconds. If this parameter is not transferred, the current time is used by default. The start timestamp and end timestamp must be specified at the same time and the time span between them cannot exceed seven days.

end_time

No

Long

Query end timestamp, in milliseconds. If this parameter is not transferred, the end timestamp is set to three days ago by default. The end timestamp and start timestamp must be specified at the same time and the time span between them cannot exceed seven days.

offset

No

Integer

Offset, which is the distance between a specific data field and the start data field. Default value: 0.

limit

No

Integer

Number of data records queried at a time. Maximum value: 100. Default value: 10.

status

No

String

Task status. Possible values: processing, succeed, and failed.

Request Parameters

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

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

total

Integer

Total number of queried records.

access_control_tasks

Array of AccessControlTask objects

Information about URL blocking or unblocking tasks.

Table 4 AccessControlTask

Parameter

Type

Description

id

String

Task ID.

urls

Array of strings

URL list.

status

String

Task status. Possible values: processing, succeed, and failed.

action

String

Task type. Possible values: unban and ban.

create_time

Long

Creation timestamp, in milliseconds.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

GET https://cdn.myhuaweicloud.com/v1.0/cdn/content/access-control-tasks

Example Responses

Status code: 200

Successful response.

{
  "total" : 1,
  "access_control_tasks" : [ {
    "id" : "71xxxxxxxxxxxxxxxxxxxxxxxxxxxxff",
    "urls" : [ "https://www.example.com/1.txt", "http://www.example.com/2.txt" ],
    "status" : "succeed",
    "create_time" : 1652325740318,
    "action" : "unban"
  } ]
}

Status Codes

Status Code

Description

200

Successful response.

400

Error response.

Error Codes

See Error Codes.