Upload
sandeepklk
View
256
Download
3
Embed Size (px)
Citation preview
7/31/2019 Case Rest API Hol
1/5
Case REST API Hands on Lab
In this lab, we will explore the CASE REST APIs. We will use an existing solutionsuch as the Credit Card Disputes or the Abyss Spill Claims. You will have achoice of either using Firefox poster addon or the RestClient thick client
application to send the REST requests to the server. The lab instructions belowuse Poster but you can use RESTClient thick client application as well.
Lab 1: Get a list of deployed solutions
Get a list of deployed solutions from IBM Case Manager. We will use Firefoxposter plugin. Type the following URL in the
URLhttp://acmlab1:9080/CaseManager/CASEREST/v1/solutionsOperation
GETOn the Windows image, launch Firefox. Poster can be found underTools->Poster. Fill in the URLs to poster as follows
Click on Get. Poster will send the Http Request and the response will bepresented in a new dialog
http://acmlab1:9080/CaseManager/CASEREST/v1/solutionshttp://acmlab1:9080/CaseManager/CASEREST/v1/solutions7/31/2019 Case Rest API Hol
2/5
To do a pretty view of the JSON that was returned, you need to save the JSONresponse to a file and then open the file in firefox. Open Notepad, copy the JSONresponse to Notepad and save the file to Desktop->Saved JSON->Solutions.json. The file needs to be saved as a .json extension. Then open thisfile in Firefox, and the JSONView addon will display the JSON in a pretty format.
7/31/2019 Case Rest API Hol
3/5
Lab 2: Get a list of case types for a deployed solution.
You will need to provide the solution name from the JSON
response from the previous request. The solution name used
below is Credit Card Disputes.
URLhttp://acmlab1:9080/CaseManager/CASEREST/v1/solution/CreditCard DisputesHOL/casetypes?TargetObjectStore=CMTOS
OperationGET
JSON Response:{"CaseTypes":[{"CaseType":"CCD2_ManageDispute","Description":"Process for
handling disputed transactions","DisplayName":"Manage Dispute"}]}
Lab 3: Get a list of adhoc tasks
URLhttp://acmlab1:9080/CaseManager/CASEREST/v1/casetype/CCD2_ManageDispute/discretionarytasktypes?TargetObjectStore=CMTOS
OperationGET
JSON Response:{"DiscretionaryTaskTypes":[{"TaskName":"CCD2_CreateReviewRequest","TaskDisplayName":"CreateReview Request","Description":"Request a review of casematerial","TaskClassId":"{50BA00CB-46F2-4573-89BE-158AE739DA84}"}]}
Lab 4: Get a list of task instances
URLhttp://acmlab1:9080/CaseManager/CASEREST/v1/case/C94A3DBD-585D-4F53-9FBF-5BC86E3576B0/tasks?TargetObjectStore=CMTOS&Grouping=ROD
OperationGET
JSON Response:{"Optional":[{"TaskId":"{0B87CF47-AF4F-429C-B4FF-7376D72C4A58}","TaskName":"GenerateCorrespondence","RequiredState":0,"DisabledState":0,"LaunchMode":0,"DateCre
http://acmlab1:9080/CaseManager/CASEREST/v1/solution/Credithttp://acmlab1:9080/CaseManager/CASEREST/v1/solution/Credithttp://acmlab1:9080/CaseManager/CASEREST/v1/case/C94A3DBD-585D-4F53-9FBF-5BC86E3576B0/tasks?TargetObjectStore=CMTOS&Grouping=RODhttp://acmlab1:9080/CaseManager/CASEREST/v1/case/C94A3DBD-585D-4F53-9FBF-5BC86E3576B0/tasks?TargetObjectStore=CMTOS&Grouping=RODhttp://acmlab1:9080/CaseManager/CASEREST/v1/solution/Credithttp://acmlab1:9080/CaseManager/CASEREST/v1/case/C94A3DBD-585D-4F53-9FBF-5BC86E3576B0/tasks?TargetObjectStore=CMTOS&Grouping=RODhttp://acmlab1:9080/CaseManager/CASEREST/v1/case/C94A3DBD-585D-4F53-9FBF-5BC86E3576B0/tasks?TargetObjectStore=CMTOS&Grouping=ROD7/31/2019 Case Rest API Hol
4/5
ated":"2010-11-11T22:15:01Z","TaskState":3,"DateLastModified":"2010-11-11T22:15:01Z"}],"Required":[{"TaskId":"{79A44AE4-FDEB-465A-8107-274A2D997932}","TaskName":"Review DisputeItem","RequiredState":1,"DateStarted":"2010-11-11T22:15:01Z","DisabledState":0,"LaunchMode":1,"DateCreated":"2010-11-
11T22:15:01Z","TaskState":4,"DateLastModified":"2010-11-11T22:15:01Z"}]}
Lab 5: Get a list of comments for a case
URLhttp://acmlab1:9080/CaseManager/CASEREST/v1/case/8B15BE2C-08A7-4320-9981-4E0A91B8F63D/comments?TargetObjectStore=CMTOS&CommentType=Case
Operation
GET
JSON Response:{"Comments":[]}
Lab 6: Add a comment to a caseURLhttp://acmlab1:9080/CaseManager/CASEREST/v1/case/8B15BE2C-08A7-4320-9981-4E0A91B8F63D/comments?TargetObjectStore=CMTOS
OperationPOST
JSON Data for POST{
"CommentType":"case","CommentContext": 102,"CommentText": "This is a test"
}
http://acmlab1:9080/CaseManager/CASEREST/v1/case/8B15BE2C-08A7-4320-9981-4E0A91B8F63D/comments?TargetObjectStore=CMTOS&CommentType=Casehttp://acmlab1:9080/CaseManager/CASEREST/v1/case/8B15BE2C-08A7-4320-9981-4E0A91B8F63D/comments?TargetObjectStore=CMTOS&CommentType=Casehttp://acmlab1:9080/CaseManager/CASEREST/v1/case/8B15BE2C-08A7-4320-9981-4E0A91B8F63D/comments?TargetObjectStore=CMTOS&CommentType=Casehttp://acmlab1:9080/CaseManager/CASEREST/v1/case/8B15BE2C-08A7-4320-9981-4E0A91B8F63D/comments?TargetObjectStore=CMTOS&CommentType=Casehttp://acmlab1:9080/CaseManager/CASEREST/v1/case/8B15BE2C-08A7-4320-9981-4E0A91B8F63D/comments?TargetObjectStore=CMTOS&CommentType=Casehttp://acmlab1:9080/CaseManager/CASEREST/v1/case/8B15BE2C-08A7-4320-9981-4E0A91B8F63D/comments?TargetObjectStore=CMTOS&CommentType=Case7/31/2019 Case Rest API Hol
5/5
Lab 7: Repeat step 5 and see if the comments list now returns the recently added
comment