Skip to content

Commit

Permalink
feat(Documentation): document the entire admin machines API
Browse files Browse the repository at this point in the history
Flesh out this document a bit more completely.
  • Loading branch information
Brandon Philips committed May 21, 2014
1 parent c3aab42 commit 0eba3c9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Documentation/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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
```

0 comments on commit 0eba3c9

Please sign in to comment.