You can call this operation to query the status information for refresh or prefetch tasks. The maximum time range for a query is three days.

When you call this operation, follow these rules:
  • You can query the status information by task ID or URL.
  • If you do not specify the TaskId or ObjectPath parameters, the data within the last three days on the first page is returned. By default, one page displays a maximum of 20 entries.
  • You can specify both the TaskId and ObjectPath parameters.
  • If you specify the DomainName or TaskStatus parameter, you must also 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.

DomainName String No example.com

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

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

The end of the time range to query.

Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.

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

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

ObjectType String No file

The type of the task.

  • File: URL-based object refresh.
  • path: directory-based object refresh
  • preload: URL-based object prefetch

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

PageNumber Integer No 2

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

PageSize Integer No 20

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

ResourceGroupId String No 123

The ID of the resource group.

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

The beginning of the time range to query.

Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.

Status String No Complete

The status of the task to be queried.

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

The ID of the task to be queried.

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

The returned tasks.

Task

In XML format, this parameter indicates a specific task. In JSON format, this parameter indicates all returned tasks.

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 has failed.

  • InternalError: An internal error has occurred.
  • OriginTimeout: Receiving responses from the origin server has timed out.
  • OriginReturn StatusCode 5XX: The origin server returned a 5XX error.
ObjectPath String http://aaa.com/1.txt

The path of the object.

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 in percentile.

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 returned tasks.

Examples

Sample requests

https://dcdn.aliyuncs.com?&Action=DescribeDcdnRefreshTasks
&ObjectPath=
&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

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

Error codes

HTTP status code Error code Error message Description
400 InvalidTaskId.Malformed The specified TaskId is invalid. The error message returned because the specified task ID is invalid.
400 MissingTimeParameter The StartTime and EndTime must be both specified. The error message returned because the StartTime and EndTime parameters must be specified together.
400 MissingParameter.ObjectType The ObjectType parameter is required if DomainName or ObjectType is specified. The error message returned because the ObjectType parameter must be specified.
400 InvalidStartTime.Malformed The specified StartTime is invalid. The error message returned because the specified StartTime parameter 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 specified EndTime parameter 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 EndTime parameter is earlier than the specified StartTime parameter.
400 InvalidStartTime.ValueNotSupported The specified StartTime is invalid. The error message returned because the specified StartTime parameter is not supported.
400 InvalidObjectType.ValueNotSupported The specified ObjectType is not supported. The error message returned because the specified ObjectType parameter is invalid.
400 InvalidStatus.ValueNotSupported The specified Status is not supported. The error message returned because the specified Status parameter is invalid.
400 DomainNameOverLimit A maximum of 500 domains are supported for each request. The error message returned because the number of the specified domain names exceeds the upper limit (500).

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