---
title: "Export all alert rules in provisioning file format."
method: GET
path: "/v1/provisioning/alert-rules/export"
tags: ["provisioning"]
---

# Export all alert rules in provisioning file format.

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

## Query parameters

- `download` boolean
- `format` 'yaml' | 'json' | 'hcl'
- `folderUid` string[]
- `group` string
- `ruleUid` string

## Response `200`

AlertingFileExport

- AlertingFileExport
  - `apiVersion` integer
  - `contactPoints` ContactPointExport[]
    - `name` string
    - `orgId` integer
    - `receivers` ReceiverExport[]
      - `disableResolveMessage` boolean
      - `settings` RawMessage
      - `type` string
      - `uid` string
  - `groups` AlertRuleGroupExport[]
    - `folder` string
    - `interval` integer — A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
    - `name` string
    - `orgId` integer
    - `rules` AlertRuleExport[]
      - `annotations` object
      - `condition` string
      - `dashboardUid` string
      - `data` AlertQueryExport[]
        - `datasourceUid` string
        - `model` object
        - `queryType` string
        - `refId` string
        - `relativeTimeRange` RelativeTimeRangeExport
          - `from` integer
          - `to` integer
      - `execErrState` 'OK' | 'Alerting' | 'Error'
      - `for` integer — A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
      - `isPaused` boolean
      - `keepFiringFor` integer — A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
      - `labels` object
      - `missing_series_evals_to_resolve` integer
      - `noDataState` 'Alerting' | 'NoData' | 'OK'
      - `notification_settings` AlertRuleNotificationSettingsExport
        - `active_time_intervals` string[]
        - `group_by` string[]
        - `group_interval` string
        - `group_wait` string
        - `mute_time_intervals` string[]
        - `receiver` string
        - `repeat_interval` string
      - `panelId` integer
      - `record` AlertRuleRecordExport
        - `from` string
        - `metric` string
        - `targetDatasourceUid` string
      - `title` string
      - `uid` string
  - `muteTimes` MuteTimeIntervalExport[]
    - `name` string
    - `orgId` integer
    - `time_intervals` TimeInterval[]
      - `name` string
      - `time_intervals` TimeInterval[]
  - `policies` NotificationPolicyExport[]
    - `active_time_intervals` string[]
    - `continue` boolean
    - `group_by` string[]
    - `group_interval` string
    - `group_wait` string
    - `match` object — Deprecated. Remove before v1.0 release.
    - `match_re` MatchRegexps
    - `matchers` Matcher[] — 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.
      - `Name` string
      - `Type` integer
      - `Value` string
    - `mute_time_intervals` string[]
    - `object_matchers` ObjectMatcher[]
      - string[]
    - `orgId` integer
    - `receiver` string
    - `repeat_interval` string
    - `routes` RouteExport[]
      - `active_time_intervals` string[]
      - `continue` boolean
      - `group_by` string[]
      - `group_interval` string
      - `group_wait` string
      - `match` object — Deprecated. Remove before v1.0 release.
      - `match_re` MatchRegexps
      - `matchers` Matcher[] — 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.
        - `Name` string
        - `Type` integer
        - `Value` string
      - `mute_time_intervals` string[]
      - `object_matchers` ObjectMatcher[]
        - string[]
      - `receiver` string
      - `repeat_interval` string
      - `routes` RouteExport[]

## Other responses

- `403` — ForbiddenError
- `404` — Not found.

---

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