title: Should return empty list [] 200/204 or 404 in a Restful API design?
body: <p>For example, there's a restful API <code>GET http://luexu.com/users/{page}</code> to list the users in Nth page. Suppose there're 20 users in each page. There're 100 users total in the database. <code>GET http://luexu.com/users/5</code> returns the 80th to 100th users.</p>
  
  <p>So how about query <code>GET http://luexu.com/users/10</code>? it's out of the total users. Which is a better design to return an empty list, empty array <code>[]</code> or <code>404</code>?</p>
  
  <p>200?</p>
  
  <pre><code>{
      "code": 200,
      "msg": "OK",
      "data": []
  }
  </code></pre>
  
  <p>or 204?</p>
  
  <pre><code>{
      "code": 204,
      "msg": "OK",
      "data": []
  }
  </code></pre>
  
  <p>or 404?</p>
  
  <pre><code>{
      "code": 404,
      "msg": "Not Found",
      "data": null
  }
  </code></pre>