6.2

Table Of Contents
Example: curl Command
The following example command retrieves the necessary details for the specified work item.
curl --insecure -H "Content-Type: application/json"
-H "Authorization: Bearer $token
https://$host/workitem-service/api/workitems/5e3e9519-78ea-4409-a52c-e4aa3bc56511
Example: JSON Output
The following JSON output is returned based on the command input.
To view the contents of a JSON output file, for example workItemDetails.json, use the ! command
with more in UNIX or type in Windows.
n
(UNIX) vcac-shell>! more workItemDetails.json
n
(Windows) vcac-shell> ! CMD /C type workItemDetails.json
vcac-shell> ! more workItemDetails.json
{
"id" : "5e3e9519-78ea-4409-a52c-e4aa3bc56511",
"version" : 0,
"workItemNumber" : 8,
"assignees" : [ {
"principalId" : "tony@example.mycompany.com",
"principalType" : "USER"
} ],
"subTenantId" : "eab762cb-6e75-4379-83ef-171a71c9f00e",
"tenantId" : "MYCOMPANY",
"callbackEntityId" : "069dc3ce-a260-4d6a-b191-683141c994c0",
"workItemType" : {
"id" : "com.mycompany.csp.core.approval.workitem.request",
"name" : "Approval",
"pluralizedName" : "Approvals",
"description" : "",
"serviceTypeId" : "com.mycompany.csp.core.cafe.approvals",
"actions" : [ {
"id" : "com.mycompany.csp.core.approval.action.approve",
"name" : "Approve",
"stateName" : "Approved",
"icon" : {
"id" : "c192b6a7-5b35-4a3b-8593-107ffcf8c3a8",
"name" : "approved.png",
"contentType" : "image/png",
"image" : null
}
}, {
"id" : "com.mycompany.csp.core.approval.action.reject",
"name" : "Reject",
"stateName" : "Rejected",
"icon" : {
"id" : "61c6da67-1164-421d-b575-10a245c89e10",
Programming Guide
VMware, Inc. 100