6.0.1

Table Of Contents
Access the vCloud Automation Center Plug-In API
Orchestrator provides an API Explorer to allow you to search the vCloud Automation Center plug-in API
and see the documentation for JavaScript objects that you can use in scripted elements.
For updated vCloud Automation Center API documentation, see
https://www.vmware.com/support/pubs/vcac-pubs.html.
Procedure
1 Log in to the Orchestrator client as an administrator.
2 Select Tools > API Explorer.
3 Double-click the vCAC module in the left pane to expand the hierarchical list of
vCloud Automation Center plug-in API objects.
What to do next
You can copy code from API elements and paste it into scripting boxes. For more information about API
scripting, see Developing with VMware vCenter Orchestrator.
Examples of Scripts for Common vCloud Automation Center Tasks
You can cut, paste, and edit the JavaScript examples to write scripts for common vCloud Automation Center
tasks.
For more information about scripting in vCenter Orchestrator, see Developing with VMware vCenter
Orchestrator.
Example: Create a vCloud Automation Center Approval Policy
This example script performs the following actions:
1 Gets the approval policy type.
2 Sets the user and group whose approval is required.
3 Sets the approval levels.
4 Defines the pre-provisioning approval phase.
5 Defines the post-provisioning approval phase.
6 Defines the approval policy specifications such as name, description, and type.
7 Creates the approval policy.
8 Publishes the approval policy. Once an approval policy is published, it becomes read-only.
Table 312. Input Variables
Variable Type
host
vCACCAFE:VCACHost
// Get the type of approval policy by ID
var typeService = host.createApprovalClient().getApprovalApprovalPolicyTypeService();
var type = typeService.getApprovalPolicyType("com.vmware.cafe.catalog.request");
// Set the user and group required to complete the approval
var user = new vCACCAFEApprovalPrincipal();
user.setValue("user@domain.com");
Using the vCenter Orchestrator Plug-In for vCloud Automation Center 6.0.1
22 VMware, Inc.