Overview
This set of endpoints allows you to manage rules within a policy:- PATCH - Toggle a rule’s
is_activestatus to enable/disable it - DELETE - Permanently remove a rule from a policy
updated_at timestamp and trigger the dirty flag.
Authentication
Requires a valid session token. Returns401 UNAUTHORIZED if not authenticated.
Toggle Rule Status
PATCH/api/policies/{id}/rules
Enable or disable a rule without deleting it. Inactive rules are skipped during scans.
Path Parameters
UUID of the policy containing the rule
Request Body
The
rule_id of the rule to update (e.g., STRUCTURING_PATTERN)New active state for the rule
true- Enable the rule (will be evaluated in scans)false- Disable the rule (will be skipped in scans)
Example Request
Response
Always
true on successful updateSuccess Response
Error Responses
400 Bad Request
401 Unauthorized
500 Internal Server Error
Delete Rule
DELETE/api/policies/{id}/rules?rule_id={rule_id}
Permanently remove a rule from a policy. This action cannot be undone.
Path Parameters
UUID of the policy containing the rule
Query Parameters
The
rule_id of the rule to delete (e.g., STRUCTURING_PATTERN)Example Request
Response
Always
true on successful deletionSuccess Response
Error Responses
400 Bad Request
401 Unauthorized
404 Not Found
500 Internal Server Error
Side Effects
Both PATCH and DELETE operations trigger the following side effects:Policy Updates
updated_attimestamp is refreshed- Policy
dirtyflag is set totrue(requires rescan)
Rules Count
- PATCH: No change to
rules_count - DELETE: Decrements
rules_countby 1
Use Cases
Temporarily Disable a Rule
If a rule is generating too many false positives, disable it without losing the configuration:Remove Obsolete Rules
Permanently delete rules that are no longer relevant:Bulk Toggle (Multiple Requests)
To enable/disable multiple rules, send parallel PATCH requests:Notes
- Rule
rule_idmust match exactly (case-sensitive) - Deleted rules cannot be recovered - consider disabling instead
- The policy’s
dirtyflag is set after any modification - Inactive rules are completely skipped during scan evaluation
- Rule modifications do not affect historical scan results