Closed arikg closed 12 years ago
The current design would be considered best practice.
http://blog.apigee.com/detail/simplify_associations_sweep_complexities_under_the_http/
I see your point, it still feels a bit weird to me and I even might prefer his last suggestion of adding it as a parameter. but if it stays like that it should probably be moved in the documentation to be part of the users.md. I might have been led to think that's it's faulty because it was listed under the posts.md while actually being part of the users entity...
I think where those URLs are makes sense. Those posts "belong" in some way to a user object so nesting them under /users/ makes sense. In the api docs, we're grouping based on the responses they return. Since they're returning posts, they are grouped with the post resources.
The endpoint for all posts api calls (except 2) is https://alpha-api.app.net/stream/0/posts The two that start with a different url are "posts created by user" and "posts mentioning a user". They both start with: https://alpha-api.app.net/stream/0/users/[user_id]/
I do not think this is the right way to do it. Getting all posts that were created or mention a user is just another filter on posts and should be treated like that. Even the return value is a list of posts - I really think it belongs to the posts domain.
My suggestion is:
What do you think? @arikg