summaryrefslogtreecommitdiff
path: root/docs/development/API/admin_api.md
diff options
context:
space:
mode:
authormarcin mikołajczak <git@mkljczk.pl>2024-05-18 11:30:25 +0200
committermarcin mikołajczak <git@mkljczk.pl>2024-05-18 11:30:25 +0200
commit2e76ceb5b4c8abf860f9d078c80ae0fcbe1a4ffd (patch)
tree6a803ea5efa8f6a93f04d657f3cb56a0b9ff5b17 /docs/development/API/admin_api.md
parent1ed8ae2d8e86ed26d4e21f59e95995795bcb282b (diff)
parent99eab1fa2a39b7a7fba6cdbb92c01e9c7c81aa88 (diff)
downloadpleroma-2e76ceb5b4c8abf860f9d078c80ae0fcbe1a4ffd.tar.gz
pleroma-2e76ceb5b4c8abf860f9d078c80ae0fcbe1a4ffd.zip
Merge remote-tracking branch 'origin/develop' into status-notification-type
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'docs/development/API/admin_api.md')
-rw-r--r--docs/development/API/admin_api.md50
1 files changed, 50 insertions, 0 deletions
diff --git a/docs/development/API/admin_api.md b/docs/development/API/admin_api.md
index 182a760fa..5b373b8e1 100644
--- a/docs/development/API/admin_api.md
+++ b/docs/development/API/admin_api.md
@@ -1751,3 +1751,53 @@ 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",
+ "hint": null
+ }
+]
+```
+
+## `POST /api/v1/pleroma/admin/rules`
+
+### Create a rule
+
+- Params:
+ - `text`: string, required, rule content
+ - `hint`: string, optional, rule description
+ - `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
+ - `hint`: string, optional, rule description
+ - `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
+{}
+```