9 ms·
Ask HN: I am confused how to make REST URL at this point
http://stackoverflow.com/questions/20693361/restful-url-design-public-vs-private-api-hierhachy-api-design-pattern-uri-vs
I honestly am confused the more code I write. May someone more experienced be a myth buster? Thanks.
- davismwfl 13y agoI answered your stackoverflow question there. I would basically say that hierarchy is what is important. For your example /document is more generic than /user/document. e.g. meaning that /document/{id} may belong to 1 or more users, where /user/document belongs to 1 and only 1 user. So while I may be wrong, I feel RESTful services should follow the hierarchy. It makes everyones jobs behind you much easier.