Is there a way to know who use a Scripted REST API ?

lucap_
Mega Sage

Hi, I've created a Scripted REST API beacause of a user need to get some records from a table.
I whould like to know if there is a way to know when this user use the Scripted REST API resource (GET). I saw the sys_api_stats table, but I whould like to know if there is something more specific, like a staging table for the incoming SOAP messages.

Best regards

Luca

1 ACCEPTED SOLUTION

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

Yes, you can go to Transaction Log and see there each transaction, like in screenshot below:



Screen Shot 2017-03-29 at 10.18.10 AM.png


View solution in original post

8 REPLIES 8

rohit331
Tera Expert

Hi.


First change the method Get to Post.


To retrieve data from third party system You have to use request.body.data.


Rest you can coding for validation.


Thanks


Thanks for you reply rohit33,


but I need a GET, because of I need a third party system to get those informations.


bernyalvarado
Mega Sage

Hi Luca,



If you're looking to "log" more information about your transaction you could perhaps keep your own "rest calls log" and store the information that's relevant for you. Just keep in mind to also write a routine that archives the log after X amount of days. You can do that archive routine within a scheduled job.



Thanks,


Berny


rohit331
Tera Expert

If you not change Get method to any other method then you can't write any code. So for Inbound integration you can use post or put method.