Nav

List All Server Groups

The GET operation returns a list of all the server groups on the resource. The resulting JSON contains two properties: total, which returns the number of total server groups, and data, which is an array of server group types.

Example #1 Request:


       
    
1
GET http://localhost:8080/console/api/serverGroups

Example #1 Response:


       
    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
200 OK
Content-Type: application/json
Server: Apache-Coyote/1.1
Date: Mon, 10 Aug 2015 00:12:55 GMT
{
  "total" : 1,
  "data" : [
    {
      "name" : "NewGroupName",
      "id" : "73d89173-290e-4cb3-a61c-e11deb74767d",
      "serverCount" : 0,
      "href" : "http://localhost:8080/console/api/serverGroups/73d89173-290e-4cb3-a61c-e11deb74767d"
    }
  ]
}

Example #2 Request:


       
    
1
GET http://localhost:8080/console/api/serverGroups?name=MyServerGroup&redirectOnResult=true

Example #1 Response:


       
    
1
2
301
Location: http://localhost:8080/console/api/serverGroups/serverGroupId