7.0

Table Of Contents
Property Description
availableActions Contains a list of relevant work item actions.
Metadata Specifies the paging-related data:
n
Size: Specifies the maximum number of rows per page.
n
totalElement: Specifies the number of rows returned.
n
totalPages: Specifies the total number of pages of data available.
n
Number: Specifies the current page number.
n
Offset: Specifies the number of rows skipped.
Example: Example: curl Command
Approve a submitted machine request by specifying its work item ID and using a JSON file named
approve.json to pass arguments to 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
Error Conditions
If the same request is submitted a second time, the following error response is received:
Command failed [Rest Error]: {Status code: 400}, {Error code: 12005} ,
{Error Source: null}, {Error Msg: Work item 5e3e9519-78ea-4409-a52c-e4aa3bc56511
is in COMPLETED state. Requested operation cannot be performed.}, {System Msg:
Work item 5e3e9519-78ea-4409-a52c-e4aa3bc56511 is in COMPLETED state. Requested
operation cannot be performed.}
If a user who is not authorized to approve the request submits the request, the following error response is
received:
Command failed [Rest Error]: {Status code: 400}, {Error code: 12017} ,
{Error Source: null}, {Error Msg: User fritz@example.mycompany.com not authorized to
complete work item with ID 5e3e9519-78ea-4409-a52c-e4aa3bc56511.}, {System Msg:
User fritz@example.mycompany.com not authorized to complete Work item with id
5e3e9519-78ea-4409-a52c-e4aa3bc56511.}
List Provisioned Resources
You can use the REST API catalog service to log in to vRealize Automation and display a full or filtered
list of your provisioned resources .
Prerequisites
n
Log in to vRealize Automation as a business group manager.
Programming Guide
VMware, Inc. 72