Receive messages from an application

You can use this operation to receive messages from an application running in a TSO/E address space.

HTTP method and URI path

GET /zosmf/tsoApp/app/<servletKey>/<appKey>
where:
  • zosmf/tsoApp identifies the TSO/E address space services.
  • app informs the service that the request is for an application running in a TSO/E address space.
  • <servletKey> identifies the TSO/E address space where the application is running.
  • <appKey> identifies the application to which to send messages.

Standard headers

Use the following standard HTTP header with this request:

Content-Type: application/json

Custom headers

None.

Request content

None.

Usage considerations

See Usage considerations for the z/OSMF REST services.

In addition, note that the API will attempt to read application and TSO/E response messages. If no messages are received in the time allotted, a timeout indication will be returned.

Any TSO/E messages are prioritized over application messages. Typically, when a caller receives a TSO/E message while attempting to receive application messages, the caller processes the TSO/E messages, then attempts to retrieve the queued application messages.

Required authorizations

See Required authorizations.

Expected response

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.

The response also includes a JSON object that contains the application response messages, or a timeout indication. For more details, see Content type used for HTTP request and response data.

Example

To receive TSO/E or application messages from application BkApp001, which is running in the TSO/E address space identified by servlet key ZOSMFAD-71-aabcaaaf, submit the request depicted in Figure 1.
Figure 1. Sample request to receive messages from an application
GET /zosmf/tsoApp/app/ZOSMFAD-71-aabcaaaf/BkApp001 HTTP/1.1
Host: zosmf1.yourco.com
A sample response is shown in Figure 2.Start of change
Figure 2. Sample response for request to receive messages from an application
HTTP/1.1 200 OK
Date: Thu, 13 Jan 2011 05:39:28 +0000GMT
Connection: close

{"servletKey":"ZOSMFAD-71-aabcaaaf","ver":"0100","appData":[...],"timeout":false}
End of change