Coordinate HTTP Endpoint
The /coordinate endpoints query for the network coordinates for nodes in the
local datacenter as well as Consul servers in the local datacenter and remote
datacenters.
Please see the Network Coordinates internals guide for more information on how these coordinates are computed, and for details on how to perform calculations with them.
Read WAN Coordinates
This endpoint returns the WAN network coordinates for all Consul servers, organized by datacenters. It serves data out of the server's local Serf data, so its results may vary as requests are handled by different servers in the cluster.
| Method | Path | Produces |
|---|---|---|
GET | /coordinate/datacenters | application/json |
The table below shows this endpoint's support for blocking queries, consistency modes, agent caching, and required ACLs.
| Blocking Queries | Consistency Modes | Agent Caching | ACL Required |
|---|---|---|---|
NO | none | none | none |
The corresponding CLI command is consul rtt -wan.
Sample Request
$ curl \
http://127.0.0.1:8500/v1/coordinate/datacenters
Sample Response
[
{
"Datacenter": "dc1",
"AreaID": "WAN",
"Coordinates": [
{
"Node": "agent-one",
"Coord": {
"Adjustment": 0,
"Error": 1.5,
"Height": 0,
"Vec": [0, 0, 0, 0, 0, 0, 0, 0]
}
}
]
}
]
In Consul Enterprise, this will include coordinates for user-added network
areas as well, as indicated by the AreaID. Coordinates are only compatible
within the same area.