7.1

Table Of Contents
Procedure
1 Retrieve the denition of the workow for which you want to create a task by making a GET request at
the URL of the workow:
GET https://{orchestrator_host}:{port}/vco/api/workflows/{workflowID}/
In the workow denition you can view the name and the ID of the workow, as well as its input
parameters.
2 To create a new task for the workow, make a POST request at the URL of the Task service:
POST https://{orchestrator_host}:{port}/vco/api/tasks/
3 In the request body, provide the parameters for the new task in a task element.
If the request is successful, the API responds with status code 202 and an empty response body.
Example: Create a Task for the Send Hello Workflow
You can create a task that schedules the Send Hello workow to run on the fteenth minute of every hour
starting from a specic date.
1 Make a GET request at the URL of the Send Hello workow to retrieve its denition:
GET https://localhost:
8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/
2 Make a POST request at the URL of the Task service by providing the parameters of the new task in the
request body:
POST https://localhost:8281/vco/api/tasks/
<task xmlns="http://www.vmware.com/vco">
<name>Send Hello Task</name>
<recurrence-cycle>every-hours</recurrence-cycle>
<recurrence-start-date>2012-01-31T11:00:00+00:00</recurrence-start-date>
<recurrence-end-date>2012-02-05T11:00:00+00:00</recurrence-end-date>
<recurrence-pattern>15:15</recurrence-pattern>
<input-parameters>
<parameter name="name" type="string">
<string>John Smith</string>
</parameter>
</input-parameters>
<workflow href="https://localhost:
8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/">
<name>Send Hello</name>
</workflow>
<start-mode>normal</start-mode>
</task>
Modify a Task
You can change the properties of an existing task by using the Orchestrator REST API.
You can only add new scheduling properties to a task or change the values of the already existing
properties. If you want to replace the scheduling properties of a task, you must delete the task and create a
new one.
Developing a Web Services Client for VMware vRealize Orchestrator
30 VMware, Inc.