summaryrefslogtreecommitdiff
path: root/docs/development/API
diff options
context:
space:
mode:
authormarcin mikołajczak <git@mkljczk.pl>2024-01-19 17:53:37 +0100
committermarcin mikołajczak <git@mkljczk.pl>2024-01-19 17:53:37 +0100
commit90b442727e4e2e56b4b68a15172a5ef7516531df (patch)
treecaab5b38c67f9bb1fb98a9157f2d11df065c2839 /docs/development/API
parentf6fee39e42e633ff4298291dca0db656c92dad81 (diff)
downloadpleroma-90b442727e4e2e56b4b68a15172a5ef7516531df.tar.gz
pleroma-90b442727e4e2e56b4b68a15172a5ef7516531df.zip
Update Admin API docs
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'docs/development/API')
-rw-r--r--docs/development/API/admin_api.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/docs/development/API/admin_api.md b/docs/development/API/admin_api.md
index 7d31ee262..b8dc419e2 100644
--- a/docs/development/API/admin_api.md
+++ b/docs/development/API/admin_api.md
@@ -1751,3 +1751,50 @@ Note that this differs from the Mastodon API variant: Mastodon API only returns
```json
{}
```
+
+
+## `GET /api/v1/pleroma/admin/rules`
+
+### List rules
+
+- Response: JSON, list of rules
+
+```json
+[
+ {
+ "id": "1",
+ "priority": 1,
+ "text": "There are no rules"
+ }
+]
+```
+
+## `POST /api/v1/pleroma/admin/rules`
+
+### Create a rule
+
+- Params:
+ - `text`: string, required, rule content
+ - `priority`: integer, optional, rule ordering priority
+
+- Response: JSON, a single rule
+
+## `PATCH /api/v1/pleroma/admin/rules/:id`
+
+### Update a rule
+
+- Params:
+ - `text`: string, optional, rule content
+ - `priority`: integer, optional, rule ordering priority
+
+- Response: JSON, a single rule
+
+## `DELETE /api/v1/pleroma/admin/rules/:id`
+
+### Delete a rule
+
+- Response: JSON, empty object
+
+```json
+{}
+```