Cisco Unity Express -- Mailbox REST PI Service Operation
From DocWiki
Main page: Cisco Unity Express -- REST PI Service Operations
Previous page: Cisco Unity Express -- User and Group Management REST PI Service Operation
Next page: Cisco Unity Express -- Operations and Privileges REST PI Service Operation
Search the Cisco Unity Express documentation on the DocWiki:
Contents |
Mailbox
Classes
Figure 6: Mailbox and MailboxUsage
Mailbox
| Class Name |
Mailbox | ||
|---|---|---|---|
| Extends From |
ManagedBaseElement | ||
| Description |
Represents voicemail mailbox for a subscriber or group. | ||
| XML Namespace |
http://mailbox.model.rest.voicemail.aesop.cisco.com | ||
| Field Name | Type | Constraints | Comments |
|
ownerId |
String |
Required for create operation Length 2 -31 |
userId or groupId of the mailbox owner |
|
announcementOnly |
Boolean |
Specifies that the mailbox cannot be used to leave messages. It is can only be used to make announcements. | |
|
description |
String |
Length 0-64 |
Text description for the mailbox. |
|
enabled |
Boolean |
Denotes if the mailbox is activated or deactivated. | |
|
faxEnabled |
Boolean |
Specifies whether the mailbox is enabled to receive faxes from the fax gateway. | |
|
mailboxSize |
Integer |
Specifies the storage size of the mailbox, in seconds. | |
|
messageExpiry |
Integer |
Range 1-365 |
Specifies the length of time in days that messages can be stored in the mailbox. |
|
messageSize |
Integer |
Range 10-3600 |
Specifies the maximum length in seconds of a message that can be stored in the mailbox. |
|
playTutorial |
Boolean |
Specifies whether the tutorial should be played. The default is enabled. | |
|
pinlessLogin |
PinlessLogin |
Options for allowing voicemail subscribers to login to their mailbox without any PIN. Used for personal mailboxes only. | |
|
secureMsgIncoming |
Boolean |
Indicates if all incoming messages are to be marked "secured". | |
|
secureMsgOutgoing |
String |
Possible values are "global", "never", "ask", "always" and "private" |
Secure message setting for outgoing messages. |
|
usage |
MailboxUsage |
Read Only |
Various data related to the mailbox usage. It is accessed during GET call only. |
PinlessLogin
| Class Name |
PinlessLogin (Enumeration Class) |
|---|---|
| Extends From | |
| Description |
Enumerates options for allowing voicemail subscribers to login to their mailbox without any PIN using either TUI or VoiceView Express (VVE). A subscriber can login into his mailbox without a PIN either from his primary extension or from any other phone based on the "pinlessLogin" configuration for that subscriber. For personal mailboxes only. |
| XML Namespace |
http://mailbox.model.rest.voicemail.aesop.cisco.com |
| Enum Values |
AnyPhone, SubscribersPhone, Disabled |
MailboxUsage
| Class Name |
MailboxUsage | ||
|---|---|---|---|
| Extends From |
ManagedBaseElement | ||
| Description |
Used for displaying various usage parameters for a voicemail mailbox. The data provided by this class is read only and not used during POST and PUT operations. | ||
| XML Namespace |
http://mailbox.model.rest.voicemail.aesop.cisco.com | ||
| Field Name | Type | Constraints | Comments |
|
broadcastMessagesCount |
Integer |
Number of broadcast messages in the mailbox. | |
|
deletedMessagesCount |
Integer |
Number of messages deleted from the mailbox. | |
|
faxMessagesCount |
Integer |
Number of faxes in the mailbox. | |
|
futureMessagesCount |
Integer |
Number of messages scheduled for future delivery. | |
|
inUse |
Boolean |
Current activity state of the mailbox. | |
|
lastAccessed |
String |
Time stamp for when the mailbox was last accessed. | |
|
newMessagesCount |
Integer |
Number of new messages in the mailbox. | |
|
savedMessagesCount |
Integer |
Number of saved messages in the mailbox. | |
|
timeUsed |
Integer |
Number of seconds used for currently stored messages. | |
|
totalMessagesCount |
Integer |
Number of all stored messages in the mailbox. |
Resources
| Resource URI | Operation | Input | Return Value |
|---|---|---|---|
|
/voicemail/mailboxes |
GET (read all mailboxes) |
BaseElementList containing "Mailbox" objects. | |
|
POST (create a mailbox) |
Mailbox | ||
|
/voicemail/mailboxes/{ownerid} (ownerid can be either userId or groupId) |
GET (read a mailbox for a given ownerid) |
Mailbox | |
|
PUT (update mailbox for ownerid) |
Mailbox | ||
|
DELETE (delete mailbox owned by ownerid) | |||
|
/voicemail/mailboxes/{ownerid}/usage |
GET (Read usage for a given mailbox) |
MailboxUsage |
Mailbox Examples
Create Mailbox for a User
Create mailbox for user userX. Data for the new mailbox is read from local file ./data/create_mailbox_userx.xml.
$ cat ./data/create_mailbox_userx.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mailbox>
<ownerId>userX</ownerId>
<announcementOnly>false</announcementOnly>
<description>A test mailbox</description>
<enabled>true</enabled>
<faxEnabled>true</faxEnabled>
<mailboxSize>4320</mailboxSize>
<messageExpiry>30</messageExpiry>
<messageSize>240</messageSize>
<pinlessLogin>Disabled</pinlessLogin>
<playTutorial>true</playTutorial>
</mailbox>
$ curl -i -X POST -H 'Authorization: Basic Y2lzY286Y2lzY28=' -H 'Content-type: application/xml' -d @./data/create_mailbox_userx.xml http://172.27.104.144/rest/voicemail/mailboxes
HTTP/1.1 201 Created Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=683EAEECEC68455363B8553AB5D153CC; Path=/rest PI-Version: 8.0.0.150 Location: http://172.27.104.144/rest/voicemail/mailboxes/voicemail/mailboxes/userX Content-Type: text/plain Transfer-Encoding: chunked Date: Fri, 04 Dec 2009 09:11:12 GMT
Created - /voicemail/mailboxes/userX
Read Selective Fields from all Mailboxes
Read fields mailboxSize and description for all mailboxes.
$ curl -i -X GET -H 'Authorization: Basic Y2lzY286Y2lzY28=' http://172.27.104.144/rest/voicemail/mailboxes?fields=description,mailboxSize
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=2D3751D30B72DA71426F6BD88591FE1A; Path=/rest PI-Version: 8.0.0.150 Content-Type: application/octet-stream Transfer-Encoding: chunked Date: Fri, 04 Dec 2009 09:27:50 GMT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<baseElementList>
<baseElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns3="http://mailbox.model.rest.voicemail.aesop.cisco.com"
xsi:type="ns3:mailbox">
<resourceURI>/voicemail/mailboxes/userX</resourceURI>
<description>A test mailbox</description>
<mailboxSize>4320</mailboxSize>
</baseElement>
<baseElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance<nowiki>"
xmlns:ns3="<nowiki>http://mailbox.model.rest.voicemail.aesop.cisco.com<nowiki>"
xsi:type="ns3:mailbox">
<resourceURI>/voicemail/mailboxes/groupX</resourceURI>
<description>GDM for group X</description>
<mailboxSize>4320</mailboxSize>
</baseElement>
</baseElementList>
