Skip to content

获取网站的 SSL 证书信息(证书状态、域名、TLS 版本配置)

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

POST
https://your-panel.example.com:8888/site
更新于 查看 Markdown

Request bodyX-WWW-FORM-URLENCODEDrequired

  • request_timestringrequired

    Unix 时间戳。

  • request_tokenstringrequired

    按 API 概览生成的签名。

  • actionGetSSLrequired

    具体操作名称。

  • siteNamestringrequired

    网站域名

Returns

default

接口响应,业务状态见下方详细说明。

JSON
  • statusoptionalboolean

    SSL 是否已部署

  • oidoptionalinteger

    证书订单 ID,-1 = 无

  • domainoptionalarray ofunknown

    网站域名列表 [{name, apply_ssl, dns_status}]

  • keyoptionalboolean

    是否有私钥文件

  • csroptionalboolean

    是否有证书文件

  • typeoptionalinteger

    证书类型,-1 = 无

  • httpTohttpsoptionalboolean

    是否开启 HTTP 强制跳转 HTTPS

  • cert_dataoptionalobject

    证书信息(颁发者、到期时间等)

  • tls_versionsoptionalobject

    TLS 协议版本开关 {TLSv1, TLSv1.1, TLSv1.2, TLSv1.3}

  • auth_typeoptionalstring

    认证方式(http / dns)

  • emailoptionalstring

    申请邮箱

各操作详细说明

GetSSLaction=GetSSL获取网站的 SSL 证书信息(证书状态、域名、TLS 版本配置)

获取指定网站的 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)
email 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"
}
Navigation

Type to search…

↑↓ navigate↵ selectEsc close