Using VMware Cloud Partner Navigator APIs
To begin using VMware Cloud Partner Navigator APIs, you must first exchange an API token for an access token.
To authenticate your subsequent API requests,
you must use the received access token in the csp-auth-token
header
in your script's HTTP calls.
API tokens are scoped within individual organizations. To manage a tenant organization using the API, you have to first generate an API token within that organization. Then you must follow these steps to exchange it for an access token, and use this access token in all management operations related to that organization.
Prerequisites
- Verify that you have generated an API token from the VMware Cloud Partner Navigator UI. For information about generating API tokens, refer to the Using and Managing VMware Cloud Partner Navigator as a Cloud Provider documentation.
- Verify that your organization has at least one active cloud service.
Procedure
- ♦
To exchange your VMware Cloud Partner Navigator API
token for an exchange token, issue the following request.
POST https://console.navigator.vmware.com/cphub/api/auth/v1/authn/accesstoken
-
Set the
Content-Type
header of this POST request toapplication/json
. -
In the body of the request, include the following parameter:
"refreshToken" : "your_api_token"
.
-
Set the
Results
"accessToken"
parameter. What to do next
To authenticate your VMware Cloud Partner Navigator API calls,
you must use a valid authentication token as the csp-auth-token
request header.