- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 02:27 AM
Hi, I am new to service now API, Please help me to get the history of incident information in api. I have incident sys_Id. based on this data how do I get history of all the changes. I tried in sys_audit table but information is not available.
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 08:01 PM
Go to the particular record you want to see the history right click on form header -> History -> List
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 08:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 09:01 PM
Thanks Raju. I want to get the same information in REST API, Please help me to get the history of information in REST API.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 09:45 PM
Hi Sarvanan,
Re: How to get the incident history using REST API
The history is found in the sys_history_line table - where the id of the record in sys_history_line matches the sys_id of the TASK table - so in your use case the incident sys_id.
Along the lines of:
curl "https://instance_name.service-now.com/api/now/table/sys_history_line?sysparm_query=id=adee6624138903..." --request GET --header "Accept:application/json" --user 'admin':'admin'
returns:
{"result":[{"new":"(3)","set":{"link":"https://instance_name.service-now.com/api/now/table/sys_history_set/4dd4a04513950700125ad8228144b0da","value":"4dd4a04513950700125ad8228144b0da"},"old":"","user_name":"System Administrator","sys_mod_count":"","update":"0","label":"Review status","sys_updated_on":"","type":"","audit_sysid":"0","relation":"","sys_id":"01d4a04513950700125ad8228144b0dd","update_time":"2017-09-17 10:47:06","sys_updated_by":"","field":"review_status","user_id":"admin","sys_created_on":"2017-09-17 10:47:10","old_value":"","internal_checkpoint":"0","user":
...
If the reply was informational, please like, mark as helpful or mark as correct!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 09:43 PM