Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-04-26 20:01:08 +0300
committerJulius Härtl <jus@bitgrid.net>2021-04-28 11:40:59 +0300
commitcee905c3fff723c806b0611daa9379af894ea462 (patch)
tree195de3e0f139c8fa7078ec2031769cd1d7d23741 /docs/mobile_editor.md
parentca0b424e3459f3b34c9d723072b0f7e8cd510f29 (diff)
Add documentation and improve parameter naming
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'docs/mobile_editor.md')
-rw-r--r--docs/mobile_editor.md36
1 files changed, 31 insertions, 5 deletions
diff --git a/docs/mobile_editor.md b/docs/mobile_editor.md
index c0c013ab..193bf7ba 100644
--- a/docs/mobile_editor.md
+++ b/docs/mobile_editor.md
@@ -1,14 +1,40 @@
# Mobile Editor OCS API
-This API is used to obtain a link for a document to load from mobile apps
+This API is used to obtain a link for a document to load from mobile apps. The link will contain a
+one-time token that can be used once for opening a document in an anonymous browser session or
+webview on mobile devices in the context of the user.
-## Creating the link
+## Creating a link for a local file
```
<server>/ocs/v2.php/apps/richdocuments/api/v1/document
```
-A `POST` request to this endpoint with the `fileid` parameter will
-preprare the server to serve this document.
+A `POST` request to this endpoint with the `fileid` parameter will preprare the server to serve this
+document.
+
+The returned xml or json will have an url to open in a webview.
+
+## Creating a link for public share links
+
+Opening public share links requires federated editing being properly setup between the two servers.
+
+```
+<server>/ocs/v2.php/apps/richdocuments/api/v1/share
+```
+
+A `POST` request to this endpoint with the following parameters preprare the server to serve this
+document:
+
+| Parameter | Type | Description | Example |
+|---|---|---|---|
+| shareToken | string | Share token of the public share link | Qf5toz6JD7Tn7eD |
+| host | string (optional) | Desc | http://cloud.example.com |
+| path | string (optional) | Path to the file in case the share link is a directory | /path/to/file.odt |
+| password | string (optional) | Optional password to gain access to the share | secret |
+
+The returned xml or json will have an url to open in a webview.
+
+The user will join the session as a guest but with their user details provided by their own
+instance.
-The returned xml or json will has an url to open in a webview.