Retrieving files and resources for your application

z/OSMF provides a file retrieval service that a client application can use to retrieve the files and resources required for the application to display and function properly.

To request files and resources from the z/OSMF file retrieval service, use the following URL format:
GET https://{host}:{port}/zosmf/IzuUICommon/externalfiles/{resourcePath}
where:
  • "https://{host}:{port}" specifies the hostname or IP address and the port of the target system.
  • "zosmf/IzuUICommon/externalfiles" identifies the z/OSMF file retrieval service.
  • "resourcePath" identifies the file to be retrieved. The path must start with the plug-in context root subdirectory, which is specified in the plug-in's property file. For more details about the plug-in context root, see Adding your applications to z/OSMF.
When you issue this HTTP request, the file retrieval service:
  • Retrieves the specified file from the UNIX file system.
  • Provides the file to z/OSMF core to be displayed.
  • Loads the code for the user interface.

Typically, the file retrieval service is used to provide z/OSMF core with the URL to use to launch the application when a user clicks the corresponding task name in the z/OSMF navigation area. It can also be used to retrieve additional files and resources as requested by your application.

Example

The following example retrieves the file myapp.js for the myapp application.

Figure 1. Sample request to retrieve a file
GET /zosmf/IzuUICommon/externalfiles/myappcontextroot/myapp.js
Host: 1.56.82.158:80
The HTTP response body depends on the type of file to be retrieved. For the previous example, the expected response follows:
Figure 2. Sample response for a request to retrieve a file
HTTP/1.1 200 OK
Date: Thu, 13 Jan 2014 05:39:28 +0000GMT
Content-Type:	application/x-javascript

(file content...)