Cisco Unity Connection Provisioning Interface (CUPI) API -- User Notification Devices API

From DocWiki

Revision as of 09:03, 1 November 2013 by Deeptija (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Links to Other API pages: Cisco_Unity_Connection_APIs

CUPI Guide Contents
API Overview
Index of All CUPI Documentation

Contents



User Notification Devices API

The following URI can be used to view the user template object ID:

GET https://<connection-server>/vmrest/users/<user-object>

From the above URI, get the notification devices object ID:

GET https://<connection-server>/vmrest/users/<user-objectid>/usernotificationdevices

Pager

PUT:https://<connection-server>/vmrest/users/<user-objectid>/notificationdevices/pagerdevices/<pagerobjectid>
<PagerDevice>
  <RetriesOnBusy>4</RetriesOnBusy>
  <RetriesOnRna>4</RetriesOnRna>
  <RetriesToWait>10</RetriesToWait>
  <BusyRetryInterval>5</BusyRetryInterval>
  <RnaRetryInterval>15</RnaRetryInterval>
</PagerDevice>

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

JSON Example

PUT https://<connection-server>/vmrest/users/<user-objectid>/notificationdevices/pagerdevices/<pagerobjectid>
Accept: application/json
Content-type: application/json
Connection: keep-alive
{
  "FailDeviceObjectId":"c5ce04c1-e76e-4075-97f9-471ac49b7e85"
}

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

NOTE: To activate notification device <PhoneNumber> parameter is mandatory and <RepeatInterval > parameter is mandatory to enable repeat notify. The provided values can be changed and possible values are given in the Explanation of Fields: Pager and Phone table.


Listing Pager Device

JSON Example

To view pager devices, do the following:

GET https://<connection-server>/vmrest/users/<users>/<user-objectid>/notificationdevices/pagerdevices/<pagerobjectId>
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/users/9375d893-c8eb-437b-90bf-7de4b1d0c3e8/notificationdevices/pagerdevices/6215dce7-cf4a-469a-8722-035b6228ba3d"
 "TransmitForcedAuthorizationCode":"false"
 "AfterDialDigits":""
 "BusyRetryInterval":"5"
 "DialDelay":"1"
 "PhoneNumber":"123"
 "RetriesOnBusy":"10"
 "RetriesOnRna":"10"
 "RingsToWait":"10"
 "RnaRetryInterval":"1"
 "SendCount":"false"
 "WaitConnect":"false"
 "MediaSwitchObjectId":"7b092808-d815-4c0b-a10d-d02d3f5090b8"
 "PhoneSystemURI":"/vmrest/phonesystems/7b092808-d815-4c0b-a10d-d02d3f5090b8"
 "ObjectId":"6215dce7-cf4a-469a-8722-035b6228ba3d"
 "Active":"false"
 "DeviceName":"Pager"
 "DisplayName":"Pager"
 "MaxBody":"512"
 "MaxSubject":"64"
 "SubscriberObjectId":"9375d893-c8eb-437b-90bf-7de4b1d0c3e8"
 "UserURI":"/vmrest/users/9375d893-c8eb-437b-90bf-7de4b1d0c3e8"
 "SendCallerId":"false"
 "Undeletable":"true"
 "SuccessRetryInterval":"1"
 "RetriesOnSuccess":"0"
 "EventList":"NewUrgentFaxUrgentDispatchMessage"
 "ScheduleSetObjectId":"1f360ab8-076e-4cb5-bfde-ef7d3805f037"InitialDelay":"12"
 "VoiceMessage":"false"
 "UrgentOnly":"false"
 "RepeatInterval":"1"
 "RepeatNotify":"true",
 "FailDeviceObjectId":"c5ce04c1-e76e-4075-97f9-471ac49b7e85"
}
Response Code: 200

Create Pager Device

The mandatory parameters are: PhoneNumber, DisplayName, and MediaSwitchObjectId.

 
POST: https://<connection-server>/vmrest/users/<user-objectid>/notificationdevices/pagerdevices
<PagerDevice>
   <PhoneNumber>12334</PhoneNumber>
   <DisplayName>Newpager</DisplayName>
   <MediaSwitchObjectId>8adf6869-4afc-4455-9fd5-d05b68ca6630</MediaSwitchObjectId>
</PagerDevice>

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

JSON Example

POST https://<connection-server>/vmrest/users/<user-objectid>/notificationdevices/pagerdevices
Accept: application/json
Content-type:  application/json
Connection: keep-alive
{
  "DisplayName":"New Pager",
  "PhoneNumber":"1234",
  "MediaSwitchObjectId":"ae63574f-2aaf-4c28-8973-bfa8e3b1dd1c"
}

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/users/<user-objectid>/notificationdevices/pagerdevices/84e72420-615e-4d94-b1df-f1317906cce3

The phone system ID is mandatory to create pager device. URI to get ID for phone system:

https://<connection-server>/vmrest/phonesystems

Phone Devices

GET https://<connection-server>/vmrest/users/<user-objectid>

From above URI get notification devices URI:

https://<connection-server>/vmrest/users/<user-objectid>/usernotificationdevices

Listing Phone Device

GET:https://<connection-server>/vmrest/users/<user-objectid>/notificationdevices/phonedevices/<phone_objectid>

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

Response code: 200

JSON Example

GET https://<connection-server>/vmrest/users/<user-objectid>/notificationdevices/phonedevices/<phone_objectid>
Accept: application/json
Content-type:  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:


<pre>
Response Code: 200

Create Phone Device

The mandatory fields are DisplayName, PhoneNumber, and MediaSwitchObjectId.

POST https://<connection-server>/vmrest/users/<user-objectid>/notificationdevices/phonedevices
<PhoneDevice>
  <DisplayName>Work Phone1</DisplayName>
  <PhoneNumber>123</PhoneNumber>
  <MediaSwitchObjectId>ae63574f-2aaf-4c28-8973-bfa8e3b1dd1c</MediaSwitchObjectId>
</PhoneDevice>

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

JSON Example

POST https://<connection-server>/vmrest/users/<user-objectid>/notificationdevices/phonedevices
Accept: application/json
Content-type: application/json
Connection: keep-alive
{
  "DisplayName":"Work Phone1",
  "PhoneNumber":"123",
  "MediaSwitchObjectId":"ae63574f-2aaf-4c28-8973-bfa8e3b1dd1c"
}

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
URI to get ID for phone system: 
https://<connection-server>/vmrest/phonesystems

Update Phone Device

PUT:https://<connection-server>/vmrest/users/<user-objectid>/notificationdevices/phonedevices/<phone_objectid>
<PhoneDevice>
  <RetriesOnBusy>10</RetriesOnBusy>
  <RetriesOnRna>10</RetriesOnRna>
  <RingsToWait>10</RingsToWait>
  <RnaRetryInterval>1</RnaRetryInterval>
</PhoneDevice>

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

To activate notification device, the <PhoneNumber> parameter is mandatory. The <RepeatInterval> parameter is mandatory to enable repeat notify. The phone devices are of 3 types: Work phone, Home phone, and Mobile phone. You have to provide phone device object id to edit any of the 3 devices.

JSON Example

PUT https://<connection-server>/vmrest/users/<user-objectid>/notificationdevices/phonedevices/<phone_objectid>
Accept: application/json
Content-type:  application/json
Connection: keep-alive
{
  "FailDeviceObjectId":"c5ce04c1-e76e-4075-97f9-471ac49b7e85"
}

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


Delete Phone Device

DELETE https://<connection-server>/vmrest/users/<user-objectid>/notificationdevices/phonedevices/<phone_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

JSON Example

DELETE https://<connection-server>/vmrest/users/<user-objectid>/notificationdevices/phonedevices/<phone_objectid>
Accept: application/json
Content-type: 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

SMTP Device

Listing SMTP Device

GET:https://<Connection-server>/vmrest/user/notificationdevices/smtpdevices

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

Response code: 200

JSON Example

GET https://<connection-server>/vmrest/user/notificationdevices/smtpdevices
Accept: application/json
Content-type:  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/user/notificationdevices/smtpdevices/eb4dbeae-ec87-417c-8cc0-d4ac3ab04942",
   "SendCount": "true",
   "SmtpAddress": "John@cisco.com",
   "StaticText": [],
   "ObjectId": "eb4dbeae-ec87-417c-8cc0-d4ac3ab04942",
   "Active": "false",
   "DeviceName": "SMTP",
   "DisplayName": "SMTP",
   "MaxBody": "512",
   "MaxSubject": "64",
   "SubscriberObjectId": "104b8800-554e-47cd-9fe7-ee16c79ce4d2",
   "SendCallerId": "true",
   "SendPcaLink": "false",
   "Undeletable": "true",
   "HeaderText": "Texoma_Header",
   "FooterText": "Texoma_Footer"
}
Response Code: 200

Update SMTP Device

GET:https://<Connection-server>/vmrest/user/notificationdevices/smtpdevices/<smtpDeviceObjectId>

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

Response code: 204
<SmtpDevice>
  <SmtpAddress>John@cisco.com</SmtpAddress>
  <HeaderText>Texoma_Header</HeaderText>
  <FooterText>Texoma_Footer</FooterText>
</SmtpDevice>


JSON Example

PUT https://<connection-server>/vmrest/user/notificationdevices/smtpdevices/<smtpDeviceObjectId>
Accept: application/json
Content-type: application/json
Connection: keep-alive
{   
  "SmtpAddress": "John@cisco.com",
  "HeaderText": "Texoma_Header",
  "FooterText": "Texoma_Footer"
}

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

Explanation of Data Fields

Device Name Data Type Operations Comments
DeviceName String(12) Read Only Device name of HTML notification device.
DisplayName String(64) Read Only The preferred text name of the notification device to be used when displaying entries in the administrative console, e.g. Cisco Unity Connection Administration. For example, "Home Phone," Pager 2," "Work Phone, " etc.
Active Boolean Read Only Enable notification device.

Values:

  • true:Enable the device
  • false:Do not enable the notification device
EventList String Read Only By default it is NewVoiceMail.

Possible values:

  • All Voice messages: NewVoiceMail
  • All voice message urgent only: NewUrgentVoiceMail

Default value:NewVoiceMail

SmtpAddress String(320) Read Only SMTP address to be notified.
ObjectId String(36) Read Only Unique identifier of Notification Device
DisableMobileNumberFromPCA Boolean Read Only Disable Outdial Number From Cisco PCA

Values:

  • false:Enable Outdial Number From Cisco PCA (Default value)
  • True:Disable Outdial Number From Cisco PCA
CallbackNumber Integer Read Only Outdial Number
SubscriberObjectId String(36) Read Only The unique identifier of the Subscriber object to which this notification device belongs.
ScheduleSetObjectId String(36) Read Only The unique identifier of the Schedule
DisableTemplateSelectionFromPCA Boolean Read Only Disable HTML Template selection From Cisco PCA
  • true:Disable
  • false:enable

Default value is false.

AllowVoiceMailAsAttachment Boolean Read Only A flag indicating whether Cisco Unity Connection will allow notifier to send voice mail recording with the notification.

false: Don't Allow notifier to send voice mail recording with the notification true: Allow notifier to send voice mail recording with the notification Default value is false.

NotificationTemplateID String(36) readonly The unique identifier of the Notification Template object which this notification device is using for HTML based notification This URI can be used to fetch NotificationTemplateID
https://<Connectio-server>/vmrest/notificationtemplates
PhoneNumber String r/w The phone number to dial, including the trunk access code (if any), of the device.
Undeletable Boolean readonly flag indicating whether HTML cannot be deleted or not.

Possible values:

  • true: For default HTML Device
  • false:For other userdefined HTML Devices

Enum Type

Name Value Description
SystemGreeting 0 System greeting - Cisco Unity Connection plays a prerecorded greeting along with the recorded name of the subscriber (for example, "Sorry, <subscriber name> is not available"). If the subscriber does not have a recorded name, Cisco Unity Connection plays the subscriber extension instead. When a greeting is enabled but not recorded, Cisco Unity Connection plays a prerecorded system greeting.
RecordedGreeting 1 Recorded greeting - use a personal recording for the call handler (or subscriber). This can be recorded over the phone or from the Cisco Unity Connection Administration and CPCA administrative interfaces on the call handler/subscriber.
NoGreeting 2 No greeting is played.

Rating: 0.0/5 (0 votes cast)

Personal tools