I have couple of nested resources like
Room. A merchant can have many hotels and similarly a hotel can have many rooms.
Right now for managing these resources I doing something like:
creates a new hotel.
updates the given hotel.
Same for read and delete.
creates a new room.
updates the given room etc.
In future there will be more nested resources like room facilities etc. and following this scheme will turn hairy.
I am in the early stage of development and I may expose these APIs for developers hence I can't change API scheme very quickly.
I am in doubt from day one regarding this approach. Can I assume that each entity has unique ID (which is true for now as I am using relational database and has its own table)? If yes, then the can I use these URLs for APIs instead of above ones?
Etc for more nested resources.
Is there any violation of semantics or standard that I may be missing? I am using similar approach in views eg. in URLs in browsers which is looking ugly too.