vCloud PAYG REST API - Examples of Use

Topics


Sources of Key Information

The API call is made:

  • to the address below (labelled URL) specific to the destination datacentre
  • quoting the Organisation ID, Service Account Name (and password), and
  • from an external IP address that is listed on the Whitelist IPs list for that datacentre.

 

See the highlighted fields in the screenshot below:

 

 

The user name for the initial authentication is in the format serviceaccount@organisation. The vCloud API will return a token after authentication. 

 

Note: The examples used in this section show how this can be used in a test environment using Postman Software. Postman is available at https://www.getpostman.com

 


Environment Setup

The environment setup is shown in the screenshot below. The only required variable is the authToken, which makes other calls much easier.

 

For all requests the header ‘Accept:application/*+xml;version=ver’ is required, with ver being the vCloud version. You can perform a GET on the /api/versions url to get a list of supported API versions and schemas. API version 1.5 is now deprecated in vCloud version 8.0 and above.

 

 

Examples of Use

This section contains the following calls, and expected responses.

 


Logon Request

This call sends the Authorisation / Accept headers to the Sessions page in order to generate the Token. 

 

In this example the url to post to is: https://wpdtestvcapi.cloudcreator.co.nz/api/sessions.

 

 

Expected response

The response provides an Authorisation Token in the header that will be required for all further API calls for this session.

 

 


Get Admin Overview

 

 

Expected response

The response includes your ORG ID that is required for other API calls. This is a static entry so would not be required for every API session. A user would usually add this to an Orchestration systems environment variables.

 

 


Get vCloud Organisation Information

 

 

Expected Response

This call returns all information for the organisation. Useful for auditing and confirming GUIDs of VDCs, networks and general settings.

 


Get VDC Information

 

 

Expected Response

This call provides configuration and usage information on the VDC resources. Can be used for any resource validation checking within orchestration.

 


Get Catalogs

 

 

Expected Response

This returns the catalog information and provides the GUID of the ReveraSharedCatalogue which will be used to get template information.

 


Query Catalog

 

 

Expected Response

This provides the items with a catalog, used to get the GUID of a template you want to deploy.

 


Deploy vApp

 

 

Expected Response

Confirmation of the vApp build and a corresponding task GUID for capturing the progress of the build in the orchestration.


Query Task

 

 

Expected Response

This call provides details on any task GUID that has been captured from a previous API call. This will progress the state, any errors and progress. It is used for orchestration to confirm the request success or failure.


 

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please make sure you spelled the page name correctly or use the search box.