CDN Pro
获取加速项目版本列表。返回每个版本的摘要信息,包括其状态及关联的加速域名等。
单用户调用频率:300/5min
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 描述 |
---|---|
searchString | 根据搜索关键字匹配加速项目版本的描述字段来过滤结果。 |
limitInteger | 默认值: 100 取值范围: <= 200
每次查询的最大条数。 |
offsetInteger | 默认值: 0 取值范围: >= 0
查询起始位置。 |
sortOrderString | 取值范围: asc,desc
默认值: asc
返回结果的顺序。默认按版本号升序排列。 |
sortByString | 取值范围: version,lastUpdateTime
默认值: version
返回结果的排序依据。支持按版本号和版本最后更新时间进行排序。 |
参数名称 | 描述 |
---|---|
*propertyIdString | 加速项目ID。 |
参数名称 | 描述 |
---|---|
propertyVersionsList | 加速项目每个版本的摘要。 |
versionInteger | 取值范围: >= 1
版本号。 |
descriptionString | 加速项目版本描述。 |
creationTimeString | RFC 3339格式的日期,表示创建加速项目版本的时间。示例:2016-12-28T23:10:42Z |
hostnamesList | 加速项目下的加速域名。 |
frozenBoolean | 默认值: False
该加速项目版本是否处于冻结状态。当加速项目版本部署后即进入冻结状态,不可再更新该版本。 |
lastUpdateTimeString | RFC 3339格式的日期,表示加速项目版本的最近更新时间。示例:2016-12-28T23:10:42Z |
lastValidationStatusString | 取值范围: NotValidated,InProgress,Validated,Failed
加速项目版本最近一次验证的状态,包括未验证,验证中,已验证,验证失败等状态。 |
countInteger | 取值范围: >= 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 }