I have a question about HTTP DELETE and REST. I have a resource x. Depending on the state of x, deletion of x does either:
- Delete x permanently.
- Mark x as deleted. This means that x can reverted later on.
I assume that HTTP DELETE must delete the resource according to the HTTP/REST specifics, instead of marking it as deleted, for example: GET on x must return 404 after the HTTP DELETE has been processed. This means that HTTP DELETE cannot be used for the second situation. How would you model this delete behaviour (both 1 and 2) in a RESTful way?
Then, since some resources can be reverted, this should also be made possible via the REST API. How would you model revert behaviour in a RESTful way?
Let's assume x resides on http://company/api/x/ for simplicity.