Files Versions

The files versions API allows for retrieving the following information about files stored in ownCloud.

List File Versions

Request Path Method Content Type

/remote.php/dav/meta/$fileid/v

PROPFIND

text/xml

If the file is not found, then the following response will be returned, with an HTTP/1.1 404 Not Found status:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
  <s:message>File not found: meta in 'root'</s:message>
</d:error>

Restore Another Version of a File

Request Path Method Content Type

/remote.php/dav/meta/$fileid/v/$versionid /remote.php/dav/files/$user/foo/bar

COPY

text/xml

The response payload will look similar to the example below.