From ea47046d91ebb7914530cd68ff4c7e7a0ba2f245 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Thu, 6 Feb 2025 18:01:30 +0100 Subject: [PATCH] feat: Add documentation about fetching metadata through WebDAV Signed-off-by: Louis Chemineau --- doc/api.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/api.md b/doc/api.md index 684fcede..563bf0f9 100644 --- a/doc/api.md +++ b/doc/api.md @@ -19,6 +19,8 @@ A more general documentation how to use the API can be found [here](https://gith - [Unlock file](#unlock-file) - [Store meta-data file](#store-meta-data-file) - [Get meta-data file](#get-meta-data-file) + - [Using the main API](#using-the-main-api) + - [Using the WebDAV API](#using-the-webdav-api) - [Update meta-data file](#update-meta-data-file) - [Update filedrop property of meta-data file](#update-filedrop-property-of-meta-data-file) - [Delete meta-data file](#delete-meta-data-file) @@ -466,6 +468,8 @@ curl "https://:@/ocs/v2.php/apps/end_to_end_encryptio ## Get meta-data file +### Using the main API + GET: `/meta-data/` **Results:** @@ -496,6 +500,24 @@ GET: `/meta-data/` `curl -X GET https://:@nextcloud/ocs/v2.php/apps/end_to_end_encryption/api/v1/meta-data/ -H "OCS-APIRequest:true" -H "x-e2ee-supported:true"` +### Using the WebDAV API + +Alternatively, you can request the metadata and its signature in PROPFIND requests. + +```shell + curl 'https://cloud.example.com/remote.php/dav/files/username/E2EE_folder' \ + --user username:password \ + -H "x-e2ee-supported:true" \ + --request PROPFIND \ + --data ' + + + + + + ' +``` + ## Update meta-data file PUT: `/meta-data/`