证书接口

获取证书分页列表

URL: http://your_ip:port/api/cert/getPage

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 获取证书分页列表

Request-parameters:

ParameterTypeDescriptionRequiredSince
currentint32当前页数(从1开始)true-
limitint32每页数量(默认为10)true-
keywordsstring查询关键字true-

Request-example:

curl   -i http://your_ip:port/api/cert/getPage?current=bxjjjo&limit=10&keywords=14j9d5

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-
└─countint64总记录数-
└─currint32起始页(从1开始)-
└─limitint32每页记录数-
└─recordsarray列表内容-
     └─idstring主键-
     └─domainstring域名-
     └─pemstringpem文件路径-
     └─keystringkey文件路径-
     └─typeint32获取方式 0 申请证书 1 手动上传 2 DNS验证-
     └─makeTimeint64签发时间戳-
     └─autoRenewint32是否自动续签 0否 1是-
     └─dnsTypestringdns提供商 ali:阿里云 dp:腾讯云 cf:Cloudflare gd:Godaddy-
     └─dpIdstringdpId(腾讯云需要的参数)-
     └─dpKeystringdpKey(腾讯云需要的参数)-
     └─aliKeystringaliKey(阿里云需要的参数)-
     └─aliSecretstringaliSecret(阿里云需要的参数)-
     └─cfEmailstringcfEmail(Cloudflare需要的参数)-
     └─cfKeystringcfKey(Cloudflare需要的参数)-
     └─gdKeystringgdKey(Godaddy需要的参数)-
     └─gdSecretstringgdSecret(Godaddy需要的参数)-
     └─hwUsernamestringhwUsername(华为云需要的参数)-
     └─hwPasswordstringhwPassword(华为云需要的参数)-
     └─hwProjectIDstringhwProjectID(华为云需要的参数)-

Response-example:

{
	"success":true,
	"status":"rtzq7v",
	"msg":"pju3a3",
	"obj":{
		"count":918,
		"curr":651,
		"limit":10,
		"records":[
			{
				"id":"45",
				"domain":"xn--m8s.info",
				"pem":"zf41n8",
				"key":"rbh07g",
				"type":415,
				"makeTime":1641871596310,
				"autoRenew":285,
				"dnsType":"0ssekf",
				"dpId":"45",
				"dpKey":"9x4so7",
				"aliKey":"y0erig",
				"aliSecret":"cqumh4",
				"cfEmail":"弘文.邱@hotmail.com",
				"cfKey":"lnbox7",
				"gdKey":"ek7sgu",
				"gdSecret":"kk9ln7",
				"hwUsername":"鹤轩.白",
				"hwPassword":"2gauxu",
				"hwProjectID":"45"
			}
		]
	}
}

添加或编辑证书

URL: http://your_ip:port/api/cert/addOver

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 添加或编辑证书

Request-parameters:

ParameterTypeDescriptionRequiredSince
idstring主键false-
domainstring域名false-
pemstringpem文件路径false-
keystringkey文件路径false-
typeint32获取方式 0 申请证书 1 手动上传 2 DNS验证false-
makeTimeint64签发时间戳false-
autoRenewint32是否自动续签 0否 1是false-
dnsTypestringdns提供商 ali:阿里云 dp:腾讯云 cf:Cloudflare gd:Godaddyfalse-
dpIdstringdpId(腾讯云需要的参数)false-
dpKeystringdpKey(腾讯云需要的参数)false-
aliKeystringaliKey(阿里云需要的参数)false-
aliSecretstringaliSecret(阿里云需要的参数)false-
cfEmailstringcfEmail(Cloudflare需要的参数)false-
cfKeystringcfKey(Cloudflare需要的参数)false-
gdKeystringgdKey(Godaddy需要的参数)false-
gdSecretstringgdSecret(Godaddy需要的参数)false-
hwUsernamestringhwUsername(华为云需要的参数)false-
hwPasswordstringhwPassword(华为云需要的参数)false-
hwProjectIDstringhwProjectID(华为云需要的参数)false-

Request-example:

curl   -i http://your_ip:port/api/cert/addOver?hwUsername=鹤轩.白&hwProjectID=45&updateTime=1641871596310&cfKey=52rz4k&type=338&aliSecret=advc3u&id=45&dnsType=0vd2dj&hwPassword=zwow4g&domain=xn--m8s.info&gdSecret=n7jzu8&dpId=45&gdKey=gd3akm&createTime=1641871596310&aliKey=aiptn8&pem=kbou05&key=3t7rh7&autoRenew=918&makeTime=1641871596310&dpKey=uiis2k&cfEmail=弘文.邱@hotmail.com

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-

Response-example:

{
	"success":true,
	"status":"rygbuz",
	"msg":"qhz0rj",
	"obj":{
		"waring":"You may have used non-display generics."
	}
}

获取域名解析码

URL: http://your_ip:port/api/cert/getTxtValue

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 获取域名解析码

Request-parameters:

ParameterTypeDescriptionRequiredSince
certIdstring证书idtrue-

Request-example:

curl   -i http://your_ip:port/api/cert/getTxtValue?certId=45

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-
└─idstring主键-
└─certIdstring证书id-
└─domainstring域名-
└─typestring解析类型-
└─valuestring解析值-

Response-example:

{
	"success":true,
	"status":"r4q56m",
	"msg":"l3v3mx",
	"obj":[
		{
			"id":"45",
			"certId":"45",
			"domain":"xn--m8s.info",
			"type":"bv7bl3",
			"value":"r1bi58"
		}
	]
}

设置证书自动续签

URL: http://your_ip:port/api/cert/setAutoRenew

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 设置证书自动续签

Request-parameters:

ParameterTypeDescriptionRequiredSince
idstring证书idtrue-
autoRenewint32是否自动续签:0否 1是true-

Request-example:

curl   -i http://your_ip:port/api/cert/setAutoRenew?id=45&autoRenew=4guu91

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-

Response-example:

{
	"success":true,
	"status":"h4niqj",
	"msg":"24dt42",
	"obj":{
		"waring":"You may have used non-display generics."
	}
}

删除证书

URL: http://your_ip:port/api/cert/del

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 删除证书

Request-parameters:

ParameterTypeDescriptionRequiredSince
idstring证书idtrue-

Request-example:

curl   -i http://your_ip:port/api/cert/del?id=45

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-

Response-example:

{
	"success":true,
	"status":"v6akjn",
	"msg":"k25al6",
	"obj":{
		"waring":"You may have used non-display generics."
	}
}

执行申请

URL: http://your_ip:port/api/cert/apply

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 执行申请

Request-parameters:

ParameterTypeDescriptionRequiredSince
idstring证书idtrue-
typestring申请类型 issue:申请 renew:续签true-

Request-example:

curl   -i http://your_ip:port/api/cert/apply?type=jc5fa8&id=45

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-
└─idstring主键-
└─certIdstring证书id-
└─domainstring域名-
└─typestring解析类型-
└─valuestring解析值-

Response-example:

{
	"success":true,
	"status":"6fbeag",
	"msg":"jgz72k",
	"obj":[
		{
			"id":"45",
			"certId":"45",
			"domain":"xn--m8s.info",
			"type":"exfr63",
			"value":"yi5aq8"
		}
	]
}

下载证书文件

URL: http://your_ip:port/api/cert/download

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 下载证书文件

Request-parameters:

ParameterTypeDescriptionRequiredSince
idstring证书idtrue-

Request-example:

curl   -i http://your_ip:port/api/cert/download?id=45

Response-example:

This api return nothing.