/api/serverGroups
Server Groups
About This Document
This document, as well as the rest of the documents that make up the Mule Management Console REST API Reference Guide, are a technical reference only. This document does not provide contextual information such as instructions, use cases, or scenarios. To understand this document, you should be familiar with Mule Runtime, Server Groups, and the REST API
Assumptions: |
Host |
localhost |
Port |
8080 |
Deployed app |
mmc.war |
User/Password |
admin/admin |
For a detailed description of the format used in this document, consult Content Organization and Conventions.
POST |
CREATE |
|
Creates a new Server Group.
→ Request
JSON
{
"name": "NewGroupName"
}
Key | Type | Summary | Child of |
---|---|---|---|
name |
string |
Name of the Server Group to be created |
— |
Using CURL on Windows
curl --basic -u admin:admin -d "{ \"name\" : \"NewGroupName\" }" --header "Content-Type: application/json" http://localhost:8080/mmc/api/serverGroups
Using CURL on Linux
curl --basic -u admin:admin -d '{ "name" : "NewGroupName" }" --header 'Content-Type: application/json' http://localhost:8080/mmc/api/serverGroups
← Response
JSON
{
"name": "NewGroupName",
"id": "73d89173-290e-4cb3-a61c-e11deb74767d",
"serverCount": 0,
"href": "http://localhost:8080/mmc/api/serverGroups/73d89173-290e-4cb3-a61c-e11deb74767d"
}
Key | Type | Summary | Child of |
---|---|---|---|
name |
String |
Name of the created Server Group |
— |
id |
String |
MMC ID for the Server Group |
— |
serverCount |
String |
Number of servers assigned to the Server Group |
— |
href |
String |
Full link to the Server Group resource on which you can perform an operation |
— |
⬇️ Common Return codes
201 |
The request has been fulfilled and resulted in a new Server Group being created. |
409 |
A server group with that name already exists |
500 |
Error while creating a Server Group |
MMC version
From |
3.2.2 |
GET |
LIST ALL |
|
List all available Server Groups.
→ Request
Using CURL
curl --basic -u admin:admin http://localhost:8080/mmc/api/serverGroups
← Response
JSON
{
"total": 1,
"data": [
{
"name": "NewGroupName",
"id": "73d89173-290e-4cb3-a61c-e11deb74767d",
"serverCount": 0,
"href": "http://localhost:8080/mmc/api/serverGroups/73d89173-290e-4cb3-a61c-e11deb74767d"
}
]
}
Key | Type | Summary | Child of |
---|---|---|---|
total |
Integer |
The total number of Server Groups |
— |
data |
Array |
An array of server group types |
— |
name |
String |
The identifying name of the server group |
data |
id |
String |
The server group identifier |
data |
serverCount |
Integer |
The number of servers in the server group |
data |
href |
String |
Full link to the Server Group resource to which you can perform an operation |
data |
⬇️ Common Return codes
200 |
The operation was successful |
MMC version
From |
3.2.2 |
/api/serverGroups/{serverGroupId}
GET |
LIST |
|
List details for specific Server Group.
→ Request
SYNTAX
GET http://localhost:8080/mmc/api/serverGroups/{serverGroupId}
Key | Type | Summary | Child of |
---|---|---|---|
serverGroupdId |
String |
ID of the server group to be listed. Invoke LIST ALL to obtain it |
— |
Using CURL
curl --basic -u admin:admin http://localhost:8080/mmc/api/serverGroups/37f6cd27-98b3-44b1-97e6-50b75e47f8c1
← Response
JSON
{
"name": "NewGroupName",
"id": "73d89173-290e-4cb3-a61c-e11deb74767d",
"serverCount": 0,
"href": "http://localhost:8080/mmc/api/serverGroups/73d89173-290e-4cb3-a61c-e11deb74767d"
}
Key | Type | Summary | Child of |
---|---|---|---|
name |
String |
— |
|
id |
String |
Id of the Server Group |
— |
serverCount |
Number of servers belonging to the Server Group |
— |
|
href |
String |
Full link to the Server Group resource |
— |
⬇️ Common Return codes
200 |
The operation was successful |
404 |
A server with that ID was not found |
MMC version
From |
3.2.2 |
PUT |
RENAME |
|
Renames a specific Server Group.
→ Request
JSON
{
"name": "NewGroupName",
"id": "73d89173-290e-4cb3-a61c-e11deb74767d",
"serverCount": 0,
"href": "http://localhost:8080/mmc/api/serverGroups/73d89173-290e-4cb3-a61c-e11deb74767d"
}
Key | Type | Summary | Child of |
---|---|---|---|
name |
String |
Name of the Server Group to be created |
— |
id |
String |
MMC ID of the Server Group |
— |
serverCount |
String |
Number of servers assigned to the Server Group |
— |
href |
String |
Full link to the Server Group resource on which you can perform an operation |
— |
Using CURL on Windows
curl --basic -u admin:admin -X PUT -d "{\"name\":\"NewName\",\"id\":\"330d9139-4462-4e36-b76c-569776cc3da9\",\"href\": \"http://localhost:8080/mmc/api/serverGroups/330d9139-4462-4e36-b76c-569776cc3da9\",\"serverCount\":0}" --header "Content-Type:application/json" http://localhost:8080/mmc/api/serverGroups/330d9139-4462-4e36-b76c-569776cc3da9
Using CURL on Linux
curl --basic -u admin:admin -X PUT -d '{"name":"NewName","id":"330d9139-4462-4e36-b76c-569776cc3da9","href": "http://localhost:8080/mmc/api/serverGroups/330d9139-4462-4e36-b76c-569776cc3da9","serverCount":0}' --header 'Content-Type:application/json' http://localhost:8080/mmc/api/serverGroups/330d9139-4462-4e36-b76c-569776cc3da9
← Response
JSON
{
"name": "NewGroupName",
"id": "73d89173-290e-4cb3-a61c-e11deb74767d",
"serverCount": 0,
"href": "http://localhost:8080/mmc/api/serverGroups/73d89173-290e-4cb3-a61c-e11deb74767d"
}
Key | Type | Summary | Child of |
---|---|---|---|
name |
String |
Name of the Server Group to be created |
— |
id |
String |
MMC ID of the Server Group |
— |
serverCount |
String |
Number of servers assigned to the Server Group |
— |
href |
String |
Full link to the Server Group resource on which you can perform an operation |
— |
⬇️ Common Return codes
200 | The operation was successful |
---|---|
500 |
Error while renaming a Server Group |
MMC version
From |
3.2.2 |
DELETE |
REMOVE |
|
Removes a specific server group
→ Request
SYNTAX
DELETE http://localhost:8080/mmc/api/serverGroups/{serverGroupId}
Key | Type | Summary | Child of |
---|---|---|---|
serverGroupdId |
String |
ID of the server group to be listed. Invoke LIST ALL to obtain it |
— |
Using CURL
curl --basic -u admin:admin -X DELETE http://localhost:8080/mmc/api/serverGroups/37f6cd27-98b3-44b1-97e6-50b75e47f8c1
← Response
JSON
200 OK
⬇️ Common Return codes
200 |
The operation was successful |
MMC version
From |
3.2.2 |