api reference guide - vmware · vmware® configurator web service api reference guide queryresult...
TRANSCRIPT
-
API Reference GuideVMware® Configurator Web Service 3.2
-
VMware, Inc.3401 Hillview Ave.Palo Alto, CA 94304www.vmware.com
2 VMware, Inc.
API Reference Guide
You can find the most up-to-date technical documentation on our 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:
© 2008 VMware, Inc. All rights reserved. Protected by one or more U.S. Patent Nos. 6,397,242, 6,496,847, 6,704,925, 6,711,672, 6,725,289, 6,735,601, 6,785,886, 6,789,156, 6,795,966, 6,880,022, 6,944,699, 6,961,806, 6,961,941, 7,069,413, 7,082,598, 7,089,377, 7,111,086, 7,111,145, 7,117,481, 7,149,843, 7,155,558, 7,222,221, 7,260,815, 7,260,820, 7,269,683, 7,275,136, 7,277,998, 7,277,999, 7,278,030, 7,281,102, 7,290,253, and 7,356,679; patents pending.
VMware, the VMware “boxes” logo and design, Virtual SMP and VMotion are registered trademarks or trademarks of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
API Reference GuideRevision: 20080714Item: EN-000085-00
http://www.vmware.com/support/http://www.vmware.com/supportmailto:[email protected]
-
VMware, Inc. 3
This document provides information about all data structures and actions available through the VMware Configurator Web Service API.
This document includes the following topics:
“Web Service Objects” on page 3
“Web Service Methods” on page 7
Web Service ObjectsThis section comprises the Web service objects in VMware Configurator.
VMware® Configurator Web Service API Reference Guide
-
API Reference Guide
4 VMware, Inc.
FinderResultThis object represents all of the items you can find in a chooser from all installed plug‐ins. These items can be virtual machine objects, ESX Server objects, or VMware Lifecycle Manager tokens. It is not a scriptable object.
The properties of FinderResult are read‐only and are defined by each plug‐in.
ModuleInfoThis object represents a plug‐in.
PropertyThis object represents a property used to store a key and its corresponding value.
Name Type Description
type String Type of object
id String ID of the object
properties Array of properties Set of properties for the object
dunesUri String String representation of the object
Name Type Description
moduleName String Plug‐in name
moduleVersion String Plug‐in version
moduleDescription String Plug‐in description
moduleDisplayName String Plug‐in display name
Name Type Description
name String Key
value String Value
-
VMware, Inc. 5
VMware® Configurator Web Service API Reference Guide
QueryResultThis object represents the results of a query.
WorkflowThis object represents a workflow.
WorkflowParameterThis object defines a workflow parameter (for example, an input, an output, or an attribute).
Name Type Description
totalCount Long Total result count
elements Array of FinderResult Array of results
Name Type Descriptions
id String Workflow ID
name String Workflow name
description String Workflow description
inParameters Array of WorkflowParameter List of workflow input parameters
outParameters Array of WorkflowParameter List of workflow output parameters
attributes Array of WorkflowParameter List of workflow attributes
Name Type Description
name String Parameter name
type String Parameter type
-
API Reference Guide
6 VMware, Inc.
WorkflowTokenThis object represents a workflow execution.
WorkflowTokenAttributeThis object represents a workflow execution output parameter.
Name Type Description
id String Workflow execution ID
title String Workflow execution name
workflowId String ID of the workflow that corresponds to this execution
currentItemName String Name of the current workflow activity
currentItemState String State of the current activity
globalState String State of the execution, with the following possible values:failedwaitingrunningcompletedcancelled
startDate String Date and time of the start of this execution
endDate String Date and time of the end of this execution, (if the execution is finished)
Name Type Value
name String Name of the outputParameter.
type String Type of outputParameter.
value String Value of outputParameter as a string representation. (It could be an array.)
-
VMware, Inc. 7
VMware® Configurator Web Service API Reference Guide
Web Service MethodsThe following is a list of all available methods. Every method, except echoWorkflow, uses the user name and password to authenticate the session.
answerWorkflowInputThis method is used to answer user interactions in a workflow.
Return Value
There is no return value.
cancelWorkflowThis method cancels the running of a workflow.
Return Value
There is no return value.
Name Type Description
wfTokenId String ID of a workflow execution that is waiting for user interaction
attributes Array ofWorkflowTokenAttribute
Workflow parameters that are set in the user interaction
username String
password String
Name Type Description
workflowTokenId String Workflow execution ID
username String
password String
-
API Reference Guide
8 VMware, Inc.
echoWorkflowThis method allows you to correctly check the serialization to test the connection to your Web service.
Return Value
Returns the workflow provided in parameter
executeWorkflowThis method starts a workflow.
Return Value
Returns the workflow execution.
findThis method is used to find elements that match the query. For example, you can query the LDAP for users whose last name starts with the letter C. The result is the total count but only the first 20 names are displayed.
Name Type Description
workflow Workflow Workflow
Name Type Description
workflowId String ID of the workflow to be executed.
username String
password String
attributes Array of WorkflowTokenAttribute
Array of input parameters
Name Type Description
type String Type of object on which the query is applied
query String Query
username String
password String
-
VMware, Inc. 9
VMware® Configurator Web Service API Reference Guide
Return Value
Returns the result of the query.
findForIdThis method returns a FinderResult based on the type and ID.
Return Value
Returns the resulting object.
findRelationIn an inventory, this method finds all the children elements that belong to an element. All of these relations are defined by each plug‐in.
Return Value
Returns a list of FinderResult.
Name Type Description
type String Type of the object
id String ID of the object
username String
password String
Name Type Description
parentType String Type of parent object (can be null)
parentId String ID of parent object (can be null)
relation String Relation name
username String
password String
-
API Reference Guide
10 VMware, Inc.
getAllPluginThis method returns the description of all registered and running plug‐ins.
Return Value
Returns a list of plug‐in descriptions.
getAllWorkflowsThis method finds all the available workflows.
Return Value
Returns a list of workflows.
getWorkflowForIdThis method retrieves the workflow identified by its unique ID.
Return Value
Returns a workflow that corresponds to the provided ID.
Name Type Description
username String
password String
Name Type Description
username String
password String
Name Type Description
workflowId String ID of the workflow to retrieve
username String
password String
-
VMware, Inc. 11
VMware® Configurator Web Service API Reference Guide
getWorkflowsWithNameThis method finds workflows by name.
Return Value
Returns a list of workflows that correspond to the provided name.
The value of workflowName can be a full name or wildcard (*), which returns all workflows. If you enter *Clone or Clone*, this returns all workflows that contain the word “Clone.”
getWorkflowTokenForIdThis method finds the workflow execution (WorkflowToken) identified by its unique ID.
Return Value
Returns a WorkflowToken that corresponds to the provided ID.
getWorkflowTokenResultThis method finds the output parameter for a given workflow execution.
Name Type Description
workflowName String Name of the workflows to find
username String
password String
Name Type Description
workflowTokenId String Workflow execution ID
username String
password String
Name Type Description
workflowTokenId String Workflow execution ID
username String
password String
-
API Reference Guide
12 VMware, Inc.
Return Value
Returns a list of output parameters.
getWorkflowTokenStatusThis method gets the globalStatus of multiple workflow executions.
Return Value
Returns a list of workflow execution status. The returned value is a string array of globalStatus of each workflow token in the same order as workflowTokenID.
hasChildrenInRelationThis method checks whether the given relation has children (for example, whether the virtual machine has a snapshot).
Return Value
Returns one of the following values:
1 = yes‐1 = No0 = Unknown
The Unknown value is helpful for a tree object view, because it avoids asking which children are in the tree.
Name Type Description
workflowTokenID Array of string List of workflow execution IDs
username String
password String
Name Type Description
parentType String Type of parent object (can be null)
parentId String ID of the parent object (can be null)
relation String Relation name
username String
password String
-
VMware, Inc. 13
VMware® Configurator Web Service API Reference Guide
hasRightsThis method checks whether a user has permissions to view, edit, and run workflows.
Return Value
Returns the following values:True, where the user has the specified rights on the workflow.False, where the user does not have the specified rights on the workflow.
sendCustomEventThis method is used to send a message that triggers an element that is waiting on this custom event. These elements can be a policy or a workflow activity that use the System.waitCustomEventUntil() function.
Return Value
There is no return value.
Name Type Description
workflowId String Workflow ID
username String
password String
rights Int ‘r’: The right to see the workflow.‘x’: The right to execute the workflow.‘c’: The right to edit the workflow.
Name Type Description
eventName String Name of the event
serializedProperties String List of additional properties in a string format
-
API Reference Guide
14 VMware, Inc.
simpleExecuteWorkflowThis method uses string attributes to start a workflow.
The string format for the attributes parameter is a list of attributes separated by commas. Each attribute is represented by its name, type, and value. For example, Name1, Type1, Value1, Name2, Type2, Value2, and so on.
Return Value
Runs a workflow.
Name Type Description
workflowId String ID of the Workflow to be executed
username String
password String
attributes String Workflow attributes in string format
API Reference GuideVMware® Configurator Web Service API Reference GuideWeb Service ObjectsFinderResultModuleInfoPropertyQueryResultWorkflowWorkflowParameterWorkflowTokenWorkflowTokenAttribute
Web Service MethodsanswerWorkflowInputcancelWorkflowechoWorkflowexecuteWorkflowfindfindForIdfindRelationgetAllPlugingetAllWorkflowsgetWorkflowForIdgetWorkflowsWithNamegetWorkflowTokenForIdgetWorkflowTokenResultgetWorkflowTokenStatushasChildrenInRelationhasRightssendCustomEventsimpleExecuteWorkflow