This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 3f84bfa4aaef80fcf79aba3cf9331fcacc0aa226
Author: Benoit TELLIER <btell...@linagora.com>
AuthorDate: Thu Nov 21 12:56:53 2024 +0100

    JAMES-4091 Documentation for webadmin channel details
---
 .../modules/servers/partials/operate/webadmin.adoc | 90 +++++++++++++++++++++
 src/site/markdown/server/manage-webadmin.md        | 92 +++++++++++++++++++++-
 2 files changed, 181 insertions(+), 1 deletion(-)

diff --git a/docs/modules/servers/partials/operate/webadmin.adoc 
b/docs/modules/servers/partials/operate/webadmin.adoc
index 9403184aaa..d12da0692a 100644
--- a/docs/modules/servers/partials/operate/webadmin.adoc
+++ b/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:
+
+....
+[
+    {
+        "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"
+        }
+    }
+]
+....
+
+Be warned that the output can be very large if a significant count of channels 
is opened.
\ No newline at end of file
diff --git a/src/site/markdown/server/manage-webadmin.md 
b/src/site/markdown/server/manage-webadmin.md
index d1ddc4ba01..addfe133dd 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/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:
+
+```
+[
+ {
+  "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"
+  }
+ }
+]
+```
+
+Be warned that the output can be very large if a significant count of channels 
is opened.
\ No newline at end of file


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

Reply via email to