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 PROPFIND
has to be send to
https://cloud.example.com/remote.php/dav/trashbin/USER/trash
. This will
list the content of the trashbin.
The endpoint provides three extra properties:
{http://nextcloud.org/ns}trashbin-filename
{http://nextcloud.org/ns}trashbin-original-location
{http://nextcloud.org/ns}trashbin-deletion-time
The result is a normal response to a 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 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