VMware Cloud Partner Navigator now has an API, which allows you to integrate the functionality of our multi-cloud management portal with your own customer portals and onboarding scripts. To get started, you’ll want to familiarize yourself with the Swagger UI for the API, as well as the API documentation.
There are currently four Navigator API categories:
IAM – This API handles authentication to Navigator, and you’ll query this API to get the Org IDs that you have access to.
Organization and Service Management – This API allows you to create Navigator customer organizations, enable services for customers, and get a list of your commit contracts.
Support – This API allows you to create and query the open support cases that you have with VMware. You’ll use this in combination with the Organization and Service Management API to create support cases on behalf of your customers.
Billing – This API gives you access to subscriptions, usage and charges for your organization and customers.
If this is the first time you’re working with any VMware Cloud APIs, you’ll need to create your refresh token. To do so, you’ll click on the user dropdown -> My Account, and click on the API Tokens tab. Enter a token name and a Time to Live for the token.
Once your token is created, you’ll need to copy and store it in your favorite secret store. After this screen is gone, you will never be able to retrieve it, and a new token will need to get generated if you lose this one or it expires.
To Authenticate to the Navigator APIs, we will now use our refresh token to get an access token. The access token is what we use for our active Navigator API session. We’ll use the Navigator Swagger UI to test this out. Go to the IAM API, click on authentication, and we’ll post our refresh token in the body of the API call to get back our access token.
The Swagger “try it out” feature helpfully gives us a sample cURL command, as well as the response to the API call, which includes the access token we’ll need to make other calls to the API. The access token expires after 30 minutes, so we’ll need to re-authenticate every once in a while for a long session.
The next call you’ll want to make in the IAM API is to get your organization ID(s), which are GUIDs and will be a part of the URI that we call for many other API calls. This call is under IAM -> User Entitlement -> /loggedinuser/orgs. This returns a list of OrgID GUIDs that we’ll need to query. My situation is a little unique as I belong to a lot of internal and development orgs, and your list will most likely be a lot shorter.
Once we have these GUIDs, we need to figure out what orgs they belong to, and this is where we switch over to the Organization and Services API. Put in the Org ID GUID you want to search for as well as your access token for the /mgmt/orgs/{orgID} API call, and you’ll get the information about that particular organization.
Now that we have verified the GUID matches the organization we want to work with, we can move on to creating customer orgs, querying usage, and automating our entire cloud lifecycle!
Here’s one more example where I query what subscriptions I have across all my customers.
The opportunities are endless with the VMware Cloud Partner Navigator API, and we look forward to hearing your automation and integration stories!
Be sure you visit and bookmark these links:
VMware Cloud Partner Navigator API Documentation
VMware Cloud Partner Navigator Swagger UI