Queries the status information about the refresh or prefetch tasks for a specified domain name. The maximum time range that you can for each request is three days.

Before you call this operation, pay attention to the following notes:
  • You can query the status information by task ID or by URL.
  • If you specify neither the TaskId parameter nor the ObjectPath parameter, the data within the last three days on the first page is returned. By default, a maximum of 20 entries can be displayed on each page.
  • You can specify the TaskId and ObjectPath parameters at the same time.
  • If you specify the DomainName or Status parameter, you must specify the ObjectType parameter.

Debugging

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 parameters

Parameter Type Required Example Description
Action String Yes DescribeDcdnRefreshTasks

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

TaskId String No 123

The ID of the task. A task ID is assigned when you create a refresh or prefetch task.

ObjectPath String No http://aaa.com/1.txt

The path of the object. The path is used as a condition for an exact match.

PageNumber Integer No 2

The number of the page to return. Valid values: 1 to 100000.

ObjectType String No file

The type of the task. Valid values:

  • file: URL-based refresh
  • directory: directory-based refresh
  • preload: URL-based prefetch

If you specify the DomainName or TaskStatus parameter, the ObjectType parameter is required.

DomainName String No example.com

The name of the accelerated domain. You can specify only one domain name.

Status String No Complete

The status of the task.

  • Complete: The task is completed.
  • Refreshing: The task is in progress.
  • Failed: The task has failed.
PageSize Integer No 20

The number of entries to return on each page. Default value: 20. Maximum value: 50. Valid values: 1 to 50.

StartTime String No 2017-01-01T12:12:20Z

The start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

EndTime String No 2017-01-01T12:12:20Z

The end time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

The end time must be later than the start time.

ResourceGroupId String No 123

The ID of the resource group.

Response parameters

Parameter Type Example Description
PageNumber Long 2

The page number of the returned page.

PageSize Long 2

The number of entries returned per page.

RequestId String 174F6032-AA26-470D-B90E-36F0EB205BEE

The ID of the request.

Tasks Array of Task

The list of tasks.

Task
CreationTime String 2014-11-27T08:23:22Z

The time when the task was created. The time is displayed in UTC.

Description String Internal Error

The type of the error returned when the refresh or prefetch task failed.

  • InternalError: An internal error occurred.
  • OriginTimeout: A time-out error occurred when the origin server responded to the request.
  • OriginReturn StatusCode 5XX: The origin server returned a 5XX error.
ObjectPath String http://aaa.com/1.txt

The path of the object to be refreshed.

ObjectType String file

The type of the task. Valid values:

  • file: URL-based refresh
  • path: directory-based refresh
  • preload: URL-based prefetch
Process String 10

The progress of the task. Unit: percentage.

Status String Complete

The status of the task. Valid values:

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

The ID of the task.

TotalCount Long 20

The number of tasks.

Examples

Sample requests

https://dcdn.aliyuncs.com?Action=DescribeDcdnRefreshTasks
&ObjectPath=http://aaa.com/1.txt
&PageNumber=1
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

<DescribeDcdnRefreshTasksResponse>
	  <Tasks>
		    <Task>
			      <CreationTime>2014-11-27T08:23:22Z</CreationTime>
			      <ObjectPath>http://aaa.com/1.txt</ObjectPath>
			      <Status>Complete</Status>
			      <TaskId>704225667</TaskId>
			      <ObjectType>file</ObjectType>
			      <Process>100%</Process>
		    </Task>
		    <Task>
			      <CreationTime>2014-11-27T08:18:38Z</CreationTime>
			      <ObjectPath>http://bbb.com/1.txt</ObjectPath>
			      <Status>Complete</Status>
			      <TaskId>704222904</TaskId>
			      <ObjectType>file</ObjectType>
			      <Process>100%</Process>
		    </Task>
	  </Tasks>
	  <PageNumber>1</PageNumber>
	  <PageSize>10</PageSize>
	  <TotalCount>2</TotalCount>
	  <RequestId>174F6032-AA26-470D-B90E-36F0EB205BEE</RequestId>
</DescribeDcdnRefreshTasksResponse>

JSON format

{
    "Tasks" : {
        "Task" : [{
                "CreationTime" : "2014-11-27T08:23:22Z",
                "ObjectPath" : "http://aaa.com/1.txt",
                "Status" : "Complete",
                "TaskId" : "704225667",
                "ObjectType" : "file",
                "Process" : "100%"
            }, {
                "CreationTime" : "2014-11-27T08:18:38Z",
                "ObjectPath" : "http://bbb.com/1.txt",
                "Status" : "Complete",
                "TaskId" : "704222904",
                "ObjectType" : "file",
                "Process" : "100%"
            }
        ]
    },
    "PageNumber" : 1,
    "PageSize" : 10,
    "TotalCount" : 2,
    "RequestId" : "174F6032-AA26-470D-B90E-36F0EB205BEE"
}

Error codes

HttpCode Error code Error message Description
400 InvalidTaskId.Malformed The specified TaskId is invalid. The error message returned because the specified task ID is invalid. Specify a valid task ID.
400 MissingTimeParameter The StartTime and EndTime must be both specified. The error message returned because only the StartTime parameter or the EndTime parameter is specified. Specify both parameters or leave both parameters empty.
400 MissingParameter.ObjectType The ObjectType parameter is required if DomainName or ObjectType is specified. The error message returned because the ObjectType parameter is not specified.
400 InvalidStartTime.Malformed The specified StartTime parameter is invalid. The error message returned because the format of the specified start time is invalid. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
400 InvalidEndTime.Malformed The specified EndTime is invalid. The error message returned because the format of the specified end time is invalid. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
400 InvalidEndTime.Mismatch The specified EndTime is earlier than the StartTime. The error message returned because the specified end time is earlier than the specified start time.
400 InvalidStartTime.ValueNotSupported The specified StartTime is invalid. The error message returned because the specified start time is not supported. Specify another value.
400 InvalidObjectType.ValueNotSupported The specified ObjectType is not supported. The error message returned because the specified value of the ObjectType parameter is invalid. Specify another value.
400 InvalidStatus.ValueNotSupported The specified Status is not supported. The error message returned because the specified value of the Status parameter is invalid. Specify a valid value.
400 DomainNameOverLimit A maximum of 500 domains are supported for each request. The error message returned because the maximum number of domain names in one request has been reached. You can specify a maximum of 500 domain names for each request. Delete some domain names and try again.

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