HashiCorp Consul Status API

Cluster status information

OpenAPI Specification

consul-status-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: HashiCorp Consul HTTP ACL Status API
  description: The Consul HTTP API provides full access to Consul functionality including service discovery, health checking, key/value storage, ACL management, Connect service mesh, configuration entries, and multi-datacenter operations.
  version: 1.18.0
  contact:
    name: HashiCorp
    url: https://www.consul.io/
  license:
    name: Business Source License 1.1
    url: https://github.com/hashicorp/consul/blob/main/LICENSE
servers:
- url: http://localhost:8500/v1
  description: Local Consul agent
- url: https://{consul_host}:{port}/v1
  description: Custom Consul server
  variables:
    consul_host:
      default: localhost
    port:
      default: '8500'
security:
- ConsulToken: []
tags:
- name: Status
  description: Cluster status information
paths:
  /status/leader:
    get:
      operationId: getStatusLeader
      summary: Get Raft leader
      description: Returns the Raft leader for the datacenter.
      tags:
      - Status
      responses:
        '200':
          description: Leader address
          content:
            application/json:
              schema:
                type: string
  /status/peers:
    get:
      operationId: getStatusPeers
      summary: List Raft peers
      description: Returns the Raft peers for the datacenter.
      tags:
      - Status
      responses:
        '200':
          description: Peer addresses
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
components:
  securitySchemes:
    ConsulToken:
      type: apiKey
      name: X-Consul-Token
      in: header
      description: ACL token for authentication