curl --basic -u admin:admin -d "{\"name\":\"My Cluster\",\"version\":\"3.7.0\", \"nodes\":[\"local$194cdc5b-2253-4f35-b663-b311e4f28956\", \"local$ef85a37f-a3c1-4d1f-b8e6-8fac85d2fca7\"]}" --header "Content-Type: application/json" http://localhost:8585/mmc-3.7.0/api/clusters
REST API Reference: Clusters
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 Runtime, Clusters and the Using the Management Console API.
Prerequisites
Host | localhost |
---|---|
Port |
8080 |
Deployed app |
mmc.war |
User/Password |
admin/admin |
For a detailed description of the format used in this document, consult MMC REST API Reference.
/api/clusters
POST
CREATE
Creates a new Cluster.
CREATE - JSON
Key | Type | Summary |
---|---|---|
name |
String |
Name of the cluster to be created |
version |
String |
Version of the cluster to be created. This must correspond exactly with the version of the cluster nodes |
nodes |
Array |
List of server IDs to assign to the new cluster. At least one valid Server ID must be supplied. |
CREATE - Using CURL on Windows
Note that this syntax is an example. Be sure to replace the locahost address with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
CREATE - Using CURL on Linux
curl --basic -u admin:admin -d '{"name":"My Cluster","version":"3.7.0", "nodes":["local$194cdc5b-2253-4f35-b663-b311e4f28956", "local$ef85a37f-a3c1-4d1f-b8e6-8fac85d2fca7"]}' --header 'Content-Type: application/json' http://localhost:8585/mmc-3.7.0/api/clusters
CREATE - JSON
Key | Type | Summary |
---|---|---|
name |
String |
Name of the created cluster |
location |
String |
Reserved for future usage. Default value: "N/A" |
id |
String |
The ID of the newly created Cluster |
version |
String |
Version of the created cluster |
multicast |
String |
Multicast option for the cluster (true/false) |
status |
String |
Displays the total number of nodes and how many of them are online |
pausedServices |
Integer |
Number of paused services on the Cluster |
stoppedServices |
Integer |
Number of stopped services on the Cluster |
nodeServerIds |
List |
List of Server IDs that are the nodes on the Cluster |
deployments |
List |
List of Cluster’s deployment IDs. When newly created, this list should be empty |
clusterStatus |
String |
Status of the Cluster (for example, STOPPED, WAITING_FOR_RESTART, OK) |
nodesUpCount |
Integer |
Number of online nodes |
lastRestarted |
Integer |
Last restart time since epoch |
runningServices |
Integer |
Number of running services on the Cluster |
totalServices |
Integer |
Total number of services on the Cluster |
groupIds |
List |
List group IDs that this Cluster belongs to |
CREATE - Return Codes
Return Code | Description |
---|---|
201 |
The Cluster was created successfully |
400 |
At least one node is not responding/ Malformed Url exception/ Cluster Node Exception/ Some nodes weren’t found/ Access Exception/ |
409 |
A cluster with that name already exists |
From 3.2.2
GET
LIST ALL
Lists all managed Clusters.
Using CURL
Note that this syntax is an example. Be sure to replace localhost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin http://localhost:8585/mmc-3.7.0/api/clusters
LIST ALL - JSON
Key | Type | Summary | Child of |
---|---|---|---|
total |
Integer |
Number of managed clusters |
— |
data |
List |
List of managed Cluster details |
— |
name |
String |
Name of the created cluster |
data |
location |
String |
Reserved for future usage. Default value: "N/A" |
data |
id |
String |
The ID of the newly created Cluster |
data |
version |
String |
Version of the created cluster |
data |
status |
String |
Displays the total number of nodes and how many of them are online |
data |
pausedServices |
Integer |
Number of paused services on the Cluster |
data |
stoppedServices |
Integer |
Number of stopped services on the Cluster |
data |
nodeServerIds |
List |
List of Server IDs that are the nodes on the Cluster |
data |
deployments |
List |
List of Cluster’s deployment IDs. When newly created, this list should be empty |
data |
clusterStatus |
String |
Status of the Cluster (for example, STOPPED, WAITING_FOR_RESTART, OK) |
data |
nodesUpCount |
Integer |
Number of online nodes |
data |
lastRestarted |
Integer |
Last restart time since epoch |
data |
runningServices |
Integer |
Number of running services on the Cluster |
data |
totalServices |
Integer |
Total number of services on the Cluster |
data |
groupIds |
List |
List of group IDs that this Cluster belongs to |
data |
LIST
Lists details for specific Cluster.
LIST - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin <url>
LIST - JSON
Key | Type | Summary |
---|---|---|
name |
String |
Name of the created cluster |
location |
String |
Reserved for future usage. Default value: "N/A" |
id |
String |
The ID of the newly created Cluster |
version |
String |
Version of the created cluster |
status |
String |
Displays the total number of nodes and how many of them are online |
pausedServices |
Integer |
Number of paused services on the Cluster |
stoppedServices |
Integer |
Number of stopped services on the Cluster |
nodeServerIds |
List |
List of Server IDs that are the nodes on the Cluster |
deployments |
List |
List of Cluster’s deployment IDs. When newly created, this list should be empty |
clusterStatus |
String |
Status of the Cluster (for example, STOPPED, WAITING_FOR_RESTART, OK) |
nodesUpCount |
Integer |
Number of online nodes |
lastRestarted |
Integer |
Last restart time since epoch |
runningServices |
Integer |
Number of running services on the Cluster |
totalServices |
Integer |
Total number of services on the Cluster |
groupIds |
List |
List of group IDs that this Cluster belongs to |
LIST - Return Codes
Return Code | Description |
---|---|
200 |
The operation was successful |
401 |
Unauthorized user |
404 |
At least one node in the cluster is not responding/ A cluster with that ID or Name was not found/ |
500 |
Cluster is down/ Error while listing details for the Cluster |
From 3.2.2
/api/clusters/{clusterId}/status
STATUS
Lists node status for specific Cluster.
STATUS - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/status
DISBAND
Disbands a specific Server.
DISBAND - Syntax
Key | Type | Summary |
---|---|---|
clusterId |
String |
ID of the cluster to be disbanded. Invoke LIST ALL to obtain it. |
After disbanding all nodes return to standalone mode. See server API. |
DISBAND - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X DELETE http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724
PERFORM RESTART
Restarts a Cluster.
PERFORM RESTART - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/restart
PERFORM STOP
Stops a Cluster.
PERFORM STOP - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/stop
ADD NODES
Adds a node to a cluster.
ADD NODES - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -d '{"nodes":"local$30018f69-2772-428f-b13d-5a0644a7ca51", "local$473e6e0f-0151-445f-81a0-4065297620b6"}' --header 'Content-Type: application/json' http://localhost:8585/mmc-3.7.0/api/clusters/0662f078-6b9b-461d-bce1-48996a59a5d8/addnodes
REMOVE NODES
Removes a node from a cluster.
REMOVE NODES - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -d '{"nodes":"local$30018f69-2772-428f-b13d-5a0644a7ca51", "local$473e6e0f-0151-445f-81a0-4065297620b6"}' --header 'Content-Type: application/json' http://localhost:8585/mmc-3.7.0/api/clusters/0662f078-6b9b-461d-bce1-48996a59a5d8/removenodes
LIST ALL MULE APPS
Lists all Mule applications currently deployed successfully on a Cluster.
LIST ALL MULE APPS - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/applications
LIST ALL MULE APPS - JSON
Key | Type | Summary | Child of |
---|---|---|---|
total |
Integer |
Number of deployed applications on Cluster |
— |
data |
List |
List of deployed applications on Cluster |
— |
name |
String |
Name of the deployed application |
data |
status |
String |
Status of the application (that is, INITIALISED, STARTED, STOPPED or DISPOSED) |
data |
PERFORM START MULE APP
Starts an application from a Cluster.
PERFORM START MULE APP - Syntax
Key | Type | Summary |
---|---|---|
clusterId |
String |
ID of a managed cluster |
applicationName |
String |
Name of the application to be started |
PERFORM START MULE APP - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/applications/mule-example-hello/start
PERFORM RESTART MULE APP
Restarts an application from a Cluster.
PERFORM RESTART MULE APP - Syntax
Key | Type | Summary |
---|---|---|
clusterId |
String |
ID of a managed cluster |
applicationName |
String |
Name of the application to be started |
PERFORM RESTART MULE APP - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/applications/mule-example-hello/restart
PERFORM STOP MULE APP
Stops an application from a Cluster.
PERFORM STOP MULE APP - Syntax
Key | Type | Summary |
---|---|---|
clusterId |
String |
ID of a managed cluster |
applicationName |
String |
Name of the application to be started |
PERFORM STOP MULE APP - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/applications/mule-example-hello/stop
LIST ALL FLOWS
Lists all available flows belonging to Mule applications currently deployed successfully on a Cluster.
LIST ALL FLOWS - Syntax
Key | Type | Summary |
---|---|---|
clusterId |
String |
ID of a cluster |
refreshStats |
Boolean |
(Optional) Forces refresh of cluster stats |
LIST ALL FLOWS - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/flows
LIST ALL FLOWS - JSON
Key | Type | Summary | Child of |
---|---|---|---|
total |
Integer |
Number of available flows detected on the specified Cluster |
— |
data |
Array |
List of available flows detected on the specified Cluster |
— |
id |
String |
ID of the flow |
data |
type |
String |
The type of the flow (for example, a service or a simple flow) |
data |
status |
String |
Status of the flow (that is, RUNNING, STOPPING, PAUSED, STOPPED) |
data |
asyncEventsReceived |
Integer |
Number of asynchronous events received |
data |
executionErrors |
Integer |
Number of execution errors |
data |
fatalErrors |
Integer |
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 |
Number of synchronous events received |
data |
totalEventsReceived |
Integer |
The total number of messages received by the flow |
data |
serverId |
String |
ID of a Cluster |
data |
auditStatus |
String |
If audit status permits, the agent audits each call to the message. Default value: "DISABLED". Possible values: "CAPTURING", "PAUSED", "DISABLED", "FULL" |
data |
flowId |
Array |
Details that make a flow unique |
data |
name |
String |
Flow name. When used as part a url, if there are spaces present, these 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 an embedded Mule instance |
flowId |
favorite |
Boolean |
True if the flow is identified as favorite flow |
data |
processedEvents |
Integer |
Number of messages processed by the flow |
data |
totalProcessingTime |
Integer |
The total amount of time in seconds that the flow takes to process all messages |
data |
maxProcessingTime |
Integer |
The maximum 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 |
averageProcessingTime |
Integer |
The average amount of time in seconds that the flow takes to process a message |
data |
PERFORM FLOW START
Restarts a flow of an application on a Cluster.
PERFORM FLOW START - Syntax
Key | Type | Summary |
---|---|---|
clusterId |
String |
ID of a managed cluster |
flowName |
String |
Name of the flow |
applicationName |
String |
Name of the application to which the flow belongs to |
PERFORM FLOW START - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/flows/ChitChat/mule-example-hello/start
PERFORM FLOW PAUSE
Pauses a flow of an application on a Cluster.
PERFORM FLOW PAUSE - Syntax
Key | Type | Summary | Child of |
---|---|---|---|
clusterId |
String |
ID of a managed cluster |
— |
flowName |
String |
Name of the flow |
— |
applicationName |
String |
Name of the application to which the flow belongs to |
— |
PERFORM FLOW PAUSE - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/flows/ChitChat/mule-example-hello/pause
PERFORM FLOW STOP
Stops a flow of an application on a Cluster.
PERFORM FLOW STOP - Syntax
Key | Type | Summary | Child of |
---|---|---|---|
clusterId |
String |
ID of a managed cluster |
— |
flowName |
String |
Name of the flow |
— |
applicationName |
String |
Name of the application to which the flow belongs to |
— |
PERFORM FLOW STOP - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/flows/ChitChat/mule-example-hello/stop
LIST ALL FLOW ENDPOINTS
Lists all Flow Endpoints from a Mule application on a Cluster.
LIST ALL FLOW ENDPOINTS - Syntax
Key | Type | Summary |
---|---|---|
clusterId |
String |
ID of a cluster |
flowName |
String |
Name of the Flow |
applicationName |
String |
Name of the application |
LIST ALL FLOW ENDPOINTS - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/flows/ChitChat/mule-example-hello/endpoints
LIST ALL FLOW ENDPOINTS - JSON
Key | Type | Summary | Child of |
---|---|---|---|
total |
Integer |
Number of endpoints detected |
— |
data |
List |
List of endpoints details |
— |
address |
String |
Address of the endpoint (for example, "system.out", |
data |
id |
String |
Endpoint ID |
data |
type |
String |
Endpoint type (for example, VM) |
data |
status |
String |
Status of the endpoint (for example, started, stopped) |
data |
connector |
String |
Connector name |
data |
routedMessages |
Integer |
Number of routed messages |
data |
synchronous |
Boolean |
True if the endpoint is synchronous |
data |
filtered |
Boolean |
True if the endpoint is filtered |
data |
tx |
Boolean |
True if the endpoint handles transactions |
data |
PERFORM FLOW ENDPOINT START
Starts a flow endpoint belonging to an application on a Cluster.
PERFORM FLOW ENDPOINT START - Syntax
Key | Type | Summary |
---|---|---|
clusterId |
String |
ID of a managed cluster |
flowName |
String |
Name of the flow |
applicationName |
String |
Name of the application to which the flow belongs to |
endpointId |
String |
ID of the endpoint |
PERFORM FLOW ENDPOINT START - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0
with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/flows/ChitChat/mule-example-hello/endpoints/endpoint.vm.chitchatter/start
PERFORM FLOW ENDPOINT STOP
Stops a flow endpoint belonging to an application on a Cluster.
PERFORM FLOW ENDPOINT STOP - Syntax
Key | Type | Summary |
---|---|---|
clusterId |
String |
ID of a managed cluster |
flowName |
String |
Name of the flow |
applicationName |
String |
Name of the application to which the flow belongs to |
endpointId |
String |
ID of the endpoint |
PERFORM FLOW ENDPOINT STOP - Using CURL
Note that this syntax is an example. Be sure to replace http://locahost:8585/mmc-3.7.0 with your own MMC hostname, port number, and setting for mmc-3.7.0 (which is usually the name of the deployed mmc .war file).
curl --basic -u admin:admin -X POST http://localhost:8585/mmc-3.7.0/api/clusters/cf1fc78b-23a1-491e-93d1-6cc2819c4724/flows/ChitChat/mule-example-hello/endpoints/endpoint.vm.chitchatter/stop