Cisco Unity Connection Provisioning Interface (CUPI) API -- Message Aging Text

From DocWiki

Revision as of 10:39, 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


Message Aging Text

Administrator can use this API to create/update/delete/fetch the message aging text.Various attributes of message aging text can also be updated using this API.


Listing the Message Aging Texts

The following is an example of the GET request that lists all the message aging texts:

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

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

<MessageAgingTexts total="1">
  <MessageAgingText>
     <URI>/vmrest/messageagingtexts/0220cac9-6df0-48c2-929f-e38d7ff88e3d</URI>
     <ObjectId>0220cac9-6df0-48c2-929f-e38d7ff88e3d</ObjectId>
     <LanguageCode>1033</LanguageCode>
     <DefaultSubject>Your message from %SENDER% will be moved to the Saved Messages
    folder in %DAYSUNTIL% day(s).</DefaultSubject>
     <Subject/>
     <DefaultBody>Your message from %SENDER%, which was received on
     %MODIFICATIONTIME%, will be moved to the Saved Messages folder in %DAYSUNTIL%
     day(s).</DefaultBody>
     <Body/>
     <UseDefault>false</UseDefault>
     <RuleDescription>Text for Move New Messages to the Saved Messages Folder
   Rule</RuleDescription>
  </MessageAgingText>
<MessageAgingTexts>
Response Code: 200

JSON Example

To list all the message aging texts, do the following:

Request URI:
GET https://<connection-server>/vmrest/messageagingtexts
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"
     "MessageAgingText":[
{
     "URI": "/vmrest/messageagingtexts/0220cac9-6df0-48c2-929f-e38d7ff88e3d",
     "ObjectId": "0220cac9-6df0-48c2-929f-e38d7ff88e3d",
     "LanguageCode": "1033",
     "DefaultSubject": "Your message from %SENDER% will be moved to the Saved Messages
   folder in %DAYSUNTIL% day(s).",
     "Subject": [],
     "DefaultBody": "Your message from %SENDER%, which was received on
   %MODIFICATIONTIME%, will be moved to the Saved Messages folder in %DAYSUNTIL% day(s).",
     "Body": [],
     "UseDefault": "false",
     "RuleDescription": "Text for Move New Messages to the Saved Messages Folder Rule"
  }
  ]
}
Response Code: 200


Viewing the Specific Message Aging Text

The following is an example of the GET request that lists the details of specific message aging policy represented by the provided value of object ID:

GET https://<connection-server>/vmrest/messageagingtexts/<messageagingtextobject-id>

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

<MessageAgingText>
     <URI>/vmrest/messageagingtexts/0220cac9-6df0-48c2-929f-e38d7ff88e3d</URI>
     <ObjectId>0220cac9-6df0-48c2-929f-e38d7ff88e3d</ObjectId>
     <LanguageCode>1034</LanguageCode>
     <DefaultSubject>Your message from %SENDER% will be moved to the Saved Messages folder in
   %DAYSUNTIL% day(s).</DefaultSubject>
     <Subject/>
     <DefaultBody>Your message from %SENDER%, which was received on %MODIFICATIONTIME%,
   will be moved to the Saved Messages folder in %DAYSUNTIL% day(s).</DefaultBody>
     <Body/>
     <UseDefault>true</UseDefault>
     <RuleDescription>Text for Move New Messages to the Saved Messages Folder
   Rule</RuleDescription>
</MessageAgingText>
Response Code: 200

JSON Example

To list details of an individual message aging text, do the following:

Request URI:
GET https://<connection-server>/vmrest/messageagingtexts/<messageagingtextobject-id>
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/messageagingtexts/0220cac9-6df0-48c2-929f-e38d7ff88e3d",
     "ObjectId": "0220cac9-6df0-48c2-929f-e38d7ff88e3d",
     "LanguageCode": "1034",
     "DefaultSubject": "Your message from %SENDER% will be moved to the Saved Messages folder in
   %DAYSUNTIL% day(s).",
     "Subject": [],
     "DefaultBody": "Your message from %SENDER%, which was received on %MODIFICATIONTIME%,
   will be moved to the Saved Messages folder in %DAYSUNTIL% day(s).",
    "Body": [],
    "UseDefault": "true",
    "RuleDescription": "Text for Move New Messages to the Saved Messages Folder Rule"
}
Response Code: 200


Updating a Message Aging Text

Example 1: Update UseDefault Parameter

The following is an example of the PUT request that allows you to update the parameters of message aging text:

  PUT https://<connection-server>/vmrest/messageagingtexts/<messageagingtextobjectid>
Request Body:
<MessageAgingText>
     <UseDefault>Message Aging Text</UseDefault>
</MessageAgingText>

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

To update the parameter of message aging text, do the following:

Request URI:
PUT https://<connection-server>/vmrest/messageagingtexts/<messageagingtextobjectid>
Accept: application/json
Content-Type: application/json
Connection: keep-alive
Request Body:
{
     "UseDefault":"Message Aging Text"
}

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

Example 2: Update Subject and Body of Message Aging Text

The following is an example of the PUT request that allows you to update the parameters of message aging text:

  PUT https://<connection-server>/vmrest/messageagingtexts/<messageagingtextobjectid>
Request Body:
<MessageAgingText>
     <UseDefault>false</UseDefault>
     <Subject>Message aging text</Subject>
     <Body>Message aging Text</Body>
</MessageAgingText>

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

To update the subject and body of message aging text, do the following:

Request URI:
PUT https://<connection-server>/vmrest/messageagingtexts/<messageagingtextobjectid>
Accept: application/json
Content-Type: application/json
Connection: keep-alive
Request Body:
{
     "UseDefault": "False",
     "Subject": "Message Aging test",
     "Body": "Message Aging Text"
}
The following is the response from the above *PUT* request and the actual response will depend upon the information given by you:
<pre>
Response Code: 204


Explanation of Data Fields

The following chart lists all of the data fields:

Parameter Operations Data Type Comments
ObjectId Read Only String(36) Object id of Message aging text
LanguageCode Read/Write Integer The language identifier for this row.
DefaultSubject Read Only String(84) Default data supplied subject
Subject Read/Write String(84) Admin supplied subject. Can be modified or updated only if UseDefault parameter is false.
DefaultBody Read Only String(2048) Default data supplied default body.

Rating: 0.0/5 (0 votes cast)

Personal tools