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

Pedro Lopez
Kilo Guru

Hi Kartik,

You have these tables where you can track all the transactions:

 

syslog_transaction
ecc_queue

 

Or just create logs and use the System Log table.

 

Hope this helps,

Pedro Lopez

Abhinay Erra
Giga Sage

Yes you can create a custom table and create a script include to do the gliderecord insert with the request, response payloads and status code as parameters passed to that script include. You can then call that script include in scripts where you are triggering the outbound calls or put it in a scripted api for inbound calls

Yes. But how can that logic be used for inbound calls when I am using a standard end point like:

https://XYZ.service-now.com/api/now/table/incident
or
https://XYZ.service-now.com/api/sn_sc/servicecatalog/items/{sys_id}/order_now

https://XYZ.service-now.com/api/now/table/incident-- this is a table api and we do not have control on the request and response going out. You will not be able to capture these table api requests.

https://XYZ.service-now.com/api/sn_sc/servicecatalog/items/{sys_id}/order_now

This is a scripted rest api. Navigate to scripted rest api in your instance s and look for service catalog api. Once you open that record, you will see Buy Item method and you can add the logic of inserting a record in to a tracking table in the script section