Nav

Register a Server

The POST operation registers the specified server inside Tcat Server. The call takes a JSON object with two properties: name, which is the name of the newly registered server, and agentUrl, which is the URL where the Tcat Server agent is located on the remote Tomcat server.

Example Request:


       
    
1
2
3
4
5
6
7
POST http://localhost:8080/console/api/servers
Content-Type: application/json
 
{
  "name" : "Test",
  "agentUrl" : "http://localhost:8080/agent"
}

Example Response:


       
    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
201
Transfer-Encoding: chunked
Content-Type: application/json
Server: Apache-Coyote/1.1
Location: http://localhost:8080/console/api/servers/local$fa1b187e-0436-4d44-a6c1-140416d4d440
Date: Mon, 10 Aug 2015 19:38:42 GMT
 
{
  "id" : "local$fa1b187e-0436-4d44-a6c1-140416d4d440",
  "href" : "http://localhost:8080/console/api/servers/servers/local$fa1b187e-0436-4d44-a6c1-140416d4d440",
  "name" : "Test",
  "packages" : [],
  "type" : "Apache Tomcat 6.x",
  "hosts" : ["http://localhost:8080"],
  "groups" : []
}