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

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


Message Aging Policy

In Cisco Unity Connection, the Message Aging Policies ensures that the hard disk where voice messages are stored does not get filled up. Each policy allows you to specify message aging rules to automatically:

  • Move new messages to the Saved Items folder after a specified number of days.
  • Move read messages to the Deleted Items folder after a specified number of days.
  • Permanently delete messages in the Deleted Items folder after a specified number of days. In the Default System Policy message aging policy, this is the only rule that is enabled.
  • Based on the age of the messages, permanently delete secure messages that have been touched in any way (for example by saving, deleting, or opening but then saving messages as new).
  • Based on the age of the messages, permanently delete all secure messages regardless of whether users have listened to or touched the messages in any way.

Note: There are total numbers of 2 Default Message Aging Policies:

  • Default System Policy
  • Do Not Age Messages

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


Listing the Message Aging Policies

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

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

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

<MessageAgingPolicies total="2">
  <MessageAgingPolicy>
    <URI>/vmrest/messageagingpolicies/0f02be4e-5d70-4a1d-b182-ce14ede90ac0</URI>
    <ObjectId>0f02be4e-5d70-4a1d-b182-ce14ede90ac0</ObjectId>
    <Enabled>true</Enabled>
    <DisplayName>Default System Policy</DisplayName>
    <MessageAgingRuleURI>/vmrest/messageagingpolicies/0f02be4e-5d70-4a1d-b182-
    ce14ede90ac0/messageagingrules</MessageAgingRuleURI>
  </MessageAgingPolicy>
  <MessageAgingPolicy>
    <URI>/vmrest/messageagingpolicies/7f762fe2-ef33-4664-afb9-bd47c2ef7e41</URI>
    <ObjectId>7f762fe2-ef33-4664-afb9-bd47c2ef7e41</ObjectId>
    <Enabled>false</Enabled>
    <DisplayName>Do Not Age Messages</DisplayName>
    <MessageAgingRuleURI>/vmrest/messageagingpolicies/7f762fe2-ef33-4664-afb9-
    bd47c2ef7e41/messageagingrules</MessageAgingRuleURI>
  </MessageAgingPolicy>
</MessageAgingPolicies>
Response Code: 200

JSON Example

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

Request URI:
GET https://<connection-server>/vmrest/messageagingpolicies
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":"2"
  "MessageAgingPolicy":[
  {
    "URI":"/vmrest/messageagingpolicies/adac77f4-8a77-430d-8836-0fc9aef3fef5"
    "ObjectId":"adac77f4-8a77-430d-8836-0fc9aef3fef5"
    "Enabled":"true"
    "DisplayName":"Default System Policy"
    "MessageAgingRuleURI":"/vmrest/messageagingpolicies/adac77f4-8a77-430d-8836-
    0fc9aef3fef5/messageagingrules"
  }
  {
    "URI":"/vmrest/messageagingpolicies/2e02eca6-270b-4b7f-a153-f03ea74d403d"
    "ObjectId":"2e02eca6-270b-4b7f-a153-f03ea74d403d"
    "Enabled":"false"
    "DisplayName":"Do Not Age Messages"
    "MessageAgingRuleURI":"/vmrest/messageagingpolicies/2e02eca6-270b-4b7f-a153-
    f03ea74d403d/messageagingrules"
  }
  ]
}
Response Code: 200


Viewing the Specific Message Aging Policy

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/messageagingpolicies/<messageagingpolicyobject-id>

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

<MessageAgingPolicy>
    <URI>/vmrest/messageagingpolicies/3f3f9297-e1eb-46a5-bbdf-d86298e2531c</URI>
    <ObjectId>3f3f9297-e1eb-46a5-bbdf-d86298e2531c</ObjectId>
    <Enabled>true</Enabled>
    <DisplayName>Texoma_Message_Policy</DisplayName>
    <MessageAgingRuleURI>/vmrest/messageagingpolicies/3f3f9297-e1eb-46a5-bbdf-
d86298e2531c/messageagingrules</MessageAgingRuleURI>
</MessageAgingPolicy> 
Response Code: 200

JSON Example

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

Request URI:
GET https://<connection-server>/vmrest/messageagingpolicies/<messageagingpolicyobject-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/messageagingpolicies/3f3f9297-e1eb-46a5-bbdf-d86298e2531c"
    "ObjectId":"3f3f9297-e1eb-46a5-bbdf-d86298e2531c"
    "Enabled":"true"
    "DisplayName":"Default System Policy"
    "MessageAgingRuleURI":"/vmrest/messageagingpolicies/3f3f9297-e1eb-46a5-bbdf-
d86298e2531c/messageagingrules"
}
Response Code: 200


Creating a Message Aging Policy

Example 1: The following is an example of the POST request that creates a message aging policy:

*POST https://<connection-server>/vmrest/messageagingpolicies
Request Body:
<MessageAgingPolicy>
    <DisplayName>Texoma_Message_Policy</DisplayName>
</MessageAgingPolicy>

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/messageagingpolicies/3f3f9297-e1eb-46a5-bbdf-d86298e2531c

JSON Example

To create new message aging policy, do the following:

Request URI:
POST https://<connection-server>/vmrest/messageagingpolicies
Accept: application/json
Content-Type: application/json
Connection: keep-alive
Request Body:
{
    "DisplayName":"Texoma_Message_Policy"
} 

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/messageagingpolicies/3f3f9297-e1eb-46a5-bbdf-d86298e2531c 

Example 2: The following is the example of the create a new message aging policy with some more parameter

*POST https://<connection-server>/vmrest/messageagingpolicies
Request Body:
<MessageAgingPolicy>
    <DisplayName>Texoma_New_Message_Policy</DisplayName>
    <Enabled>false</Enabled>
</MessageAgingPolicy>

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/messageagingpolicies/3f3f9297-e1eb-46a5-bbdf-d86298e2531c


Updating a Message Aging Policy Parameters

The following is an example of the PUT request that allows you to update the display name of message aging policy:

*PUT https://<connection-server>/vmrest/messageagingpolicies/<messageagingpolicyobject-id>
Request Body:
<MessageAgingPolicy>
    <DisplayName>Texoma_Message_Policy_2</DisplayName>
</MessageAgingPolicy>

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

Response Code: 204

JSON Example

To update the display name of message aging policy, do the following:

Request URI:
PUT https://<connection-server>/vmrest/messageagingpolicies/<messageagingpolicyobject-id>
Accept: application/json
Content-Type: application/json
Connection: keep-alive
Request Body:
{
    "DisplayName":"Texoma_Message_Policy_2"
}

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 a Message Aging Policy

The following is an example of the DELETE request that deletes a message aging policy with a valid object ID:

DELETE https://<connection-server>/vmrest/messageagingpolicies<messageagingpolicyobject-id>

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

To delete a message aging policy with a valid object ID, do the following:

DELETE https://<connection-server>/vmrest/messageagingpolicies<messageagingpolicyobject-id>
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 Operations Data Type Comments
DisplayName Read/Write String Name of the Message Aging Policy

Maximum length: 64

Enabled Read/Write Boolean Specifies if message aging rules to be applied or not.

Possible values:

  • true: If message aging rules to be enforced.
  • false: If message aging rules to be ignored.

Default value is true.

MessageAgingRuleURI Read Only String Specifies the URI of message aging rules.
ObjectId Read Only String Object Id of the message aging policy.

Maximum length : 36

URI Read Only String Specifies the message aging policy URI.

Rating: 0.0/5 (0 votes cast)

Personal tools