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

Create a Server Group

When invoked with the HTTP POST operation, the resource /mmc/api/serverGroups creates a new server group. The JSON server group data structure passed to the resource should contain one property, the name property, which is the name of the group to be created.

Example Request

The following example shows how to use this resource to create a new server group. Note that the JSON class specifies the name for the server group, NewGroupName.


         
      
1
POST http://localhost:8080/mmc/api/serverGroupsContent-Type: application/json{ "name" : "NewGroupName" }

Example Response

The following is a sample response to a successful request to create a new server group.


         
      
1
201Content-Type: application/jsonServer: Apache-Coyote/1.1Location: http://localhost:8080/mmc/api/serverGroups/73d89173-290e-4cb3-a61c-e11deb74767dDate: Sun, 08 Nov 2009 00:12:55 GMT {  "name" : "NewGroupName",  "id" : "73d89173-290e-4cb3-a61c-e11deb74767d",  "serverCount" : 0,  "href" : "http://localhost:8080/mmc/api/serverGroups/73d89173-290e-4cb3-a61c-e11deb74767d"}