Blogs

« Back

Quick API to find the number of messages in a mailbox

I get asked this question a lot -
How do I get a quick count on the number of messages in a mailbox?

The CUMI API for Unity Connection makes it really easy to do this.
When making the REST API call, if the pagenumber parameter is specified as “0”, the response will include attribute named “total” which indicates the number of total messages in the queried folder and the message list in the XML is suppressed,

Examples -

All Inbox messages count (Authenticating with the users credentials )
GET https://<UCxn server>/vmrest/mailbox/folders/inbox/messages?pagenumber=0
returns -
Response:
<Messages total="4"/>

All Inbox messages count (Authenticating as as administrator having the “Mailbox access delegate” role)
GET https://<UCxn server>/vmrest/mailbox/folders/inbox/messages?pagenumber=0
returns -
Response:
<Messages total="4"/>
Comments
No comments yet. Be the first.

Search CDN

 Go

By API/SDK: