Blog HCP Consul on Azure goes GA, plus more Consul news from HashiConf EU Read more
  • Overview
    • Consul on Kubernetes
    • Control access with Consul API Gateway
    • Discover Services with Consul
    • Enforce Zero Trust Networking with Consul
    • Load Balancing with Consul
    • Manage Traffic with Consul
    • Multi-Platform Service Mesh with Consul
    • Network Infrastructure Automation with Consul
    • Observability with Consul
  • Enterprise
  • Tutorials
  • Docs
  • API
  • CLI
  • Community
GitHub
Download
Try HCP Consul
    • v1.12.x (latest)
    • v1.11.x
    • v1.10.x
    • v1.9.x
    • v1.8.x
  • API Introduction
    • Consistency Modes
    • Blocking Queries
    • Filtering
    • Agent Caching

    • Overview
    • Tokens
    • Legacy Tokens
    • Policies
    • Roles
    • Auth Methods
    • Binding Rules
  • Admin Partitions
    • Overview
    • Checks
    • Services
    • Connect
  • Catalog
  • Cluster Peering
  • Config
    • Overview
    • Certificate Authority (CA)
    • Intentions
  • Coordinates
  • Discovery Chain
  • Events
  • Health
  • KV Store
    • Overview
    • Area
    • Autopilot
    • Keyring
    • License
    • Raft
    • Segment
  • Namespaces
  • Prepared Queries
  • Sessions
  • Snapshots
  • Status
  • Transactions

  • Libraries & SDKs
Type '/' to Search

»Status HTTP API

The /status endpoints return information about the status of the Consul cluster. This information is generally very low level and not often useful for clients.

»Get Raft Leader

This endpoint returns the Raft leader for the datacenter in which the agent is running.

MethodPathProduces
GET/status/leaderapplication/json

The table below shows this endpoint's support for blocking queries, consistency modes, agent caching, and required ACLs.

Blocking QueriesConsistency ModesAgent CachingACL Required
NOnonenonenone

»Query Parameters

  • dc (string: "") - Specifies the datacenter to query. This will default to the datacenter of the agent being queried.

»Sample Request

$ curl http://127.0.0.1:8500/v1/status/leader
$ curl http://127.0.0.1:8500/v1/status/leader

»Sample Response

"10.1.10.12:8300"
"10.1.10.12:8300"

»List Raft Peers

This endpoint retrieves the Raft peers for the datacenter in which the the agent is running. This list of peers is strongly consistent and can be useful in determining when a given server has successfully joined the cluster.

MethodPathProduces
GET/status/peersapplication/json

The table below shows this endpoint's support for blocking queries, consistency modes, agent caching, and required ACLs.

Blocking QueriesConsistency ModesAgent CachingACL Required
NOnonenonenone

The corresponding CLI command is consul operator raft list-peers.

»Query Parameters

  • dc (string: "") - Specifies the datacenter to query. This will default to the datacenter of the agent being queried.

»Sample Request

$ curl http://127.0.0.1:8500/v1/status/peers
$ curl http://127.0.0.1:8500/v1/status/peers

»Sample Response

["10.1.10.12:8300", "10.1.10.11:8300", "10.1.10.10:8300"]
["10.1.10.12:8300", "10.1.10.11:8300", "10.1.10.10:8300"]
github logoEdit this page
IntroGuidesDocsCommunityPrivacySecurityBrandConsent Manager