My data structure is fairly simple but I am getting a little confused with how to structure my Web API controllers and routes.
In my data structure a City has a list of Venues and each venue has a list of Events.
This brings me on to the URL routes of the application. Do I have
Option 1
/api/cities/{id}
and /api/venues/{id}
and /api/events/{id}
But how would that work when POSTing a venue (to a city) or an event (to a venue)?
Option 2
/api/cities/{id}
and /api/cities/{cityId}/venues/{id}
and /api/cities/{cityId}/venues/{venueId}/events/{id}
Which sort of makes sense because the first call I need to make when using the API is to list all the venues given the city.
Finally am I right in thinking that my API controllers will effectively be getting, upserting and deleting only City documents but will be serving more specific data sets to the client?