title: RESTful API required parameters in query string?
body: <p> When designing a RESTful API, what to do if a GET request only makes sense if there are specific parameters associated with the request? Should the parameters be passed as a query string, and if so, what to do when all the parameters aren't specified or are formatted incorrectly? </p>
  
  <p> For example, lets say i have a Post resource, which can be accessed by `api/posts` endpoint. Each post has a geographical location, and posts can be retrieved ONLY when specifying an area that the posts may reside in. Thus, 3 parameters are required: latitude, longitude and radius.</p>
  
  <p>I can think of 2 options in this case:<br/>
  1. Putting the parameters in query string: <code>api/posts/?lat=5.54158&amp;lng=71.5486&amp;radius=10</code><br/>
  2. Putting the parameters in the URL: <code>api/posts/lat/5.54158/lng/71.5486/radius/10</code></p>
  
  <p>Which of these would be the correct approach? It seems wrong to put required parameters in the query string, but the latter approach feels somewhat 'uglier'.  </p>
  
  <p>PS. I'm aware there are many discussion on this topic already (for example: <a href="https://stackoverflow.com/questions/4024271/rest-api-best-practices-where-to-put-parameters">REST API Best practices: Where to put parameters?</a>), but my question is specifically addressed to the case when parameters are required, not optional.  </p>