Adding nodes to clusters

HTTP method and URI


POST /controller/addNode
      

Syntax

This is a REST request made to a Couchbase cluster to add a server node to the cluster. A new node is add with the RESTful endpoint server_ip:port/controller/addNode. The administrative username and password parameters are required.


curl -u [admin]:[password]
  [localhost]:8091/controller/addNode 
  -d "hostname=[IPaddress]&user=[admin]&password=[password]"
      

Example

The following example request adds a server node, 10.2.2.64, to the cluster at 10.2.2.60:8091. The POST method, controller/addNode, IP address for the new server, and administrative credentials are provided. Since the POST method is the default, it is not required in the request.

curl -u admin:password \
  10.2.2.60:8091/controller/addNode \
  -d "hostname=10.2.2.64&user=admin&password=password"

Response

If successful, Couchbase Server responds:

HTTP/1.1 200 OK
{"otpNode":"[email protected]"}