面板证书 panel-cert

仅管理员。面板自己用的 HTTPS 证书状态;一键用面板域名自动申请 Let's Encrypt 证书,续签随证书管理。

点击任一接口,右侧显示对应的调用示例。

证书鉴权: 仅管理员2 个接口

鉴权

请求头带 X-API-Key(在「API 密钥」页开通,密钥只在开通时显示一次);也可用登录得到的 Authorization: Bearer 令牌。

X-API-Key

鉴权失败回 401;无权回 403(code 为 insufficient_scope 等)。

约定

分页参数 page(从 1 起)、page_size;排序 sort=字段 或 -字段。

时间一律 RFC 3339(UTC);金额单位为分。

写操作成功回 200/201/204;重复提交按资源唯一键回 409。

面板证书对象

字段类型说明
acmeCertAcme 自动签发状态(状态、验证方式、续签与最近一次失败原因)。
certCert 证书(响应带证书链、域名、到期时间与状态,不带私钥;私钥只能经导出接口取回)。
cert_idinteger panel.tls.cert_id;0 = 没配面板证书。
domainstring 面板域名(panel.access.domain);空 = 没填。
httpsstring 面板 HTTPS 的现状。on = 面板证书可用且主控开了 HTTPS 监听;no_domain = 没填面板域名(不申请证书);no_cert = 填了域名但没有可用的面板证书;issuing = 证书正在签发;failed = 证书签发失败(原因见 acme.last_error,自动申请的会按间隔重试);no_listen = 证书已有,但主控配置文件没开 HTTPS 监听(listen_tls);expired = 面板证书已过期(not_after 已过,续签没成功)。
可选值 ["on","no_domain","no_cert","issuing","failed","no_listen","expired"]

返回与错误

成功直接回资源 JSON(HTTP 2xx);失败回 application/problem+json(code、detail,校验失败带 errors);列表为 items + total。

成功
{
  "id": 1,
  "name": "example"
}
列表
{
  "items": [
    {
      "id": 1
    }
  ],
  "page": 1,
  "page_size": 20,
  "total": 1
}
失败
{
  "code": "validation_failed",
  "detail": "请求参数不合法",
  "errors": [
    {
      "code": "required",
      "field": "/name",
      "message": "name 必填"
    }
  ],
  "request_id": "0123456789abcdef",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "about:blank"
}
开始使用

体验在线演示

访问在线演示,或联系我们获取报价与安装命令