上传证书

最近更新时间:2019-04-26 14:45:22

1. 接口描述

本接口(CertUpload)用于上传证书。
接口请求域名:wss.api.qcloud.com

2. 输入参数

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

参数名称 是否必选 类型 描述
cert String 证书内容
certType String 证书类型(目前支持:CA 为客户端证书,SVR 为服务器证书)
key String 证书私钥,certType=SVR 时必填
alias String 证书备注

3. 输出参数

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

data 参数包含了帐号下域名的数量信息,以及域名列表,其中,

参数名称 类型 描述
id String 证书 ID

4. 示例

https://wss.api.qcloud.com/v2/index.php?
&<公共请求参数>
&Action=CertUpload
&cert=-----BEGIN+CERTIFICATE-----%0D%0AMIIFxTCCBK2gAwIBAgIQExOG1fLHj38bcWMxgd%2BcUTANBgkqhkiG9w0BAQsFADCB%0D%0AlzELMAkGA1UEBhMCQ04xJTAjBgNVBAoTHFRydXN0QXNpYSBUZWNobm9sb2dpZXMs%0D%0AIEluYy4xHzAdBgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxHTAbBgNVBAsT%0D%0AFERvbWFpbiBWYWxpZGF0ZWQgU1NMMSEwHwYDVQQDExhUcnVzdEFzaWEgRFYgU1NM%0D%0AIENBIC0gRzUwHhcNMTcwMzIzMDAwMDAwWhcNMTgwMzIzMjM1OTU5WjAcMRowGAYD%0D%0AVQQDDBFzYWRmZGFzZi5mLXhqLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC%0D%0AAQoCggEBAIlljWcJfs3Zc4qVhq4IhijOPt9dX3E3%2BT4z3EtPdCfZ54%2Fff9IRiR8M%0D%0AAh9f5JUWBK3aVYfv2%2BQE5GYBs6VFqLp5xpEDKEzPOm2D2qyuqGSxMyhWGQU%2BNS3i%0D%0AQMu%2BTI0PttvOpqMYnIUXy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AwEGCCsGAQUFBwMCMCkGA1Ud%0D%0AEQQiMCCkHjAcMRowGAYDVQQDExFTeW1hbnRlY1BLSS0yLTYwMTAdBgNVHQ4EFgQU%0D%0AbVjHfxrn4T8upoyXNUK79NM4rD8wHwYDVR0jBBgwFoAUf9Nlp8Ld7LvwMAnzQzn6%0D%0AAq8zMTMwDQYJKoZIhvcNAQELBQADggEBABUphhBbeG7scE3EveIN0dOjXPgwgQi8%0D%0AI2ZAKYm6DawoGz1lEJVdvFmkyMbP973X80b7mKmn0nNbe1kjA4M0O0hHaMM1ZaEv%0D%0A7e9vHEAoGyysMO6HzPWYMkyNxcCV7Nos2Uv4RvLDpQHh7P4Kt6fUU13ipcynrtQD%0D%0A1lFUM0yoTzwwFsPu3Pk%2B94hL58ErqwqJQwxoHMgLIQeMVHeNKcWFy1bddSbIbCWU%0D%0AZs6cMxhrra062ZCpDCbxyEaFNGAtYQMqNz55Z%2F14XgSUONZ%2FcJTns6QKhpcgTOwB%0D%0AfnNzRnk%2BaWreP7osKhXlz4zs%2BllP7goBDKFOMMtoEXx3YjJCKgpqmBU%3D%0D%0A-----END+CERTIFICATE-----
&certType=SVR
&key=-----BEGIN+RSA+PRIVATE+KEY-----%0D%0AMIIEogIBAAKCAQEAiWWNZwl%2BzdlzipWGrgiGKM4%2B311fcT...(省略)...dTh0tEPGcssOuNtHEFW4RywOQVGihxe%2BcszCTo0u%2FiJSS5w8M%3D%0D%0A-----END+RSA+PRIVATE+KEY-----

返回示例如下:

{
    "code": 0,
    "message": "",
    "codeDesc": "Success",
    "data": {
        "id": "9hyvgrkE"
    }
}