B Improvements in Real Time Event Creation APIs

This appendix provides sample responses for the following API services.

Logging Improvements in Real Time Event Creation APIs

The following services are supported under Real time Event Creation API:
  • Create Event (saveEvents)
  • Create Event and Promote to Case (saveEventsAndPromoteToCase)
  • Create Event and Extend to Existing Case (saveEventsAndExtendToCase)
Major changes performed in the above services are listed below:
  • In case of any failure in the API, 500 HTTP status code is returned instead of 200.
  • A message is also returned in the API response to indicate the cause of failure. The response message structure for failure messages is the same as earlier for the services below:
    saveEvents
    {
    "MESSAGE": "Event Code already exists.",
    "STATUS": "FAILED"
    }
    saveEventsAndPromoteToCase
    {
    "message": "Event Code already exists.",
    "status": "FAILED"
    }
    saveEventsAndExtendToCase
    {
    "message": "Event Code already exists.",
    "status": "FAILED"
    }
  • Known success and failure messages returned in the responses have multi-locale support. Other exceptions like Error connecting database or particular JSON attribute not found are still in English. The status in the response will still be in English. A detailed list of messages which are translatable is mentioned in the document ahead.
  • For multi-locale support, when the APIs are called from the ECM application, the user's respective locale will be used, and the message will be shown in that language. For calls made from third-party clients like Postman or via token, en_US will be the locale used.
  • There are no more system outs in the APIs.
  • The Exception stack trace is now logged via Logger.
  • In case of any error or exceptions, detailed debug logging is also done.
  • At important API method calls and code lines, debug loggers are added. These loggers will not only help in debugging any issues quicker but will also serve as a tool to find out any performance bottlenecks.
  • Logging is done in the UMMService.log file.