From adac7455122d37058bff2e4a805066f2cd24fbf9 Mon Sep 17 00:00:00 2001 From: Maxim Filippov Date: Fri, 1 Mar 2019 17:34:14 +0300 Subject: Add docs to /users/search --- docs/Admin-API.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'docs') diff --git a/docs/Admin-API.md b/docs/Admin-API.md index 508981d38..ed19bc875 100644 --- a/docs/Admin-API.md +++ b/docs/Admin-API.md @@ -20,6 +20,26 @@ Authentication is required and the user must be an admin. ] ``` +## `/api/pleroma/admin/users/search?query={query}` + +### Search users + +- Method `GET` +- Params: + - `query` +- Response: + +```JSON +[ + { + "deactivated": bool, + "id": integer, + "nickname": string + }, + ... +] +``` + ## `/api/pleroma/admin/user` ### Remove a user -- cgit v1.2.3 From 5b08b470f69738f4528455a58fefe3a8d4acae02 Mon Sep 17 00:00:00 2001 From: Maxim Filippov Date: Fri, 1 Mar 2019 20:13:02 +0300 Subject: Add "local" params to users search --- docs/Admin-API.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/Admin-API.md b/docs/Admin-API.md index ed19bc875..4403620bf 100644 --- a/docs/Admin-API.md +++ b/docs/Admin-API.md @@ -20,13 +20,14 @@ Authentication is required and the user must be an admin. ] ``` -## `/api/pleroma/admin/users/search?query={query}` +## `/api/pleroma/admin/users/search?query={query}&local={local}` -### Search users +### Search users by name or nickname - Method `GET` - Params: - - `query` + - `query`: **string** search term + - `local`: **bool** whether to return only local users - Response: ```JSON -- cgit v1.2.3 From 08c6aeeed7ff5db242050d06e707f99b6d75684d Mon Sep 17 00:00:00 2001 From: Maxim Filippov Date: Sat, 2 Mar 2019 17:32:46 +0300 Subject: Add docs --- docs/Admin-API.md | 49 +++++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 18 deletions(-) (limited to 'docs') diff --git a/docs/Admin-API.md b/docs/Admin-API.md index 4403620bf..407647645 100644 --- a/docs/Admin-API.md +++ b/docs/Admin-API.md @@ -7,20 +7,27 @@ Authentication is required and the user must be an admin. ### List users - Method `GET` +- Params: + - `page`: **integer** page number + - `page_size`: **integer** number of users per page (default is `50`) - Response: ```JSON -[ +{ + "page_size": integer, + "count": integer, + "users": [ { - "deactivated": bool, - "id": integer, - "nickname": string + "deactivated": bool, + "id": integer, + "nickname": string }, ... -] + ] +} ``` -## `/api/pleroma/admin/users/search?query={query}&local={local}` +## `/api/pleroma/admin/users/search?query={query}&local={local}&page={page}&page_size={page_size}` ### Search users by name or nickname @@ -28,17 +35,23 @@ Authentication is required and the user must be an admin. - Params: - `query`: **string** search term - `local`: **bool** whether to return only local users + - `page`: **integer** page number + - `page_size`: **integer** number of users per page (default is `50`) - 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 +83,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 +115,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 +132,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 } ``` -- cgit v1.2.3