This is an automated email from the ASF dual-hosted git repository. rcordier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit a5815a859d2e4e6386fd2f9bacd9f04b4ab91ef3 Author: Tung TRAN <[email protected]> AuthorDate: Wed Aug 4 16:12:36 2021 +0700 JAMES-3621 [Documentation] Mailbox webadmin - Clearing content of mailbox --- .../pages/distributed/operate/webadmin.adoc | 35 +++++++++++++++++++++ src/site/markdown/server/manage-webadmin.md | 36 +++++++++++++++++++++- 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/docs/modules/servers/pages/distributed/operate/webadmin.adoc b/docs/modules/servers/pages/distributed/operate/webadmin.adoc index d7be9d1..6dd5dd7 100644 --- a/docs/modules/servers/pages/distributed/operate/webadmin.adoc +++ b/docs/modules/servers/pages/distributed/operate/webadmin.adoc @@ -1358,6 +1358,41 @@ Response codes: * 400: Invalid mailbox name * 404: Invalid get on user mailboxes. The `usernameToBeUsed` or `mailboxName` does not exit' +=== Clearing mailbox content + +.... +curl -XDELETE http://ip:port/users/{usernameToBeUsed}/mailboxes/{mailboxName}/messages +.... + +Will schedule a task for clearing all the mails in ``mailboxName`` mailbox of ``usernameToBeUsed``. + +link:#_endpoints_returning_a_task[More details about endpoints returning +a task]. + +Resource name `usernameToBeUsed` should be an existing user. + +Resource name `mailboxName` should not be empty, nor contain `% *` characters, nor starting with `#`. + +Response codes: + +* 201: Success. Corresponding task id is returned. +* 400: Invalid mailbox name +* 404: Invalid get on user mailboxes. The `username` or `mailboxName` does not exit + +The scheduled task will have the following type `ClearMailboxContentTask` and +the following `additionalInformation`: + +.... +{ + "mailboxName": "mbx1", + "messagesFailCount": 9, + "messagesSuccessCount": 10, + "timestamp": "2007-12-03T10:15:30Z", + "type": "ClearMailboxContentTask", + "username": "[email protected]" +} +.... + === Subscribing a user to all of its mailboxes .... diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md index 936f82c..41bf71b 100644 --- a/src/site/markdown/server/manage-webadmin.md +++ b/src/site/markdown/server/manage-webadmin.md @@ -992,7 +992,7 @@ by an admin to ensure Cassandra message consistency. - [Recomputing User JMAP fast message view projection](#Recomputing_User_JMAP_fast_message_view_projection) - [Counting emails](#Counting_emails) - [Counting unseen emails](#Couting_unseen_emails) - + - [Clearing mailbox content][#Clearing_mailbox_content] ### Creating a mailbox ``` @@ -1204,6 +1204,40 @@ Response codes: - 404: Invalid get on user mailboxes. The `usernameToBeUsed` or `mailboxName` does not exit' +### Clearing mailbox content + +``` +curl -XDELETE http://ip:port/users/{usernameToBeUsed}/mailboxes/{mailboxName}/messages +``` + +Will schedule a task for clearing all the mails in `mailboxName` mailbox of `usernameToBeUsed`. + +[More details about endpoints returning a task](#Endpoints_returning_a_task). + +Resource name `usernameToBeUsed` should be an existing user. + +Resource name `mailboxName` should not be empty, nor contain `% *` characters, nor starting with `#`. + +Response codes: + +- 201: Success. Corresponding task id is returned. +- 400: Invalid mailbox name +- 404: Invalid get on user mailboxes. The `username` or `mailboxName` does not exit + +The scheduled task will have the following type `ClearMailboxContentTask` and +the following `additionalInformation`: + +``` +{ + "mailboxName": "mbx1", + "messagesFailCount": 9, + "messagesSuccessCount": 10, + "timestamp": "2007-12-03T10:15:30Z", + "type": "ClearMailboxContentTask", + "username": "[email protected]" +} +``` + ### Subscribing a user to all of its mailboxes ``` --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
