title: How to implement complex queries with a REST api?
body: <p>I'm building an EmberJS app using ember-data.</p>
  
  <p>Some of the functionality in my app requires quite complex queries.</p>
  
  <p>As an example, let's say I have three entities - students, teachers and classes. If I wanted to get a list of all the students born before 1993 that are taking classes taught by teacher X, how can I do that with a RESTful api? In plain SQL it's easy enough, but I'm unsure of the best practice for implementing this into my API.</p>
  
  <p>Do I need to build a custom endpoint alongside my basic REST api?</p>
  
  <p>So I'd still have:</p>
  
  <pre><code>GET /students (which returns all the students)
  GET /students/{id} (which returns a specific student)
  etc
  </code></pre>
  
  <p>But then implement the following for my 'custom' query:</p>
  
  <pre><code>GET /students/custom/born_before/{date}/taught_by/{teacher_id}
  </code></pre>
  
  <p>Or is there a more standardized way of doing this?</p>