Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

Get a File

The resource /mmc/api/servers/files/<myServerId>/<myFile.xml>, when invoked with the HTTP GET operation, returns the specified file on the specified server relative to the Mule installation directory. You substitute the URL to the server for <myServerId> and the path to the XML file for <myFile.xml>.

URLs are of the form http://localhost:8080/mmc/api/servers/73d89173-290e-4cb3-a61c-e11deb74767d/files/files/<path>; where <path> is the path, including the name of the file, to the file you want to retrieve and 73d89173-290e-4cb3-a61c-e11deb74767d is the server id.

Example Request

The following code illustrates invoking this request.


         
      
1
GET http://localhost:8080/mmc/api/servers/73d89173-290e-4cb3-a61c-e11deb74767d/files/conf/server.xml

Example Response

When successful, this resource returns a response such as the following.


         
      
1
200Content-Length: 6460Set-Cookie: JSESSIONID=54D3308EA4FA18A9E29165C252D175FF; Path=/consoleContent-Type: application/octet-streamServer: Apache-Coyote/1.1Date: Mon, 09 Nov 2009 23:45:37 GMT... file data ...