diff options
| author | Lain Soykaf <lain@lain.com> | 2024-05-27 19:21:20 +0400 | 
|---|---|---|
| committer | Lain Soykaf <lain@lain.com> | 2024-05-27 19:21:20 +0400 | 
| commit | 03d0c5abfba6a334783b46a09d865dba6fde6586 (patch) | |
| tree | d339c45678a7fb062075c537724b9b71d8944955 /docs/development/API/admin_api.md | |
| parent | 1ab4ab8d38687634735e1415f395b072718ab1ab (diff) | |
| parent | e93ae96e1323fae954c2ce482cbb1df9ed9441c6 (diff) | |
| download | pleroma-03d0c5abfba6a334783b46a09d865dba6fde6586.tar.gz pleroma-03d0c5abfba6a334783b46a09d865dba6fde6586.zip | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into tusooa/extract-fix
Diffstat (limited to 'docs/development/API/admin_api.md')
| -rw-r--r-- | docs/development/API/admin_api.md | 60 | 
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 +{} +``` | 
