GetSSL
获取指定网站的 SSL 证书完整信息,包括证书部署状态、域名列表、TLS 协议版本配置。
- 路由:
POST /site - action:
GetSSL
输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| action | 是 | String | 固定值 GetSSL |
| siteName | 是 | String | 网站域名 |
输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| status | Boolean | SSL 是否已部署 |
| oid | Integer | 证书订单 ID,-1 = 无 |
| domain | Array | 网站域名列表 [{name, apply_ssl, dns_status}] |
| key | Boolean | 是否有私钥文件 |
| csr | Boolean | 是否有证书文件 |
| type | Integer | 证书类型,-1 = 无 |
| httpTohttps | Boolean | 是否开启 HTTP 强制跳转 HTTPS |
| cert_data | Object | 证书信息(颁发者、到期时间等) |
| tls_versions | Object | TLS 协议版本开关 {TLSv1, TLSv1.1, TLSv1.2, TLSv1.3} |
| auth_type | String | 认证方式(http / dns) |
| String | 申请邮箱 |
示例
请求
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"
}