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.

Note

If you are using the BMC AMI Ops user interface instance of Tomcat to access CRA, make your updates to the MUXTCENV member instead of CRATCENV.


  1. 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

    Example
    "CN=Zowe Service, OU=API Mediation Layer, O=Zowe Sample, L=Texas, S=Houston, C=USA"
    <password>

    Password to use for the creation of the keystore and truststore

    <Zowe_CA_path>
                

    Full path to your Zowe certificate authority

  2. Edit the CRATCENV member from the &INSTALLHLQ.BMCSAMP  data set.
  3. Scroll to the Zowe settings section.
  4. Set the following parameters:

    For the parameters specific to your Zowe installation, you can review the STDOUT log of the job that runs Zowe on your mainframe.

    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.

  5. 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

  1. Login to Zowe.
  2. Click the tile labeled BMC Common REST API.
    Zowe_Interface.png
  3. Use CRA in Zowe in the same way as in Swagger.

    Zowe_CRA_Interface.png

A Swagger interface is also available directly. For more information, see Using-Swagger-to-access-the-BMC-Common-REST-API.

Disabling CRA in Zowe

  1. Edit the CRATCENV member from the &INSTALLHLQ.BMCSAMP data set.
  2. Scroll to the Zowe settings section.
  3. Set the -Dzowe.enable.deploy parameter to false.

 


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*