调用DescribeRefreshTasks查询刷新、预热状态是否在全网生效。
接口说明
支持根据任务 ID 或 URL 查询。
支持同时传入 TaskId 和 ObjectPath 参数,如果不指定 TaskId 和 ObjectPath,默认查询最近 3 天内第一页的数据(20 条)。
只能查询最近 3 天内的数据。
任务状态需要由 API 的调用请求来触发异步更新。
如果您在 OSS 控制台开启了 CDN 缓存自动刷新,则无法通过 DescribeRefreshTasks 接口查看 OSS 上的缓存自动刷新任务。
单用户调用频率:5 次/秒。如果您需要更高的调用频率,请使用仅支持通过任务编号查询刷新预热任务信息的接口 DescribeRefreshTaskById 。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
cdn:DescribeRefreshTasks |
none |
*Domain
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
TaskId |
string |
否 |
按任务 ID 查询刷新状态。 |
1234321 |
ObjectPath |
string |
否 |
按路径查询,准确匹配。 |
http://example.com/1.txt |
PageNumber |
integer |
否 |
取得第几页,取值范围为:1~100000。 |
1 |
ObjectType |
string |
否 |
任务类型。取值:
说明
当指定 DomainName 或 Status 参数时,ObjectType 参数为必传参数。 |
file |
DomainName |
string |
否 |
加速域名。仅支持单个查询,默认查询所有加速域名。 |
example.com |
Status |
string |
否 |
任务状态。取值:
|
Complete |
PageSize |
integer |
否 |
分页大小,默认 20,最大 100。取值:1~100。 |
20 |
StartTime |
string |
否 |
开始时间。日期格式按照 ISO8601 表示法,并使用 UTC+0 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
2017-12-21T08:00:00Z |
EndTime |
string |
否 |
结束时间。日期格式按照 ISO8601 表示法,并使用 UTC+0 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 说明
结束时间需大于起始时间。 |
2017-12-22T08:00:00Z |
ResourceGroupId |
string |
否 |
资源组 ID。 |
rg-acfmyuji4b6r4** |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
|||
RequestId |
string |
请求 ID。 |
174F6032-AA26-470D-B90E-36F0EB205BEE |
PageNumber |
integer |
页码。 |
10 |
PageSize |
integer |
整页大小。 |
1 |
TotalCount |
integer |
总条数。 |
2 |
Tasks |
object |
||
CDNTask |
array<object> |
任务列表。 |
|
object |
|||
Status |
string |
状态。取值:
|
Complete |
CreationTime |
string |
任务对象创建时间,UTC+0 时间。 |
2014-11-27T08:23:22Z |
ObjectType |
string |
任务类型。
|
file |
Process |
string |
进度百分比。 |
100% |
Description |
string |
刷新预热失败返回的错误描述。
|
Internal Error |
ObjectPath |
string |
刷新对象路径。 |
http://example.com/1.txt |
TaskId |
string |
任务 ID。 |
704225667 |
示例
正常返回示例
JSON
格式
{
"RequestId": "174F6032-AA26-470D-B90E-36F0EB205BEE",
"PageNumber": 10,
"PageSize": 1,
"TotalCount": 2,
"Tasks": {
"CDNTask": [
{
"Status": "Complete",
"CreationTime": "2014-11-27T08:23:22Z",
"ObjectType": "file",
"Process": "100%",
"Description": "Internal Error",
"ObjectPath": "http://example.com/1.txt",
"TaskId": "704225667"
}
]
}
}
异常返回示例
JSON
格式
{"RequestId":"16A96B9A-F203-4EC5-8E43-CB92E68F4CD8","HostId":"cdn.aliyuncs.com","Code":"InternalError","Message":"The request processing has failed due to some unknown error."}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | InvalidTaskId.Malformed | The specified TaskId is invalid. | |
400 | MissingParameter.ObjectType | The ObjectType parameter is required if DomainName or Status is specified. | |
400 | MissingTimeParameter | The StartTime and EndTime must be both specified. | 请同时提供开始时间和结束时间。 |
400 | InvalidEndTime.Mismatch | The specified EndTime is earlier than the StartTime. | 用户参数中EndTime早于StartTime |
400 | DomainNameOverLimit | A maximum of 500 domains are supported for each request. | |
400 | InvalidTime | The query time cannot exceed the last 3 days. | |
400 | InvalidStartTime.Malformed | The specified StartTime is invalid. | 起始时间格式错误。请核对后重新提供。 |
400 | InvalidEndTime.Malformed | The specified EndTime is invalid. | 结束时间格式错误。日期格式请参考所调用API的帮助文档说明。 |
400 | InvalidObjectPath.Malformed | The specified ObjectPath is invalid. | |
400 | InvalidStartTime.ValueNotSupported | The specified StartTime is invalid. | 起始时间格式错误。日期格式请参考所调用API的帮助文档说明。 |
400 | InvalidEndTime.ValueNotSupported | The specified EndTime is invalid. | |
400 | InvalidObjectType.ValueNotSupported | The specified ObjectType is not supported. | |
400 | InvalidStatus.ValueNotSupported | The specified Status is not supported. | |
429 | TooManyRequests | The server is busy. Please try again later. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。