VMware Cloud Assembly API URL /resources/compute
While carrying out some investigation around using the VMware Cloud Assembly API to work with Onboarding Plans we stumbled across a puzzling scenario. The documentation for creating an Onboarding Resource that is part of an Onboarding Plan shows the following content needs to be sent as part of the POST API request for the creation:
While figuring out what needed to be populated in each property I retrieved via the API the contents of existing Onboarding Resources:
This appears to suggest that for the resourceLink property I need to send the reference to a compute resource, e.g. “resourceLink”: “/resources/compute/805c89e91c824734b1d47fb9da8bb” .
So naturally the next step was to take a look at the /resources/compute URL and see what was returned, to be slightly surprised in receiving a 503 Service Temporarily Unavailable response:
A colleague of mine tipped us off that he’d been digging around in the Cloud Assembly UI and using the Chrome Developer tools he’d found that pre-pending /provisioning/uerp in front of the URL gave access to similar things he’d been looking for without getting a 503 response. I tried it here and lo and behold got a response:
Our VMware contact informed us that /provisioning/uerp is an internal API and is not intended for public use. So take heed of the following:
WARNING NOTE: /provisioning/uerp is an internal API and not intended for public use. I would not suggest creating any production automation based off this API.
He instead recommended to use /iaas/api/machines ( https://www.mgmt.cloud.vmware.com/iaas/api/swagger/ui/ ) which worked fine for us. However, it’s still pretty confusing that other elements return links to /resources/compute which can’t be directly resolved and not /iaas/api/machines which can be - hopefully this will change in a future version.