Path: API › SSL 证书

`POST /ssl`

获取面板所有网站已部署的 SSL 证书概览，包括自签名、Let's Encrypt 和商用证书。

## Request body

_Required._

- `action321.request_time` (string, required) — Unix 时间戳。
- `action321.request_token` (string, required) — 按 API 概览生成的签名。
- `action321.action` (string, required) — 具体操作名称。
  - one of `"GetCertList"`

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "GetCertList"
}
```

## Code samples

### cURL（填写面板地址与签名）

```curl
curl --request POST \
  --url "https://your-panel.example.com:8888/ssl" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "request_time=<Unix时间戳>" \
  --data-urlencode "request_token=<按 API 概览生成的签名>" \
  --data-urlencode "action=GetCertList"
```

## Responses

### default

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

#### Example

```json
[
  {
    "issuer": "R13",
    "issuer_O": "Let's Encrypt",
    "notAfter": "2026-08-21",
    "dns": [
      "dnstest.cc"
    ],
    "subject": "dnstest.cc",
    "endtime": 89
  }
]
```


## GetCertList

获取面板所有网站已部署的 SSL 证书概览，包括自签名、Let's Encrypt 和商用证书。

- **路由**：`POST /ssl`
- **action**：`GetCertList`

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| - | Array&lt;Object&gt; | 证书列表，每项含 `issuer`(颁发者)、`subject`(主题)、`notAfter`(到期日)、`dns`(域名)、`endtime`(剩余天数) |

## 示例

```json
[{"issuer": "R13", "issuer_O": "Let's Encrypt", "notAfter": "2026-08-21", "dns": ["dnstest.cc"], "subject": "dnstest.cc", "endtime": 89}]
```


## get_cert_list

获取面板证书夹中已保存的 SSL 证书列表，包含签发者、到期时间等详细信息。

- **路由**：`POST /ssl`
- **action**：`get_cert_list`

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| - | Array&lt;Object&gt; | 证书列表，每项含 `id`、`hash`、`dns`(域名)、`subject`、`info.issuer`、`info.notAfter`(到期日) |

## 示例

```json
[{"id": 2, "hash": "6da02a66...", "dns": ["dnstest.cc"], "subject": "dnstest.cc", "info": {"issuer": "R13", "notAfter": "2026-08-21"}}]
```

