获取域名刷新任务状态-DescribeNewUcdnRefreshCacheTask

获取域名刷新任务状态

Request Parameters

Parameter nameTypeDescriptionRequired
ProjectIdstring项目ID。不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口No
TaskId.nstring提交任务时返回的任务IDNo
BeginTimeint查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值No
EndTimeint查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。No
Statusstring需要获取的内容刷新的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态No
Offsetint数据偏移量,默认为0,自然数No
Limitint返回数据长度,默认全部,自然数No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
TotalCountint刷新任务的总数No
TaskListarray刷新任务信息,参考TaskInfoNo

TaskInfo

Parameter nameTypeDescriptionRequired
TaskIdstring提交任务时返回的任务IDNo
UrlListsarray任务url的信息列表,参考UrlProgressInfoNo
Typestringfile/dir 刷新任务会返回Type,预取任务没有No
CreateTimeint刷新任务创建的时间。格式为Unix TimestampNo
Statusstring刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知No

UrlProgressInfo

Parameter nameTypeDescriptionRequired
Urlstring刷新的单条urlNo
CreateTimeint刷新任务创建的时间。格式为Unix TimestampNo
FinishTimeint任务完成时间。格式为Unix TimestampNo
Statusstring刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知No
Progressint刷新进度,单位%No

Request Example

https://api.ucloud.cn/?Action=DescribeNewUcdnRefreshCacheTask
&ProjectId=xxxxxx
&TaskId.n=sHemHKgw
&BeginTime=2
&EndTime=6
&Status=JNhEgMiG
&Offset=3
&Limit=9

Response Example

{
    "RetCode": 0,
    "Action": "DescribeNewUcdnRefreshCacheTaskResponse",
    "TaskList": [
        {
            "TaskId": "20190121141137_4d8031d5",
            "Type": "file",
            "CreateTime": 1548051097,
            "Status": "success",
            "UrlLists": [
                {
                    "Url": "http://xxxxx/test2.jpg",
                    "CreateTime": 1548051097,
                    "FinishTime": 1548051103,
                    "Status": "success",
                    "Progress": 100
                },
                {
                    "Url": "http://xxxxx/test.jpg",
                    "CreateTime": 1548051097,
                    "FinishTime": 1548051103,
                    "Status": "success",
                    "Progress": 100
                }
            ]
        }
    ],
    "TotalCount": 2
}