有奖捉虫:云通信与企业服务文档专题,速来> HOT

1. 接口描述

本接口(CertGetList)用于获取证书列表。
接口请求域名:wss.api.qcloud.com

2. 输入参数

以下请求参数列表仅列出了接口请求参数,正式调用时需要加上公共请求参数,见 公共请求参数 页面。其中,此接口的 Action 字段为 CertGetList。

参数名称 是否必选 类型 默认值 描述
page Int 1 页数
count Int 20 每页条数
searchKey String - 搜索关键字
certType String - 证书类型(目前支持:CA = 客户端证书,SVR = 服务器证书)
id String - 证书 ID
withCert Int 0 是否同时获取证书内容
altDomain String - 如传,则只返回给已给该域名使用的证书

3. 输出参数

参数名称 类型 描述
code Int 公共错误码, 0表示成功,其他值表示失败。详见错误码页面的 公共错误码
message String 模块错误信息描述,与接口相关。
codeDesc String 英文错误码,成功返回 Success,失败有相应的英文说明。
data Array API 返回的数据。

如果获取成功,会返回 data 字段,包含了获取到的证书数量 totalNum 与 list 值。list 字段获取成功后,返回的基本信息如下:

参数名称 类型 描述
ownerUin String 所属账户
projectId String 项目 ID
from String 证书来源:trustasia = 亚洲诚信, upload = 用户上传
type Int 证书类型
certType String 同入参 certType,可取值:CA 或 SVR
productZhName String 证书办法者名称
domain String 主域名
alias String 别名
status Int 状态值,参考"证书状态信息"
vulnerability_status String 漏洞扫描状态:INACTIVE = 未开启,ACTIVE = 已开启
statusMsg String 状态信息
verifyType String 验证类型
certBeginTime String 证书生效时间
certEndTime String 证书过期时间
validityPeriod String 证书过期时间
insertTime String 创建时间
projectInfo String 项目信息,参考“具体项目信息字段”
id String 证书 ID
subjectAltName Array 证书包含的多个域名(包含主域名)
type_name String 证书类型名称
status_name String 状态名称
is_vip Bool 是否为 VIP 客户
is_dv Bool 是否我 DV 版证书
is_wildcard Bool 是否为泛域名证书
is_vulnerability Bool 是否启用了漏洞扫描功能

证书状态信息:

参数值 描述
0 审核中
1 已通过
2 审核失败
3 已过期
4 已添加云解析记录
5 OV/EV 证书,待提交资料
6 订单取消中
7 已取消
8 已提交资料, 待上传确认函

具体项目信息字段:

参数名称 类型 描述
projectId String 项目 ID
ownerUin String 项目所属的 uin(默认项目为0)
name String 项目名称
creatorUin String 创建项目的 uin
createTime String 项目创建时间
info String 项目说明

4. 示例

https://wss.api.qcloud.com/v2/index.php?
&<公共请求参数>
&Action=CertGetList
&id=xxxxxxxx

返回示例如下:

{
    "code": 0,
    "message": "",
    "codeDesc": "Success",
    "data": {
        "totalNum": 12,
        "list": [
            {
                "ownerUin": "664372747",
                "projectId": "0",
                "from": "trustasia",
                "type": "2",
                "certType": "SVR",
                "productZhName": "TrustAsia TLS RSA CA",
                "domain": "cl.f-xj.cn",
                "alias": "",
                "status": 1,
                "vulnerability_status": "INACTIVE",
                "statusMsg": null,
                "verifyType": "DNS_AUTO",
                "certBeginTime": "2017-12-20 08:00:00",
                "certEndTime": "2018-12-20 20:00:00",
                "validityPeriod": "12",
                "insertTime": "2017-12-20 21:25:00",
                "projectInfo": {
                    "projectId": "0",
                    "ownerUin": 0,
                    "name": "默认项目",
                    "creatorUin": 0,
                    "createTime": "0000-00-00 00:00:00",
                    "info": "默认项目"
                },
                "id": "GjTNRoK7",
                "subjectAltName": [
                    "cl.f-xj.cn"
                ],
                "type_name": "TrustAsia TLS RSA CA",
                "status_name": "已通过",
                "is_vip": false,
                "is_dv": true,
                "is_wildcard": false,
                "is_vulnerability": false
            }
          ]
    }
}