Correct RESTful call for this resource
-
31-10-2019 - |
题
I'm currently designing a RESTful interface to an existing infrastructure and I'm struggling with one particular aspect.
We have a collection of users which can be accessed at /users
And elements of that collection can be accessed at /users/1
etc
However each user has a list of friends which needs to be able to accessed as well. Would users/1/friends
be the restful call to make here? It doesn't qualify to be a collection of it's own since it's relates to only one user.
Any help would be greatly appreciated
没有正确的解决方案
不隶属于 StackOverflow