X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=docs%2FAdmin-API.md;h=2edb31f3c2e71c6ac4b4a63083e386960c3cc80f;hb=59518cbcd8bcc0fe98f2d05ef88d3e2ff68a256f;hp=4403620bf6d977daa88cc3d2077ba8408e40b4b6;hpb=5b08b470f69738f4528455a58fefe3a8d4acae02;p=akkoma diff --git a/docs/Admin-API.md b/docs/Admin-API.md index 4403620bf..2edb31f3c 100644 --- a/docs/Admin-API.md +++ b/docs/Admin-API.md @@ -7,38 +7,26 @@ Authentication is required and the user must be an admin. ### List users - Method `GET` +- Query Params: + - `query`: **string** *optional* search term + - `local_only`: **bool** *optional* whether to return only local users + - `page`: **integer** *optional* page number + - `page_size`: **integer** *optional* number of users per page (default is `50`) - Response: ```JSON -[ - { - "deactivated": bool, - "id": integer, - "nickname": string - }, - ... -] -``` - -## `/api/pleroma/admin/users/search?query={query}&local={local}` - -### Search users by name or nickname - -- Method `GET` -- Params: - - `query`: **string** search term - - `local`: **bool** whether to return only local users -- Response: - -```JSON -[ +{ + "page_size": integer, + "count": integer, + "users": [ { - "deactivated": bool, - "id": integer, - "nickname": string + "deactivated": bool, + "id": integer, + "nickname": string }, ... -] + ] +} ``` ## `/api/pleroma/admin/user` @@ -70,9 +58,9 @@ Authentication is required and the user must be an admin. ```JSON { - "deactivated": bool, - "id": integer, - "nickname": string + "deactivated": bool, + "id": integer, + "nickname": string } ``` @@ -102,8 +90,8 @@ Authentication is required and the user must be an admin. ```JSON { - "is_moderator": bool, - "is_admin": bool + "is_moderator": bool, + "is_admin": bool } ``` @@ -119,8 +107,8 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret ```JSON { - "is_moderator": bool, - "is_admin": bool + "is_moderator": bool, + "is_admin": bool } ```