JAMES-2555 MessageIdReIndexing routes: WebAdmin doc

Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/cfca550a
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/cfca550a
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/cfca550a

Branch: refs/heads/master
Commit: cfca550ac4befd4e009aecee04bbecbb2e1672b3
Parents: 52314f3
Author: Benoit Tellier <btell...@linagora.com>
Authored: Mon Oct 15 11:53:23 2018 +0700
Committer: Benoit Tellier <btell...@linagora.com>
Committed: Tue Oct 23 08:43:46 2018 +0700

----------------------------------------------------------------------
 src/site/markdown/server/manage-webadmin.md | 40 ++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/cfca550a/src/site/markdown/server/manage-webadmin.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/server/manage-webadmin.md 
b/src/site/markdown/server/manage-webadmin.md
index 786b4ab..5b1be84 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -2049,6 +2049,7 @@ Response codes:
  - [ReIndexing a user mails](#ReIndexing_a_user_mails)
  - [ReIndexing a mailbox mails](#ReIndexing_a_mailbox_mails)
  - [ReIndexing a single mail](#ReIndexing_a_single_mail)
+ - [ReIndexing a single mail by 
messageId](#ReIndexing_a_single_mail_by_messageId)
 
 Be also aware of the limits of these APIs:
 
@@ -2234,6 +2235,45 @@ Warning: During the re-indexing, the result of search 
operations might be altere
 
 Warning: Canceling this task should be considered unsafe as it will leave the 
currently reIndexed mailbox as partially indexed.
 
+### ReIndexing a single mail by messageId
+
+```
+curl -XPOST http://ip:port/mailboxIndex/messages/{messageId}?task=reIndex
+```
+
+Will schedule a task for reIndexing a single email in all the mailboxes 
containing it.
+
+Note that 'messageId' path parameter needs to be a (implementation dependent) 
valid messageId.
+
+The response to that request will be the scheduled `taskId` :
+
+```
+{"taskId":"5641376-02ed-47bd-bcc7-76ff6262d92a"}
+```
+
+Positionned headers:
+
+ - Location header indicates the location of the resource associated with the 
scheduled task. Example:
+
+```
+Location: /tasks/3294a976-ce63-491e-bd52-1b6f465ed7a2
+```
+
+Response codes:
+
+ - 201: Success. Corresponding task id is returned.
+ - 400: Error in the request. Details can be found in the reported error.
+
+The scheduled task will have the following type `MessageIdReIndexingTask` and 
the following `additionalInformation`:
+
+```
+{
+  "messageId":"18"
+}
+```
+
+Warning: During the re-indexing, the result of search operations might be 
altered.
+
 ## Task management
 
 Some webadmin features schedules tasks. The task management API allow to 
monitor and manage the execution of the following tasks.


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

Reply via email to