You can use this operation to request that z/OSMF route a retrieve
data request to the application server where the server-side code
for your plug-in resides.
HTTP method and URI path
GET /zosmf/externalgateway/system?content=<http-content>
where:
zosmf/externalgateway identifies the application server
routing services.
system informs the service that the request will be routed
to only one application server.
content=<http-content> represents the parameters
used to qualify the request. Table 1 lists
the parameters that are supported for this request.
Important: If the value for a
parameter contains a number sign (#), encode the number sign as %23.
Otherwise, everything following the number sign will be omitted from
the request. For example, if the target is AppServer#1, specify AppServer%231.
Table 1. Supported input parameters
for the application server routing services
Parameter
Required
Description
target
Yes
Nickname assigned to the system entry in the z/OSMFSystems task that describes
the settings required to access the application server where the server-side
code for your plug-in resides. If the specified system entry does
not exist, the request will fail.
z/OSMF stores the nickname
for the target application server in the window object in the Browser
Object Model. To retrieve the nickname, issue the following JavaScript command from your
task:
window.frameElement.getAttribute("target")
For
example:
postCreate: function() {
var target = window.frameElement.getAttribute("target");
var remoteURL = "/zosmf/externalgateway/system?content=
{'target':'" + target + "','resourcePath':'/testApp'}";
}
resourcePath
Yes
Path to the service that will process the request.
requestProperties
No
HTTP headers to be included in the HTTP request.
Specify the HTTP headers as name and value pairs. If HTTP headers
are omitted or are null, default values will be used, which
are valid for most installations.
timeout
No
Amount of time in milliseconds allowed to process
a request. The value can range from 1 to 5601000 milliseconds. If
omitted, the default value of 20000 milliseconds is used.
wrapped
No
Indicator of whether the application server
routing service will wrap the response from the target application
server in a JSON object that contains additional information about
the response. Set the parameter to N to obtain only the response
provided by the target application server. Otherwise, set the parameter
to Y or omit it to obtain the response along with additional
information. For more details, see Content type used for HTTP response data.
binary
No
Indicator of whether the response from the target
application server is in binary format. Set the parameter to N or
omit it if the response is not in binary format. Otherwise, set the
parameter to Y if the response is in binary format.
content
Yes if the HTTP method is POST or PUT.
Parameters or JSON object to include in the
body of the HTTPS request that will be sent to the service that will
process the request.
Standard headers
Use the following standard
HTTP header with this request:
On completion, the service
returns an HTTP response, which includes a status code indicating
whether your request completed. Status code 200 indicates
success. A status code of 4nn or 5nn indicates that
an error has occurred. For more details, see Error handling.
Example 1: Retrieve wrapped data from an application
server
To retrieve wrapped data from the application server
identified in system entry appServer1, which is defined in
the z/OSMFSystems task, submit
the following request:Figure 1. Sample request to retrieve wrapped data from an
application server
GET /zosmf/externalgateway/system?content={"target":"appServer1","resourcePath":"/testApp"} HTTP/1.1
Host: appname.yourco.com
A sample response is shown in Figure 2.Figure 2. Sample
response for retrieving wrapped data from an application server
Example 2: Retrieve unwrapped data from an application
server
To retrieve unwrapped data from the application server
identified in system entry appServer1, which is defined in
the z/OSMFSystems task, submit
the following request:Figure 3. Sample request to retrieve unwrapped data from an
application server
GET /zosmf/externalgateway/system?content={"target":"appServer1","resourcePath":"/testApp",
"wrapped":"N"} HTTP/1.1
Host: appname.yourco.com
A sample response is shown in Figure 4.Figure 4. Sample
response for retrieving unwrapped data from an application server
Example 3: Retrieve binary data from an application
server
To retrieve binary data from the application server
identified in system entry appServer1, which is defined in
the z/OSMFSystems task, submit
the following request:Figure 5. Sample request to retrieve binary data from an application
server
GET /zosmf/externalgateway/system?content={"target":"appServer1","resourcePath":"/testApp",
"binary":"Y"} HTTP/1.1
Host: appname.yourco.com
A sample response is shown in Figure 6.Figure 6. Sample
response for retrieving binary data from an application server