REPORT
REPORT allows additional information to be obtained about an object. REPORT can be performed on Collections, Documents and Revisions.
The message body details which type of report is being requested and any further information required to customise the report. By default DocMoto supports the DAV:version-tree report method.
Clients can submit a depth header with a value of either "0", "1" or "infinity". If no depth header is submitted then the default of "0" will be used.
DAV:version-tree Report Method
This report method returns the requested properties for all versions of the object.
Example 1: Returning a list of versions
This is a simple example that just returns a list of all versions of the requested Document and no additional properties.
Request
.... REPORT /Example/Files/howto.txt HTTP/1.1 Depth: infinity <?xml version='1.0' encoding='utf-8' standalone='no' ?> <version-tree xmlns='DAV:'/> ....
Response
HTTP/1.1 207 Multi-Status
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<multistatus xmlns="DAV:">
<response>
<href>http://docmotoserver.local:3983/Example/Files/howto.txt?version=3</href>
<propstat><prop/>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>http://docmotoserver.local:3983/Example/Files/howto.txt?version=2</href>
<propstat><prop/>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>http://docmotoserver.local:3983/Example/Files/howto.txt?version=1</href>
<propstat><prop/>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
Example 2: Returning a named property from every version
This example returns one property from each version of the requested Document.
Request
....
REPORT /Example/Files/howto.txt HTTP/1.1
<?xml version='1.0' encoding='utf-8' standalone='no' ?>
<D:version-tree xmlns:D='DAV:'>
<D:prop>
<D:comment/>
</D:prop>
</D:version-tree>
....Response
HTTP/1.1 207 Multi-Status
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<multistatus xmlns="DAV:">
<response>
<href>http://docmotoserver.local:3983/Example/Files/howto.txt?version=3</href>
<propstat>
<prop>
<comment>Added index</comment>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>http://docmotoserver.local:3983/Example/Files/howto.txt?version=2</href>
<propstat>
<prop>
<comment>Changed order of paragraphs</comment>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>http://docmotoserver.local:3983/Example/Files/howto.txt?version=1</href>
<propstat>
<prop>
<comment>First draft</comment>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
