EspoCRM provides a REST API that sadly has only incomplete documentation. Especially the filters that can be used with a GET request are not documented:
where- (array) filters;
From using Firebug I've discovered that a filter consists of three query parameters:
where[0][field]=somefieldwhere[0][type]=somoperatorwhere[0][value]=somevalue
Example, filter on name=Foo:
?where[0][field]=name&where[0][type]=equals&where[0][value]=Foo
The meaning of equals is not documented, as are the possible filter types.
Now I want to filter a collection on a datetime field modifiedAt. I have no idea what the proper values for type and value would be to find all entities that have been modified after a given datetime.
How can the EspoCRM REST API be used for this?
After playing around with the EspoCRM web GUI, I was able to make a search that uses the filter I need. The query parameters are:
where[0][type]=afterwhere[0][field]=modifiedAtwhere[0][value]=2016-06-01 16:12:00where[0][dateTime]=truewhere[0][timeZone]=Europe%2FBerlin