Repository: james-project
Updated Branches:
  refs/heads/master dc59e58bf -> ff2acdcd7


JAMES-2321 Add documentation for WebAdmin additionalFields


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

Branch: refs/heads/master
Commit: ff2acdcd7535db3922f2786d072dae4b2b1e42a9
Parents: dc59e58
Author: Gautier DI FOLCO <[email protected]>
Authored: Wed Jun 20 15:31:56 2018 +0200
Committer: Matthieu Baechler <[email protected]>
Committed: Thu Jun 21 16:05:43 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/james-project/blob/ff2acdcd/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 7ba63af..f516efd 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -1399,11 +1399,69 @@ If the Accept header in the request is 
"application/json", then the response loo
     "sender": "[email protected]",
     "recipients": ["[email protected]", "[email protected]"],
     "state": "address-error",
-    "error": "A small message explaining what happened to that mail..."
+    "error": "A small message explaining what happened to that mail...",
+    "remoteHost": "111.222.333.444",
+    "remoteAddr": "127.0.0.1",
+    "lastUpdated": null
 }
 ```
 If the Accept header in the request is "message/rfc822", then the response 
will be the _eml_ file itself.
 
+Additional query parameter `additionalFields` add the existing informations to 
the response for the supported values:
+ - attributes
+ - headers
+ - textBody
+ - htmlBody
+ - messageSize
+ - perRecipientsHeaders
+
+```
+curl -XGET 
http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails/mail-key-1?additionalFields=attributes,headers,textBody,htmlBody,messageSize,perRecipientsHeaders
+```
+
+Give the following kind of response:
+
+```
+{
+    "name": "mail-key-1",
+    "sender": "[email protected]",
+    "recipients": ["[email protected]", "[email protected]"],
+    "state": "address-error",
+    "error": "A small message explaining what happened to that mail...",
+    "remoteHost": "111.222.333.444",
+    "remoteAddr": "127.0.0.1",
+    "lastUpdated": null,
+    "attributes": {
+      "name2": "value2",
+      "name1": "value1"
+    },
+    "perRecipientsHeaders": {
+      "third@party": {
+        "headerName1": [
+          "value1",
+          "value2"
+        ],
+        "headerName2": [
+          "value3",
+          "value4"
+        ]
+      }
+    },
+    "headers": {
+      "headerName4": [
+        "value6",
+        "value7"
+      ],
+      "headerName3": [
+        "value5",
+        "value8"
+      ]
+    },
+    "textBody": "My body!!",
+    "htmlBody": "My <em>body</em>!!",
+    "messageSize": 42424242
+}
+```
 
 Response codes:
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to