Skip to main content

Preview Rule

POST 

/api/v1/rules-v2/preview

Compile a condition and check it exactly as a save would, writing nothing.

Runs the creation pipeline of POST /rules-v2 (compile, parse, the forbidden-keyword and column checks, the matches-everything check and the alert-volume preview) under the same org fence, and stops before the save. A condition the save would refuse comes back with 200 and its reasons in sql_errors or matches_everything, so a builder can show them as the author edits. A body that is not a condition at all is 422.

Request​

Responses​

Successful Response