Can I include multiple "where" clauses (or an AND operator) in an endpoint query string? I'd like to do something like this:
http://localhost:5000/regions?where=name=="El Salvador"&where=lang=="es"
I've tried few different syntaxes, but I can't get it to work.
Is this possible? I know I can do it using MongoDB syntax, but I would like to use Python syntax.
Note: I'm not trying to concatenate an list of parameteres using python, I'm trying to use Eve's filtering feature using native python syntax.
Have you tried http://localhost:5000/regions?where=name=="El Salvador"%20and%20lang=="es"
?
You can replace %20
for space
in the URL
if it doesn't work. In my postman environment works both ways.
Seems to work like the AND
you want. The documentation mentions it, but it misses an example I think. Mind the correct position for double quotes.
EDIT:
For boolean values, to filter _deleted
is False
, for example, the query format would be http://localhost:5000/regions?where=name=="El Salvador" and not _deleted