---
title: "Gets a single alert rule by its ID."
method: GET
path: "/alerts/rules/{id}"
tags: ["Alerts"]
---

# Gets a single alert rule by its ID.

`GET /alerts/rules/{id}`

## Request

- Base URL: `https://api.reveldigital.com`
- URL: `https://api.reveldigital.com/alerts/rules/{id}`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://id.reveldigital.com/connect/authorize`
    - Token URL: `https://id.reveldigital.com/connect/token` scopes: `webapi`
  - API key in header `X-RevelDigital-ApiKey`
  - API key in query parameter `api_key`
- TypeScript: <https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/docs/alerts/rules/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the full alert rule, including its rule set, device/user associations,
and audit timestamps. The rule must belong to the authenticated account.
Requires the `AlertRules_View` securable.

## Path parameters

- `id` string, required

## Response `200`

The requested alert rule.

- AlertRule: Full alert rule model. An alert rule defines the conditions that trigger alerts.
  - `id` string, nullable: The alert rule id (encrypted)
  - `name` string, nullable: The name of the alert rule
  - `rule_set` string, nullable: The rule set configuration as a JSON string. See AlertRuleInput.ruleSet for the full schema, supported condition types, operators, and value semantics.
  - `is_enabled` boolean, nullable: Indicates whether the alert rule is currently enabled and will be evaluated. When false, the rule is stored but never triggers alerts.
  - `period` integer, nullable: The look-back / evaluation period, in minutes, used by time-window based conditions.
  - `threshold` integer, nullable: A legacy scalar threshold value retained for backward compatibility. Thresholds for new rules are expressed inside the rule set (AlertRuleInput.ruleSet) via each item's "value" instead.
  - `webhook_url` string, nullable: Optional HTTPS webhook URL that is invoked (HTTP POST) when the rule triggers.
  - `all_devices` boolean, nullable: When true, the rule is evaluated against every device in the account and RevelDigital.Core.PublicApi.Models.AlertRule.DeviceIds is empty. When false, only RevelDigital.Core.PublicApi.Models.AlertRule.DeviceIds are evaluated.
  - `all_users` boolean, nullable: When true, all users in the account are notified and RevelDigital.Core.PublicApi.Models.AlertRule.UserIds is empty. When false, only the users in RevelDigital.Core.PublicApi.Models.AlertRule.UserIds are notified.
  - `created_on` string, date-time, nullable: The date and time the alert rule was created
  - `updated_on` string, date-time, nullable: The date and time the alert rule was last updated
  - `device_ids` string[], nullable: The devices explicitly associated with the rule (encrypted ids). Empty when RevelDigital.Core.PublicApi.Models.AlertRule.AllDevices is true.
  - `user_ids` string[], nullable: The users explicitly notified by the rule (encrypted ids). Empty when RevelDigital.Core.PublicApi.Models.AlertRule.AllUsers is true.

## Other responses

- `401`: The API key is missing or invalid.
- `403`: The caller lacks the AlertRules_View securable.
- `404`: No alert rule with the given ID exists for this account.

---

[API](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api.md) - [All operations](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/revisions/39d5c8302822?raw)
