Create a rule
Creates a data rule on the project. A rule either flags matching records with an alert, or corrects the matching value by working through a chain of substitution methods.
Evaluation over the rule’s historical range is queued as soon as the rule is saved, so results and corrections land shortly after this call returns rather than during it.
Creating a substitute rule requires corrections to be enabled on the account.
Authorizations
Path Parameters
Body
The rule body on a create or update. On an update, send only the fields you are changing.
Response
201
A data rule on a project. The rule's identity is stable across edits; the condition lives on its latest version.
Rule friendly ID.
"rule_Qb3k9TzdL0pWnXyz"
Derived from action. Read-only.
alert, substitution alert flags the matching record and changes nothing. substitute replaces the matching value with one derived from method_chain. Only data point rules may substitute.
alert, substitute Ordered substitution candidates. The first method that resolves wins. Empty on alert rules.
data_point evaluates event data as it arrives. model evaluates model outputs after a batch calculation.
data_point, model active The condition, in the rule expression language.
"{{data-point.ambient-temperature-c}} < 0"
On an alert rule, narrows which of the values the condition reads may be flagged. On a substitute rule, names the single value the rule corrects.
Shown on the records this rule flags. Required on an alert rule. Optional on a substitute rule, where it covers the records whose method chain resolved nothing, and Mangrove supplies a default.
Model rules only.