Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    "I feel it is a bit weird though, because /admin is not a resource." - just because /admin/inventory is a resource does not mean that a resource /admin needs to exist Commented 2 days ago
  • We use roles extensively for business logic, it is both a mess that I wouldn't recommend as well as a necessity for our use case. Or rather, it's probably possible to do "properly", but using roles is the easiest solution to managing lots of interconnected resources that may or may not be linked in the response. It's a trade-off. As far as REST is concerned I don't think there's a correct answer. One thing to consider that I don't see yet is routing, you can have your separate endpoints in the backend while using a shared one from the client if your routing layer has support for roles. Commented 2 days ago