https://aiwebapi.dataify.com/watch/jobs/createPOST| 参数名称 | 参数类型 | 是否必须 | 描述 |
|---|---|---|---|
Authorization | string | 是 | 固定格式:Authorization: Bearer <你的token>。token 在仪表板 → 设置 → Token管理获取。不支持自定义 token 请求头。 |
Content-Type | string | 是 | application/json。 |
{
"url": "<YOUR_API_MONITOR_URL>",
"webhook_url": "<YOUR_API_WEBHOOK_URL>",
"schedule_type": 1,
"interval_seconds": 3600,
"timezone": "UTC",
"country": "US",
"diff_modes": "auto",
"retention_days": 30
}| 参数名称 | 参数类型 | 是否必须 | 描述 |
|---|---|---|---|
url | string | 是 | 合法 HTTP(S) URL,最长 2048;仅允许 80/443 端口,不能含认证信息。 |
webhook_url | string | 否 | 接收变化通知的合法 HTTP(S) URL,最长 2048。 |
schedule_type | integer | 是 | 1 固定间隔,2 Cron。 |
interval_seconds | integer | 条件必填 | schedule_type=1 时必填,范围 60~2592000。 |
cron_expr | string | 条件必填 | schedule_type=2 时必填,五字段 Cron。 |
timezone | string | 否 | IANA 时区,默认 UTC。 |
country | string | 否 | 两位大写国家码,默认 US。 |
selector | string | 否 | 选择器,最长 4096;不传表示整页。 |
selector_type | string | 否 | css(默认)或 xpath。 |
diff_modes | string | 否 | auto(默认)、text 或 json。 |
retention_days | integer | 否 | 0~365,默认 30;0 表示永久保留。 |
headers | string | 否 | JSON 对象序列化字符串,最长 8192,不能含 Host。 |
mask_enabled | integer | 否 | 0 或 1,默认 1。 |
mask_exclude | string | 否 | 最长 512。 |
{
"success": true,
"code": "OK",
"message": "",
"data": {
"id": 1,
"dataify_job_id": "mwj_01K7H**********R3SWNZ6D",
"jdata_job_id": "job_01K7HQ2**********R3SWNZ6D",
"status": 1,
"next_run_at": 1762838400,
"created_at": 1762834800
}
}| 参数名称 | 参数类型 | 描述 |
|---|---|---|
data.id | integer | 任务 ID,后续操作使用。 |
data.dataify_job_id | string | 平台任务 ID,mwj_ 前缀。 |
data.jdata_job_id | string | 中台任务 ID,job_ 前缀。 |
data.status | integer | 1 正常,2 暂停,3 异常。 |
data.next_run_at | integer | 下一次执行时间,Unix 秒。 |
data.created_at | integer | 创建时间,Unix 秒。 |
| HTTP | code | 说明 |
|---|---|---|
| 400 | INVALID_REQUEST | 参数不合法。 |
| 401 | INVALID_API_KEY | Token 缺失或无效。 |
| 402 | INSUFFICIENT_CREDITS | 余额不足。 |
| 403 | CERT_REQUIRED / CN_IP_RESTRICTED | 未实名认证或不支持大陆 IP。 |
| 500 | INTERNAL_ERROR | 服务端异常。 |