본문으로 건너뛰기

ReactionCreate

Payload used to create Reaction. Required fields are name, collection_id, condition, actions.

nameName (string)필수

Possible values: non-empty and <= 128 characters, Value must match regular expression ^[a-z][a-z0-9_]{0,127}(?![\s\S])

alias object
하나 이상(anyOf)
string
collection_idCollection Id (string)필수

Parent collection ID (required)

Possible values: non-empty

folder_id object
하나 이상(anyOf)
string
tags object
하나 이상(anyOf)
  • Array [
  • string
  • ]
  • description object
    하나 이상(anyOf)
    string
    condition object필수

    When the reaction fires (required)

    kind필수

    When the reaction fires (required)

    Possible values: [function, ontology, time]

    languageLanguage (string)필수
    상수 값: python
    codeCode (string)필수

    Python function body executed by this action.

    params object

    Bound parameters passed to the function

    property name*any

    Bound parameters passed to the function

    schedule object

    5-field cron; the cadence that wakes the condition (1 min floor). Exactly one of schedule / rrule.

    하나 이상(anyOf)
    string
    rrule object

    iCal RRULE (RFC 5545), e.g. FREQ=MONTHLY;BYDAY=-1FR;BYHOUR=9 — the cadences cron cannot say (last Friday of the month, every other week). A cadence of a day or longer (FREQ DAILY or coarser, at most 24 fires a day); a finer one is a cron schedule. Evaluated in the scheduler's timezone; a DTSTART must carry one. Exactly one of schedule / rrule, same 1 min floor.

    하나 이상(anyOf)
    string
    context object

    Values carried as-is into the payload's context on every firing — which report to run, a threshold, a channel

    property name*any

    Values carried as-is into the payload's context on every firing — which report to run, a threshold, a channel

    schema object

    JSON Schema of the dict run returns; declared, it is what the actions' {{context.*}} references are validated against at save time and the return value at run time

    하나 이상(anyOf)
    object
    actions object[]필수

    Sequential action chain (required)

    Possible values: >= 1

  • Array [
  • 다음 중 하나(oneOf)
    each object

    A list path in the payload the body repeats over — context.rows for an ontology condition, context.parameters.<name> for an Action's many row parameter

    하나 이상(anyOf)
    string
    on_failure object

    Compensating action, run when this action raises. 1-depth only.

    하나 이상(anyOf)
    object

    One chain action of the same kinds, selected by kind (ontology, dataset, function, or notification). A fallback action cannot have its own on_failure.

    kindKind (string)필수
    상수 값: ontology
    editsobject[]필수

    Walker write requests applied in order, in one transaction

    Possible values: >= 1

  • ]
  • ReactionCreate
    {
    "name": "string",
    "alias": "string",
    "collection_id": "string",
    "folder_id": "string",
    "tags": [
    "string"
    ],
    "description": "string",
    "condition": {
    "schedule": "string",
    "rrule": "string",
    "context": {},
    "kind": "ontology",
    "target_id": "string",
    "where": {},
    "set": {},
    "ago": "string",
    "transition": "entry",
    "initial": "seed",
    "changed": [
    "string"
    ],
    "previous": {},
    "function": {
    "language": "python",
    "code": "string",
    "params": {}
    }
    },
    "actions": [
    {
    "each": "string",
    "on_failure": {},
    "kind": "ontology",
    "edits": [
    {}
    ]
    },
    {
    "language": "python",
    "code": "string",
    "params": {},
    "each": "string",
    "on_failure": {},
    "kind": "function"
    },
    {
    "channel": "pipeline",
    "type": "string",
    "collection": "string",
    "resource": "string",
    "message": "string",
    "payload": {},
    "recipients": {
    "users": [
    "string"
    ],
    "groups": [
    "string"
    ],
    "collection": "string",
    "broadcast": false
    },
    "each": "string",
    "on_failure": {},
    "kind": "notification"
    }
    ]
    }