The Gen 8.6 Consuming REST APIs for Java and CICS Applications feature allows your Gen applications to use functionality provided by RESTful Web Services. The purpose of this document is to help you get started using this feature. This document will cover what PTFs are required and what actions need to be performed on your Encyclopedias and your Models in order to be able to add the new Call REST statement. Some application execution environment configuration topics will also be covered.
In June of 2022, native support for security schemes like BasicAuth, BearerAuth, ApiKeyAuth, and OAuth2 (Client Credentials Flow) was added to the Consuming REST APIs for Java and CICS Applications feature. This article has been updated to reflect this additional functionality.
Gen 8.6
Java applications
COBOL applications executing on CICS
To get started using the Consuming REST APIs for Java and CICS Applications feature, please follow these steps:
The following PTFs provide the Consuming REST APIs for Java and CICS Applications functionality. Apply the PTFs that are appropriate for your development and execution environments. You can click on the individual PTF links below or you can access all the PTFs from the page Gen 8.6 Solutions and Patches. The Mainframe PTFs can be accessed from the CA Gen Maintenance Grid link on that page.
NOTE: For the distributed side the PTFs below which added the Consuming REST APIs for Java and CICS Applications functionality have since been superseded by 8.6.3 Consolidation PTFs.
The Consuming REST APIs for CICS Applications feature has modified the CEHBSAMP and CEHBSKL0 members listed below in Table 1. If you have customized any of these members, please make sure you have a backup copy of these members before APPLYing these PTFs.
Table 1. Modified CEHBSAMP and CEHBSKL0 members |
|
Member |
Type |
MTQDEFLT |
CEHBSAMP |
NDEFCICS |
CEHBSAMP |
TIRMTQB2 |
CEHBSAMP |
DEFCICS |
CEHBSKL0 |
TICICSAB |
CEHBSKL0 |
TICLDB2C |
CEHBSKL0 |
New system objects are required to support the Call REST statement. Update your encyclopedia’s Schema tables to pick up these new objects.
To add the Call REST statement to an existing model, the model must first be converted (or re-converted) to the 9.2.A6 schema level after the encyclopedia’s Schema tables have been updated. If you are adding the Call REST statement to a new model, conversion is not necessary.
The Call REST statement is how your Gen application can use the functionality provided by a RESTful Web Service. The following restrictions apply to the Call REST statement:
Please see this link for details on how to add a Call REST statement.
This section will describe execution environment configuration tasks for both Java applications and CICS applications.
A couple of methods are available to configure the execution behavior of the Call REST statements in your Java applications. You can choose either method or a combination of both methods. However, using the Configuration parameters is the recommended method since it allows more flexibility and does not require application redeployment whenever changes are needed.
1) Callrest.properties file
Certain configuration parameters can be set or overridden by using the callrest.properties file, which will be read at application runtime. The parameters in this file can be configured for all services or for individual services. The following items apply to the callrest.properties file:
2) Configuration parameters
An alternative to using the callrest.properties file is to use the Configuration parameters that are available as Import parameters to every Call REST statement. These parameters can be matched to views in your Action Diagram and dynamically set in your PAD logic.
Please see this link for details on configuring your Call REST statements.
Several steps may be required to configure the execution environment for your CICS applications. Perform the following steps that apply to your environment:
You can see IBM’s URIMAP documentation here.
For additional information, please see hub article: Gen 8.6 Consuming REST APIs (Call REST) feature