Add basic docs for Trash and Versions webdav API

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma
2018-09-27 15:19:31 +02:00
parent 665c7368d8
commit fedc3db7f2
3 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
.. _webdavtrashbin:
==================
WebDAV Trashbin
==================
Nextcloud makes the trashbin of a user available via the webdav endpoint.
Listing the trashbin content
----------------------------
To obtain all the files in the trashbin a normal :code:`PROPFIND` has to be send to
:code:`https://cloud.example.com/remote.php/dav/trashbin/USER/trash`. This will
list the content of the trashbin.
The endpoint provides three extra properties:
* :code:`{http://nextcloud.org/ns}trashbin-filename`
* :code:`{http://nextcloud.org/ns}trashbin-original-location`
* :code:`{http://nextcloud.org/ns}trashbin-deletion-time`
The result is a normal response to a :code:`PROPFIND` and can be listed as such.
Restoring from the trashbin
---------------------------
To restore from the trashbin all that needs to be done is to move the item to
the special restore folder at :code:`https://cloud.example.com/remote.php/dav/trashbin/USER/restore`
This will automatically restore the item to its original location.
Deleting from the trashbin
--------------------------
To delete from the trashbin just perform a delete on the item.
Emptying the trashbin
---------------------
Perform a delete on `https://cloud.example.com/remote.php/dav/trashbin/USER/trash`

View File

@@ -0,0 +1,24 @@
.. _webdavversions:
==================
WebDAV Versions
==================
Nextcloud makes the versions of files available via the webdav endpoint.
Listing the versions of a file
------------------------------
To obtain all the version of a file a normal :code:`PROPFIND` has to be send to
:code:`https://cloud.example.com/remote.php/dav/versions/USER/versions/FILEID`. This will
list the versions for this file.
The name is the timestamp of the version.
Restoring a version
---------------------------
To restore a version all that needs to be done is to move a version
the special restore folder at :code:`https://cloud.example.com/remote.php/dav/versions/USER/restore`

View File

@@ -13,6 +13,8 @@ WebDAV is the main api for file related operations, it supports listing director
An overview of how to use the various WebDAV api's can be found at :doc:`WebDAV/index`, additionally Nextcloud implements rfc5323_ to allow searching the filesystem
more information about how to use WebDAV search can be found at :doc:`WebDAV/search`.
Clients can also access :doc:`WebDAV/versions` and :dock:`WebDAV/trashbin` via webdav to integrate with this.
OCS
---
@@ -38,6 +40,8 @@ Clients can obtain an apptoken via the login flow. See :doc:`LoginFlow/index`
WebDAV/index
WebDAV/search
WebDAV/trashbin
WebDAV/versions
OCS/index
LoginFlow/index