POST /api/v1/runs/schedules
Create Schedule
create a schedule (validates pipeline + cron; computes next_fire_at).
Авторизация: нужен Authorization: Bearer <token>
curl -sS -X POST "https://entherium.duckdns.org:8443/api/v1/runs/schedules" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"cron":"<cron>","enabled":"<enabled>","entity":"<entity>","max_targets_per_fire":"<max_targets_per_fire>","mode":"<mode>","name":"<name>","params":"<params>","pipeline_id":"<pipeline_id>","selector":"<selector>","steps":"<steps>"}'Ответ 201
Заголовок раздела «Ответ 201»В контракте нет примера для этого ответа; схема: RunScheduleRead. Поля — в интерактивном обозревателе.
Возвращает
Заголовок раздела «Возвращает»RunScheduleRead — Successful Response
| Поле | Тип | Описание |
|---|---|---|
cron | string | |
enabled | boolean | |
entity | string | |
guid | integer | |
last_fire_summary | object | |
last_fired_at | string | null | |
max_targets_per_fire | integer | |
mode | string | |
name | string | |
next_fire_at | string | null | |
params | object | |
pipeline_id | string | |
selector | object | |
steps | массив string | null |
Параметры
Заголовок раздела «Параметры»| Параметр | Где | Обязателен | Тип | По умолчанию | Ограничения | Описание |
|---|---|---|---|---|---|---|
Idempotency-Key | header | нет | string | — | uuid | Optional. |
Тело запроса
Заголовок раздела «Тело запроса»| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
cron | string | да | |
enabled | boolean | нет | |
entity | string | да | |
max_targets_per_fire | integer | нет | |
mode | string | нет | |
name | string | да | |
params | object | нет | |
pipeline_id | string | да | |
selector | object | да | |
steps | массив string | null | нет |
| Код | Смысл | Тело |
|---|---|---|
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
Тело любой ошибки — {detail, code?, request_id, doc_url}: request_id — что цитировать, doc_url ведёт в Справочник ошибок.