REST API: Support for versions in document API