[Credo] fix Credo.Check.Readability.AliasOrder
[akkoma] / docs / Admin-API.md
index 508981d38353fc2dc99185ca0f58ba290e5fe404..2edb31f3c2e71c6ac4b4a63083e386960c3cc80f 100644 (file)
@@ -7,17 +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
-[
+{
+  "page_size": integer,
+  "count": integer,
+  "users": [
     {
-        "deactivated": bool,
-        "id": integer,
-        "nickname": string
+      "deactivated": bool,
+      "id": integer,
+      "nickname": string
     },
     ...
-]
+  ]
+}
 ```
 
 ## `/api/pleroma/admin/user`
@@ -49,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
 }
 ```
 
@@ -81,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
 }
 ```
 
@@ -98,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
 }
 ```