Contact Us 1-800-596-4880

Register a Server

When used with the HTTP POST operation, the /mmc/api/servers resource registers the specified server inside management console.

Parameters

The call to this resource takes a JSON object with two properties:

  • name - The name of the newly registered server.

  • agentUrl - The URL to the location of the Mule Management Console agent on the local or remote server.

Example Request

The following is an example of a request to register a server.

POST http://localhost:8080/mmc/api/servers
Content-Type: application/json

{
  "name" : "Test",
  "agentUrl" : "http://localhost:7777/mmc-support"
}

Example Response

The following is a sample response to the previous example request. Notice that the response includes a status code of 201, indicating that the server was successfully registered. The Location field in the header contains the URL to the newly registered server, as does the href field in the response body.

201
Transfer-Encoding: chunked
Content-Type: application/json
Server: Apache-Coyote/1.1
Location: http://localhost:8080/mmc/api/servers/local$fa1b187e-0436-4d44-a6c1-140416d4d440
Date: Mon, 09 Nov 2009 19:38:42 GMT

{
  "id" : "local$fa1b187e-0436-4d44-a6c1-140416d4d440",
  "href" : "http://localhost:8080/mmc/api/servers/local$fa1b187e-0436-4d44-a6c1-140416d4d440",
  "name" : "Test",
   ...
}