cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Quick API to find the number of messages in a mailbox

360
Views
0
Helpful
0
Comments
Advisor
This blog was generated from CDN blog

Created by: Anil Verma on 02-01-2013 04:08:30 PM
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"/>
CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.