Example

  1. {
  2. "members": [
  3. {
  4. "name": "infra1",
  5. "peerURLs": [
  6. "http://10.0.0.10:2380"
  7. ],
  8. "clientURLs": [
  9. "http://10.0.0.10:2379"
  10. ]
  11. {
  12. "id": "2225373f43",
  13. "name": "infra2",
  14. "peerURLs": [
  15. "http://10.0.0.11:2380"
  16. ],
  17. "clientURLs": [
  18. ]
  19. },
  20. ]

Returns an HTTP 201 response code and the representation of added member with a newly generated a memberID when successful. Returns a string describing the failure condition when unsuccessful.

Example

  1. curl http://10.0.0.10:2379/v2/members -XPOST \
  2. -H "Content-Type: application/json" -d '{"peerURLs":["http://10.0.0.10:2380"]}'
  1. {
  2. "id": "3777296169",
  3. "peerURLs": [
  4. "http://10.0.0.10:2380"
  5. ]
  6. }

Remove a member from the cluster. The member ID must be a hex-encoded uint64. Returns 204 with empty content when successful. Returns a string describing the failure condition when unsuccessful.

Example

  1. curl http://10.0.0.10:2379/v2/members/272e204152 -XDELETE

Change the peer urls of a given member. The member ID must be a hex-encoded uint64. Returns 204 with empty content when successful. Returns a string describing the failure condition when unsuccessful.

  1. PUT /v2/members/<id> HTTP/1.1

Example