- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2018 08:33 PM
Hi All,
Problem here is, am unable to see records for the sys_history_line table while using in REST API. For some incidents it shows records and for some it is not showing any records.
Request URL: https://<instance>.service-now.com/sys_history_line.do?JSONv2&sysparm_query=set.id=<sys_id>
Method: GET & Status code: 200 Ok
Response:
{
"records": [
]
}
Any help for the above problem is much appreciated. Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2019 02:27 AM
Hi Sanjiv,
Thank you so much for your help. Got a fix for the issue to access the historical ticket data especially to get Work Notes updated time, Ticket assigned time, Ticket On-hold time, Ticket Resume time.
Service-Now Table: sys_audit_list
sysparm query: documentkey (value is the sys id of the INC ticket)
SAMPLE API:
https://<INSTANCE>.service-now.com/sys_audit_list.do?JSONv2&sysparm_query=documentkey=<SYS ID OF THE TICKET>";
NOTE:
ADMIN ACCESS ALONG WITH THE UI ACCESS IS MANDATORY TO ACCESS THE ABOVE TABLE.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2018 09:47 AM
Ok...Only admin and report_admin have access to this table. Can you provide report_admin access to that user and try for testing
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2018 12:46 AM
Hi Sanjiv,
Have got the report_admin access to the users, however still having the same problem while accessing sys_audit table.
Am observing one weird activity while using sys_history_line, please do let me know why this is happening.
When I load sys_history_line Api in browser, it returns empty. Even after multiple retry attempts its still empty. (tried even cache cleared and so on)
{
"records": [
]
}
However, when I open the INC Ticket (INC ID for the respective SYS ID used in sys_history_line) in ServiceNow UI and retry the sys_history_line API. It loads data as expected. Not sure how, it happens for all empty records cases.
Attached is the screenshot.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2018 09:24 AM
Are those records pretty old? Because sys_history_line keeps rotating.
Check the table rotation table and you will see multiple tables for sys_history_line. Because it keeps archiving data every 7 days.
You may have to run the api on those tables as well
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018 10:13 AM
Please mark this thread closed my marking an answer correct if it resolved your issue
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2018 08:47 AM
I have requested the admin team to provide me the table details to explore more on this. I didnt get your last point, will you be able to explain in detail please.
What exactly I need to do to fix this issue?