agency-board
POST /v1/agency/boards/{boardId}/automations
Create a rule — when this happens, only if that, then do these.
Аутентификация
API кілтін bearer токені ретінде жіберіңіз. Бұл соңғы нүкте сипаттамада арнайы рұқсатты көрсетпейді, сондықтан болжағаннан гөрі кілтіңізге қажетті ең аз рұқсатты беріп, жауапты тексеріңіз.
Бұл соңғы нүкте ұйым идентификаторын қабылдамайды. Сіздің кілтіңіз оның қай ұйымға тиесілі екенін өзі анықтайды және жауап соған шектеледі.
Әрекет етіп көру
Бұрыштық жақшалардағы кез келген нәрсені өз мәндеріңізбен, ал кілт орналастырушысын басқару тақтасынан алынған кілтпен алмастырыңыз.
curl -X POST https://api.zinndigital.com/v1/agency/boards/{boardId}/automations \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "trigger": <string> }'Жүйеге кіргенсіз бе? Бақылау тақтасындағы API консолі ұйымыңыздың нақты идентификаторы мен жеке кілтіңізді автоматты түрде толтырады да, нақты жауапты көре алуыңыз үшін сұрауды тікелей жұмыс істеп тұрған API арқылы орындайды. Бұл соңғы нүктені API консолінде ашыңыз
Мәліметтер
Validated against the catalogue at save time, not at run time. A rule pairing a card action with a trigger that carries no card, naming a context field its trigger does not publish, or using an operator the field's type cannot take is refused here with the offending clause named — because the alternative is a rule that sits in the list looking enabled and does nothing for ever, whose only evidence is an absence.
Параметрлер
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
boardId (path) | Uuid | Иә | Project board ID (UUIDv7). |
Сұрау денесі
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
name | string | Иә | — |
description | string | Жоқ | — |
trigger | string | Иә | — |
trigger_config | object | Жоқ | Per-trigger settings, e.g. `hours_before` for "due date approaching". |
conditions | BoardAutomationCondition[] | Жоқ | ANDed. An empty list means the rule always matches its trigger. |
actions | BoardAutomationAction[] | Жоқ | — |
status | string<enabled, disabled> | Жоқ | — |
position | integer | Жоқ | — |
Жауап
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
id | Uuid | Иә | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
board_id | Uuid | Иә | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Иә | — |
description | string | Жоқ | — |
trigger | string | Иә | — |
trigger_config | object | Жоқ | — |
conditions | BoardAutomationCondition[] | Жоқ | — |
actions | BoardAutomationAction[] | Жоқ | — |
status | BoardAutomationStatus | Иә | `suspended` means WE paused it after repeated failure and it carries a reason the customer has not read. It is a third state rather than a reuse of `disabled`, because collapsin… |
position | integer | Жоқ | — |
run_count | integer | Жоқ | — |
fired_count | integer | Жоқ | — |
consecutive_failures | integer | Жоқ | — |
suspended_reason | string | Жоқ | Why we paused this rule, in authored copy from a closed table — never an exception, a status or a message from our own code. The per-failure detail lives on each run (`action_re… |
suspended_at | string | Жоқ | — |
last_fired_at | string | Жоқ | — |
last_run_at | string | Жоқ | — |
next_due_at | string | Жоқ | Only set for a wall-clock rule. Null for a rule on a live act. |
created_at | string | Жоқ | — |
updated_at | string | Жоқ | — |
Бұл соңғы нүкте қайтара алатын қателер
401 · 403 · 404 · 422