Expose resource as child of its parent or not?

by cb7   Last Updated August 25, 2019 01:05 AM

Say every word belongs to a dictionary. What's the preferable URI for a single word, either /word/:word (with dictionary_id a required GET parameter), or /dictionary/:id/word/:word?

I'm thinking the first one, just because otherwise there's a possibility that things could get out of control if the child resource in turn has some child resources.

Tags : rest

Related Questions

Updated March 28, 2015 06:01 AM

Updated May 30, 2015 04:02 AM

Updated May 23, 2015 01:02 AM

Updated June 16, 2015 02:02 AM