CDN加速

查看证书列表

更新时间:2021-03-15 18:36:11

适用产品:通用功能

接口描述

​查看SSL证书的列表及信息,包括证书ID、证书名称、是否共享、使用当前证书的域名信息等。

返回参数

XML
参数名称类型描述
x-cnc-request-idString唯一标示的id,用于查询每次请求的任务 (适用全部接口)
ssl-certificatescomplex证书列表信息
certificate-idint证书ID
nameString证书名称,客户粒度下是唯一的
commentString证书文件的备注
share-sslString是否共享,true表示共享证书,false表示非共享证书
certificate-validity-fromString证书有效期的起始时间(CST时区),例如:2016-08-01 07:00:00
certificate-validity-toString证书有效期的到期时间(CST时区),例如:2018-08-01 19:00:00
related-domainscomplex使用当前证书的域名列表
domain-idint加速域名ID
domain-nameString加速域名的名称
dns-namesComplex授权域名列表,证书使用者可选名称,父标签
dns-nameString授权域名,格式如: <dns-names> <dns-name>*.exam.com</dns-name> <dns-name>test.example.com</dns-name> </dns-names>
certificate-serialStringcrt证书序列号
certificate-issuerStringcrt证书颁布者

错误码

错误代码(code)描述(message)HTTP状态码语义
WRONG_OPERATORWrong operator [$operator] for the customer.400提交人不对应客户
PARSE_PARAM_ERRORNo params element.400没有参数节点

示例

XML
示例说明
请求示例
复制
#!/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/api/ssl/certificate" \
-X "GET" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/xml"
返回示例
复制
HTTP/1.1 202 OK
Date: Fri, 17 May 2017 06:33:26 GMT
Content-Type: application/xml;charset=utf-8
x-cnc-request-id:c54cbbb4-19fe-407a-930c-3988b62ed2fd
<?xml version="1.0" encoding="UTF-8"?>
<ssl-certificates>
<ssl-certificate>
  <certificate-id>100166</certificate-id>
  <name>mycertificate_100166</name>
  <comment>100166</comment>
  <share-ssl>false</share-ssl>
  <certificate-validity-from>2016-08-01 19:00:00</certificate-validity-from>
  <certificate-validity-to>2018-08-01 18:59:59</certificate-validity-to>
  <certificate-issuer>CN = 16Root-CA, DC = wangsu, DC = com</certificate-issuer>
  <certificate-serial>23dw4asq2wr544fw24</certificate-serial>
  <related-domains>
    <related-domain>
      <domain-id>123344</domain-id>
      <domain-name>a1.example.com</domain-name>
    </related-domain>
    <related-domain>
      <domain-id>124466</domain-id>
      <domain-name>b1.example.com</domain-name>
    </related-domain>
  </related-domains>
</ssl-certificate>
<ssl-certificate>
  <certificate-id>100188</certificate-id>
  <name>mycertificate_100188</name>
  <comment>100188</comment>
  <share-ssl>false</share-ssl>
  <certificate-validity-from>2017-10-01 19:00:00</certificate-validity-from>
  <certificate-validity-to>2018-10-01 18:59:59</certificate-validity-to>
  <related-domains>
    <related-domain>
      <domain-id>125566</domain-id>
      <domain-name>a2.example.com</domain-name>
    </related-domain>
    <related-domain>
      <domain-id>126677</domain-id>
      <domain-name>b2.example.com</domain-name>
    </related-domain>
  </related-domains>
</ssl-certificate>
</ssl-certificates>