Filtering record set
GET WEBAPIROOT/entitysName?$filter=propertyName eq 'searched Value'
Not null
Find entities where a given property is not null:
GET WEBAPIROOT/entitysName?$filter=propertyName ne null
date values
Date literals are given in the yyyy-mm-dd
format:
GET WEBAPIROOT/clients?$filter=birthday='1990-08-28'
Guids
Guids are filtered without quoting them.
GET WEBAPIROOT/tq84_entity?$filter=_account_id eq 3E49EA6C-09C5-B791-4989-B35752938F9A
If using quotes…
GET WEBAPIROOT/tq84_entity?$filter=_account_id eq '3E49EA6C-09C5-B791-4989-B35752938F9A'
… then the error message is A binary operator with incompatible types was detected. Found operand types 'Edm.Guid' and 'Edm.String' for operator kind 'Equal'.
TOP-N queries
With $top=n
, its possible to specify to return the first n
records only:
GET WEBAPIROOT/tq84_entity?$top=10