6.2

Table Of Contents
},
"retriesRemaining" : 3,
"phase" : "SUCCESSFUL",
"executionStatus" : "STOPPED",
"waitingStatus" : "NOT_WAITING",
"approvalStatus" : "POST_APPROVED",
"catalogItemRef" : {
"id" : "6cca9fd9-83b7-4f5d-8884-fb8a005fc656",
"label" : "EC2 Blueprint"
}
}
Approve a Machine Request
You can use a sequence of REST API workitem service commands to approve a machine request.
Prerequisites
n
Log in to vRealize Automation as an approver with at least one of the following qualifications:
n
You are designated as an approver in an approval policy.
n
You belong to a group which has been designated as an approval group in an approval policy.
n
You are designated as a delegate for someone who is an approver.
n
Verify that the host name and fully qualified domain name of the vRealize Automation instance are
available.
n
If you are not using the API Explorer, verify that you have a valid HTTP bearer token that matches
your login credentials. See Chapter 2 REST API Authentication.
Procedure
1 List all available work item IDs.
curl --insecure -H "Content-Type: application/json"
-H "Authorization: Bearer $token
https://$host/workitem-service/api/workitems
2 Get details for a specific work item ID.
For example, get the details for work item 5e3e9519-78ea-4409-a52c-e4aa3bc56511.
curl --insecure -H "Content-Type: application/json"
-H "Authorization: Bearer $token
https://$host/workitem-service/api/workitems/5e3e9519-78ea-4409-a52c-e4aa3bc56511
3 Construct a JSON file that contains the work item ID information that you need to approve a machine
request.
a Copy the appropriate JSON input file template to a new file in an XML editor that maintains
formatting.
Programming Guide
VMware, Inc. 91