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
- Zowe is installed and configured on your Z/OS system. For details about how to install and configure Zowe, see https://docs.zowe.org/stable/user-guide/install-zos.html#before-you-begin.
- You have installed Dynamic Workload Console V9.5 Fix Pack 2.
- You have downloaded the
zowe-cli-hcl-wa-plugin.zip
file that is provided on Flexera and installed the plug-in as described in theREADME_wa.html
file that is provided in the zip file.
About this task
- Edit the
wa.yml
file that is provided inzowe-cli-hcl-wa-plugin.zip
as follows:
where: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
- 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
. - Ensure that the certificate used by the Workload Automation REST API is trusted by the API
mediation layer.
To meet this requirements, follow the instructions provided at this link: https://docs.zowe.org/stable/extend/extend-apiml/api-mediation-security.html#add-a-service-with-an-existing-certificate-to-api-ml-on-z-os
- 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: