REST API - Date ("resolved_at" field) search

Ema5
Giga Contributor

Hello,

I'm trying to perform a search on Incident on a "resolved_at" field via REST API.

I understand how to query for specific parameters, such as:

/api/now/v1/table/incident?sysparm_query=resolved_at=ONLast15minutes

Unfortunately this code not works.

Does anyone have an idea on how to query for "resolved_at" field (with "ON Last 15 minutes" condition) on records via the REST API?

Thanks

1 ACCEPTED SOLUTION

snehabinani26
Tera Guru

Hi Ema,



Your query should be



'/api/now/v1/table/incident?sysparm_query=resolved_atONLast 15 minutes@javascript:gs.minutesAgoStart(15)@javascript:gs.minutesAgoEnd(0).



Hope this helps you


View solution in original post

6 REPLIES 6

snehabinani26
Tera Guru

If your question is answered , please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.


Ankur Bawiskar
Tera Patron

Hi Emo,



Can you mark my answer as correct and helpful if you were able to achieve your requirement. This helps in removing the question from unanswered list.


Thanks in advance.



Regards


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader