Arsnael commented on code in PR #2517:
URL: https://github.com/apache/james-project/pull/2517#discussion_r1855736106


##########
src/site/markdown/server/manage-webadmin.md:
##########
@@ -4993,4 +4993,94 @@ Will disconnect `badg...@domain.tld` and 
`badg...@domain.tld`.
 Return code:
 
 - 204: the certificate is reloaded
-- 400: Invalid request
\ No newline at end of file
+- 400: Invalid request
+
+### Listing connected users
+
+```
+curl -XDELETE /servers/connectedUsers
+```
+
+Will return a list of users having channels opened on the server:
+
+```
+[
+"al...@domain.tld",
+"b...@domain.tld"
+]
+```
+
+### Listing channels of a user
+
+```
+curl -XGET /servers/channels/bob@domain
+```
+
+Will return a description and statistics for channels of a user:
+
+```
+[
+ {
+  "protocol": "IMAP",
+  "endpoint": "imapserver",
+  "remoteAddress": "127.0.0.1",
+  "connectionDate": "2024-11-21T10:46:37.476425406Z",
+  "isActive": true,
+  "isOpen": true,
+  "isWritable": true,
+  "isEncrypted": false,
+  "username": "bob@domain",
+  "protocolSpecificInformation": {
+    "loggedInUser": "bob@domain",
+    "isCompressed": "false",
+    "selectedMailbox": "1",
+    "isIdling": "false",
+    "requestCount": "3",
+    "userAgent": "{name=Thunderbird, version=102.7.1}",
+    "cumulativeWrittenBytes": "448",
+    "cumulativeReadBytes": "103",
+    "liveReadThroughputBytePerSecond": "0",
+    "liveWriteThroughputBytePerSecond": "0"
+  }
+ }
+]
+```
+
+
+### Listing all channels
+
+```
+curl -XGET /servers/channels
+```
+
+Will return a description and statistics for channels of a user:

Review Comment:
   ```suggestion
   Will return a description and statistics for channels of all users:
   ```



##########
docs/modules/servers/partials/operate/webadmin.adoc:
##########
@@ -4805,3 +4805,93 @@ Return code:
 
 - 204: the certificate is reloaded
 - 400: Invalid request
+
+=== Listing connected users
+
+....
+curl -XDELETE /servers/connectedUsers
+....
+
+Will return a list of users having channels opened on the server:
+
+....
+[
+    "al...@domain.tld",
+    "b...@domain.tld"
+]
+....
+
+=== Listing channels of a user
+
+....
+curl -XGET /servers/channels/bob@domain
+....
+
+Will return a description and statistics for channels of a user:
+
+....
+[
+    {
+        "protocol": "IMAP",
+        "endpoint": "imapserver",
+        "remoteAddress": "127.0.0.1",
+        "connectionDate": "2024-11-21T10:46:37.476425406Z",
+        "isActive": true,
+        "isOpen": true,
+        "isWritable": true,
+        "isEncrypted": false,
+        "username": "bob@domain",
+        "protocolSpecificInformation": {
+            "loggedInUser": "bob@domain",
+            "isCompressed": "false",
+            "selectedMailbox": "1",
+            "isIdling": "false",
+            "requestCount": "3",
+            "userAgent": "{name=Thunderbird, version=102.7.1}",
+            "cumulativeWrittenBytes": "448",
+            "cumulativeReadBytes": "103",
+            "liveReadThroughputBytePerSecond": "0",
+            "liveWriteThroughputBytePerSecond": "0"
+        }
+    }
+]
+....
+
+
+=== Listing all channels
+
+....
+curl -XGET /servers/channels
+....
+
+Will return a description and statistics for channels of a user:

Review Comment:
   ```suggestion
   Will return a description and statistics for channels of all users:
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org

Reply via email to