Is it possible to know the HTTP response code and body for an inbound request via syslog_transaction

Nisar3
Giga Guru

When an inbound request comes into ServiceNow (custom API), I know we can track that transaction via the syslog_transaction table. It does detail a lot of data but I was wondering using that record, would it be possible to find out the response and http status code that was sent out from this?

 

Nisar3_0-1755666710225.png


Assume the custom scripted rest resource cannot be modified/updated to put those details somewhere

1 ACCEPTED SOLUTION

@Nisar3 

No other way other than checking that system table

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Bhuvan
Kilo Patron
Join Chuck as he answers a community question about how to add logging to your scripted REST APIs to get insight in to who is using them and how. Episode topics include: * Debugging REST API queries * Accessing the parts of the request * Logging the headers and parameters The REST Logger Update ...

Ankur Bawiskar
Tera Patron
Tera Patron

@Nisar3 

if you are using Scripted REST API you have the full control on the HTTP Status code and message.

If you are talking about OOTB Table API or Import Set API then if this info is stored in that table then only you can get the details.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Nisar3 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

if you are using Scripted REST API you have the full control on the HTTP Status code and message.

It's custom API but due to reasons beyond my control, I cannot make changes to existing current source code and hence wanted to know if there is an OOB way to finding out the HTTP response code.