POST
Servers
Mule Management Console (MMC) was deprecated in December 2015. Its End of Life is July 15, 2019. For more information see the MMC Migrator Tool or contact your Customer Success Manager to determine how you can migrate to Anypoint Runtime Manager. |
This document, as well as the rest of the documents that make up the Mule Management Console REST API Reference Guide, are a technical reference only. This document does not provide contextual information such as instructions, use cases or scenarios. To understand this document, you should be familiar with MULE ESB, Mule Servers and the REST API.
Assumptions: | |
---|---|
Host |
localhost |
Port |
8585 |
Deployed app |
mmc.war |
User/Password |
admin/admin |
For a detailed description of the format used in this document, consult Content Organization and Conventions.
/api/servers
PAIR/REGISTER |
Pairs a new Server.
Request
JSON
{
"name" : "Test",
"agentUrl" : "http://localhost:7777/mmc-support",
"groupIds" : ["0bc8932b-8463-46cd-9a1f-77060756c5c0"]
}
Key | Type | Summary | Child of |
---|---|---|---|
name |
String |
The name of the newly registered server |
— |
agentUrl |
String |
The URL to the location of the Mule Management Console agent on the local or remote server |
— |
groupIds |
Array |
IDs of existing Server Groups that the newly registered server will belong to |
— |
Using CURL on Windows
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -d "{ \"name\" : \"Test\", \"agentUrl\" : \"http://localhost:7777/mmc-support\", \"groupIds\":[\"0bc8932b-8463-46cd-9a1f-77060756c5c0\"] }" --header "Content-Type: application/json" http://localhost:8585/mmc-console-3.7.3/api/servers
Using CURL on Linux
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -d '{ "name" : "Test", "agentUrl" : "http://localhost:7777/mmc-support", "groupIds":["0bc8932b-8463-46cd-9a1f-77060756c5c0"] }' --header 'Content-Type: application/json' http://localhost:8585/mmc-console-3.7.3/api/servers
Response
JSON
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
{
"name":"Test",
"id":"local$f151c1cb-634a-4da5-baba-806ee4a09464",
"version":"3.3.0",
"groups":
[
{
"name":"Production",
"href":"http://localhost:8585/mmc-console-3.7.3/api/serverGroups/0bc8932b-8463-46cd-9a1f-77060756c5c0"
}
],
"status":"OK",
"href":"http://localhost:8585/mmc-console-3.7.3/api/servers/local$f151c1cb-634a-4da5-baba-806ee4a09464",
"runningServices":-1,
"hostIp":"172.16.20.131",
"agentUrl":"https://localhost:7777/mmc-support",
"muleServerId":"00_mmc-agent",
"started":"Thu Aug 16 12:18:39 ART 2012",
"agents":
[
{
"name":"mmc-support",
"description":"Mule ESB Enterprise Support (0.0.0.0:7777)"
},
{
"name":"_muleClusterSupportAgent",
"description":"Clustering Agent"
},
{
"name":"jmx-agent",
"description":"JMX Agent"
}
],
"pausedServices":-1,
"stoppedServices":-1
}
Key | Type | Summary | Child of |
---|---|---|---|
name |
String |
The name of the newly registered server |
— |
id |
String |
The ID of the newly registered server |
— |
version |
String |
Version of the server (e.g. "3.3.0") |
— |
groups |
Array |
Server Groups that the newly registered server belongs to |
— |
name |
String |
Name of the Server Groups that the newly registered server belongs to |
groups |
href |
String |
Full link to the Server Groups that the newly registered server belongs to |
groups |
status |
String |
Status of the Server (e.g. UNKNOWN, STOPPED, WAITING_FOR_RESTART, STARTING, OK, WARN, ERROR) |
— |
href |
String |
Full link to the resource |
— |
runningServices |
Integer |
Number of running services on the Server |
— |
hostIp |
String |
IP of the host where the Mule instance is running |
— |
agentUrl |
String |
Agent URL. When paired, HTTPS protocol is used instead of plain HTTP |
— |
muleServerId |
String |
Name of the Agent |
— |
started |
String |
Time-date plus timezone from which the server was started |
— |
agents |
Array |
List of running Agents on the Mule instance |
— |
name |
String |
Name of the running Agent |
agents |
description |
String |
Description of the purpose of the running Agent |
agents |
pausedServices |
Integer |
Number of paused services on the Server |
— |
stoppedServices |
Integer |
Number of stopped services on the server |
— |
Common Return codes
201 |
Server successfully paired/registered |
400 |
Policies do not allow adding the specified server/ Invalid Agent URL/ Name must be supplied/ Server URL must be supplied/ A server with that name already exists |
409 |
Could not pair server/ Server is already paired |
500 |
Error while pairing the Server |
MMC version
From |
3.2.2 |
GET |
LIST ALL |
Lists all available Servers.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
GET http://localhost:8585/mmc-console-3.7.3/api/servers[?group={serverGroupId}]
Key | Type | Summary | Child of |
---|---|---|---|
serverGroupId |
String |
(Optional) ID of a Server Group. If specified, only servers belonging to that Server Group are displayed. If not specified, results are not filtered |
— |
Using CURL
curl --basic -u admin:admin http://localhost:8585/mmc-console-3.7.3/api/servers
Response
JSON
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
{
"total":1,
"data":
[
{
"name":"Test",
"id":"local$a89eb3d0-68b9-44a0-9f6b-712b0895f469",
"version":"3.3.0",
"groups":
[
{
"name":"Production",
"href":"http://localhost:8585/mmc-console-3.7.3/api/serverGroups/0bc8932b-8463-46cd-9a1f-77060756c5c0"
}
],
"status":"OK",
"href":"http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469",
"runningServices":4,"hostIp":"172.16.20.131",
"agentUrl":"https://localhost:7777/mmc-support",
"muleServerId":"00_mmc-agent",
"started":"Thu Aug 16 12:18:39 ART 2012",
"agents":
[
{
"name":"mmc-support",
"description":"Mule ESB Enterprise Support (0.0.0.0:7777)"
},
{
"name":"_muleClusterSupportAgent",
"description":"Clustering Agent"
},
{
"name":"jmx-agent",
"description":"JMX Agent"
}
],
"pausedServices":0,
"stoppedServices":0
}
]
}
Key | Type | Summary | Child of |
---|---|---|---|
total |
Integer |
Number of available registered servers |
— |
data |
Array |
Available servers details |
— |
name |
String |
The name of the newly registered server |
data |
id |
String |
The ID of the newly registered server |
data |
version |
String |
Version of the server |
data |
groups |
Array |
Server Groups that the newly registered server belongs to |
data |
name |
String |
Name of the Server Groups that the newly registered server belongs to |
groups |
status |
String |
Status of the Server (e.g. OK, STOPPED) |
— |
href |
String |
Full link to the Server Groups that the newly registered server belongs to |
groups |
runningServices |
Integer |
IntegerNumber of running services on the Server |
data |
hostIp |
String |
IP of the host where the Mule instance is running |
data |
agentUrl |
String |
Agent URL. When paired, the HTTPS protocol is used instead of plain HTTP |
data |
muleServerId |
String |
Name of the Agent |
data |
started |
String |
Time-date plus timezone from which the server was started |
data |
agents |
Array |
List of running Agents on the Mule instance |
data |
name |
String |
Name of the running Agent |
agents |
description |
String |
Description of the running Agent purpose |
agents |
pausedServices |
Integer |
Number of paused services on the Server |
data |
stoppedServices |
Integer |
Number of stopped services on the server |
data |
Common Return codes
200 |
The operation was successful |
401 |
Unauthorized user |
404 |
A server group with that ID was not found |
MMC version
From |
3.2.2 |
/api/server/{serverId}
GET |
LIST |
Lists details for a specific Server.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
GET http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of the server to be listed. Invoke LIST ALL to obtain it |
— |
Using CURL on Windows
curl --basic -u admin:admin http://localhost:8585/mmc-console-3.7.3/api/servers/local$97e3c184-09ed-423e-a5a5-9b94713a9e36
Using CURL on Linux
curl --basic -u admin:admin 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$97e3c184-09ed-423e-a5a5-9b94713a9e36'
Response
JSON
{
"name":"Test",
"id":"local$a89eb3d0-68b9-44a0-9f6b-712b0895f469",
"version":"3.3.0",
"groups":
[
{
"name":"Production",
"href":"http://localhost:8585/mmc-console-3.7.3/api/serverGroups/0bc8932b-8463-46cd-9a1f-77060756c5c0"
}
],
"status":"OK",
"href":"http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469",
"runningServices":4,
"hostIp":"172.16.20.131",
"agentUrl":"https://localhost:7777/mmc-support",
"muleServerId":"00_mmc-agent",
"started":"Thu Aug 16 12:18:39 ART 2012",
"agents":
[
{
"name":"mmc-support",
"description":"Mule ESB Enterprise Support (0.0.0.0:7777)"
},
{
"name":"_muleClusterSupportAgent",
"description":"Clustering Agent"
},
{
"name":"jmx-agent",
"description":"JMX Agent"
}
],
"pausedServices":0,
"stoppedServices":0
}
Key | Type | Summary | Child of |
---|---|---|---|
name |
String |
The name of the newly registered server |
— |
id |
String |
The ID of the newly registered server |
— |
version |
String |
Version of the server |
— |
groups |
Array |
Server Groups that the newly registered server belongs to |
— |
name |
String |
Name of the Server Groups that the newly registered server belongs to |
groups |
href |
String |
Full link to the Server Groups that the newly registered server belongs to |
groups |
status |
String |
Status of the Server (e.g. OK, STOPPED) |
— |
href |
String |
Full link to the Server Groups that the newly registered server belongs to |
groups |
runningServices |
Integer |
Number of running services on the Server |
— |
hostIp |
String |
IP of the host where the Mule instance is running |
— |
agentUrl |
String |
Agent URL. When paired, the HTTPS protocol is used instead of plain HTTP |
— |
muleServerId |
String |
Name of the Agent |
— |
started |
String |
Time-date plus timezone from which the server was started |
— |
agents |
Array |
List of running Agents on the Mule instance |
— |
name |
String |
Name of the running Agent |
agents |
description |
String |
Description of the running Agent purpose |
agents |
pausedServices |
Integer |
Number of paused services on the Server |
— |
stoppedServices |
Integer |
Number of stopped services on the server |
— |
Common Return codes
401 |
Unauthorized user |
404 |
A server with that ID was not found |
MMC version
From |
3.2.2 |
DELETE |
UNPAIR/UNREGISTER |
Unpairs/unregister a specific Server.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
DELETE http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
Id of the server to be unpaired/unregistered. Invoke LIST ALL to obtain it |
— |
Using CURL on Windows
curl --basic -u admin:admin -X DELETE http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469
Using CURL on Linux
curl --basic -u admin:admin -X DELETE 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469'
Response
JSON
200 OK
Common Return codes
200 |
The operation was successful |
401 |
Unauthorized user |
404 |
A Server with that ID was not found |
500 |
Error while unregistering the server |
MMC version
From |
3.2.2 |
/api/servers/{serverId}
PUT |
UPDATE |
Updates a specific Server.
Request
JSON
{
"name": "New Server Name",
"groups":
[
"local$1b8ee6e2-043c-403c-b404-af3aa74d6f92", "local$1b8ee6e5-047c-403c-b404-af3aa74d6f59"
]
}
Key | Type | Summary | Child of |
---|---|---|---|
name |
String |
New name for the Server |
— |
groups |
Array |
List of Server Groups that the Server will belong to |
— |
Using CURL on Windows
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X PUT -d "{ \"name\" : \"New Server Name\", \"groups\":[{\"href\":\"0bc8932b-8463-46cd-9a1f-77060756c5c0\"}]}" --header "Content-Type: application/json" http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469
Using CURL on Linux
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X PUT -d '{"name" : "New Server Name", "groups":[{"href":"0bc8932b-8463-46cd-9a1f-77060756c5c0"}]}' --header 'Content-Type: application/json' 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469'
Response
JSON
{
"name":"New Server Name",
"id":"local$a89eb3d0-68b9-44a0-9f6b-712b0895f469",
"version":"3.3.0",
"groups":
[
{
"name":"Production",
"href":"http://localhost:8585/mmc-console-3.7.3/api/serverGroups/0bc8932b-8463-46cd-9a1f-77060756c5c0"
}
],
"status":"OK",
"href":"http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469",
"runningServices":4,
"hostIp":"172.16.20.131",
"agentUrl":"https://localhost:7777/mmc-support",
"muleServerId":"00_mmc-agent",
"started":"Thu Aug 16 12:18:39 ART 2012",
"agents":
[
{
"name":"mmc-support",
"description":"Mule ESB Enterprise Support (0.0.0.0:7777)"
},
{
"name":"_muleClusterSupportAgent",
"description":"Clustering Agent"
},
{
"name":"jmx-agent",
"description":"JMX Agent"
}
],
"pausedServices":0,
"stoppedServices":0
}
Key | Type | Summary | Child of |
---|---|---|---|
name |
String |
The name of the newly registered server |
— |
id |
String |
The ID of the newly registered server |
— |
version |
String |
Version of the server |
— |
groups |
Array |
Server Groups that the newly registered server belongs to |
— |
name |
String |
Name of the Server Groups that the newly registered server belongs to |
groups |
status |
String |
Status of the Server (e.g. OK, STOPPED) |
— |
href |
String |
Full link to the Server Groups that the newly registered server belongs to |
groups |
runningServices |
Integer |
Number of running services on the Server |
— |
hostIp |
String |
IP of the host where the Mule instance is running |
— |
agentUrl |
String |
Agent URL. When paired, the HTTPS protocol is used instead of plain HTTP |
— |
muleServerId |
String |
Name of the Agent |
— |
started |
String |
Time-date plus timezone from which the server was started |
— |
agents |
Array |
List of running Agents on the Mule instance |
— |
name |
String |
Name of the running Agent |
agents |
description |
String |
Description of the running Agent purpose |
agents |
pausedServices |
Integer |
Number of paused services on the Server |
— |
stoppedServices |
Integer |
Number of stopped services on the server |
— |
Common Return codes
200 |
The operation was successful |
401 |
Unauthorized user |
404 |
A Server with that ID was not found |
500 |
Error while updating server |
MMC version
From |
3.2.2 |
/api/servers/{serverId}/applications
GET |
LIST APPLICATIONS |
Lists all available deployed applications on a specific Server.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
GET http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}/applications
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of a Server |
— |
Using CURL on Windows
curl --basic -u admin:admin http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469/applications
Using CURL on Linux
curl --basic -u admin:admin 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469/applications'
Response
JSON
{
"total":3,
"data":[
{
"name":"mule-example-hello",
"status":"STARTED",
"configResources": ["mule-config.xml"],
"appProperties":
{
"app.home":"C:\\mule-enterprise-standalone\\apps\\mule-example-hello",
"app.name":"mule-example-hello"
},
"redeploymentEnabled":true,
"parentFirstClassLoader":false
},
{
"name":"00_mmc-agent",
"status":"STARTED",
"configResources":["mule-config.xml"],
"appProperties":
{
"app.home":"C:\\mule-enterprise-standalone\\apps\\00_mmc-agent",
"app.name":"00_mmc-agent"
},
"redeploymentEnabled":false,
"parentFirstClassLoader":false
},
{
"name":"default",
"status":"STARTED",
"configResources":["mule-config.xml"],
"appProperties":
{
"app.home":"C:\\mule-enterprise-standalone\\apps\\default",
"app.name":"default"
},
"redeploymentEnabled":true,
"parentFirstClassLoader":false
}
]
}
Key | Type | Summary | Child of |
---|---|---|---|
total |
Integer |
Number of applications currently deployed |
— |
data |
Array |
List of deployed applications |
— |
name |
String |
Name of the application |
data |
status |
String |
Status of the deployed application |
data |
configResources |
Array |
List of files specifying flow(s) configuration |
data |
appProperties |
Array |
Properties of the deployed application |
data |
app.home |
String |
Fully qualified path to the application |
appProperties |
app.name |
String |
Application name |
appProperties |
redeploymentEnabled |
Boolean |
If true, application can be redeployed |
data |
parentFirstClassLoader |
Boolean |
[DEPRECATED] |
data |
Common Return codes
200 |
The operation was successful |
MMC version
From |
3.2.2 |
/api/servers/{serverId}/restart
POST |
PERFORM RESTART |
Restarts a Server.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
POST http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}/restart
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of a registered server |
— |
Using CURL on Windows
curl --basic -u admin:admin http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469/restart
Using CURL on Linux
+curl --basic -u admin:admin 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469/restart'
+
Response
JSON
200 OK
Common Return codes
200 |
The operation was successful |
500 |
Internal server error |
MMC version
From |
3.2.2 |
/api/servers/{serverId}/stop
POST |
PERFORM STOP |
Stops a Server.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
POST http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}/stop
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of a registered server |
— |
Using CURL on Windows
curl --basic -u admin:admin http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469/stop
Using CURL on Linux
curl --basic -u admin:admin 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469/stop'
Response
JSON
200 OK
Common Return codes
200 |
The operation was successful |
500 |
Internal server error |
MMC version
From |
3.2.2 |
Server Files
/api/server/{serverId}/files
GET |
LIST FILES |
Lists files on a specific Server.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
GET http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}/files
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of the server to be listed. Invoke LIST ALL to obtain it |
— |
Using CURL on Windows
curl --basic -u admin:admin http://localhost:8585/mmc-console-3.7.3/api/servers/local$97e3c184-09ed-423e-a5a5-9b94713a9e36/files
Using CURL on Linux
curl --basic -u admin:admin 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$97e3c184-09ed-423e-a5a5-9b94713a9e36/files'
Response
{
"total":12,
"data":
[
{
"name":".mule",
"size":4096,
"absolutePath":"C:\\mule-enterprise-standalone\\.mule",
"directory":true,
"lastModified":1345835067600,
"friendlySize":"",
"userCanExecute":true,
"userCanRead":true,
"userCanWrite":true,
"friendlyName":".mule/"
},
"..."
{
"name":"README.txt",
"size":4559,
"absolutePath":"C:\\mule-enterprise-standalone\\README.txt",
"directory":false,
"lastModified":1339032294000,
"friendlySize":"4 KB",
"userCanExecute":true,
"userCanRead":true,
"userCanWrite":true,
"friendlyName":"README.txt"
}
]
}
JSON
Key | Type | Summary | Child of |
---|---|---|---|
total |
Integer |
Number of detected files and folders at root folder level |
— |
data |
Array |
List of files and folders detected at root folder level |
— |
name |
String |
Name of the file |
data |
size |
integer |
Size of the file in bytes |
|
absolutePath |
String |
Absolute path of the file/folder |
- |
directory |
Boolean |
True if the entry is a directory |
data |
lastModified |
Long |
Last modified time since epoch |
data |
friendlySize |
String |
Human readable size of the file |
appProperties |
userCanExecute |
Boolean |
True if User can execute the file |
- |
userCanRead |
Boolean |
True if User can read the file |
- |
friendlyName |
String |
Friendly name of the file |
- |
Common Return codes
200 |
The operation was successful |
404 |
The location does not exist |
405 |
Unauthorized user |
MMC version
From |
3.2.2 |
/api/server/{serverId}/files/\{relative path to file}
GET |
LIST FILE |
Get a specific file from a specific Server.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
GET http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}/files/{relativePathToFile}[?metadata=true]
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of the server to be listed. Invoke LIST ALL to obtain it |
— |
relativePathToFile |
String |
Relative path to a specific file from the root folder of the server |
— |
metadata |
Boolean |
(Optional) If false, file is returned, if true, high level file description is returned. Default value is false. |
— |
Using CURL on Windows
curl --basic -u admin:admin http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/files/bin/mule
Using CURL on Linux
curl --basic -u admin:admin 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/files/bin/mule'
Response
Metadata=false
[Actual file]
Metadata=true:
{
"name":"mule",
"size":20237,
"absolutePath":"C:\\mule-enterprise-standalone\\bin\\mule",
"directory":false,
"lastModified":1345598472000,
"friendlySize":"19 KB",
"userCanExecute":true,
"userCanRead":true,
"userCanWrite":true,
"friendlyName":"mule"
}
JSON
Key | Type | Summary | Child of |
---|---|---|---|
name |
String |
Name of the file |
— |
size |
Long |
Syze of the file in bytes |
— |
absolutePath |
String |
Absolute path of the file |
— |
directory |
Boolean |
True if the entry is a directory |
— |
lastModified |
Long |
Last modified time since epoch |
— |
friendlySize |
String |
Human readable size of the file |
— |
userCanExecute |
Boolean |
True if User can execute the file |
— |
userCanRead |
Boolean |
True if User can read the file |
— |
userCanWrite |
Boolean |
True if User can write the file |
— |
friendlyName |
String |
Friendly name of the file |
— |
Common Return codes
200 |
The operation was successful |
404 |
The location does not exist |
MMC version
From |
3.2.2 |
/api/server/{serverId}/files/\{relative path to file to be created}
POST |
CREATE REMOTE FILE |
Creates a new file in the specified server and folder. The source of the new file can be an existing file, or inline content. EOL from the source is converted to the native representation of the platform where the agent is running.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
POST http://localhost:8585/mmc-console-3.7.3/api/server/{serverId}/files/{relative path to file to be created}
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of a registered server |
— |
relative path to file to be created |
String |
Eg. myLog/myUser/myFile.txt |
— |
Using CURL on Windows
curl --basic -u admin:admin -v --header "Content-Type:application/octet-stream" --data-binary "@test.xml" http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/files/logs/fileOnLogsFolder.txt
Using CURL on Linux
curl --basic -u admin:admin -v --header 'Content-Type:application/octet-stream' --data-binary '@test.xml' 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/files/logs/fileOnLogsFolder.txt'
-
"test.xml" is the source file in the example. You can provide full path or file name. In the last case, the file should be placed at the same folder than the one containing the curl executable.
-
"@" is mandatory when specifying the source file is you want to copy the file contents. If "@"is not specified, then the new file being created will have the inline content itself as source (e.g. test.xml in this case).
-
"fileOnLogsFolder.txt" in the example is the file to be created on the specified folder.
Response
JSON
200 OK
Common Return codes
200 |
The operation was successful |
500 |
Internal error |
MMC version
From |
3.2.2 |
PUT |
UPDATE/REPLACE REMOTE FILE |
Replaces a target file with the provided source file (or inline content) on the specified server and folder.
EOL from source is converted to a native representation of the platform where the agent is running.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
PUT http://localhost:8585/mmc-console-3.7.3/api/server/{serverId}/files/{relative path to file to be replaced}
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of a registered server |
— |
relative path to file to be replaced |
String |
Eg. myLog/myUser/myFile.txt |
— |
Using CURL on Windows
+
curl --basic -u admin:admin -X PUT --header "Content-Type:application/octet-stream" --data-binary "@test.xml" http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/files/logs/fileOnLogsFolder.txt+
Using CURL on Linux
curl --basic -u admin:admin -X PUT --header 'Content-Type:application/octet-stream' --data-binary '@test.xml' 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/files/logs/fileOnLogsFolder.txt'
-
"test.xml" is the source file in the example. You can provide full path or file name. In the last case, the file should be placed at the same folder than the one containing the curl executable.
-
"@" is mandatory when specifying the source file is you want to copy the file contents. If "@"is not specified, then the new file being created will have the inline content itself as source (e.g. test.xml in this case).
-
In the example above, "fileOnLogsFolder.txt" is the file to be replaced on the specified folder.
Response
JSON
200 OK
Common Return codes
200 |
The operation was successful |
404 |
File not found |
405 |
Unauthorized user |
500 |
Could not upload file |
MMC version
From |
3.2.2 |
DELETE |
DELETE REMOTE FILE |
Deletes a target file on the specified server and folder.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
DELETE http://localhost:8585/mmc-console-3.7.3/api/server/{serverId}/files/{relative path to file to be deleted}
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of a registered server |
— |
relative path to file to be deleted |
String |
Eg. myLog/myUser/myFile.txt |
— |
Using CURL on Windows
curl --basic -u admin:admin -X DELETE http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/files/logs/fileOnLogsFolder.txt
Using CURL on Linux
curl --basic -u admin:admin -X DELETE 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/files/logs/fileOnLogsFolder.txt'
-
"fileOnLogsFolder.txt" in the example is the file to be deleted on the specified folder.
Response
JSON
200 OK
Common Return codes
200 |
The operation was successful |
MMC version
From |
3.2.2 |
Server Flows
/api/server/{serverId}/flows
GET |
LIST FLOWS |
Lists available flows on a specific Server.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
GET http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}/flows[?refreshStats=TRUE|FALSE]
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of the server to be listed. Invoke LIST ALL to obtain it |
— |
refreshStats |
Boolean |
(Optional) If true, forces stats refresh |
— |
Using CURL on Windows
curl --basic -u admin:admin http://localhost:8585/mmc-console-3.7.3/api/servers/local$97e3c184-09ed-423e-a5a5-9b94713a9e36/flows
Using CURL on Linux
curl --basic -u admin:admin 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$97e3c184-09ed-423e-a5a5-9b94713a9e36/flows'
Response
JSON
{
"total":4,
"data":
[
{
"id":"local$35443304-3a90-43f3-a26e-df3eaf03936e/Hello World",
"type":"flow",
"status":"RUNNING",
"serverId":"local$35443304-3a90-43f3-a26e-df3eaf03936e",
"auditStatus":"DISABLED",
"flowId":
{
"name":"Hello World",
"fullName":"Hello World [mule-example-hello]",
"application":"mule-example-hello",
"definedInApplication":true
},
"asyncEventsReceived":0,
"executionErrors":0,
"fatalErrors":0,
"inboundEndpoints":
[
"http://localhost:8888","servlet://name","vm://greeter"
],
"syncEventsReceived":0,
"totalEventsReceived":0,
"averageProcessingTime":0,
"minProcessingTime":0,
"maxProcessingTime":0,
"totalProcessingTime":0,
"processedEvents":0,
"favorite":false
},
"..."
]
}
Key | Type | Summary | Child of |
---|---|---|---|
total |
Integer |
Number of available flows detected on the specified Server |
— |
data |
Array |
List of available flows detected on the specified Server |
— |
id |
String |
ID of the flow |
data |
type |
String |
The type of the flow (e.g. a service or a simple flow) |
data |
status |
String |
Status of the flow (i.e. RUNNING, STOPPING, PAUSED, STOPPED) |
data |
serverId |
String |
ID of the Server where the flow runs |
data |
auditStatus |
String |
If audit status enable, agent audits each call to the message. Default value: "DISABLED". Possible values: "CAPTURING", "PAUSED", "DISABLED", "FULL" |
data |
flowId |
List |
Details that make a flow unique |
data |
name |
String |
Flow name. When used as part of a URL, any spaces present are replaced by "%20" |
flowId |
fullName |
String |
Full name of the flow |
flowId |
application |
String |
The name of the application using the flow |
flowId |
definedInApplication |
Boolean |
If false, then flow is executed as part of embedded Mule instance |
flowId |
asyncEventsReceived |
Integer |
The number of asynchronous events received |
data |
executionErrors |
Integer |
The number of execution errors |
data |
fatalErrors |
Integer |
The number of fatal errors |
data |
inboundEndpoints |
Array |
List of all inbound endpoints belonging to the flow. Information about inbound endpoint includes protocol, host and port (if applicable), or flow name. Example: vm://greeter |
data |
syncEventsReceived |
Integer |
The number of synchronous events that were received |
data |
totalEventsReceived |
Integer |
The total number of messages received by the flow |
data |
averageProcessingTime |
Integer |
The average amount of time in seconds that the flow takes to process a message |
data |
minProcessingTime |
Integer |
The minimum time in seconds that the flow takes to process a message |
data |
maxProcessingTime |
Integer |
The maximum time in seconds that the flow takes to process a message |
data |
totalProcessingTime |
Integer |
The total amount of time in seconds that the flow takes to process all messages |
data |
processedEvents |
Integer |
The number of messages processed by the flow |
data |
favorite |
Boolean |
True if identified as favorite flow |
data |
Common Return codes
200 |
The operation was successful |
404 |
The specified server is currently down |
500 |
Error while listing flows |
MMC version
From |
3.2.2 |
/api/server/{serverId}/flows/{flowName}/{applicationName}/start
POST |
PERFORM FLOW START |
Starts a specific flow.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
POST http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}/flows/{flowName}/{applicationName}/start
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of the server to be listed. Invoke LIST ALL to obtain it |
— |
flowName |
String |
Name of the flow whose endpoints will be determined |
— |
applicationName |
String |
Application Name to which the flow belongs to |
— |
Using CURL on Windows
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/flows/Hello%20World/mule-example-hello/start
Using CURL on Linux
curl --basic -u admin:admin -X POST 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/flows/Hello%20World/mule-example-hello/start'
Response
JSON
The flow started successfully
If flow is already started, the following message is returned:
|
Common Return codes
200 |
The operation was successful |
404 |
Flow doesn’t exist |
500 |
Error while starting flow |
MMC version
From |
3.2.2 |
/api/server/{serverId}/flows/{flowName}/{applicationName}/stop
POST |
PERFORM FLOW STOP |
Stops a specific flow.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
POST http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}/flows/{flowName}/{applicationName}/stop
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of the server to be listed. Invoke LIST ALL to obtain it |
— |
flowName |
String |
Name of the flow whose endpoints will be determined |
— |
applicationName |
String |
Application Name to which the flow belongs to |
— |
Using CURL on Windows
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/flows/Hello%20World/mule-example-hello/stop
Using CURL on Linux
curl --basic -u admin:admin -X POST 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/flows/Hello%20World/mule-example-hello/stop'
Response
JSON
The flow stopped successfully
If flow is already stopped the following message is returned:
|
Common Return codes
200 |
The operation was successful |
404 |
Flow doesn’t exist |
500 |
Error while stopping flow |
MMC version
From |
3.2.2 |
Server Flows Endpoints
/api/server/{serverId}/{flowName}/{applicationName}/endpoints
GET |
LIST FLOWS ENDPOINTS |
Lists available endpoints belonging to specific flows.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
GET http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}/flows/{flowName}/{applicationName}/endpoints
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of the server to be listed. Invoke LIST ALL to obtain it |
— |
flowName |
String |
Name of the flow from which is desired to determine its endpoints |
— |
applicationName |
String |
Application Name to which the flow belongs to |
— |
Using CURL on Windows
curl --basic -u admin:admin http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/flows/Hello%20World/mule-example-hello/endpoints
Using CURL on Linux
curl --basic -u admin:admin 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/flows/Hello%20World/mule-example-hello/endpoints'
If flow name contain spaces, replace them by "%20" when typing the URL to locate the resource. |
Response
JSON
{
"total":3,
"data":
[
{
"address":"http://localhost:8888",
"id":"endpoint.http.localhost.8888",
"type":"http",
"status":"started",
"connector":"connector.http.mule.default",
"filtered":false,
"routedMessages":0,
"synchronous":true,
"tx":false
},
{
"address":"name",
"id":"endpoint.servlet.name",
"type":"servlet",
"status":"started",
"connector":"connector.servlet.mule.default",
"filtered":false,
"routedMessages":0,
"synchronous":true,
"tx":false
},
{
"address":"greeter",
"id":"endpoint.vm.greeter",
"type":"VM",
"status":"started",
"connector":"connector.VM.mule.default",
"filtered":false,
"routedMessages":0,
"synchronous":true,
"tx":false
}
]
}
Key | Type | Summary | Child of |
---|---|---|---|
total |
Integer |
Number of endpoint detected |
— |
data |
List |
List of endpoint details |
— |
address |
String |
Address of the endpoint (e.g. "system.out," |
data |
id |
String |
ID of the endpoint |
data |
type |
String |
Type of the endpoint (e.g. VM) |
data |
status |
String |
Status of the endpoint (e.g. started, stopped) |
data |
connector |
String |
Connector name |
data |
filtered |
Boolean |
True if the endpoint is filtered |
data |
routedMessages |
Integer |
Number of routed messages |
data |
synchronous |
Boolean |
True if the endpoint is synchronous |
data |
tx |
Boolean |
True if the endpoint handles transactions |
data |
Common Return codes
200 |
The operation was successful |
404 |
The specified flow does not exist |
500 |
Error while getting endpoints |
MMC version
From |
3.2.2 |
/api/server/{serverId}/flows/{flowName}/{applicationName}/endpoints/{endpointId}/start
POST |
PERFORM FLOW ENDPOINT START |
Starts a specific endpoint.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
POST http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}/flows/{flowName}/{applicationName}/endpoints/{endpointId}/start
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of a registered server |
— |
flowName |
String |
Name of the flow that the endpoint belongs to |
— |
applicationName |
String |
Name of the application using the flow |
— |
endpointId |
String |
ID of the endpoint |
— |
Using CURL on Windows
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/flows/Hello%20World/mule-example-hello/endpoints/endpoint.http.localhost.8888/start
Using CURL on Linux
curl --basic -u admin:admin -X POST 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/flows/Hello%20World/mule-example-hello/endpoints/endpoint.http.localhost.8888/start'
Response
JSON
[
"endpoint.http.localhost.8888"
]
Common Return codes
200 |
The operation was successful |
404 |
Flow doesn’t exist |
409 |
No valid endpoint names specified |
500 |
Error while starting endpoints |
MMC version
From |
3.2.2 |
/api/server/{serverId}/flows/{flowName}/{applicationName}/endpoints/{endpointId}/stop
POST |
PERFORM FLOW ENDPOINT STOP |
Stops a specific endpoint.
Request
SYNTAX
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-console-3.7.3
with your own MMC hostname, port number, and setting for mmc-console-3.7.3 (which is usually the name of the deployed mmc .war file).
POST http://localhost:8585/mmc-console-3.7.3/api/servers/{serverId}/flows/{flowName}/{applicationName}/endpoints/{endpointId}/stop
Key | Type | Summary | Child of |
---|---|---|---|
serverId |
String |
ID of a registered server |
— |
flowName |
String |
Name of the flow that the endpoint belongs to |
— |
applicationName |
String |
Name of the application using the flow |
— |
endpointId |
String |
ID of the endpoint |
— |
Using CURL on Windows
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/flows/Hello%20World/mule-example-hello/endpoints/endpoint.http.localhost.8888/stop
Using CURL on Linux
curl --basic -u admin:admin -X POST 'http://localhost:8585/mmc-console-3.7.3/api/servers/local$24600824-af33-4394-8e39-93f9fcf4faae/flows/Hello%20World/mule-example-hello/endpoints/endpoint.http.localhost.8888/stop'
Response
JSON
[
"endpoint.http.localhost.8888"
]
Common Return codes
200 |
The operation was successful |
404 |
Flow doesn’t exist |
409 |
No valid endpoints names specified |
500 |
Error while stopping endpoints |
MMC version
From |
3.2.2 |