title: Some general restful api design questions
body: <p>A few general design questions:</p>
  
  <ol>
  <li>Give the example here:</li>
  </ol>
  
  <p><a href="https://developers.google.com/+/api/latest/activities/list#nextPageToken" rel="nofollow noreferrer">https://developers.google.com/+/api/latest/activities/list#nextPageToken</a></p>
  
  <p>Why would the server return a token to retreive the next paginated result? Doesn't this break the idea of being stateless?</p>
  
  <p>Why not just pass a MySQL like LIMIT name=value as the parameters? The server now has to return the number of pages I suppose...what am I missing?</p>
  
  <ol start="2">
  <li>I read many but this one was of interest:</li>
  </ol>
  
  <p><a href="https://stackoverflow.com/questions/2104450/rest-web-services-api-design">REST Web Services API Design</a></p>
  
  <p>The second reply, offers the following examples.</p>
  
  <pre><code>GET http://api.domain.com/user/&lt;id&gt;
  GET http://api.domain.com/users
  PUT http://api.domain.com/user/&lt;id&gt;
  POST http://api.domain.com/users
  DELETE http://api.domain.com/user/&lt;id&gt;
  </code></pre>
  
  <p>Makes sense but why are there two plural resources? Could one not assume that if "user" is queried and  was NULL or not provided that "all" was intended? Likewise for POST? If plural is for improved readability - why is there not a "users" resource for DELETE?</p>
  
  <p>Ultimately, I understand REST to mean...representation of a single resource - using HTTP verbs (GET, PUT, POST, DELETE) to essentially manage that resource - similar to CRUD.</p>
  
  <p>EDIT | Lastly I also wanted to ask why Google API sends the API version in the URI instead of using HTTP headers? Is there a reason? For backwards compat with older clients?</p>
  
  <p>Comments?</p>