Перейти к содержимому

POST /api/v1/runs/schedules

Статус: GA Доступ: по токену контракт API: 0.3.0 · capability 2026-09-03.1 Открыть как Markdown Открыть в Claude Открыть в ChatGPT

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>"}'

В контракте нет примера для этого ответа; схема: RunScheduleRead. Поля — в интерактивном обозревателе.

RunScheduleRead — Successful Response

ПолеТипОписание
cronstring
enabledboolean
entitystring
guidinteger
last_fire_summaryobject
last_fired_atstring | null
max_targets_per_fireinteger
modestring
namestring
next_fire_atstring | null
paramsobject
pipeline_idstring
selectorobject
stepsмассив string | null
ПараметрГдеОбязателенТипПо умолчаниюОграниченияОписание
Idempotency-Keyheaderнетstring—uuidOptional.
ПолеТипОбязательноОписание
cronstringда
enabledbooleanнет
entitystringда
max_targets_per_fireintegerнет
modestringнет
namestringда
paramsobjectнет
pipeline_idstringда
selectorobjectда
stepsмассив string | nullнет
КодСмыслТело
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

Тело любой ошибки — {detail, code?, request_id, doc_url}: request_id — что цитировать, doc_url ведёт в Справочник ошибок.