From 45c0ae9da67d40898953e829b4d3f9b92341d6d1 Mon Sep 17 00:00:00 2001 From: Kyle Havlovitz Date: Thu, 26 Oct 2017 20:17:46 -0700 Subject: [PATCH] Add docs for the coordinate update endpoint --- website/source/api/coordinate.html.md | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/website/source/api/coordinate.html.md b/website/source/api/coordinate.html.md index e3d87fcab..286410dba 100644 --- a/website/source/api/coordinate.html.md +++ b/website/source/api/coordinate.html.md @@ -174,3 +174,51 @@ $ curl \ In **Consul Enterprise**, this may include multiple coordinates for the same node, each marked with a different `Segment`. Coordinates are only compatible within the same segment. + +## Update LAN Coordinates for a node + +This endpoint updates the LAN network coordinates for a node in a given +datacenter. + +| Method | Path | Produces | +| ------ | ---------------------------- | -------------------------- | +| `PUT` | `/coordinate/update` | `application/json` | + +The table below shows this endpoint's support for +[blocking queries](/api/index.html#blocking-queries), +[consistency modes](/api/index.html#consistency-modes), and +[required ACLs](/api/index.html#acls). + +| Blocking Queries | Consistency Modes | ACL Required | +| ---------------- | ----------------- | ------------ | +| `NO` | `none` | `node:write` | + +### Parameters + +- `dc` `(string: "")` - Specifies the datacenter to query. This will default to + the datacenter of the agent being queried. This is specified as part of the + URL as a query parameter. + +### Sample Payload + +```text +{ + "Node": "agent-one", + "Segment": "", + "Coord": { + "Adjustment": 0, + "Error": 1.5, + "Height": 0, + "Vec": [0, 0, 0, 0, 0, 0, 0, 0] + } +} +``` + +### Sample Request + +```text +$ curl \ + --request PUT \ + --data @payload.json \ + https://consul.rocks/v1/coordinate/update +```