Looking at Stack Exchange API docs, I see methods like answers/{id}/downvote
answers/{id}/downvote/undo
comments/{id}/delete
.
Should this be considered a RESTful API? (The docs does not mention the word REST, but anyway it at least resembles a RESTful design, and here and there it's assumed to be so).
I'm asking because, while those methods look self-explanatory and "natural", I'm not sure if they comply with the REST philosophy. For one thing, they write the intented verb (the action to be done with the resource) as part of the URL. Instead, REST proponents argue (here and here and here), we should restrict to the four HTTP verbs. If you think you need "more verbs", then you are not enlightened yet. When you want to perform multiple actions on a resource, then you should use (they say) a single URL... and embed that "extra data" (what you want to do!) in the POST body... (which smells hideous to me in several levels, but anyway, I know little about REST).
Furthermore, the SE API, in my last example, even uses the verb "delete" in the URL, instead of using the (for once) available method DELETE
...
Then, am I right in assuming that this is really not RESTful, or at least it's an "impure" (pragmatic and nice, I'd say) design, from the REST point of view?
If so, what would be the RESTful way? Instead of answers/{id}/downvote
one should do something like POST answers/{id}
and in the body place something like { action: "downvote" }
?