Co-Author: Saisaran Yaratapalli
Introduction
A new version (v2) of the Case REST APIs has been introduced, offering comprehensive tools for managing cases and activities within the product. This version brings significant enhancements, making it easier and more efficient to interact with case-related data.
The APIs adhere to the OPEN API standard, which ensures that they are well-documented, consistent, and easy to integrate with various systems and applications. Users can leverage these APIs for a range of operations, from creating and updating cases to managing activities associated with those cases.
To facilitate seamless interaction, these APIs can be executed directly from the Swagger UI. Swagger UI provides a visually intuitive interface where users can explore API functionalities, test endpoints, and see detailed documentation. This makes it an invaluable tool for developers and administrators who need to understand and utilise the APIs effectively.
Access Case Swagger URL
To access the Swagger UI for the Case REST APIs, navigate to the following URL, replacing <host> and <port> with your specific server details: https://<host>:<port>/case/explorer. This will open the Swagger UI, where you can start exploring and using the new version of the Case REST APIs immediately.
The list of APIs available till BAW 24.0.0 release are :
System:
-- /system/login: Obtain IBM BAW CSRF prevention token
Solutions :
-- /solutions: Lists all solutions that are deployed
-- /solution/{solutionAcronym}/associatedobjectstores: returns list of object stores associated with the case solution
-- /solution/{solutionAcronym}/upgradeSolution: Upgrades the solution to the current version if the solution is at previous supported version
Deployment :
-- /solution/{solutionAcronym}/deploymentstatus - gives deployment status for a given case solution
-- /solution/importManifest - one can import security and audit manifest
-- /solution/{solutionAcronym}/applyManifest - apply the existing manifest file for a given solution
-- /solution/import - Imports the case solution [Only legacy Solutions]
Case:
-- /casetype/{caseTypeName}/properties : returns the list of properties that are associated for a given case type
-- /case : we can create a case instance by executing this api
Case Stages :
-- /case/{caseId}/stages/retrieveAllStages - returns all stages that are associated to given case instance
-- /case/{caseId}/stages/retrieveCurrentStage - returns the current stage information for a given case instance
-- /case/{caseId}/stages/completeCurrentStage - this is an action which completes the current stage
-- /case/{caseId}/stages/restartPreviousStage - this an action which restarts the previous stage
-- /case/{caseId}/stages/placeCurrentStageOnHold - this an action which put on hold for current stage
-- /case/{caseId}/stages/releaseCurrentOnHoldStage - this an action which releases the currentstage from hold
Below are simple examples on how to leverage the API's:
To execute any API, you first need to generate a BAW CSRF token using the login API. To do this, navigate to the System section and expand it to find the login option. Then, click on "Try it out" to activate the execute button
Click on execute and the response will have the token generated
To retrieve details of all deployed solutions, execute the List of Solutions API. The only required input for this is the BPM CSRF token
The API response is in JSON format and includes details about the solutions, such as the solution name, prefix, target object store, solution folder ID, PE connection point, and integration type
The information obtained in the response can be used as input for another API. To retrieve objectstore details specific to a solution, you need to provide the BPM CSRF token and the solution prefix as inputs
Response is json format of Object stores details of that solution
A user can create a case instance from the Swagger UI. To do this, you need to know the properties associated with the case type, which can be obtained using the Fetch Properties API
Once the case instance is created, the response JSON will include details such as the Case Identifier, Case Title, and Case Folder ID.
Using Case Folder ID, and Target Object Store (OS) as inputs, the user can then progress the case further
------------------------------
Manojna Chilukuri
------------------------------