From a7f83b62f325cad17be513f39d7fed58f65710a7 Mon Sep 17 00:00:00 2001 From: Yoann Fouquet Date: Wed, 24 Oct 2018 17:20:05 +0200 Subject: [PATCH] website: mention node name for "agent/force-leave" HTTP endpoint (#4542) * Adjust documentation for agent/force-leave endpoint A node must be specified when calling agent/force-leave. See: - https://github.com/hashicorp/consul/blob/master/agent/http_oss.go#L25 - https://github.com/hashicorp/consul/blob/master/agent/agent_endpoint.go#L323 - https://github.com/hashicorp/consul/blob/master/agent/agent.go#L1442 However, the documentation does not specify it. Note that Consul returns "301 Moved Permanently v1/agent/force-leave/" when sending PUT request on "v1/agent/force-leave". * Switch from node id to node name --- website/source/api/agent.html.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/website/source/api/agent.html.md b/website/source/api/agent.html.md index 55be66577a..f3a78447a6 100644 --- a/website/source/api/agent.html.md +++ b/website/source/api/agent.html.md @@ -488,7 +488,7 @@ state allows its old entries to be removed. | Method | Path | Produces | | ------ | ---------------------------- | -------------------------- | -| `PUT` | `/agent/force-leave` | `application/json` | +| `PUT` | `/agent/force-leave/:node` | `application/json` | The table below shows this endpoint's support for [blocking queries](/api/index.html#blocking-queries), @@ -500,12 +500,16 @@ The table below shows this endpoint's support for | ---------------- | ----------------- | ------------- | ------------- | | `NO` | `none` | `none` | `agent:write` | +### Parameters + +- `node` `(string: )` - Specifies the name of the node to be forced into `left` state. This is specified as part of the URL. + ### Sample Request ```text $ curl \ --request PUT \ - http://127.0.0.1:8500/v1/agent/force-leave + http://127.0.0.1:8500/v1/agent/force-leave/agent-one ``` ## Update ACL Tokens