---
title: "Alerting Provisioning HTTP API | Grafana documentation"
description: "Grafana Alerts HTTP API"
---

# Alerting provisioning HTTP API

> Note
> 
> Starting in Grafana 13, `/api` endpoints are being deprecated in favor of the `/apis` route. Note that while Grafana is working on migrating existing APIs, currently there may not be an exact match to the legacy API you’re using.
> 
> **This change doesn’t disrupt or break your current setup**. Legacy APIs are not being disabled and remain fully accessible and operative, but `/api` routes will no longer be updated.
> 
> To learn more refer to the [new API structure in Grafana](/docs/grafana/latest/developer-resources/api-reference/http-api/apis/).

The Alerting Provisioning HTTP API can be used to create, modify, and delete resources relevant to Grafana-managed alerts. This API is the one used by our [Grafana Terraform provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs).

For more information on the differences between Grafana-managed and data source-managed alerts, refer to [Introduction to alert rules](/docs/grafana/latest/alerting/fundamentals/alert-rules/).

> If you are running Grafana Enterprise, you need to add specific permissions for some endpoints. For more information, refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/).

## Grafana-managed endpoints

> Note
> 
> In the Alerting provisioning HTTP API, the endpoints use a JSON format that differs from the format returned by the `export` endpoints.
> 
> The `export` endpoints allow you to export alerting resources in a JSON format suitable for [provisioning via files](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/). However, this format cannot be used to update resources via the HTTP API.

### Alert rules

The following endpoints can be used to manage both alert rules and recording rules. To create a recording rule, include a `record` block in your request instead of a `condition` field.

Expand table

| Method | URI                                                              | Name                                                                    | Summary                                                 |
|--------|------------------------------------------------------------------|-------------------------------------------------------------------------|---------------------------------------------------------|
| DELETE | /api/v1/provisioning/alert-rules/:uid                            | [route delete alert rule](#route-delete-alert-rule)                     | Delete a specific alert rule by UID.                    |
| GET    | /api/v1/provisioning/alert-rules/:uid                            | [route get alert rule](#route-get-alert-rule)                           | Get a specific alert rule by UID.                       |
| POST   | /api/v1/provisioning/alert-rules                                 | [route post alert rule](#route-post-alert-rule)                         | Create a new alert rule.                                |
| PUT    | /api/v1/provisioning/alert-rules/:uid                            | [route put alert rule](#route-put-alert-rule)                           | Update an existing alert rule.                          |
| GET    | /api/v1/provisioning/alert-rules/:uid/export                     | [route get alert rule export](#route-get-alert-rule-export)             | Export an alert rule in provisioning file format.       |
| DELETE | /api/v1/provisioning/folder/:folderUid/rule-groups/:group        | [route delete alert rule group](#route-delete-alert-rule-group)         | Delete a rule group.                                    |
| GET    | /api/v1/provisioning/folder/:folderUid/rule-groups/:group        | [route get alert rule group](#route-get-alert-rule-group)               | Get a rule group.                                       |
| PUT    | /api/v1/provisioning/folder/:folderUid/rule-groups/:group        | [route put alert rule group](#route-put-alert-rule-group)               | Create or update a rule group.                          |
| GET    | /api/v1/provisioning/folder/:folderUid/rule-groups/:group/export | [route get alert rule group export](#route-get-alert-rule-group-export) | Export an alert rule group in provisioning file format. |
| GET    | /api/v1/provisioning/alert-rules                                 | [route get alert rules](#route-get-alert-rules)                         | Get all the alert rules.                                |
| GET    | /api/v1/provisioning/alert-rules/export                          | [route get alert rules export](#route-get-alert-rules-export)           | Export all alert rules in provisioning file format.     |

**Example request for new alert rule:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
POST /api/v1/provisioning/alert-rules
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

{
  "title": "TEST-API_1",
  "ruleGroup": "API",
  "folderUID": "SET_FOLDER_UID",
  "noDataState": "OK",
  "execErrState": "OK",
  "for": "5m",
  "keepFiringFor": "2m",
  "orgId": 1,
  "uid": "",
  "condition": "B",
  "annotations": {
    "summary": "test_api_1"
  },
  "labels": {
    "API": "test1"
  },
  "data": [
    {
      "refId": "A",
      "queryType": "",
      "relativeTimeRange": {
        "from": 600,
        "to": 0
      },
      "datasourceUid": "XXXXXXXXX-XXXXXXXXX-XXXXXXXXXX",
      "model": {
        "expr": "up",
        "hide": false,
        "intervalMs": 1000,
        "maxDataPoints": 43200,
        "refId": "A"
      }
    },
    {
      "refId": "B",
      "queryType": "",
      "relativeTimeRange": {
        "from": 0,
        "to": 0
      },
      "datasourceUid": "-100",
      "model": {
        "conditions": [
          {
            "evaluator": {
              "params": [6],
              "type": "gt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": ["A"]
            },
            "reducer": {
              "params": [],
              "type": "last"
            },
            "type": "query"
          }
        ],
        "datasource": {
          "type": "__expr__",
          "uid": "-100"
        },
        "hide": false,
        "intervalMs": 1000,
        "maxDataPoints": 43200,
        "refId": "B",
        "type": "classic_conditions"
      }
    }
  ]
}
```

#### Example Response:

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
HTTP/1.1 201 Created
Content-Type: application/json

{
  "id": 1,
  "uid": "XXXXXXXXX",
  "orgID": 1,
  "folderUID": "SET_FOLDER_UID",
  "ruleGroup": "API3",
  "title": "TEST-API_1",
  "condition": "B",
  "data": [
    {
      "refId": "A",
      "queryType": "",
      "relativeTimeRange": {
        "from": 600,
        "to": 0
      },
      "datasourceUid": "XXXXXXXXX-XXXXXXXXX-XXXXXXXXXX",
      "model": {
        "expr": "up",
        "hide": false,
        "intervalMs": 1000,
        "maxDataPoints": 43200,
        "refId": "A"
      }
    },
    {
      "refId": "B",
      "queryType": "",
      "relativeTimeRange": {
        "from": 0,
        "to": 0
      },
      "datasourceUid": "-100",
      "model": {
        "conditions": [
          {
            "evaluator": {
              "params": [
                6
              ],
              "type": "gt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A"
              ]
            },
            "reducer": {
              "params": [],
              "type": "last"
            },
            "type": "query"
          }
        ],
        "datasource": {
          "type": "__expr__",
          "uid": "-100"
        },
        "hide": false,
        "intervalMs": 1000,
        "maxDataPoints": 43200,
        "refId": "B",
        "type": "classic_conditions"
      }
    }
  ],
  "updated": "2024-08-02T13:19:32.609640048Z",
  "noDataState": "OK",
  "execErrState": "OK",
  "for": "5m",
  "keepFiringFor": "2m",
  "annotations": {
    "summary": "test_api_1"
  },
  "labels": {
    "API": "test1"
  },
  "provenance": "api",
  "isPaused": false,
  "notification_settings": null,
  "record": null
}
```

#### Recording rules

Recording rules allow you to pre-compute frequently used or computationally expensive queries and save the results as a new time series metric. The same alert rule provisioning endpoints support creating recording rules by including the `record` field instead of alert-specific fields like `condition`, `noDataState`, or `execErrState`.

**Example request for new recording rule:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
POST /api/v1/provisioning/alert-rules
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

{
  "title": "my_recording_rule",
  "ruleGroup": "recording_rules_group",
  "folderUID": "SET_FOLDER_UID",
  "for": "0s",
  "orgId": 1,
  "uid": "",
  "labels": {
    "team": "backend"
  },
  "data": [
    {
      "refId": "A",
      "queryType": "",
      "relativeTimeRange": {
        "from": 600,
        "to": 0
      },
      "datasourceUid": "PROMETHEUS_DATASOURCE_UID",
      "model": {
        "expr": "sum(rate(http_requests_total[5m]))",
        "intervalMs": 1000,
        "maxDataPoints": 43200,
        "refId": "A"
      }
    }
  ],
  "record": {
    "metric": "http_requests:rate5m:sum",
    "from": "A",
    "target_datasource_uid": "TARGET_PROMETHEUS_UID"
  }
}
```

**Example response:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
HTTP/1.1 201 Created
Content-Type: application/json

{
  "id": 2,
  "uid": "YYYYYYYYY",
  "orgID": 1,
  "folderUID": "SET_FOLDER_UID",
  "ruleGroup": "recording_rules_group",
  "title": "my_recording_rule",
  "for": "0s",
  "data": [
    {
      "refId": "A",
      "queryType": "",
      "relativeTimeRange": {
        "from": 600,
        "to": 0
      },
      "datasourceUid": "PROMETHEUS_DATASOURCE_UID",
      "model": {
        "expr": "sum(rate(http_requests_total[5m]))",
        "intervalMs": 1000,
        "maxDataPoints": 43200,
        "refId": "A"
      }
    }
  ],
  "updated": "2024-08-02T14:30:15.123456789Z",
  "labels": {
    "team": "backend"
  },
  "provenance": "api",
  "isPaused": false,
  "record": {
    "metric": "http_requests:rate5m:sum",
    "from": "A",
    "target_datasource_uid": "TARGET_PROMETHEUS_UID"
  }
}
```

**Important notes for recording rules:**

- The `metric` field must be a valid Prometheus metric name and contain no whitespace.
- The `from` field specifies which query reference (refId) to use as the source for the recorded metric.
- The `target_datasource_uid` specifies which Prometheus-compatible data source to write the results to. If not specified, the default data source configured in `[recording_rules].default_datasource_uid` is used.
- Recording rules do not support `condition`, `noDataState`, `execErrState`, or `notification_settings` fields.
- Set `for` to `0s` for recording rules as they do not have a pending state.

### Contact points

Expand table

| Method | URI                                        | Name                                                              | Summary                                                |
|--------|--------------------------------------------|-------------------------------------------------------------------|--------------------------------------------------------|
| DELETE | /api/v1/provisioning/contact-points/:uid   | [route delete contactpoints](#route-delete-contactpoints)         | Delete a contact point.                                |
| GET    | /api/v1/provisioning/contact-points        | [route get contactpoints](#route-get-contactpoints)               | Get all the contact points.                            |
| POST   | /api/v1/provisioning/contact-points        | [route post contactpoints](#route-post-contactpoints)             | Create a contact point.                                |
| PUT    | /api/v1/provisioning/contact-points/:uid   | [route put contactpoint](#route-put-contactpoint)                 | Update an existing contact point.                      |
| GET    | /api/v1/provisioning/contact-points/export | [route get contactpoints export](#route-get-contactpoints-export) | Export all contact points in provisioning file format. |

**Example Request for all the contact points:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
GET /api/v1/provisioning/contact-points
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```

**Example Response:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "uid": "",
    "name": "email receiver",
    "type": "email",
    "settings": {
      "addresses": "<example@email.com>"
    },
    "disableResolveMessage": false
  }
]
```

### Receiver permissions

The receiver permissions endpoints manage access control for contact point receivers. These endpoints allow you to assign permissions to users, teams, or built-in roles for specific receivers.

Expand table

| Method | URI                                                          | Name                                                                            | Summary                                                     |
|--------|--------------------------------------------------------------|---------------------------------------------------------------------------------|-------------------------------------------------------------|
| POST   | /api/access-control/receivers/:uid/users/:userID             | [route set user receiver permission](#route-set-user-receiver-permission)       | Set permissions for a user on a specific receiver.          |
| POST   | /api/access-control/receivers/:uid/teams/:teamID             | [route set team receiver permission](#route-set-team-receiver-permission)       | Set permissions for a team on a specific receiver.          |
| POST   | /api/access-control/receivers/:uid/builtInRoles/:builtInRole | [route set builtin receiver permission](#route-set-builtin-receiver-permission) | Set permissions for a built-in role on a specific receiver. |

**Example Request to assign permissions to a user:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
POST /api/access-control/receivers/abc123/users/5
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

{
  "permission": "Edit"
}
```

**Example Response:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
  "message": "Permission updated"
}
```

**Example Request to remove permissions from a team:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
POST /api/access-control/receivers/abc123/teams/3
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

{
  "permission": ""
}
```

**Example Response:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
  "message": "Permission removed"
}
```

**Example Request to assign permissions to a built-in role:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
POST /api/access-control/receivers/abc123/builtInRoles/Viewer
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

{
  "permission": "View"
}
```

**Example Response:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
  "message": "Permission updated"
}
```

**Available Permissions sets:**

- `View` - Read-only access to the receiver.
  
  - Grants `alert.notifications.receivers:read`.
- `Edit` - Ability to update and test the receiver.
  
  - Grants `View` actions plus:
    
    - `alert.notifications.receivers:write`
    - `alert.notifications.receivers:delete`
    - `alert.notifications.receivers.test:create`
- `Admin` - Full access including managing permissions and reading secrets.
  
  - Grants `Edit` actions plus:
    
    - `alert.notifications.receivers.secrets:read`
    - `receivers.permissions:read`
    - `receivers.permissions:write`
    - `alert.notifications.receivers.protected:write`
- Empty string (`""`) - Removes the permission.

### Notification policies

Expand table

| Method | URI                                  | Name                                                          | Summary                                                          |
|--------|--------------------------------------|---------------------------------------------------------------|------------------------------------------------------------------|
| DELETE | /api/v1/provisioning/policies        | [route reset policy tree](#route-reset-policy-tree)           | Clears the notification policy tree.                             |
| GET    | /api/v1/provisioning/policies        | [route get policy tree](#route-get-policy-tree)               | Get the notification policy tree.                                |
| PUT    | /api/v1/provisioning/policies        | [route put policy tree](#route-put-policy-tree)               | Sets the notification policy tree.                               |
| GET    | /api/v1/provisioning/policies/export | [route get policy tree export](#route-get-policy-tree-export) | Export the notification policy tree in provisioning file format. |

**Example Request for exporting the notification policy tree in YAML format:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
GET /api/v1/provisioning/policies/export?format=yaml
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```

**Example Response:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
HTTP/1.1 200 OK
Content-Type: text/yaml

apiVersion: 1
policies:
    - orgId: 1
      receiver: My Contact Email Point
      group_by:
        - grafana_folder
        - alertname
      routes:
        - receiver: My Contact Email Point
          object_matchers:
            - - monitor
              - =
              - testdata
          mute_time_intervals:
            - weekends
```

### Notification template groups

Template groups enable you to define multiple notification templates (`{{ define "" }}`) within a single group. They can be managed from the Grafana Alerting UI.

Expand table

| Method | URI                                  | Name                                            | Summary                                         |
|--------|--------------------------------------|-------------------------------------------------|-------------------------------------------------|
| DELETE | /api/v1/provisioning/templates/:name | [route delete template](#route-delete-template) | Delete a notification template group.           |
| GET    | /api/v1/provisioning/templates/:name | [route get template](#route-get-template)       | Get a notification template group.              |
| GET    | /api/v1/provisioning/templates       | [route get template](#route-get-templates)      | Get all notification template groups.           |
| PUT    | /api/v1/provisioning/templates/:name | [route put template](#route-put-template)       | Create or update a notification template group. |

**Example Request for all notification template groups:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
GET /api/v1/provisioning/templates
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```

**Example Response:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "name": "custom_email.message",
    "template": "{{ define \"custom_email.message\" }}\n  Custom alert!\n{{ end }}",
    "provenance": "file"
  },
  {
    "name": "custom_email.subject",
    "template": "{{ define \"custom_email.subject\" }}\n{{ len .Alerts.Firing }} firing alert(s), {{ len .Alerts.Resolved }} resolved alert(s)\n{{ end }}",
    "provenance": "file"
  }
]
```

### Mute timings

Expand table

| Method | URI                                            | Name                                                            | Summary                                              |
|--------|------------------------------------------------|-----------------------------------------------------------------|------------------------------------------------------|
| DELETE | /api/v1/provisioning/mute-timings/:name        | [route delete mute timing](#route-delete-mute-timing)           | Delete a mute timing.                                |
| GET    | /api/v1/provisioning/mute-timings/:name        | [route get mute timing](#route-get-mute-timing)                 | Get a mute timing.                                   |
| GET    | /api/v1/provisioning/mute-timings              | [route get mute timings](#route-get-mute-timings)               | Get all the mute timings.                            |
| POST   | /api/v1/provisioning/mute-timings              | [route post mute timing](#route-post-mute-timing)               | Create a new mute timing.                            |
| PUT    | /api/v1/provisioning/mute-timings/:name        | [route put mute timing](#route-put-mute-timing)                 | Replace an existing mute timing.                     |
| GET    | /api/v1/provisioning/mute-timings/export       | [route get mute timings export](#route-get-mute-timings-export) | Export all mute timings in provisioning file format. |
| GET    | /api/v1/provisioning/mute-timings/:name/export | [route get mute timing export](#route-get-mute-timing-export)   | Export a mute timing in provisioning file format.    |

**Example Request for all mute timings:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
GET /api/v1/provisioning/mute-timings
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```

**Example Response:**

http ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```http
HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "name": "weekends",
    "time_intervals": [
      {
        "weekdays": [
          "saturday",
          "sunday"
        ]
      }
    ],
    "version": "",
    "provenance": "file"
  }
]
```

### Edit resources in the Grafana UI

By default, you cannot edit API-provisioned alerting resources in Grafana.

To enable editing these resources in the Grafana UI, add the **`X-Disable-Provenance: true`** header to the following API requests:

- [`PUT /api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}`](#route-put-alert-rule-group): This action also sets the provenance for the rule group and all its alert rules.
- [`POST /api/v1/provisioning/alert-rules`](#route-post-alert-rule): The provenance of the new alert rule must match the provenance value configured for its rule group.
- [`POST /api/v1/provisioning/contact-points`](#%23route-post-contactpoints)
- [`POST /api/v1/provisioning/mute-timings`](#route-post-mute-timing)
- [`PUT /api/v1/provisioning/templates/{name}`](#route-put-template)
- [`PUT /api/v1/provisioning/policies`](#route-put-policy-tree)

To reset the notification policy tree to the default and unlock it for editing in the Grafana UI, use:

- [`DELETE /api/v1/provisioning/policies`](#route-reset-policy-tree)

## Data source-managed resources

The Alerting Provisioning HTTP API can only be used to manage Grafana-managed alert resources. To manage resources related to [data source-managed alerts](/docs/grafana/latest/alerting/alerting-rules/create-data-source-managed-rule/), consider the following tools:

- [mimirtool](/docs/mimir/latest/manage/tools/mimirtool/): to interact with the Mimir alertmanager and ruler configuration.
- [cortex-tools](https://github.com/grafana/cortex-tools#cortextool): to interact with the Cortex alertmanager and ruler configuration.
- [lokitool](/docs/loki/latest/alert/#lokitool): to configure the Loki Ruler.

Alternatively, the [Grafana Alerting API](https://editor.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgrafana%2Fgrafana%2Fmain%2Fpkg%2Fservices%2Fngalert%2Fapi%2Ftooling%2Fpost.json) can be used to access data from data source-managed alerts. This API is primarily intended for internal usage, with the exception of the `/api/v1/provisioning/` endpoints. It’s important to note that internal APIs may undergo changes without prior notice and are not officially supported for user consumption.

For Prometheus, `amtool` can also be used to interact with the [AlertManager API](https://petstore.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2Fprometheus%2Falertmanager%2Fmain%2Fapi%2Fv2%2Fopenapi.yaml#/).

## Paths

### Delete a specific alert rule by UID. (*RouteDeleteAlertRule*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
DELETE /api/v1/provisioning/alert-rules/:uid
```

> Warning
> 
> This API is deprecated and will be removed in a future release. Use the Grafana App Platform alerting APIs instead: `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/alertrules/{name}` for alert rules and `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/recordingrules/{name}` for recording rules.

#### Parameters

Expand table

| Name                         | Source | Type   | Go type | Required | Default | Description                                               |
|------------------------------|--------|--------|---------|----------|---------|-----------------------------------------------------------|
| `UID`                        | path   | string | string  | ✓        |         | Alert rule UID                                            |
| `X-Disable-Provenance: true` | header | string | string  |          |         | Allows editing of provisioned resources in the Grafana UI |

#### All responses

Expand table

| Code                                | Status     | Description                              | Has headers | Schema                                        |
|-------------------------------------|------------|------------------------------------------|-------------|-----------------------------------------------|
| [204](#route-delete-alert-rule-204) | No Content | The alert rule was deleted successfully. |             | [schema](#route-delete-alert-rule-204-schema) |

#### Responses

##### 204 - The alert rule was deleted successfully.

Status: No Content

###### Schema

### Delete a rule group. (*RouteDeleteAlertRuleGroup*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
DELETE /api/v1/provisioning/folder/:folderUid/rule-groups/:group
```

> Warning
> 
> This API is deprecated and will be removed in a future release. Use the Grafana App Platform alerting APIs instead: `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/alertrules` for alert rules and `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/recordingrules` for recording rules.

#### Parameters

Expand table

| Name                         | Source | Type   | Go type | Required | Default | Description                                               |
|------------------------------|--------|--------|---------|----------|---------|-----------------------------------------------------------|
| `FolderUID`                  | path   | string | string  | ✓        |         |                                                           |
| `Group`                      | path   | string | string  | ✓        |         |                                                           |
| `X-Disable-Provenance: true` | header | string | string  |          |         | Allows editing of provisioned resources in the Grafana UI |

#### All responses

Expand table

| Code                                      | Status     | Description                                    | Has headers | Schema                                              |
|-------------------------------------------|------------|------------------------------------------------|-------------|-----------------------------------------------------|
| [204](#route-delete-alert-rule-group-204) | No Content | The alert rule group was deleted successfully. |             | [schema](#route-delete-alert-rule-group-204-schema) |
| [403](#route-delete-alert-rule-group-403) | Forbidden  | ForbiddenError                                 |             | [schema](#route-delete-alert-rule-group-403-schema) |
| [404](#route-delete-alert-rule-group-404) | Not Found  | NotFound                                       |             | [schema](#route-delete-alert-rule-group-404-schema) |

#### Responses

##### 204 - The alert rule group was deleted successfully.

Status: No Content

###### Schema

##### 403 - ForbiddenError

Status: Forbidden

###### Schema

[ForbiddenError](#forbidden-error)

##### 404 - NotFound

Status: Not Found

###### Schema

[NotFound](#not-found)

### Delete a contact point. (*RouteDeleteContactpoints*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
DELETE /api/v1/provisioning/contact-points/:uid
```

#### Parameters

Expand table

| Name  | Source | Type   | Go type | Required | Default | Description                                |
|-------|--------|--------|---------|----------|---------|--------------------------------------------|
| `UID` | path   | string | string  | ✓        |         | UID is the contact point unique identifier |

#### All responses

Expand table

| Code                                   | Status     | Description                                 | Has headers | Schema                                           |
|----------------------------------------|------------|---------------------------------------------|-------------|--------------------------------------------------|
| [204](#route-delete-contactpoints-204) | No Content | The contact point was deleted successfully. |             | [schema](#route-delete-contactpoints-204-schema) |

#### Responses

##### 204 - The contact point was deleted successfully.

Status: No Content

###### Schema

### Delete a mute timing. (*RouteDeleteMuteTiming*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
DELETE /api/v1/provisioning/mute-timings/:name
```

#### Parameters

Expand table

| Name      | Source | Type   | Go type | Required | Default | Description                                                                                                   |
|-----------|--------|--------|---------|----------|---------|---------------------------------------------------------------------------------------------------------------|
| `name`    | path   | string | string  | ✓        |         | Mute timing name                                                                                              |
| `version` | query  | string | string  |          |         | Current version of the resource. Used for optimistic concurrency validation. Keep empty to bypass validation. |

#### All responses

Expand table

| Code                                 | Status     | Description                               | Has headers | Schema                                         |
|--------------------------------------|------------|-------------------------------------------|-------------|------------------------------------------------|
| [204](#route-delete-mute-timing-204) | No Content | The mute timing was deleted successfully. |             | [schema](#route-delete-mute-timing-204-schema) |
| [409](#route-delete-mute-timing-409) | Conflict   | GenericPublicError                        |             | [schema](#route-delete-mute-timing-409-schema) |

#### Responses

##### 204 - The mute timing was deleted successfully.

Status: No Content

###### Schema

##### 409 - Conflict

Status: Conflict

###### Schema

[GenericPublicError](#generic-public-error)

### Delete a notification template group. (*RouteDeleteTemplate*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
DELETE /api/v1/provisioning/templates/:name
```

#### Parameters

Expand table

| Name      | Source | Type   | Go type | Required | Default | Description                                                                                                   |
|-----------|--------|--------|---------|----------|---------|---------------------------------------------------------------------------------------------------------------|
| `name`    | path   | string | string  | ✓        |         | Name of the template group                                                                                    |
| `version` | query  | string | string  |          |         | Current version of the resource. Used for optimistic concurrency validation. Keep empty to bypass validation. |

#### All responses

Expand table

| Code                              | Status     | Description                            | Has headers | Schema                                      |
|-----------------------------------|------------|----------------------------------------|-------------|---------------------------------------------|
| [204](#route-delete-template-204) | No Content | The template was deleted successfully. |             | [schema](#route-delete-template-204-schema) |
| [409](#route-delete-template-409) | Conflict   | GenericPublicError                     |             | [schema](#route-delete-template-409-schema) |

#### Responses

##### 204 - The template was deleted successfully.

Status: No Content

###### Schema

##### 409 - Conflict

Status: Conflict

###### Schema

[GenericPublicError](#generic-public-error)

### Get a specific alert rule by UID. (*RouteGetAlertRule*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/alert-rules/:uid
```

> Warning
> 
> This API is deprecated and will be removed in a future release. Use the Grafana App Platform alerting APIs instead: `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/alertrules/{name}` for alert rules and `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/recordingrules/{name}` for recording rules.

#### Parameters

Expand table

| Name  | Source | Type   | Go type | Required | Default | Description    |
|-------|--------|--------|---------|----------|---------|----------------|
| `UID` | path   | string | string  | ✓        |         | Alert rule UID |

#### All responses

Expand table

| Code                             | Status    | Description          | Has headers | Schema                                     |
|----------------------------------|-----------|----------------------|-------------|--------------------------------------------|
| [200](#route-get-alert-rule-200) | OK        | ProvisionedAlertRule |             | [schema](#route-get-alert-rule-200-schema) |
| [404](#route-get-alert-rule-404) | Not Found | Not found.           |             | [schema](#route-get-alert-rule-404-schema) |

#### Responses

##### 200 - ProvisionedAlertRule

Status: OK

###### Schema

[ProvisionedAlertRule](#provisioned-alert-rule)

##### 404 - Not found.

Status: Not Found

###### Schema

### Export an alert rule in provisioning file format. (*RouteGetAlertRuleExport*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/alert-rules/:uid/export
```

#### Produces

- `application/json`
- `application/yaml`
- `application/terraform+hcl`
- `text/yaml`
- `text/hcl`

These outputs are for [file provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/) or [Terraform provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/), and they-including the JSON output—cannot be used to update resources via the HTTP API.

#### Parameters

Expand table

| Name       | Source | Type    | Go type | Required | Default | Description                                                                                                                                  |
|------------|--------|---------|---------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `UID`      | path   | string  | string  | ✓        |         | Alert rule UID                                                                                                                               |
| `download` | query  | boolean | `bool`  |          |         | Whether to initiate a download of the file or not.                                                                                           |
| `format`   | query  | string  | string  |          | `yaml`  | Format of the downloaded file, either `yaml`, `json` or `hcl`. Accept header can also be used, but the query parameter will take precedence. |

#### All responses

Expand table

| Code                                    | Status    | Description        | Has headers | Schema                                            |
|-----------------------------------------|-----------|--------------------|-------------|---------------------------------------------------|
| [200](#route-get-alert-rule-export-200) | OK        | AlertingFileExport |             | [schema](#route-get-alert-rule-export-200-schema) |
| [404](#route-get-alert-rule-export-404) | Not Found | Not found.         |             | [schema](#route-get-alert-rule-export-404-schema) |

#### Responses

##### 200 - AlertingFileExport

Status: OK

###### Schema

[AlertingFileExport](#alerting-file-export)

##### 404 - Not found.

Status: Not Found

###### Schema

### Get a rule group. (*RouteGetAlertRuleGroup*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/folder/:folderUid/rule-groups/:group
```

> Warning
> 
> This API is deprecated and will be removed in a future release. Use the Grafana App Platform alerting APIs instead: `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/alertrules` for alert rules and `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/recordingrules` for recording rules.

#### Parameters

Expand table

| Name        | Source | Type   | Go type | Required | Default | Description |
|-------------|--------|--------|---------|----------|---------|-------------|
| `FolderUID` | path   | string | string  | ✓        |         |             |
| `Group`     | path   | string | string  | ✓        |         |             |

#### All responses

Expand table

| Code                                   | Status    | Description    | Has headers | Schema                                           |
|----------------------------------------|-----------|----------------|-------------|--------------------------------------------------|
| [200](#route-get-alert-rule-group-200) | OK        | AlertRuleGroup |             | [schema](#route-get-alert-rule-group-200-schema) |
| [404](#route-get-alert-rule-group-404) | Not Found | Not found.     |             | [schema](#route-get-alert-rule-group-404-schema) |

#### Responses

##### 200 - AlertRuleGroup

Status: OK

###### Schema

[AlertRuleGroup](#alert-rule-group)

##### 404 - Not found.

Status: Not Found

###### Schema

### Export an alert rule group in provisioning file format. (*RouteGetAlertRuleGroupExport*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/folder/:folderUid/rule-groups/:group/export
```

#### Produces

- `application/json`
- `application/yaml`
- `application/terraform+hcl`
- `text/yaml`
- `text/hcl`

These outputs are for [file provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/) or [Terraform provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/), and they-including the JSON output—cannot be used to update resources via the HTTP API.

#### Parameters

Expand table

| Name        | Source | Type    | Go type | Required | Default | Description                                                                                                                                  |
|-------------|--------|---------|---------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `FolderUID` | path   | string  | string  | ✓        |         |                                                                                                                                              |
| `Group`     | path   | string  | string  | ✓        |         |                                                                                                                                              |
| `download`  | query  | boolean | `bool`  |          |         | Whether to initiate a download of the file or not.                                                                                           |
| `format`    | query  | string  | string  |          | `yaml`  | Format of the downloaded file, either `yaml`, `json` or `hcl`. Accept header can also be used, but the query parameter will take precedence. |

#### All responses

Expand table

| Code                                          | Status    | Description        | Has headers | Schema                                                  |
|-----------------------------------------------|-----------|--------------------|-------------|---------------------------------------------------------|
| [200](#route-get-alert-rule-group-export-200) | OK        | AlertingFileExport |             | [schema](#route-get-alert-rule-group-export-200-schema) |
| [404](#route-get-alert-rule-group-export-404) | Not Found | Not found.         |             | [schema](#route-get-alert-rule-group-export-404-schema) |

#### Responses

##### 200 - AlertingFileExport

Status: OK

###### Schema

[AlertingFileExport](#alerting-file-export)

##### 404 - Not found.

Status: Not Found

###### Schema

### Get all the alert rules. (*RouteGetAlertRules*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/alert-rules
```

> Warning
> 
> This API is deprecated and will be removed in a future release. Use the Grafana App Platform alerting APIs instead: `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/alertrules` for alert rules and `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/recordingrules` for recording rules.

#### All responses

Expand table

| Code                              | Status | Description           | Has headers | Schema                                      |
|-----------------------------------|--------|-----------------------|-------------|---------------------------------------------|
| [200](#route-get-alert-rules-200) | OK     | ProvisionedAlertRules |             | [schema](#route-get-alert-rules-200-schema) |

#### Responses

##### 200 - ProvisionedAlertRules

Status: OK

###### Schema

[ProvisionedAlertRules](#provisioned-alert-rules)

### Export all alert rules in provisioning file format. (*RouteGetAlertRulesExport*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/alert-rules/export
```

#### Produces

- `application/json`
- `application/yaml`
- `application/terraform+hcl`
- `text/yaml`
- `text/hcl`

These outputs are for [file provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/) or [Terraform provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/), and they-including the JSON output—cannot be used to update resources via the HTTP API.

#### Parameters

Expand table

| Name       | Source | Type    | Go type | Required | Default | Description                                                                                                                                  |
|------------|--------|---------|---------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `download` | query  | boolean | `bool`  |          |         | Whether to initiate a download of the file or not.                                                                                           |
| `format`   | query  | string  | string  |          | `yaml`  | Format of the downloaded file, either `yaml`, `json` or `hcl`. Accept header can also be used, but the query parameter will take precedence. |

#### All responses

Expand table

| Code                                     | Status    | Description        | Has headers | Schema                                             |
|------------------------------------------|-----------|--------------------|-------------|----------------------------------------------------|
| [200](#route-get-alert-rules-export-200) | OK        | AlertingFileExport |             | [schema](#route-get-alert-rules-export-200-schema) |
| [404](#route-get-alert-rules-export-404) | Not Found | Not found.         |             | [schema](#route-get-alert-rules-export-404-schema) |

#### Responses

##### 200 - AlertingFileExport

Status: OK

###### Schema

[AlertingFileExport](#alerting-file-export)

##### 404 - Not found.

Status: Not Found

###### Schema

### Get all the contact points. (*RouteGetContactpoints*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/contact-points
```

#### Parameters

Expand table

| Name   | Source | Type   | Go type | Required | Default | Description    |
|--------|--------|--------|---------|----------|---------|----------------|
| `name` | query  | string | string  |          |         | Filter by name |

#### All responses

Expand table

| Code                                | Status | Description   | Has headers | Schema                                        |
|-------------------------------------|--------|---------------|-------------|-----------------------------------------------|
| [200](#route-get-contactpoints-200) | OK     | ContactPoints |             | [schema](#route-get-contactpoints-200-schema) |

#### Responses

##### 200 - ContactPoints

Status: OK

###### Schema

[ContactPoints](#contact-points)

### Export all contact points in provisioning file format. (*RouteGetContactpointsExport*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/contact-points/export
```

#### Produces

- `application/json`
- `application/yaml`
- `application/terraform+hcl`
- `text/yaml`
- `text/hcl`

These outputs are for [file provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/) or [Terraform provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/), and they-including the JSON output—cannot be used to update resources via the HTTP API.

#### Parameters

Expand table

| Name       | Source | Type    | Go type | Required | Default | Description                                                                                                                                                                                     |
|------------|--------|---------|---------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `decrypt`  | query  | boolean | `bool`  |          |         | Whether any contained secure settings should be decrypted or left redacted. Redacted settings will contain RedactedValue instead. Currently, only org admin can view decrypted secure settings. |
| `download` | query  | boolean | `bool`  |          |         | Whether to initiate a download of the file or not.                                                                                                                                              |
| `format`   | query  | string  | string  |          | `yaml`  | Format of the downloaded file, either `yaml`, `json` or `hcl`. Accept header can also be used, but the query parameter will take precedence.                                                    |
| `name`     | query  | string  | string  |          |         | Filter by name                                                                                                                                                                                  |

#### All responses

Expand table

| Code                                       | Status    | Description        | Has headers | Schema                                               |
|--------------------------------------------|-----------|--------------------|-------------|------------------------------------------------------|
| [200](#route-get-contactpoints-export-200) | OK        | AlertingFileExport |             | [schema](#route-get-contactpoints-export-200-schema) |
| [403](#route-get-contactpoints-export-403) | Forbidden | PermissionDenied   |             | [schema](#route-get-contactpoints-export-403-schema) |

#### Responses

##### 200 - AlertingFileExport

Status: OK

###### Schema

[AlertingFileExport](#alerting-file-export)

##### 403 - PermissionDenied

Status: Forbidden

###### Schema

[PermissionDenied](#permission-denied)

### Set permissions for a user on a specific receiver. (*RouteSetUserReceiverPermission*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
POST /api/access-control/receivers/:uid/users/:userID
```

This endpoint sets or removes permissions for a specific user on a receiver. To remove a permission, send an empty string as the permission value.

> Note
> 
> This endpoint requires Grafana Enterprise and the user must have the `receivers.permissions:write` permission for the specified receiver.

#### Parameters

Expand table

| Name     | Source | Type   | Go type | Required | Default | Description                                                                           |
|----------|--------|--------|---------|----------|---------|---------------------------------------------------------------------------------------|
| `uid`    | path   | string | string  | ✓        |         | UID of the receiver                                                                   |
| `userID` | path   | int64  | int64   | ✓        |         | ID of the user to assign permissions to                                               |
| `body`   | body   | object | object  | ✓        |         | JSON body with `permission` field: `View`, `Edit`, `Admin`, or `""` (empty to remove) |

#### All responses

Expand table

| Code                                           | Status      | Description        | Has headers | Schema                                                   |
|------------------------------------------------|-------------|--------------------|-------------|----------------------------------------------------------|
| [200](#route-set-user-receiver-permission-200) | OK          | Permission updated |             | [schema](#route-set-user-receiver-permission-200-schema) |
| [400](#route-set-user-receiver-permission-400) | Bad Request | Invalid request    |             | [schema](#route-set-user-receiver-permission-400-schema) |
| [403](#route-set-user-receiver-permission-403) | Forbidden   | Permission denied  |             | [schema](#route-set-user-receiver-permission-403-schema) |

#### Responses

##### 200 - Permission updated

Status: OK

###### Schema

JSON ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```json
{
  "message": "Permission updated"
}
```

##### 400 - Invalid request

Status: Bad Request

###### Schema

##### 403 - Permission denied

Status: Forbidden

###### Schema

[PermissionDenied](#permission-denied)

### Set permissions for a team on a specific receiver. (*RouteSetTeamReceiverPermission*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
POST /api/access-control/receivers/:uid/teams/:teamID
```

This endpoint sets or removes permissions for a specific team on a receiver. To remove a permission, send an empty string as the permission value.

> Note
> 
> This endpoint requires Grafana Enterprise and the user must have the `receivers.permissions:write` permission for the specified receiver.

#### Parameters

Expand table

| Name     | Source | Type   | Go type | Required | Default | Description                                                                           |
|----------|--------|--------|---------|----------|---------|---------------------------------------------------------------------------------------|
| `uid`    | path   | string | string  | ✓        |         | UID of the receiver                                                                   |
| `teamID` | path   | int64  | int64   | ✓        |         | ID of the team to assign permissions to                                               |
| `body`   | body   | object | object  | ✓        |         | JSON body with `permission` field: `View`, `Edit`, `Admin`, or `""` (empty to remove) |

#### All responses

Expand table

| Code                                           | Status      | Description        | Has headers | Schema                                                   |
|------------------------------------------------|-------------|--------------------|-------------|----------------------------------------------------------|
| [200](#route-set-team-receiver-permission-200) | OK          | Permission updated |             | [schema](#route-set-team-receiver-permission-200-schema) |
| [400](#route-set-team-receiver-permission-400) | Bad Request | Invalid request    |             | [schema](#route-set-team-receiver-permission-400-schema) |
| [403](#route-set-team-receiver-permission-403) | Forbidden   | Permission denied  |             | [schema](#route-set-team-receiver-permission-403-schema) |

#### Responses

##### 200 - Permission updated

Status: OK

###### Schema

JSON ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```json
{
  "message": "Permission updated"
}
```

##### 400 - Invalid request

Status: Bad Request

###### Schema

##### 403 - Permission denied

Status: Forbidden

###### Schema

[PermissionDenied](#permission-denied)

### Set permissions for a built-in role on a specific receiver. (*RouteSetBuiltinReceiverPermission*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
POST /api/access-control/receivers/:uid/builtInRoles/:builtInRole
```

This endpoint sets or removes permissions for a built-in role on a receiver. To remove a permission, send an empty string as the permission value.

> Note
> 
> This endpoint requires Grafana Enterprise and the user must have the `receivers.permissions:write` permission for the specified receiver.

#### Parameters

Expand table

| Name          | Source | Type   | Go type | Required | Default | Description                                                                           |
|---------------|--------|--------|---------|----------|---------|---------------------------------------------------------------------------------------|
| `uid`         | path   | string | string  | ✓        |         | UID of the receiver                                                                   |
| `builtInRole` | path   | string | string  | ✓        |         | Built-in role name: `Viewer`, `Editor`, or `Admin`                                    |
| `body`        | body   | object | object  | ✓        |         | JSON body with `permission` field: `View`, `Edit`, `Admin`, or `""` (empty to remove) |

#### All responses

Expand table

| Code                                              | Status      | Description        | Has headers | Schema                                                      |
|---------------------------------------------------|-------------|--------------------|-------------|-------------------------------------------------------------|
| [200](#route-set-builtin-receiver-permission-200) | OK          | Permission updated |             | [schema](#route-set-builtin-receiver-permission-200-schema) |
| [400](#route-set-builtin-receiver-permission-400) | Bad Request | Invalid request    |             | [schema](#route-set-builtin-receiver-permission-400-schema) |
| [403](#route-set-builtin-receiver-permission-403) | Forbidden   | Permission denied  |             | [schema](#route-set-builtin-receiver-permission-403-schema) |

#### Responses

##### 200 - Permission updated

Status: OK

###### Schema

JSON ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```json
{
  "message": "Permission updated"
}
```

##### 400 - Invalid request

Status: Bad Request

###### Schema

##### 403 - Permission denied

Status: Forbidden

###### Schema

[PermissionDenied](#permission-denied)

### Get a mute timing. (*RouteGetMuteTiming*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/mute-timings/:name
```

#### Parameters

Expand table

| Name   | Source | Type   | Go type | Required | Default | Description      |
|--------|--------|--------|---------|----------|---------|------------------|
| `name` | path   | string | string  | ✓        |         | Mute timing name |

#### All responses

Expand table

| Code                              | Status    | Description      | Has headers | Schema                                      |
|-----------------------------------|-----------|------------------|-------------|---------------------------------------------|
| [200](#route-get-mute-timing-200) | OK        | MuteTimeInterval |             | [schema](#route-get-mute-timing-200-schema) |
| [404](#route-get-mute-timing-404) | Not Found | Not found.       |             | [schema](#route-get-mute-timing-404-schema) |

#### Responses

##### 200 - MuteTimeInterval

Status: OK

###### Schema

[MuteTimeInterval](#mute-time-interval)

##### 404 - Not found.

Status: Not Found

###### Schema

### Get all the mute timings. (*RouteGetMuteTimings*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/mute-timings
```

#### All responses

Expand table

| Code                               | Status | Description | Has headers | Schema                                       |
|------------------------------------|--------|-------------|-------------|----------------------------------------------|
| [200](#route-get-mute-timings-200) | OK     | MuteTimings |             | [schema](#route-get-mute-timings-200-schema) |

#### Responses

##### 200 - MuteTimings

Status: OK

###### Schema

[MuteTimings](#mute-timings)

### Export all mute timings in provisioning file format. (*RouteGetMuteTimingsExport*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/mute-timings/export
```

#### Produces

- `application/json`
- `application/yaml`
- `application/terraform+hcl`
- `text/yaml`
- `text/hcl`

These outputs are for [file provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/) or [Terraform provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/), and they-including the JSON output—cannot be used to update resources via the HTTP API.

#### Parameters

Expand table

| Name       | Source | Type    | Go type | Required | Default | Description                                                                                                                                  |
|------------|--------|---------|---------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `download` | query  | boolean | `bool`  |          |         | Whether to initiate a download of the file or not.                                                                                           |
| `format`   | query  | string  | string  |          | `yaml`  | Format of the downloaded file, either `yaml`, `json` or `hcl`. Accept header can also be used, but the query parameter will take precedence. |

#### All responses

Expand table

| Code                                      | Status    | Description       | Has headers | Schema                                              |
|-------------------------------------------|-----------|-------------------|-------------|-----------------------------------------------------|
| [200](#route-get-mute-timings-export-200) | OK        | MuteTimingsExport |             | [schema](#route-get-mute-timings-export-200-schema) |
| [403](#route-get-mute-timings-export-403) | Forbidden | PermissionDenied  |             | [schema](#route-get-mute-timings-export-403-schema) |

#### Responses

##### 200 - MuteTimingsExport

Status: OK

###### Schema

[AlertingFileExport](#alerting-file-export)

##### 403 - PermissionDenied

Status: Forbidden

###### Schema

[PermissionDenied](#permission-denied)

### Export a mute timing in provisioning file format. (*RouteGetMuteTimingExport*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/mute-timings/:name/export
```

#### Produces

- `application/json`
- `application/yaml`
- `application/terraform+hcl`
- `text/yaml`
- `text/hcl`

These outputs are for [file provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/) or [Terraform provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/), and they-including the JSON output—cannot be used to update resources via the HTTP API.

#### Parameters

Expand table

| Name       | Source | Type    | Go type | Required | Default | Description                                                                                                                                  |
|------------|--------|---------|---------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `name`     | path   | string  | string  | ✓        |         | Mute timing name.                                                                                                                            |
| `download` | query  | boolean | `bool`  |          |         | Whether to initiate a download of the file or not.                                                                                           |
| `format`   | query  | string  | string  |          | `yaml`  | Format of the downloaded file, either `yaml`, `json` or `hcl`. Accept header can also be used, but the query parameter will take precedence. |

#### All responses

Expand table

| Code                                     | Status    | Description      | Has headers | Schema                                              |
|------------------------------------------|-----------|------------------|-------------|-----------------------------------------------------|
| [200](#route-get-mute-timing-export-200) | OK        | MuteTimingExport |             | [schema](#route-get-mute-timings-export-200-schema) |
| [403](#route-get-mute-timing-export-403) | Forbidden | PermissionDenied |             | [schema](#route-get-mute-timings-export-403-schema) |

#### Responses

##### 200 - MuteTimingExport

Status: OK

###### Schema

[AlertingFileExport](#alerting-file-export)

##### 403 - PermissionDenied

Status: Forbidden

###### Schema

[PermissionDenied](#permission-denied)

### Get the notification policy tree. (*RouteGetPolicyTree*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/policies
```

#### All responses

Expand table

| Code                              | Status | Description | Has headers | Schema                                      |
|-----------------------------------|--------|-------------|-------------|---------------------------------------------|
| [200](#route-get-policy-tree-200) | OK     | Route       |             | [schema](#route-get-policy-tree-200-schema) |

#### Responses

##### 200 - Route

Status: OK

###### Schema

[Route](#route)

### Export the notification policy tree in provisioning file format. (*RouteGetPolicyTreeExport*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/policies/export
```

#### Produces

- `application/json`
- `application/yaml`
- `application/terraform+hcl`
- `text/yaml`
- `text/hcl`

These outputs are for [file provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/) or [Terraform provisioning](/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/), and they-including the JSON output—cannot be used to update resources via the HTTP API.

#### Parameters

Expand table

| Name       | Source | Type    | Go type | Required | Default | Description                                                                                                                                  |
|------------|--------|---------|---------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `download` | query  | boolean | `bool`  |          |         | Whether to initiate a download of the file or not.                                                                                           |
| `format`   | query  | string  | string  |          | `yaml`  | Format of the downloaded file, either `yaml`, `json` or `hcl`. Accept header can also be used, but the query parameter will take precedence. |

#### All responses

Expand table

| Code                                     | Status    | Description        | Has headers | Schema                                             |
|------------------------------------------|-----------|--------------------|-------------|----------------------------------------------------|
| [200](#route-get-policy-tree-export-200) | OK        | AlertingFileExport |             | [schema](#route-get-policy-tree-export-200-schema) |
| [404](#route-get-policy-tree-export-404) | Not Found | NotFound           |             | [schema](#route-get-policy-tree-export-404-schema) |

#### Responses

##### 200 - AlertingFileExport

Status: OK

###### Schema

[AlertingFileExport](#alerting-file-export)

##### 404 - NotFound

Status: Not Found

###### Schema

[NotFound](#not-found)

### Get a notification template group. (*RouteGetTemplate*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/templates/:name
```

#### Parameters

Expand table

| Name   | Source | Type   | Go type | Required | Default | Description                |
|--------|--------|--------|---------|----------|---------|----------------------------|
| `name` | path   | string | string  | ✓        |         | Name of the template group |

#### All responses

Expand table

| Code                           | Status    | Description          | Has headers | Schema                                   |
|--------------------------------|-----------|----------------------|-------------|------------------------------------------|
| [200](#route-get-template-200) | OK        | NotificationTemplate |             | [schema](#route-get-template-200-schema) |
| [404](#route-get-template-404) | Not Found | GenericPublicError   |             | [schema](#route-get-template-404-schema) |

#### Responses

##### 200 - NotificationTemplate

Status: OK

###### Schema

[NotificationTemplate](#notification-template)

##### 404 - Not found.

[GenericPublicError](#generic-public-error)

###### Schema

### Get all notification template groups. (*RouteGetTemplates*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
GET /api/v1/provisioning/templates
```

#### All responses

Expand table

| Code                            | Status | Description           | Has headers | Schema                                    |
|---------------------------------|--------|-----------------------|-------------|-------------------------------------------|
| [200](#route-get-templates-200) | OK     | NotificationTemplates |             | [schema](#route-get-templates-200-schema) |

#### Responses

##### 200 - NotificationTemplates

Status: OK

###### Schema

[NotificationTemplates](#notification-templates)

### Create a new alert rule. (*RoutePostAlertRule*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
POST /api/v1/provisioning/alert-rules
```

> Warning
> 
> This API is deprecated and will be removed in a future release. Use the Grafana App Platform alerting APIs instead: `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/alertrules` for alert rules and `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/recordingrules` for recording rules.

This action creates a new alert rule.

The provenance (`X-Disable-Provenance`) of the new rule must match the provenance configured for its rule group. Mixing provisioned and unprovisioned alert rules within the same rule group is not allowed.

#### Parameters

Expand table

| Name                         | Source | Type                                            | Go type                       | Required | Default | Description                                               |
|------------------------------|--------|-------------------------------------------------|-------------------------------|----------|---------|-----------------------------------------------------------|
| `X-Disable-Provenance: true` | header | string                                          | string                        |          |         | Allows editing of provisioned resources in the Grafana UI |
| `Body`                       | body   | [ProvisionedAlertRule](#provisioned-alert-rule) | `models.ProvisionedAlertRule` |          |         |                                                           |

#### All responses

Expand table

| Code                              | Status      | Description          | Has headers | Schema                                      |
|-----------------------------------|-------------|----------------------|-------------|---------------------------------------------|
| [201](#route-post-alert-rule-201) | Created     | ProvisionedAlertRule |             | [schema](#route-post-alert-rule-201-schema) |
| [400](#route-post-alert-rule-400) | Bad Request | ValidationError      |             | [schema](#route-post-alert-rule-400-schema) |

#### Responses

##### 201 - ProvisionedAlertRule

Status: Created

###### Schema

[ProvisionedAlertRule](#provisioned-alert-rule)

##### 400 - ValidationError

Status: Bad Request

###### Schema

[ValidationError](#validation-error)

### Create a contact point. (*RoutePostContactpoints*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
POST /api/v1/provisioning/contact-points
```

When creating a contact point, the `EmbeddedContactPoint.name` property determines if the new contact point is added to an existing one. In the UI, contact points with the same name are grouped together under a single contact point.

#### Parameters

Expand table

| Name                         | Source | Type                                            | Go type                       | Required | Default | Description                                               |
|------------------------------|--------|-------------------------------------------------|-------------------------------|----------|---------|-----------------------------------------------------------|
| `X-Disable-Provenance: true` | header | string                                          | string                        |          |         | Allows editing of provisioned resources in the Grafana UI |
| `Body`                       | body   | [EmbeddedContactPoint](#embedded-contact-point) | `models.EmbeddedContactPoint` |          |         |                                                           |

#### All responses

Expand table

| Code                                 | Status      | Description          | Has headers | Schema                                         |
|--------------------------------------|-------------|----------------------|-------------|------------------------------------------------|
| [202](#route-post-contactpoints-202) | Accepted    | EmbeddedContactPoint |             | [schema](#route-post-contactpoints-202-schema) |
| [400](#route-post-contactpoints-400) | Bad Request | ValidationError      |             | [schema](#route-post-contactpoints-400-schema) |

#### Responses

##### 202 - EmbeddedContactPoint

Status: Accepted

###### Schema

[EmbeddedContactPoint](#embedded-contact-point)

##### 400 - ValidationError

Status: Bad Request

###### Schema

[ValidationError](#validation-error)

### Create a new mute timing. (*RoutePostMuteTiming*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
POST /api/v1/provisioning/mute-timings
```

#### Parameters

Expand table

| Name                         | Source | Type                                    | Go type                   | Required | Default | Description                                               |
|------------------------------|--------|-----------------------------------------|---------------------------|----------|---------|-----------------------------------------------------------|
| `X-Disable-Provenance: true` | header | string                                  | string                    |          |         | Allows editing of provisioned resources in the Grafana UI |
| `Body`                       | body   | [MuteTimeInterval](#mute-time-interval) | `models.MuteTimeInterval` |          |         |                                                           |

#### All responses

Expand table

| Code                               | Status      | Description      | Has headers | Schema                                       |
|------------------------------------|-------------|------------------|-------------|----------------------------------------------|
| [201](#route-post-mute-timing-201) | Created     | MuteTimeInterval |             | [schema](#route-post-mute-timing-201-schema) |
| [400](#route-post-mute-timing-400) | Bad Request | ValidationError  |             | [schema](#route-post-mute-timing-400-schema) |

#### Responses

##### 201 - MuteTimeInterval

Status: Created

###### Schema

[MuteTimeInterval](#mute-time-interval)

##### 400 - ValidationError

Status: Bad Request

###### Schema

[ValidationError](#validation-error)

### Update an existing alert rule. (*RoutePutAlertRule*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
PUT /api/v1/provisioning/alert-rules/:uid
```

> Warning
> 
> This API is deprecated and will be removed in a future release. Use the Grafana App Platform alerting APIs instead: `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/alertrules/{name}` for alert rules and `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/recordingrules/{name}` for recording rules.

#### Parameters

Expand table

| Name                         | Source | Type                                            | Go type                       | Required | Default | Description                                               |   |
|------------------------------|--------|-------------------------------------------------|-------------------------------|----------|---------|-----------------------------------------------------------|---|
| `UID`                        | path   | string                                          | string                        | ✓        |         | Alert rule UID                                            |   |
| `X-Disable-Provenance: true` | header | string                                          | string                        |          |         | Allows editing of provisioned resources in the Grafana UI |   |
| `Body`                       | body   | [ProvisionedAlertRule](#provisioned-alert-rule) | `models.ProvisionedAlertRule` |          |         |                                                           |   |

#### All responses

Expand table

| Code                             | Status      | Description          | Has headers | Schema                                     |
|----------------------------------|-------------|----------------------|-------------|--------------------------------------------|
| [200](#route-put-alert-rule-200) | OK          | ProvisionedAlertRule |             | [schema](#route-put-alert-rule-200-schema) |
| [400](#route-put-alert-rule-400) | Bad Request | ValidationError      |             | [schema](#route-put-alert-rule-400-schema) |

#### Responses

##### 200 - ProvisionedAlertRule

Status: OK

###### Schema

[ProvisionedAlertRule](#provisioned-alert-rule)

##### 400 - ValidationError

Status: Bad Request

###### Schema

[ValidationError](#validation-error)

### Create or update a rule group. (*RoutePutAlertRuleGroup*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
PUT /api/v1/provisioning/folder/:folderUid/rule-groups/:group
```

> Warning
> 
> This API is deprecated and will be removed in a future release. Use the Grafana App Platform alerting APIs instead: `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/alertrules` for alert rules and `/apis/rules.alerting.grafana.app/v0alpha1/namespaces/{namespace}/recordingrules` for recording rules.

This action also changes the provenance setting (`X-Disable-Provenance`) for all alert rules in the alert group.

#### Parameters

Expand table

| Name                         | Source | Type                                | Go type                 | Required | Default | Description                                                                                                             |
|------------------------------|--------|-------------------------------------|-------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------|
| `FolderUID`                  | path   | string                              | string                  | ✓        |         |                                                                                                                         |
| `Group`                      | path   | string                              | string                  | ✓        |         |                                                                                                                         |
| `X-Disable-Provenance: true` | header | string                              | string                  |          |         | Allows editing of provisioned resources in the Grafana UI. This also applies to all alert rules within the alert group. |
| `Body`                       | body   | [AlertRuleGroup](#alert-rule-group) | `models.AlertRuleGroup` |          |         | This action is idempotent and rules included in this body will overwrite configured rules for the group                 |

#### All responses

Expand table

| Code                                   | Status      | Description     | Has headers | Schema                                           |
|----------------------------------------|-------------|-----------------|-------------|--------------------------------------------------|
| [200](#route-put-alert-rule-group-200) | OK          | AlertRuleGroup  |             | [schema](#route-put-alert-rule-group-200-schema) |
| [400](#route-put-alert-rule-group-400) | Bad Request | ValidationError |             | [schema](#route-put-alert-rule-group-400-schema) |

#### Responses

##### 200 - AlertRuleGroup

Status: OK

###### Schema

[AlertRuleGroup](#alert-rule-group)

##### 400 - ValidationError

Status: Bad Request

###### Schema

[ValidationError](#validation-error)

### Update an existing contact point. (*RoutePutContactpoint*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
PUT /api/v1/provisioning/contact-points/:uid
```

#### Parameters

Expand table

| Name                         | Source | Type                                            | Go type                       | Required | Default | Description                                               |
|------------------------------|--------|-------------------------------------------------|-------------------------------|----------|---------|-----------------------------------------------------------|
| `UID`                        | path   | string                                          | string                        | ✓        |         | UID is the contact point unique identifier                |
| `X-Disable-Provenance: true` | header | string                                          | string                        |          |         | Allows editing of provisioned resources in the Grafana UI |
| `Body`                       | body   | [EmbeddedContactPoint](#embedded-contact-point) | `models.EmbeddedContactPoint` |          |         |                                                           |

#### All responses

Expand table

| Code                               | Status      | Description     | Has headers | Schema                                       |
|------------------------------------|-------------|-----------------|-------------|----------------------------------------------|
| [202](#route-put-contactpoint-202) | Accepted    | Ack             |             | [schema](#route-put-contactpoint-202-schema) |
| [400](#route-put-contactpoint-400) | Bad Request | ValidationError |             | [schema](#route-put-contactpoint-400-schema) |

#### Responses

##### 202 - Ack

Status: Accepted

###### Schema

[Ack](#ack)

##### 400 - ValidationError

Status: Bad Request

###### Schema

[ValidationError](#validation-error)

### Replace an existing mute timing. (*RoutePutMuteTiming*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
PUT /api/v1/provisioning/mute-timings/:name
```

#### Parameters

Expand table

| Name                         | Source | Type                                    | Go type                   | Required | Default | Description                                               |
|------------------------------|--------|-----------------------------------------|---------------------------|----------|---------|-----------------------------------------------------------|
| `name`                       | path   | string                                  | string                    | ✓        |         | Mute timing name                                          |
| `X-Disable-Provenance: true` | header | string                                  | string                    |          |         | Allows editing of provisioned resources in the Grafana UI |
| `Body`                       | body   | [MuteTimeInterval](#mute-time-interval) | `models.MuteTimeInterval` |          |         |                                                           |

#### All responses

Expand table

| Code                              | Status      | Description        | Has headers | Schema                                      |
|-----------------------------------|-------------|--------------------|-------------|---------------------------------------------|
| [200](#route-put-mute-timing-200) | OK          | MuteTimeInterval   |             | [schema](#route-put-mute-timing-200-schema) |
| [400](#route-put-mute-timing-400) | Bad Request | ValidationError    |             | [schema](#route-put-mute-timing-400-schema) |
| [409](#route-put-mute-timing-409) | Conflict    | GenericPublicError |             | [schema](#route-put-mute-timing-409-schema) |

#### Responses

##### 200 - MuteTimeInterval

Status: OK

###### Schema

[MuteTimeInterval](#mute-time-interval)

##### 400 - ValidationError

Status: Bad Request

###### Schema

[ValidationError](#validation-error)

##### 409 - Conflict

Status: Conflict

###### Schema

[GenericPublicError](#generic-public-error)

### Sets the notification policy tree. (*RoutePutPolicyTree*)

> Warning
> 
> Since the policy tree is a single resource, provisioning it will overwrite all policies in the notification policy tree. However, it does not affect internal policies created when alert rules directly select a contact point.

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
PUT /api/v1/provisioning/policies
```

#### Parameters

Expand table

| Name                         | Source | Type            | Go type        | Required | Default | Description                                               |
|------------------------------|--------|-----------------|----------------|----------|---------|-----------------------------------------------------------|
| `X-Disable-Provenance: true` | header | string          | string         |          |         | Allows editing of provisioned resources in the Grafana UI |
| `Body`                       | body   | [Route](#route) | `models.Route` |          |         | The new notification routing tree to use                  |

#### All responses

Expand table

| Code                              | Status      | Description     | Has headers | Schema                                      |
|-----------------------------------|-------------|-----------------|-------------|---------------------------------------------|
| [202](#route-put-policy-tree-202) | Accepted    | Ack             |             | [schema](#route-put-policy-tree-202-schema) |
| [400](#route-put-policy-tree-400) | Bad Request | ValidationError |             | [schema](#route-put-policy-tree-400-schema) |

#### Responses

##### 202 - Ack

Status: Accepted

###### Schema

[Ack](#ack)

##### 400 - ValidationError

Status: Bad Request

###### Schema

[ValidationError](#validation-error)

### Create or update a notification template group. (*RoutePutTemplate*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
PUT /api/v1/provisioning/templates/:name
```

#### Parameters

Expand table

| Name                         | Source | Type                                                          | Go type                              | Required | Default | Description                                               |   |
|------------------------------|--------|---------------------------------------------------------------|--------------------------------------|----------|---------|-----------------------------------------------------------|---|
| `name`                       | path   | string                                                        | string                               | ✓        |         | Name of the template group                                |   |
| `X-Disable-Provenance: true` | header | string                                                        | string                               |          |         | Allows editing of provisioned resources in the Grafana UI |   |
| `Body`                       | body   | [NotificationTemplateContent](#notification-template-content) | `models.NotificationTemplateContent` |          |         |                                                           |   |

#### All responses

Expand table

| Code                           | Status      | Description          | Has headers | Schema                                   |
|--------------------------------|-------------|----------------------|-------------|------------------------------------------|
| [202](#route-put-template-202) | Accepted    | NotificationTemplate |             | [schema](#route-put-template-202-schema) |
| [400](#route-put-template-400) | Bad Request | GenericPublicError   |             | [schema](#route-put-template-400-schema) |
| [409](#route-put-template-409) | Conflict    | GenericPublicError   |             | [schema](#route-put-template-409-schema) |

#### Responses

##### 202 - NotificationTemplate

Status: Accepted

###### Schema

[NotificationTemplate](#notification-template)

##### 400 - ValidationError

Status: Bad Request

###### Schema

[GenericPublicError](#generic-public-error)

##### 409 - Conflict

Status: Conflict

###### Schema

[GenericPublicError](#generic-public-error)

### Clears the notification policy tree. (*RouteResetPolicyTree*)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
DELETE /api/v1/provisioning/policies
```

#### All responses

Expand table

| Code                                | Status   | Description | Has headers | Schema                                        |
|-------------------------------------|----------|-------------|-------------|-----------------------------------------------|
| [202](#route-reset-policy-tree-202) | Accepted | Ack         |             | [schema](#route-reset-policy-tree-202-schema) |

#### Responses

##### 202 - Ack

Status: Accepted

###### Schema

[Ack](#ack)

## Models

### Ack

[interface{}](#interface)

### AlertQuery

**Properties**

Expand table

| Name                | Type                                      | Go type             | Required | Default | Description                                                                                                          | Example |
|---------------------|-------------------------------------------|---------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------|---------|
| `datasourceUid`     | string                                    | string              |          |         | Grafana data source unique identifier; it should be ‘**expr**’ for a Server Side Expression operation.               |         |
| `model`             | [interface{}](#interface)                 | `interface{}`       |          |         | JSON is the raw JSON query and includes the above properties as well as custom properties.                           |         |
| `queryType`         | string                                    | string              |          |         | QueryType is an optional identifier for the type of query. It can be used to distinguish different types of queries. |         |
| `refId`             | string                                    | string              |          |         | RefID is the unique identifier of the query, set by the frontend call.                                               |         |
| `relativeTimeRange` | [RelativeTimeRange](#relative-time-range) | `RelativeTimeRange` |          |         |                                                                                                                      |         |

### AlertQueryExport

**Properties**

Expand table

| Name                | Type                                      | Go type             | Required | Default | Description | Example |
|---------------------|-------------------------------------------|---------------------|----------|---------|-------------|---------|
| `datasourceUid`     | string                                    | string              |          |         |             |         |
| `model`             | [interface{}](#interface)                 | `interface{}`       |          |         |             |         |
| `queryType`         | string                                    | string              |          |         |             |         |
| `refId`             | string                                    | string              |          |         |             |         |
| `relativeTimeRange` | [RelativeTimeRange](#relative-time-range) | `RelativeTimeRange` |          |         |             |         |

### AlertRuleExport

**Properties**

Expand table

| Name            | Type                                       | Go type               | Required | Default | Description                                                                                         | Example |
|-----------------|--------------------------------------------|-----------------------|----------|---------|-----------------------------------------------------------------------------------------------------|---------|
| `annotations`   | map of string                              | `map[string]string`   |          |         |                                                                                                     |         |
| `condition`     | string                                     | string                |          |         |                                                                                                     |         |
| `dashboardUid`  | string                                     | string                |          |         |                                                                                                     |         |
| `data`          | \[][AlertQueryExport](#alert-query-export) | `[]*AlertQueryExport` |          |         |                                                                                                     |         |
| `execErrState`  | string                                     | string                |          |         |                                                                                                     |         |
| `for`           | [Duration](#duration)                      | Duration              |          |         |                                                                                                     |         |
| `keepFiringFor` | [Duration](#duration)                      | Duration              |          |         | How long the alert continues to fire after the condition is no longer met. Prevents alert flapping. | `2m`    |
| `isPaused`      | boolean                                    | `bool`                |          |         |                                                                                                     |         |
| `labels`        | map of string                              | `map[string]string`   |          |         |                                                                                                     |         |
| `noDataState`   | string                                     | string                |          |         |                                                                                                     |         |
| `panelId`       | int64 (formatted integer)                  | int64                 |          |         |                                                                                                     |         |
| `title`         | string                                     | string                |          |         |                                                                                                     |         |
| `uid`           | string                                     | string                |          |         |                                                                                                     |         |

### AlertRuleGroup

**Properties**

Expand table

| Name        | Type                                               | Go type                   | Required | Default | Description | Example |
|-------------|----------------------------------------------------|---------------------------|----------|---------|-------------|---------|
| `folderUid` | string                                             | string                    |          |         |             |         |
| `interval`  | int64 (formatted integer)                          | int64                     |          |         |             |         |
| `rules`     | \[][ProvisionedAlertRule](#provisioned-alert-rule) | `[]*ProvisionedAlertRule` |          |         |             |         |
| `title`     | string                                             | string                    |          |         |             |         |

### AlertRuleGroupExport

**Properties**

Expand table

| Name       | Type                                     | Go type              | Required | Default | Description | Example |
|------------|------------------------------------------|----------------------|----------|---------|-------------|---------|
| `folder`   | string                                   | string               |          |         |             |         |
| `interval` | [Duration](#duration)                    | Duration             |          |         |             |         |
| `name`     | string                                   | string               |          |         |             |         |
| `orgId`    | int64 (formatted integer)                | int64                |          |         |             |         |
| `rules`    | \[][AlertRuleExport](#alert-rule-export) | `[]*AlertRuleExport` |          |         |             |         |

### AlertingFileExport

**Properties**

Expand table

| Name            | Type                                                       | Go type                       | Required | Default | Description | Example |
|-----------------|------------------------------------------------------------|-------------------------------|----------|---------|-------------|---------|
| `apiVersion`    | int64 (formatted integer)                                  | int64                         |          |         |             |         |
| `contactPoints` | \[][ContactPointExport](#contact-point-export)             | `[]*ContactPointExport`       |          |         |             |         |
| `groups`        | \[][AlertRuleGroupExport](#alert-rule-group-export)        | `[]*AlertRuleGroupExport`     |          |         |             |         |
| `policies`      | \[][NotificationPolicyExport](#notification-policy-export) | `[]*NotificationPolicyExport` |          |         |             |         |

### ContactPointExport

**Properties**

Expand table

| Name        | Type                                  | Go type             | Required | Default | Description | Example |
|-------------|---------------------------------------|---------------------|----------|---------|-------------|---------|
| `name`      | string                                | string              |          |         |             |         |
| `orgId`     | int64 (formatted integer)             | int64               |          |         |             |         |
| `receivers` | \[][ReceiverExport](#receiver-export) | `[]*ReceiverExport` |          |         |             |         |

### ContactPoints

\[][EmbeddedContactPoint](#embedded-contact-point)

### Duration

Expand table

| Name       | Type   | Go type | Default | Description | Example |
|------------|--------|---------|---------|-------------|---------|
| `Duration` | string | int64   |         |             |         |

### EmbeddedContactPoint

EmbeddedContactPoint is the contact point type used by Grafana-managed alerts.

When creating a contact point, the `EmbeddedContactPoint.name` property determines if the new contact point is added to an existing one. In the UI, contact points with the same name are grouped together under a single contact point.

**Properties**

Expand table

| Name                    | Type          | Go type | Required | Default | Description                                                                        | Example                 |
|-------------------------|---------------|---------|----------|---------|------------------------------------------------------------------------------------|-------------------------|
| `disableResolveMessage` | boolean       | `bool`  |          |         |                                                                                    | false                   |
| `name`                  | string        | string  |          |         | `name` groups multiple contact points with the same name in the UI.                | `webhook_1`             |
| `provenance`            | string        | string  |          |         |                                                                                    |                         |
| `settings`              | [JSON](#json) | JSON    | ✓        |         |                                                                                    |                         |
| `type`                  | string        | string  | ✓        |         |                                                                                    | `webhook`               |
| `uid`                   | string        | string  |          |         | UID is the unique identifier of the contact point. The UID can be set by the user. | `my_external_reference` |

### Json

[interface{}](#interface)

### MatchRegexps

[MatchRegexps](#match-regexps)

### MatchType

Expand table

| Name        | Type                      | Go type | Default | Description | Example |
|-------------|---------------------------|---------|---------|-------------|---------|
| `MatchType` | int64 (formatted integer) | int64   |         |             |         |

### Matcher

**Properties**

Expand table

| Name    | Type                     | Go type   | Required | Default | Description | Example |
|---------|--------------------------|-----------|----------|---------|-------------|---------|
| `Name`  | string                   | string    |          |         |             |         |
| `Type`  | [MatchType](#match-type) | MatchType |          |         |             |         |
| `Value` | string                   | string    |          |         |             |         |

### Matchers

> Matchers is a slice of Matchers that is sortable, implements Stringer, and provides a Matches method to match a LabelSet against all Matchers in the slice. Note that some users of Matchers might require it to be sorted.

\[][Matcher](#matcher)

### MuteTimeInterval

**Properties**

Expand table

| Name             | Type                              | Go type           | Required | Default | Description         | Example |
|------------------|-----------------------------------|-------------------|----------|---------|---------------------|---------|
| `name`           | string                            | string            |          |         |                     |         |
| `time_intervals` | \[][TimeInterval](#time-interval) | `[]*TimeInterval` |          |         |                     |         |
| `version`        | string                            | string            |          |         | Version of resource |         |

### MuteTimingExport

**Properties**

### MuteTimingsExport

**Properties**

### MuteTimings

\[][MuteTimeInterval](#mute-time-interval)

### NotFound

[interface{}](#interface)

### NotificationPolicyExport

**Properties**

Expand table

| Name     | Type                         | Go type                      | Required | Default | Description | Example |
|----------|------------------------------|------------------------------|----------|---------|-------------|---------|
| `Policy` | [RouteExport](#route-export) | [RouteExport](#route-export) |          |         | inline      |         |
| `orgId`  | int64 (formatted integer)    | int64                        |          |         |             |         |

### NotificationTemplate

**Properties**

Expand table

| Name         | Type                      | Go type                   | Required | Default | Description         | Example |
|--------------|---------------------------|---------------------------|----------|---------|---------------------|---------|
| `name`       | string                    | string                    |          |         |                     |         |
| `provenance` | [Provenance](#provenance) | [Provenance](#provenance) |          |         |                     |         |
| `template`   | string                    | string                    |          |         |                     |         |
| `version`    | string                    | string                    |          |         | Version of resource |         |

### NotificationTemplateContent

**Properties**

Expand table

| Name       | Type   | Go type | Required | Default | Description                                             | Example |
|------------|--------|---------|----------|---------|---------------------------------------------------------|---------|
| `template` | string | string  |          |         |                                                         |         |
| `version`  | string | string  |          |         | Version of resource. Should be empty for new templates. |         |

### NotificationTemplates

\[][NotificationTemplate](#notification-template)

### ObjectMatchers

[Matchers](#matchers)

#### Inlined models

### PermissionDenied

[interface{}](#interface)

### Provenance

Expand table

| Name         | Type   | Go type | Default | Description | Example |
|--------------|--------|---------|---------|-------------|---------|
| `Provenance` | string | string  |         |             |         |

### ProvisionedAlertRule

**Properties**

Expand table

| Name          | Type                          | Go type                   | Required | Default | Description                                                                                                               | Example                                                                                                                                                                                                                                                                                                                                                                                                                          |
|---------------|-------------------------------|---------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `annotations` | map of string                 | `map[string]string`       |          |         | Optional key-value pairs. `__dashboardUid__` and `__panelId__` must be set together; one cannot be set without the other. | `{"runbook_url":"https://supercoolrunbook.com/page/13"}`                                                                                                                                                                                                                                                                                                                                                                         |
| `condition`   | string                        | string                    | ✓        |         |                                                                                                                           | `A`                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data`        | \[][AlertQuery](#alert-query) | `[]*AlertQuery`           | ✓        |         |                                                                                                                           | `[{"datasourceUid":"__expr__","model":{"conditions":[{"evaluator":{"params":[0,0],"type":"gt"},"operator":{"type":"and"},"query":{"params":[]},"reducer":{"params":[],"type":"avg"},"type":"query"}],"datasource":{"type":"__expr__","uid":"__expr__"},"expression":"1 == 1","hide":false,"intervalMs":1000,"maxDataPoints":43200,"refId":"A","type":"math"},"queryType":"","refId":"A","relativeTimeRange":{"from":0,"to":0}}]` |
| execErrState  | string                        | string                    | ✓        |         |                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `folderUID`   | string                        | string                    | ✓        |         |                                                                                                                           | `project_x`                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `for`         | [Duration](#duration)         | [Duration](#duration)     | ✓        |         |                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `id`          | int64 (formatted integer)     | int64                     |          |         |                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `isPaused`    | boolean                       | `bool`                    |          |         |                                                                                                                           | `false`                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `labels`      | map of string                 | `map[string]string`       |          |         |                                                                                                                           | `{"team":"sre-team-1"}`                                                                                                                                                                                                                                                                                                                                                                                                          |
| `noDataState` | string                        | string                    | ✓        |         |                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `orgID`       | int64 (formatted integer)     | \`int64                   | ✓        |         |                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `provenance`  | [Provenance](#provenance)     | [Provenance](#provenance) |          |         |                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `record`      | [Record](#record)             | [Record](#record)         |          |         | Recording rule configuration. If present, this is a recording rule instead of an alert rule.                              | `{"metric":"http_requests:rate5m:sum","from":"A","target_datasource_uid":"my-prom"}`                                                                                                                                                                                                                                                                                                                                             |
| `ruleGroup`   | string                        | string                    | ✓        |         |                                                                                                                           | `eval_group_1`                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `title`       | string                        | string                    | ✓        |         |                                                                                                                           | `Always firing`                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `uid`         | string                        | string                    |          |         |                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `updated`     | date-time (formatted string)  | `strfmt.DateTime`         |          |         |                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                  |

### ProvisionedAlertRules

\[][ProvisionedAlertRule](#provisioned-alert-rule)

### RawMessage

[interface{}](#interface)

### Record

> Record defines the configuration for a recording rule, which pre-computes query results and saves them as a new time series metric.

**Properties**

Expand table

| Name                    | Type   | Go type | Required | Default | Description                                                                                                          | Example                        |
|-------------------------|--------|---------|----------|---------|----------------------------------------------------------------------------------------------------------------------|--------------------------------|
| `metric`                | string | string  | ✓        |         | The name of the new metric to create. Must be a valid Prometheus metric name with no whitespace.                     | `http_requests:rate5m:sum`     |
| `from`                  | string | string  | ✓        |         | The query reference ID (refId) to use as the source for the recorded metric.                                         | `A`                            |
| `target_datasource_uid` | string | string  |          |         | UID of the Prometheus-compatible data source to write results to. Falls back to configured default if not specified. | `my-prometheus-datasource-uid` |

### ReceiverExport

**Properties**

Expand table

| Name                    | Type                       | Go type    | Required | Default | Description | Example |
|-------------------------|----------------------------|------------|----------|---------|-------------|---------|
| `disableResolveMessage` | boolean                    | `bool`     |          |         |             |         |
| `settings`              | [RawMessage](#raw-message) | RawMessage |          |         |             |         |
| `type`                  | string                     | string     |          |         |             |         |
| `uid`                   | string                     | string     |          |         |             |         |

### Regexp

> A Regexp is safe for concurrent use by multiple goroutines, except for configuration methods, such as Longest.

[interface{}](#interface)

### RelativeTimeRange

> RelativeTimeRange is the per query start and end time for requests.

**Properties**

Expand table

| Name   | Type                  | Go type  | Required | Default | Description | Example |
|--------|-----------------------|----------|----------|---------|-------------|---------|
| `from` | [Duration](#duration) | Duration |          |         |             |         |
| `to`   | [Duration](#duration) | Duration |          |         |             |         |

### Route

> A Route is a node that contains definitions of how to handle alerts. This is modified from the upstream alertmanager in that it adds the ObjectMatchers property.

**Properties**

Expand table

| Name                  | Type                               | Go type             | Required | Default | Description                             | Example |
|-----------------------|------------------------------------|---------------------|----------|---------|-----------------------------------------|---------|
| `continue`            | boolean                            | `bool`              |          |         |                                         |         |
| `group_by`            | \[]string                          | `[]string`          |          |         |                                         |         |
| `group_interval`      | string                             | string              |          |         |                                         |         |
| `group_wait`          | string                             | string              |          |         |                                         |         |
| `match`               | map of string                      | `map[string]string` |          |         | Deprecated. Remove before v1.0 release. |         |
| `match_re`            | [MatchRegexps](#match-regexps)     | `MatchRegexps`      |          |         |                                         |         |
| `matchers`            | [Matchers](#matchers)              | `Matchers`          |          |         |                                         |         |
| `mute_time_intervals` | \[]string                          | `[]string`          |          |         |                                         |         |
| `object_matchers`     | [ObjectMatchers](#object-matchers) | `ObjectMatchers`    |          |         |                                         |         |
| `provenance`          | [Provenance](#provenance)          | Provenance          |          |         |                                         |         |
| `receiver`            | string                             | string              |          |         |                                         |         |
| `repeat_interval`     | string                             | string              |          |         |                                         |         |
| `routes`              | \[][Route](#route)                 | `[]*Route`          |          |         |                                         |         |

### RouteExport

> RouteExport is the provisioned file export of definitions.Route. This is needed to hide fields that aren’t usable in provisioning file format. An alternative would be to define a custom MarshalJSON and MarshalYAML that excludes them.

**Properties**

Expand table

| Name                  | Type                               | Go type             | Required | Default | Description                             | Example |
|-----------------------|------------------------------------|---------------------|----------|---------|-----------------------------------------|---------|
| `continue`            | boolean                            | `bool`              |          |         |                                         |         |
| `group_by`            | \[]string                          | `[]string`          |          |         |                                         |         |
| `group_interval`      | string                             | string              |          |         |                                         |         |
| `group_wait`          | string                             | string              |          |         |                                         |         |
| `match`               | map of string                      | `map[string]string` |          |         | Deprecated. Remove before v1.0 release. |         |
| `match_re`            | [MatchRegexps](#match-regexps)     | `MatchRegexps`      |          |         |                                         |         |
| `matchers`            | [Matchers](#matchers)              | `Matchers`          |          |         |                                         |         |
| `mute_time_intervals` | \[]string                          | `[]string`          |          |         |                                         |         |
| `object_matchers`     | [ObjectMatchers](#object-matchers) | `ObjectMatchers`    |          |         |                                         |         |
| `receiver`            | string                             | string              |          |         |                                         |         |
| `repeat_interval`     | string                             | string              |          |         |                                         |         |
| `routes`              | \[][RouteExport](#route-export)    | `[]*RouteExport`    |          |         |                                         |         |

### TimeInterval

> TimeInterval describes intervals of time. ContainsTime will tell you if a golang time is contained within the interval.

**Properties**

Expand table

| Name            | Type                        | Go type        | Required | Default | Description | Example |
|-----------------|-----------------------------|----------------|----------|---------|-------------|---------|
| `days_of_month` | \[]string                   | \[]string      |          |         |             |         |
| `location`      | string                      | string         |          |         |             |         |
| `months`        | \[]string                   | \[]string      |          |         |             |         |
| `times`         | \[][TimeRange](#time-range) | `[]*TimeRange` |          |         |             |         |
| `weekdays`      | \[]string                   | \[]string      |          |         |             |         |
| `years`         | \[]string                   | \[]string      |          |         |             |         |

### TimeRange

> For example, 4:00PM to End of the day would Begin at 1020 and End at 1440.

**Properties**

Expand table

| Name         | Type   | Go type | Required | Default | Description | Example                 |
|--------------|--------|---------|----------|---------|-------------|-------------------------|
| `end_time`   | string | string  |          |         |             | `"end_time": "24:00"`   |
| `start_time` | string | string  |          |         |             | `"start_time": "18:00"` |

### ValidationError

**Properties**

Expand table

| Name  | Type   | Go type | Required | Default | Description | Example         |
|-------|--------|---------|----------|---------|-------------|-----------------|
| `msg` | string | string  |          |         |             | `error message` |

### GenericPublicError

**Properties**

Expand table

| Name         | Type       | Go type          | Required | Default | Description                                                              | Example |
|--------------|------------|------------------|----------|---------|--------------------------------------------------------------------------|---------|
| `statusCode` | string     | string           | ✓        |         | HTTP Status Code                                                         |         |
| `messageId`  | string     | string           | ✓        |         | Unique code of the error                                                 |         |
| `message`    | string     | string           |          |         | Error message                                                            |         |
| `extra`      | map of any | `map[string]any` |          |         | Extra information about the error. Format is specific to the error code. |         |
