Developing a Web Services Client for VMware vCenter Orchestrator vCenter Orchestrator 5.5.1 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs.
Developing a Web Services Client for VMware vCenter Orchestrator You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com Copyright © 2008–2014 VMware, Inc. All rights reserved. Copyright and trademark information. VMware, Inc. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.
Contents Developing Web Services Client for VMware vCenter Orchestrator 7 1 Developing a Web Services Client 9 2 Using the vCenter Orchestrator REST API 11 Authenticating Against Orchestrator and Third-Party Systems 12 Using vCenter Single Sign-On Authentication with the Orchestrator REST API 12 Using LDAP Authentication with the Orchestrator REST API 14 Accessing the Reference Documentation for the Orchestrator REST API 14 Using the Java REST SDK 14 Operations with Workflows 15 Find a Workflow and Retr
Developing a Web Services Client for VMware vCenter Orchestrator Setting Permissions on Orchestrator Objects 39 REST API Permissions 40 Retrieve the Permissions of a Workflow 40 Delete the Permissions of a Workflow 41 Set the Permissions for a Workflow 41 Retrieve the Permissions of an Action 41 Delete the Permissions of an Action 42 Set the Permissions for an Action 42 Retrieve the Permissions of a Package 42 Delete the Permissions of a Package 43 Set the Permissions for a Package 43 Retrieve the Permis
Contents Retrieve the ID of a Workflow 62 Find Workflows by Using the getWorkflowsWithName Operation Find Workflows by Using the getWorkflowForID Operation 63 Run Workflows from a Web Service Client 63 Interact with a Workflow While it Runs 64 Obtain Workflow Results 66 Time Zones and Running Workflows Through Web Services 67 Web Service Application Examples 67 62 4 Web Service API Object Reference 69 FinderResult Object 69 ModuleInfo Object 70 Property Object 71 QueryResult Object 71 Workflow Object 7
Developing a Web Services Client for VMware vCenter Orchestrator 6 VMware, Inc.
Developing Web Services Client for VMware vCenter Orchestrator Developing Web Services Client for VMware vCenter Orchestrator provides information about developing a Web ® services client for VMware vCenter Orchestrator. Orchestrator provides Web services APIs so that you can develop applications to access and use workflows through the Web.
Developing a Web Services Client for VMware vCenter Orchestrator 8 VMware, Inc.
Developing a Web Services Client 1 VMware vCenter Orchestrator provides Web services APIs so that you can develop applications to access workflows through the Web. The main purpose of the Orchestrator Web services APIs is to allow you to integrate Orchestrator workflows in custom Web-based applications. Orchestrator provides Web services APIs that are based on two types of technologies: n A representational state transfer (REST) API.
Developing a Web Services Client for VMware vCenter Orchestrator 10 VMware, Inc.
Using the vCenter Orchestrator REST API 2 The Orchestrator REST API provides functionality that allows you to communicate with the Orchestrator server directly through HTTP and perform various workflow-related operations over workflows. The Orchestrator REST API exposes the objects from the inventories of the Orchestrator server and the installed plug-ins as resources at predefined URLs. You make HTTP calls at these URLs to trigger operations in Orchestrator.
Developing a Web Services Client for VMware vCenter Orchestrator Authenticating Against Orchestrator and Third-Party Systems You must authenticate against Orchestrator in the HTTP requests that you make through the Orchestrator REST API. If you use the Orchestrator REST API to access resources on a third-party system, such as vCenter Server, you must authenticate against that system as well. For example, to access all workflows in the Orchestrator inventory, you must authenticate against Orchestrator.
Chapter 2 Using the vCenter Orchestrator REST API For example, to run a workflow that uses a virtual machine through the Orchestrator REST API, you access resources both in Orchestrator and in vCenter Server. To authenticate against Orchestrator and vCenter Server, you must pass your principal holder-of-key token in the Authorization header of the request that you make, and the delegate token in the VCOAuthorization header.
Developing a Web Services Client for VMware vCenter Orchestrator What to do next Use the solution user name of Orchestrator and your principal holder-of-key token to request a delegate holder-of-key token from the vCenter Single Sign-On Server. Using LDAP Authentication with the Orchestrator REST API You must apply the Basic HTTP Authentication scheme if Orchestrator is configured with LDAP, or if you use the Orchestrator server to access a third-party system that is configured with LDAP.
Chapter 2 Using the vCenter Orchestrator REST API //create the services WorkflowService workflowService = new WorkflowService(session); ExecutionService executionService = new ExecutionService(session); //find a workflow by ID Workflow workflow = workflowService.getWorkflow("1231235"); //create an ExecutionContext from the user's input ExecutionContext context = new ExecutionContextBuilder().addParam("name", "Jerry").addParam("age", 18).
Developing a Web Services Client for VMware vCenter Orchestrator 3 Retrieve the definition of the workflow by making a GET request at the URL of the definition: GET https://{vcoHost}:{port}/vco/api/workflows/{workflowID}/ Example: Search for the Send Hello Workflow You can find the Send Hello workflow and retrieve its definition: 1 To find the Send Hello workflow, make a GET request at the URL of the Workflow service by applying a filter: GET https://localhost:8281/vco/api/workflows?conditions=name~Hell
Chapter 2 Using the vCenter Orchestrator REST API
Developing a Web Services Client for VMware vCenter Orchestrator Send Hello Run a Workflow You run a workflow through the Orchestrator REST API by creating a new execution object for a particular workflow. Prerequisites Verify that you have imported the sample workflows package in Orchestrator. The package is included in the Orchestrator sample applications ZIP file that you can download from the Orchestrator documentation page.
Chapter 2 Using the vCenter Orchestrator REST API 8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/exec utions/" /> PAGE 20
Developing a Web Services Client for VMware vCenter Orchestrator Prerequisites Verify that you have imported the sample workflows package in Orchestrator. The package is included in the Orchestrator sample applications ZIP file that you can download from the Orchestrator documentation page.
Chapter 2 Using the vCenter Orchestrator REST API You receive the workflow definition in the response body of the request: PAGE 22Developing a Web Services Client for VMware vCenter Orchestrator The response body contains error messages attached to every field, indicating that the values for the input parameters are invalid. ....... name name The minimum number of characters allowed for this field is 3.
Chapter 2 Using the vCenter Orchestrator REST API Interacting with a Workflow While It Runs The Orchestrator REST API allows you to perform various operations with a workflow during its run. You can get the status of a running workflow, answer to a waiting user interaction, and cancel a workflow run. Get Workflow Run Objects and Check the Workflow Status You can get information about the runs of a workflow, such as the start and end dates, the state of the run, and the values for the input parameters.
Developing a Web Services Client for VMware vCenter Orchestrator 2 Get the available runs of the workflow by making a GET request at the URL that holds the execution objects for the workflow: GET https://localhost: 8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/exec utions/ 3 From the response body of the request, select a workflow run and make a GET request to retrieve it: GET https://localhost: 8281/vco/api/workflows/CF808080808080808080808080808080DA808080013
Chapter 2 Using the vCenter Orchestrator REST API The inventory item contains a link to the user interaction instance.The user interaction instance is associated with a particular workflow run.
Developing a Web Services Client for VMware vCenter Orchestrator Procedure 1 Retrieve the list of all user interaction objects by making a GET request at the URL that holds the available user interaction objects, or by filtering only the waiting user interactions: URL Description https://vco host:port/vco/api/catalog/System/U serInteraction Holds the available user interaction objects in Orchestrator.
Chapter 2 Using the vCenter Orchestrator REST API If the last request is successful, you receive a status code 204 and an empty response body. Example: Answer to the User Interaction of the Interactive Hello World Workflow by Validating Input Parameters You can answer to the user interaction of the Interactive Hello World workflow by validating the values of the input parameters against the constraints that are defined in the presentation of the user interaction.
Developing a Web Services Client for VMware vCenter Orchestrator 6 Make a POST request at the URL of the user interaction instance by passing the same request body as in the POST request in step 5. POST https://localhost: 8281/vco/api/catalog/System/UserInteraction/888080808080808080808080808080805A808080013214533 8690643f66a027ec/interaction/ Cancel a Workflow Run You can cancel the run of a workflow by using the Orchestrator REST API.
Chapter 2 Using the vCenter Orchestrator REST API Working with Tasks Using the Task service of the Orchestrator REST API, you can perform any operation that is related to managing tasks in Orchestrator. You can create a task for scheduling a workflow, modify the properties of an already existing task, delete a task, and so on. The maximum number of scheduled tasks supported by Orchestrator is 50. Create a Task You can create a task for scheduling a workflow by using the Orchestrator REST API.
Developing a Web Services Client for VMware vCenter Orchestrator Send Hello normal Modify a Task You can change the properties of an existing task by using the Orchestrator REST API. You can only add new scheduling properties to a task or change the values of the already existing properties.
Chapter 2 Using the vCenter Orchestrator REST API Procedure n To check the status of all currently available tasks, make a GET request at the URL of the Task service: GET https://{vcoHost}:{port}/vco/api/tasks/ The response body contains the definitions of the currently available tasks in Orchestrator. The state of every task is available in an attribute element, whose name is state. Respectively, the value for the element can be finished, pending, running and so on.
Developing a Web Services Client for VMware vCenter Orchestrator 2 To access objects that a plug-in exposes or the system objects in Orchestrator, make a GET request at the URL of the catalog entry point for the plug-in or at the URL where the system objects in Orchestrator reside. The response body of the request contains links to the types of objects that are exposed. 3 Make GET request at the URL of the type of object that you want to access.
Chapter 2 Using the vCenter Orchestrator REST API Example: Find the Send Hello Workflow You can browse the Orchestrator Inventory to find the Send Hello workflow.
Developing a Web Services Client for VMware vCenter Orchestrator Prerequisites The workflow binary content should be available as multi-part content. For details, see RFC-2387. Procedure 1 In a REST client application, add request headers to define the properties of the workflow that you want to import. 2 Make a POST request at the URL of the workflow objects: POST http://{vcoHost}:{port}/vco/api/workflows/ If the POST request is successful, you receive the status code 202.
Chapter 2 Using the vCenter Orchestrator REST API Export an Action You can export an action by using the Orchestrator REST API and download the action as a file. Procedure 1 2 In a REST client application, add a request header with the following values. n Name: accept n Value: application/zip Make a GET request at the URL of the action that you want to export: GET http://{vcoHost}:{port}/vco/api/actions/{actionID}/ If the GET request is successful, you receive the status code 200.
Developing a Web Services Client for VMware vCenter Orchestrator 6 (Optional) To import a package with the tags that it contains and overwrite existing tag values, use the tagImportMode parameter in the POST request: POST http://{vcoHost}:{port}/vco/api/packages/?tagImportMode=ImportAndOverwriteExistingValue If the POST request is successful, you receive the status code 202. Export a Package You can export a package by using the Orchestrator REST API and download the package as a file.
Chapter 2 Using the vCenter Orchestrator REST API 2 Make a POST request at the URL of the resource objects: POST http://{vcoHost}:{port}/vco/api/resources/ If the POST request is successful, you receive the status code 202. Export a Resource You can export a resource by using the Orchestrator REST API. Procedure 1 2 In a REST client application, add a request header with the following values.
Developing a Web Services Client for VMware vCenter Orchestrator If the GET request is successful, you receive the status code 200. The configuration element content is available in the response body. Deleting Orchestrator Objects The Orchestrator REST API provides Web services that you can use to delete workflows, actions, packages, resources, and configuration elements. Delete a Workflow You can delete a workflow by using the Orchestrator REST API.
Chapter 2 Using the vCenter Orchestrator REST API 2 Make a DELETE request at the URL of the package, and if you want to delete elements from the package, provide an option parameter at the end of the request: DELETE http://{vcoHost}:{port}/vco/api/packages/{package_name}/?option={parameter} Parameter Description deletePackage Only the package is deleted, while its content is retained. deletePackageWithContent The package and all its content is deleted.
Developing a Web Services Client for VMware vCenter Orchestrator REST API Permissions When you set permissions by using the Orchestrator REST API, you must use a set of characters to define the permissions. You can define the permissions for an element by including a sequence of characters in the tag of the request body of a POST request . The characters that you can use to set permissions through the Orchestrator REST API have specific meanings. Table 2‑1.
Chapter 2 Using the vCenter Orchestrator REST API Delete the Permissions of a Workflow You can delete the permissions of a workflow by using the Orchestrator REST API. You can delete the existing permissions of a workflow before you set new permissions.
Developing a Web Services Client for VMware vCenter Orchestrator Delete the Permissions of an Action You can delete the permissions of an action by using the Orchestrator REST API. You can delete the existing permissions of an action before you set new permissions.
Chapter 2 Using the vCenter Orchestrator REST API Delete the Permissions of a Package You can delete the permissions of a package by using the Orchestrator REST API. You can delete the existing permissions of a package before you set new permissions.
Developing a Web Services Client for VMware vCenter Orchestrator Delete the Permissions of a Resource You can delete the permissions of a resource by using the Orchestrator REST API. You can delete the existing permissions of a resource before you set new permissions.
Chapter 2 Using the vCenter Orchestrator REST API Delete the Permissions of a Configuration Element You can delete the permissions of a configuration element by using the Orchestrator REST API. You can delete the existing permissions of a configuration element before you set new permissions.
Developing a Web Services Client for VMware vCenter Orchestrator If the GET request is successful, you receive the status code 200. Import a Plug-In You can import a plug-in by using the Orchestrator REST API. Depending on the library of your REST client application, you can use a custom code that defines the properties of the plug-in. NOTE You cannot import a plug-in if a plug-in with the same name is already installed. Prerequisites The plug-in binary content should be available as multi-part content.
Chapter 2 Using the vCenter Orchestrator REST API 2 Make a PUT request at the URL of the plug-in that you want to enable or disable: PUT http://{vcoHost}:{port}/vco/api/plugins/{plug-in_name}/state/ If the PUT request is successful, you receive the status code 200. Performing Server Configuration Operations The Orchestrator REST API provides Web services that you can use to perform various operations related to the Orchestrator server configuration.
Developing a Web Services Client for VMware vCenter Orchestrator 2 3 Add another request header with the following values. n Name: accept n Value: */* Make a POST request at the URL of the server configuration: POST http://{vcoHost}:{port}/vco/api/server-configuration/ If the POST request is successful, you receive the status code 200.
Chapter 2 Using the vCenter Orchestrator REST API Procedure u Make a DELETE request to remove private or global tags.
Developing a Web Services Client for VMware vCenter Orchestrator List Tags by Users You can use the Orchestrator REST API to retrieve a list of tags created by a specific user. You can also retrieve global tags. Global tags are listed under the system user name __GLOBAL__. Procedure u Make a GET request at the URL of the user.
Chapter 2 Using the vCenter Orchestrator REST API If the DELETE request is successful, you receive the status code 200. VMware, Inc.
Developing a Web Services Client for VMware vCenter Orchestrator 52 VMware, Inc.
Writing a Client Application for the Orchestrator SOAP Service 3 Most applications that use the Orchestrator SOAP service have a common structure. To create a client application for the Orchestrator SOAP service, you must perform a standard sequence of tasks.
Developing a Web Services Client for VMware vCenter Orchestrator Figure 3‑1.
Chapter 3 Writing a Client Application for the Orchestrator SOAP Service Web Service Endpoint The Web service endpoint is the port upon which you connect a Web service client to the Orchestrator server. You connect to the Orchestrator Web service's endpoint at the following URL, in which orchestrator_server is the IP address or host name of the host on which the Orchestrator server is running.
Developing a Web Services Client for VMware vCenter Orchestrator Accessing the Server from Web Service Clients By default, Orchestrator permits access to workflows from Web service clients. However, the Orchestrator administrator can configure the server to deny connections from Web service clients. If the Orchestrator administrator has disabled access to the server from Web service clients, the server only answers Web service client calls from the echo() and echoWorkflow() methods, for testing purposes.
Chapter 3 Writing a Client Application for the Orchestrator SOAP Service 9 Find Workflows by Using the getWorkflowsWithName Operation on page 62 If you know the name of a particular workflow, as it is defined in the Orchestrator client, the Web service application can obtain this workflow using its name or part of its name.
Developing a Web Services Client for VMware vCenter Orchestrator You created a connection to the Orchestrator Web service, verified the connection, and established what technologies plug in to the Orchestrator server. What to do next Find objects in the Orchestrator server through the Web service connection. Find Objects in the Orchestrator Server To perform any useful task with a workflow, you must find the objects on which the workflow will run.
Chapter 3 Writing a Client Application for the Orchestrator SOAP Service } else { System.out.println("Found nothing"); } According to the query syntax defined by the vCenter Server plug-in, setting the query parameter to null returns the list of all of the objects of the type specified by the first parameter. The preceding code example performs the following tasks. 2 n Gets the list of any VC:VirtualMachine objects in the library.
Developing a Web Services Client for VMware vCenter Orchestrator Prerequisites You must have created a connection to the Orchestrator Web services endpoint in your Web service client application class. Procedure 1 Create a FinderResult object by calling the findForId operation on an object. finderResult = vsoWebControl.findForId("VC:VirtualMachine", "vcenter/vm-xx", username, password); In the preceding example, vcenter/vm-xx is the ID of a virtual machine object that the findForID operation finds.
Chapter 3 Writing a Client Application for the Orchestrator SOAP Service Procedure 1 Create an array of FinderResult objects by calling the findRelation operation on an object. FinderResult[] results = vsoWebControl.findRelation("VC:ComputeResource", "vcenter/domain-s114", "getResourcePool()", "username", "password"); The preceding example returns an array of FinderResult objects that match the following criteria. 2 n The parent element is of the type VC:ComputeResource.
Developing a Web Services Client for VMware vCenter Orchestrator n getWorkflowForID Find Workflows by Using the getAllWorkflows Operation The getAllWorkflows operation lists all workflows that a user can access as an array of Workflow objects. Because the getAllWorkflows operation returns Workflow objects that contain all the information about a workflow, it is useful for applications that require full information about workflows, such as the workflow's name, ID, description, parameters, and attributes.
Chapter 3 Writing a Client Application for the Orchestrator SOAP Service Procedure u Create an array of Workflow objects by calling the getWorkflowsWithName operation. Workflow[] workflows = vsoWebControl.getWorkflowsWithName("Simple user interaction", username, password); The preceding code example calls the getWorkflowsWithName operation to obtain all workflows for which the name, or part of the name, is Simple user interaction.
Developing a Web Services Client for VMware vCenter Orchestrator If the user has the right to run the workflow, hasRights returns true. Otherwise, hasRights returns false. 2 Set the workflow attributes in a WorkflowTokenAttribute object. The Web services client passes WorkflowTokenAttributes arrays to a WorkflowToken object, which runs the workflow. WorkflowTokenAttribute[] attributes = new WorkflowTokenAttribute[1]; WorkflowTokenAttribute attribute = new WorkflowTokenAttribute(); attribute.
Chapter 3 Writing a Client Application for the Orchestrator SOAP Service Procedure 1 Find running workflows by calling the getWorkflowTokenForId operation. Calling getWorkflowTokenForId obtains a WorkflowToken object, which contains all of the information about that specific workflow token. WorkflowToken onemoretoken = vsoWebControl.
Developing a Web Services Client for VMware vCenter Orchestrator attribute.setValue("123"); attributes[1] = attribute; vsoWebControl.answerWorkflowInput(token.getId(), attributes, username, password); } In the preceding example, if the workflow is in the waiting state, the application creates two WorkFlowTokenAttribute objects. The objects call the various WorkFlowTokenAttribute operations to obtain the attribute values.
Chapter 3 Writing a Client Application for the Orchestrator SOAP Service 3 Emit the workflow token's result attributes for display or for use by other applications. for (int ii = 0; ii < retAttributes.length; ii++) { System.out.println("\tName:'" + retAttributes[ii].getName() + "' - Type:'" + retAttributes[ii].getType() + "' - Value:'" + retAttributes[ii].getValue() } The preceding example code prints out the name, type, and value of the workflow token's result attributes.
Developing a Web Services Client for VMware vCenter Orchestrator 68 VMware, Inc.
Web Service API Object Reference 4 The Orchestrator Web service API provides a collection of objects that serve as WSDL complex types and a collection of methods that server as WSDL operations.
Developing a Web Services Client for VMware vCenter Orchestrator The objects searched for can also be identified by ID or by relation using the findForId and findRelation operations, as the following example shows. public FinderResult findForId(String type, String id, String username, String password); public FinderResult[] findRelation(String parentType, String parentId, String relation, String username, String password); NOTE FinderResult is not an Orchestrator scriptable object.
Chapter 4 Web Service API Object Reference Property Object A Property object represents a key-value pair that describes the properties of an item in the Orchestrator inventory. You can obtain a Property object by calling the getProperties operation on a FinderResult object, as the following example shows. Property[] props = finderResult.getProperties(); This example method call returns the contents of the FinderResult object's properties attribute.
Developing a Web Services Client for VMware vCenter Orchestrator Workflow Object A Workflow object represents an Orchestrator workflow that defines a certain sequence of tasks, decisions, and operations. Users with the correct permissions can obtain specific Workflow objects by name or by ID, or they can obtain all the workflows they have the permission to see. Orchestrator provides the following operations to obtain Workflow objects.
Chapter 4 Web Service API Object Reference Type Value Description WorkflowParameter[] outParameters The outParameters array is the set of WorkflowParameter objects that result from running a workflow. This array allows the workflow to send errors, the names of any created objects, and other information as output. You can set up arbitrary output parameters to generate any information that you need.
Developing a Web Services Client for VMware vCenter Orchestrator Type Value Description String id The identifier of this particular instance of a completed workflow. String title The title of this particular instance of a completed workflow. By default, the WorkflowToken title is the same as the Workflow title, although some operations do allow you to set a different WorkflowToken title when you start the workflow.
Chapter 4 Web Service API Object Reference Type Value Description String globalState The state of the workflow as a whole, with the following possible values: n running: the workflow is running n waiting: the workflow is waiting for runtime parameters, which can be provided by answerWorkflowInput waiting-signal: the workflow is waiting for an external event n n canceled: the workflow was canceled by a user or by an application n completed: the workflow has finished n failed: the workflow enco
Developing a Web Services Client for VMware vCenter Orchestrator Type Value Description String endDate Date and time that this workflow token ended, if the workflow token has finished. The endDate value is filled in at the moment the workflow reaches the end of its run. The endDate is only set when the workflow finishes in one of the completed, failed or canceled states. String xmlContent Defines input parameters, output parameters, attributes, and the content of error messages.
Chapter 4 Web Service API Object Reference You can also pass an array of WorkflowTokenAttribute objects to the answerWorkflowInput operation to provide input that a workflow token needs while it runs. public void answerWorkflowInput(String workflowTokenId, WorkflowTokenAttribute[] answerInputs, String username, String password); The following table shows the properties of the WorkflowTokenAttribute object.
Developing a Web Services Client for VMware vCenter Orchestrator 78 VMware, Inc.
Web Service API Operation Reference 5 The Orchestrator Web service API provides a collection of methods that server as WSDL operations. NOTE Every Web service operation, except echo, echoWorkflow, and sendCustomEvent uses the Orchestrator user name and password to authenticate the session. The operations throw exceptions if you use the incorrect username or password.
Developing a Web Services Client for VMware vCenter Orchestrator answerWorkflowInput Operation The answerWorkflowInput operation passes information from a user or an external application to a workflow while the workflow is running. If a running workflow reaches a stage that requires an input from a user action or external application, the WorkflowToken enters the waiting state until it receives the input from answerWorkflowInput.
Chapter 5 Web Service API Operation Reference Type Value Description String workflowTokenId The identifier of the running workflow to cancel String username Orchestrator user name String password Orchestrator password Return Value No return value. The cancelWorkflow operation returns an exception if you pass it an invalid parameter. echo Operation The echo operation tests the connection to the Web service by returning a String message. The echo operation is declared as follows.
Developing a Web Services Client for VMware vCenter Orchestrator The executeWorkflow operation is declared as follows.
Chapter 5 Web Service API Operation Reference Table 5‑1. Query Syntax of the Orchestrator Plug-Ins (Continued) Orchestrator Plug-In Query Parameter Syntax Query Behavior vCenter Server String or null Ignores the query string and returns all objects of the specified type. XML Not applicable Stores nothing in the inventory. When you develop plug-ins, you can define a query language to use find to search for named objects through the custom plug-in. This definition is not mandatory.
Developing a Web Services Client for VMware vCenter Orchestrator Type Value Description String type Type of object looked for. String id ID of the object looked for. String username Orchestrator user name. String password Orchestrator password. Return Value Returns a FinderResult object containing details of the object found. Returns null if you pass it an invalid parameter.
Chapter 5 Web Service API Operation Reference Table 5‑2. Standard Orchestrator Relation Types Plug-In Relation Names Relation Types Enumerations No relations No relations Jakarta Commons Net No relations No relations JDBC No relations No relations Library No relations No relations Mail No relations No relations Networking n n n n n n n SSH n n n n vCenter Server n n n n n n n n n n n n n n n n n n n n n n n n n n n n XML VMware, Inc.
Developing a Web Services Client for VMware vCenter Orchestrator The relation property can also reference relation types specified in each plug-in's vso.xml file. The following example is an excerpt from the networking plug-in vso.xml file. [...] [...
Chapter 5 Web Service API Operation Reference The getAllWorkflows operation is declared as follows. public Workflow[] getAllWorkflows(String username, String password); Type Value Description String username Orchestrator user name. String password Orchestrator password. Return Value Returns an array of Workflow objects. getWorkflowForId Operation The getWorkflowForId operation retrieves a workflow identified by its unique ID.
Developing a Web Services Client for VMware vCenter Orchestrator Return Value Returns a WorkflowInput object for a specific workflow input that corresponds to the provided workflow input ID. getWorkflowInputForWorkflowTokenId Operation The getWorkflowInputForWorkflowTokenId operation retrieves the answer to a user interaction for a workflowTokenId object. The getWorkflowInputForWorkflowTokenId operation is declared as follows.
Chapter 5 Web Service API Operation Reference Return Value Returns an array of Workflow objects that correspond to the provided name or name fragment. Workflows are returned in an array even if only one workflow is found. Returns null if you pass it an invalid parameter. getWorkflowTokenBusinessState Operation The getWorkflowTokenBusinessState operation retrieves the business state of a workflow token for a workflowTokenId object.
Developing a Web Services Client for VMware vCenter Orchestrator getWorkflowTokenResult Operation The getWorkflowTokenResult operation obtains the result of running a given workflow. You can view the results that a WorkflowToken object produces by calling getWorkflowTokenResult. The results of running a workflow are delivered as an array of WorkflowTokenAttribute objects that contain the output parameters that the workflow set during its run.
Chapter 5 Web Service API Operation Reference n completed: the workflow has finished n failed: the workflow encountered an error n suspended: the workflow run is paused The getWorkflowTokenStatus operation is declared as follows. public String[] getWorkflowTokenStatus(String[] workflowTokenID, String username, String password); Type Value Description Array of strings workflowTokenId List of workflow token IDs. String username Orchestrator user name. String password Orchestrator password.
Developing a Web Services Client for VMware vCenter Orchestrator Type Value Description String parentType Type of parent object. You can narrow the search by specifying the parent type, which limits the result to children related by the given relation to parents of a given parent type. This value can be null, in which case hasChildrenInRelation checks for child objects related by the specified relation type to all types of parent. String parentId ID of a particular parent object.
Chapter 5 Web Service API Operation Reference Type Value Description String workflowId The ID of the workflow for which you are checking a user's rights. String username Orchestrator user name. String password Orchestrator password. Int rights n a: The administrator can change the rights of the object. n c: The user can edit the workflow. n I: The user can inspect the workflow schema and scripting. n r: The user can view the workflow (but not the schema or scripting).
Developing a Web Services Client for VMware vCenter Orchestrator Type Value Description String eventName The eventName property is the name of the event that a workflow is waiting for before running. The eventName string you pass to sendCustomEvent must match the name of an Event object declared in the script, action or workflow that defines the custom event.
Chapter 5 Web Service API Operation Reference Type Value Description String password Orchestrator password. String attributes The format for the attributes parameter is a list of attributes separated by commas. Because commas are used as separators, attribute name strings containing commas are not processed correctly. Each attribute is represented by its name, type, and value, as shown in the following examples. Name1,Type1,Value1,Name2,Type2, Value2 Return Value Runs a workflow.
Developing a Web Services Client for VMware vCenter Orchestrator 96 VMware, Inc.
Index A F action delete permissions 42 deleting 38 download 35 export 35 get permissions 41, 42 import 34 retrieve permissions 41, 42 upload 34 answerWorkflowInput 64, 80 API documentation 14 audience 7 authentication LDAP 14 solution user name 13 vCenter Single Sign-On 12 vco solution user name 13 filters 33 find by ID 31 by type 31 objects 32 find objects 31 find operation 58 FinderResult 58–60, 69 findForId 83 findForId operation 58, 59 findRelation 58, 60, 84 C cancelWorkflow 64, 80 configuration e
Developing a Web Services Client for VMware vCenter Orchestrator M T ModuleInfo 70 taggaing, operations 48 tagging list tags 49 list filtered tags by users 50 list tag owners 49 list tagged objects by type 49 list tags by users 50 remove tags by users 50 tag 48 untag 48 task check state 30 create 29 modify 30 schedule workflow 29 state 30 O object, find 31 P package delete permissions 43 deleting 38 download 36 export 36 get permissions 42, 43 import 35 retrieve permissions 42, 43 upload 35 permission
Index executions 23 export 34 filter 15 find 15 get executions 23 get runs 23 get permissions 40, 41 import 33 interact 23 interact while running 23 retrieve permissions 40, 41 retrieving interactionsl 28 run 18, 19, 28 runs 23 upload 33 user interaction 24, 25 validate 19 validate and run 19 workflow ID 62 Workflow object 72 WorkflowParameter 73 WorkflowToken 73 WorkflowTokenAttribute 63 WorkFlowTokenAttribute 76 workflowTokenId 90 VMware, Inc.
Developing a Web Services Client for VMware vCenter Orchestrator 100 VMware, Inc.