Path: API › 网站管理

`POST /site`

获取或设置网站的 TLS 协议版本开关。

## Request body

_Required._

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

## Example request

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

## Code samples

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

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

## Responses

### default

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

#### Example

```json
{
  "status": true,
  "msg": "设置成功"
}
```

- `TLSv1` (`action294.response.default.TLSv1`; boolean, optional) — TLS 1.0 开关
- `1` (`action294.response.default.TLSv1.1`; boolean, optional) — TLS 1.1 开关
- `2` (`action294.response.default.TLSv1.2`; boolean, optional) — TLS 1.2 开关
- `3` (`action294.response.default.TLSv1.3`; boolean, optional) — TLS 1.3 开关


## get_ssl_protocol

## get_ssl_protocol / set_ssl_protocol

获取或设置网站的 TLS 协议版本开关。

- **路由**：`POST /site`
- **action**：`get_ssl_protocol` 或 `set_ssl_protocol`

## get_ssl_protocol

### 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | `get_ssl_protocol` |

### 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| TLSv1 | Boolean | TLS 1.0 开关 |
| TLSv1.1 | Boolean | TLS 1.1 开关 |
| TLSv1.2 | Boolean | TLS 1.2 开关 |
| TLSv1.3 | Boolean | TLS 1.3 开关 |

### 响应

```json
{"TLSv1": false, "TLSv1.1": true, "TLSv1.2": true, "TLSv1.3": true}
```

## set_ssl_protocol

### 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | `set_ssl_protocol` |
| TLSv1 | 否 | String | `"true"` / `"false"` |
| TLSv1.1 | 否 | String | `"true"` / `"false"` |
| TLSv1.2 | 否 | String | `"true"` / `"false"` |
| TLSv1.3 | 否 | String | `"true"` / `"false"` |

### 响应

```json
{"status": true, "msg": "设置成功"}
```

