Update a rule
Beta. The request and response shapes may still change.
Overwrite a rule in place. The body is the whole rule, not a patch: what you omit is cleared.
The new expression is compiled before it is stored. It is not re-checked against the recipes already scoring over this rule, so an edit that drops an attribute or parameter reference is accepted here and the rule is reported as unavailable at evaluation time. Re-save the recipe to validate the association.
name and expression are required, and the stored rule becomes exactly what you send.
The identifier does not change, so every recipe already scoring over this rule picks up the new condition on its next evaluation. There is no versioning at the rule level.
Editing a rule a recipe depends on
The new expression is compiled against the latest catalog, on its own - not against the recipes that score over it. An edit that starts readingsignal.ext.cart_total is accepted here even if no request sends that key.
At evaluation time such a rule can’t compile in that recipe’s environment. It reports unavailable and contributes nothing, and the recipe reports partial_evidence. Re-saving the recipe is what checks the pair, and it is the fastest way to confirm an edit landed cleanly.
Sending an update to a managed rule’s identifier answers 403 - managed_rule_read_only.Authorizations
Body
The condition, written in CEL. It must evaluate to a boolean, and it is compiled before it is stored: an expression that does not compile is refused.
It may reference the signals Prelude resolves for an evaluation, the signals your evaluation request sends as signal.ext.<key>, and a recipe's configured values as param.<key>. A rule reading a param. name can only be used by the recipes configuring it. See Rules, recipes and flows; the signal vocabulary is not published yet, so contact us for the names available to your rules.
"signal.ext.plan_tier == \"free\""
Response
OK