Timeline for How to deal with public vs private version of same resource in a RESTFul API?
Current License: CC BY-SA 4.0
Post Revisions
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| yesterday | answer | added | Doc Brown | timeline score: 1 | |
| yesterday | answer | added | Tvde1 | timeline score: 2 | |
| 2 days ago | comment | added | Kevin | 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. | |
| 2 days ago | vote | accept | user1620696 | ||
| 2 days ago | comment | added | Bergi |
"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
|
|
| 2 days ago | answer | added | Bergi | timeline score: 6 | |
| 2 days ago | history | became hot network question | |||
| 2 days ago | answer | added | Ewan | timeline score: 16 | |
| 2 days ago | answer | added | Hans-Martin Mosner | timeline score: 5 | |
| 2 days ago | history | asked | user1620696 | CC BY-SA 4.0 |