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
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.
n
To check the status of all executions of a certain task, make a GET request at the URL where the task
executions reside:
GET https://{vcoHost}:{port}/vco/api/tasks/{taskID}/executions/
You receive a list of the available executions for the task in the response body. The state of every
execution is available in the state element of the task execution object.
Finding Objects in the Orchestrator Inventory
You can find any object in the Orchestrator inventory by using the Catalog or the Inventory services. You
can access only a certain subset of objects by applying filter parameters at the end of the URLs where you
make HTTP requets.
You can use the Catalog service to find objects in the Orchestrator inventory that are of a certain type, or
retrieve a specific object by its type and ID. For example, you can retrieve all objects that are of type
workflow or action, or can retrieve a specific workflow or action.
The Inventory service allows you to browse the Orchestrator inventory by parent-child relations. Using the
Inventory service, you can access objects that are available at a specific location in the Orchestrator
inventory. For example, you can retrieve all workflows for Datacenter management by browsing to their
location in the Orchestrator inventory, that is Library/vCenter/Datacenter.
Every service from the Orchestrator REST API supports filter parameters that you can add at the end of
URLs when making HTTP requests. Using the filter parameters, you can narrow the results that you receive
in the response body of a request at a specific URL.
Find Objects by Type and ID
You can use the Catalog service of the REST API to find objects in Orchestrator by type and ID.
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.
Procedure
1 Make a GET request at the URL of the Catalog Service:
GET https://{vcoHost}:{port}/vco/api/catalog/
The response body of the request contains down links to the catalog entry points of the plug-ins that
expose inventories in Orchestrator as well as to the system objects in Orchestrator:
n
https://{vcoHost}:{port}/vco/api/catalog/{plug-in namespace}/
n
https://{vcoHost}:{port}/vco/api/catalog/System/
Chapter 2 Using the vCenter Orchestrator REST API
VMware, Inc. 31