agency-board
POST /v1/agency/boards/{boardId}/automations
Create a rule — when this happens, only if that, then do these.
Баталгаажуулалт
API түлхүүрийг bearer token хэлбэрээр илгөэнэ үү. Энэхүү төгсгөлийн цэг нь тодорхойлолтдоо тодорхой зөвшөөрлийг заагаагүй тул түлхүүрээрээ шаардагдах хамгийн бага эрхийг өгч, таамаглахаас илүүтэйгээр хариуг шалгана уу.
Энэ төгсгөл цэг нь ямар ч байгууллагын ID шаардахгүй. Таны түлхүүр аль хэдийн харьяалагдах байгууллагыг тодорхойлж байгаа бөгөөд хариу нь тухайн байгууллагын хүрээнд хязгаарлагдана.
Туршиж үзэх
Өнцөг хаалтанд байгаа бүх зүйлийг өөрийн утгаар солиж, түлхүүр санамж байрлуулагчийг хяналтын самбарынхаа түлхүүрээр сольж оруулна уу.
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 консол нь таны бодит байгууллагын ID болон өөрийн түлхүүрийг автоматаар бөглөж, шууд ажиллаж буй 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.
Параметрүүд
| Нэр | Төрөл | Заавал шаардлагатай | Энэ юу вэ |
|---|---|---|---|
boardId (path) | Uuid | Тийм | Project board ID (UUIDv7). |
Хүсэлтийн бие
| Нэр | Төрөл | Заавал шаардлагатай | Энэ юу вэ |
|---|---|---|---|
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 | Үгүй | — |
Хариу үйлдэл
| Нэр | Төрөл | Заавал шаардлагатай | Энэ юу вэ |
|---|---|---|---|
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