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 readings. 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 datapoint or model run. If the record is recalculated and the rule still matches, a fresh alert can be raised. 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:| Result type | ID prefix | Raised by |
|---|---|---|
| Data point rule result | dpres_ | Event Data rules |
| Model run rule result | mrres_ | Batch Calculations rules |
reason, and dismisses them in a single transaction. You can mix dpres_ and mrres_ IDs in the same request.
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.
Dismissing alerts with code
Prerequisites
Before starting, make sure you have:
- A Mangrove API token with Data Rules access for the project
- The rules engine feature enabled on your account (the endpoint returns
403otherwise) - The project ID containing the alerts
Collect the rule-result IDs to dismiss
List the results for the rule you want to triage and filter to the alerts (Each entry’s
status=fail), then read the id of each failing result.curl
id (e.g. dpres_8XF1QtGs79oX9A6k) is what you collect.End-to-end example
This script lists a rule’s failing results, collects their IDs, and dismisses them in one request.Troubleshooting
| Response | Meaning | What to do |
|---|---|---|
403 Rules engine feature is not enabled | The rules engine feature is off for the account. | Contact your Mangrove account team to enable it. |
404 record not found | The project ID is wrong, or the route isn’t reachable for this token. | Double-check the project_id in the path and that the token is scoped to that project. |
422 Unknown result ids: ... | One or more IDs don’t belong to the project — often stale IDs after a rule was recreated. | Re-list the rule’s results and rebuild the ID set from the fresh response. |
422 Cannot dismiss passing results: ... | The batch includes a result whose status is pass. | Filter to status=fail (or dismissed) before collecting IDs. |
422 Dismissal reason can't be blank | The reason was empty or whitespace. | Provide a non-empty reason — it’s stored on the audit trail. |