You can use this request to failover a node in the cluster. When you failover a node, it indicates the node is no longer available in a cluster and replicated data at another node should be available to clients. You can also choose to perform node failover using the Web Console, for more information, see Couchbase Server Manual, Initiating Node Failover.
Using the REST-API endpoint
host:port/controller/failOver, provide your
administrative credentials and the parameter
optNode which is an internal name for the
> curl -v -X POST -u admin:password http://10.3.3.61:8091/controller/failOver -d otpNodeemail@example.com
The HTTP request will be similar to the following:
POST /controller/failOver HTTP/1.1 Authorization: Basic
Upon success, Couchbase Server will send a response as follows:
HTTP/1.1 200 OK HTTP/1.1 200 OK
If you try to failover a node that does not exist in the
cluster, you will get a HTTP 404 error. To learn more about how
optNode information for the nodes
in a cluster, see
Viewing Cluster Details.