Using Table API how do I filter and fetch only the incidents that have been updated in the last 24 hours?
This content was last updated in 2022. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2022 02:40 AM
I want to filter incidents from the incidents using the Table API that have been updated for a certain duration on time.
I understand that the 'sys_updated_on' field would be used but how can I apply the filter on that field?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2022 03:00 AM
Hello
you can copy the filter from Incident list view, Like as shown below and copy the filter from the filter menu.
e.g: "sys_updated_onBETWEENjavascript:gs.dateGenerate('2022-01-10','00:00:00')@javascript:gs.dateGenerate('2022-01-11','23:59:59')"
And mention the same copied filter on the "sysparm_query" under REST API explorer, Screenshot as shown below
REST API EXPLORER SCREENSHOT
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg