Prometheus alerts API

Query active alerts and alertmanager discovery.

Operations 2

GET /alerts Get active alerts #
GET /alertmanagers Get Alertmanager discovery #

Documentation

Specifications

Schemas & Data

Other Resources

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/prometheus-io-alerts-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

prometheus-io-alerts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 0.0.1
  title: Alertmanager admin Alerts API
  description: API of the Prometheus Alertmanager (https://github.com/prometheus/alertmanager)
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: /api/v2/
tags:
- name: alerts
  description: Query active alerts and alertmanager discovery.
paths:
  /alerts:
    get:
      tags:
      - alerts
      summary: Get active alerts
      operationId: alerts
      responses:
        '200':
          description: Active alerts retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertsOutputBody'
              examples:
                activeAlerts:
                  summary: Currently active alerts
                  value:
                    data:
                      alerts:
                      - activeAt: '2026-01-02T13:30:00.000Z'
                        annotations:
                          description: This is an alert meant to ensure that the entire alerting pipeline is functional. This alert is always firing, therefore it should always be firing in Alertmanager and always fire against a receiver. There are integrations with various notification mechanisms that send a notification when this alert is not firing. For example the "DeadMansSnitch" integration in PagerDuty.
                          summary: Ensure entire alerting pipeline is functional
                        labels:
                          alertname: Watchdog
                          severity: warning
                        state: firing
                        value: 1e+00
                    status: success
        default:
          description: Error retrieving alerts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                tsdbNotReady:
                  summary: TSDB not ready
                  value:
                    error: TSDB not ready
                    errorType: internal
                    status: error
  /alertmanagers:
    get:
      tags:
      - alerts
      summary: Get Alertmanager discovery
      operationId: alertmanagers
      responses:
        '200':
          description: Alertmanager targets retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertmanagersOutputBody'
              examples:
                alertmanagerDiscovery:
                  summary: Alertmanager discovery results
                  value:
                    data:
                      activeAlertmanagers:
                      - url: http://demo.prometheus.io:9093/api/v2/alerts
                      droppedAlertmanagers: []
                    status: success
        default:
          description: Error retrieving Alertmanager targets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                tsdbNotReady:
                  summary: TSDB not ready
                  value:
                    error: TSDB not ready
                    errorType: internal
                    status: error
components:
  schemas:
    AlertDiscovery:
      type: object
      properties:
        alerts:
          type: array
          items:
            $ref: '#/components/schemas/Alert'
      required:
      - alerts
      additionalProperties: false
      description: Alert discovery information containing all active alerts.
    Labels:
      type: object
      additionalProperties: true
      description: Label set represented as a key-value map.
    AlertmanagerTarget:
      type: object
      properties:
        url:
          type: string
          description: URL of the Alertmanager instance.
      required:
      - url
      additionalProperties: false
      description: Alertmanager target information.
    AlertsOutputBody:
      type: object
      properties:
        status:
          type: string
          enum:
          - success
          - error
          description: Response status.
          example: success
        data:
          $ref: '#/components/schemas/AlertDiscovery'
        warnings:
          type: array
          items:
            type: string
          description: Only set if there were warnings while executing the request. There will still be data in the data field.
        infos:
          type: array
          items:
            type: string
          description: Only set if there were info-level annotations while executing the request.
      required:
      - status
      - data
      additionalProperties: false
      description: Response body for alerts endpoint.
    Error:
      type: object
      properties:
        status:
          type: string
          enum:
          - success
          - error
          description: Response status.
          example: success
        errorType:
          type: string
          description: Type of error that occurred.
          example: bad_data
        error:
          type: string
          description: Human-readable error message.
          example: invalid parameter
      required:
      - status
      - errorType
      - error
      additionalProperties: false
      description: Error response.
    AlertmanagerDiscovery:
      type: object
      properties:
        activeAlertmanagers:
          type: array
          items:
            $ref: '#/components/schemas/AlertmanagerTarget'
        droppedAlertmanagers:
          type: array
          items:
            $ref: '#/components/schemas/AlertmanagerTarget'
      required:
      - activeAlertmanagers
      - droppedAlertmanagers
      additionalProperties: false
      description: Alertmanager discovery information including active and dropped instances.
    AlertmanagersOutputBody:
      type: object
      properties:
        status:
          type: string
          enum:
          - success
          - error
          description: Response status.
          example: success
        data:
          $ref: '#/components/schemas/AlertmanagerDiscovery'
        warnings:
          type: array
          items:
            type: string
          description: Only set if there were warnings while executing the request. There will still be data in the data field.
        infos:
          type: array
          items:
            type: string
          description: Only set if there were info-level annotations while executing the request.
      required:
      - status
      - data
      additionalProperties: false
      description: Response body for alertmanagers endpoint.
    Alert:
      type: object
      properties:
        labels:
          $ref: '#/components/schemas/Labels'
        annotations:
          $ref: '#/components/schemas/Labels'
        state:
          type: string
          description: State of the alert (pending, firing, or inactive).
        value:
          type: string
          description: Value of the alert expression.
        activeAt:
          type: string
          format: date-time
          description: Timestamp when the alert became active.
        keepFiringSince:
          type: string
          format: date-time
          description: Timestamp since the alert has been kept firing.
      required:
      - labels
      - annotations
      - state
      - value
      additionalProperties: false
      description: Alert information.