Skip to main content
This cookbook explains how to dismiss many data rule alerts in a single API call, with one shared reason.

Example Scenario

A data rule has flagged dozens of records. For example, a “Negative Temp Alert” firing on a winter’s worth of ambient-temperature data points. After reviewing them with your site engineer, you’ve confirmed they’re expected and want to dismiss them all at once with a single reason, while preserving the audit trail.
Dismissing an alert only changes how it is surfaced. It never edits the underlying data point or model run. The dismissal holds when the record is edited or recalculated, so the rule does not raise that alert again. It resets only when the rule gets a new version, for example after its condition or effective dates change; the new version’s alerts get new rule-result IDs. See Managing alerts for the full alert lifecycle.

How it works

Every rule alert is backed by a rule result with its own friendly ID: The Bulk dismiss rule results endpoint takes a list of these IDs plus one reason, and dismisses them in a single transaction. You can mix dpres_ and mrres_ IDs in the same request.
Pass rule-result IDs (dpres_..., mrres_...), not data point (in_...), event (evt_...), or model run (mr_...) IDs. The rule-result ID is the id on each entry in a record’s rule_results array.
The call is all-or-nothing: if the reason is blank, the list is empty, or any ID is unknown to the project or points at a passing result, nothing is dismissed and the API returns 422. Already-dismissed results are a no-op, so retrying a request is safe.
A single call accepts at most 1000 rule-result IDs, counted after duplicates are removed. Split a larger triage into successive calls; the examples below do this for you. Each call is its own transaction, so a failure part-way through leaves earlier chunks dismissed.

Dismissing alerts with code

1

Prerequisites

Before starting, make sure you have:
  • A Mangrove API token with Data Rules read permission to list the results and write permission to dismiss them (the endpoints return 403 otherwise)
  • The project ID containing the alerts
2

Collect the rule-result IDs to dismiss

List the results for the rule you want to triage and filter to the alerts (status=fail), then read the id of each failing result.
curl
Each entry’s id (e.g. dpres_8XF1QtGs79oX9A6k) is what you collect.
Re-list right before dismissing. Recreating or re-saving a rule regenerates its rule-result friendly IDs, so IDs cached from an earlier session can become “Unknown result ids” (422). Always work from a fresh list.
3

Dismiss them

Send up to 1000 IDs and a single reason to the bulk dismiss endpoint.
curl
The response returns every targeted result with its final state, so dismissed entries come back with status: dismissed and the dismissal_reason, dismissed_by, and dismissed_at fields populated.

End-to-end example

This script lists a rule’s failing results, collects their IDs, and dismisses them in chunks of 1000.

Troubleshooting

The split between 404 and 422 is diagnostic: a 404 points at the path or record lookup (wrong project_id, route not reachable), while a 422 is business validation (blank reason, empty list, unknown or passing IDs). If a previously working call starts returning 404, suspect a routing or scoping issue rather than your payload.