id 必传,其余字段按需传;未传字段保持不变,传 "" 表示清空。https://aiwebapi.dataify.com/watch/jobs/updatePOST| 参数名称 | 参数类型 | 是否必须 | 描述 |
|---|---|---|---|
Authorization | string | 是 | 固定格式:Authorization: Bearer <你的YOUR_API_TOKEN>。YOUR_API_TOKEN 可在仪表板 → 设置 → Token 管理获取。不支持自定义 Token 请求头。 |
Content-Type | string | 是 | application/json。 |
{
"id": 1,
"interval_seconds": 1800,
"selector": "main",
"selector_type": "css"
}| 参数名称 | 参数类型 | 是否必须 | 描述 |
|---|---|---|---|
id | integer | 是 | 任务 ID。 |
url | string | 否 | 只能传原 URL,改成其他地址返回 400。 |
webhook_url | string | 否 | 合法 HTTP(S) URL,传 "" 清空。 |
timezone | string | 否 | IANA 时区。 |
country | string | 否 | 两位大写国家码。 |
schedule_type | integer | 否 | 1 固定间隔,2 Cron。 |
interval_seconds | integer | 否 | 范围 60~2592000。 |
cron_expr | string | 否 | 五字段 Cron。 |
selector | string | 否 | 最长 4096;传 "" 表示整页。 |
selector_type | string | 否 | css 或 xpath。 |
diff_modes | string | 否 | auto、text 或 json。 |
retention_days | integer | 否 | 0~365。 |
headers | string | 否 | JSON 字符串,最长 8192,不能含 Host。 |
mask_enabled | integer | 否 | 0 或 1。 |
mask_exclude | string | 否 | 最长 512。 |
country、headers、selector、selector_type、diff_modes 或脱敏配置会清空中台基线,下一次执行重建基线并正常计费。中台拒绝时本地配置不变。{
"success": true,
"code": "OK",
"message": ""
}data 字段,以 success、code 和 message 判断结果。| HTTP | code | 说明 |
|---|---|---|
| 400 | INVALID_REQUEST | 参数不合法、URL 不可修改等。 |
| 401 | INVALID_API_KEY | Token 缺失或无效。 |
| 404 | INVALID_REQUEST | 任务不存在或已删除。 |
| 500 | INTERNAL_ERROR | 服务端异常。 |