Using Query Functions: Retrieve records modified within last few hours
Query Functions are intended to be used to compose a query. These functions can be used in a manner similar to the standard library functions,
The following example shows how to use the “LastXHours” to return all account entities modified in the past 12 hours.
var req = new XMLHttpRequest(); req.open("GET", Xrm.Page.context.getClientUrl() +/api/data/v8.1/accounts?$select=name,accountnumber&$filter=Microsoft.Dynamics.CRM.LastXHours(PropertyName=@p1,PropertyValue=@p2)&@p1='modifiedon'&@p2=12
For complete list of query functions please follow the link Query functions.