API
Compile and save instruction
Compile a Watch DSL script and persist it as an instruction for transaction evaluation.
/compile-and-save-instructionUse this endpoint to compile a Watch DSL script and save it as an instruction. Once saved, Watch evaluates incoming transactions against the compiled rule. For DSL syntax and examples, see Watch rule examples.
Body
scriptstring
The Watch DSL script to compile. The rule name is extracted from the script and must be unique across instructions.
Response
idinteger
Auto-generated instruction ID. Use this with get instruction and delete instruction.
namestring
Unique rule name extracted from the DSL script.
textstring
Original Watch DSL script text.
descriptionstring
Rule description from the DSL script, if provided.
dsl_jsonstring
Compiled rule JSON used during transaction evaluation.
created_atstring
ISO 8601 timestamp of when the instruction was created.
updated_atstring
ISO 8601 timestamp of when the instruction was last updated.