I have a situation where I don't know how to manage it. I have a resource that has a flag "undeniable." Denying a post, would delete it from the database, so using
DELETE /v1/posts/post-id-here
would have been just fine; this way the undeniable post would have been just ignored with 404. But my undeniable post would have a counter on how many times it was getting denied, so I think this kills the purpose of DELETE. That's why I was heading towards PUT request but I can't find anywhere about validity of removing a resource on PUT request. I was thinking something like the following:
PUT /v1/posts/post-id-here/deny
which would either delete the post or increment the counter, with both returning 200 OK. Is it valid? Or should I try to separate them in the client side, where the undeniable posts output the PUT url and the deniable ones output the DELETE url; and if DELETE was called on undeniable one, 404 would be returned? Or is there a third option?