mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
Update for API v1
@@ -4,7 +4,7 @@ List contents of mailbox.
|
||||
|
||||
### URI
|
||||
|
||||
`GET /mailbox/{name}`
|
||||
`GET /api/v1/mailbox/{name}`
|
||||
|
||||
### Params
|
||||
|
||||
@@ -13,16 +13,16 @@ List contents of mailbox.
|
||||
### Output
|
||||
|
||||
A JSON array of message header maps, containing the following fields:
|
||||
* `Mailbox` - name of the mailbox the message belongs to
|
||||
* `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.
|
||||
* `Size` - size of headers + message in bytes
|
||||
* `mailbox` - name of the mailbox the message belongs to
|
||||
* `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.
|
||||
* `size` - size of headers + message in bytes
|
||||
|
||||
### Example
|
||||
|
||||
Request: `curl -i -H "Accept: application/json" http://localhost:9000/mailbox/swaks`
|
||||
Request: `curl -i -H "Accept: application/json" http://localhost:9000/api/v1/mailbox/swaks`
|
||||
|
||||
Response: (JSON reformatted for readability)
|
||||
|
||||
@@ -34,35 +34,35 @@ Response: (JSON reformatted for readability)
|
||||
|
||||
[
|
||||
{
|
||||
"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-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-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-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
|
||||
"mailbox":"swaks",
|
||||
"id":"20131015T161202-0003",
|
||||
"from":"jamehi03@server.com",
|
||||
"subject":"Test of ȇɲʢȯȡɪɴʛ",
|
||||
"date":"2013-10-15T16:12:02.424206527-07:00",
|
||||
"size":2946
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user