Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into issue/2115
[akkoma] / docs / API / admin_api.md
index 7bdbd17aa4a769e31fe7547c738e3de7d940be77..7992db58f055246f561dfdda2ede5e52889774f6 100644 (file)
@@ -1346,7 +1346,12 @@ Loads json generated from `config/descriptions.exs`.
 ```json
 [
    {
-      "account": {
+      "sender": {
+        "id": "someflakeid",
+        "username": "somenick",
+        ...
+      },
+      "receiver": {
         "id": "someflakeid",
         "username": "somenick",
         ...
@@ -1369,7 +1374,12 @@ Loads json generated from `config/descriptions.exs`.
 
 ```json
 {
-  "account": {
+  "sender": {
+    "id": "someflakeid",
+    "username": "somenick",
+    ...
+  },
+  "receiver": {
     "id": "someflakeid",
     "username": "somenick",
     ...
@@ -1385,7 +1395,7 @@ Loads json generated from `config/descriptions.exs`.
 
 ### List the messages in a chat
 
-- Params: None
+- Params: `max_id`, `min_id`
 
 - Response:
 
@@ -1445,3 +1455,45 @@ Loads json generated from `config/descriptions.exs`.
   "unread": false
 }
 ```
+
+## `GET /api/pleroma/admin/instance_document/:document_name`
+
+### Get an instance document
+
+- Authentication: required
+
+- Response:
+
+Returns the content of the document
+
+```html
+<h1>Instance panel</h1>
+```
+
+## `PATCH /api/pleroma/admin/instance_document/:document_name`
+- Params:
+  - `file` (the file to be uploaded, using multipart form data.)
+
+### Update an instance document
+
+- Authentication: required
+
+- Response:
+
+``` json
+{
+  "url": "https://example.com/instance/panel.html"
+}
+```
+
+## `DELETE /api/pleroma/admin/instance_document/:document_name`
+
+### Delete an instance document
+
+- Response:
+
+``` json
+{
+  "url": "https://example.com/instance/panel.html"
+}
+```