summaryrefslogtreecommitdiff
path: root/docs/development/API/admin_api.md
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2024-08-01 08:53:29 +0000
committerlain <lain@soykaf.club>2024-08-01 08:53:29 +0000
commit36d469cf022ea66947a73ee4c762d7f459aceee4 (patch)
tree5f8824d56f10d1c94353afeb77833cd250e67369 /docs/development/API/admin_api.md
parent7566b4a348c66fcea45bcb017979ece9c7b45b3a (diff)
parenta5d32aab50abf725196fa782775a38907b4b2afa (diff)
downloadpleroma-36d469cf022ea66947a73ee4c762d7f459aceee4.tar.gz
pleroma-36d469cf022ea66947a73ee4c762d7f459aceee4.zip
Merge branch 'release/2.7.0' into 'stable'
v2.7.0 See merge request pleroma/pleroma!4179
Diffstat (limited to 'docs/development/API/admin_api.md')
-rw-r--r--docs/development/API/admin_api.md60
1 files changed, 55 insertions, 5 deletions
diff --git a/docs/development/API/admin_api.md b/docs/development/API/admin_api.md
index 7d31ee262..5b373b8e1 100644
--- a/docs/development/API/admin_api.md
+++ b/docs/development/API/admin_api.md
@@ -303,7 +303,7 @@ Removes the user(s) from follower recommendations.
## `GET /api/v1/pleroma/admin/users/:nickname_or_id`
-### Retrive the details of a user
+### Retrieve the details of a user
- Params:
- `nickname` or `id`
@@ -313,7 +313,7 @@ Removes the user(s) from follower recommendations.
## `GET /api/v1/pleroma/admin/users/:nickname_or_id/statuses`
-### Retrive user's latest statuses
+### Retrieve user's latest statuses
- Params:
- `nickname` or `id`
@@ -337,7 +337,7 @@ Removes the user(s) from follower recommendations.
## `GET /api/v1/pleroma/admin/instances/:instance/statuses`
-### Retrive instance's latest statuses
+### Retrieve instance's latest statuses
- Params:
- `instance`: instance name
@@ -377,7 +377,7 @@ It may take some time.
## `GET /api/v1/pleroma/admin/statuses`
-### Retrives all latest statuses
+### Retrieves all latest statuses
- Params:
- *optional* `page_size`: number of statuses to return (default is `20`)
@@ -541,7 +541,7 @@ Response:
## `PATCH /api/v1/pleroma/admin/users/force_password_reset`
-### Force passord reset for a user with a given nickname
+### Force password reset for a user with a given nickname
- Params:
- `nicknames`
@@ -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
+{}
+```