批量添加证书

请求URL

  • {{url}}/api/cert/batch_create

请求方式

  • post

Header

字段名
示例值
必选
类型
说明

x-api-key

{{x-api-key}}

string

x-api-secret

{{x-api-secret}}

string

请求参数示例

[
  {
    "name": "test5",
    "des": "test",
    "type": "lets",
    "dnsapi": null,
    "domain": "test1dc.com",
    "key": "",
    "cert": ""
  },
  {
    "name": "test6",
    "des": "test",
    "type": "lets",
    "dnsapi": null,
    "domain": "test1d1c.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