Contact Us 1-800-596-4880

Get File Metadata

The resource /mmc/api/servers/<myServerId>/files/<myFile.xml>?metadata=true is used with the HTTP GET command to get the metadata for the specified file on the specified server. The resource returns the metadata for the specified file on the server relative to the Mule installation directory.

You specify the URL as http://localhost:8080/mmc/api/servers/73d89173-290e-4cb3-a61c-e11deb74767d/files/<path>?metadata=true where <path> is the path to the file whose metadata you want to retrieve and 73d89173-290e-4cb3-a61c-e11deb74767d is the server id.

Note that you must include the parameter metadata=true after the path to the file.

Example Request

The following example requests the metadata for the myconfig.xml file.

GET http://localhost:8080/mmc/api/servers/73d89173-290e-4cb3-a61c-e11deb74767d/files/myconfig.xml?metadata=true

Example Response

A successful request returns a response such as the following:

200
Transfer-Encoding: chunked
Content-Type: application/json
Server: Apache-Coyote/1.1
Date: Tue, 10 Nov 2009 16:17:12 GMT

{
  "name" : "myconfig.xml",
  "size" : 6460,
  "absolutePath" : "/usr/local/mule-2.2.5/myconfig.xml",
  "directory" : false,
  "lastModified" : 1256052353600,
  "userCanExecute" : true,
  "userCanRead" : true,
  "userCanWrite" : true
}