Upgrading HCX Manager via API

While working on an HCX-related request from one of the hyperscalers, I came across an interesting ask: the hyperscaler wants to automate HCX upgrades via API. 

After checking HCX’s official API guide and Swagger documentation, I did not find any API to upgrade the HCX Manager appliance. The only available APIs are for upgrading HCX Interconnect appliances.

After searching through internal documentation, I did not find any concrete info, and I decided to explore the Network Inspect option in a browser, which exposes APIs for any operation you trigger from the UI. 

In this post, I am demonstrating which API calls are needed for a successful HCX Manager upgrade. 

Disclaimer: HCX Manager upgrade APIs are not yet officially supported and will be shipped with the upcoming release of HCX.

Step 1: Check HCX Appliance Current Upgrade Status

Although this step is optional, I would recommend verifying the current upgrade status to ensure you do not accidentally attempt to upgrade an appliance that is already on the target version. 

Response Output: From the response output, we can see the status of the upgrade is “NOT_STARTED”



Step 2: Upload Upgrade Bundle to HCX Manager Appliance

The screenshot below shows how to do it via Postman.

And the equivalent curl command for the same

Step 3: Verify Upgrade Bundle Info

Response Output



Step 4: Trigger Upgrade

Step 5: Verify Upgrade Status

Response Output: When the upgrade is underway



Response Output: When the upgrade is completed



I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing 🙂