Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Using Table API how do I filter and fetch only the incidents that have been updated in the last 24 hours?

ds13
Giga Contributor

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?

1 REPLY 1

Sulabh Garg
Mega Sage

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

 

find_real_file.png

 

REST API EXPLORER SCREENSHOT

find_real_file.png

 

 

Please Mark Correct/helpful, if applicable, Thanks!! 

Regards

Sulabh Garg

Please Mark Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg