From 3674872cefc55024f02bd51a0dcd2035c6bf5c43 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 5 Mar 2024 12:26:03 -0500 Subject: [PATCH] docs(api): Fix formatting problems Signed-off-by: Josh --- doc/api.md | 81 +++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/doc/api.md b/doc/api.md index 970b7d0e..3211a67b 100644 --- a/doc/api.md +++ b/doc/api.md @@ -33,13 +33,13 @@ PROPFIND: `https:///remote.php/webdav//` **Data:** xml body: -````xml +```xml -```` +``` **Results:** @@ -49,7 +49,7 @@ xml body: **Response body on success** -````xml +```xml ... /remote.php/webdav/folder/0/ @@ -61,7 +61,7 @@ xml body: ... -```` +``` **Example curl call:** @@ -86,7 +86,7 @@ privateKey: the users private key **Response body on success** -````xml +```xml @@ -98,7 +98,7 @@ privateKey: the users private key encrypted-private-key -```` +``` **Example curl call:** @@ -121,7 +121,7 @@ GET: `/private-key` **Response body on success** -````xml +```xml @@ -133,7 +133,7 @@ GET: `/private-key` encrypted-private-key -```` +``` **Example curl call:** @@ -156,7 +156,7 @@ DELETE: `/private-key` **Response body on success** -````xml +```xml @@ -167,7 +167,7 @@ DELETE: `/private-key` -```` +``` **Example curl call:** @@ -196,7 +196,7 @@ the public key (CN must be the same as the corresponding Nextcloud user name) **Response body on success** -````xml +```xml @@ -208,7 +208,7 @@ the public key (CN must be the same as the corresponding Nextcloud user name) public-key -```` +``` **Example curl call:** @@ -235,7 +235,7 @@ users: Json encoded list of users for which the server should return the public **Response body on success** -````xml +```xml @@ -252,7 +252,7 @@ users: Json encoded list of users for which the server should return the public -```` +``` **Example curl call:** @@ -287,7 +287,7 @@ DELETE: `/public-key` **Response body on success** -````xml +```xml @@ -298,7 +298,7 @@ DELETE: `/public-key` -```` +``` **Example curl call:** @@ -325,7 +325,7 @@ e2e-token: if you re-try a previously failed upload, use the token from the firs **Response body on success** -````xml +```xml @@ -337,14 +337,14 @@ e2e-token: if you re-try a previously failed upload, use the token from the firs fdkjfjdhgkjdhkjghdfhgk -```` +``` **Example curl call:** First try: -````shell +```shell curl https://:@/ocs/v2.php/apps/end_to_end_encryption/api/v1/lock/10 \ -X POST \ -H "OCS-APIRequest:true" \ @@ -353,7 +353,8 @@ curl https://:@/ocs/v2.php/apps/end_to_end_encryption Retry: -`curl -X POST https://:@/ocs/v2.php/apps/end_to_end_encryption/api/v1/lock/ -H "OCS-APIRequest:true"` -d e2e-token="" +```shell +curl -X POST https://:@/ocs/v2.php/apps/end_to_end_encryption/api/v1/lock/ -H "OCS-APIRequest:true"` -d e2e-token="" curl https://:@/ocs/v2.php/apps/end_to_end_encryption/api/v1/lock/10 \ -X POST \ -H "OCS-APIRequest:true" \ @@ -377,7 +378,7 @@ DELETE: `/lock/` **Response body on success** -````xml +```xml @@ -386,13 +387,13 @@ DELETE: `/lock/` OK -```` +``` **Example curl call:** Unlock: -````shell +```shell curl https://:@/ocs/v2.php/apps/end_to_end_encryption/api/v1/lock/10 \ -X DELETE \ -H "OCS-APIRequest:true" \ @@ -401,7 +402,7 @@ curl https://:@/ocs/v2.php/apps/end_to_end_encryption Unlock and drop pending changes: -````shell +```shell curl https://:@/ocs/v2.php/apps/end_to_end_encryption/api/v1/lock/10?abort=true \ -X DELETE \ -H "OCS-APIRequest:true" \ @@ -428,7 +429,7 @@ metaData: content of the encrypted meta-data file **Response body on success** -````xml +```xml @@ -440,7 +441,7 @@ metaData: content of the encrypted meta-data file encrypted-meta-data -```` +``` **Example curl call:** @@ -466,7 +467,7 @@ GET: `/meta-data/` **Result body on success:** -````xml +```xml @@ -478,7 +479,7 @@ GET: `/meta-data/` encrypted-meta-data -```` +``` **Example curl call:** @@ -505,7 +506,7 @@ the file with the given file-id 400 bad request: unpredictable internal error **Result body on success:** -````xml +```xml @@ -517,7 +518,7 @@ the file with the given file-id encrypted-meta-data -```` +``` **Example curl call:** @@ -552,7 +553,7 @@ the file with the given file-id 400 bad request: unpredictable internal error **Result body on success:** -````xml +```xml @@ -564,7 +565,7 @@ the file with the given file-id encrypted-meta-data -```` +``` **Example curl call:** @@ -587,7 +588,7 @@ DELETE: `/meta-data/` **Result body on success:** -````xml +```xml @@ -598,7 +599,7 @@ DELETE: `/meta-data/` -```` +``` **Example curl call:** @@ -623,7 +624,7 @@ GET: `/server-key` 400 bad request: unpredictable internal error **Result body on success:** -````xml +```xml @@ -635,7 +636,7 @@ GET: `/server-key` server-public-key -```` +``` **Example curl call:** @@ -652,7 +653,7 @@ PUT: `/encrypted/` 404 not found: if the ID could not be resolved to a valid folder **Result body on success:** -````xml +```xml @@ -663,7 +664,7 @@ PUT: `/encrypted/` -```` +``` **Example curl call:** `curl -X PUT https://:@/ocs/v2.php/apps/end_to_end_encryption/api/v1/encrypted/ -H "OCS-APIRequest:true"` @@ -679,7 +680,7 @@ DELETE: `/encrypted/` 404 not found: if the ID could not be resolved to a valid folder **Result body on success:** -````xml +```xml @@ -690,7 +691,7 @@ DELETE: `/encrypted/` -```` +``` **Example curl call:**