aboutsummaryrefslogtreecommitdiff
path: root/docs/API/admin_api.md
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-11-08 13:27:11 +0100
committerlain <lain@soykaf.club>2019-11-08 13:27:11 +0100
commitb22ee9d9666c49d1a3b1757b275e9d303eed4afc (patch)
treee7b4138a82c7382f2e2819f0a52481ec39cb12f3 /docs/API/admin_api.md
parentd7f9679ff2c9c4bd2b9967d7a32b5a4fe145305e (diff)
parent278674223d36f4d789dce92cd541c47b7e19b674 (diff)
downloadpleroma-b22ee9d9666c49d1a3b1757b275e9d303eed4afc.tar.gz
Merge remote-tracking branch 'origin/develop' into reactions
Diffstat (limited to 'docs/API/admin_api.md')
-rw-r--r--docs/API/admin_api.md97
1 files changed, 86 insertions, 11 deletions
diff --git a/docs/API/admin_api.md b/docs/API/admin_api.md
index ee9e68cb1..c042b08ac 100644
--- a/docs/API/admin_api.md
+++ b/docs/API/admin_api.md
@@ -47,7 +47,7 @@ Authentication is required and the user must be an admin.
}
```
-## `/api/pleroma/admin/users`
+## DEPRECATED `DELETE /api/pleroma/admin/users`
### Remove a user
@@ -56,6 +56,15 @@ Authentication is required and the user must be an admin.
- `nickname`
- Response: User’s nickname
+## `DELETE /api/pleroma/admin/users`
+
+### Remove a user
+
+- Method `DELETE`
+- Params:
+ - `nicknames`
+- Response: Array of user nicknames
+
### Create a user
- Method: `POST`
@@ -154,28 +163,86 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
}
```
-### Add user in permission group
+## DEPRECATED `POST /api/pleroma/admin/users/:nickname/permission_group/:permission_group`
+
+### Add user to permission group
-- Method: `POST`
- Params: none
- Response:
- On failure: `{"error": "…"}`
- - On success: JSON of the `user.info`
+ - On success: JSON of the user
+
+## `POST /api/pleroma/admin/users/permission_group/:permission_group`
+
+### Add users to permission group
+
+- Params:
+ - `nicknames`: nicknames array
+- Response:
+ - On failure: `{"error": "…"}`
+ - On success: JSON of the user
+
+## DEPRECATED `DELETE /api/pleroma/admin/users/:nickname/permission_group/:permission_group`
### Remove user from permission group
-- Method: `DELETE`
- Params: none
- Response:
- On failure: `{"error": "…"}`
- - On success: JSON of the `user.info`
+ - On success: JSON of the user
+- Note: An admin cannot revoke their own admin status.
+
+## `DELETE /api/pleroma/admin/users/permission_group/:permission_group`
+
+### Remove users from permission group
+
+- Params:
+ - `nicknames`: nicknames array
+- Response:
+ - On failure: `{"error": "…"}`
+ - On success: JSON of the user
- Note: An admin cannot revoke their own admin status.
-## `/api/pleroma/admin/users/:nickname/activation_status`
+## `PATCH /api/pleroma/admin/users/activate`
+
+### Activate user
+
+- Params:
+ - `nicknames`: nicknames array
+- Response:
+
+```json
+{
+ users: [
+ {
+ // user object
+ }
+ ]
+}
+```
+
+## `PATCH /api/pleroma/admin/users/deactivate`
+
+### Deactivate user
+
+- Params:
+ - `nicknames`: nicknames array
+- Response:
+
+```json
+{
+ users: [
+ {
+ // user object
+ }
+ ]
+}
+```
+
+## DEPRECATED `PATCH /api/pleroma/admin/users/:nickname/activation_status`
### Active or deactivate a user
-- Method: `PUT`
- Params:
- `nickname`
- `status` BOOLEAN field, false value means deactivation.
@@ -222,6 +289,14 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
- Response:
- On success: URL of the unfollowed relay
+## `GET /api/pleroma/admin/relay`
+
+### List Relays
+
+- Params: none
+- Response:
+ - On success: JSON array of relays
+
## `/api/pleroma/admin/users/invite_token`
### Create an account registration invite token
@@ -317,13 +392,13 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
}
```
-
-## `/api/pleroma/admin/users/:nickname/force_password_reset`
+## `/api/pleroma/admin/users/force_password_reset`
### Force passord reset for a user with a given nickname
- Methods: `PATCH`
-- Params: none
+- Params:
+ - `nicknames`
- Response: none (code `204`)
## `/api/pleroma/admin/reports`