单条添加证书
请求URL
{{url}}/api/cert/create
请求方式
post
Header
字段名
示例值
必选
类型
说明
x-api-key
{{x-api-key}}
是
string
无
x-api-secret
{{x-api-secret}}
是
string
无
请求参数示例
{
"name": "test2",
"des": "test",
"type": "lets",
"dnsapi": null,
"domain": "test1dc.com",
"key": "",
"cert": ""
}
请求json字段说明
字段名
必选
类型
说明
name
是
string
证书名称
des
是
string
备注
type
是
string
证书类型,可选为custom、lets、zerossl
dnsapi
否
object
用于申请证书的dnsapi,通常用于通配符证书的申请
domain
否
string
申请证书的域名, 当证书类型为lets或zerossl时,此项必填
key
否
string
密钥内容,当证书类型为custom时,此项必填
cert
否
string
证书内容,当证书类型为custom时,此项必填
成功返回示例
{
"code": 0,
"data": null,
"msg": "证书添加成功"
}
失败返回示例
{
"code": -1,
"data": null,
"msg": "证书名称 test2已存在"
}
Last updated