Answer the question
In order to leave comments, you need to log in
Correct formation of REST endpoints?
There are 3 resources:
1. Category - Category
2. Device - Belongs to category
3. Article - Belongs to device
How to properly organize EndPoints for Device, Article?
Nested
Answer the question
In order to leave comments, you need to log in
If slugDevice is unique only within a category, then you will have to do "nested". Another minus of "nested" ones, in addition to your own identifier, you also need to know the nesting identifier, and what to do when it has changed, for example, moved to another category?
So I'm always for "flat", except when you need additional data for identification.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question