title: RestApi Design Pros/Cons
body: <p>Lets say i have a simple api</p>
  
  <p><code>api/users</code></p>
  
  <p>Wich returns an array of users, or an empty array is there is none.</p>
  
  <p>I want to be able to find users by id and name, so ive done some possible ways of doing that:</p>
  
  <p><code>api/users/1</code> or <code>api/users?id=1</code></p>
  
  <p>or by name</p>
  
  <p><code>api/users/john</code> or <code>api/users?name=John</code></p>
  
  <p>In this second case, searching by name, should i return a 404 or a empty array when john was not found ? Is this a good design pratice im taking ?</p>
  
  <p>Thanks !</p>