Q:

In a RESTFul API, what's the correct http verb to a revert / rollback action?

Imagine a simple document management webservice strutured like this:
document/  
    GET -> retrieves all documents
    POST -> creates a new document

document/[id]
    GET -> retrieves the "latest" revision of document specified by ID
    POST -> creates a new revision of the document

document/[id]/revision
    GET -> retrieves all revisions of the document
    POST -> Alias to POST->document/[id]

document/[id]/revision/[revisionID]
    GET -> retrieves the specified revision of the document

Now, let's say I want to rollback a document to a previous arbitrary revision (for instance, from revision 5 to 3).
In a RESTful point of view, what ROUTE and what VERB should be used for this kind of operation? Should I create a new verb for rollback operations?
Keep in mind that in a rollback operation nothing is deleted. Internally, the server just recognises a different revision number as the latest.

A:

Since you have the representations for each revision available, and the rollback operation should be idempotent, the most straightforward approach would be simply doing a PUT to document/[id] with the contents of GET document/[id]/revision/[revisionid], for the revisionid you want document/[id] to be set to.

