- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 12-04-2018 10:52 AM
Steps to Debug REST API Inbound Calls in Service Now:
1. Make sure the property “glide.rest.debug” is set to true under sys_properties table.
2. Get the REST request URL and the user_id of the user with which the REST call is coming to instance.
3. Log onto instance and navigate to the Transactions under System Logs.
Search for the user_id in created by field and REST request URL in URL field (eg. for REST URL - https://******.service-now.com/api/now/table/incident look for "/api/now/table/incident" in the URL field of transaction logs)
4. Note the Ticket created time for the ticket you are facing issue and open that particular transaction log from transactions above.
5. Note the value of System ID (node name) and Session ID fields of the identified transaction.
If you don’t find system ID, configure Form layout and add the field on the form.
6. Navigate to the stats page to find the node you are logged in. (Check 2nd line on the page which says - Connected to cluster node and note the node name) https://*******.service-now.com/stats.do
7. If Cluster node and System ID are same from 5 and 6 steps above:
- Then, it’s easy to debug.
- Open Node Log File Browser under System Logs and copy Session ID and Change Start time and End time to ticket creation time approximately.
- You will see the Incoming Request Body here with the clear incoming request.
8. If Cluster node and System ID are different from 5 and 6 steps above:
- Then, Go to Node Log File Download under System Logs and download localhost log for the day when the request was made to the instance.
9) Once you download the correct logs from STEP 8, open with Windows Word pad Application and do a "search" on the log file using the Session ID identified in Step 5
10) The Session logs which will be obtained from the filtered logs in step 9 will have the Request body in the logs which is sent to Service Now.
- 51,014 Views

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Anusha,
This is a good source. Thank for typing this out step by step.
Follow-up question:
Have you thought of any way to capture/insert the Inbound REST transaction immediately into a custom table when it gets invoked... rather than going to the Node log File or Browser to search for transactions which is a significant effort to debug integrations.
Thanks!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Kartik,
Thanks!
Actually, No I didn't write any script to capture them in a table. As the table "Node Log File Browser" is a huge one, i didn't think of writing anything from this table to the custom table.
In our case, there are more inputs coming from external source to Service Now. So, I don't want the performance to be degraded to get that item into a custom table.
Thanks,
Anusha.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Anusha,
Thanks for the sharing, If we want to capture the REST logs into a custom table, how can we do.? Please help me with the steps.
Thanks & Regards,
Kiran.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I'd like to know too.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Is Syslog transaction table can be used to see the Body of Incoming Json request??
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I am not seeing the session ID in the downloaded localhost_log file for the day. Any idea why?
Thx
Terry
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Terry, I followed the steps above and it appears to me that the download is also for the node that you're on. What I did was tried to log on using an incognito browser mode and hopefully land on the right node.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I followed these steps above and am able to see the headers and request body json for my REST call (inbound). Before I repeat these steps in my production instance, is there document about possible performance impact about enabling debugging output on rest web services calls?
thanks
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi all,
I have created this guide to give you a firm grasp on how to integrate with ServiceNow both inbound and outbound. In addition, also included on how security works using rest-api.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
sharing this live demo that I have created that gives you best practices in integrating with Outbound REST-API. Implementing reusable, maintainable and reliable code. Using object oriented programming, SOLID design patterns, Service Oriented architecture, and global logging.
How to Call Third Party REST API Integrations in ServiceNow Using GlideAjax & Script Includes