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

github.com/nextcloud/notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorkorelstar <korelstar@users.noreply.github.com>2021-05-02 19:29:50 +0300
committerkorelstar <korelstar@users.noreply.github.com>2021-05-07 09:52:55 +0300
commit7c3e4bbec118e535866be8d055d0bf8f168b41a4 (patch)
tree2715774b69372855ffaa151d1f5b041ef23e5af8 /docs
parentc4b7dfe6ec283a45245cb32badc3fd94575dd2bf (diff)
API: new attribute "readonly" for read-only notes
Diffstat (limited to 'docs')
-rw-r--r--docs/api/v1.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/api/v1.md b/docs/api/v1.md
index f59befa2..eee24702 100644
--- a/docs/api/v1.md
+++ b/docs/api/v1.md
@@ -21,6 +21,7 @@ The app and the API is mainly about notes. So, let's have a look about the attri
|:----------|:-----|:-------------------------|:-------------------|
| `id` | integer (read‑only) | Every note has a unique identifier which is created by the server. It can be used to query and update a specific note. | 1.0 |
| `etag` | string (read‑only) | The note's entity tag (ETag) indicates if a note's attribute has changed. I.e., if the note changes, the ETag changes, too. Clients can use the ETag for detecting if the local note has to be updated from server and for optimistic concurrency control (see section [Preventing lost updates and conflict solution](#preventing-lost-updates-and-conflict-solution)). | 1.2 |
+| `readonly` | boolean (read‑only) | Indicates if the note is read-only. This is `true`, e.g., if a file or folder was shared by another user without allowing editing. If this attribute is `true`, then all read/write attributes become read-only; except for the `favorite` attribute. | 1.2 |
| `content` | string (read/write) | Notes can contain arbitrary text. Formatting should be done using Markdown, but not every markup can be supported by every client. Therefore, markup should be used with care. | 1.0 |
| `title` | string (read/write) | The note's title is also used as filename for the note's file. Therefore, some special characters are automatically removed and a sequential number is added if a note with the same title in the same category exists. When saving a title, the sanitized value is returned and should be adopted by your client. | 1.0 |
| `category` | string (read/write) | Every note is assigned to a category. By default, the category is an empty string (not null), which means the note is uncategorized. Categories are mapped to folders in the file backend. Illegal characters are automatically removed and the respective folder is automatically created. Sub-categories (mapped to sub-folders) can be created by using `/` as delimiter. | 1.0 |
@@ -70,6 +71,7 @@ All defined routes in the specification are appended to this url. To access all
{
"id": 76,
"etag": "be284e00488c61c101ee28309d235e0b",
+ "readonly": false,
"modified": 1376753464,
"title": "New note",
"category": "sub-directory",
@@ -101,6 +103,7 @@ No valid authentication credentials supplied.
{
"id": 76,
"etag": "be284e00488c61c101ee28309d235e0b",
+ "readonly": false,
"modified": 1376753464,
"title": "New note",
"category": "sub-directory",
@@ -167,6 +170,9 @@ Invalid ID supplied.
##### 401 Unauthorized
No valid authentication credentials supplied.
+##### 403 Forbidden
+The note is read-only.
+
##### 404 Not Found
Note not found.
@@ -174,7 +180,6 @@ Note not found.
*(since API v1.2)*
Update cannot be performed since the note has been changed on the server in the meanwhile (concurrent change). The body contains the current note's state from server (see section [Note attributes](#note-attributes)), example see section [Get single note](#get-single-note-get-notesid). The client should use this response data in order to perform a conflict solution (see section [Preventing lost updates and conflict solution](#preventing-lost-updates-and-conflict-solution)).
-
##### 507 Insufficient Storage
Not enough free storage for saving the note's content.
</details>
@@ -198,6 +203,9 @@ Invalid ID supplied.
##### 401 Unauthorized
No valid authentication credentials supplied.
+##### 403 Forbidden
+The note is read-only.
+
##### 404 Not Found
Note not found.
</details>