[Credo] fix Credo.Check.Readability.AliasOrder
[akkoma] / docs / Admin-API.md
index 4403620bf6d977daa88cc3d2077ba8408e40b4b6..2edb31f3c2e71c6ac4b4a63083e386960c3cc80f 100644 (file)
@@ -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
 }
 ```