Prometheus Admin API

Administrative operations for TSDB management.

GitHub OpenAPI

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

PUT /admin/tsdb/delete_series Delete time series data over a range (PUT) · Delete series matching selectors via PUT #
Ask an LLM
“How do I drop old time series data from Prometheus over a time range?”
“Can I delete data for a series only between two timestamps?”
Tell an agent destructive · confirm first
Delete series {match} from {start} to {end}.
Drop time series matching {match} between {start} and {end}.
POST /admin/tsdb/delete_series Delete time series data over a range (POST) · Delete series matching selectors #
Ask an LLM
“Is there a POST form of the series deletion endpoint?”
“Can I delete series data by POSTing selectors and timestamps?”
Tell an agent destructive · confirm first
POST series deletion for {match}.
Delete time series {match} from {start} to {end} via POST.
PUT /admin/tsdb/clean_tombstones Clean tombstones from the TSDB (PUT) · Clean tombstones in the TSDB via PUT #
Ask an LLM
“How do I clean up tombstones in the storage using PUT?”
“Can I remove deleted data from disk with a PUT request?”
Tell an agent destructive · confirm first
Clean tombstones using the PUT endpoint.
Run the PUT tombstone cleanup on the storage.
POST /admin/tsdb/clean_tombstones Clean tombstones from the TSDB · Clean tombstones in the TSDB #
Ask an LLM
“What does the POST form of the tombstone cleanup do?”
“Can I clean up tombstones with a POST request?”
Tell an agent destructive · confirm first
Clean tombstones with the POST endpoint.
Run the POST tombstone cleanup on the storage.
PUT /admin/tsdb/snapshot Create a TSDB snapshot (PUT) · Create a snapshot of the TSDB via PUT #
Ask an LLM
“How do I take a snapshot of the storage with a PUT request?”
“Can I skip the head block when creating a snapshot?”
Tell an agent
Create a snapshot with the PUT endpoint.
Take a snapshot skipping the head block: {skip_head}.
POST /admin/tsdb/snapshot Create a TSDB snapshot · Create a snapshot of the TSDB #
Ask an LLM
“Is there a POST form of the snapshot creation?”
“Can I create a snapshot of all current data?”
Tell an agent
Create a snapshot with the POST endpoint.
Take a snapshot of all current data.

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:prometheus-io-admin-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

prometheus-io-admin-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Prometheus Admin API
  description: Prometheus is an Open-Source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.
  contact:
    name: Prometheus Community
    url: https://prometheus.io/community/
  version: 0.0.1-undefined
servers:
- url: /api/v1
tags:
- name: Admin
  description: Administrative operations for TSDB management.
paths:
  /admin/tsdb/delete_series:
    put:
      tags:
      - Admin
      summary: Delete series matching selectors via PUT
      description: Deletes data for a selection of series in a time range using PUT method.
      operationId: deleteSeriesPut
      parameters:
      - name: match[]
        in: query
        description: Series selectors to identify series to delete.
        required: true
        explode: false
        schema:
          type: array
          items:
            type: string
        examples:
          example:
            value:
            - '{__name__=~"test.*"}'
      - name: start
        in: query
        description: Start timestamp for deletion.
        required: false
        explode: false
        schema:
          oneOf:
          - type: string
            format: date-time
            description: RFC3339 timestamp.
          - type: number
            format: unixtime
            description: Unix timestamp in seconds.
          description: Timestamp in RFC3339 format or Unix timestamp in seconds.
        examples:
          RFC3339:
            value: '2026-01-02T12:37:00Z'
          epoch:
            value: 1767357420
      - name: end
        in: query
        description: End timestamp for deletion.
        required: false
        explode: false
        schema:
          oneOf:
          - type: string
            format: date-time
            description: RFC3339 timestamp.
          - type: number
            format: unixtime
            description: Unix timestamp in seconds.
          description: Timestamp in RFC3339 format or Unix timestamp in seconds.
        examples:
          RFC3339:
            value: '2026-01-02T13:37:00Z'
          epoch:
            value: 1767361020
      responses:
        '200':
          description: Series deleted successfully via PUT.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteSeriesOutputBody'
              examples:
                deletionSuccess:
                  summary: Successful series deletion
                  value:
                    status: success
        default:
          description: Error deleting series via PUT.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                tsdbNotReady:
                  summary: TSDB not ready
                  value:
                    error: TSDB not ready
                    errorType: internal
                    status: error
    post:
      tags:
      - Admin
      summary: Delete series matching selectors
      description: Deletes data for a selection of series in a time range.
      operationId: deleteSeriesPost
      parameters:
      - name: match[]
        in: query
        description: Series selectors to identify series to delete.
        required: true
        explode: false
        schema:
          type: array
          items:
            type: string
        examples:
          example:
            value:
            - '{__name__=~"test.*"}'
      - name: start
        in: query
        description: Start timestamp for deletion.
        required: false
        explode: false
        schema:
          oneOf:
          - type: string
            format: date-time
            description: RFC3339 timestamp.
          - type: number
            format: unixtime
            description: Unix timestamp in seconds.
          description: Timestamp in RFC3339 format or Unix timestamp in seconds.
        examples:
          RFC3339:
            value: '2026-01-02T12:37:00Z'
          epoch:
            value: 1767357420
      - name: end
        in: query
        description: End timestamp for deletion.
        required: false
        explode: false
        schema:
          oneOf:
          - type: string
            format: date-time
            description: RFC3339 timestamp.
          - type: number
            format: unixtime
            description: Unix timestamp in seconds.
          description: Timestamp in RFC3339 format or Unix timestamp in seconds.
        examples:
          RFC3339:
            value: '2026-01-02T13:37:00Z'
          epoch:
            value: 1767361020
      responses:
        '200':
          description: Series deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteSeriesOutputBody'
              examples:
                deletionSuccess:
                  summary: Successful series deletion
                  value:
                    status: success
        default:
          description: Error deleting series.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                tsdbNotReady:
                  summary: TSDB not ready
                  value:
                    error: TSDB not ready
                    errorType: internal
                    status: error
  /admin/tsdb/clean_tombstones:
    put:
      tags:
      - Admin
      summary: Clean tombstones in the TSDB via PUT
      description: Removes deleted data from disk and cleans up existing tombstones using PUT method.
      operationId: cleanTombstonesPut
      responses:
        '200':
          description: Tombstones cleaned successfully via PUT.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CleanTombstonesOutputBody'
              examples:
                tombstonesCleaned:
                  summary: Tombstones cleaned successfully
                  value:
                    status: success
        default:
          description: Error cleaning tombstones via PUT.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                tsdbNotReady:
                  summary: TSDB not ready
                  value:
                    error: TSDB not ready
                    errorType: internal
                    status: error
    post:
      tags:
      - Admin
      summary: Clean tombstones in the TSDB
      description: Removes deleted data from disk and cleans up existing tombstones.
      operationId: cleanTombstonesPost
      responses:
        '200':
          description: Tombstones cleaned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CleanTombstonesOutputBody'
              examples:
                tombstonesCleaned:
                  summary: Tombstones cleaned successfully
                  value:
                    status: success
        default:
          description: Error cleaning tombstones.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                tsdbNotReady:
                  summary: TSDB not ready
                  value:
                    error: TSDB not ready
                    errorType: internal
                    status: error
  /admin/tsdb/snapshot:
    put:
      tags:
      - Admin
      summary: Create a snapshot of the TSDB via PUT
      description: Creates a snapshot of all current data using PUT method.
      operationId: snapshotPut
      parameters:
      - name: skip_head
        in: query
        description: If true, do not snapshot data in the head block.
        required: false
        explode: false
        schema:
          type: string
        examples:
          example:
            value: 'false'
      responses:
        '200':
          description: Snapshot created successfully via PUT.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SnapshotOutputBody'
              examples:
                snapshotCreated:
                  summary: Snapshot created successfully
                  value:
                    data:
                      name: 20260102T133700Z-a1b2c3d4e5f67890
                    status: success
        default:
          description: Error creating snapshot via PUT.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                tsdbNotReady:
                  summary: TSDB not ready
                  value:
                    error: TSDB not ready
                    errorType: internal
                    status: error
    post:
      tags:
      - Admin
      summary: Create a snapshot of the TSDB
      description: Creates a snapshot of all current data.
      operationId: snapshotPost
      parameters:
      - name: skip_head
        in: query
        description: If true, do not snapshot data in the head block.
        required: false
        explode: false
        schema:
          type: string
        examples:
          example:
            value: 'false'
      responses:
        '200':
          description: Snapshot created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SnapshotOutputBody'
              examples:
                snapshotCreated:
                  summary: Snapshot created successfully
                  value:
                    data:
                      name: 20260102T133700Z-a1b2c3d4e5f67890
                    status: success
        default:
          description: Error creating snapshot.
          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:
    SnapshotOutputBody:
      type: object
      properties:
        status:
          type: string
          enum:
          - success
          - error
          description: Response status.
          example: success
        data:
          $ref: '#/components/schemas/DataStruct'
        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 snapshot endpoint.
    DataStruct:
      type: object
      properties:
        name:
          type: string
      required:
      - name
      additionalProperties: false
      description: Generic data structure with a name field.
    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.
    CleanTombstonesOutputBody:
      type: object
      properties:
        status:
          type: string
          enum:
          - success
          - error
          description: Response status.
          example: success
        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
      additionalProperties: false
      description: Response body containing only status.
    DeleteSeriesOutputBody:
      type: object
      properties:
        status:
          type: string
          enum:
          - success
          - error
          description: Response status.
          example: success
        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
      additionalProperties: false
      description: Response body containing only status.