开发者社区> 问答> 正文

如何查询刷新操作记录?



描述


查询刷新、预热状态,是否在全网生效。

  • 支持根据任务ID查询、URL查询
  • taskid与objectpath都不指定,默认查7天内,第一页的数据(20条)
  • Taskid与objectpath可以同时指定,逻辑与的关系
  • 只可查询7天内的数据


请求参数

参数类型必要描述
ActionString操作接口名,系统规定参数取值:DescribeRefreshTasks
TaskIdString按任务Id查询刷新状态
ObjectPathString按路径查询,准确匹配
PageSizeInteger分页大小,默认20,最大50 取值:1~50之前的任意整数
PageNumberInteger取得第几页 取值范围为:1~100000


返回参数

名称类型描述
TasksStructTaskItem组成的Task任务列表。
PageSizeInteger整页大小
PageNumberInteger页码
TotalCountInteger总条数


TaskItem 子节点

名称类型描述
TaskIdString任务Id。
ObjectPathString刷新对象路径
StatusString状态,值分别是Complete(完成)、Refreshing(刷新中)、Failed(刷新失败)、Pending(等待刷新)
ProcessString进度百分比
CreationTimeDateTime任务对象创建时间,UTC时间
DescriptionString刷新预热失败返回错误描述,目前包含三种错误”Internal Error” “Origin Timeout” “Origin Return StatusCode 5XX”


特定错误码

ErrorCode 错误码Message 错误信息HTTP 状态
ThrottlingRequest was denied due to request throttling.503请求被流量控制限制
OperationDeniedYour account does not open CDN service yet.403未开通CDN服务
OperationDeniedYour CDN service is suspended.403CDN服务已被停止
InvalidTaskId.MalformedSpecified TaskId is malformed.400TaskId格式错误

公共错误码请 查看

示例


请求示例: https://cdn.aliyuncs.com?&Action=DescribeRefreshTasks&ObjectPath=&PageNumber=1&PageSize=10&<公共请求参数>

返回示例:
JSON格式: {
    "Tasks" : {
        "CDNTask" : [{
                "CreationTime" : "2014-11-27T08:23:22Z",
                "ObjectPath" : "http:\/\/news.ifeng.com\/1.txt",
                "Status" : "Complete",
                "TaskId" : "704225667"
            }, {
                "CreationTime" : "2014-11-27T08:18:38Z",
                "ObjectPath" : "http:\/\/news.ifeng.com\/1.txt",
                "Status" : "Complete",
                "TaskId" : "704222904"
            }, {
                "CreationTime" : "2014-11-27T07:58:58Z",
                "ObjectPath" : "http:\/\/news.ifeng.com\/static\/",
                "Status" : "Complete",
                "TaskId" : "704211692"
            }, {
                "CreationTime" : "2014-11-27T07:58:31Z",
                "ObjectPath" : "http:\/\/news.ifeng.com\/static\/1.png",
                "Status" : "Complete",
                "TaskId" : "704211414"
            }, {
                "CreationTime" : "2014-11-27T07:56:54Z",
                "ObjectPath" : "http:\/\/news.ifeng.com\/static\/",
                "Status" : "Complete",
                "TaskId" : "704210512"
            }, {
                "CreationTime" : "2014-11-27T07:56:42Z",
                "ObjectPath" : "http:\/\/news.ifeng.com\/static\/1.png",
                "Status" : "Complete",
                "TaskId" : "704210368"
            }, {
                "CreationTime" : "2014-11-27T07:56:11Z",
                "ObjectPath" : "http:\/\/news.ifeng.com\/static\/1.png",
                "Status" : "Complete",
                "TaskId" : "704210004"
            }, {
                "CreationTime" : "2014-11-27T04:06:27Z",
                "ObjectPath" : "http:\/\/haitao.smzdm.com\/1.txt",
                "Status" : "Complete",
                "TaskId" : "704081031"
            }
        ]
    },
    "PageNumber" : 1,
    "PageSize" : 10,
    "TotalCount" : 8,
    "RequestId" : "174F6032-AA26-470D-B90E-36F0EB205BEE"
}


XML格式: <?xml version="1.0" encoding="utf-8"?>
<DescribeRefreshTasksResponse>
  <Tasks>
    <CDNTask>
      <CreationTime>2014-11-27T08:23:22Z</CreationTime>
      <ObjectPath>http://news.ifeng.com/1.txt</ObjectPath>
      <Status>Complete</Status>
      <TaskId>704225667</TaskId>
    </CDNTask>
    <CDNTask>
      <CreationTime>2014-11-27T08:18:38Z</CreationTime>
      <ObjectPath>http://news.ifeng.com/1.txt</ObjectPath>
      <Status>Complete</Status>
      <TaskId>704222904</TaskId>
    </CDNTask>
    <CDNTask>
      <CreationTime>2014-11-27T07:58:58Z</CreationTime>
      <ObjectPath>http://news.ifeng.com/static/</ObjectPath>
      <Status>Complete</Status>
      <TaskId>704211692</TaskId>
    </CDNTask>
    <CDNTask>
      <CreationTime>2014-11-27T07:58:31Z</CreationTime>
      <ObjectPath>http://news.ifeng.com/static/1.png</ObjectPath>
      <Status>Complete</Status>
      <TaskId>704211414</TaskId>
    </CDNTask>
    <CDNTask>
      <CreationTime>2014-11-27T07:56:54Z</CreationTime>
      <ObjectPath>http://news.ifeng.com/static/</ObjectPath>
      <Status>Complete</Status>
      <TaskId>704210512</TaskId>
    </CDNTask>
    <CDNTask>
      <CreationTime>2014-11-27T07:56:42Z</CreationTime>
      <ObjectPath>http://news.ifeng.com/static/1.png</ObjectPath>
      <Status>Complete</Status>
      <TaskId>704210368</TaskId>
    </CDNTask>
    <CDNTask>
      <CreationTime>2014-11-27T07:56:11Z</CreationTime>
      <ObjectPath>http://news.ifeng.com/static/1.png</ObjectPath>
      <Status>Complete</Status>
      <TaskId>704210004</TaskId>
    </CDNTask>
    <CDNTask>
      <CreationTime>2014-11-27T04:06:27Z</CreationTime>
      <ObjectPath>http://haitao.smzdm.com/1.txt</ObjectPath>
      <Status>Complete</Status>
      <TaskId>704081031</TaskId>
    </CDNTask>
  </Tasks>
  <PageNumber>1</PageNumber>
  <PageSize>10</PageSize>
  <TotalCount>8</TotalCount>
  <RequestId>13DF2E2F-FBF8-4E1C-9222-98141795443D</RequestId>
</DescribeRefreshTasksResponse>

展开
收起
青衫无名 2017-10-24 10:22:47 2348 0
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载