Using Zowe API Mediation Layer to access the Workload Automation REST APIs

How to add the Workload Automation REST APIs to the Zowe API Mediation Layer, which is a component that provides a gateway acting as a reverse proxy for z/OS services, and a catalog of REST APIs.

Before you begin

Before adding the Workload Automation REST APIs to the Zowe API Mediation Layer, ensure that:
  1. Zowe is installed and configured on your Z/OS system. For details about how to install and configure Zowe, see the Zowe documentation. .
  2. You have installed Dynamic Workload Console V9.5 Fix Pack 2.
  3. You have downloaded the zowe-cli-hcl-wa-plugin.zip file that is provided on Flexera and installed the plug-in as described in the README_wa.html file that is provided in the zip file.

About this task

To add the Workload Automation REST API to the Zowe API mediation layer, perform the following steps:
  1. Edit the wa.yml file that is provided in zowe-cli-hcl-wa-plugin.zip as follows:
    services:
          - serviceId: <serviceID>   # unique lowercase ID of the service
            catalogUiTileId: static  
            title: HCL Workload Automation for Z  
            description: HCL Workload Automation for Z Service  
            instanceBaseUrls:  # list of base URLs for each instance
            - https://<zconn_hostname>:<zconn_port>  # scheme:https//zconn_hostname:zconn_port
          homePageRelativeUrl: / 
          statusPageRelativeUrl: /twsz     
          healthCheckRelativeUrl: /twsz/v1  
          routes:
            - gatewayUrl: api/v1           
              serviceRelativeUrl: /twsz/v1 # relativePath that is added to baseUrl of an instance
          # List of APIs provided by the service:
          apiInfo:
            - gatewayUrl: api/v1
              documentationUrl: https://<zconn_hostname:<zconn_port>/twsz/IWS_API3_all_zos.json
          # List of tiles that can be used by services defined in the YAML file:
          catalogUiTiles:
             static:
                title: HCL Workload Automation for Z API Services
                description: HCL Workload Automation for Z REST Services
    
    where:
    zconn_hostname
    Host name of the Z connector where the Workload Automation REST APIs are located.
    zconn_port
    Port used by the Z connector where the Workload Automation REST APIs are located.

    The result of the YAML file is that each call to the Zowe API mediation layer at https://zowehost:zoweport/api/v1/waservice is redirected to the Z connector REST API at https://zconn_hostname:zconn_port/twsz/v1.

  2. Ensure that the certificate used by the Workload Automation REST API is trusted by the API mediation layer.

    To meet this requirement, follow the instructions provided in the Zowe documentation.

  3. Verify that the Workload Automation REST API was successfully added to the API mediation layer by opening the Zowe Virtual Desktop and accessing the API catalog. The catalog will show the Workload Automation REST API, as in the following example:
The image shows the Zowe API Catalog with some examples of the available API services to be used.

Results

You have successfully added the Workload Automation REST API to the Zowe API Mediation Layer. You can issue the WA commands from the Zowe command-line.