PUT http://localhost:8080/mmc/api/servers/local$fa1b187e-0436-4d44-a6c1-140416d4d440
Content-Type: application/json
{
"name" : "NewName",
"groups": [
{
"href" : "http://localhost:8080/mmc/api/serverGroups/02876a19-6edc-49e8-9a47-dc2cc3f33afd"
}
]
}
Update a Server
This resource updates property values for the specified server. You use the /mmc/api/servers/<myServerId>
with the HTTP PUT command. Substitute <myServerId> with the URL to the server. The operation updates the properties for the server specified by the URL.
Currently, you can update only the name
and group
properties for a server.
To specify a new group
property, you need to use the href
URL to the group.
Example Request
The following code illustrates a sample request.
Example Response
The above request, if successful, might return the following response.
200 OK
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
{
"name" : "NewName",
"id" : "local$fa1b187e-0436-4d44-a6c1-140416d4d440",
"href" : "http://localhost:8080/mmc/api/servers/local$b15ecba1-9f97-4b16-8127-9b137cdbb2e1",
"agentUrl" : "https://localhost:7777/mmc-support",
"hostIp" : "192.168.0.13",
"muleServerId" : "d9505d40-2c5c-11df-b832-a32a5a09ec4e",
"started" : "Wed Mar 10 16:51:59 CET 2010",
"version" : "2.2.5",
"agents": [
{
"name" : "mmc-support",
"description" : "Mule Management Console Support (0.0.0.0:7777)"
},
{
"name" : "jmx-agent",
"description" : "JMX Agent"
}
],
"groups" : [
{
"name" : "Production",
"href" : "http://localhost:8080/mmc/api/serverGroups/02876a19-6edc-49e8-9a47-dc2cc3f33afd"
}
],
"runningServices" : 3,
"pausedServices" : 0,
"stoppedServices": 0
}