Hey Guys,my RESTful API is working in progress, at the moment I'm thinking about the best RESTful way to delete one single item in a collection behind a resource.The URL structure for each resource is/resource/ -> collection of resource type/resource/id/ -> single resource of type/resource/id/collection -> a collection bounded to the single resourceAn example, this:GET /users/123/followersrepresents the followers of user 123.The followers are also resources of type users. Which HTTP Method should I use to delete one user as follower of user 123?I think this is correct:DELETE /users/123/followersI could work with query parameters to submit the id of the user who wants to unfollow user 123, or I use the current user indicated by session. Of course, in the application, to process this request, I delete the relation between the to users (type follow).For my colleagues it looks like I delete the entire follower collection and some of them once to use PUT instead of DELETE because it is more an update and not a deletion. But I already use PUT to add a user as follower to the collection, if I would also use PUT to delete I need a query parameter to decide which action should be done.What is the best in your RESTful eyes?GreetingsMartin--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-craft+...@googlegroups.com.
Visit this group at http://groups.google.com/group/api-craft?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.