openapi: 3.0.3 info: title: Grafana HTTP Access Exports API description: The Grafana HTTP API provides programmatic access to Grafana's core functionality including dashboards, data sources, alerts, users, organizations, folders, annotations, and teams. Authentication is handled via API keys, basic auth, or OAuth tokens passed in the Authorization header. version: 11.0.0 contact: name: Grafana Labs url: https://grafana.com license: name: AGPL-3.0 url: https://www.gnu.org/licenses/agpl-3.0.html servers: - url: https://{instance}.grafana.net/api description: Grafana Cloud variables: instance: default: your-instance - url: http://localhost:3000/api description: Local Grafana instance security: - BearerAuth: [] - BasicAuth: [] - ApiKeyAuth: [] tags: - name: Exports paths: /v1/provisioning/alert-rules/export: parameters: [] get: tags: - Exports summary: Grafana Route Get Alert Rules Export description: This API operation retrieves alert rules from Grafana in an exportable format, allowing administrators to extract alert rule configurations for backup, migration, or version control purposes. The GET endpoint at /v1/provisioning/alert-rules/export provides a way to programmatically access the complete definition of configured alert rules, including their conditions, notification settings, and metadata. This is particularly useful for maintaining infrastructure as code, replicating alert configurations across multiple Grafana instances, or creating snapshots of monitoring setups for disaster recovery scenarios. operationId: routeGetAlertRulesExport parameters: - name: download in: query description: Whether to initiate a download of the file or not. style: form explode: true schema: type: boolean default: false - name: format in: query description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. style: form explode: true schema: allOf: - $ref: '#/components/schemas/format' - description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. - name: folderUid in: query description: UIDs of folders from which to export rules style: form explode: true schema: type: array items: type: string - name: group in: query description: Name of group of rules to export. Must be specified only together with a single folder UID style: form explode: true schema: type: string - name: ruleUid in: query description: UID of alert rule to export. If specified, parameters folderUid and group must be empty. style: form explode: true schema: type: string responses: '200': description: AlertingFileExport headers: {} content: application/json: schema: $ref: '#/components/schemas/AlertingFileExportisthefullprovisionedfileexport.' application/yaml: schema: contentMediaType: application/yaml application/terraform+hcl: schema: contentMediaType: application/terraform+hcl text/yaml: schema: contentMediaType: text/yaml text/hcl: schema: contentMediaType: text/hcl '404': description: Not found. headers: {} content: {} deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/alert-rules/{UID}/export: parameters: [] get: tags: - Exports summary: Grafana Route Get Alert Rule Export description: The Get Alert Rule Export endpoint allows you to export a specific alert rule configuration from Grafana by providing its unique identifier (UID). This operation retrieves the complete alert rule definition in a format suitable for provisioning, enabling you to back up, version control, or migrate alert rules between Grafana instances. By making a GET request to /v1/provisioning/alert-rules/{UID}/export, you can obtain the alert rule's configuration including its conditions, notification settings, labels, and annotations in a structured format that can be used for declarative configuration management or importing into other Grafana environments. operationId: routeGetAlertRuleExport parameters: - name: download in: query description: Whether to initiate a download of the file or not. style: form explode: true schema: type: boolean default: false - name: format in: query description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. style: form explode: true schema: allOf: - $ref: '#/components/schemas/format' - description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. - name: UID in: path description: Alert rule UID required: true schema: type: string responses: '200': description: AlertingFileExport headers: {} content: application/json: schema: $ref: '#/components/schemas/AlertingFileExportisthefullprovisionedfileexport.' application/yaml: schema: contentMediaType: application/yaml application/terraform+hcl: schema: contentMediaType: application/terraform+hcl text/yaml: schema: contentMediaType: text/yaml text/hcl: schema: contentMediaType: text/hcl '404': description: Not found. headers: {} content: {} deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/contact-points/export: parameters: [] get: tags: - Exports summary: Grafana Route Get Contactpoints Export description: This API operation retrieves the exported configuration of contact points from Grafana's provisioning system. It uses a GET request to the `/v1/provisioning/contact-points/export` endpoint and returns contact point definitions that can be used for backup, migration, or version control purposes. Contact points define how and where Grafana sends alert notifications, such as email addresses, Slack webhooks, or PagerDuty integrations, and exporting them allows administrators to maintain consistent alerting configurations across different Grafana instances or to preserve configurations as code. operationId: routeGetContactpointsExport parameters: - name: download in: query description: Whether to initiate a download of the file or not. style: form explode: true schema: type: boolean default: false - name: format in: query description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. style: form explode: true schema: allOf: - $ref: '#/components/schemas/format' - description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. - name: decrypt in: query description: 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. style: form explode: true schema: type: boolean default: false - name: name in: query description: Filter by name style: form explode: true schema: type: string responses: '200': description: AlertingFileExport headers: {} content: application/json: schema: $ref: '#/components/schemas/AlertingFileExportisthefullprovisionedfileexport.' application/yaml: schema: contentMediaType: application/yaml application/terraform+hcl: schema: contentMediaType: application/terraform+hcl text/yaml: schema: contentMediaType: text/yaml text/hcl: schema: contentMediaType: text/hcl '403': description: PermissionDenied headers: {} content: application/json: schema: type: object contentMediaType: application/json application/yaml: schema: contentMediaType: application/yaml application/terraform+hcl: schema: contentMediaType: application/terraform+hcl text/yaml: schema: contentMediaType: text/yaml text/hcl: schema: contentMediaType: text/hcl deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export: parameters: [] get: tags: - Exports summary: Grafana Route Get Alert Rule Group Export description: This API operation retrieves and exports a specific alert rule group from Grafana's provisioning system by providing both the parent folder's unique identifier (FolderUID) and the alert rule group name (Group) as path parameters. It allows users to obtain the complete configuration of an alert rule group in an exportable format, which can be used for backup purposes, migration between Grafana instances, or version control of alerting configurations. The GET method ensures this is a read-only operation that doesn't modify any existing alert rule configurations. operationId: routeGetAlertRuleGroupExport parameters: - name: download in: query description: Whether to initiate a download of the file or not. style: form explode: true schema: type: boolean default: false - name: format in: query description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. style: form explode: true schema: allOf: - $ref: '#/components/schemas/format' - description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. - name: FolderUID in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '200': description: AlertingFileExport headers: {} content: application/json: schema: $ref: '#/components/schemas/AlertingFileExportisthefullprovisionedfileexport.' application/yaml: schema: contentMediaType: application/yaml application/terraform+hcl: schema: contentMediaType: application/terraform+hcl text/yaml: schema: contentMediaType: text/yaml text/hcl: schema: contentMediaType: text/hcl '404': description: Not found. headers: {} content: {} deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/mute-timings/export: parameters: [] get: tags: - Exports summary: Grafana Route Export Mute Timings description: The Route Export Mute Timings operation in Grafana's provisioning API allows users to retrieve and export configured mute timing definitions through a GET request to the /v1/provisioning/mute-timings/export endpoint. This endpoint provides a way to extract mute timing configurations, which define time-based rules for suppressing alert notifications during specific periods such as maintenance windows or off-hours. The exported data can be used for backup purposes, migration between Grafana instances, version control of alerting configurations, or as a basis for creating new mute timings with similar settings. This operation is particularly useful for administrators who need to document their alerting infrastructure, replicate configurations across multiple environments, or maintain a programmatic approach to managing notification silencing schedules. operationId: routeExportMuteTimings parameters: - name: download in: query description: Whether to initiate a download of the file or not. style: form explode: true schema: type: boolean default: false - name: format in: query description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. style: form explode: true schema: allOf: - $ref: '#/components/schemas/format' - description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. responses: '200': description: AlertingFileExport headers: {} content: application/json: schema: $ref: '#/components/schemas/AlertingFileExportisthefullprovisionedfileexport.' application/yaml: schema: contentMediaType: application/yaml application/terraform+hcl: schema: contentMediaType: application/terraform+hcl text/yaml: schema: contentMediaType: text/yaml text/hcl: schema: contentMediaType: text/hcl '403': description: PermissionDenied headers: {} content: application/json: schema: type: object contentMediaType: application/json application/yaml: schema: contentMediaType: application/yaml application/terraform+hcl: schema: contentMediaType: application/terraform+hcl text/yaml: schema: contentMediaType: text/yaml text/hcl: schema: contentMediaType: text/hcl deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/mute-timings/{name}/export: parameters: [] get: tags: - Exports summary: Grafana Route Export Mute Timing description: The Export Mute Timing API operation in Grafana allows users to retrieve and export the configuration details of a specific mute timing by providing its name as a path parameter. This GET endpoint is part of the provisioning API and enables administrators to programmatically access mute timing definitions, which are used to suppress alert notifications during specified time periods. The exported configuration can be used for backup purposes, migrating configurations between Grafana instances, or version controlling alerting infrastructure as code. By calling this endpoint with the mute timing's name, users receive the complete configuration in a format that can be stored, shared, or re-imported into Grafana systems. operationId: routeExportMuteTiming parameters: - name: download in: query description: Whether to initiate a download of the file or not. style: form explode: true schema: type: boolean default: false - name: format in: query description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. style: form explode: true schema: allOf: - $ref: '#/components/schemas/format' - description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. - name: name in: path description: Mute timing name required: true schema: type: string responses: '200': description: AlertingFileExport headers: {} content: application/json: schema: $ref: '#/components/schemas/AlertingFileExportisthefullprovisionedfileexport.' application/yaml: schema: contentMediaType: application/yaml application/terraform+hcl: schema: contentMediaType: application/terraform+hcl text/yaml: schema: contentMediaType: text/yaml text/hcl: schema: contentMediaType: text/hcl '403': description: PermissionDenied headers: {} content: application/json: schema: type: object contentMediaType: application/json application/yaml: schema: contentMediaType: application/yaml application/terraform+hcl: schema: contentMediaType: application/terraform+hcl text/yaml: schema: contentMediaType: text/yaml text/hcl: schema: contentMediaType: text/hcl deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/policies/export: parameters: [] get: tags: - Exports summary: Grafana Route Get Policy Tree Export description: This API operation retrieves and exports the complete policy tree structure from Grafana's provisioning system. It returns a comprehensive representation of all configured notification policies in an exportable format, which can be used for backup purposes, version control, or migration to other Grafana instances. The GET request to this endpoint provides administrators with a way to programmatically access and manage their alerting policy configurations outside of the Grafana UI, facilitating infrastructure-as-code practices and automated provisioning workflows. operationId: routeGetPolicyTreeExport parameters: [] responses: '200': description: AlertingFileExport headers: {} content: application/json: schema: $ref: '#/components/schemas/AlertingFileExportisthefullprovisionedfileexport.' application/yaml: schema: contentMediaType: application/yaml application/terraform+hcl: schema: contentMediaType: application/terraform+hcl text/yaml: schema: contentMediaType: text/yaml text/hcl: schema: contentMediaType: text/hcl '404': description: NotFound headers: {} content: application/json: schema: type: object contentMediaType: application/json application/yaml: schema: contentMediaType: application/yaml application/terraform+hcl: schema: contentMediaType: application/terraform+hcl text/yaml: schema: contentMediaType: text/yaml text/hcl: schema: contentMediaType: text/hcl deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true components: schemas: RelativeTimeRangeExport: title: RelativeTimeRangeExport type: object properties: from: type: integer contentEncoding: int64 to: type: integer contentEncoding: int64 Recordistheprovisionedexportofmodels.Record.: title: Recordistheprovisionedexportofmodels.Record. type: object properties: from: type: string metric: type: string targetDatasourceUid: type: string ExecErrState: title: ExecErrState enum: - OK - Alerting - Error type: string NoDataState: title: NoDataState enum: - Alerting - NoData - OK type: string AlertingFileExportisthefullprovisionedfileexport.: title: AlertingFileExportisthefullprovisionedfileexport. type: object properties: apiVersion: type: integer contentEncoding: int64 contactPoints: type: array items: $ref: '#/components/schemas/ContactPointExportistheprovisionedfileexportofalerting.ContactPointV1.' description: '' groups: type: array items: $ref: '#/components/schemas/AlertRuleGroupExportistheprovisionedfileexportofAlertRuleGroupV1.' description: '' muteTimes: type: array items: $ref: '#/components/schemas/MuteTimeIntervalExport' description: '' policies: type: array items: $ref: '#/components/schemas/NotificationPolicyExportistheprovisionedfileexportofalerting.NotificiationPolicyV1.' description: '' AlertRuleNotificationSettingsExportistheprovisionedexportofmodels.NotificationSettings.: title: AlertRuleNotificationSettingsExportistheprovisionedexportofmodels.NotificationSettings. type: object properties: active_time_intervals: type: array items: type: string description: '' group_by: type: array items: type: string description: '' group_interval: type: string group_wait: type: string mute_time_intervals: type: array items: type: string description: '' receiver: type: string repeat_interval: type: string Matchermodelsthematchingofalabel.: title: Matchermodelsthematchingofalabel. type: object properties: Name: type: string Type: type: integer contentEncoding: int64 Value: type: string ContactPointExportistheprovisionedfileexportofalerting.ContactPointV1.: title: ContactPointExportistheprovisionedfileexportofalerting.ContactPointV1. type: object properties: name: type: string orgId: type: integer contentEncoding: int64 receivers: type: array items: $ref: '#/components/schemas/ReceiverExportistheprovisionedfileexportofalerting.ReceiverV1.' description: '' TimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.: title: TimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted. type: object properties: name: type: string time_intervals: type: array items: $ref: '#/components/schemas/TimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.' description: '' AlertRuleGroupExportistheprovisionedfileexportofAlertRuleGroupV1.: title: AlertRuleGroupExportistheprovisionedfileexportofAlertRuleGroupV1. type: object properties: folder: type: string interval: type: integer description: '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.' contentEncoding: int64 name: type: string orgId: type: integer contentEncoding: int64 rules: type: array items: $ref: '#/components/schemas/AlertRuleExportistheprovisionedfileexportofmodels.AlertRule.' description: '' AlertRuleExportistheprovisionedfileexportofmodels.AlertRule.: title: AlertRuleExportistheprovisionedfileexportofmodels.AlertRule. type: object properties: annotations: type: object additionalProperties: type: string condition: type: string dashboardUid: type: string data: type: array items: $ref: '#/components/schemas/AlertQueryExportistheprovisionedexportofmodels.AlertQuery.' description: '' execErrState: $ref: '#/components/schemas/ExecErrState' for: type: integer description: '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.' contentEncoding: int64 isPaused: type: boolean keepFiringFor: type: integer description: '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.' contentEncoding: int64 labels: type: object additionalProperties: type: string missing_series_evals_to_resolve: type: integer contentEncoding: int64 noDataState: $ref: '#/components/schemas/NoDataState' notification_settings: $ref: '#/components/schemas/AlertRuleNotificationSettingsExportistheprovisionedexportofmodels.NotificationSettings.' panelId: type: integer contentEncoding: int64 record: $ref: '#/components/schemas/Recordistheprovisionedexportofmodels.Record.' title: type: string uid: type: string RouteExport: title: RouteExport type: object properties: active_time_intervals: type: array items: type: string description: '' continue: type: boolean group_by: type: array items: type: string description: '' group_interval: type: string group_wait: type: string match: type: object additionalProperties: type: string description: Deprecated. Remove before v1.0 release. match_re: type: object additionalProperties: type: string matchers: type: array items: $ref: '#/components/schemas/Matchermodelsthematchingofalabel.' description: '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.' mute_time_intervals: type: array items: type: string description: '' object_matchers: type: array items: type: array items: type: string receiver: type: string repeat_interval: type: string routes: type: array items: $ref: '#/components/schemas/RouteExport' description: '' description: 'RouteExport is the provisioned file export of definitions.Route. This is needed to hide fields that aren''t useable in provisioning file format. An alternative would be to define a custom MarshalJSON and MarshalYAML that excludes them.' NotificationPolicyExportistheprovisionedfileexportofalerting.NotificiationPolicyV1.: title: NotificationPolicyExportistheprovisionedfileexportofalerting.NotificiationPolicyV1. type: object properties: active_time_intervals: type: array items: type: string description: '' continue: type: boolean group_by: type: array items: type: string description: '' group_interval: type: string group_wait: type: string match: type: object additionalProperties: type: string description: Deprecated. Remove before v1.0 release. match_re: type: object additionalProperties: type: string matchers: type: array items: $ref: '#/components/schemas/Matchermodelsthematchingofalabel.' description: '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.' mute_time_intervals: type: array items: type: string description: '' object_matchers: type: array items: type: array items: type: string orgId: type: integer contentEncoding: int64 receiver: type: string repeat_interval: type: string routes: type: array items: $ref: '#/components/schemas/RouteExport' description: '' ReceiverExportistheprovisionedfileexportofalerting.ReceiverV1.: title: ReceiverExportistheprovisionedfileexportofalerting.ReceiverV1. type: object properties: disableResolveMessage: type: boolean settings: type: object type: type: string uid: type: string MuteTimeIntervalExport: title: MuteTimeIntervalExport type: object properties: name: type: string orgId: type: integer contentEncoding: int64 time_intervals: type: array items: $ref: '#/components/schemas/TimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.' description: '' format: title: format enum: - yaml - json - hcl type: string AlertQueryExportistheprovisionedexportofmodels.AlertQuery.: title: AlertQueryExportistheprovisionedexportofmodels.AlertQuery. type: object properties: datasourceUid: type: string model: type: object additionalProperties: {} queryType: type: string refId: type: string relativeTimeRange: $ref: '#/components/schemas/RelativeTimeRangeExport' securitySchemes: BearerAuth: type: http scheme: bearer description: Service account token or API key BasicAuth: type: http scheme: basic ApiKeyAuth: type: apiKey in: header name: Authorization description: 'Format: Bearer '