Path: API › 网站管理

`POST /site`

获取网站的 PHP 运行目录配置。

## Request body

_Required._

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

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "GetSiteRunPath",
  "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=GetSiteRunPath" \
  --data-urlencode "id=<id>"
```

## Responses

### default

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

#### Example

```json
{
  "runPath": "/",
  "dirs": [
    "/"
  ]
}
```

- `action257.response.default.runPath` (string, optional) — 运行目录路径，`/` 表示根目录
- `action257.response.default.dirs` (array<unknown>, optional) — 可选子目录列表


## GetSiteRunPath

获取网站的 PHP 运行目录配置。

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

## 输入参数

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

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| runPath | String | 运行目录路径，`/` 表示根目录 |
| dirs | Array | 可选子目录列表 |

## 示例

### 响应

```json
{"runPath": "/", "dirs": ["/"]}
```

