본문으로 건너뛰기

FunctionAction

Shared request and response schema. Request: Python-only reaction action accepted with executable code and input values. The return value is ignored, so the action is used for side effects. Response: Python-only reaction action returned with executable code and input values. The return value is ignored, so the action is used for side effects.

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

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)필수
상수 값: function
FunctionAction
{
"language": "python",
"code": "string",
"params": {},
"each": "string",
"on_failure": {},
"kind": "function"
}