aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/openapi.yaml48
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/openapi.yaml b/docs/openapi.yaml
index 5ccafb8..09d0bc6 100644
--- a/docs/openapi.yaml
+++ b/docs/openapi.yaml
@@ -129,6 +129,54 @@ paths:
description: Writing failed.
'503':
description: Node is not ready.
+ post:
+ tags: [Store]
+ summary: Insert into a list
+ description: |
+ Inserts the value (as `PUT` takes it) into the list at the path: at `index`,
+ the items from there on moving up one, or at the end without one (or with
+ `-1`). One request is one Automerge change. To add a key to a map, `PUT` it.
+ parameters:
+ - name: index
+ in: query
+ required: false
+ description: Where, from 0 to the list's length (that's the end); `-1` is the end too.
+ schema:
+ type: integer
+ minimum: -1
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema: {}
+ text/plain:
+ schema:
+ type: string
+ responses:
+ '201':
+ description: Inserted, and where.
+ content:
+ application/json:
+ schema:
+ type: object
+ required: [index]
+ properties:
+ index:
+ type: integer
+ '400':
+ description: Invalid path, index, malformed JSON or invalid UTF-8.
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ description: As for `PUT`.
+ '404':
+ description: Nothing at this path.
+ '409':
+ description: Not a list there, or the index is past its end (the message says which, and the length).
+ '415':
+ description: Content-Type is neither `application/json` nor `text/plain` (absent means JSON).
+ '503':
+ description: Node is not ready.
delete:
tags: [Store]
summary: Delete a value