Public Core-Org Domain API
All Core Org APIs require a valid authentication token, this token can be obtained in two ways.
- When using a refresh token, an authentication token can be obtained by issuing a
POST
like this:
curl --location --request POST 'https://console-stg.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=refresh_token' \
--data-urlencode 'refresh_token={refresh-token|'
This CSP API is defined at: https://console-stg.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST
The
refresh_token
used to get a valid authentication token can be obtained after successful login to following URL via a web browser: https://console-stg.cloud.vmware.com/csp/gateway/portal/#/user/tokens.
- When using client credentials, an authentication token can be obtained by issuing a
POST
like this:
curl --location --request POST 'https://console-stg.cloud.vmware.com/csp/gateway/am/api/auth/authorize' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic {encoded:OAuth-client-id+client_secret}' \
--data-urlencode 'grant_type=client_credentials'
This CSP API is defined at: https://console-stg.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getTokenForAuthGrantTypeUsingPOST
The
client_id
andclient_secret
used to get a valid authentication token can be obtained from the 'OAuth Apps' section in the CSP settings for theorgId
organization.