upsert_rewrite_rule
Adds or updates a rewrite policy with ordered match groups, evaluated in sequence without short-circuiting. Requires rule metadata and group conditions/actions.
Instructions
Add or update a rewrite policy with ordered MatchGroups. To update, ensure the rule object has an 'id'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule_json | Yes | JSON string specifying Policy metadata. Example: {"name":"Mock API","enabled":true,"priority":100} | |
| groups_json | Yes | JSON string array of MatchGroup objects. Each group has group_key, order, conditions (AND) and actions. Multiple groups are evaluated in order without short-circuiting. |