openapi: 3.0.3 info: title: Grafana HTTP Access Routes 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: Routes paths: /convert/api/prom/rules: parameters: [] get: tags: - Routes summary: Grafana Route Convert Prometheus Cortex Get Rules description: This API operation retrieves Prometheus or Cortex alerting and recording rules from a configured data source and converts them into Grafana's unified alerting format. It acts as a migration utility that fetches existing Prometheus-compatible rules and transforms them so they can be imported or managed within Grafana's alerting system, enabling users to consolidate their monitoring rules into Grafana's native rule structure while maintaining compatibility with Prometheus-style rule definitions. operationId: routeConvertPrometheusCortexGetRules parameters: [] responses: '200': description: PrometheusNamespace headers: {} content: application/yaml: schema: contentMediaType: application/yaml '403': description: ForbiddenError headers: {} content: application/yaml: schema: contentMediaType: application/yaml '404': description: NotFound headers: {} content: application/yaml: schema: contentMediaType: application/yaml deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true post: tags: - Routes summary: Grafana Route Convert Prometheus Cortex Post Rule Groups description: This API operation converts Prometheus or Cortex rule group configurations into Grafana's native format by accepting a POST request to the /convert/api/prom/rules endpoint. It enables users to migrate their existing Prometheus-style alerting and recording rules from Prometheus or Cortex deployments into Grafana, facilitating the transition between monitoring systems while preserving rule logic and structure. The endpoint processes the submitted rule groups and transforms them into a format compatible with Grafana's alerting engine, streamlining the configuration migration process and reducing manual conversion efforts. operationId: routeConvertPrometheusCortexPostRuleGroups parameters: - name: Content-Type in: header description: '' required: true schema: const: application/json type: string responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /convert/api/prom/rules/{NamespaceTitle}: parameters: [] get: tags: - Routes summary: Grafana Route Convert Prometheus Cortex Get Namespace description: This API operation retrieves and converts Prometheus or Cortex rule configurations from a specific namespace in Grafana. By making a GET request to the endpoint with a namespace title parameter, it fetches the alerting and recording rules defined within that namespace and converts them into a format compatible with Grafana's unified alerting system. This is particularly useful when migrating from Prometheus-style alerting rules to Grafana's native alerting framework, allowing users to maintain their existing rule configurations while leveraging Grafana's enhanced alerting capabilities and management features. operationId: routeConvertPrometheusCortexGetNamespace parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string responses: '200': description: PrometheusNamespace headers: {} content: application/yaml: schema: contentMediaType: application/yaml '403': description: ForbiddenError headers: {} content: application/yaml: schema: contentMediaType: application/yaml '404': description: NotFound headers: {} content: application/yaml: schema: contentMediaType: application/yaml deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true post: tags: - Routes summary: Grafana Route Convert Prometheus Cortex Post Rule Group description: The Grafana API operation POST /convert/api/prom/rules/{NamespaceTitle} converts and creates a Prometheus or Cortex rule group within a specified namespace. This endpoint accepts Prometheus-style rule definitions and transforms them into Grafana's native alert rule format, allowing users to migrate their existing Prometheus alerting and recording rules into Grafana's unified alerting system. The {NamespaceTitle} parameter identifies the target namespace where the converted rule group will be stored, enabling organized management of alert rules across different teams or services within Grafana. operationId: routeConvertPrometheusCortexPostRuleGroup parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string - name: x-grafana-alerting-datasource-uid in: header description: '' schema: type: string - name: x-grafana-alerting-recording-rules-paused in: header description: '' schema: type: boolean - name: x-grafana-alerting-alert-rules-paused in: header description: '' schema: type: boolean - name: x-grafana-alerting-target-datasource-uid in: header description: '' schema: type: string - name: x-grafana-alerting-folder-uid in: header description: '' schema: type: string - name: x-grafana-alerting-notification-settings in: header description: '' schema: type: string requestBody: description: '' content: application/yaml: schema: $ref: '#/components/schemas/PrometheusRuleGroup' required: false responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Routes summary: Grafana Route Convert Prometheus Cortex Delete Namespace description: This API operation deletes a specific Prometheus or Cortex rule namespace within Grafana's conversion or migration layer. By sending a DELETE request to the endpoint with a namespace title parameter, users can remove an entire namespace and its associated alert rules or recording rules that were previously converted or imported from Prometheus/Cortex format. This is useful during cleanup operations, when reorganizing rule structures, or when removing legacy configurations that have been migrated to Grafana's native rule format. operationId: routeConvertPrometheusCortexDeleteNamespace parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /convert/api/prom/rules/{NamespaceTitle}/{Group}: parameters: [] get: tags: - Routes summary: Grafana Route Convert Prometheus Cortex Get Rule Group description: 'This API operation retrieves a specific Prometheus rule group from a designated namespace in Grafana''s Cortex ruler service. The endpoint accepts two path parameters: NamespaceTitle which identifies the namespace containing the rule group, and Group which specifies the name of the rule group to retrieve. When called, it returns the configuration and rules defined within that particular rule group, allowing users to view and manage their Prometheus alerting and recording rules that have been converted or stored in the Cortex format within Grafana''s unified alerting system.' operationId: routeConvertPrometheusCortexGetRuleGroup parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '200': description: PrometheusRuleGroup headers: {} content: application/yaml: schema: contentMediaType: application/yaml '403': description: ForbiddenError headers: {} content: application/yaml: schema: contentMediaType: application/yaml '404': description: NotFound headers: {} content: application/yaml: schema: contentMediaType: application/yaml deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Routes summary: Grafana Route Convert Prometheus Cortex Delete Rule Group description: This API operation is used to delete a specific Prometheus rule group within Grafana's Cortex-based alerting system. It targets a rule group identified by both its namespace title and group name through the URL path parameters. When called with the DELETE HTTP method, it removes the entire rule group configuration from the specified namespace, effectively eliminating all alert and recording rules contained within that group from the Prometheus-compatible rules engine in Grafana. operationId: routeConvertPrometheusCortexDeleteRuleGroup parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /convert/prometheus/config/v1/rules: parameters: [] get: tags: - Routes summary: Grafana Route Convert Prometheus Get Rules description: This API operation retrieves Prometheus alerting and recording rules from a Grafana instance and converts them into a standardized configuration format. When a GET request is made to the /convert/prometheus/config/v1/rules endpoint, it fetches the existing Prometheus-style rules configured within Grafana and transforms them into a version 1 configuration schema, making it easier to migrate, backup, or integrate these rules with other systems or Prometheus instances. This is particularly useful for administrators who need to export their Grafana-managed Prometheus rules or maintain consistency across multiple monitoring environments. operationId: routeConvertPrometheusGetRules parameters: [] responses: '200': description: PrometheusNamespace headers: {} content: application/yaml: schema: contentMediaType: application/yaml '403': description: ForbiddenError headers: {} content: application/yaml: schema: contentMediaType: application/yaml '404': description: NotFound headers: {} content: application/yaml: schema: contentMediaType: application/yaml deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true post: tags: - Routes summary: Grafana Route Convert Prometheus Post Rule Groups description: This API operation converts Prometheus rule group configurations to Grafana's format via a POST request to the /convert/prometheus/config/v1/rules endpoint. It accepts Prometheus-formatted rule groups as input and transforms them into a compatible format that can be used within Grafana's alerting and recording rule system, facilitating migration or integration between Prometheus and Grafana monitoring setups. operationId: routeConvertPrometheusPostRuleGroups parameters: - name: Content-Type in: header description: '' required: true schema: const: application/json type: string responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /convert/prometheus/config/v1/rules/{NamespaceTitle}: parameters: [] get: tags: - Routes summary: Grafana Route Convert Prometheus Get Namespace description: This API operation retrieves and converts Prometheus alerting and recording rules from a specific namespace within Grafana. By making a GET request to the endpoint with a specified namespace title, it fetches the Prometheus rule configuration for that namespace and converts it into a format compatible with Grafana's alerting system. This is particularly useful when migrating from Prometheus-based alerting to Grafana's unified alerting system, allowing users to import existing Prometheus rule definitions while maintaining their organizational structure by namespace. The operation returns the converted rule configuration that can then be used within Grafana's alert management interface. operationId: routeConvertPrometheusGetNamespace parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string responses: '200': description: PrometheusNamespace headers: {} content: application/yaml: schema: contentMediaType: application/yaml '403': description: ForbiddenError headers: {} content: application/yaml: schema: contentMediaType: application/yaml '404': description: NotFound headers: {} content: application/yaml: schema: contentMediaType: application/yaml deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true post: tags: - Routes summary: Grafana Route Convert Prometheus Post Rule Group description: This API operation converts Prometheus rule group configurations to Grafana's native format by accepting a POST request to the endpoint /convert/prometheus/config/v1/rules/{NamespaceTitle}, where {NamespaceTitle} represents the target namespace for the rule group. It takes Prometheus-formatted alerting and recording rules as input and transforms them into Grafana-compatible rule configurations, facilitating migration or integration between Prometheus and Grafana alerting systems. The operation allows users to seamlessly transfer their existing Prometheus rule definitions into Grafana without manual reconfiguration, preserving the rule logic, labels, annotations, and evaluation intervals while adapting them to Grafana's rule management structure. operationId: routeConvertPrometheusPostRuleGroup parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string - name: x-grafana-alerting-datasource-uid in: header description: '' schema: type: string - name: x-grafana-alerting-recording-rules-paused in: header description: '' schema: type: boolean - name: x-grafana-alerting-alert-rules-paused in: header description: '' schema: type: boolean - name: x-grafana-alerting-target-datasource-uid in: header description: '' schema: type: string - name: x-grafana-alerting-folder-uid in: header description: '' schema: type: string - name: x-grafana-alerting-notification-settings in: header description: '' schema: type: string requestBody: description: '' content: application/yaml: schema: $ref: '#/components/schemas/PrometheusRuleGroup' required: false responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Routes summary: Grafana Route Convert Prometheus Delete Namespace description: Deletes a Prometheus rule namespace configuration in Grafana's conversion API. This operation removes all rules associated with the specified namespace by its title, effectively cleaning up converted Prometheus alerting and recording rules that were previously imported or managed through the conversion endpoint. The route is part of Grafana's Prometheus configuration conversion functionality, allowing administrators to manage the lifecycle of converted rule namespaces programmatically. operationId: routeConvertPrometheusDeleteNamespace parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /convert/prometheus/config/v1/rules/{NamespaceTitle}/{Group}: parameters: [] get: tags: - Routes summary: Grafana Route Convert Prometheus Get Rule Group description: This API operation retrieves and converts a Prometheus rule group configuration from a specific namespace in Grafana. It accepts GET requests at the endpoint path that includes both the namespace title and group name as path parameters, allowing users to fetch the configuration details of a particular Prometheus alerting or recording rule group. The operation is part of Grafana's conversion utilities that help transform Prometheus-native rule configurations into Grafana's internal format or vice versa, facilitating migration and management of alerting rules across different monitoring system configurations. operationId: routeConvertPrometheusGetRuleGroup parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '200': description: PrometheusRuleGroup headers: {} content: application/yaml: schema: contentMediaType: application/yaml '403': description: ForbiddenError headers: {} content: application/yaml: schema: contentMediaType: application/yaml '404': description: NotFound headers: {} content: application/yaml: schema: contentMediaType: application/yaml deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Routes summary: Grafana Route Convert Prometheus Delete Rule Group description: This API operation is used to delete a Prometheus rule group from a specific namespace in Grafana's configuration. It targets a particular rule group identified by both the namespace title and group name through the URL path parameters. When invoked with a DELETE HTTP method, it removes the specified rule group configuration from the Prometheus-compatible alerting and recording rules system within Grafana, effectively cleaning up rules that are no longer needed or are being replaced. operationId: routeConvertPrometheusDeleteRuleGroup parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/alert-rules: parameters: [] get: tags: - Routes summary: Grafana Route Get Alert Rules description: This API operation retrieves alert rules from Grafana's provisioning system. It uses a GET request to the /v1/provisioning/alert-rules endpoint to fetch configured alert rules that have been set up through Grafana's provisioning mechanism. The operation returns a list of alert rule definitions including their conditions, notifications, and metadata, allowing administrators and applications to programmatically query and review the current alerting configuration without manual access to the Grafana UI. operationId: routeGetAlertRules parameters: [] responses: '200': description: ProvisionedAlertRules headers: {} content: application/json: schema: type: array items: $ref: '#/components/schemas/ProvisionedAlertRule' description: '' contentMediaType: application/json deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true post: tags: - Routes summary: Grafana Route Post Alert Rule description: Creates a new alert rule in Grafana's provisioning API, allowing administrators to programmatically define alerting conditions, evaluation intervals, notification settings, and query expressions. This endpoint accepts a POST request with a JSON payload containing the alert rule configuration including the rule name, folder location, data source queries, alert conditions, evaluation group, and notification channels. The operation enables infrastructure-as-code practices by allowing alert rules to be version-controlled and deployed automatically rather than manually configured through the UI. Upon successful creation, it returns the newly created alert rule object with its assigned unique identifier and complete configuration details. This is commonly used in CI/CD pipelines and automated Grafana deployments to ensure consistent alerting across environments. operationId: routePostAlertRule parameters: - name: X-Disable-Provenance in: header description: '' schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/ProvisionedAlertRule' required: false responses: '201': description: ProvisionedAlertRule headers: {} content: application/json: schema: $ref: '#/components/schemas/ProvisionedAlertRule' '400': description: ValidationError headers: {} content: application/json: schema: $ref: '#/components/schemas/ValidationError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/alert-rules/export: parameters: [] get: tags: - Routes 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}: parameters: [] get: tags: - Routes summary: Grafana Route Get Alert Rule description: This API operation retrieves a specific alert rule from Grafana's provisioning system using the alert rule's unique identifier (UID). When called with a GET request to the endpoint /v1/provisioning/alert-rules/{UID}, it returns the complete configuration details of the specified alert rule, including its conditions, labels, annotations, and evaluation settings. This endpoint is part of Grafana's provisioning API, which allows programmatic management of alert rules outside of the standard UI interface, making it useful for automation, backup purposes, or integrating Grafana alerting into external systems and workflows. operationId: routeGetAlertRule parameters: - name: UID in: path description: Alert rule UID required: true schema: type: string responses: '200': description: ProvisionedAlertRule headers: {} content: application/json: schema: $ref: '#/components/schemas/ProvisionedAlertRule' '404': description: Not found. headers: {} content: {} deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true put: tags: - Routes summary: Grafana Route Put Alert Rule description: Updates an existing alert rule in Grafana's provisioning API by specifying the rule's unique identifier (UID) in the path. This endpoint allows you to modify all aspects of an alert rule including its condition, evaluation interval, notification settings, labels, and annotations. The request requires a complete alert rule definition in the body, and the UID in the path must match the UID in the request body. This operation is part of Grafana's provisioning capabilities, enabling programmatic management of alerting rules for infrastructure-as-code workflows and automated alert configuration. operationId: routePutAlertRule parameters: - name: UID in: path description: Alert rule UID required: true schema: type: string - name: X-Disable-Provenance in: header description: '' schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/ProvisionedAlertRule' required: false responses: '200': description: ProvisionedAlertRule headers: {} content: application/json: schema: $ref: '#/components/schemas/ProvisionedAlertRule' '400': description: ValidationError headers: {} content: application/json: schema: $ref: '#/components/schemas/ValidationError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Routes summary: Grafana Route Delete Alert Rule description: Deletes a specific alert rule from Grafana's provisioning system by its unique identifier (UID). This operation permanently removes the alert rule configuration from the system, including all associated settings such as conditions, labels, annotations, and notification policies. The deletion is immediate and cannot be undone, so the UID must be carefully specified to avoid removing the wrong alert rule. This endpoint is part of Grafana's provisioning API, which allows programmatic management of alert rules rather than manual configuration through the UI, making it suitable for infrastructure-as-code workflows and automated alerting management at scale. operationId: routeDeleteAlertRule parameters: - name: UID in: path description: Alert rule UID required: true schema: type: string - name: X-Disable-Provenance in: header description: '' schema: type: string responses: '204': description: The alert rule was deleted successfully. 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: - Routes 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: parameters: [] get: tags: - Routes summary: Grafana Route Get Contactpoints description: This API operation retrieves all configured contact points in Grafana's alerting system through a GET request to the /v1/provisioning/contact-points endpoint. Contact points define the destinations where alert notifications are sent, such as email addresses, Slack channels, PagerDuty services, or webhook URLs. When called, this endpoint returns a list of all provisioned contact points along with their configuration details, including the notification channel type, settings, and metadata. This is particularly useful for administrators who need to audit, review, or programmatically manage their alerting infrastructure and understand which notification channels are currently configured in their Grafana instance. operationId: routeGetContactpoints parameters: - name: name in: query description: Filter by name style: form explode: true schema: type: string responses: '200': description: ContactPoints headers: {} content: application/json: schema: type: array items: $ref: '#/components/schemas/EmbeddedContactPoint' description: '' contentMediaType: application/json deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true post: tags: - Routes summary: Grafana Route Post Contactpoints description: Creates a new contact point in Grafana's alerting system through the provisioning API. This endpoint allows administrators to programmatically configure notification channels by defining how and where alert notifications should be sent. The contact point can specify various integration types such as email, Slack, PagerDuty, webhook, or other supported notification methods, along with their respective configuration settings. This is typically used for infrastructure-as-code deployments or automated Grafana configuration management, enabling teams to version control and consistently deploy alerting configurations across multiple Grafana instances without manual intervention through the UI. operationId: routePostContactpoints parameters: - name: X-Disable-Provenance in: header description: '' schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/EmbeddedContactPoint' required: false responses: '202': description: EmbeddedContactPoint headers: {} content: application/json: schema: $ref: '#/components/schemas/EmbeddedContactPoint' '400': description: ValidationError headers: {} content: application/json: schema: $ref: '#/components/schemas/ValidationError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/contact-points/export: parameters: [] get: tags: - Routes 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/contact-points/{UID}: parameters: [] put: tags: - Routes summary: Grafana Route Put Contactpoint description: Updates an existing contact point in Grafana's alerting system using its unique identifier (UID). This PUT operation allows administrators to modify the configuration of a specific notification channel or contact point, such as updating webhook URLs, email addresses, Slack channels, or other alerting destination settings. The endpoint requires the contact point's UID in the path and accepts a request body containing the updated contact point configuration including its name, type, and integration-specific settings. This is part of Grafana's provisioning API, enabling programmatic management of alerting infrastructure and ensuring contact points can be maintained through automation or infrastructure-as-code practices. operationId: routePutContactpoint parameters: - name: UID in: path description: UID is the contact point unique identifier required: true schema: type: string - name: X-Disable-Provenance in: header description: '' schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/EmbeddedContactPoint' required: false responses: '202': description: Ack headers: {} content: application/json: schema: type: object contentMediaType: application/json '400': description: ValidationError headers: {} content: application/json: schema: $ref: '#/components/schemas/ValidationError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Routes summary: Grafana Route Delete Contactpoints description: The Delete Contact Points API operation in Grafana allows administrators to remove a specific notification contact point from the alerting configuration by referencing its unique identifier (UID). This endpoint uses the DELETE HTTP method at the path /v1/provisioning/contact-points/{UID}, where {UID} is the unique identifier of the contact point to be deleted. When executed, it permanently removes the specified contact point from the system's provisioning configuration, which means alerts will no longer be routed to that destination. This operation is typically used when a contact point is no longer needed, when consolidating notification channels, or when reconfiguring the alerting infrastructure. Access to this endpoint generally requires appropriate administrative permissions to modify provisioning settings within Grafana. operationId: routeDeleteContactpoints parameters: - name: UID in: path description: UID is the contact point unique identifier required: true schema: type: string - name: Content-Type in: header description: '' required: true schema: const: application/json type: string responses: '202': description: The contact point was deleted successfully. headers: {} content: {} deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/folder/{FolderUID}/rule-groups/{Group}: parameters: [] get: tags: - Routes summary: Grafana Route Get Alert Rule Group description: This API operation retrieves a specific alert rule group within a designated folder in Grafana's provisioning system. By providing the folder's unique identifier (FolderUID) and the name of the alert rule group (Group) in the request path, users can fetch the complete configuration and details of that particular rule group. This GET endpoint is part of Grafana's provisioning API, which allows programmatic management of alerting configurations, enabling administrators and automation systems to query existing alert rule groups for monitoring, auditing, or synchronization purposes across different Grafana instances or environments. operationId: routeGetAlertRuleGroup parameters: - name: FolderUID in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '200': description: AlertRuleGroup headers: {} content: application/json: schema: $ref: '#/components/schemas/AlertRuleGroup' '404': description: Not found. headers: {} content: {} deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true put: tags: - Routes summary: Grafana Route Put Alert Rule Group description: Updates an existing alert rule group identified by the folder UID and group name in Grafana's provisioning API. This PUT operation allows you to modify the configuration of alert rules within a specific rule group, including updating rule definitions, thresholds, evaluation intervals, and notification settings. The endpoint requires both the FolderUID parameter to identify the containing folder and the Group parameter to specify which alert rule group to update, with the updated configuration provided in the request body following Grafana's alert rule group schema. operationId: routePutAlertRuleGroup parameters: - name: X-Disable-Provenance in: header description: '' schema: type: string - name: FolderUID in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/AlertRuleGroup' required: false responses: '200': description: AlertRuleGroup headers: {} content: application/json: schema: $ref: '#/components/schemas/AlertRuleGroup' '400': description: ValidationError headers: {} content: application/json: schema: $ref: '#/components/schemas/ValidationError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Routes summary: Grafana Route Delete Alert Rule Group description: Deletes a specific alert rule group within a designated folder in Grafana's provisioning API. This operation requires both the folder's unique identifier (FolderUID) and the name of the alert rule group (Group) to be specified in the URL path. When executed, it removes the entire rule group and all alert rules contained within it from the Grafana instance. This is a destructive operation typically used when cleaning up monitoring configurations or reorganizing alert structures, and it requires appropriate permissions to modify provisioning resources in Grafana. operationId: routeDeleteAlertRuleGroup parameters: - name: FolderUID in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '204': description: The alert rule group was deleted successfully. headers: {} content: {} '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: NotFound headers: {} content: application/json: schema: type: object contentMediaType: application/json 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: - Routes 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: parameters: [] get: tags: - Routes summary: Grafana Route Get Mute Timings description: The Get Mute Timings operation retrieves a list of all configured mute timings from Grafana's alerting system. Mute timings are scheduling rules that define time intervals during which alert notifications should be suppressed, such as during maintenance windows or outside business hours. This GET endpoint at /v1/provisioning/mute-timings returns the complete collection of mute timing configurations, allowing administrators to view when and under what conditions notifications will be automatically silenced. The response typically includes details like timing names, time intervals, days of the week, months, and any other temporal constraints that have been defined for each mute timing rule. operationId: routeGetMuteTimings parameters: [] responses: '200': description: MuteTimings headers: {} content: application/json: schema: type: array items: $ref: '#/components/schemas/MuteTimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.' description: '' contentMediaType: application/json deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true post: tags: - Routes summary: Grafana Route Post Mute Timing description: The POST /v1/provisioning/mute-timings endpoint in Grafana allows administrators to create a new mute timing configuration through the provisioning API. Mute timings define specific time intervals during which alert notifications should be silenced, such as maintenance windows, weekends, or business hours exclusions. By posting to this endpoint with the appropriate JSON payload containing the timing specifications (including recurrence rules, time ranges, and date intervals), users can programmatically establish when their alerting system should suppress notifications without requiring manual configuration through the Grafana UI. This is particularly useful for implementing infrastructure-as-code practices and automating alert management across multiple Grafana instances. operationId: routePostMuteTiming parameters: - name: X-Disable-Provenance in: header description: '' schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/MuteTimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.' required: false responses: '201': description: MuteTimeInterval headers: {} content: application/json: schema: $ref: '#/components/schemas/MuteTimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.' '400': description: ValidationError headers: {} content: application/json: schema: $ref: '#/components/schemas/ValidationError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/mute-timings/export: parameters: [] get: tags: - Routes 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}: parameters: [] get: tags: - Routes summary: Grafana Route Get Mute Timing description: The Get Mute Timing operation retrieves a specific mute timing configuration by its unique name from Grafana's alerting system. Mute timings are used to define time intervals during which alert notifications should be suppressed, allowing users to prevent alerts during scheduled maintenance windows or known periods of reduced monitoring. By providing the mute timing name as a path parameter, this GET endpoint returns the complete configuration details of that particular mute timing, including its time intervals, recurrence rules, and any associated metadata, enabling users to review or audit existing notification suppression schedules programmatically. operationId: routeGetMuteTiming parameters: - name: name in: path description: Mute timing name required: true schema: type: string responses: '200': description: MuteTimeInterval headers: {} content: application/json: schema: $ref: '#/components/schemas/MuteTimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.' '404': description: Not found. headers: {} content: {} deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true put: tags: - Routes summary: Grafana Route Put Mute Timing description: The PUT operation on the `/v1/provisioning/mute-timings/{name}` endpoint in Grafana is used to update or replace an existing mute timing configuration identified by its name parameter. Mute timings define time-based rules that silence alert notifications during specific periods, such as maintenance windows or non-business hours. This endpoint allows administrators to modify the schedule, time intervals, or other properties of a previously created mute timing by providing the complete updated configuration in the request body. The operation requires appropriate authentication and permissions to manage alert notification policies, and it will overwrite the existing mute timing with the new definition provided in the PUT request. operationId: routePutMuteTiming parameters: - name: name in: path description: Mute timing name required: true schema: type: string - name: X-Disable-Provenance in: header description: '' schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/MuteTimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.' required: false responses: '202': description: MuteTimeInterval headers: {} content: application/json: schema: $ref: '#/components/schemas/MuteTimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.' '400': description: ValidationError headers: {} content: application/json: schema: $ref: '#/components/schemas/ValidationError' '409': description: PublicError headers: {} content: application/json: schema: $ref: '#/components/schemas/PublicError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Routes summary: Grafana Route Delete Mute Timing description: This API operation deletes a specific mute timing configuration in Grafana's alerting system by its unique name. Mute timings are schedules that define time intervals during which alert notifications should be suppressed, and this DELETE endpoint removes the identified mute timing from the provisioning configuration. The operation requires the mute timing's name as a path parameter and is typically used when a previously configured silence schedule is no longer needed or needs to be replaced with a different configuration. operationId: routeDeleteMuteTiming parameters: - name: name in: path description: Mute timing name required: true schema: type: string - name: version in: query description: Version of mute timing to use for optimistic concurrency. Leave empty to disable validation style: form explode: true schema: type: string - name: X-Disable-Provenance in: header description: '' schema: type: string responses: '204': description: The mute timing was deleted successfully. headers: {} content: {} '409': description: PublicError headers: {} content: application/json: schema: $ref: '#/components/schemas/PublicError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/mute-timings/{name}/export: parameters: [] get: tags: - Routes 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: parameters: [] get: tags: - Routes summary: Grafana Route Get Policy Tree description: This API operation retrieves the entire notification policy tree configuration from Grafana's alerting system. It returns the hierarchical structure that defines how alerts are routed to different contact points based on matching labels and conditions. The policy tree includes the root policy and all nested policies with their respective matchers, grouping settings, timing intervals, and associated receiver configurations. This endpoint is part of Grafana's provisioning API and requires appropriate authentication and authorization to access the alerting configuration. operationId: routeGetPolicyTree parameters: [] responses: '200': description: Route headers: {} content: application/json: schema: $ref: '#/components/schemas/Route' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true put: tags: - Routes summary: Grafana Route Put Policy Tree description: The PUT operation on the /v1/provisioning/policies endpoint in Grafana allows administrators to update or replace the entire notification policy tree for alert routing. This API call enables programmatic management of how alerts are organized, grouped, and routed to different contact points based on matching labels and conditions. By submitting a complete policy tree structure, users can define the hierarchy of policies, including root and nested policies, their matchers, grouping configurations, timing intervals, and associated receiver integrations. This is particularly useful for infrastructure-as-code approaches where alert routing configurations need to be version-controlled and deployed automatically across Grafana instances. operationId: routePutPolicyTree parameters: - name: X-Disable-Provenance in: header description: '' schema: type: string requestBody: description: The new notification routing tree to use content: application/json: schema: allOf: - $ref: '#/components/schemas/Route' - description: The new notification routing tree to use contentMediaType: application/json required: false responses: '202': description: Ack headers: {} content: application/json: schema: type: object contentMediaType: application/json '400': description: ValidationError headers: {} content: application/json: schema: $ref: '#/components/schemas/ValidationError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Routes summary: Grafana Route Reset Policy Tree description: This API operation resets the notification policy tree in Grafana back to its default state by deleting all custom policy configurations. When invoked via a DELETE request to the /v1/provisioning/policies endpoint, it removes any user-defined notification routing rules, matchers, and nested policy hierarchies that have been configured, effectively reverting the alert notification policies to the system's original configuration. This is particularly useful for cleaning up testing configurations, resolving misconfigured policy trees, or starting fresh with notification policy setup in a Grafana instance. operationId: routeResetPolicyTree parameters: - name: Content-Type in: header description: '' required: true schema: const: application/json type: string responses: '202': description: Ack headers: {} content: application/json: schema: type: object contentMediaType: application/json deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/policies/export: parameters: [] get: tags: - Routes 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 /v1/provisioning/templates: parameters: [] get: tags: - Routes summary: Grafana Route Get Templates description: This API operation retrieves provisioning templates from Grafana's alerting system. It is accessed via a GET request to the `/v1/provisioning/templates` endpoint and returns a collection of message templates that can be used for alert notifications. These templates define how alert messages are formatted and presented when notifications are sent through various channels, allowing administrators to standardize and customize the appearance and content of alert messages across their Grafana instance. operationId: routeGetTemplates parameters: [] responses: '200': description: NotificationTemplates headers: {} content: application/json: schema: type: array items: $ref: '#/components/schemas/NotificationTemplate' description: '' contentMediaType: application/json deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/templates/{name}: parameters: [] get: tags: - Routes summary: Grafana Route Get Template description: The Get Template operation retrieves a specific notification template by its name from Grafana's provisioning API. This endpoint allows users to fetch the complete configuration details of a previously created template, including its content, title, and any associated metadata. By making a GET request to /v1/provisioning/templates/{name} where {name} is the unique identifier of the template, administrators can programmatically access template definitions that are used for formatting alert notifications across various contact points and integrations within Grafana's alerting system. operationId: routeGetTemplate parameters: - name: name in: path description: Template group name required: true schema: type: string responses: '200': description: NotificationTemplate headers: {} content: application/json: schema: $ref: '#/components/schemas/NotificationTemplate' '404': description: PublicError headers: {} content: application/json: schema: $ref: '#/components/schemas/PublicError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true put: tags: - Routes summary: Grafana Route Put Template description: Updates an existing notification template in Grafana's provisioning system by replacing the template configuration identified by the specified name parameter. This PUT operation allows administrators to modify template content, formatting, and other properties used for alert notifications. The route accepts the template name as a path parameter and expects the complete updated template definition in the request body, which will overwrite the existing template configuration while maintaining the same identifier. operationId: routePutTemplate parameters: - name: name in: path description: Template group name required: true schema: type: string - name: X-Disable-Provenance in: header description: '' schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/NotificationTemplateContent' required: false responses: '202': description: NotificationTemplate headers: {} content: application/json: schema: $ref: '#/components/schemas/NotificationTemplate' '400': description: PublicError headers: {} content: application/json: schema: $ref: '#/components/schemas/PublicError' '409': description: PublicError headers: {} content: application/json: schema: $ref: '#/components/schemas/PublicError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Routes summary: Grafana Route Delete Template description: This API operation deletes a specific notification template from Grafana's provisioning system by its name. When called with a DELETE request to the endpoint /v1/provisioning/templates/{name}, where {name} is the unique identifier of the template, it removes the specified template from the system's configuration. This is part of Grafana's provisioning API that allows programmatic management of notification templates, enabling administrators to automate the cleanup and removal of templates that are no longer needed in their alerting and notification workflows. operationId: routeDeleteTemplate parameters: - name: name in: path description: Template group name required: true schema: type: string - name: version in: query description: Version of template to use for optimistic concurrency. Leave empty to disable validation style: form explode: true schema: type: string responses: '204': description: The template was deleted successfully. headers: {} content: {} '409': description: PublicError headers: {} content: application/json: schema: $ref: '#/components/schemas/PublicError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true components: schemas: Type: title: Type enum: - alertmanager - dingding - discord - email - googlechat - kafka - line - opsgenie - pagerduty - pushover - sensugo - slack - teams - telegram - threema - victorops - webhook - wecom type: string examples: - webhook RelativeTimeRangeExport: title: RelativeTimeRangeExport type: object properties: from: type: integer contentEncoding: int64 to: type: integer contentEncoding: int64 ProvisionedAlertRule: title: ProvisionedAlertRule required: - condition - data - execErrState - folderUID - for - noDataState - orgID - ruleGroup - title type: object properties: annotations: type: object additionalProperties: type: string examples: - runbook_url: https://supercoolrunbook.com/page/13 condition: type: string examples: - A data: type: array items: $ref: '#/components/schemas/AlertQueryrepresentsasinglequeryassociatedwithanalertdefinition.' description: '' examples: - - 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: $ref: '#/components/schemas/ExecErrState' folderUID: type: string examples: - project_x for: type: string id: type: integer contentEncoding: int64 isPaused: type: boolean examples: - false keep_firing_for: type: string labels: type: object additionalProperties: type: string examples: - team: sre-team-1 missingSeriesEvalsToResolve: type: integer contentEncoding: int64 examples: - 2 noDataState: $ref: '#/components/schemas/NoDataState' notification_settings: $ref: '#/components/schemas/AlertRuleNotificationSettings' orgID: type: integer contentEncoding: int64 provenance: type: string record: $ref: '#/components/schemas/Record' ruleGroup: maxLength: 190 minLength: 1 type: string examples: - eval_group_1 title: maxLength: 190 minLength: 1 type: string examples: - Always firing uid: maxLength: 40 minLength: 1 pattern: ^[a-zA-Z0-9-_]+$ type: string updated: type: string contentEncoding: date-time readOnly: true ValidationError: title: ValidationError type: object properties: message: type: string examples: - error message 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: '' EmbeddedContactPoint: title: EmbeddedContactPoint required: - settings - type type: object properties: disableResolveMessage: type: boolean examples: - false name: type: string description: 'Name is used as grouping key in the UI. Contact points with the same name will be grouped in the UI.' examples: - webhook_1 provenance: type: string readOnly: true settings: type: object type: allOf: - $ref: '#/components/schemas/Type' - examples: - webhook uid: maxLength: 40 minLength: 1 pattern: ^[a-zA-Z0-9\-\_]+$ type: string description: 'UID is the unique identifier of the contact point. The UID can be set by the user.' examples: - my_external_reference description: 'EmbeddedContactPoint is the contact point type that is used by grafanas embedded alertmanager implementation.' MuteTimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.: title: MuteTimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted. type: object properties: name: type: string time_intervals: type: array items: $ref: '#/components/schemas/TimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.' description: '' AlertRuleNotificationSettings: title: AlertRuleNotificationSettings required: - receiver type: object properties: active_time_intervals: type: array items: type: string description: 'Override the times when notifications should not be muted. These must match the name of a mute time interval defined in the alertmanager configuration time_intervals section. All notifications will be suppressed unless they are sent at the time that matches any interval.' examples: - - maintenance group_by: type: array items: type: string description: 'Override the labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value ''...'' as the sole label name. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping. Must include ''alertname'' and ''grafana_folder'' if not using ''...''.' default: - alertname - grafana_folder examples: - - alertname - grafana_folder - cluster group_interval: type: string description: 'Override how long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)' examples: - 5m group_wait: type: string description: 'Override how long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)' examples: - 30s mute_time_intervals: type: array items: type: string description: 'Override the times when notifications should be muted. These must match the name of a mute time interval defined in the alertmanager configuration time_intervals section. When muted it will not send any notifications, but otherwise acts normally.' examples: - - maintenance receiver: type: string description: Name of the receiver to send notifications to. examples: - grafana-default-email repeat_interval: type: string description: 'Override how long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more). Note that this parameter is implicitly bound by Alertmanager''s `--data.retention` configuration flag. Notifications will be resent after either repeat_interval or the data retention period have passed, whichever occurs first. `repeat_interval` should not be less than `group_interval`.' examples: - 4h ConvertPrometheusResponse: title: ConvertPrometheusResponse type: object properties: error: type: string errorType: type: string status: 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.' ReceiverExportistheprovisionedfileexportofalerting.ReceiverV1.: title: ReceiverExportistheprovisionedfileexportofalerting.ReceiverV1. type: object properties: disableResolveMessage: type: boolean settings: type: object type: type: string uid: type: string format: title: format enum: - yaml - json - hcl type: string AlertRuleGroup: title: AlertRuleGroup type: object properties: folderUid: type: string interval: type: integer contentEncoding: int64 rules: type: array items: $ref: '#/components/schemas/ProvisionedAlertRule' description: '' title: type: string NoDataState: title: NoDataState enum: - Alerting - NoData - OK type: string RelativeTimeRange: title: RelativeTimeRange type: object properties: from: 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 to: 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 description: 'RelativeTimeRange is the per query start and end time for requests.' 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 Route: title: Route 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 provenance: type: string receiver: type: string repeat_interval: type: string routes: type: array items: $ref: '#/components/schemas/Route' description: '' description: '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.' ForbiddenError: title: ForbiddenError type: object properties: body: allOf: - $ref: '#/components/schemas/PublicError' - description: 'PublicError is derived from Error and only contains information available to the end user.' 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: '' NotificationTemplateContent: title: NotificationTemplateContent type: object properties: template: type: string version: type: string PrometheusRule: title: PrometheusRule type: object properties: alert: type: string annotations: type: object additionalProperties: type: string expr: type: string for: type: string keep_firing_for: type: string labels: type: object additionalProperties: type: string record: type: string ExecErrState: title: ExecErrState enum: - OK - Alerting - Error 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: '' AlertQueryrepresentsasinglequeryassociatedwithanalertdefinition.: title: AlertQueryrepresentsasinglequeryassociatedwithanalertdefinition. type: object properties: datasourceUid: type: string description: Grafana data source unique identifier; it should be '__expr__' for a Server Side Expression operation. model: type: object description: JSON is the raw JSON query and includes the above properties as well as custom properties. queryType: type: string description: 'QueryType is an optional identifier for the type of query. It can be used to distinguish different types of queries.' refId: type: string description: RefID is the unique identifier of the query, set by the frontend call. relativeTimeRange: allOf: - $ref: '#/components/schemas/RelativeTimeRange' - description: 'RelativeTimeRange is the per query start and end time for requests.' NotificationTemplate: title: NotificationTemplate type: object properties: name: type: string provenance: type: string template: type: string version: type: string PrometheusRuleGroup: title: PrometheusRuleGroup type: object properties: 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 labels: type: object additionalProperties: type: string limit: type: integer contentEncoding: int64 name: type: string query_offset: type: string rules: type: array items: $ref: '#/components/schemas/PrometheusRule' description: '' 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: '' PublicError: title: PublicError type: object properties: extra: type: object additionalProperties: {} message: type: string messageId: type: string statusCode: type: integer contentEncoding: int64 description: 'PublicError is derived from Error and only contains information available to the end user.' TimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.: title: TimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted. type: object properties: name: type: string time_intervals: type: array items: $ref: '#/components/schemas/TimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.' description: '' Record: title: Record required: - from - metric type: object properties: from: type: string description: Which expression node should be used as the input for the recorded metric. examples: - A metric: type: string description: Name of the recorded metric. examples: - grafana_alerts_ratio target_datasource_uid: type: string description: Which data source should be used to write the output of the recording rule, specified by UID. examples: - my-prom 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 Recordistheprovisionedexportofmodels.Record.: title: Recordistheprovisionedexportofmodels.Record. type: object properties: from: type: string metric: type: string targetDatasourceUid: 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: '' 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 '