Skip to main content

Cluster: Cluster API

REST API endpoints

Each operation below is performed by calling a REST endpoint.

Add node to the cluster

You can add a node to the cluster by sending an HTTP PUT request to the /admin/cluster/node endpoint with the following arguments:

ArgumentDescriptionRequiredDefault
new-node-urlThe address of the new node you want to add to the clustertrue-
new-node-tag1-4 uppercase unicode lettersfalseA - Z assigned by order of addition
is-watcherAdd the new node as a watcherfalsefalse
max-utilized-coresThe maximum number of cores that can be assigned to the new nodefalseNumber of processors on the machine or the license limit, the smaller of the two

Required security clearance: Cluster Admin

Example: Add a node

To make a secure call, the Document Store must be provided with the client certificate (see example).

store.GetRequestExecutor().HttpClient.SendAsync(new HttpRequestMessage(HttpMethod.Put, "https://<server-url>/admin/cluster/node?url=<new-node-url>&tag=<new-node-tag>&watcher=<is-watcher>&maxUtilizedCores=<max-utilized-cores>"));

Delete node from the cluster

You can delete a node from the cluster by sending an HTTP DELETE request to the /admin/cluster/node endpoint with the following argument:

ArgumentDescriptionRequiredDefault
node-tagThe tag of the node to deletetrue-

Required security clearance: Cluster Admin

Check the replication factor before removing a node

Removing a node removes from the cluster the database copies this node held:

  • A database whose only copy was on the removed node will become inaccessible.
  • A multi-node database that had one of its copies on the removed node will have its replication factor reduced by one.

Prior to removing a node, make sure that all the databases it holds have copies on other nodes.

Example: Delete a node

curl -X DELETE "https://<server-url>/admin/cluster/node?nodeTag=<node-tag>"

Promote a node

Promoting a node turns a watcher into a voting member that participates in the cluster quorum.
You can promote a node by sending an HTTP POST request to the /admin/cluster/promote endpoint with the following argument:

ArgumentDescriptionRequiredDefault
node-tagThe tag of the node to promotetrue-
  • No request body is required.
  • Required security clearance: Cluster Admin

Example: Promote a node

curl -X POST "https://<server-url>/admin/cluster/promote?nodeTag=<node-tag>" -d ''

Demote a node

Demoting a node turns a voting member into a watcher that no longer participates in the cluster quorum.
You can demote a node by sending an HTTP POST request to the /admin/cluster/demote endpoint with the following argument:

ArgumentDescriptionRequiredDefault
node-tagThe tag of the node to demotetrue-
  • No request body is required.
  • Required security clearance: Cluster Admin

Example: Demote a node

curl -X POST "https://<server-url>/admin/cluster/demote?nodeTag=<node-tag>" -d ''

Bootstrap cluster

You can bootstrap the cluster by sending an empty HTTP POST request to the /admin/cluster/bootstrap endpoint.
Note that bootstrapping takes effect only while the server is in the Passive state. On a server that has already formed or joined a cluster, the request has no effect.

Required security clearance: Cluster Admin

Example: Bootstrap the cluster

curl -X POST "https://<server-url>/admin/cluster/bootstrap" -d ''

Force elections

You can force an election by sending an empty HTTP POST request to the /admin/cluster/reelect endpoint.

Required security clearance: Operator

Example: Force an election

curl -X POST "https://<server-url>/admin/cluster/reelect" -d ''

Force timeout

You can force a timeout by sending an empty HTTP POST request to the /admin/cluster/timeout endpoint.

Required security clearance: Operator

Example: Force a timeout

curl -X POST "https://<server-url>/admin/cluster/timeout" -d ''

In this article