- 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
07-31-2018 03:17 PM
I dont see any issue. Did you verify, for whichever record you dont see any response, do they really have any activity?
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
07-31-2018 11:09 PM
Hi Sanjiv,
Thanks alot for your quick response. Yes, I do have records for those incidents. This issue am observing is happening only for some Incidents and not for all. Unable to narrow down this situation, don't see any difference between those tickets (btwn details available via sys_history_line to not available via sys_history_line).
Do we have any other API Table to find the details of the work notes and comments entries. If so, please suggest.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2018 12:12 AM
You can also try sys_audit table
https://<instance>.service-now.com/sys_audit.do?JSONv2&sysparm_query=document_id=<sys_id>
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-01-2018 03:15 AM
Hi,
I am observing below issue/error while using sys_audit table. Do we need any specific role to be added other than list show below for the account to access.
As of now, roles assigned to the api access account are api_analytics_read, personalize_dictionary, rest_api_explorer, rest_service, snc_platform_rest_api_access, soap, web_service_admin.
Error while accessing the API:
{
"reason": null,
"error": "Insufficient rights to query records from the table: sys_audit"
}