Cisco Unity Connection Provisioning Interface (CUPI) API -- Mailbox Store API

From DocWiki

Jump to: navigation, search

Links to Other API pages: Cisco_Unity_Connection_APIs

CUPI Guide Contents
API Overview
Index of All CUPI Documentation


Contents


Mailbox Store API

Mailbox Stores Configuration

Administrator can use this APIs for creating, reading, modifying and deleting mailbox stores for listing,viewing, creation, selection, and deletion. During installation, Cisco Unity Connection automatically creates:

  • A mailbox store database for information on voice messages (who each message was sent to,when it was sent, the location of the WAV file on the hard disk, and so on).
  • An operating-system directory for voice message WAV files.
  • An administrator with the required permissions can create up to four additional mailbox stores. Each additional mailbox store includes:
  • Another mailbox-store database for information on voice messages that are saved in that mailbox store. The database is pre-sized for an average of approximately 40 messages each for 10,000 users, or about 1.25 GB. (The database application currently being used for Connection cannot dynamically resize a database after it is created.)
  • Another operating-system directory for the voice message WAV files and other message attachments.


Listing the Mailbox Stores

The following is an example of the GET request that lists all the mailbox stores:

GET https://<connection-server>/vmrest/mailboxstores

The following is the response from the above *GET* request.

<MailboxStores total="1">
  <MailboxStore>
     <URI>/vmrest/mailboxstores/fd3ad7cd-805d-4727-82dd-c05dae4261c0</URI>
     <MailDatabase>UnityMbxDb1</MailDatabase>
     <Server>ucbu-aricent-vm256.cisco.com</Server>
     <ObjectId>fd3ad7cd-805d-4727-82dd-c05dae4261c0</ObjectId>
     <Mounted>true</Mounted>
     <RequiredSecurity>0</RequiredSecurity>
     <MailboxStoreType>0</MailboxStoreType>
     <DisplayName>Unity Messaging Database -1</DisplayName>
     <DbInstance>ciscounity</DbInstance>
     <Status>0</Status>
     <Undeletable>true</Undeletable>
     <LastError>0</LastError>
     <MaxSizeMB>15000</MaxSizeMB>
     <TotalSizeOfMailbox>0.0 Kilobytes</TotalSizeOfMailbox>
     <TimeAtWhichSizeCalculated>2013-04-10 22:59:23.323</TimeAtWhichSizeCalculated>
     <MailboxURI>/vmrest/mailboxstores/fd3ad7cd-805d-4727-82ddc05dae4261c0/
     mailboxes</MailboxURI>
  </MailboxStore>
</MailboxStores>
Response Code: 200

JSON Example

To list all mailboxstores(GET), do the following:

Request URI:
GET https://<connection-server>/vmrest/mailboxstores
Accept: application /json
Connection: keep-alive

The following is the response from the above *GET* request and the actual response will depend upon the information given by you:

{
  "@total": "1",
  "MailboxStore": {
     "URI": "/vmrest/mailboxstores/2668cf73-c234-4fb4-82e1-8b7299485b3c",
     "MailDatabase": "UnityMbxDb1",
     "Server": "ucbu-aricent-vm506.cisco.com",
     "ObjectId": "2668cf73-c234-4fb4-82e1-8b7299485b3c",
     "Mounted": "true",
     "RequiredSecurity": "0",
     "MailboxStoreType": "0",
     "DisplayName": "Unity Messaging Database -1",
     "DbInstance": "ciscounity",
     "Status": "0",
     "Undeletable": "true",
     "LastError": "0",
     "MaxSizeMB": "15000",
     "TotalSizeOfMailbox": "0.0 Kilobytes",
     "TimeAtWhichSizeCalculated":"2013-04-10 22:59:23.323",
     "MailboxURI": "/vmrest/mailboxstores/2668cf73-c234-4fb4-82e1-
     8b7299485b3c/mailboxes"
     }
  }
Response Code: 200


Viewing the Specific Mailbox Stores

The following is an example of the GET request that lists the details of specific mailbox stores represented by the provided value of mailbox store object ID:

GET https://<connection-server>/vmrest/mailboxstores /<mailboxstore-objectid>

The following is the response from the above *GET* request:

  <MailboxStore>
     <URI>/vmrest/mailboxstores/fd3ad7cd-805d-4727-82dd-c05dae4261c0</URI>
     <MailDatabase>UnityMbxDb1</MailDatabase>
     <Server>ucbu-aricent-vm256.cisco.com</Server>
     <ObjectId>fd3ad7cd-805d-4727-82dd-c05dae4261c0</ObjectId>
     <Mounted>true</Mounted>
     <RequiredSecurity>0</RequiredSecurity>
     <MailboxStoreType>0</MailboxStoreType>
     <DisplayName>Unity Messaging Database -1</DisplayName>
     <DbInstance>ciscounity</DbInstance>
     <Status>0</Status>
     <Undeletable>true</Undeletable>
     <LastError>0</LastError>
     <MaxSizeMB>15000</MaxSizeMB>
     <TotalSizeOfMailbox>0.0 Kilobytes</TotalSizeOfMailbox>
     <TimeAtWhichSizeCalculated>2013-04-10 22:59:23.323</TimeAtWhichSizeCalculated>
     <MailboxURI>/vmrest/mailboxstores/fd3ad7cd-805d-4727-82ddc05dae4261c0/
     mailboxes</MailboxURI>
  </MailboxStore>
Response Code: 200

JSON Example

To view individual mailbox store (GET), do the following:

Request URI:
GET https://<connection-server>/vmrest/mailboxstores/<mailboxstore-objectid>
Accept: application/json
Connection: keep-alive

The following is the response from the above *GET* request and the actual response will depend upon the information given by you:

{
     "URI": "/vmrest/mailboxstores/2668cf73-c234-4fb4-82e1-8b7299485b3c",
     "MailDatabase": "UnityMbxDb1",
     "Server": "ucbu-aricent-vm506.cisco.com",
     "ObjectId": "2668cf73-c234-4fb4-82e1-8b7299485b3c",
     "Mounted": "true",
     "RequiredSecurity": "0",
     "MailboxStoreType": "0",
     "DisplayName": "Unity Messaging Database -1",
     "DbInstance": "ciscounity",
     "Status": "0",
     "Undeletable": "true",
     "LastError": "0",
     "MaxSizeMB": "15000",
     "TotalSizeOfMailbox": "0.0 Kilobytes",
     "TimeAtWhichSizeCalculated":"2013-04-10 22:59:23.323",
     "MailboxURI": "/vmrest/mailboxstores/2668cf73-c234-4fb4-82e1-8b7299485b3c/mailboxes"
}
Response Code: 200


Viewing the Number of Mailboxes in a Mailbox Store

The following is an example of the GET request that lists the number of mailboxes in a mailbox store represented by the provided value of mailbox store object ID:

GET https://<connection-server>/vmrest/mailboxstores/<mailboxstore-objectid>/mailboxes

The following is the response from the above *GET* request:

Response Code: 200
<Mailboxes total="3"/>

JSON Example

To view the number of mailboxes in a mailbox store, do the following:

Request URI
GET https://<connection-server>/vmrest/mailboxstores/<mailboxstore-objectid>/mailboxes
Accept: application/json
Connection: keep-alive

The following is the response from the above *GET* request and the actual response will depend upon the information given by you:

{
     "@total": "3"
}
Response Code: 200


Creating the Mailbox Store

The parameters that can be given as part of the POST Request Body are : DisplayName, MaxSizeMB,Mounted, Undeletable. Even If the other values such as "server" are mentioned as part of the request body , the values will not be used while creation and default values will be used. The following is an example of the POST request that creates a mailbox store:

  POST https://<connection-server>/vmrest/mailboxstores
  Request Body:
  <MailboxStore>
     <DisplayName>Unity Messaging Database</DisplayName>
     <MaxSizeMB>15000</MaxSizeMB>
  </MailboxStore>

The following is the example of the response from the above *POST* request:

Response Code: 201
/vmrest/voicemailboxstores /2668cf73-c234-4fb4-82e1-8b7299485b3ce

JSON Example

To create a new mailbox store, do the following:

Request URI:
POST https://<connection-server>/vmrest/mailboxstores
Accept: application/json
Content-Type: application/json
Connection: keep-alive
Request Body:
{
     "DisplayName":"Unity Messaging Database",
     "MaxSizeMB":"15000"
}

The following is the response from the above *POST* request and the actual response will depend upon the information given by you:

Response Code: 201
/vmrest/voicemailboxstores /2668cf73-c234-4fb4-82e1-8b7299485b3ce


Updating the Mailbox Stores

The following is an example of the PUT request that allows you to update the content of the mailbox store:

  PUT https://<connection-server>/vmrest/mailboxstores/<mailboxstore-objectid>
Request Body:
  <MailboxStore>
     <Mounted>false</Mounted>
  </MailboxStore>
</pre
<pre>
Response Body: 204

The output for this request returns the successful response code.

JSON Example

To update mounted field of mailbox store, do the following:

Request URI:
PUT https://<connection-server>/vmrest/mailboxstores/<mailboxstore-objectid>
Accept: application/json
Content-Type: application/json
Connection: keep-alive
Request Body:
{
     "Mounted":"false"
}

The following is the response from the above *PUT* request and the actual response will depend upon the information given by you:

Response Code: 204


Deleting the Mailbox Store

The following is an example of the DELETE request that deletes a specific mailbox store where you need to mention the mailbox store object ID:

DELETE https://<connection-server>/vmrest/mailboxstores/<mailboxstore-objectid>

The following is the response from the above *DELETE* request and the actual response will depend upon the information given by you:

Response Code: 204

The output for this request returns the successful response code.

JSON Example

To delete mailbox store, do the following:

DELETE https://<connection-server>/vmrest/mailboxstores/<mailboxstore-objectid>
Accept: application/json
Connection: keep-alive

The following is the response from the above *DELETE* request and the actual response will depend upon the information given by you:

Response Code: 204


Explanation of Data Fields

The following chart lists all of the data fields:

Parameter Data Type Operations Description
URI Read Only String The URI of the mailbox store.
MailDatabase Read Only String (512) The name of the mailbox database,such as "UnityMbxDb1”. For external IMAP mailstores this value will be NULL.
Server Read Only String (256) The name of the server on which the mailbox store resides.
ObjectId Read Only String (36) A globally unique, system-generated identifier for a MailboxStore object.
Mounted Read/Write Boolean A flag indicating whether the mailbox store is mounted. You should check this setting before accessing the mailbox store database. Tools can set it to denote that a mailbox store is offline when offline database maintenance needs to be performed.

Default Value: true

RequiredSecurity Read Only String The method of encryption that Cisco Unity Connection will use on a mailbox store connection. Possible values are:
  • 0: No encryption.
  • 1: TLS level encryption.
  • 2: SSL encryption.
  • 3: IPSec encryption.

Default Value: 0

MailboxStoreType Read Only String The type of mailbox store (e.g.,UMSS). Possible values are:
  • 0: UMSS - Cisco Unity Connection message store solution.
  • 1: IMAP
  • 2: POP3
  • 3: WebDAV
  • 4: MPE_WS Used by the Common Calendaring Library to retrieve calendaring and meeting information from the Meeting Place Express web service.

Default Value: 0

DisplayName Read/Write String (64) A descriptive name for the message Store.
DbInstance Read Only String (256) The name of the dbinstance on which the mailbox store resides.

Default Value: ciscounity Status Read Only String Current status of the mailbox store. Possible values are:

  • 0: OK
  • 1: Moving
  • 2: MoveFailed
  • 3: MoveRequested
Undeletable Read/Write Boolean A flag indicating whether this mailbox store can be deleted. It is used to prevent deletion of factory defaults.

Default Value: true

LastError Read Only String Last error result from a mailbox store maintenance action, that is create or delete. Possible values are:
  • 0: OK
  • 1: UnknownError
  • 2: DuplicateDisplayName
  • 3: InternalNameError
  • 4: DatabaseError
  • 5: InsufficientDiskSpace
  • 6: MailstoreNotEmpty
  • 7: MailstoreStillReferenced:This error is returned when deleting an mbx database is still referenced by another object (user template,etc).
  • 8: MailstoreOverMaxSize
  • 9: MailstoreNotFound
  • 10: MailstoreUndeletable
  • 11: RemoteServerOffline
  • 12: MailstoreNotMounted
  • 13: InvalidRequest
  • 14: MailboxNotMounted
  • 15: MustRunOnPublisher

Default Value: 0

MaxSizeMB Read/Write Integer This is the max size in MB for the mailbox store. The range can vary from 1 to 2147483647.

Default Value: 15000.

TotalSizeOfMailbox Read Only String Total Size of the voicemail messages and the mailbox attachments in the mailbox store.
TimeAtWhichSizeCalculated Read Only String Time at which the total size of mailbox store was calculated.
MailboxesURI Read Only String The URI of the mailboxes.

Rating: 0.0/5 (0 votes cast)

Personal tools