Using Zowe to access the BMC Common REST API
(SPE2107)
You can access the Common REST API through the Zowe interface. Zowe is an open source software framework that provides solutions to allow development and operations teams to securely, manage, control, script, and develop on the Mainframe. This topic explains how to enable and then access CRA through Zowe.
Enabling CRA in Zowe
For Zowe to be able to see Common REST API, you must set the Zowe-related parameters in the CRATCENV member in the &INSTALLHLQ.BMCSAMP data set.
Run the apiml_cm.sh script that is located in the bin folder of your Zowe installation as follows:
./apiml_cm.sh --action new-service --service-alias CRA --service-ext "SAN=dns:<FQDN>,dns:<hostname>,ip:<host_IP>" \
--service-keystore <keystore_location>/keystore --service-truststore <truststore_location>/truststore \
--service-dname "<X.509_dname>" \
--service-password <password> --service-validity 3650
--local-ca-filename "/<Zowe_CA_path>/localca"In the sample code, replace the variables as follows:
Variable
Description
<FQDN>Fully Qualified Domain Name of your CRAserver
<hostname>Hostname of your CRA server
<host_IP>IP address of your CRA server
<keystore_location>Full path to the generated keystore
This location must be accessible to the CRA server.
<truststore_location>Full path to the generated truststore
This location must be accessible to the CRA server.
<X.509_dname>X.509 Distinguished Name used to identify entities which are named by the subject and issuer (signer) fields of X.509 certificates
<password>Password to use for the creation of the keystore and truststore
<Zowe_CA_path>
Full path to your Zowe certificate authority
- Edit the CRATCENV member from the &INSTALLHLQ.BMCSAMP data set.
- Scroll to the Zowe settings section.
Set the following parameters:
Parameter
Description
-Dzowe.enable.deploy
Set to true.
-Dapiml.service.hostname
Replace service_host with the host name of CRA.
-Dapiml.service.port
Enter the port number of your CRA installation. Default value is 8080.
-Dapiml.service.ipaddress
Replace 1.1.1.1 with the IP address of the LPAR where CRA is installed.
-Dapiml.discovery.hostname
Replace host_name with the host name of your Zowe server.
-Dapiml.discovery.port
Enter the port number of your Zowe server. Default value is 7553.
-Dapiml.ssl.keypassword
Replace empty with your SSL key password.
-Dapiml.ssl.keystorepassword
Replace empty with your SSL keystore password.
-Dapiml.ssl.truststorepassword
Replace empty with your SSL truststore password.
-Dapiml.ssl.keystore
Replace <Keystore_For_ML> with the location of the keystore created by the apiml_cm.sh script.
-Dapiml.ssl.truststore
Replace <Truststore_For_ML> with the location of the truststore created by the apiml_cm.sh script.
- After you finish updating the CRATCENV member restart the CRA Tomcat started task.
After a few minutes, CRA is available in your Zowe interface.
Accessing CRA in Zowe
- Login to Zowe.
- Click the tile labeled BMC Common REST API.
- Use CRA in Zowe in the same way as in Swagger.
A Swagger interface is also available directly. For more information, see Using-Swagger-to-access-the-BMC-Common-REST-API.
Disabling CRA in Zowe
- Edit the CRATCENV member from the &INSTALLHLQ.BMCSAMP data set.
- Scroll to the Zowe settings section.
- Set the -Dzowe.enable.deploy parameter to false.