Path: API › 计划任务

`POST /crontab`

获取面板中所有网站的域名列表，用于计划任务中关联网站。

## Request body

_Required._

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

## Example request

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

## Code samples

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

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

## Responses

### default

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

#### Example

```json
[
  "http://testapi.bt.local",
  "http://api-test.example.com"
]
```


## get_domain

获取面板中所有网站的域名列表，用于计划任务中关联网站。

- **路由**：`POST /crontab`
- **action**：`get_domain`

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `get_domain` |

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| - | Array&lt;String&gt; | 域名列表 |

## 示例

```json
["http://testapi.bt.local", "http://api-test.example.com"]
```

