diff options
author | feld <feld@feld.me> | 2024-05-15 20:29:04 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2024-05-15 20:29:04 +0000 |
commit | 53ef576739939aec40279269fa424262951d9f7e (patch) | |
tree | a4dc25252cda250fc122769a625519c31397fdc9 /docs | |
parent | 8da103da572cdee8f10b2d753b307636e1431835 (diff) | |
parent | ccc3ac241f5b7c88b36efe60a4f9e5d791d2d49a (diff) | |
download | pleroma-53ef576739939aec40279269fa424262951d9f7e.tar.gz pleroma-53ef576739939aec40279269fa424262951d9f7e.zip |
Merge branch 'instance_rules' into 'develop'
Instance rules
See merge request pleroma/pleroma!3669
Diffstat (limited to 'docs')
-rw-r--r-- | docs/development/API/admin_api.md | 50 |
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 +{} +``` |