WORKLOAD AUTOMATION COMMUNITY
  • Home
  • Blogs
  • Forum
  • Resources
  • Events
  • About
  • Contact
  • What's new

Integrating Postman with your HCL Automation Orchestration suite REST APIs: A Practical Guide

12/19/2024

0 Comments

 
Picture
​Postman is a powerful tool especially made to simplify development, testing and usage of HTTP calls. Postman even offers API integration via the import of OpenAPI 3.0/3.1 specification definitions (previously known as Swagger) directly from JSON/YAML files. Check Postman documentation for other supported formats. Other tools like Swagger Editor / Swagger UI offer ways to interact / work with APIs.
​The direct usage of SwaggerUI doesn’t offer ways to save your configurations or your queries, and it does not let you play with headers and parameters with enough freedom. Furthermore, you cannot set up a test environment and you have limited information regarding sent requests or received responses. What if we told you that it is possible to overcome all of these limitations?
 
Why should I use Postman with the HCL Automation Orchestration Suite?
 
Parametrizing and customizing API usage can make your Postman client re-usable for several engines and this can be very useful when engines expose the same APIs!
APIs v2 are a common layer between several HCL products like HCL Universal Orchestrator and HCL Workload Automation. Using the same APIs makes an API client like Postman very versatile, especially for monitoring purposes.
 
NOTICE: some REST APIs are supported / not supported based on the engine type.
 
This means I can make the same HTTP request towards different engines?
Theoretically, yes. Practically, based on the specific engine, you have to provide some different information especially regarding the authentication, the eventual engine name and the base url where the target engine exposes external APIs. Then you are ready to go.
 
I want to do this now!
 
Ok we understand you are enthusiastic about this, but don’t forget that it is only an API tool, there are more important things in life like friends, family, hobbies, love!
Joking aside, let’s get down to business. To use all Postman features regarding the importing of APIs, like selecting a local OpenAPI file to import, you need the desktop version of Postman and have to be signed in.
 
Where do I find the OpenAPI file to import?
 
Based on the product you are referring, you can download the yaml/json file from the following urls:
  • HCL Universal Orchestrator (UNO)
https://{{gateway-microservice-base-url}}/q/swagger-ui/
  • HCL Workload Automation (HWA)
https://{{your-engine-base-url}}/twsd/#/
(on HWA you can find the json file in the following path:
/opt/wa/usr/servers/engineServer/apps/TWSEngineModel.ear/TWSdRESTWeb-{{product.version}}.war/WA_API3_v2.json )
 
Follow the image below for the button to download the file:
Picture
​Importing the file
 
Once you have your file, open the Postman app and select the Import button and then click on files in order to retrieve the JSON/YAML OpenAPI file.
Picture
​The next step is to choose between creating a Postman Collection only or importing the definition itself, enabling you to eventually make changes and navigate through the definition. For our purposes we will only create the collection.
Picture
​By selecting View Import Settings you can customize some importing options. You can refer to the description for their usages or online documentation. In this case, referring to V2 REST APIs available for both HCL Workload Automation and HCL Universal Orchestrator it’s suggested to have the followings:
 
  • Enabled optional parameters disabled: sets all optional parameters as disabled by default when trying to make requests;
 
  • Always inherit authentication from collection enabled: lets you specify the credentials for the whole collection so that you only have to provide them once.
 
Picture
​Now you have your new collection APIs ready to be used.
 
Setting up the environments
 
Before proceeding, let’s create a couple of Environments to help us interact with our engines by configuring authentication and variables at once.
 
By navigating to the Environments tab you can configure global variables and then create an environment for each engine you want to work with. Let’s put the information we need in global variables:
Picture
​Furthermore you can create a couple of environments. In this example we are using two different baseUrls for the two instances, respectively intended to be used with an UnO instance and an HWA instance.
Picture
 Customize your collection
 
You can move back to Collections and edit the imported collection to bind it to a specific Environment. You can then move to the Authentication tab to specify which authentication to use. In this example we are using the variable {{bearerToken}} previously added as a global variable. 
Picture
​Everything is set up!
 
For the following example let’s assume we are working with the Universal Orchestrator environment and we want to query job definitions V2 by providing an oql (orchestration query language). As you can see the {{baseUrl}} is pre-configured by using associated variables, which means we do not have to provide authentication info again.
Picture
​By using the top right dropdown you can change the Environment you are targeting on the fly. In this example we just switched to the Environment configured to interact with the existing HWA instance and performed the query again:
Picture
​Conclusions
 
Postman offers a lot of features to help developers, testers and HCL Automation Orchestration Suite customers. You can create tests and set up an automation suite to interact with the environments you configured. The suggested setup might especially help in multi-engine setups when you want to have the best of the two worlds or make comparisons or assumptions between engines.
The world is full of possibilities, your only limit is your imagination!

Picture
​Davide Cichella

Davide Cichella became part of HCL Software in March 2022 as a backend software engineer for HCL Universal Orchestrator product. Holding a master’s degree in Information and Automation Engineering, he has a deep passion for technology, particularly for innovations that create meaningful impacts on people’s lives.


Picture
​Michele Baglioni

Michele Baglioni joined HCL Software in May 2023 as a backend software engineer on the HCL Workload Automation Engine team.
With a master’s degree in Computer Engineering specializing in Data Science, he combines technical expertise with a passion for problem-solving.
When not at work building reliable backend systems, Michele is out hiking mountains and exploring nature.
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Archives

    March 2025
    February 2025
    January 2025
    December 2024
    November 2024
    October 2024
    September 2024
    August 2024
    July 2024
    June 2024
    May 2024
    April 2024
    March 2024
    February 2024
    January 2024
    October 2023
    August 2023
    July 2023
    June 2023
    May 2023
    April 2023
    March 2023
    February 2023
    January 2023
    December 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    January 2020
    December 2019
    November 2019
    October 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017

    Categories

    All
    Analytics
    Azure
    Business Applications
    Cloud
    Data Storage
    DevOps
    Monitoring & Reporting

    RSS Feed

www.hcltechsw.com
About HCL Software 
HCL Software is a division of HCL Technologies (HCL) that operates its primary software business. It develops, markets, sells, and supports over 20 product families in the areas of DevSecOps, Automation, Digital Solutions, Data Management, Marketing and Commerce, and Mainframes. HCL Software has offices and labs around the world to serve thousands of customers. Its mission is to drive ultimate customer success with their IT investments through relentless innovation of its products. For more information, To know more  please visit www.hcltechsw.com.  Copyright © 2024 HCL Technologies Limited
  • Home
  • Blogs
  • Forum
  • Resources
  • Events
  • About
  • Contact
  • What's new