I'm creating a REST API which can handle a dynamic set of filters (send as queryparams). In some cases the client wants to have a combination of filter applicable for a collection list. This could be nested and combined with AND/OR.
I wonder if there is any standard or opensource language definition for these statements which is specialised for use as URL query-parameters.
Looking at Google I've decided to do it like this:
By default, multiple queryparams are logical ANDed together. Any bundled values are considered OR. e.g.
GET /users?filter=field1:value1,value2,value2&filter=fieldFoo=bar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With