Grafana Policies API

The Policies API from Grafana — 2 operation(s) for policies.

Operations 2

PUT /v1/provisioning/policies Grafana Route Put Policy Tree #
DELETE /v1/provisioning/policies Grafana Route Reset Policy Tree #

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/grafana-policies-api"
All apis
curl "https://apis.io/api/v1/apis?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.

OpenAPI Specification

grafana-policies-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Grafana Policies API
  description: 'Grafana is an open-source analytics and visualization platform that helps you monitor and analyze data from various sources. It lets you create customizable dashboards with charts, graphs, and alerts to visualize metrics and logs in real-time. Commonly used for monitoring infrastructure, applications, and business metrics, Grafana connects to dozens of data sources like Prometheus, Elasticsearch, and cloud platforms, making it easier to understand system performance, troubleshoot issues, and track key indicators all in one place. '
  contact:
    name: Grafana Labs
    url: https://grafana.com
    email: hello@grafana.com
  version: 0.0.1
servers:
- url: http://{defaultHost}
  variables:
    defaultHost:
      default: www.example.com/api
- url: https://{defaultHost}
  variables:
    defaultHost:
      default: www.example.com/api
security:
- basic: []
- api_key: []
tags:
- name: Policies
paths:
  /v1/provisioning/policies:
    parameters: []
    put:
      tags:
      - Policies
      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:
      - Policies
      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
components:
  schemas:
    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.'
    ValidationError:
      title: ValidationError
      type: object
      properties:
        message:
          type: string
          examples:
          - error message
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
    basic:
      type: http
      scheme: basic