Accounts-account-email-domain-usernames-mailboxName-messagestats:GET
From Hostway API Documentation
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 90) |
Mike.robski (Talk | contribs) m (1 revision: Release 91) |
||
(One intermediate revision by one user not shown) | |||
Line 112: | Line 112: | ||
== See also == | == See also == | ||
− | * [[Email | + | * [[Email API|Email API]] |
{{disqus}} | {{disqus}} | ||
[[Category:Hostway API]] | [[Category:Hostway API]] | ||
[[Category:Email API]] | [[Category:Email API]] |
Latest revision as of 11:18, 11 March 2014
GET /accounts/{account}/email/{domain}/usernames/{mailboxName}/mailbox/messagestats
Retrieves mailbox message count for INBOX, SENT and SPAM folders
Contents |
Request
GET /accounts/{account}/email/{domain}/usernames/{mailboxName}/mailbox/messagestats
URI Parameters
- account - string
- domain - string
- mailboxName - string
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
Response
Status Code
- 200 OK
- Success
- 401 Unauthorized
- The supplied credentials are invalid or do not provide permissions for this operation.
- 404 Not Found
- The domain name or the mailbox does not exist.
- Unable to get message count for virtual mailboxes.
- 500 Internal Server Error
- Missing Domain or Installation records
- 502 Bad Gateway
- Unable to get message count. No IMAP connection
- Unable to get message count. IMAP search operation failed.
- Unable to get message count. IMAP folder selection failed.
Response Body
{ "messageCount" : { "inbox" : { "allMessages" : {inbox_all_messages_count}, "unreadMessages" : {inbox_unread_messages_count} }, "sent" : { "allMessages" : {sent_all_messages_count}, "unreadMessages" : {sent_unread_messages_count} }, "spam" : { "allMessages" : {spam_all_messages_count}, "unreadMessages" : {sent_unread_messages_count} } }, "links": [{"href": "https://api.hostway.com/accounts/{account}/email/{domain}/usernames/{mailboxName}/mailbox/messagestats/, "rel": "self"}] }
Parameters
- inbox_all_messages_count- integer
- All messages for INBOX folder
- inbox_unread_messages_count- integer
- Unread messages for INBOX folder
- sent_all_messages_count- integer
- All messages for SENT folder
- sent_unread_messages_count- integer
- Unread messages for SENT folder
- spam_all_messages_count- integer
- All messages for SPAM folder
- spam_unread_messages_count- integer
- Unread messages for SPAM folder
Examples
Success
Request
GET /accounts/{account}/email/{domain}/usernames/{mailboxName}/mailbox/messagestats
Response
200 OK { "messageCount" : { "inbox" : { "allMessages" : 3, "unreadMessages" : 3 }, "sent" : { "allMessages" : 0, "unreadMessages" : 0 }, "spam" : { "allMessages" : 0, "unreadMessages" : 0 } }, "links": [{"href": "https://api.hostway.com/accounts/{account}/email/{domain}/usernames/{mailboxName}/mailbox/messagestats/", "rel": "self"}] }
See also