Perbarui Forward Schedule.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
|
|
Yes |
|
|
|
No |
Kunci idempotensi opsional untuk permintaan yang tidak aman. |
Path parameters
|
Parameter |
Type |
Required |
Description |
|
|
string |
Yes |
Forward Schedule ID. |
Request body
|
Parameter |
Type |
Required |
Description |
|
|
string |
No |
Nama Schedule baru. |
|
|
string |
No |
Deskripsi Schedule baru. |
|
|
string |
No |
Forward Template ID baru. |
|
|
array |
No |
Menggantikan daftar event awal. |
|
|
object |
No |
Merge memperbarui kebijakan eksekusi. |
|
|
object|null |
No |
Memperbarui trigger policy. Nilai |
|
|
string |
No |
Lingkungan eksekusi baru. |
|
|
object |
No |
Memperbarui metadata secara merge. Nilai |
Contoh permintaan
curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/schedules/sched_019f00112233445566778899aabbccdd' \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekday tech brief",
"trigger_policy": {
"type": "cron",
"expression": "0 9 * * 1-5",
"timezone": "Asia/Shanghai"
}
}'
Contoh respons
HTTP 200 OK
{
"id": "sched_019f00112233445566778899aabbccdd",
"identity_id": "idn_019eabc123",
"template_id": "tmpl_support",
"name": "Weekday tech brief",
"description": "Generate a daily technology news summary",
"status": "active",
"paused_reason": null,
"initial_events": [
{
"type": "user.message",
"content": "Summarize current technology news in five bullet points."
}
],
"execution": {
"session_mode": "new_session",
"max_concurrent_runs": 1,
"max_attempts": 1,
"timeout_ms": 300000
},
"trigger_policy": {
"type": "cron",
"expression": "0 9 * * 1-5",
"timezone": "Asia/Shanghai",
"upcoming_runs_at": ["2026-06-23T01:00:00Z"]
},
"environment_id": "env_019e64e01a137caf953ac2ac7b42ec5c",
"sinks": [],
"metadata": {},
"archived_at": null,
"created_at": "2026-06-22T10:00:00Z",
"updated_at": "2026-06-22T10:30:00Z"
}
Field respons
Mengembalikan objek Schedule yang telah diperbarui.
Kesalahan
|
HTTP |
Type |
Code |
Trigger |
|
400 |
|
|
Trigger policy tidak valid. |
|
400 |
|
|
Request body berisi |
|
404 |
|
|
Schedule tidak ada. |
|
409 |
|
|
Schedule telah diarsipkan. |
Catatan
-
Permintaan pembaruan HTTP tidak mendukung pembaruan
sinks. -
reuse_sessionberarti Forward mengelola Sesi eksekusi tetap untuk Schedule ini; pemanggil tidak dapat menetapkansession_idyang sudah ada secara arbitrer.