7.1
Table Of Contents
- Developing a Web Services Client for VMware vRealize Orchestrator
- Contents
- Developing a Web Services Client for VMware vRealize Orchestrator
- Updated Information
- Developing a Web Services Client
- Using the vRealize 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
- Index
Prerequisites
Verify that you have imported the sample workows package in Orchestrator. The package is included in
the Orchestrator sample applications ZIP le that you can download from the Orchestrator documentation
page.
Procedure
1 Make a GET request at the URL of the task that you want to modify:
GET https://{orchestrator_host}:{port}/vco/api/tasks/{task ID}/
2 Check the properties of the task in the response body of the request.
3 To modify the task, make a POST request at the URL of the task by providing the new properties of the
task in a task-data element in the request body.
If the POST request is successful, the API reruns a status code 200 and the updated task in the response body.
Example: Update the Send Hello Example Task
You can update the start and the end dates of a task. You can modify the example task that is introduced in
“Create a Task,” on page 29. You must make a POST request at the URL of the task by providing the new start
and end dates in the request body:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<task-data xmlns="http://www.vmware.com/vco">
<recurrence-start-date>2012-02-01T14:00:00+02:00</recurrence-start-date>
<recurrence-end-date>2012-02-05T14:00:00+02:00</recurrence-end-date>
</task-data>
Check the State of a Task
You can check the state of the currently available tasks or check the state for all execution instancess of a
certain task.
Prerequisites
Verify that you have imported the sample workows package in Orchestrator. The package is included in
the Orchestrator sample applications ZIP le that you can download from the Orchestrator documentation
page.
Procedure
n
To check the status of all currently available tasks, make a GET request at the URL of the Task service:
GET https://{orchestrator_host}:{port}/vco/api/tasks/
The response body contains the denitions 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://{orchestrator_host}:{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.
Chapter 3 Using the vRealize Orchestrator REST API
VMware, Inc. 31