summaryrefslogtreecommitdiff
path: root/docs/development/API/admin_api.md
diff options
context:
space:
mode:
authorLain Soykaf <lain@lain.com>2024-05-20 18:21:46 +0400
committerLain Soykaf <lain@lain.com>2024-05-20 18:21:46 +0400
commitc67506ba689633cd65f266610f2cd2a5da34912b (patch)
tree173b9cc6938d0dd9dd69623079ef080f052d1807 /docs/development/API/admin_api.md
parent086ba59d0346be870dc7df2660fbb55666bf0af7 (diff)
parente8cd6662eb2a534e3be16b522bf81b25b194edab (diff)
downloadpleroma-c67506ba689633cd65f266610f2cd2a5da34912b.tar.gz
pleroma-c67506ba689633cd65f266610f2cd2a5da34912b.zip
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into auth-fetch-exception
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
+{}
+```