title: REST API Best practices: Where to put parameters?
body: <p>A REST API can have parameters in at least two ways:</p>
  
  <ol>
  <li><strong>As part of the URL-path</strong> (i.e. <code>/api/resource/parametervalue</code>  )</li>
  <li><strong>As a query argument</strong> (i.e. <code>/api/resource?parameter=value</code>  )</li>
  </ol>
  
  <p>What is the best practice here? Are there any general guidelines when to use 1 and when to use 2?</p>
  
  <p>Real world example: Twitter uses query parameters for specifying intervals. (<code>http://api.twitter.com/1/statuses/home_timeline.json?since_id=12345&amp;max_id=54321</code>)</p>
  
  <p>Would it be considered better design to put these parameters in the URL path?</p>