6.2

Table Of Contents
b Substitute the input variables in the template with the values you obtained for your specific work
item ID, for example 5e3e9519-78ea-4409-a52c-e4aa3bc56511.
c Save the file with a new name, for example, approve.json.
4 Approve the submitted machine request by specifying the work item ID and including the JSON file as
part of the command line.
curl --insecure -H "Content-Type: application/json"
-H "Authorization: Bearer $token"
https://$host/workitem-service/api/workitems/5e3e9519-78ea-4409-
a52c-e4aa3bc56511/actions/com.mycompany.csp.core.approval.action.approve
--d @approve.json
If the command is successful, the HTTP status is 201 Created. If the command is not successful, the
HTTP status is 204 No Content.
Syntax for Listing Work Items
You can use the vRealize Automation REST API workitem service to list the unique IDs of all available
work items.
Inputs
Use the supported input parameters to control the command output.
Parameter Description
URL https://$host/workitem-service/api/workitems
$host Specifies the host name and fully qualified domain name or IP address of the
vRealize Automation identity server.
$token Specifies a valid HTTP bearer token with necessary credentials.
Output
The command output contains property names and values based on the command input parameters.
Property Description
Links Specifies an array of link objects, each of which contains the following parts:
n
rel
Specifies the name of the link.
n
Self refers to the object that was returned or requested.
n
First, Previous, Next, and Last refer to corresponding pages of pageable lists.
n
Specifies the application or service that determines the other names.
n
href
Specifies the URL that produces the result.
work itemNumber Displays a reference number for the work item.
id Specifies the unique identifier of this resource.
Programming Guide
VMware, Inc. 92