Grafana Convert Prometheus API

The convert_prometheus API from Grafana — 6 operation(s) for convert_prometheus.

Operations 14

GET /convert/api/prom/rules Gets all Grafana-managed alert rules that were imported from… #
POST /convert/api/prom/rules Converts the submitted rule groups into Grafana-Managed Rules #
GET /convert/api/prom/rules/{NamespaceTitle} Gets Grafana-managed alert rules that were imported from Prometheus-compatible… #
POST /convert/api/prom/rules/{NamespaceTitle} Converts a Prometheus rule group into a Grafana rule group and creates or… #
DELETE /convert/api/prom/rules/{NamespaceTitle} Deletes all rule groups that were imported from Prometheus-compatible sources… #
GET /convert/api/prom/rules/{NamespaceTitle}/{Group} Gets a single rule group in Prometheus-compatible format if it was imported… #
DELETE /convert/api/prom/rules/{NamespaceTitle}/{Group} Deletes a specific rule group if it was imported from a Prometheus-compatible… #
GET /convert/prometheus/config/v1/rules Gets all Grafana-managed alert rules that were imported from… #
POST /convert/prometheus/config/v1/rules Converts the submitted rule groups into Grafana-Managed Rules #
GET /convert/prometheus/config/v1/rules/{NamespaceTitle} Gets Grafana-managed alert rules that were imported from Prometheus-compatible… #
POST /convert/prometheus/config/v1/rules/{NamespaceTitle} Converts a Prometheus rule group into a Grafana rule group and creates or… #
DELETE /convert/prometheus/config/v1/rules/{NamespaceTitle} Deletes all rule groups that were imported from Prometheus-compatible sources… #
GET /convert/prometheus/config/v1/rules/{NamespaceTitle}/{Group} Gets a single rule group in Prometheus-compatible format if it was imported… #
DELETE /convert/prometheus/config/v1/rules/{NamespaceTitle}/{Group} Deletes a specific rule group if it was imported from a Prometheus-compatible… #

Documentation

📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/
📖
Authentication
https://grafana.com/docs/grafana/latest/developers/http_api/authentication/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_versions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_permissions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_public/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/folder/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/folder_dashboard_search/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/folder_permissions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/data_source/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/datasource_permissions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/datasource_lbac_rules/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/annotations/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/org/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/user/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/team/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/team_sync/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/preferences/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/access_control/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/sso-settings/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/admin/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/licensing/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/reporting/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/query_and_resource_caching/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/library_element/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/correlations/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/snapshot/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/short_url/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/query_history/

Specifications

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-com-convert-prometheus-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-com-convert-prometheus-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'The Grafana backend exposes an HTTP API, the same API is used by the frontend to do

    everything from saving dashboards, creating users and updating data sources.'
  title: Grafana HTTP API. Convert Prometheus API
  contact:
    name: Grafana Labs
    url: https://grafana.com
    email: hello@grafana.com
  version: 0.0.1
servers:
- url: /api
security:
- basic: []
- api_key: []
tags:
- name: convert_prometheus
paths:
  /convert/api/prom/rules:
    get:
      tags:
      - convert_prometheus
      summary: Gets all Grafana-managed alert rules that were imported from…
      operationId: RouteConvertPrometheusCortexGetRules
      responses:
        '200':
          description: PrometheusNamespace
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/PrometheusNamespace'
        '403':
          description: ForbiddenError
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/NotFound'
    post:
      tags:
      - convert_prometheus
      summary: Converts the submitted rule groups into Grafana-Managed Rules
      operationId: RouteConvertPrometheusCortexPostRuleGroups
      responses:
        '202':
          description: ConvertPrometheusResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertPrometheusResponse'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
  /convert/api/prom/rules/{NamespaceTitle}:
    get:
      tags:
      - convert_prometheus
      summary: Gets Grafana-managed alert rules that were imported from Prometheus-compatible…
      operationId: RouteConvertPrometheusCortexGetNamespace
      parameters:
      - name: NamespaceTitle
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: PrometheusNamespace
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/PrometheusNamespace'
        '403':
          description: ForbiddenError
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/NotFound'
    post:
      description: 'If the group already exists and was not imported from a Prometheus-compatible source initially,

        it will not be replaced and an error will be returned.'
      tags:
      - convert_prometheus
      summary: Converts a Prometheus rule group into a Grafana rule group and creates or…
      operationId: RouteConvertPrometheusCortexPostRuleGroup
      parameters:
      - name: NamespaceTitle
        in: path
        required: true
        schema:
          type: string
      - name: x-grafana-alerting-datasource-uid
        in: header
        schema:
          type: string
      - name: x-grafana-alerting-recording-rules-paused
        in: header
        schema:
          type: boolean
      - name: x-grafana-alerting-alert-rules-paused
        in: header
        schema:
          type: boolean
      - name: x-grafana-alerting-target-datasource-uid
        in: header
        schema:
          type: string
      - name: x-grafana-alerting-folder-uid
        in: header
        schema:
          type: string
      - name: x-grafana-alerting-notification-settings
        in: header
        schema:
          type: string
      responses:
        '202':
          description: ConvertPrometheusResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertPrometheusResponse'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
      x-raw-request: 'true'
      requestBody:
        content:
          application/yaml:
            schema:
              $ref: '#/components/schemas/PrometheusRuleGroup'
    delete:
      tags:
      - convert_prometheus
      summary: Deletes all rule groups that were imported from Prometheus-compatible sources…
      operationId: RouteConvertPrometheusCortexDeleteNamespace
      parameters:
      - name: NamespaceTitle
        in: path
        required: true
        schema:
          type: string
      responses:
        '202':
          description: ConvertPrometheusResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertPrometheusResponse'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
  /convert/api/prom/rules/{NamespaceTitle}/{Group}:
    get:
      tags:
      - convert_prometheus
      summary: Gets a single rule group in Prometheus-compatible format if it was imported…
      operationId: RouteConvertPrometheusCortexGetRuleGroup
      parameters:
      - name: NamespaceTitle
        in: path
        required: true
        schema:
          type: string
      - name: Group
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: PrometheusRuleGroup
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/PrometheusRuleGroup'
        '403':
          description: ForbiddenError
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/NotFound'
    delete:
      tags:
      - convert_prometheus
      summary: Deletes a specific rule group if it was imported from a Prometheus-compatible…
      operationId: RouteConvertPrometheusCortexDeleteRuleGroup
      parameters:
      - name: NamespaceTitle
        in: path
        required: true
        schema:
          type: string
      - name: Group
        in: path
        required: true
        schema:
          type: string
      responses:
        '202':
          description: ConvertPrometheusResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertPrometheusResponse'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
  /convert/prometheus/config/v1/rules:
    get:
      tags:
      - convert_prometheus
      summary: Gets all Grafana-managed alert rules that were imported from…
      operationId: RouteConvertPrometheusGetRules
      responses:
        '200':
          description: PrometheusNamespace
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/PrometheusNamespace'
        '403':
          description: ForbiddenError
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/NotFound'
    post:
      tags:
      - convert_prometheus
      summary: Converts the submitted rule groups into Grafana-Managed Rules
      operationId: RouteConvertPrometheusPostRuleGroups
      responses:
        '202':
          description: ConvertPrometheusResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertPrometheusResponse'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
  /convert/prometheus/config/v1/rules/{NamespaceTitle}:
    get:
      tags:
      - convert_prometheus
      summary: Gets Grafana-managed alert rules that were imported from Prometheus-compatible…
      operationId: RouteConvertPrometheusGetNamespace
      parameters:
      - name: NamespaceTitle
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: PrometheusNamespace
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/PrometheusNamespace'
        '403':
          description: ForbiddenError
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/NotFound'
    post:
      description: 'If the group already exists and was not imported from a Prometheus-compatible source initially,

        it will not be replaced and an error will be returned.'
      tags:
      - convert_prometheus
      summary: Converts a Prometheus rule group into a Grafana rule group and creates or…
      operationId: RouteConvertPrometheusPostRuleGroup
      parameters:
      - name: NamespaceTitle
        in: path
        required: true
        schema:
          type: string
      - name: x-grafana-alerting-datasource-uid
        in: header
        schema:
          type: string
      - name: x-grafana-alerting-recording-rules-paused
        in: header
        schema:
          type: boolean
      - name: x-grafana-alerting-alert-rules-paused
        in: header
        schema:
          type: boolean
      - name: x-grafana-alerting-target-datasource-uid
        in: header
        schema:
          type: string
      - name: x-grafana-alerting-folder-uid
        in: header
        schema:
          type: string
      - name: x-grafana-alerting-notification-settings
        in: header
        schema:
          type: string
      responses:
        '202':
          description: ConvertPrometheusResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertPrometheusResponse'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
      x-raw-request: 'true'
      requestBody:
        content:
          application/yaml:
            schema:
              $ref: '#/components/schemas/PrometheusRuleGroup'
    delete:
      tags:
      - convert_prometheus
      summary: Deletes all rule groups that were imported from Prometheus-compatible sources…
      operationId: RouteConvertPrometheusDeleteNamespace
      parameters:
      - name: NamespaceTitle
        in: path
        required: true
        schema:
          type: string
      responses:
        '202':
          description: ConvertPrometheusResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertPrometheusResponse'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
  /convert/prometheus/config/v1/rules/{NamespaceTitle}/{Group}:
    get:
      tags:
      - convert_prometheus
      summary: Gets a single rule group in Prometheus-compatible format if it was imported…
      operationId: RouteConvertPrometheusGetRuleGroup
      parameters:
      - name: NamespaceTitle
        in: path
        required: true
        schema:
          type: string
      - name: Group
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: PrometheusRuleGroup
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/PrometheusRuleGroup'
        '403':
          description: ForbiddenError
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/NotFound'
    delete:
      tags:
      - convert_prometheus
      summary: Deletes a specific rule group if it was imported from a Prometheus-compatible…
      operationId: RouteConvertPrometheusDeleteRuleGroup
      parameters:
      - name: NamespaceTitle
        in: path
        required: true
        schema:
          type: string
      - name: Group
        in: path
        required: true
        schema:
          type: string
      responses:
        '202':
          description: ConvertPrometheusResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertPrometheusResponse'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
components:
  schemas:
    PrometheusRuleGroup:
      type: object
      properties:
        interval:
          $ref: '#/components/schemas/Duration'
        labels:
          type: object
          additionalProperties:
            type: string
        limit:
          type: integer
          format: int64
        name:
          type: string
        query_offset:
          type: string
        rules:
          type: array
          items:
            $ref: '#/components/schemas/PrometheusRule'
    Duration:
      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.'
      type: integer
      format: int64
    NotFound:
      type: object
    ForbiddenError:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/PublicError'
    ConvertPrometheusResponse:
      type: object
      properties:
        error:
          type: string
        errorType:
          type: string
        status:
          type: string
    PrometheusNamespace:
      type: object
      properties:
        Body:
          description: 'in: body'
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/PrometheusRuleGroup'
    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
    PublicError:
      description: 'PublicError is derived from Error and only contains information

        available to the end user.'
      type: object
      properties:
        extra:
          type: object
          additionalProperties: {}
        message:
          type: string
        messageId:
          type: string
        statusCode:
          type: integer
          format: int64
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
    basic:
      type: http
      scheme: basic