Question
Last activity: 16 Dec 2020 22:58 EST
Connect REST - Request/Response Logging
Is there any Out of the Box feature to log Requests/Responses in "Connect REST"?
Need to use these Requests/Responses details for reporting purposes.
Hi Mohan,
REST Services are okay. I want to handle REST connectors.
Thanks,
Sameera.


Pegasystems Inc.
AU
If you implement your Connect-REST Request and Response Data Transforms using JSON Data Transforms, the raw JSON used for the request and response is available on the clipboard before the transformation in and out of the Data class instance is done, so you could intercept it and persist it for reporting if necessary.
If you've not seen JSON Data Transforms in use yet, configure a REST Data Source from App Studio and review the rules that are generated. This will show the JSON Data Transform's involvement in working with the raw JSON to map the response, but the reverse also works for requests.
Hi Braam,
Capturing the Response in JSON format is fine. My doubt is whether there is any OOTB feature to save them in a Data Table likewise.
So that I do not have to create a customized approach to save Request/ Response/ Response Time etc. to a separate Data table and use it for reporting.
Thanks,
Sameera.


Pegasystems Inc.
AU
I'm not aware of any such table. The use case for why the raw JSON needs to be persisted will be site-specific and therefore needs custom design and build.
I would challenge whether Pega is the right component of your Solution Architecture to be implementing this requirement. In other words, what is the business value to the Pega applications of capturing and reporting on this information?
Yes Braam, I also did some R&D to find whether Pega has such feature. But could not find any.
This is a Business requirement to get an idea on how much "Connect REST API" calls are performed to various APIs. Because we have couple of different APIs involved.
Anyhow, before building the "data type like" approach just wanted to check whether Pega has this feature already.
Thanks a lot for the time Braam!
Regards,
Sameera.
Hi,
you can get the details of request and response from the service package rule in view invocation history.
Regards,
Mohan