You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/website/content/api-docs/status.mdx

90 lines
2.7 KiB

8 years ago
---
layout: api
page_title: Status - HTTP API
description: |-
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.
---
# 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.
5 years ago
| Method | Path | Produces |
| :----- | :--------------- | ------------------ |
| `GET` | `/status/leader` | `application/json` |
8 years ago
The table below shows this endpoint's support for
[blocking queries](/consul/api-docs/features/blocking),
[consistency modes](/consul/api-docs/features/consistency),
[agent caching](/consul/api-docs/features/caching), and
[required ACLs](/consul/api-docs/api-structure#authentication).
8 years ago
| Blocking Queries | Consistency Modes | Agent Caching | ACL Required |
| ---------------- | ----------------- | ------------- | ------------ |
| `NO` | `none` | `none` | `none` |
8 years ago
### Query Parameters
- `dc` `(string: "")` - Specifies the datacenter to query. This will default to
the datacenter of the agent being queried.
8 years ago
### Sample Request
```shell-session
$ curl http://127.0.0.1:8500/v1/status/leader
8 years ago
```
### Sample Response
```json
"10.1.10.12:8300"
```
## List Raft Peers
This endpoint retrieves the Raft peers for the datacenter in which the agent
8 years ago
is running. This list of peers is strongly consistent and can be useful in
determining when a given server has successfully joined the cluster.
5 years ago
| Method | Path | Produces |
| :----- | :-------------- | ------------------ |
| `GET` | `/status/peers` | `application/json` |
8 years ago
The table below shows this endpoint's support for
[blocking queries](/consul/api-docs/features/blocking),
[consistency modes](/consul/api-docs/features/consistency),
[agent caching](/consul/api-docs/features/caching), and
[required ACLs](/consul/api-docs/api-structure#authentication).
8 years ago
| Blocking Queries | Consistency Modes | Agent Caching | ACL Required |
| ---------------- | ----------------- | ------------- | ------------ |
| `NO` | `none` | `none` | `none` |
8 years ago
The corresponding CLI command is [`consul operator raft list-peers`](/consul/commands/operator/raft#list-peers).
### Query Parameters
- `dc` `(string: "")` - Specifies the datacenter to query. This will default to
the datacenter of the agent being queried.
8 years ago
### Sample Request
```shell-session
$ curl http://127.0.0.1:8500/v1/status/peers
8 years ago
```
### Sample Response
```json
5 years ago
["10.1.10.12:8300", "10.1.10.11:8300", "10.1.10.10:8300"]
8 years ago
```