Contact Free trial Login

List All Servers

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

Query Parameters:

Name Description

start

The server index to start listing at. Defaults to 0.

count

The number of servers to return. Defaults to 100.

name

The name of the server to search for. Optional.

redirectToResult

Used in conjunction with name to redirect to the server if there is one with the corresponding name. Valid values are true/false. Optional.

Example #1 Request:

GET http://localhost:8080/console/api/servers

Example #1 Response:

200 OK
Content-Type: application/json
Server: Apache-Coyote/1.1
Date: Mon, 10 Aug 2015 00:12:55 GMT
{
  "total" : 1,
  "data" : [
    {
      "id" : "1234567890",
      "href" : "http://localhost:8080/console/api/servers/1234567890",
      "name" : "DevelopmentServer1",
      "type" : "Apache Tomcat/6.0.20",
      "hosts" : [ "http://192.168.1.105:8090", "http://192.168.1.105:8010" ],
      "groups" : [
        {
          "name" : "Development",
          "href" : "http://localhost:8080/console/api/serverGroups/73d89173-290e-4cb3-a61c-e11deb74767d"
        }
      ],
      "packages" : [
        {
          "name" : "Test",
          "href" : "http://localhost:8080/console/api/packages/local$fb9dcb67-88de-482a-b0a4-50ff1d65a16a"
        }
      ]
    }
  ]
}

Example #2 Request:

GET http://localhost:8080/console/api/servers?name=MyServer&redirectOnResult=true

Example #2 Response:

301
Location: http://localhost:8080/console/api/servers/serverId

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.