CDN Pro
获取加速项目版本列表。返回每个版本的摘要信息,包括其状态及关联的加速域名等。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
search | String | 否 | 根据搜索关键字匹配加速项目版本的描述字段来过滤结果。 |
limit | Integer | 否 | 默认值: 100 取值范围: <= 200 每次查询的最大条数。 |
offset | Integer | 否 | 默认值: 0 取值范围: >= 0 查询起始位置。 |
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
propertyId | String | 是 | 加速项目ID。 |
参数名称 | 类型 | 描述 |
---|---|---|
propertyVersions | List | 加速项目每个版本的摘要。 |
version | Integer | 取值范围: >= 1 版本号。 |
description | String | 加速项目版本描述。 |
creationTime | String | RFC 3339格式的日期,表示创建加速项目版本的时间。示例:2016-12-28T23:10:42Z |
hostnames | List | 加速项目下的加速域名。 |
frozen | Boolean | 默认值: False 该加速项目版本是否处于冻结状态。当加速项目版本部署后即进入冻结状态,不可再更新该版本。 |
lastUpdateTime | String | RFC 3339格式的日期,表示加速项目版本的最近更新时间。示例:2016-12-28T23:10:42Z |
lastValidationStatus | String | 取值范围: NotValidated,InProgress,Validated,Failed 加速项目版本最近一次验证的状态,包括未验证,验证中,已验证,验证失败等状态。 |
count | Integer | 取值范围: >= 0 加速项目的版本数量。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
InvalidListLimit | The value of limit should be between 1 and 200, inclusive. | 400 | limit参数取值必须在1-200之间。 |
InvalidListOffset | The offset must be a valid non-negative integer. | 400 | offset参数取值必须是大于等于零的整数。 |
InvalidPropertyId | The specified property ID does not exist. | 404 | 指定的加速项目ID不存在。 |
#!/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/properties/{propertyID}/versions" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json"
{ "propertyVersions": [ { "version": 1, "description": "validProperty_GetPropertyVersionListTestSteps", "creationTime": "2019-10-30T02:33:45Z", "hostnames": [ "domain.info" ], "frozen": false, "lastUpdateTime": "2019-10-30T02:33:45Z", "lastValidationStatus": "NotValidated" }, { "version": 2, "description": "validPropertyVersionWithoutCertificate_PropertySteps", "creationTime": "2019-10-30T02:33:46Z", "hostnames": [ "domain.info" ], "frozen": true, "lastUpdateTime": "2019-10-30T02:33:46Z", "lastValidationStatus": "Validated" }, { "version": 3, "description": "validPropertyVersionWithoutCertificate_PropertySteps", "creationTime": "2019-10-30T02:33:47Z", "hostnames": [ "domain.info" ], "frozen": false, "lastUpdateTime": "2019-10-30T02:33:47Z", "lastValidationStatus": "NotValidated" } ], "count": 3 }