manage_suppression_rule
Add, retarget, remove or dry-run one suppression rule of the caller's account, chosen by action. A matched issue keeps recording events and keeps its status while staying out of the default list and out of every notification. To silence a set of issues: call this with action=preview and the match and conditions, read the sample back to the person (call again with page=1 and the same match and conditions when issuesMatched is larger than one page), then call this with action=create and that same match and those same conditions, then call list_suppression_rules to see how much the new rule covers. A rule the account already holds is refused, so read the existing rules before adding one. To retarget a rule that is too wide, too narrow or simply wrong: call list_suppression_rules to read the rule ids, their conditions and their coverage, call this with action=preview and the match and conditions you mean to move it to, then call this with action=update, the id and that same match and those same conditions; a rule is replaced whole, so send every condition it should keep, and it keeps its id, its author and the day it was added. To remove a rule: call list_suppression_rules for the id, then call this with action=delete and that id. On update and delete, issues the old conditions hid return to the list at once and alert again on their next event; nothing is resent for issues that stay quiet, cards withheld while the rule was in force are not resent, and the answer reports how many issues are now waiting to alert again as rearmedIssues. A preview stores nothing and changes no issue: its answer holds how many issues the conditions match, how many of those were seen in the last day, and one page of matching issues, most recently seen first. To silence a single issue instead (the app calls this suppressing one issue), call set_issue_status with IGNORED. A rule holds one to five conditions and one operator: match="all" covers an issue only when every condition holds, match="any" covers it as soon as one does. A rule of one condition has nothing to join, so it is stored and answered as match="all" whichever operator you sent. A condition is a field and a value. Every field matches the whole value, case insensitive, and a star stands for any run of characters: service notifier names that one service, exceptionType java.net.* names every type under java.net, title timed out names every title carrying that phrase, level warn names every issue recorded at that severity. An ENVIRONMENT condition matches an issue that has been seen in a deployment environment matching the value, so a rule naming one environment covers the whole issue, not only that environment's rows. A value of only stars is refused. To narrow, write match="all" with conditions [{"field":"SERVICE","value":"notifier"},{"field":"ENVIRONMENT","value":"staging"},{"field":"LEVEL","value":"warn"}], which covers the notifier service's warnings in staging and nothing else. To widen, write match="any" with conditions [{"field":"EXCEPTION_TYPE","value":"com.slack."},{"field":"EXCEPTION_TYPE","value":"io.netty."}], which covers both libraries. A condition can be negated: to cover everything from payments except timeouts, write match="all" with conditions [{"field":"SERVICE","value":"payments"},{"field":"EXCEPTION_TYPE","value":"java.util.concurrent.TimeoutException","negated":true}], and an issue carrying no exception type at all counts as not a timeout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The rule id (from list_suppression_rules); needed by update and delete, ignored by create and preview | |
| page | No | preview only: page of matching issues to read, 0 to 1000 (default 0); a page beyond that is refused | |
| size | No | preview only: issues per page, 1 to 50 (default 10) | |
| match | No | all or any; needed by create, update and preview | |
| action | Yes | create, update, delete or preview | |
| conditions | No | One to five conditions, each a field (SERVICE, ENVIRONMENT, EXCEPTION_TYPE, TITLE or LEVEL), a value of 1 to 200 characters in which a star stands for any run of characters, and an optional negated flag, false unless you send it, which turns the condition into is not; needed by create, update and preview |