Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

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 ESB, 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.


         
      
1
/api/serverGroups

POST

CREATE

Creates a new Server Group.

JSON


      
              
           
1
2
3
4
{
  "name": "NewGroupName"
}
Key Type Summary Child of

name

string

Name of the Server Group to be created

 — 

Using CURL on Windows


       
               
            
1
curl --basic -u admin:admin -d "{ \"name\" : \"NewGroupName\" }" --header "Content-Type: application/json" http://localhost:8080/mmc/api/serverGroups

Using CURL on Linux


       
               
            
1
curl --basic -u admin:admin -d '{ "name" : "NewGroupName" }" --header 'Content-Type: application/json' http://localhost:8080/mmc/api/serverGroups

JSON


      
              
           
1
2
3
4
5
6
{
  "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

 — 

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

From

3.2.2

GET

LIST ALL

List all available Server Groups.

Using CURL


      
              
           
1
curl --basic -u admin:admin http://localhost:8080/mmc/api/serverGroups

JSON


      
              
           
1
2
3
4
5
6
7
8
9
10
11
{
  "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

200

The operation was successful

From

3.2.2


         
      
1
/api/serverGroups/{serverGroupId}

GET

LIST

List details for specific Server Group.

SYNTAX


      
              
           
1
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


      
              
           
1
curl --basic -u admin:admin http://localhost:8080/mmc/api/serverGroups/37f6cd27-98b3-44b1-97e6-50b75e47f8c1

JSON


      
              
           
1
2
3
4
5
6
{
  "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

 — 

200

The operation was successful

404

A server with that ID was not found

From

3.2.2

PUT

RENAME

Renames a specific Server Group.

JSON


      
              
           
1
2
3
4
5
6
{
  "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


       
               
            
1
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


       
               
            
1
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

JSON


      
              
           
1
2
3
4
5
6
{
  "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

 — 

200 The operation was successful

500

Error while renaming a Server Group

From

3.2.2

DELETE

REMOVE

Removes a specific server group

SYNTAX


      
              
           
1
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


      
              
           
1
curl --basic -u admin:admin -X DELETE http://localhost:8080/mmc/api/serverGroups/37f6cd27-98b3-44b1-97e6-50b75e47f8c1

JSON


      
              
           
1
200 OK

200

The operation was successful

From

3.2.2