Grafana · Arazzo Workflow

Grafana Export Alerting as Code

Version 1.0.0

Export contact points, the notification policy tree, and alert rules as provisioning files.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub AlertingAnalyticsDashboardsLogsMetricsMonitoringObservabilityTracesVisualizationArazzoWorkflows

Provider

grafana

Workflows

export-alerting-as-code
Snapshot a Grafana instance's alerting configuration into provisioning YAML.
Exports contact points, then the routing tree, then the alert rules, each in provisioning file format ready to commit.
3 steps inputs: decrypt, folderUid, format, group outputs: alertRules, contactPoints, policyTree
1
exportContactPoints
Export the contact points. Secrets are redacted unless decrypt is set, so the default output is safe to commit to a repository.
2
exportPolicyTree
Export the notification policy tree. This is the routing that binds alert labels to the contact points exported above, and it is meaningless without them, which is why the two are captured in the same run.
3
exportAlertRules
Export the alert rules, optionally scoped to one folder or evaluation group, in provisioning file format.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Grafana Export Alerting as Code
  summary: Export contact points, the notification policy tree, and alert rules as provisioning files.
  description: >-
    Most Grafana alerting is clicked into existence and then lives nowhere but
    the database. This workflow pulls the three halves of an alerting setup —
    contact points, the notification policy tree, and the alert rules — out in
    Grafana's own provisioning file format, so a running instance can be committed
    to a repository and the drift between what is deployed and what is reviewed
    becomes visible. Run it on a schedule and diff the output. Every step spells
    out its request inline so the flow can be read and executed without opening
    the underlying OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-4220.20
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-4220.20
      capability_name: Observability Management
      spec: grafana-alerts-api-openapi.yml
      confidence: 0.7
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: alertsApi
  url: ../openapi/grafana-alerts-api-openapi.yml
  type: openapi
- name: exportsApi
  url: ../openapi/grafana-exports-api-openapi.yml
  type: openapi
workflows:
- workflowId: export-alerting-as-code
  summary: Snapshot a Grafana instance's alerting configuration into provisioning YAML.
  description: >-
    Exports contact points, then the routing tree, then the alert rules, each in
    provisioning file format ready to commit.
  inputs:
    type: object
    properties:
      format:
        type: string
        description: Export format; yaml, json, or hcl.
        default: yaml
      folderUid:
        type: string
        description: >-
          Limit the alert rule export to a single folder. Omit to export every
          rule the caller can see.
      group:
        type: string
        description: >-
          Limit the alert rule export to one evaluation group within the folder.
          Requires folderUid.
      decrypt:
        type: boolean
        description: >-
          Include contact point secrets in plaintext. Requires admin permission,
          and anything exported this way must be treated as a secret — leave it
          false unless the destination is a secret store.
        default: false
  steps:
  - stepId: exportContactPoints
    description: >-
      Export the contact points. Secrets are redacted unless decrypt is set, so
      the default output is safe to commit to a repository.
    operationId: routeGetContactpointsExport
    parameters:
    - name: format
      in: query
      value: $inputs.format
    - name: decrypt
      in: query
      value: $inputs.decrypt
    - name: download
      in: query
      value: false
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      contactPoints: $response.body
  - stepId: exportPolicyTree
    description: >-
      Export the notification policy tree. This is the routing that binds alert
      labels to the contact points exported above, and it is meaningless without
      them, which is why the two are captured in the same run.
    operationId: routeGetPolicyTreeExport
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      policyTree: $response.body
  - stepId: exportAlertRules
    description: >-
      Export the alert rules, optionally scoped to one folder or evaluation
      group, in provisioning file format.
    operationId: routeGetAlertRulesExport
    parameters:
    - name: format
      in: query
      value: $inputs.format
    - name: folderUid
      in: query
      value: $inputs.folderUid
    - name: group
      in: query
      value: $inputs.group
    - name: download
      in: query
      value: false
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      alertRules: $response.body
  outputs:
    contactPoints: $steps.exportContactPoints.outputs.contactPoints
    policyTree: $steps.exportPolicyTree.outputs.policyTree
    alertRules: $steps.exportAlertRules.outputs.alertRules

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/grafana-export-alerting-as-code-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.