7.1

Table Of Contents
"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 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
Verify that you have a valid HTTP bearer token that matches your login credentials. See Chapter 2
REST API Authentication.
n
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.
n
Syntax for Getting Work Item Details
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
You can specify a JSON file 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 file that contains all the parameters required to approve the request and complete the work
item.
n
Syntax for Approving a Submitted Machine Request
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 file, and call that JSON file from the command line. Use a template to correctly format the
JSON file content.
Programming Guide
VMware, Inc. 57