7.2

Table Of Contents
},
"requestData": {
$detailsOfSubmittedRequest
},
"retriesRemaining": 3,
"requestedItemName": "Linux",
"requestedItemDescription": "Linux blueprint for API demo",
"stateName": "Successful",
"approvalStatus": "POST_APPROVED",
"executionStatus": "STOPPED",
"waitingStatus": "NOT_WAITING",
"phase": "SUCCESSFUL",
"catalogItemRef": {
"id": "7c8275d6-1bd6-452a-97c4-d6c053e4baa4",
"label": "Linux"
}
}
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 qualications:
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 qualied domain name of the vRealize Automation instance are
available.
n
Verify that you have a valid HTTP bearer token that matches your login credentials. See Chapter 2,
“REST API Authentication,” on page 9.
n
Syntax for Listing Work Items on page 51
You can use the vRealize Automation REST API workitem service to list the unique IDs of all available
work items.
n
Syntax for Geing Work Item Details on page 57
You can use the vRealize Automation REST API workitem service to display the details of a pending
work item. You need these details to submit a completion request.
n
Syntax for Constructing a JSON File to Approve a Machine Request on page 62
You can specify a JSON le in your vRealize Automation REST API command line input. For example,
when you enter a command to approve a machine request, you can include the name of a JSON le
that contains all the parameters required to approve the request and complete the work item.
n
Syntax for Approving a Submied Machine Request on page 65
You can approve a work item request to complete the request by using the vRealize Automation REST
API. To construct the approval command, you add work item and work item form details to a JSON
le, and call that JSON le from the command line. Use a template to correctly format the JSON le
content.
Programming Guide
50 VMware, Inc.