Path: 宝塔面板 API 参考 › Proxy 反向代理

`POST /mod/proxy/com/get_domain_list/stype`

获取站点的所有绑定域名及其健康状态、HTTPS 端口信息。

## Request body

_Required._

- `opPostModProxyComGetDomainListStype.request_time` (string, required) — Unix 时间戳；与接口密钥一起生成 request_token。
- `opPostModProxyComGetDomainListStype.request_token` (string, required) — 按 API 概览中的双重 MD5 签名算法生成。
- `opPostModProxyComGetDomainListStype.id` (integer, required) — 站点 ID
- `opPostModProxyComGetDomainListStype.site_name` (string, required) — 站点名称

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "id": 0,
  "site_name": "string"
}
```

## Code samples

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

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

## Responses

### default

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

#### Example

```json
{
  "status": true,
  "data": {
    "domain_list": [
      {
        "name": "example.com",
        "port": 80,
        "healthy": 1
      },
      {
        "name": "www.example.com",
        "port": 80,
        "healthy": 1
      }
    ],
    "https_port": "443"
  }
}
```

- `opPostModProxyComGetDomainListStype.response.default.domain_list` (array<unknown>, optional) — 域名列表，每项含 name, port，healthy=0 表示域名不在 JSON 配置中
- `opPostModProxyComGetDomainListStype.response.default.https_port` (string, optional) — HTTPS 端口号，未开启 SSL 时返回 `未开启HTTPS`


## get_domain_list

获取站点的所有绑定域名及其健康状态、HTTPS 端口信息。

- **路由**：`POST /mod/proxy/com/get_domain_list/stype`
- **action**：`get_domain_list`

## 输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| id | 是 | int | 站点 ID |
| site_name | 是 | string | 站点名称 |

## 输出参数
| 参数名称 | 类型 | 描述 |
|----------|------|------|
| domain_list | list | 域名列表，每项含 name, port，healthy=0 表示域名不在 JSON 配置中 |
| https_port | string | HTTPS 端口号，未开启 SSL 时返回 `未开启HTTPS` |

## 示例

### 响应
```json
{
  "status": true,
  "data": {
    "domain_list": [
      {"name": "example.com", "port": 80, "healthy": 1},
      {"name": "www.example.com", "port": 80, "healthy": 1}
    ],
    "https_port": "443"
  }
}
```

