diff options
author | Lain Soykaf <lain@lain.com> | 2024-05-28 16:51:19 +0400 |
---|---|---|
committer | Lain Soykaf <lain@lain.com> | 2024-05-28 16:51:19 +0400 |
commit | cc42b50c5bbbeee066d3d26907eebb488ec6aa3d (patch) | |
tree | 3b67771624d237bdb58f0931098d6682191cc214 /docs/development/API/admin_api.md | |
parent | fdc3cbb8cbefad2161cc408b4440420d6e4b2a88 (diff) | |
parent | bef15cde6141a977aebdfc998d6091a31c4fc2d6 (diff) | |
download | pleroma-cc42b50c5bbbeee066d3d26907eebb488ec6aa3d.tar.gz pleroma-cc42b50c5bbbeee066d3d26907eebb488ec6aa3d.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into pleroma-feature/akkoma-prune-old-posts
Diffstat (limited to 'docs/development/API/admin_api.md')
-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 +{} +``` |