PingCAP Status API

Endpoints for retrieving the operational status of the TiDB server instance.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

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

GET /status Check the TiDB server's operational status · Get server status #
Ask an LLM
“Is my TiDB server up and accepting connections?”
“How many active connections does the TiDB server have right now?”
Tell an agent
Check the operational status of the TiDB server.
Show the TiDB version and git commit hash from the server status.
GET /metrics Get Prometheus metrics for the TiDB server · Get Prometheus metrics #
Ask an LLM
“How do I scrape Prometheus metrics from my TiDB server?”
“What query latency and error rate metrics does TiDB expose?”
Tell an agent
Fetch the Prometheus metrics from the TiDB server.
Scrape the TiDB performance metrics for my monitoring system.
GET /info Get information about one TiDB server · Get server information #
Ask an LLM
“What version and IP address does this TiDB server report?”
“Which port is the TiDB server listening on?”
Tell an agent
Get information about this TiDB server instance.
Show the version, IP and listening port of the TiDB server.
GET /info/all Get information about all TiDB servers in the cluster · Get all cluster server information #
Ask an LLM
“Which TiDB servers are running in my cluster?”
“Where can I find the connection endpoints for every TiDB node?”
Tell an agent
Get information about all TiDB servers in the cluster.
List every running TiDB node with its endpoint.

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/pingcap:pingcap-status-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

pingcap-status-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TiDB HTTP Status API
  description: The TiDB HTTP API is a built-in administrative interface available on self-managed TiDB server instances, accessible on port 10080 by default.
  version: '1.0'
  contact:
    name: TiDB GitHub
    url: https://github.com/pingcap/tidb/blob/master/docs/tidb_http_api.md
  termsOfService: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:10080
  description: Local TiDB Node (default status port)
tags:
- name: Status
  description: Endpoints for retrieving the operational status of the TiDB server instance.
paths:
  /status:
    get:
      operationId: getServerStatus
      summary: Get server status
      description: Returns the current operational status of the TiDB server instance, including the number of active connections, the TiDB version string, and the git commit hash of the binary. This endpoint is commonly used by load balancers and health check systems to verify that the TiDB process is running and accepting connections.
      tags:
      - Status
      responses:
        '200':
          description: Server status retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerStatus'
  /metrics:
    get:
      operationId: getMetrics
      summary: Get Prometheus metrics
      description: Returns all Prometheus-format performance metrics for the TiDB server instance. This endpoint is consumed by Prometheus scrape jobs to collect TiDB-specific metrics including query latency, error rates, connection pool utilization, and internal component performance counters.
      tags:
      - Status
      responses:
        '200':
          description: Prometheus metrics returned in text exposition format.
          content:
            text/plain:
              schema:
                type: string
                description: Prometheus text format metrics output.
  /info:
    get:
      operationId: getServerInfo
      summary: Get server information
      description: Returns detailed information about the TiDB server instance including version, IP address, listening port, status port, and the git hash of the binary. This endpoint is useful for service discovery and identifying specific nodes in a TiDB cluster.
      tags:
      - Status
      responses:
        '200':
          description: Server information retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerInfo'
  /info/all:
    get:
      operationId: getAllServersInfo
      summary: Get all cluster server information
      description: Returns information about all TiDB server instances in the cluster as registered with the Placement Driver (PD). This provides a cluster-wide view of all running TiDB nodes and their connection endpoints.
      tags:
      - Status
      responses:
        '200':
          description: All TiDB server information retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllServersInfo'
components:
  schemas:
    AllServersInfo:
      type: object
      description: Information about all TiDB nodes in the cluster.
      properties:
        servers_num:
          type: integer
          description: The total number of TiDB servers in the cluster.
        owner_id:
          type: string
          description: The DDL ID of the current DDL owner node.
        is_all_server_version_consistent:
          type: boolean
          description: Whether all TiDB servers are running the same version.
        all_servers_info:
          type: object
          description: A map of server DDL IDs to their ServerInfo objects.
          additionalProperties:
            $ref: '#/components/schemas/ServerInfo'
    ServerInfo:
      type: object
      description: Detailed information about the TiDB server instance.
      properties:
        ddl_id:
          type: string
          description: The unique DDL identifier for this TiDB node.
        ip:
          type: string
          description: The IP address of this TiDB node.
        listening_port:
          type: integer
          description: The SQL connection port this node listens on.
        status_port:
          type: integer
          description: The HTTP status port this node listens on.
        lease:
          type: string
          description: The schema lease duration string.
        binlog_status:
          type: string
          description: The current binlog pump connection status.
        start_timestamp:
          type: integer
          description: The Unix timestamp when this TiDB server started.
        git_hash:
          type: string
          description: The git commit hash of the TiDB binary.
        is_owner:
          type: boolean
          description: Whether this TiDB node is the current DDL owner.
        op_scope_level:
          type: integer
          description: The scope level for this server's operational range.
    ServerStatus:
      type: object
      description: Current operational status of the TiDB server instance.
      properties:
        connections:
          type: integer
          description: The number of currently active client connections.
        version:
          type: string
          description: The TiDB server version string.
        git_hash:
          type: string
          description: The git commit hash of the running TiDB binary.
externalDocs:
  description: TiDB HTTP API Reference
  url: https://github.com/pingcap/tidb/blob/master/docs/tidb_http_api.md