tidb Status API

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

Operations 4

GET /status Get server status #
GET /metrics Get Prometheus metrics #
GET /info Get server information #
GET /info/all Get all cluster server information #

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/tidb-status-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

tidb-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. It exposes endpoints for retrieving server status, database and table schema information, region metadata, MVCC key details, DDL job history, hot region data, and server configuration. Operators and monitoring systems use this API to inspect the internal state of a running TiDB node, integrate with observability tooling, and troubleshoot distributed SQL execution. The API does not require authentication by default and is intended for use within trusted internal networks. The port can be configured in tidb.toml via the status.status-port setting.
  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:
    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.
    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'
externalDocs:
  description: TiDB HTTP API Reference
  url: https://github.com/pingcap/tidb/blob/master/docs/tidb_http_api.md