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.

REST API to fetch incident updated in last 5 min

Priyanshu
Giga Expert

Hello all,

can anyone help me with the script of rest API to fetch the list of incident updated in last 5 min.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Community Alums
Not applicable
10 REPLIES 10

Community Alums
Not applicable

Here you go.

 

https://INSTANCENAME.service-now.com/api/now/table/incident?sysparm_query=sys_updated_onRELATIVELE%40minute%40ago%405

 

You can copy encoded query from the list view of incident as well

find_real_file.png

 

Please mark this comment as correct answer if it helped you.

Cheers,

Hardit Singh

Please tell me what you have selected in the operator while putting the condition. I am getting around all the incident. but actually it should be returning only one. as i have updated only one incident in the last five min.

 

Thanks

Community Alums
Not applicable

find_real_file.png

Community Alums
Not applicable

Copy the query and then go to REST API Explorer and paste the query and use incident table

 

find_real_file.png