name必須string
The name for the alert rule. Maximum length of 256 characters.
ownerstring
The ID of the Sentry team or user that owns this alert rule. Can be a numeric ID or a string in the format 'team:<team_id>' or 'user:<user_id>'.
query必須string
An event search query to filter events for the alert. For example, to include only transactions with status code 400, use `http.status_code:400`. Use an empty string for no filter.
datasetstring
The Sentry dataset this query will execute on. Valid values include `events`, `transactions`, `metrics`, `sessions`, and `generic-metrics`. Defaults to `events` if not specified. Refer to Sentry's [Metric Alert Rule Types] documentation for valid configurations.
projects必須array
A list of project slugs to filter by. For metric alerts, this list is typically limited to containing a single project slug.
triggers必須array
List of trigger configurations. Each trigger must specify `label` ('critical' or 'warning'; 'critical' is mandatory), `alertThreshold` (numeric value to trigger), and `actions`. Each action specifies `type` (e.g., 'email', 'slack', 'msteams', 'pagerduty', 'sentry_app', 'sentry_n…
aggregate必須string
The aggregate function used in this alert rule. Valid functions include `count`, `count_unique`, `percentage`, `avg`, `apdex`, `failure_rate`, `p50`, `p75`, `p95`, `p99`, `p100`, and `percentile`. Refer to Sentry's [Metric Alert Rule Types] documentation for valid configurations…
queryTypeinteger
The type of query. If no value is provided, `queryType` defaults based on the specified `dataset`. Supported values: `0` (Error events: event.type:error), `1` (Transaction events: event.type:transaction), `2` (None: for datasets like metrics that don't use this). See Sentry's [M…
eventTypesarray
A list of event types this alert will relate to. Valid values are `default` (for events captured via Capture Message), `error`, and `transaction`.
timeWindow必須integer
The time period in minutes to aggregate over. Supported values: `1` (1 minute), `5` (5 minutes), `10` (10 minutes), `15` (15 minutes), `30` (30 minutes), `60` (1 hour), `120` (2 hours), `240` (4 hours), `1440` (24 hours).
environmentstring
The name of the environment to filter by. If None or omitted, the alert rule applies to all environments.
monitorTypeinteger
Integer representing the monitor type. This determines if the alert rule is actively monitored or monitored based on a specific activation condition. Consult Sentry documentation for specific values and their meanings.