CDN Pro
获取证书的详细信息,包括证书的版本以及证书使用情况。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 描述 |
---|---|
*certificateIdString | 证书ID。 |
参数名称 | 描述 |
---|---|
certificateIdString | 证书ID。 |
nameString | 证书名称。 |
descriptionString | 证书描述。 |
versionsList | 证书版本列表。您可以通过调用'查询证书版本信息'接口来获取每个版本的更多信息。 |
versionInteger | 取值范围: >= 1
证书的版本号。 |
typeString | 取值范围: uploaded,selfsigned
证书类型,包括'上传'和'自签名'2种类型。 |
expirationTimeString | RFC3339格式的日期,表示证书的过期时间。 |
creationTimeString | RFC3339格式的日期,表示证书的创建时间。 |
fingerprintString | 与证书关联的唯一指纹。 |
commentsString | 证书版本的描述。 |
autoRenewString | 取值范围: Off,LE
是否自动更新。'LE'值表示开启 Let's Encrypt 自动更新。 |
usageInProductionList | 证书在生产环境中的使用情况。 |
propertyIdString | 使用该证书的加速项目ID。 |
hostnamesList | 使用该证书的加速域名列表。 |
originsList | 使用该证书的加速项目源站的名称。 |
versionInStagingInteger | 取值范围: >= 1
表示部署到演练环境的证书版本。 |
usageInStagingList | 证书在演练环境中的使用情况。 |
propertyIdString | 使用该证书的加速项目的ID。 |
hostnamesList | 使用该证书的加速域名列表。 |
originsList | 使用该证书的加速项目源站的名称。 |
versionInProductionInteger | 取值范围: >= 1
表示部署到生产环境的证书版本。 |
forceRenewBoolean | 是否强制更新。当值为true时表示要求尽快自动更新证书,而不是等待证书在 15 天后过期。 证书成功更新后,该值将设置为false。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
InvalidCertId | The specified certificate 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/certificates/{certificateID}" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json"
{ "certificateId": "b23dce5954b2e1a639aa0a45", "name": "testCertificate2019101202146", "versionInProduction": 2, "description": "certificate description", "versions": [ { "version": 1, "type": "selfsigned", "expirationTime": "2019-11-21T22:21:41Z", "creationTime": "2019-11-11T22:21:41Z", "fingerprint": "6d38d08f70e3a04ad2c2bff11fb394e8ed29f878", "comments": "a self-signed version" }, { "version": 2, "type": "uploaded", "expirationTime": "2029-12-30T09:33:38Z", "creationTime": "2019-11-11T22:21:47Z", "fingerprint": "03a6feea219b6dfd3e54b41174393d56387cbebf", "comments": "certificate comments 2" } ], "usageInProduction": [ { "propertyId": "2e88917f24ede37603837a43", "hostnames": [ "testdomain-t1573511384256.domain.info" ] }, { "propertyId": "75e8d78b973a4aadc3fcc185", "hostnames": [ "testdomain-t1573511634898.domain.info" ] } ], "autoRenew": "Off" }