Path: API › 网站管理

`POST /site`

获取指定网站的子目录（二级域名）绑定列表。

## Request body

_Required._

- `action242.request_time` (string, required) — Unix 时间戳。
- `action242.request_token` (string, required) — 按 API 概览生成的签名。
- `action242.action` (string, required) — 具体操作名称。
  - one of `"GetDirBinding"`
- `action242.id` (integer, required) — 网站 ID

## Example request

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

## Code samples

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

```curl
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=GetDirBinding" \
  --data-urlencode "id=<id>"
```

## Responses

### default

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

#### Example

```json
{
  "run_path": "/",
  "dirs": [],
  "binding": []
}
```

- `action242.response.default.run_path` (string, optional) — 运行目录路径
- `action242.response.default.dirs` (array<unknown>, optional) — 可选子目录列表
- `action242.response.default.binding` (array<unknown>, optional) — 已绑定的子目录列表


## GetDirBinding

获取指定网站的子目录（二级域名）绑定列表。

- **路由**：`POST /site`
- **action**：`GetDirBinding`

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `GetDirBinding` |
| id | 是 | Integer | 网站 ID |

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| run_path | String | 运行目录路径 |
| dirs | Array | 可选子目录列表 |
| binding | Array | 已绑定的子目录列表 |

## 示例

```json
{"run_path": "/", "dirs": [], "binding": []}
```

