VMware Cloud Foundation has a number of Public APIs, the documentation around this can easily be found by logging into the SDDC Manager UI and selecting the Developer Center. From here you can even execute an API on the running system.
Whilst this is all available right there in the SDDC Manager UI, its also possible that you may want to experiment with the Public APIs if your looking to develop your own automation, I like to use Postman for such experimentation and development and I was looking for a quick way to create a collection for the VMware Cloud Foundation APIs.
In the post I will walk you through the process, first by obtaining the swagger JSON file, making some minor adjustments and finally creating the collection.
Create VMware Cloud Foundation API Collection in Postman
Step 1 – Connect to the SDDC Manager appliance as vcf using WinSCP and transfer the swagger.json file to your local computer. The swagger.json file is located at /opt/vmware/vcf/sddc-manager-ui-app/client/dist/client/assets/spec
NOTE: You will find two swagger JSON files one for vSAN Ready Nodes (swagger.json) and one for VxRail Nodes (swagger_vxrail.json)
Step 2 – Before we can import the swagger.json file we need to make a small modification otherwise the import complains about the format. Open the swagger.json file and after “title” enter a “version” value. In the example below, I entered “version”: “4.2.0”
Step 3 – Now select the whole contents of the file and copy it to the clipboard.
Step 4 – In Postman select File > Import.
Step 5 – On the Import dialog, select Raw Text and paste the clipboard into the box.
Step 6 – Click Continue, then click Import.
Step 7 – Once the import finishes you will have a collection of all the VMware Cloud Foundation Public APIs.