posted 2 years ago
Definitely /api/ads.
I challenge the notion that an ad is a sub-resource of a user. An ad is associated with a user, but neither of the two is an obvious parent of the other.
To create a new ad, you'd make the following request:
The user ID is determined either from the current login, or sent in the request body.
You can use the following request to get the user that created an ad:
You can use the following request to get all ads that a user created:
But neither of those two paths are appropriate for posting new records to.