Contact Us 1-800-596-4880

REST API Reference: Repository of Applications

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, the Application Repository 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/repository

POST

UPLOAD

Uploads a new Mule Application into the repository.

MULTIPART_FORM_DATA

Key Type Summary Child of

name

String

The name of the application to be uploaded. If not provided, "Unnamed Application" will be used instead

file

String

Actual file to be uploaded. It must be a .zip file

version

Array

(Optional) Application version. If not provided, MMC will set a timestamp with the following format will: yyyyMMdd-HH:mm

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 -F file=@my-zipped-app.zip -F name=test-app -F version=2.0 --header "Content-Type: multipart/form-data" http://localhost:8585/mmc-console-3.7.3/api/repository

Using CURL on Linux

 curl --basic -u admin:admin -F file=@my-zipped-app.zip -F name=test-app -F version=2.0 --header 'Content-Type: multipart/form-data' http://localhost:8585/mmc-console-3.7.3/api/repository

JSON

Key Type Summary Child of

versionId

String

The ID of the version

applicationId

String

The ID of the application. Several versions can have the same application ID

200

The operation was successful

400

Unauthorized user

404

Error registering the application: Item not found

409

Application name and version already exists

500

Specify a valid file to upload/ Error while uploading application

501

Request contents not supported. For example: the app is not a zip file

502

Policy error while uploading application

From

3.2.2

GET

LIST ALL

Lists available applications persisted by MMC.

SYNTAX

Using CURL

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 http://localhost:8585/mmc-console-3.7.3/api/repository

JSON

Key Type Summary Child of

total

Integer

Amount of available applications

data

Array

List of available applications

name

String

Application name

data

id

String

Application ID. Notice that one application can have several versions

data

href

String

Full link to the resource

data

versions

Array

List of available versions of the same application (an application is distinguished by its name)

data

name

String

Version name. By default a timestamp, but can be something else, like "1.0a"

versions

id

String

Application version ID

versions

parentPath

String

Path to the generic application on the repository

versions

200

The operation was successful

500

Error while retrieving applications info/ Wrong user and password/ Unauthorized user

501

Application was not found

From

3.2.2

/api/repository/{applicationId}

GET

LIST

Lists all application versions with the same specified application ID.

SYNTAX

Key Type Summary Child of

applicationId

String

ID of the application on the repository. Do not confuse with version ID. An application can be composed of one or more versions; each version will have its own ID

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 http://localhost:8585/mmc-console-3.7.3/api/repository/local$43d80f90-b30b-4988-a83b-8172b649b11c

Using CURL on Linux

 curl --basic -u admin:admin 'http://localhost:8585/mmc-console-3.7.3/api/repository/local$43d80f90-b30b-4988-a83b-8172b649b11c'

JSON

Key Type Summary Child of

total

Integer

Amount of available versions of the application

data

Array

List of available versions of the application

name

String

Version of the application

data

id

String

ID of the version

data

parentPath

String

Path of the application within the repository

data

200

The operation was successful

500

Error while retrieving applications info/ Wrong user and password/ Unauthorized user

501

Application was not found

502

Invalid Application ID. Check that the entered ID is not a version ID

From

3.2.2

DELETE

REMOVE

Removes an application and all its corresponding versions from the repository.

SYNTAX

Key Type Summary Child of

versionId

String

Id of the application version. Invoke LIST ALL to obtain it.

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 DELETE http://localhost:8585/mmc-console-3.7.3/api/repository/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/repository/local$a89eb3d0-68b9-44a0-9f6b-712b0895f469'

JSON

200

The operation was successful

500

Error while removing the repository application

501

Application was not found

502

Policy error while removing application

From

3.2.2