X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=docs%2FAdmin-API.md;h=84adca6ff335df38077ade0c73500bc0f6270df3;hb=3cf7539bca56ce1118bbedaba547d371f3f20eed;hp=2edb31f3c2e71c6ac4b4a63083e386960c3cc80f;hpb=76160122f6d7bf52aee929328acb4d216e4c3504;p=akkoma diff --git a/docs/Admin-API.md b/docs/Admin-API.md index 2edb31f3c..84adca6ff 100644 --- a/docs/Admin-API.md +++ b/docs/Admin-API.md @@ -8,10 +8,15 @@ Authentication is required and the user must be an admin. - 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`) + - *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 @@ -22,7 +27,13 @@ Authentication is required and the user must be an admin. { "deactivated": bool, "id": integer, - "nickname": string + "nickname": string, + "roles": { + "admin": bool, + "moderator": bool + }, + "local": bool, + "tags": array }, ... ] @@ -99,7 +110,7 @@ Authentication is required and the user must be an admin. 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 +### Get user user permission groups membership per permission group - Method: `GET` - Params: none