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
Example: Find the Send Hello Workflow
You can browse the Orchestrator Inventory to find the Send Hello workflow.
1 Make a GET request at the URL of the Inventory service:
GET https://localhost:8281/vco/api/inventory/
2 Make a GET request at the URL where the system objects in Orchestrator reside:
GET https://localhost:8281/vco/api/inventory/System/
3 Make GET request at the URL where all workflows in Orchestrator reside:
GET https://localhost:8281/vco/api/inventory/System/Workflows/
4 Make a GET request at the URL of the Samples workflow category:
GET https://localhost:8281/vco/api/inventory/System/Workflows/Samples/
5 Use the down link for the Hello World workflow category where to locate the Send Hello workflow.
Apply Filters
The services of the Orchestrator REST API support additional URL parameters that allow you to narrow the
objects that HTTP requests to the API return.
Different query parameters are supported for every URL to a resource that you can access through the REST
API. To learn which query parameters are applicable to a URL, see the vCenter Orchestrator REST API
reference documentation.
Procedure
u
To narrow the results from a request at a certain URL, apply filters at the end of the URL:
URL?filter_1& filter_2&filter_3&....&filter_N. Every filter contains query parameters that are valid for the
relevant URL. For information about the valid query parameters for every URL, see the Orchestrator
REST API reference documentation.
Example: Filter Workflows
If you look for workflows that contain a specific word in their name, for example datastore, you can apply
the following filter in a request to the Catalog Service:
GET https://localhost:8281/vco/api/catalog/System/Workflow?conditions=name~datastore
To limit the amount of the workflows that are returned to a certain number, for example five, apply an
additional filter to the request:
GET https://localhost:8281/vco/api/catalog/System/Workflow?conditions=name~datastore&maxResult=5
Importing and Exporting Orchestrator Objects
The Orchestrator REST API provides Web services that you can use to import and export workflows,
actions, packages, resources, and configuration elements.
Import a Workflow
You can import a workflow by using the Orchestrator REST API.
Depending on the library of your REST client application, you can use custom code that defines the
properties of the workflow.
Chapter 2 Using the vCenter Orchestrator REST API
VMware, Inc. 33