7.2

Table Of Contents
Property Description
version Displays the object version number.
assignees Displays the list of work item assignees.
subTenantId Optionally associates the work item with a specic business group granting users with
management responsibilities over that business group permission to see the approval.
tenantId Species the tenant ID for the work item.
callbackEntityId Species the callback entity ID for the work item.
work itemType Species the work item type for the work item.
completedDate Species the date when the work item was completed.
assignedDate Species the date when the work item was assigned.
createdDate Species the created date of this instance.
assignedOrCompletedDate Species the date to be displayed on UI.
formUrl Species the URL from which the layout for this work item can be retrieved.
serviceId Species the service ID that generated this work item instance.
work itemRequest Species the corresponding work item request object.
status Species the status of the work item.
completedBy Species the principal ID of user who completed the work item.
availableActions Contains a list of relevant work item actions.
Metadata Species the paging-related data:
n
Size: Species the maximum number of rows per page.
n
totalElement: Species the number of rows returned.
n
totalPages: Species the total number of pages of data available.
n
Number: Species the current page number.
n
Oset: Species the number of rows skipped.
Example: Example: curl Command
Approve a submied machine request by specifying its work item ID and using a JSON le 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 submied 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.}
Programming Guide
66 VMware, Inc.