diff --git a/Documentation/api.md b/Documentation/api.md index 2fbd4c7be..f392c95e6 100644 --- a/Documentation/api.md +++ b/Documentation/api.md @@ -1241,6 +1241,36 @@ curl -L http://127.0.0.1:7001/v2/admin/config At times you may want to manually remove a machine. Using the machines endpoint you can find and remove machines. +First, list all the machines in the cluster. + +```sh +curl -L http://127.0.0.1:7001/v2/admin/machines +``` +```json +[ + { + "clientURL": "http://127.0.0.1:4001", + "name": "peer1", + "peerURL": "http://127.0.0.1:7001", + "state": "leader" + }, + { + "clientURL": "http://127.0.0.1:4002", + "name": "peer2", + "peerURL": "http://127.0.0.1:7002", + "state": "follower" + }, + { + "clientURL": "http://127.0.0.1:4003", + "name": "peer3", + "peerURL": "http://127.0.0.1:7003", + "state": "follower" + } +] +``` + +Then take a closer look at the machine you want to remove. + ```sh curl -L http://127.0.0.1:7001/v2/admin/machines/peer2 ``` @@ -1254,6 +1284,8 @@ curl -L http://127.0.0.1:7001/v2/admin/machines/peer2 } ``` +And finally remove it. + ```sh curl -L -XDELETE http://127.0.0.1:7001/v2/admin/machines/peer2 ```