DescribeRefreshTasks
呼叫 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"
}
]
}
}
錯誤碼
|
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. | |
| 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. | |
| 400 | InvalidObjectPath.Malformed | The specified ObjectPath is invalid. | |
| 400 | InvalidStartTime.ValueNotSupported | The specified StartTime is invalid. | |
| 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. | |
| 400 | InvalidParams | The parameter you provided is invalid. | |
| 429 | TooManyRequests | The server is busy. Please try again later. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。