All folder
operations can be executed by a user when connecting with his/her credentials.
When using the administrative credentials, using the userobjectid parameter
will allow administrators to do the same operations on the users mailbox.
A GET operation
on a folder returns a message list:
GET /vmrest/mailbox/folders/inbox/messages
|
Response:
<Messages total="1">
<Message>
<Subject>Message from user1 (1001)</Subject>
<Read>true</Read>
<Dispatch>false</Dispatch>
<Secure>false</Secure>
<Priority>Normal</Priority>
<Sensitivity>Normal</Sensitivity>
<SessionId>122162627c12b61</SessionId>
<URI>/vmrest/messages/0:b4ffbaa5-19ad-4f4f-b95a-933a32e00d64</URI>
<MsgId>0:b4ffbaa5-19ad-4f4f-b95a-933a32e00d64</MsgId>
<From>
<DisplayName>user1</DisplayName>
<SmtpAddress>connectionserver</SmtpAddress>
<DtmfAccessId>1001</DtmfAccessId>
</From>
<CallerId>
<CallerNumber>1001</CallerNumber>
<CallerName>user1</CallerName>
</CallerId>
<ArrivalTime>1522069679000</ArrivalTime>
<Size>37291</Size>
<Duration>3340</Duration>
<IMAPUid>22</IMAPUid>
<FromSub>true</FromSub>
<MsgType>Voice</MsgType>
</Message>
</Messages>
|
A GET operation on messages in Inbox or Delete folder returns a particular message by providing index and messageid.
GET/vmrest/messages/<index>:<messageid>
|
 Note |
Each time an operation is performed on Inbox folder or Delete folder, you should provide index with messageid.
|
Response:
<Message>
<Subject>Message from user1 (1001)</Subject>
<Read>true</Read>
<Dispatch>false</Dispatch>
<Secure>false</Secure>
<Priority>Normal</Priority>
<Sensitivity>Normal</Sensitivity>
<Attachments>
<Attachment>
<URI>/vmrest/messages/0:b4ffbaa5-19ad-4f4f-b95a-933a32e00d64/attachments/0</URI>
<contentType>audio/wav; name=voicemessage.wav</contentType>
<contentTransferEncoding/>
<contentDisposition>inline; filename=VoiceMessage.wav; voice=Voice-Message</contentDisposition>
</Attachment>
</Attachments>
<SessionId>122162627c12b61</SessionId>
<Recipients>
<Recipient>
<Type>TO</Type>
<Address>
<DisplayName/>
<SmtpAddress>connectionserver</SmtpAddress>
<DtmfAccessId>1009</DtmfAccessId>
</Address>
</Recipient>
</Recipients>
<URI>/vmrest/messages/0:b4ffbaa5-19ad-4f4f-b95a-933a32e00d64</URI>
<MsgId>0:b4ffbaa5-19ad-4f4f-b95a-933a32e00d64</MsgId>
<From>
<DisplayName>user1</DisplayName>
<SmtpAddress>user1@ucbu-aricent-vm550.cisco.com</SmtpAddress>
<DtmfAccessId>1001</DtmfAccessId>
</From>
<CallerId>
<CallerNumber>1001</CallerNumber>
<CallerName>user1</CallerName>
</CallerId>
<ArrivalTime>1522069679000</ArrivalTime>
<Size>37291</Size>
<Duration>3340</Duration>
<IMAPUid>22</IMAPUid>
<FromSub>true</FromSub>
<MsgType>Voice</MsgType>
</Message>
|
A user with
administrative privileges can list the messages of another users folder by
passing the userobjectid of the other user:
GET /vmrest/mailbox/folders/inbox/messages?userobjectid=<userobjectid>
|
A user with
administrative privileges can list the messages of another users folder having
USN value greater than specified and by passing the userobjectid of the other
user:
GET /vmrest/mailbox/folders/inbox/messages?userobjectid=<userobjectid>&usngreaterthan=<value>
|
A PUT operation
on messages in Inbox folder can update the Subject or the Read field of the
Messages. No other parameter of a message can be changed:
PUT /vmrest/messages/<messageid>
<Message>
<Subject>New subject</Subject>
</Message>
|
A DELETE
operation on messages in Inbox folder can delete the message from the folder.
Whether the message is soft or hard deleted is dependent on the settings of the
system.
DELETE /vmrest/messages/<message-id>
|
A hard or soft
delete can be forced by passing in the harddelete parameter:
DELETE /vmrest/messages/<message-id>?userobjectid=<userobjectid>&harddelete=<true or false>