Reputation: 4766
I can see in the Basic Tutorial section of the odata website that you can perfom a contains search using a filter
GET serviceRoot/Airports?$filter=contains(Location/Address, 'San Francisco')
The API I am using refused this when I tried to use it. The API I am accessing is OData 2.0.
So I wanted to know if OData 2.0 supports the contains
filter but couldn't find a list anywhere documenting the filters you could use e.g. startsWith, endsWith, contains
Upvotes: 0
Views: 7606
Reputation: 4766
My research led me to the only answer I could find which was to use substringof
instead of contains
. This is the end of the url call from the actual API I am working on. This results in searching for Items filtered by Description containing "69":
/logistics/Items?$filter=substringof('69',%20Description)%20eq%20true
Upvotes: 2