5.5.1
Table Of Contents
- Developing a Web Services Client for VMware vCenter Orchestrator
- Contents
- Developing Web Services Client for VMware vCenter Orchestrator
- Developing a Web Services Client
- Using the vCenter Orchestrator REST API
- Authenticating Against Orchestrator and Third-Party Systems
- Accessing the Reference Documentation for the Orchestrator REST API
- Using the Java REST SDK
- Operations with Workflows
- Working with Tasks
- Finding Objects in the Orchestrator Inventory
- Importing and Exporting Orchestrator Objects
- Deleting Orchestrator Objects
- Setting Permissions on Orchestrator Objects
- REST API Permissions
- Retrieve the Permissions of a Workflow
- Delete the Permissions of a Workflow
- Set the Permissions for a Workflow
- Retrieve the Permissions of an Action
- Delete the Permissions of an Action
- Set the Permissions for an Action
- Retrieve the Permissions of a Package
- Delete the Permissions of a Package
- Set the Permissions for a Package
- Retrieve the Permissions of a Resource
- Delete the Permissions of a Resource
- Set the Permissions for a Resource
- Retrieve the Permissions of a Configuration Element
- Delete the Permissions of a Configuration Element
- Set the Permissions for a Configuration Element
- Performing Operations with Plug-Ins
- Performing Server Configuration Operations
- Performing Tagging Operations
- Writing a Client Application for the Orchestrator SOAP Service
- Process for Creating an Orchestrator Web Service Client Application
- Web Service Endpoint
- Generating the Orchestrator Web Service Stubs
- Accessing the Server from Web Service Clients
- Create a Web Service Client
- Connect to the Orchestrator Web Service
- Find Objects in the Orchestrator Server
- Find Objects by Using the find Operation
- Find Objects by Using the findForId Operation
- Find Objects by Using the findRelation Operation
- Find Workflows in the Orchestrator Server
- Find Workflows by Using the getAllWorkflows Operation
- Retrieve the ID of a Workflow
- Find Workflows by Using the getWorkflowsWithName Operation
- Find Workflows by Using the getWorkflowForID Operation
- Run Workflows from a Web Service Client
- Interact with a Workflow While it Runs
- Obtain Workflow Results
- Time Zones and Running Workflows Through Web Services
- Web Service Application Examples
- Web Service API Object Reference
- Web Service API Operation Reference
- answerWorkflowInput Operation
- cancelWorkflow Operation
- echo Operation
- echoWorkflow Operation
- executeWorkflow Operation
- find Operation
- findForId Operation
- findRelation Operation
- getAllPlugins Operation
- getAllWorkflows Operation
- getWorkflowForId Operation
- getWorkflowInputForId Operation
- getWorkflowInputForWorkflowTokenId Operation
- getWorkflowsWithName Operation
- getWorkflowTokenBusinessState Operation
- getWorkflowTokenForId Operation
- getWorkflowTokenResult Operation
- getWorkflowTokenStatus Operation
- hasChildrenInRelation Operation
- hasRights Operation
- sendCustomEvent Operation
- simpleExecuteWorkflow Operation
- Index
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. The syntax of the query parameter is entirely
dependent on the query language that the plug-in implements. To avoid defining a query language, make
find return all objects, as in the case of the VMware Infrastructure plug-ins.
The size of the array of objects that the QueryResult returns depends on the definition of the plug-in through
which you make the query. For the queries you make through the standard Orchestrator plug-ins, the array
contains an unlimited number of FinderResult objects. Developers of third-party plug-ins, however, can set
a limit on the number of results that the query returns. If the value of totalCount exceeds the number of
objects in the array of FinderResult objects, the array does not include all of the objects found in the queried
inventory. The totalCount property does report the total number of FinderResult objects found. The
totalCount property can be negative, which signifies that the plug-in cannot determine how many
corresponding objects are in the plug-in.
Type Value Description
String
type
Type of object looked for.
String
query
The query.
The query is a string enclosed in
quotation marks. Any object of the
type specified by the type parameter
with a name that matches the query
string is returned in the QueryResult
object.
String
username
Orchestrator user name.
String
password
Orchestrator password.
Return Value
Returns the result of the query as a QueryResult object.
If find fails to match an object, QueryResult.getTotalCount returns 0 and QueryResult.getElement returns
null.
If the server does not recognize the object type or plug-in searched for, find throws an exception. The find
operation also returns an exception if you pass it an invalid parameter.
findForId Operation
The findForId operation searches for a specific FinderResult object according to that FinderResult object's
type and id properties.
You can use the findForId operation to acquire information about FinderResult objects you have already
found by using the other find* operations. For example, you can use the findForId method to obtain the
state of a FinderResult object you found by using the find operation.
The findForId operation is declared as the following example shows.
public FinderResult findForId(String type, String id, String username,
String password);
Chapter 5 Web Service API Operation Reference
VMware, Inc. 83