

Ask HN: I am confused how to make REST URL at this point - yeukhon

http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;20693361&#x2F;restful-url-design-public-vs-private-api-hierhachy-api-design-pattern-uri-vs<p>I honestly am confused the more code I write. May someone more experienced be a myth buster? Thanks.
======
davismwfl
I 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.

