Accounts-account-email-domain-usernames-mailboxName-exchange-messagestats:GET

From Hostway API Documentation
Jump to: navigation, search

GET /accounts/{account}/email/{domain}/usernames/{mailboxName}/exchange/messagestats

Retrieves exchange message count for INBOX, SENT and SPAM folders

Contents


Request

GET /accounts/{account}/email/{domain}/usernames/{mailboxName}/exchange/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}/exchange/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}/exchange/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}/exchange/messagestats/", "rel": "self"}]
}

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox