| Thanks for your feedback. A Few questions/comments. > The "*.json" thing is not standard and breaks HTTP.
It's more of a Rails convention and so we just followed it in the docs. Everything works fine without .json using the HTTP Accept header. > "tickets/search" endpoint is not a resource. It's a different projection of the "tickets" collection. It's basic filtering. Rule of thumb is whenever you're about to use a verb to name an API endpoint, you can guess you're probably about to do something wrong. Interesting. How would you approach it? Extend the /tickets endpoint to include some search parameters? > A RESTful API needs hyperlinks. I agree. However at this point it just seems a lot more work and also I have never really seen anyone use it (except for a few often quoted examples). We should change our documentation to use the word RESTlike. Thanks once again for your feedback. We will improve the documentation soon. |
It's a lot more work for the end user to have to assemble URLs themselves instead of you providing them in the response.
Let's say someone does a GET request on /tickets. The response should include URLs for each ticket that gets returned, e.g. something like:
Again, the analogy of the WWW itself is instructive. When you browse to the home page of a website, that page has links to the other pages on the site.Similarly, the home page of a REST web service should have links to the other resources on the web service, e.g.
That is simple, predictable, discoverable and self documenting for the end user.