Use API calls to create sessions where you can access VMware Cloud Foundation™ to manage clouds in your Lumen® Edge Private Cloud service. API sessions require authorization tokens that expire after a set time. You can create authorization tokens by two methods:
After creating the API session, use your preferred API tool (such as Postman) to use API calls. Use any langauge compatible with REST APIs. We provide examples of calls in several popular languages (Powershell, Python, and HTTPClientModule).
VMware cloud API is outside of Lumen management. Be sure you understand how to use the API to complete your objectives. To learn more about VMware API, refer to the VMware Cloud Director API Reference Guide.
Important: Using API endpoints requires proper permissions and skills. If you are not sure about using API endpoints, contact someone in your organization who has the Organization Administrator permission within Lumen Private Cloud on VMware Cloud Foundation or create an organization administrator, if needed.
Use an API call to create an authentication token and API session. Basic authentication requires login credentials and the API endpoints available depend on your permissions.
Use LPC on VCF to create an authorization token which is then used to create API sessions. API sessions have restrictions based on user permissions.
Retrieve an API session to continue working in that session or check information about the session.
End an API session when you are finished. If the token is still valid, you can create a new session using that existing token and continue working.
Note: This process requires login credentials in the request body.
To create an API session with basic authentication:
For API versions 35.2 or older, use the following POST call with your unique cloud site ID in the call:
For API versions 36.0 or newer, use the following POST call with your unique cloud site ID in the call:
The following is an example of the API call in Powershell format. This is only an example and should not be used.
In the response, the access token value ($accesstoken) contains the token used in the header for endpoints used in the API session. In this example, that token is 'X‑VMWARE‑VCLOUD‑ACCESS‑TOKEN'.
The following is an example of the API call in Python format. This is only an example and should not be used.
In the response, the access token value (accesstoken) contains the token used in the header for endpoints used in the API session. In this example, that token is 'X‑VMWARE‑VCLOUD‑ACCESS‑TOKEN'.
The following is an example of the API call in HTTPClientModule format. This is only an example and should not be used.
In the response, the access token value (accesstoken) contains the token used in the header for endpoints used in the API session. In this example, that token is 'X‑VMWARE‑VCLOUD‑ACCESS‑TOKEN'.
Note: You must have created an authentication token.
To create an API session with an authentication token, use the following POST call with your unique cloud site ID and organization name:
The following is an example of the API call in Powershell format. This is only an example and should not be used.
In the response, the access token value ($accesstoken) contains the token used in the header for endpoints used in the API session. In this example, that token is '$response.access_token'.
The following is an example of the API call in Python format. This is only an example and should not be used.
In the response, the access token value (accesstoken) contains the token used in the header for endpoints used in the API session. In this example, that token is 'access_token'.
The following is an example of the API call in HTTPClientModule format. This is only an example and should not be used.
In the response, the access token value (accesstoken) contains the token used in the header for endpoints used in the API session. In this example, that token is 'access_token'.
To retrieve an API session, use the following GET call:
The following is an example of the API call in Powershell format. This is only an example and should not be used.
In the header for the call, the bearer value must contain the access token received from the initial authorization call.
The following is an example of the API call in Python format. This is only an example and should not be used.
In the header for the call, the bearer value must contain the access token received from the initial authorization call.
The following is an example of the API call in HTTPClientModule format. This is only an example and should not be used.
In the header for the call, the bearer value must contain the access token received from the initial authorization call.
To end an API session, use the following DELETE call:
The following is an example of the API call in Powershell format. This is only an example and should not be used.
In the header for the call, the bearer value must contain the access token received from the initial authorization call.
The following is an example of the API call in Python format. This is only an example and should not be used.
In the header for the call, the bearer value must contain the access token received from the initial authorization call.
The following is an example of the API call in HTTPClientModule format. This is only an example and should not be used.
In the header for the call, the bearer value must contain the access token received from the initial authorization call.
Explore Edge Cloud Solutions