跳到主要内容
版本:latest

GetSSL

获取指定网站的 SSL 证书完整信息,包括证书部署状态、域名列表、TLS 协议版本配置。

  • 路由POST /site
  • actionGetSSL

输入参数

参数名称必选类型描述
actionString固定值 GetSSL
siteNameString网站域名

输出参数

参数名称类型描述
statusBooleanSSL 是否已部署
oidInteger证书订单 ID,-1 = 无
domainArray网站域名列表 [{name, apply_ssl, dns_status}]
keyBoolean是否有私钥文件
csrBoolean是否有证书文件
typeInteger证书类型,-1 = 无
httpTohttpsBoolean是否开启 HTTP 强制跳转 HTTPS
cert_dataObject证书信息(颁发者、到期时间等)
tls_versionsObjectTLS 协议版本开关 {TLSv1, TLSv1.1, TLSv1.2, TLSv1.3}
auth_typeString认证方式(http / dns
emailString申请邮箱

示例

请求

POST /site HTTP/1.1
Content-Type: application/x-www-form-urlencoded

request_time=1700000000&request_token=xxx&action=GetSSL&siteName=testapi.bt.local

响应(未部署 SSL)

{
"status": false,
"oid": -1,
"domain": [{"name": "testapi.bt.local"}, {"name": "api-test.example.com"}],
"key": false,
"csr": false,
"type": -1,
"httpTohttps": false,
"cert_data": {},
"tls_versions": {"TLSv1": false, "TLSv1.1": true, "TLSv1.2": true, "TLSv1.3": true},
"auth_type": "http",
"email": "test@message.com"
}