Cisco Unity Connection Provisioning Interface (CUPI) API -- User Template External Service Accounts
From DocWiki
(→Explanation of Data Fields) |
m (1 revision) |
Revision as of 17:48, 2 October 2012
Links to Other API pages: Cisco_Unity_Connection_APIs
| CUPI Guide Contents |
| API Overview Index of All CUPI Documentation |
Contents |
About External Service Accounts
A user template may have zero or more unified messaging service accounts (also known as external service accounts). Examples of these services include Cisco Unified MeetingPlace 8.0, Exchange 2003, Exchange 2007, and Exchange 2010. Using CUPI for user templates, an administrator can:
- Retrieve a list of its unified messaging service accounts,
- Retrieve one of its unified messaging service accounts, and
- Change the password for one of its unified messaging service accounts
Listing External Service Accounts
To retrieve a list of unified messaging service accounts, use the GET method with URI:
https://<connection_server>/vmrest/usertemplates/usertemplateobject-id/templateexternalserviceaccounts
In the following example, the user has two unified messaging service accounts, Exchange2K3 and Exchange2K7:
GET https://<connection-server>/vmrest/usertemplates/<usertemplateobject-id>/externalserviceaccounts
<TemplateExternalServiceAccounts total="1"> <TemplateExternalServiceAccount> <URI>/vmrest/usertemplates/85a845d3-063d-4641-aa70-8b536282bffb/templateexternalserviceaccounts/c4e7b01f-8b6e-4a08-9d57-856e81919c66</URI> <EmailAddressUseCorp>false</EmailAddressUseCorp> <EnableCalendarCapability>true</EnableCalendarCapability> <EnableMailboxSynchCapability>true</EnableMailboxSynchCapability> <EnableMeetingCapability>false</EnableMeetingCapability> <EnableTtsOfEmailCapability>true</EnableTtsOfEmailCapability> <ExternalServiceObjectId>26f20913-af8d-465a-8437-707028d376bd</ExternalServiceObjectId> <IsPrimaryMeetingService>false</IsPrimaryMeetingService> <LoginType>0</LoginType> <ObjectId>c4e7b01f-8b6e-4a08-9d57-856e81919c66</ObjectId> <UserTemplateObjectId>85a845d3-063d-4641-aa70-8b536282bffb</UserTemplateObjectId> <UserTemplateURI>/vmrest/usertemplates/85a845d3-063d-4641-aa70-8b536282bffb</UserTemplateURI> <DisplayName>UMS_AP1111I</DisplayName> <ServerType>4</ServerType> <UserTemplateDisplayName>Template</UserTemplateDisplayName> </TemplateExternalServiceAccount> </TemplateExternalServiceAccounts>
Response Code: 200
For each unified messaging service account, CUPI returns the following information:
- URI - The URI for retrieving the unified messaging service account
- IsEnabled - A flag to indicate whether the unified messaging service account is enabled
- UseServiceCredentials - A flag to indicate whether service credentials or user credentials are used to sign in the unified messaging service account
- LoginType - A flag to indicate whether the user alias (0), a guest account (1), or a specified user ID (2) is used to sign in the account
- UserId - The user ID to sign in to the unified messaging service account, if one is used
- ObjectId - The unique ID of the unified messaging service account
- Display Name - The display name of the unified messaging service account
To retrieve a specific unified messaging service account, use the GET method with the URI field from above as follows:
GET http://<connection_server>/vmrest/usertemplates/<objectId>/templateexternalserviceaccounts/<objectId>
<?xml version="1.0" encoding="UTF-8"?> <TemplateExternalServiceAccount> <URI>/vmrest/usertemplates/85a845d3-063d-4641-aa70-8b536282bffb/templateexternalserviceaccounts/c4e7b01f-8b6e-4a08-9d57-856e81919c66</URI> <EmailAddressUseCorp>false</EmailAddressUseCorp> <EnableCalendarCapability>true</EnableCalendarCapability> <EnableMailboxSynchCapability>true</EnableMailboxSynchCapability> <EnableMeetingCapability>false</EnableMeetingCapability> <EnableTtsOfEmailCapability>true</EnableTtsOfEmailCapability> <ExternalServiceObjectId>26f20913-af8d-465a-8437-707028d376bd</ExternalServiceObjectId> <IsPrimaryMeetingService>false</IsPrimaryMeetingService> <LoginType>0</LoginType> <ObjectId>c4e7b01f-8b6e-4a08-9d57-856e81919c66</ObjectId> <UserTemplateObjectId>85a845d3-063d-4641-aa70-8b536282bffb</UserTemplateObjectId> <UserTemplateURI>/vmrest/usertemplates/85a845d3-063d-4641-aa70-8b536282bffb</UserTemplateURI> <DisplayName>UMS_AP1111I</DisplayName> <ServerType>4</ServerType> <UserTemplateDisplayName>Template</UserTemplateDisplayName> </TemplateExternalServiceAccount>
Response Code: 200
Adding New External Service Account
The following is an example of the POST request that adds a Unified Messaging Account:
https://<connection_server>/vmrest/usertemplates/<objectId>/templateexternalserviceaccounts/<objectId>
The actual response will depend upon the information given by you. The following are the mandatory parameters that you need to enter to create a Unified Messaging Account:
<TemplateExternalServiceAccount> <ExternalServiceObjectId>NewUnfiedServiceAccount </ExternalServiceObjectId> <EnableCalendarCapability>true</EnableCalendarCapability> <EnableTtsOfEmailCapability>true</EnableTtsOfEmailCapability> <EnableMailboxSynchCapability>true</EnableMailboxSynchCapability> </TemplateExternalServiceAccount>
</pre> Response Code: 201 </pre>
Modifying External Service Account
The following is an example of the PUT request that modifies a Unified Messaging Account as represented by <unifiedmessagingaccountid>:
https://<connection_server>/vmrest/usertemplates/<objectId>/ templateexternalserviceaccounts /<objectId>
The following is an example of the response from the above *PUT* request and the actual response will depend upon the information given by you:
<TemplateExternalServiceAccount> <EnableCalendarCapability>true</EnableCalendarCapability> <EnableTtsOfEmailCapability>true</EnableTtsOfEmailCapability> <EnableMailboxSynchCapability>true</EnableMailboxSynchCapability> </TemplateExternalServiceAccount>
Response Code: 204
Deleting External Service Account
The following is an example of the DELETE request that deletes a Unified Messaging Account as represented by < externalserviceaccount-id >:
https://<connection_server>/vmrest/usertemplates/<template-object-id>/ templateexternalserviceaccounts /< objectId>
The output for this request returns the successful response code.
Response Code: 204
Explanation of Data Fields
The following chart lists all of the data fields available on External Service Accounts.
| Field Name | Writable? | Available Value | Explanation / Comments |
|---|---|---|---|
| EmailAddressUseCorp | Read/Write | True/False | Use Corporate Email Address |
| EnableCalendarCapability | Read/Write | True/False | Enables users to hear notification of upcoming meetings on the phone. |
| EnableMailboxSynchCapability read/write | Read/Write | True/False | Synchronizes voice messages in Connection and Exchange. |
| EnableMeetingCapability | Read-only | True/False | Enables Meeting Capability |
| EnableTtsOfEmailCapability | Read/Write | True/False | Enables users to access Exchange email messages by using text to speech. |
| ExternalServiceObjectId | Read-only | 36 characters | Displays External Service ObjectId |
| IsPrimaryMeetingService read | Read-only | True/False | Displays Primary Meeting Service |
| LoginType | Read/Write | 0-Login using user's Connection alias used for login
1- Login as guest 2-Login as UserId| Base, Phone, Pager | Dipslays the type of login done by the |
| ObjectId | All | Read-only | ObjectId of the Device |
| UserTemplateURI | Read-only | Displays user template URI | |
| UserTemplateObjectId | Read-only | 36 characters | Displays user template ObjectId |
| DisplayName | All | Read/Write | Friendly name for the Device like "Mobile Phone" |
| ServerType | Read-only | 1-MeetingPlace 8.x,4-Exchange/BPOS-D,5-Office 365 | Displays the name of the external service account |
| UserTemplateDisplayName | Read-only | 1-64 characters | Display Name for User Template. |