본문으로 건너뛰기

OntologyCondition

Shared request and response schema. Request: Ontology trigger condition accepted in a request. target_id names the subject entity or relation type whose row the trigger carries, where declares the membership predicate, and evaluation selects whether the condition wakes on a row event or on a schedule occurrence. Response: Ontology trigger condition returned by the API, reporting the subject type, the membership predicate, the trigger source, and the read-only engine derived from the declaration.

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

kindKind (string)필수
상수 값: ontology
target_idTarget Id (string)필수

Subject EntityType.id or RelationType.id

where object

Membership predicate written as one nested expression. Every node takes the form {operator: arguments}: and, or, and not combine nodes; the comparisons eq, ne, gt, gte, lt, lte, in, not_in, contains, starts_with, and ends_with take a column reference and either a literal, another column, or a relative time such as {"now": "-7d"}; the aggregates count, sum, min, and max are allowed as the left operand of an ordered or equality comparison; and exists traverses a relation, with absence expressed by not. Omit this field to match every subject event.

하나 이상(anyOf)
object
set object

A walker definition (from + ops[] — D2) whose TERMINAL type is the subject; the matching set is its materialization. A where beside it screens the materialized rows.

하나 이상(anyOf)
object

Ontology set definition: from and optional ops, without a terminal. Its shape is the definition part of the Execute Ontology Request body (POST /api/v1/ontologies/execute).

ago object

The past reading {"ago": col} operands read — "7d" · "12h" · "30m". Bounded by the mirror's retention at save time.

하나 이상(anyOf)
string
transitionTransition (string)

Which set transition fires: entry — in the set now, not at the cursor; exit — the reverse, the payload row is the last member state; change — a member at both whose changed columns differ, the payload carries previous. Exits and changes fail closed without a cursor.

Possible values: [entry, exit, change]

기본값: entry
initialInitial (string)

What the first evaluation does when there is no cursor yet (a new reaction, or an edited condition): seed records the current members and fires nothing, fire fires every current member as an entry. fire is for transition='entry' only — exit and change have no transition to fire without a previous evaluation.

Possible values: [seed, fire]

기본값: seed
changed object

change only: the columns whose value change fires (any-of)

하나 이상(anyOf)
  • Array [
  • string
  • ]
  • previous object

    change only: a where over the cursor-time row — columns against literals (no hops, now, column operands or ago)

    하나 이상(anyOf)
    object
    function object

    Optional function-backed gate evaluated after the declarative predicate and immediately before the action chain. It applies to subject-scoped triggers only, and a false result acknowledges the event and skips the actions.

    하나 이상(anyOf)
    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

    OntologyCondition
    {
    "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": {}
    }
    }