You are on page 1of 5

Case REST API Hands on Lab In this lab, we will explore the CASE REST APIs.

We will use an existing solution such as the Credit Card Disputes or the Abyss Spill Claims. You will have a choice of either using Firefox poster addon or the RestClient thick client application to send the REST requests to the server. The lab instructions below use 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 Firefox poster plugin. Type the following URL in the URL http://acmlab1:9080/CaseManager/CASEREST/v1/solutions Operation GET On the Windows image, launch Firefox. Poster can be found under Tools->Poster. Fill in the URLs to poster as follows

Click on Get. Poster will send the Http Request and the response will be presented in a new dialog

To do a pretty view of the JSON that was returned, you need to save the JSON response to a file and then open the file in firefox. Open Notepad, copy the JSON response to Notepad and save the file to Desktop->Saved JSON>Solutions.json. The file needs to be saved as a .json extension. Then open this file in Firefox, and the JSONView addon will display the JSON in a pretty format.

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. URL http://acmlab1:9080/CaseManager/CASEREST/v1/solution/Credit Card Disputes HOL/casetypes?TargetObjectStore=CMTOS Operation GET JSON Response: {"CaseTypes":[{"CaseType":"CCD2_ManageDispute","Description":"Process for handling disputed transactions","DisplayName":"Manage Dispute"}]} Lab 3: Get a list of adhoc tasks URL http://acmlab1:9080/CaseManager/CASEREST/v1/casetype/CCD2_ManageDisp ute/discretionarytasktypes?TargetObjectStore=CMTOS Operation GET JSON Response: {"DiscretionaryTaskTypes": [{"TaskName":"CCD2_CreateReviewRequest","TaskDisplayName":"Create Review Request","Description":"Request a review of case material","TaskClassId":"{50BA00CB-46F2-4573-89BE-158AE739DA84}"}]} Lab 4: Get a list of task instances URL http://acmlab1:9080/CaseManager/CASEREST/v1/case/C94A3DBD-585D-4F539FBF-5BC86E3576B0/tasks?TargetObjectStore=CMTOS&Grouping=ROD Operation GET JSON Response: {"Optional":[{"TaskId":"{0B87CF47-AF4F-429C-B4FF7376D72C4A58}","TaskName":"Generate Correspondence","RequiredState":0,"DisabledState":0,"LaunchMode":0,"DateCre

ated":"2010-11-11T22:15:01Z","TaskState":3,"DateLastModified":"2010-1111T22:15:01Z"}],"Required":[{"TaskId":"{79A44AE4-FDEB-465A-8107274A2D997932}","TaskName":"Review Dispute Item","RequiredState":1,"DateStarted":"2010-1111T22:15:01Z","DisabledState":0,"LaunchMode":1,"DateCreated":"2010-1111T22:15:01Z","TaskState":4,"DateLastModified":"2010-11-11T22:15:01Z"}]} Lab 5: Get a list of comments for a case URL http://acmlab1:9080/CaseManager/CASEREST/v1/case/8B15BE2C-08A7-43209981-4E0A91B8F63D/comments? TargetObjectStore=CMTOS&CommentType=Case Operation GET JSON Response: {"Comments":[]} Lab 6: Add a comment to a case URL http://acmlab1:9080/CaseManager/CASEREST/v1/case/8B15BE2C-08A7-43209981-4E0A91B8F63D/comments?TargetObjectStore=CMTOS Operation POST JSON Data for POST { "CommentType":"case", "CommentContext": 102, "CommentText": "This is a test" }

Lab 7: Repeat step 5 and see if the comments list now returns the recently added comment

You might also like