Debugging web services in ServiceNow

venkata_koya
ServiceNow Employee
ServiceNow Employee

During development of integrations, it is frustrating to see your web service request is failing for reasons unknown. You would like to see what is going under wraps to get better idea of whats going on. ServiceNow provides different flavors of web services (inbound, outbound)(REST,SOAP).

How do we know what is going on with my request. how are headers coming through. what is the request body like and what are responses generated.

Are there any limitations

14 REPLIES 14

dalton1
Giga Expert

Hi Venkata Koya,



Please see below link for instructions on debugging REST services:



https://developer.servicenow.com/app.do#!/document/content/app_store_doc_rest_integrate_fuji_r_Debug...



I have already set the property tot true. However, I cannot seem to find the   logs. Have tried running the REST service though the explorer and through script but to no avail. Do you have any updates on this?


venkata_koya
ServiceNow Employee
ServiceNow Employee

In case of inbound REST API, there is glide property called glide.rest.debug. Setting it to True will start logging more details about REST transactions.


Where can i see these logs: All these debug logs are written to system log. These are different from transaction logs or db logs. As admin, ou can view system logs in instance using Log file Downloader, Log file browser.


Screen Shot 2015-08-20 at 8.59.21 PM.JPG


Hi Venkata Koya



This is for Inbound REST. How about the Outbound REST? Is it included in the debug logs? I have browsed already the Node Loge File Browser and cannot find any related info about my rest service. Kindly help..


venkata_koya
ServiceNow Employee
ServiceNow Employee

Hi,


On Fuji instance, there is a different debug property available.


Debug property for Outbound REST : glide.rest.outbound.debug


Debug property for Outbound HTTP : glide.http.log_debug


Enabling this property and using RESTMessageV2 API - ServiceNow Wiki, will log more details about outbound request. Also, there are couple more properties which can be enabled to log details about outbound HTTP communication


Similar to other debug logs, these are also found in system logs



If you are on older instances, unfortunately there isn't much of logging available