Queries the status of refresh or prefetch tasks.

  • You can query data within the last three days.
  • The maximum number of times that each user can call this operation per second is 30.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameter

Parameter Type Required Example Description
Action String Yes DescribeDcdnRefreshTaskById

The operation that you want to perform. Set the value to DescribeDcdnRefreshTaskById.

TaskId String Yes 113681**

The ID of the task that you want to query. You can query task IDs by performing the following operations:

Note You can specify at most 10 task IDs in each call. Separate IDs with commas (,).

Response parameters

Parameter Data type Sample response Description
RequestId String E0C2EF95-B1EC-4C93-855E-2059A7DA2B7B

The ID of the request.

Tasks Array of CDNTask

A list of prefetch or refresh tasks.

CreationTime String 2021-05-10T08:54:23Z

The time when the task was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

Description String Internal Error

The error returned when the refresh or prefetch task failed. Valid values:

  • Internal Error: An internal error occurred.
  • Origin Timeout: The response from the origin server timed out.
  • Origin Return StatusCode 5XX: The origin server returned an HTTP 5xx status code.
ObjectPath String http://example.com/abc.jpg

The path of the refresh or prefetch object.

ObjectType String file

The type of the refresh or prefetch task. Valid values:

  • file: refreshes an individual file.
  • directory: refreshes files under a specified directory.
  • preload: prefetches an individual file.
Process String 100%

The progress of the task, in percentage.

Status String Complete

The status of the task. Valid values:

  • Complete: The task has completed.
  • Pending: The task is pending.
  • Refreshing: The task is in progress.
  • Failed: The task has failed.
TaskId String 113681**

The ID of the task.

TotalCount Long 2

The total number of tasks.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

    "RequestId": "E0C2EF95-B1EC-4C93-855E-2059A7DA2B7B",
    "Tasks": [
            "CreationTime": "2021-05-10T08:54:23Z",
            "Description": "",
            "ObjectPath": "http://example.com/abc.jpg",
            "ObjectType": "file",
            "Process": "100%",
            "Status": "Complete",
            "TaskId": "113681**"
            "CreationTime": "2021-05-10T09:12:44Z",
            "Description": "",
            "ObjectPath": "http://example.com/bcd.jpg",
            "ObjectType": "file",
            "Process": "99.37%",
            "Status": "Refreshing",
            "TaskId": "287367**"
    "TotalCount": 2

Error codes

HttpCode Error code Error message Description
400 InvalidParameters The specified parameters are invalid. The error message returned because a parameter is set to an invalid value.
400 InvalidTaskId.Malformed The specified TaskId is invalid. The error message returned because the specified task ID (TaskId) is invalid. Specify a valid task ID.
400 InvalidTaskId The maximum number of taskIds is 10. The error message returned because the maximum number of task IDs that you can specify in each call is 10.
400 InvalidTime The query time cannot exceed the last 3 days. The error message returned because the time range to query cannot exceed three days.
429 TooManyRequests The server is busy. Please try again later. The error message returned because the server is unavailable. Try again later.

For a list of error codes, visit the API Error Center.