title: How to express advanced expressions between query parameters in a REST API?
body: <p>The problem (or missing feature) is the lack of expression possibility between different query parameters. As I see it you can only specify <code>and</code> between parameters, but how do you solve it if you want to have <code>not equal</code>, <code>or</code> or <code>xor</code>?</p>
  
  <p>I would like to be able to express things like:</p>
  
  <p><em>All users with age 20 or the name Bosse</em></p>
  
  <blockquote>
    <p>/users?age=22|name=Bosse</p>
  </blockquote>
  
  <p><em>All users except David and Lennart</em></p>
  
  <blockquote>
    <p>/users?name!=David&amp;name!=Lennart</p>
  </blockquote>
  
  <p>My first idea is to use a query parameter called _filter and take a String with my expression like this:</p>
  
  <p><em>All users with with age 22 or a name that is not Bosse</em></p>
  
  <blockquote>
    <p>/users?_filter=age eq 22 or name neq Bosse</p>
  </blockquote>
  
  <p>What is the best solution for this problem?</p>
  
  <p>I am writing my API with Java and Jersey, so if there is any special solution for Jersey, let me know.</p>