Cisco Unity Connection Provisioning Interface (CUPI) API -- User Template Notification Devices
From DocWiki
m (1 revision) |
(→About Notification Devices) |
||
| Line 28: | Line 28: | ||
The factory default User Template for Voicemail Users contains five Notification Devices: three Phone Devices (Home, Work, and Mobile), one Pager Device, one HTML device, and one SMTP Device. Any of these default Notification Devices can be modified, and new Devices of any of four specialized types (phone, pager, HTML, and SMTP) can be created or deleted. | The factory default User Template for Voicemail Users contains five Notification Devices: three Phone Devices (Home, Work, and Mobile), one Pager Device, one HTML device, and one SMTP Device. Any of these default Notification Devices can be modified, and new Devices of any of four specialized types (phone, pager, HTML, and SMTP) can be created or deleted. | ||
| + | |||
| + | For information on minimum software required with this API, see [[Cisco_Unity_Connection_Provisioning_Interface_(CUPI)_API_--_Basic_User_Template_Information#Minimum_Software_Version]] | ||
== Listing and Viewing Notification Devices == | == Listing and Viewing Notification Devices == | ||
Latest revision as of 09:42, 3 October 2012
Links to Other API pages: Cisco_Unity_Connection_APIs
| CUPI Guide Contents |
| API Overview Index of All CUPI Documentation |
Contents |
About Notification Devices
This page contains information on how to use the API to create, list, update, and delete Notification Devices.
Cisco Unity Connection supports four different types of Notification Devices:
- Phone Devices
- Pager Devices
- HTML Devices
- SMTP Devices
The generic Notification Device resource contains the data fields that are common to most or all of the specialized Device resources, which in turn may contain additional data fields that are specific to certain Device resources. A listing of all data fields, including a description of what they mean and which specialized Device types support them, can be found later in this document.
In order to create, update, or delete a Notification Device, an API user must use the appropriate specialized Device resource. In other words, an API user can retrieve all of a user's Notification Devices, but if they then want to update a particular Phone Device, they must do the update operation on the Phone Device resource, not the Notification Device resource. This will be explained in more detail below.
The Notification Device resource and the four specialized Device resources contain data fields from the Device objects in the database, plus some data fields from the Notification Rule object. From an API user's perspective, this detail may not usually be important, but it is worth mentioning that the Device resources collapse two database objects into a single resource. This can be safely done because there is always a one-to-one mapping in the database of Notification Devices and Notification Rules.
The factory default User Template for Voicemail Users contains five Notification Devices: three Phone Devices (Home, Work, and Mobile), one Pager Device, one HTML device, and one SMTP Device. Any of these default Notification Devices can be modified, and new Devices of any of four specialized types (phone, pager, HTML, and SMTP) can be created or deleted.
For information on minimum software required with this API, see Cisco_Unity_Connection_Provisioning_Interface_(CUPI)_API_--_Basic_User_Template_Information#Minimum_Software_Version
Listing and Viewing Notification Devices
Example 1
The following is an example of a GET that lists all Notification Devices of all types for the specified User Template:
https://<connection-server>/vmrest/usertemplates/<objectId>/usertemplatenotificationdevices
The following is the response from the above *GET* request. Notice that this list contains a mix of different types of specialized Devices, since the request was for a list of all Notification Devices. The Type field indicates the specialized Device type for each Notification Device (1 = Phone, 2 = Pager, 4 = SMTP, 8 = HTML).
<UserTemplateNotificationDevices total="7"> <UserTemplateNotificationDevice> <URI>/vmrest/usertemplates/85a845d3-063d-4641-aa70-8b536282bffb/usertemplatenotificationdevices/22b1e3cc-f13d-4349-8811-a196132781a3</URI> <SubscriberObjectId>85a845d3-063d-4641-aa70-8b536282bffb</SubscriberObjectId> <UserURI>/vmrest/users/85a845d3-063d-4641-aa70-8b536282bffb</UserURI> <ObjectId>22b1e3cc-f13d-4349-8811-a196132781a3</ObjectId> <DisplayName>Pager</DisplayName> <Active>false</Active> <BusyRetryInterval>5</BusyRetryInterval> <Type>2</Type> <DialDelay>1</DialDelay> <MaxBody>512</MaxBody> <MaxSubject>64</MaxSubject> <RetriesOnBusy>4</RetriesOnBusy> <RetriesOnRna>4</RetriesOnRna> <RingsToWait>4</RingsToWait> <RnaRetryInterval>15</RnaRetryInterval> <SendCount>true</SendCount> <WaitConnect>true</WaitConnect> <MediaSwitchObjectId>24f1171f-27b3-4ad3-a94c-66d1fb2e448b</MediaSwitchObjectId> <PhoneSystemURI>/vmrest/phonesystems/24f1171f-27b3-4ad3-a94c-66d1fb2e448b</PhoneSystemURI> <TransmitForcedAuthorizationCode>false</TransmitForcedAuthorizationCode> <DeviceName>Pager</DeviceName> <PromptForId>false</PromptForId> <SendCallerId>true</SendCallerId> <SendPcaLink>false</SendPcaLink> <Undeletable>true</Undeletable> <MediaSwitchDisplayName>PhoneSystem</MediaSwitchDisplayName> <DetectTransferLoop>false</DetectTransferLoop> <SuccessRetryInterval>1</SuccessRetryInterval> <RetriesOnSuccess>0</RetriesOnSuccess> <EventList>NewVoiceMail</EventList> <ScheduleSetObjectId>a884af0a-dd5f-4597-8bc7-31a61e8b612a</ScheduleSetObjectId> <InitialDelay>0</InitialDelay> <RepeatInterval>0</RepeatInterval> <RepeatNotify>false</RepeatNotify> </UserTemplateNotificationDevice> <UserTemplateNotificationDevice> <URI>/vmrest/usertemplates/85a845d3-063d-4641-aa70-8b536282bffb/usertemplatenotificationdevices/d2e67ebc-a987-441d-a168-88d1d7dc49c2</URI> <SubscriberObjectId>85a845d3-063d-4641-aa70-8b536282bffb</SubscriberObjectId> <UserURI>/vmrest/users/85a845d3-063d-4641-aa70-8b536282bffb</UserURI> <ObjectId>d2e67ebc-a987-441d-a168-88d1d7dc49c2</ObjectId> <DisplayName>PagerDevice</DisplayName> <Active>false</Active> <BusyRetryInterval>5</BusyRetryInterval> <Type>2</Type> <DialDelay>1</DialDelay> <MaxBody>512</MaxBody> <MaxSubject>64</MaxSubject> <RetriesOnBusy>4</RetriesOnBusy> <RetriesOnRna>4</RetriesOnRna> <RingsToWait>4</RingsToWait> <RnaRetryInterval>15</RnaRetryInterval> <SendCount>true</SendCount> <WaitConnect>true</WaitConnect> <MediaSwitchObjectId>24f1171f-27b3-4ad3-a94c-66d1fb2e448b</MediaSwitchObjectId> <PhoneSystemURI>/vmrest/phonesystems/24f1171f-27b3-4ad3-a94c-66d1fb2e448b</PhoneSystemURI> <TransmitForcedAuthorizationCode>false</TransmitForcedAuthorizationCode> <DeviceName>Other</DeviceName> <PromptForId>false</PromptForId> <SendCallerId>true</SendCallerId> <SendPcaLink>false</SendPcaLink> <Undeletable>false</Undeletable> <MediaSwitchDisplayName>PhoneSystem</MediaSwitchDisplayName> <DetectTransferLoop>false</DetectTransferLoop> <SuccessRetryInterval>1</SuccessRetryInterval> <RetriesOnSuccess>0</RetriesOnSuccess> <EventList>NewVoiceMail</EventList> <ScheduleSetObjectId>a884af0a-dd5f-4597-8bc7-31a61e8b612a</ScheduleSetObjectId> <InitialDelay>0</InitialDelay> <RepeatInterval>0</RepeatInterval> <RepeatNotify>false</RepeatNotify> </UserTemplateNotificationDevice> <UserTemplateNotificationDevice> <URI>/vmrest/usertemplates/85a845d3-063d-4641-aa70-8b536282bffb/usertemplatenotificationdevices/53bd701a-7301-49d0-8404-9769b38094cd</URI> <SubscriberObjectId>85a845d3-063d-4641-aa70-8b536282bffb</SubscriberObjectId> <UserURI>/vmrest/users/85a845d3-063d-4641-aa70-8b536282bffb</UserURI> <ObjectId>53bd701a-7301-49d0-8404-9769b38094cd</ObjectId> <DisplayName>Work Phone</DisplayName> <Active>false</Active> <BusyRetryInterval>5</BusyRetryInterval> <Conversation>SubNotify</Conversation> <Type>1</Type> <DialDelay>1</DialDelay> <MaxBody>512</MaxBody> <MaxSubject>64</MaxSubject> <RetriesOnBusy>4</RetriesOnBusy> <RetriesOnRna>4</RetriesOnRna> <RingsToWait>4</RingsToWait> <RnaRetryInterval>15</RnaRetryInterval> <SendCount>false</SendCount> <WaitConnect>true</WaitConnect> <MediaSwitchObjectId>24f1171f-27b3-4ad3-a94c-66d1fb2e448b</MediaSwitchObjectId> <PhoneSystemURI>/vmrest/phonesystems/24f1171f-27b3-4ad3-a94c-66d1fb2e448b</PhoneSystemURI> <TransmitForcedAuthorizationCode>false</TransmitForcedAuthorizationCode> <DeviceName>Work Phone</DeviceName> <PromptForId>false</PromptForId> <SendCallerId>false</SendCallerId> <SendPcaLink>false</SendPcaLink> <Undeletable>true</Undeletable> <MediaSwitchDisplayName>PhoneSystem</MediaSwitchDisplayName> <DetectTransferLoop>false</DetectTransferLoop> <SuccessRetryInterval>0</SuccessRetryInterval> <RetriesOnSuccess>0</RetriesOnSuccess> <EventList>NewVoiceMail</EventList> <ScheduleSetObjectId>a884af0a-dd5f-4597-8bc7-31a61e8b612a</ScheduleSetObjectId> <InitialDelay>0</InitialDelay> <RepeatInterval>0</RepeatInterval> <RepeatNotify>false</RepeatNotify> </UserTemplateNotificationDevice> <UserTemplateNotificationDevice> <URI>/vmrest/usertemplates/85a845d3-063d-4641-aa70-8b536282bffb/usertemplatenotificationdevices/fa8d720c-7c03-4506-867f-780636b00c13</URI> <SubscriberObjectId>85a845d3-063d-4641-aa70-8b536282bffb</SubscriberObjectId> <UserURI>/vmrest/users/85a845d3-063d-4641-aa70-8b536282bffb</UserURI> <ObjectId>fa8d720c-7c03-4506-867f-780636b00c13</ObjectId> <DisplayName>Home Phone</DisplayName> <Active>false</Active> <BusyRetryInterval>5</BusyRetryInterval> <Conversation>SubNotify</Conversation> <Type>1</Type> <DialDelay>1</DialDelay> <MaxBody>512</MaxBody> <MaxSubject>64</MaxSubject> <RetriesOnBusy>4</RetriesOnBusy> <RetriesOnRna>4</RetriesOnRna> <RingsToWait>4</RingsToWait> <RnaRetryInterval>15</RnaRetryInterval> <SendCount>false</SendCount> <WaitConnect>true</WaitConnect> <MediaSwitchObjectId>24f1171f-27b3-4ad3-a94c-66d1fb2e448b</MediaSwitchObjectId> <PhoneSystemURI>/vmrest/phonesystems/24f1171f-27b3-4ad3-a94c-66d1fb2e448b</PhoneSystemURI> <TransmitForcedAuthorizationCode>false</TransmitForcedAuthorizationCode> <DeviceName>Home Phone</DeviceName> <PromptForId>false</PromptForId> <SendCallerId>false</SendCallerId> <SendPcaLink>false</SendPcaLink> <Undeletable>true</Undeletable> <MediaSwitchDisplayName>PhoneSystem</MediaSwitchDisplayName> <DetectTransferLoop>false</DetectTransferLoop> <SuccessRetryInterval>0</SuccessRetryInterval> <RetriesOnSuccess>0</RetriesOnSuccess> <EventList>NewVoiceMail</EventList> <ScheduleSetObjectId>a884af0a-dd5f-4597-8bc7-31a61e8b612a</ScheduleSetObjectId> <InitialDelay>0</InitialDelay> <RepeatInterval>0</RepeatInterval> <RepeatNotify>false</RepeatNotify> </UserTemplateNotificationDevice> <UserTemplateNotificationDevice> <URI>/vmrest/usertemplates/85a845d3-063d-4641-aa70-8b536282bffb/usertemplatenotificationdevices/24cd2817-2911-4668-b740-24369c4b0d19</URI> <SubscriberObjectId>85a845d3-063d-4641-aa70-8b536282bffb</SubscriberObjectId> <UserURI>/vmrest/users/85a845d3-063d-4641-aa70-8b536282bffb</UserURI> <ObjectId>24cd2817-2911-4668-b740-24369c4b0d19</ObjectId> <DisplayName>Mobile Phone</DisplayName> <Active>false</Active> <BusyRetryInterval>5</BusyRetryInterval> <Conversation>SubNotify</Conversation> <Type>1</Type> <DialDelay>1</DialDelay> <MaxBody>512</MaxBody> <MaxSubject>64</MaxSubject> <RetriesOnBusy>4</RetriesOnBusy> <RetriesOnRna>4</RetriesOnRna> <RingsToWait>4</RingsToWait> <RnaRetryInterval>15</RnaRetryInterval> <SendCount>false</SendCount> <WaitConnect>true</WaitConnect> <MediaSwitchObjectId>24f1171f-27b3-4ad3-a94c-66d1fb2e448b</MediaSwitchObjectId> <PhoneSystemURI>/vmrest/phonesystems/24f1171f-27b3-4ad3-a94c-66d1fb2e448b</PhoneSystemURI> <TransmitForcedAuthorizationCode>false</TransmitForcedAuthorizationCode> <DeviceName>Mobile Phone</DeviceName> <PromptForId>false</PromptForId> <SendCallerId>false</SendCallerId> <SendPcaLink>false</SendPcaLink> <Undeletable>true</Undeletable> <MediaSwitchDisplayName>PhoneSystem</MediaSwitchDisplayName> <DetectTransferLoop>false</DetectTransferLoop> <SuccessRetryInterval>0</SuccessRetryInterval> <RetriesOnSuccess>0</RetriesOnSuccess> <EventList>NewVoiceMail</EventList> <ScheduleSetObjectId>a884af0a-dd5f-4597-8bc7-31a61e8b612a</ScheduleSetObjectId> <InitialDelay>0</InitialDelay> <RepeatInterval>0</RepeatInterval> <RepeatNotify>false</RepeatNotify> </UserTemplateNotificationDevice> <UserTemplateNotificationDevice> <URI>/vmrest/usertemplates/85a845d3-063d-4641-aa70-8b536282bffb/usertemplatenotificationdevices/d6871a13-4680-428a-a839-afb6d3b46b6b</URI> <SubscriberObjectId>85a845d3-063d-4641-aa70-8b536282bffb</SubscriberObjectId> <UserURI>/vmrest/users/85a845d3-063d-4641-aa70-8b536282bffb</UserURI> <ObjectId>d6871a13-4680-428a-a839-afb6d3b46b6b</ObjectId> <DisplayName>SMTP</DisplayName> <Active>false</Active> <BusyRetryInterval>0</BusyRetryInterval> <Type>4</Type> <DialDelay>0</DialDelay> <MaxBody>512</MaxBody> <MaxSubject>64</MaxSubject> <RetriesOnBusy>0</RetriesOnBusy> <RetriesOnRna>0</RetriesOnRna> <RingsToWait>0</RingsToWait> <RnaRetryInterval>0</RnaRetryInterval> <SendCount>true</SendCount> <WaitConnect>false</WaitConnect> <TransmitForcedAuthorizationCode>false</TransmitForcedAuthorizationCode> <DeviceName>SMTP</DeviceName> <PromptForId>false</PromptForId> <SendCallerId>true</SendCallerId> <SendPcaLink>false</SendPcaLink> <Undeletable>true</Undeletable> <DetectTransferLoop>false</DetectTransferLoop> <SuccessRetryInterval>0</SuccessRetryInterval> <RetriesOnSuccess>0</RetriesOnSuccess> <EventList>NewVoiceMail</EventList> <ScheduleSetObjectId>a884af0a-dd5f-4597-8bc7-31a61e8b612a</ScheduleSetObjectId> <InitialDelay>0</InitialDelay> <RepeatInterval>0</RepeatInterval> <RepeatNotify>false</RepeatNotify> </UserTemplateNotificationDevice> <UserTemplateNotificationDevice> <URI>/vmrest/usertemplates/85a845d3-063d-4641-aa70-8b536282bffb/usertemplatenotificationdevices/9f2f0ce2-0567-421a-bd89-973ceecb8518</URI> <SubscriberObjectId>85a845d3-063d-4641-aa70-8b536282bffb</SubscriberObjectId> <UserURI>/vmrest/users/85a845d3-063d-4641-aa70-8b536282bffb</UserURI> <ObjectId>9f2f0ce2-0567-421a-bd89-973ceecb8518</ObjectId> <DisplayName>HTML</DisplayName> <Active>false</Active> <BusyRetryInterval>0</BusyRetryInterval> <Type>8</Type> <DialDelay>0</DialDelay> <MaxBody>512</MaxBody> <MaxSubject>64</MaxSubject> <RetriesOnBusy>0</RetriesOnBusy> <RetriesOnRna>0</RetriesOnRna> <RingsToWait>0</RingsToWait> <RnaRetryInterval>0</RnaRetryInterval> <SendCount>false</SendCount> <SmtpAddress>aaaa</SmtpAddress> <WaitConnect>false</WaitConnect> <TransmitForcedAuthorizationCode>false</TransmitForcedAuthorizationCode> <DeviceName>HTML</DeviceName> <PromptForId>false</PromptForId> <SendCallerId>false</SendCallerId> <SendPcaLink>false</SendPcaLink> <Undeletable>true</Undeletable> <DetectTransferLoop>false</DetectTransferLoop> <SuccessRetryInterval>0</SuccessRetryInterval> <RetriesOnSuccess>0</RetriesOnSuccess> <EventList>NewVoiceMail</EventList> <ScheduleSetObjectId>a884af0a-dd5f-4597-8bc7-31a61e8b612a</ScheduleSetObjectId> <InitialDelay>0</InitialDelay> <RepeatInterval>0</RepeatInterval> <RepeatNotify>false</RepeatNotify> </UserTemplateNotificationDevice> </UserTemplateNotificationDevices>
Response Code: 200
Example 2
The following is an example of a GET that lists a particular Notification Devices for the specified User Template:
https://<connection_server>/vmrest/usertemplates/<objectId>/usertemplatenotificationdevices/<objectId>
The following is the response from the above *GET* request.
<UserTemplateNotificationDevice> <URI>/vmrest/usertemplates/85a845d3-063d-4641-aa70-8b536282bffb/usertemplatenotificationdevices/9f2f0ce2-0567-421a-bd89-973ceecb8518</URI> <SubscriberObjectId>85a845d3-063d-4641-aa70-8b536282bffb</SubscriberObjectId> <UserURI>/vmrest/users/85a845d3-063d-4641-aa70-8b536282bffb</UserURI> <ObjectId>9f2f0ce2-0567-421a-bd89-973ceecb8518</ObjectId> <DisplayName>HTML</DisplayName> <Active>false</Active> <Type>8</Type> <MaxBody>512</MaxBody> <MaxSubject>64</MaxSubject> <SmtpAddress>aaaa</SmtpAddress> <DeviceName>HTML</DeviceName> <Undeletable>true</Undeletable> <EventList>NewVoiceMail</EventList> <ScheduleSetObjectId>a884af0a-dd5f-4597-8bc7-31a61e8b612a</ScheduleSetObjectId> <InitialDelay>0</InitialDelay> <RepeatInterval>0</RepeatInterval> <RepeatNotify>false</RepeatNotify> </UserTemplateNotificationDevice> <pre> Response Code: 200
Adding a New Notification Device
This section contains information on how to create notification devices:
- Adding Pager Notification Device
- Adding Phone Notification Device
- Adding HTML Notification Device
- Adding SMTP Notification Device
- Adding Pager Notification Device
Adding Pager Notification Device
The following is an example of the POST request that adds a Pager Notification Device:
https://<connection_server>/vmrest/usertemplates/<objectId>/notificationdevices/<objectId>
The actual response will depend upon the information given by you.
<UserTemplatePagerDevice> <DisplayName>pager1</DisplayName> <MediaSwitchObjectId>2b6324a2-d66f-4f25-9572-decf88c9a0b7</MediaSwitchObjectId> <PhoneNumber>5656</PhoneNumber> </UserTemplatePagerDevice>
Response Code: 201
Adding Phone Notification Device
The following is an example of the POST request that adds a Phone Notification Device:
https://<connection_server>/vmrest/usertemplates/<objectId>/notificationdevices/<objectId>
The actual response will depend upon the information given by you.
<UserTemplatePhoneDevice> <DisplayName>pager1</DisplayName> <MediaSwitchObjectId>2b6324a2-d66f-4f25-9572-decf88c9a0b7</MediaSwitchObjectId> <PhoneNumber>5656</PhoneNumber> </UserTemplatePhoneDevice>
Response Code: 201
Adding HTML Notification Device
The following is an example of the POST request that adds a HTML Notification Device:
https://<connection_server>/vmrest/usertemplates/<objectId>/notificationdevices/<objectId>
The actual response will depend upon the information given by you.
<UserTemplateHtmlDevice> <DisplayName>Html</DisplayName> < SmtpAddress> a@cisco.com</SmtpAddress> <CallbackNumber>1111</CallbackNumber> </UserTemplateHtmlDevice>
Response Code: 201
Adding SMTP Notification Device
The following is an example of the POST request that adds a HTML Notification Device:
https://<connection_server>/vmrest/usertemplates/<objectId>/notificationdevices/<objectId>
The actual response will depend upon the information given by you.
<UserTemplateSmtpDevice> <DisplayName>SMTP</DisplayName> <SmtpAddress> a@cisco.com</SmtpAddress> <PhoneNumber>5656</PhoneNumber> </UserTemplateSmtpDevice>
Response Code: 201
Modifying Notification Device
The following is an example of the PUT request that modifies a Notification Device as represented by <objectId>:
https://<connection_server>/vmrest/usertemplates/<objectId>/usertemplatenotificationdevices/<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:
<UserTemplatePhoneDevice> <Active>false</Active> <RepeatInterval>0</RepeatInterval> <RepeatNotify>true</RepeatNotify> <PhoneNumber>123456</PhoneNumber> <AfterDialDigits>11111</AfterDialDigits> <DialDelay>0</DialDelay> <RingsToWait>100</RingsToWait> <RetriesOnBusy>4</RetriesOnBusy> <RetriesOnRna>4</RetriesOnRna> <BusyRetryInterval>1</BusyRetryInterval> <RnaRetryInterval>100</RnaRetryInterval> <RetriesOnRna>100</RetriesOnRna> <MediaSwitchObjectId>1fb12b1c-cf14-4634-b73d-9b9c58ecdf68</MediaSwitchObjectId> <PromptForId>false</PromptForId> <EventList>NewUrgentFax,UrgentDispatchMessage</EventList> </UserTemplatePhoneDevice>
Response Code: 204
Deleting a New Notification Device
The following is an example of the DELETE request that deletes a Notification Device as represented by <notificationdeviceid>:
https://<connection_server>/vmrest/usertemplates/<objectId>/usertemplatenotificationdevices/<objectId>
The output for this request returns the successful response code.
Response Code: 204