diff options
author | rinpatch <rinpatch@sdf.org> | 2019-03-28 19:46:30 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-03-28 19:46:30 +0300 |
commit | dfae0050af385786c5799ee886de315f69d36a78 (patch) | |
tree | 2dc30a08cf395d149a0d33df54a9478671f70e86 /docs/Admin-API.md | |
parent | 926bf114b7385761c3cac50e262d061f47fda4b8 (diff) | |
download | pleroma-dfae0050af385786c5799ee886de315f69d36a78.tar.gz |
Move out of Gitlab Wiki
I understand that this change is quite unreadable and hard to review, sorry for forgetting to do atomic commits. This patch does not change too much content wise, it just
* Gets everything from gitlab wiki
* Removes some specific gitlab hacks
* Formats all documentation file names to be in snake case so they look the same way as our code does
Diffstat (limited to 'docs/Admin-API.md')
-rw-r--r-- | docs/Admin-API.md | 193 |
1 files changed, 0 insertions, 193 deletions
diff --git a/docs/Admin-API.md b/docs/Admin-API.md deleted file mode 100644 index 84adca6ff..000000000 --- a/docs/Admin-API.md +++ /dev/null @@ -1,193 +0,0 @@ -# Admin API - -Authentication is required and the user must be an admin. - -## `/api/pleroma/admin/users` - -### List users - -- Method `GET` -- Query Params: - - *optional* `query`: **string** search term - - *optional* `filters`: **string** comma-separated string of filters: - - `local`: only local users - - `external`: only external users - - `active`: only active users - - `deactivated`: only deactivated users - - *optional* `page`: **integer** page number - - *optional* `page_size`: **integer** number of users per page (default is `50`) -- Example: `https://mypleroma.org/api/pleroma/admin/users?query=john&filters=local,active&page=1&page_size=10` -- Response: - -```JSON -{ - "page_size": integer, - "count": integer, - "users": [ - { - "deactivated": bool, - "id": integer, - "nickname": string, - "roles": { - "admin": bool, - "moderator": bool - }, - "local": bool, - "tags": array - }, - ... - ] -} -``` - -## `/api/pleroma/admin/user` - -### Remove a user - -- Method `DELETE` -- Params: - - `nickname` -- Response: User’s nickname - -### Create a user - -- Method: `POST` -- Params: - - `nickname` - - `email` - - `password` -- Response: User’s nickname - -## `/api/pleroma/admin/users/:nickname/toggle_activation` - -### Toggle user activation - -- Method: `PATCH` -- Params: - - `nickname` -- Response: User’s object - -```JSON -{ - "deactivated": bool, - "id": integer, - "nickname": string -} -``` - -## `/api/pleroma/admin/users/tag` - -### Tag a list of users - -- Method: `PUT` -- Params: - - `nickname` - - `tags` - -### Untag a list of users - -- Method: `DELETE` -- Params: - - `nickname` - - `tags` - -## `/api/pleroma/admin/permission_group/:nickname` - -### Get user user permission groups membership - -- Method: `GET` -- Params: none -- Response: - -```JSON -{ - "is_moderator": bool, - "is_admin": bool -} -``` - -## `/api/pleroma/admin/permission_group/:nickname/:permission_group` - -Note: Available `:permission_group` is currently moderator and admin. 404 is returned when the permission group doesn’t exist. - -### Get user user permission groups membership per permission group - -- Method: `GET` -- Params: none -- Response: - -```JSON -{ - "is_moderator": bool, - "is_admin": bool -} -``` - -### Add user in permission group - -- Method: `POST` -- Params: none -- Response: - - On failure: `{"error": "…"}` - - On success: JSON of the `user.info` - -### Remove user from permission group - -- Method: `DELETE` -- Params: none -- Response: - - On failure: `{"error": "…"}` - - On success: JSON of the `user.info` -- Note: An admin cannot revoke their own admin status. - -## `/api/pleroma/admin/activation_status/:nickname` - -### Active or deactivate a user - -- Method: `PUT` -- Params: - - `nickname` - - `status` BOOLEAN field, false value means deactivation. - -## `/api/pleroma/admin/relay` - -### Follow a Relay - -- Methods: `POST` -- Params: - - `relay_url` -- Response: - - On success: URL of the followed relay - -### Unfollow a Relay - -- Methods: `DELETE` -- Params: - - `relay_url` -- Response: - - On success: URL of the unfollowed relay - -## `/api/pleroma/admin/invite_token` - -### Get a account registeration invite token - -- Methods: `GET` -- Params: none -- Response: invite token (base64 string) - -## `/api/pleroma/admin/email_invite` - -### Sends registration invite via email - -- Methods: `POST` -- Params: - - `email` - - `name`, optionnal - -## `/api/pleroma/admin/password_reset` - -### Get a password reset token for a given nickname - -- Methods: `GET` -- Params: none -- Response: password reset token (base64 string) |