Store/Save inbound REST calls into a custom transaction log table instead of going through the Node Logs

Kartik Gopal
Tera Contributor

Is there a way to capture/insert the Inbound REST transaction immediately into a custom table when it gets invoked...

I would rather have everything in one table to look at and report, than going to the Node log File or Browser to search for transactions which is a significant effort to debug integrations.

 

Let me know if any thoughts or existing solutions or if there is something already available that I am missing.

 

Thanks in advance for the help. 

7 REPLIES 7

ARG645
Tera Guru

If you created a Scripted Rest Api, then I am assuming you will have a Scripted Rest Resource[GET/POST etc] associated with it. You can log them in the Scripted Rest Resource. 

gs.log(new JSON().encode(requestData));

instead of using native gs.log statements, you can create a custom table and use your scripting magic to update that table with the necessary information. Almost everything is achievable using scripts.

Kartik Gopal
Tera Contributor

Scripted APIs and Outbound calls this would work.

I just thought there would be a generic 1 shot way of grabbing inbound payloads even for Table APIs and other inbound APIs for seeing the transactions.

Looks like a dead end for me. And I am not looking to modify OOTB operations.

At some point I will work in a gliderecord insert for my Outbound scripts and scripted APIs. 

 

Thanks all for your responses!