From 4a9d61ddaf45d5e9ee2de40f4e95868e4a39dcba Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Tue, 15 Oct 2013 16:41:07 -0700 Subject: [PATCH] Updated REST (markdown) --- REST.md | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/REST.md b/REST.md index 1c0dc58..e7ec728 100644 --- a/REST.md +++ b/REST.md @@ -13,8 +13,46 @@ A JSON array of message header maps, containing the following fields: * Id - message identifier, will be unique for this mailbox, but not across mailboxes * From - message sender * Subject - message subject line -* Date - date message was received (not the date specified by SMTP headers) in [ISO 8601][http://en.wikipedia.org/wiki/ISO_8601] format. +* Date - date message was received (not the date specified by SMTP headers) in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. * Size - size of headers + message in bytes ### Example +Request: `GET /mailbox/swaks` + +Response: + + [ + { + "Mailbox":"swaks", + "Id":"20131015T161202-0000", + "From":"jamehi03@server.com", + "Subject":"Swaks Plain Text", + "Date":"2013-10-15T16:12:02.231532239-07:00", + "Size":264 + }, + { + "Mailbox":"swaks", + "Id":"20131015T161202-0001", + "From":"jamehi03@server.com", + "Subject":"Swaks HTML", + "Date":"2013-10-15T16:12:02.292145012-07:00", + "Size":705 + }, + { + "Mailbox":"swaks", + "Id":"20131015T161202-0002", + "From":"jamehi03@server.com", + "Subject":"Swaks Attachment", + "Date":"2013-10-15T16:12:02.358027334-07:00", + "Size":4802 + }, + { + "Mailbox":"swaks", + "Id":"20131015T161202-0003", + "From":"jamehi03@server.com", + "Subject":"Test of ȇɲʢȯȡɪɴʛ", + "Date":"2013-10-15T16:12:02.424206527-07:00", + "Size":2946 + } + ]