Meta API
Table of Contents
Introduction
An authenticated PROPFIND
request to remote.php/dav/meta/<fileid>
returns the path to a file/folder for the
logged in user.
To retrieve a list of available files, use the
Filter Files endpoint,
and ensure that returned properties includes fileid .
|
Request Parameters
Attribute | Type | Description |
---|---|---|
|
integer |
The file’s id. |
The example above uses xmllint, available in the libxml2 package to make the response easier to read. |
Example Responses
Success
If the file of folder is found, then a response similar to the following will be returned with an HTTP/1.1 207 Multi-Status status:
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/remote.php/dav/meta/7/</d:href>
<d:propstat>
<d:prop>
<oc:meta-path-for-user>/Photos/San Francisco.jpg</oc:meta-path-for-user>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>
Failure
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/>
</d:error>