---
title: "Update an existing alert rule."
method: PUT
path: "/v1/provisioning/alert-rules/{UID}"
tags: ["provisioning"]
deprecated: true
---

# Update an existing alert rule.

`PUT /v1/provisioning/alert-rules/{UID}`

> **Deprecated.**

## Path parameters

- `UID` string, required

## Headers

- `X-Disable-Provenance` string

## Request body

- ProvisionedAlertRule
  - `annotations` object
  - `condition` string, required
  - `data` AlertQuery[], required
    - `datasourceUid` string — Grafana data source unique identifier; it should be '__expr__' for a Server Side Expression operation.
    - `model` object — JSON is the raw JSON query and includes the above properties as well as custom properties.
    - `queryType` string — QueryType is an optional identifier for the type of query. It can be used to distinguish different types of queries.
    - `refId` string — RefID is the unique identifier of the query, set by the frontend call.
    - `relativeTimeRange` RelativeTimeRange — RelativeTimeRange is the per query start and end time for requests.
      - `from` integer — A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
      - `to` integer — A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
  - `execErrState` 'OK' | 'Alerting' | 'Error', required
  - `folderUID` string, required
  - `for` string, duration, required
  - `id` integer
  - `isPaused` boolean
  - `keep_firing_for` string, duration
  - `labels` object
  - `missingSeriesEvalsToResolve` integer
  - `noDataState` 'Alerting' | 'NoData' | 'OK', required
  - `notification_settings` AlertRuleNotificationSettings
    - `active_time_intervals` string[] — Override the times when notifications should not be muted. These must match the name of a mute time interval defined in the alertmanager configuration time_intervals section. All notifications will be suppressed unless they are sent at the time that matches any interval.
    - `group_by` string[] — Override the labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping. Must include 'alertname' and 'grafana_folder' if not using '...'.
    - `group_interval` string — Override how long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)
    - `group_wait` string — Override how long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)
    - `mute_time_intervals` string[] — Override the times when notifications should be muted. These must match the name of a mute time interval defined in the alertmanager configuration time_intervals section. When muted it will not send any notifications, but otherwise acts normally.
    - `receiver` string, required — Name of the receiver to send notifications to.
    - `repeat_interval` string — Override how long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more). Note that this parameter is implicitly bound by Alertmanager's `--data.retention` configuration flag. Notifications will be resent after either repeat_interval or the data retention period have passed, whichever occurs first. `repeat_interval` should not be less than `group_interval`.
  - `orgID` integer, required
  - `provenance` string
  - `record` Record
    - `from` string, required — Which expression node should be used as the input for the recorded metric.
    - `metric` string, required — Name of the recorded metric.
    - `target_datasource_uid` string — Which data source should be used to write the output of the recording rule, specified by UID.
  - `ruleGroup` string, required
  - `title` string, required
  - `uid` string
  - `updated` string, date-time

## Response `200`

ProvisionedAlertRule

- ProvisionedAlertRule
  - `annotations` object
  - `condition` string, required
  - `data` AlertQuery[], required
    - `datasourceUid` string — Grafana data source unique identifier; it should be '__expr__' for a Server Side Expression operation.
    - `model` object — JSON is the raw JSON query and includes the above properties as well as custom properties.
    - `queryType` string — QueryType is an optional identifier for the type of query. It can be used to distinguish different types of queries.
    - `refId` string — RefID is the unique identifier of the query, set by the frontend call.
    - `relativeTimeRange` RelativeTimeRange — RelativeTimeRange is the per query start and end time for requests.
      - `from` integer — A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
      - `to` integer — A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
  - `execErrState` 'OK' | 'Alerting' | 'Error', required
  - `folderUID` string, required
  - `for` string, duration, required
  - `id` integer
  - `isPaused` boolean
  - `keep_firing_for` string, duration
  - `labels` object
  - `missingSeriesEvalsToResolve` integer
  - `noDataState` 'Alerting' | 'NoData' | 'OK', required
  - `notification_settings` AlertRuleNotificationSettings
    - `active_time_intervals` string[] — Override the times when notifications should not be muted. These must match the name of a mute time interval defined in the alertmanager configuration time_intervals section. All notifications will be suppressed unless they are sent at the time that matches any interval.
    - `group_by` string[] — Override the labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping. Must include 'alertname' and 'grafana_folder' if not using '...'.
    - `group_interval` string — Override how long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)
    - `group_wait` string — Override how long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)
    - `mute_time_intervals` string[] — Override the times when notifications should be muted. These must match the name of a mute time interval defined in the alertmanager configuration time_intervals section. When muted it will not send any notifications, but otherwise acts normally.
    - `receiver` string, required — Name of the receiver to send notifications to.
    - `repeat_interval` string — Override how long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more). Note that this parameter is implicitly bound by Alertmanager's `--data.retention` configuration flag. Notifications will be resent after either repeat_interval or the data retention period have passed, whichever occurs first. `repeat_interval` should not be less than `group_interval`.
  - `orgID` integer, required
  - `provenance` string
  - `record` Record
    - `from` string, required — Which expression node should be used as the input for the recorded metric.
    - `metric` string, required — Name of the recorded metric.
    - `target_datasource_uid` string — Which data source should be used to write the output of the recording rule, specified by UID.
  - `ruleGroup` string, required
  - `title` string, required
  - `uid` string
  - `updated` string, date-time

## Other responses

- `400` — ValidationError
- `403` — ForbiddenError

---

[API](https://skmtc.net/grafana/apis/http-api.md) · [All operations](https://skmtc.net/grafana/apis/http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/grafana/http-api/versions/df55ba1718ba/schema)
