-→ Requests
JSON
{
"name":"My Cluster",
"version":"3.4.0",
"nodes":
[
"local$68eded4b-efda-4703-b292-62c6aee30a8b",
"local$97226216-c3bf-4bed-a544-878a9e64b74f"
]
}
Key | Type | Summary | Child of |
---|---|---|---|
name |
String |
Name of the cluster to be created |
— |
version |
String |
Version of the cluster to be created. This must correspond exactly with the version of the cluster nodes |
— |
nodes |
Array |
List of server IDs that will be assigned to the new cluster. It is required that at least one valid Server ID is supplied |
— |
Using CURL on Windows
curl --basic -u admin:admin -d "{\"name\":\"My Cluster\",\"version\":\"3.4.0\", \"nodes\":[\"local$194cdc5b-2253-4f35-b663-b311e4f28956\", \"local$ef85a37f-a3c1-4d1f-b8e6-8fac85d2fca7\"]}" --header "Content-Type: application/json" http://localhost:8080/mmc/api/clusters
Using CURL on Linux
curl --basic -u admin:admin -d '{"name":"My Cluster","version":"3.8.0", "nodes":["local$194cdc5b-2253-4f35-b663-b311e4f28956", "local$ef85a37f-a3c1-4d1f-b8e6-8fac85d2fca7"]}' --header 'Content-Type: application/json' http://localhost:8080/mmc/api/clusters
←- Response
Json
Key | Type | Summary | Child of |
---|---|---|---|
name |
String |
Name of the created cluster |
— |
location |
String |
Reserved for future usage. Default value: "N/A" |
— |
id |
String |
The ID of the newly created Cluster |
— |
version |
String |
Version of the created cluster |
— |
status |
String |
Displays the total number of nodes and how many of them are online |
— |
pausedServices |
Integer |
Number of paused services on the Cluster |
— |
stoppedServices |
Integer |
Number of stopped services on the Cluster |
— |
nodeServerIds |
List |
List of Server IDs that are the nodes on the Cluster |
— |
deployments |
List |
List of Cluster’s deployment IDs. When newly created, this list should be empty |
— |
clusterStatus |
String |
Status of the Cluster (e.g. STOPPED, WAITING_FOR_RESTART, OK) |
— |
nodesUpCount |
Integer |
Number of online nodes |
— |
lastRestarted |
Integer |
Last restart time since epoch |
— |
runningServices |
Integer |
Number of running services on the Cluster |
— |
totalServices |
Integer |
Total number of services on the Cluster |
— |
groupIds |
List |
List group IDs that this Cluster belongs to |
— |
Common Return codes
201 |
The Cluster was created successfully |
400 |
At least one node is not responding/ Malformed Url exception/ Cluster Node Exception/ Some nodes weren’t found/ Access Exception/ |
409 |
A cluster with that name already exists |
MMC version
From 3.2.2 |
---|