Cisco Unity Connection Provisioning Interface (CUPI) API -- Routing Rule Conditions

From DocWiki

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


Routing Rule Condition API

Administrator can use this API to create/update/delete/fetch the routing rule condition. Various attributes of routing rule condition can also be updated using this API.

Listing the Routing Rule Conditions

JSON Example

To list all the routing rule conditions use the following command:

Request URI:

GET https://<connection-server>/vmrest/routingrules/<routingrulesobjectId>/routingruleconditions
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",
     "RoutingRuleCondition": [
     {
     "URI": "/vmrest/routingrules/bd8b8092-1c08-4d25-8d35-116d7a677bf4/routingruleconditions/06d1d4e2-45f7-4f9d-b083-ac19bfc9347f",
     "ObjectId": "06d1d4e2-45f7-4f9d-b083-ac19bfc9347f",
     "RoutingRuleObjectId": "bd8b8092-1c08-4d25-8d35-116d7a677bf4",
     "RoutingRuleURI": "/vmrest/routingrules/bd8b8092-1c08-4d25-8d35-116d7a677bf4",
     "Parameter": "1",
     "Operator": "1",
     "OperandValue": "1000-2000"
     },

     {
     "URI": "/vmrest/routingrules/bd8b8092-1c08-4d25-8d35-116d7a677bf4/routingruleconditions/08019fb3-265b-48fb-a973-d5128b62572e",
     "ObjectId": "08019fb3-265b-48fb-a973-d5128b62572e",
     "RoutingRuleObjectId": "bd8b8092-1c08-4d25-8d35-116d7a677bf4",
     "RoutingRuleURI": "/vmrest/routingrules/bd8b8092-1c08-4d25-8d35-116d7a677bf4",
     "Parameter": "2",
     "Operator": "2",
     "OperandValue": "4242"
     }
]
}
Response Code: 200

Creating a Routing Rule Condition

JSON Example

To create new routing rule condition, do the following:

Request URI:

POST https://<connection-server>/vmrest/routingrules/<routingrulesobjectId>/routingruleconditions
Accept: application/json
Content-Type: application/json
Connection: keep-alive

Request Body:
{
     "Parameter": "2",
     "Operator": "3",
     "OperandValue": "3000"
}

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

Updating a Routing Rule Condition

JSON Example

To update display name of routing rule condition, do the following:

Request URI:

PUT https://<connectionserver>/vmrest/routingrules/<routingrulesobjectId>/routingruleconditions/<routingruleconditionobjectId>
Accept: application/json
Content-Type: application/json
Connection: keep-alive

Request Body:
{
     "OperandValue": "5011"
}

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 Routing Rule Condition

JSON Example

To delete routing rule condition, do the following:

DELETE https://<connectionserver>/vmrest/routingrules/<routingrulesobjectId>/routingruleconditions/<routingruleconditionobjectId>
Accept: application/json
Connection: keep-alive
Response Code: 204

Explanation of Data Fields

Parameter Data Type Operations Comments
URI Read Only String URI of the routing rule condition
ObjectId Read Only String(36) Unique identifier for Routing rule condition
RoutingRuleObjectId Read Only String(36) Object Id of the routing rule to which this routing rule condition belongs.
RoutingRuleURI Read Only String URI of the routing rule which is associated with the routing rule condition Parameter Read/Write Integer Type of parameter in a routing rule, such as "dialed number" or "port id".

Possible values:

  • 1 :CallingNumber
  • 2 : DialedNumber
  • 3 : ForwardingStation
  • 4 :Origin
  • 5 :PhoneSystem
  • 6 : PortID
  • 7 : Reason
  • 8 : Schedule
  • 9 : TrunkID
Operator Read/Write Integer Type of operator in this condition - equals, greater than, etc.

Possible value:

  • 1 : IN
  • 2 : EQ
  • 3 : GT
  • 4 : LT
  • 5 : LTE
  • 6 : GTE
OperandValue Read/Write String(64) Value of operand in condition. This could be a port number, a phone number, etc. depending on parameter value.
  • Minimum Length: 0
  • Maximum Length: 64
MediaSwitchObjectId Read/Write String(36) The unique identifier of the phone system that can be used as a condition for a routing rule.
MediaPortObjectId Read/Write String(36) The unique identifier of the media port that can be used as a condition for a routing rule.Value displayed when Routing Rule Condition based on Phone System/Port is created.
PhoneSystemURI Read Only String Value displayed when Routing Rule Condition based on Phone System is created.
PortURI Read Only String Value displayed when Routing Rule Condition based on Port is created.

Rating: 0.0/5 (0 votes cast)

Personal tools