Cisco Unity Connection Provisioning Interface (CUPI) API -- Partition API

From DocWiki

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


Partition API

Administrator can use this API to create, update, delete, or fetch the partition. In Cisco Unity Connection, you create partitions as a way to group together objects to which callers and users can address messages or place calls while interacting with Connection. One or more partitions can be grouped together as members of a search space, and a partition can be a member of more than one search space. The following types of objects belong to a partition:

  • User Templates
  • Call Handler Templates
  • Contact Templates
  • Users with mailboxes (primary extension)
  • User alternate extensions
  • Contacts (including VPIM contacts)
  • System distribution lists
  • System call handlers
  • Directory handlers
  • Interview handlers
  • VPIM locations

Extensions must be unique within a partition, although partitions can contain objects that do not have an associated extension (for example, some contacts and system distribution lists). The names of objects do not have to be unique within a partition. Administrator-defined contact phone numbers also do not need to be unique within a partition.


Listing the Partitions

The following is an example of the GET request that lists all the existing partitions:

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

The following is the response from the above *GET* request:

<Partitions total="2">
  <Partition>
     <URI>/vmrest/partitions/53e16c90-1cc6-4bde-b6c8-77daf1d31d02</URI>
     <ObjectId>53e16c90-1cc6-4bde-b6c8-77daf1d31d02</ObjectId>
     <Name>ucbu-aricent-vm256 Partition</Name>
     <Description>Default Partition</Description>
     <LocationObjectId>6e81cad2-9c0b-42c1-bb6f-4edb38a70cbd</LocationObjectId>
     <LocationURI>/vmrest/locations/connectionlocations/6e81cad2-9c0b-42c1-bb6f-
    4edb38a70cbd</LocationURI>
  </Partition>
  <Partition>
     <URI>/vmrest/partitions/924ee2d5-758b-4ded-8db7-ae7bc11b59b2</URI>
     <ObjectId>924ee2d5-758b-4ded-8db7-ae7bc11b59b2</ObjectId>
     <Name>Taxoma_DefaultPartition</Name>
     <Description>Default Partition for Taxoma</Description>
     <LocationObjectId>6e81cad2-9c0b-42c1-bb6f-4edb38a70cbd</LocationObjectId>
     <LocationURI>/vmrest/locations/connectionlocations/6e81cad2-9c0b-42c1-bb6f-
    4edb38a70cbd</LocationURI>
  </Partition>
</Partitions>
Response Code: 200

JSON Example

The following is an example of the GET command that will list all the partitions:

Request URI:
GET https://<connection-server>/vmrest/partitions
Accept: applciation/json
Connection: keep_alive

The following is the example of the response from the above *GET* request:

{
  "@total": "2",
  "Partition": [
  {
     "URI": "/vmrest/partitions/d50e9d0b-656e-416d-b5b7-43c4d2e2fd0b",
     "ObjectId": "d50e9d0b-656e-416d-b5b7-43c4d2e2fd0b",
     "Name": "ucbu-aricent-vm259 Partition",
     "Description": "Default Partition",
     "LocationObjectId": "bbf3e6ed-0278-479c-9a6e-2da8756eeb6f",
     "LocationURI": "/vmrest/locations/connectionlocations/bbf3e6ed-0278-479c-
   9a6e-2da8756eeb6f"
  },
  {
     "URI": "/vmrest/partitions/5c28f078-8142-4844-b3c0-8fddf33639c4",
     "ObjectId": "5c28f078-8142-4844-b3c0-8fddf33639c4",
     "Name": "Taxoma21_Partition_1",
     "LocationObjectId": "bbf3e6ed-0278-479c-9a6e-2da8756eeb6f",
     "LocationURI": "/vmrest/locations/connectionlocations/bbf3e6ed-0278-479c-
    9a6e-2da8756eeb6f"
  }
  ]
}
Response Code: 200


Viewing a Specific Partition

The following is an example of the GET request that list the detail of a particular partition:

GET https://<connection-server>/vmrest/partitions/<PartitionObjectId>

The following is the response from the above *GET* request:

<Partition>
     <LocationObjectId>bbf3e6ed-0278-479c-9a6e-2da8756eeb6f</LocationObjectId>
     <URI>/vmrest/partitions/d50e9d0b-656e-416d-b5b7-43c4d2e2fd0b</URI>
     <ObjectId>d50e9d0b-656e-416d-b5b7-43c4d2e2fd0b</ObjectId>
     <Name>ucbu-aricent-vm259 Partition</Name>
     <Description>Default Partition</Description>
     <LocationObjectId>bbf3e6ed-0278-479c-9a6e-2da8756eeb6f</LocationObjectId>
     <LocationURI>/vmrest/locations/connectionlocations/bbf3e6ed-0278-479c-9a6e-
    2da8756eeb6f</LocationURI>
</Partition>
Response Code: 200

JSON Example

The following is an example of the GET command that will get the detail of a particular partition:

Request URI:
GET https://<connection-server>/vmrest/partitions/<PartitionObjectId>
Accept: applciation/json
Connection: keep_alive

The following is the example of the response from the above *GET* request:

{
     "URI": "/vmrest/partitions/d50e9d0b-656e-416d-b5b7-43c4d2e2fd0b",
     "ObjectId": "d50e9d0b-656e-416d-b5b7-43c4d2e2fd0b",
     "Name": "ucbu-aricent-vm259 Partition",
     "Description": "Default Partition",
     "LocationObjectId": "bbf3e6ed-0278-479c-9a6e-2da8756eeb6f",
     "LocationURI": "/vmrest/locations/connectionlocations/bbf3e6ed-0278-479c-9a6e-
    2da8756eeb6f"
}
Response Code: 200


Creating a Partition

The following is an example of the POST request that creates a partition:

  POST https://<connection-server>/vmrest/partitions
Request Body:
<Partition>
     <Name>Taxoma_DefaultPartition</Name>
     <Description>Default Partition for Taxoma</Description>
</Partition>

The following is the example of the response from the above *Post* request:

Response Code: 201

JSON Example

The following is an example of the POST command that will create a new partition:

Request URI:
POST https://<connection-server>/vmrest/partitions
Accept: applciation/json
Content_type: application/json
Connection: keep_alive
Request Body:
{
     "Name": "Test",
     "Description": "Test_partition"
}

The following is the example of the response from the above *GET* request:

Response Code: 201


Updating a Partition

The following is an example of the PUT request that allows you to update a partition:

  PUT https://<connection-server>/vmrest/partitions/<PartitionObjectId>
Request Body:
<Partition>
     <Name>Test123</Name>
     <Description>Taxoma Default Partition</Description>
</Partition>
Response Code: 204

The output for this request returns the successful response code.

JSON Example

The following is an example of the PUT command that will update a partition:

PUT https://<connection-server>/vmrest/partitions/<PartitionObjectId>
Accept: applciation/json
Content_type: application/json
Connection: keep_alive
Request Body:
{
     "Name": "Test123",
     "Description": "Hello"
}

The following is the example of the response from the above *PUT * request:

Response Code: 204


Deleting a Partition

The following is an example of the DELETE request that deletes a specific partition where you need to mention the partition object ID:

 
  DELETE https://<connection-server>/vmrest/partitions/<PartitionObjectId>

Note:You are not allowed to delete a default search space if a partition is referred in a search space, or referred by a user.

Response Code: 204

The output for this request returns the successful response code.

JSON Example

The following is an example of the DELETE command that will delete a partition:

DELETE https://<connection-server>/vmrest/partitions/<PartitionObjectId>
Accept: applciation/json
Connection: keep_alive
Response Code: 204


Deleting a Partition Included in Search Scope

Make sure to add the partition to a search space. The following is an example of the DELETE request that deletes a specific partition which is included in a search scope:

Delete https://<connection-server>/vmrest/partitions/<PartitionObjectId>
Response Code: 204

JSON Example

The following is an example to delete a partition included in a search scope:

Delete https://<connection-server>/vmrest/partitions/<PartitionObjectId>
Accept: application/json
Connection: keep_alive
Response Code: 204


Explanation of Data Fields

Parameter Operations Data Type Comments
ObjectId Read Only String (36) The primary key for this table. A systemgenerated, globally unique object identifier.
Name Read/Write String (50) The unique text name of this partition. This name is used when displaying entries in the administrative interface. The name can be upto 50 characters long.
Description Read/Write String (50) The description of the partition. If a description is not entered, the partition name is entered.
LocationObjectId Read Only String (36) The unique identifier of the LocationVms on which this partition was created. It is used by networking to determine on which LocationVms the properties of the partition are administered.

Rating: 0.0/5 (0 votes cast)

Personal tools