查询验证任务列表

更新时间:2023-04-04 20:29:44

适用产品

CDN Pro

接口描述

获取加速项目验证任务列表,接口返回关联的加速项目ID,加速项目版本,任务提交时间以及任务状态等信息。

调用频率

单用户调用频率:300/5min

推荐使用 Open API在线调试

Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试

请求参数

Params 参数

参数名称描述
propertyIdString
指定加速项目ID,查询该加速项目相关的验证任务。
propertyVersionString
指定加速项目版本,查询该加速项目版本相关的验证任务。
statusString
取值范围: waiting,in progress,succeeded,failed 根据状态查询验证任务。默认情况下,查询所有状态下的验证任务。
limitInteger
默认值: 100 取值范围: <= 200 每次查询的最大条数。
offsetInteger
默认值: 0 取值范围: >= 0 查询起始位置。
searchString
根据该关键字匹配验证任务的ID或者名称进行查询。
sortByString
取值范围: submissionTime,finishTime 默认值: finishTime 查询结果根据验证任务的提交时间(submissionTime)或者完成时间(finishTime)进行排序。
sortOrderString
取值范围: asc,desc 默认值: desc 查询结果按照升序(asc)或者降序(desc)返回。
startdateString
指定RFC 3339格式的日期,查询提交时间晚于该日期的验证任务。
enddateString
指定RFC 3339格式的日期,查询提交时间早于该日期的验证任务。

返回参数

Body 参数

参数名称描述
countInteger
取值范围: >= 0 验证任务的总数。
validationsList
验证任务摘要信息。通过调用'查询验证任务详情'接口,可获得有关验证任务的详细信息。
idString
验证任务ID。
propertyIdString
提交验证的加速项目的ID。
versionInteger
取值范围: >= 1 提交验证的加速项目的版本。
submissionTimeString
RFC 3339格式的日期,表示验证任务的提交时间。如:'2019-11-12T03:09:26Z'。
statusString
取值范围: waiting,in progress,succeeded,failed 验证任务的执行状态,包括等待中,进行中,验证成功以及验证失败等状态。
cacheVersionString
验证加速项目时使用的CDN Pro cache服务器的版本。
apiRequestIdString
API请求ID。

错误码

错误代码(code)描述(message)HTTP状态码语义
InvalidListLimitThe value of limit should be between 1 and 200, inclusive.400limit参数的取值范围是1-200。
InvalidListOffsetThe requested offset exceeds the total number of records.400offset参数的值超出验证任务的总数。
InvalidPropertyVersionThe version number must be a positive integer.400版本号必须是正整数。
InvalidPropertyIdAn invalid property ID was specified.400指定的加速项目ID不存在。

示例

200
400
200
请求示例
复制代码 复制成功
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://open.chinanetcenter.com/cdn/validations" \
-X "GET" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json"
返回示例
复制代码 复制成功
{
    "count": 3,
    "validations": [
        {
            "id": "5dca226ff9e9cc0001df7b31",
            "propertyId": "1b15ba70abecdbe54c5fdefe",
            "version": 1,
            "submissionTime": "2019-11-12T03:09:35Z",
            "status": "in progress",
            "cacheVersion": "1.16.1.1.1.10-186",
            "apiRequestId": "94744d7e563547ee"
        },
        {
            "id": "5dca2266f9e9cc0001df7b2f",
            "propertyId": "9c3a02c91d0e502351d7eb0e",
            "version": 1,
            "submissionTime": "2019-11-12T03:09:26Z",
            "status": "in progress",
            "cacheVersion": "1.16.1.1.1.10-186",
            "apiRequestId": "4d5d8f1ca80a8f55",
            "apiAccountId": 564
        },
        {
            "id": "5dca2243f9e9cc0001df7b2e",
            "propertyId": "8911581353a31302a9322d4e",
            "version": 1,
            "submissionTime": "2019-11-12T03:08:51Z",
            "finishTime": "2019-11-12T03:08:59Z",
            "status": "failed",
            "cacheVersion": "1.16.1.1.1.10-186",
            "apiRequestId": "88bee496eac72b7d"
        }
    ]
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!