Cisco Unity Connection Provisioning Interface (CUPI) API -- Tenant Object Mapping API

From DocWiki

(Difference between revisions)
Jump to: navigation, search
(Explanation of Data Fields)
m (1 revision)
 

Latest revision as of 08:12, 1 November 2013

Links to Other API pages: Cisco_Unity_Connection_APIs

CUPI Guide Contents
API Overview
Index of All CUPI Documentation
Schedule Example

Contents


Tenant Object Mapping API

Administrator can use this API to fetch the COSes, Partitions, Phone Systems, Operators, and Schedule Sets associated with a Tenant. This API can be used to associate or disassociate COSes and Schedule Sets with a Tenant also.

Viewing COSes associated with the Tenant

The following is an example of the GET request that fetch the COSes associated with the tenant:

GET https://<connection-server>/vmrest/tenants/<Tenant-ObjectId>/coses

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

<TenantCoses total="1">
     <TenantCos>
     <CosURI>/vmrest/coses/06ef7021-2549-4ab7-b80d-a6674749c17d</CosURI>
     </TenantCos>
</TenantCoses>
Response Code: 200

JSON Example

To view COSes associated with tenant, do the following:

GET https://<connection-server>/vmrest/tenants/<TenantObjectId>/coses
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",
     "TenantCos": {"CosURI": "/vmrest/coses/1afa317d-5533-46ab-b35b-6498953673a7"}
}
Response Code: 200

Viewing Partitions associated with the Tenant

The following is an example of the GET request that fetch the partitions associated with the tenant:

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

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

<TenantPartitions total="1">
     <TenantPartition>
          <PartitionURI>/vmrest/coses/06ef7021-2549-4ab7-b80d-a6674749c17d</PartitionURI>
     </TenantPartition>
</TenantPartitions>
Response Code: 200

JSON Example

To view partitions associated with tenant, do the following:

Request URI:

GET https://<connection-server>/vmrest/tenants/<TenantObjectId>/partitions
Accept: applicaiton/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",
     "TenantPartition": {"PartitionURI": "/vmrest/partitions/1469a460-e3d2-42c1-aad8-8f89e2c56ba8"}
}
Response Code: 200

Viewing Phone Systems associated with the Tenant

The following is an example of the GET request that fetch the phone systems associated with the tenant:

GET https://<connection-server>/vmrest/tenants/<TenantObjectId>/phonesystems

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

<TenantPhoneSystems total="1">
     <TenantPhoneSystem>
     <PhoneSystemURI>/vmrest/phonesystems/598c2ca5-5df7-47be-8bf3-20af9f827657</PhoneSystemURI>
     </TenantPhoneSystem>
</TenantPhoneSystems>
Response Code: 200

JSON Example

To view phone system associated with tenant, do the following:

Request URI:

GET https://<connection-server>/vmrest/tenants/<TenantObjectId>/phonesystems
Accept: applicaiton/json
Conenction: 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",
     "TenantPhoneSystem": {"PhoneSystemURI": "/vmrest/phonesystems/e815916c-abd5-49bea33d-0495d1f4e080"}
}
Response Code: 200

Viewing Schedule Sets associated with the Tenant

The following is an example of the GET request that fetch the schedule sets associated with the tenant:

GET https://<connection-server>/vmrest/tenants/<TenantObjectId>/schedulesets

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

<TenantScheduleSets total="1">
     <TenantScheduleSet>
          <ScheduleSetURI>/vmrest/schedulesets/4f5c5c0e-e853-423a-82a8-691ee8c18726</ScheduleSetURI>
     </TenantScheduleSet>
</TenantScheduleSets>
Response Code: 200

JSON Example

To view schedule sets associated with tenant, do the following: Request URI:

GET https://<connection-server>/vmrest/tenants/<TenantObjectId>/schedulesets
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",
     "TenantScheduleSet": {"ScheduleSetURI": "/vmrest/schedulesets/8189c416-6769-42b2-a5bc-2cc864e9e741"}
}
Response Code: 200

Viewing Operator associated with the Tenant

The following is an example of the GET request that fetch the operator associated with the tenant:

GET https://<connection-server>/vmrest/tenants/<TenantObjectId>/operators

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

<TenantOperators total="1">
     <TenantOperator>
     <OperatorURI>/vmrest/users/fd866d80-019f-4e9a-b447-8f73e46dbced</OperatorURI>
     </TenantOperator>
</TenantOperators>
Response Code: 200

JSON Example

To view operator associated with tenant, do the following:

Request URI:

GET https://<connection-server>/vmrest/tenants/<TenantObjectId>/operators
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",
     "TenantOperator":{"OperatorURI": "/vmrest/users/e815916c-abd5-49be-a33d-0495d1f4e080"}
}
Response Code: 200

Creating a Tenant and COS Mapping

The following is an example of POST request that can be used to create a tenant and COS mapping.

POST https://<connection-server>/vmrest/tenants/ <Tenant-ObjectId>/coses

Request Body

<TenantCos>
     <CosObjectId>0780fee5-70dd-4b06-86d4-2fc409867e65</CosObjectId>
</TenantCos>

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/tenants/10c9ac6c-6a4c-4559-be75-2c409ef85054/coses

JSON Example

To create a tenant-COS mapping, do the following

Request URI:

POST https://<connection-server>/vmrest/tenants/<TenantObjectId>/coses
Accept: applicaiton/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:

{
     "CosObjectId": "2b92f583-0923-4b20-9f1c-6e9144d7811c"
}
Response Code: 201
/vmrest/tenants/10c9ac6c-6a4c-4559-be75-2c409ef85054/coses

Creating a Tenant and ScheduleSet Mapping

The following is an example of POST request that can be used to create a tenant and schedule set mapping.

Request URI:

POST https://<connection-server>/vmrest/tenants/ <TenantObjectId>/schedulesets

Request URI:

<TenantScheduleSet>
     <ScheduleSetObjectId>45ac3547-0beb-40bd-8055-b9dd4419ca69</ScheduleSetObjectId>
</TenantScheduleSet>

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/tenants/10c9ac6c-6a4c-4559-be75-2c409ef85054/schedulesets

JSON Example

To create a Tenant-ScheduleSet mapping, do the following:

POST https://<connection-server>/vmrest/tenants/<TenantObjectId>/schedulesets
Accept: application/json
Content_type: applicaiton/json
Connection: keep_alive

Request Body:

{
"ScheduleSetObjectId": "74205ca1-1f58-466b-a543-13ad7bd4798e"
}

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/tenants/10c9ac6c-6a4c-4559-be75-2c409ef85054/schedulesets

Setting a Tenant User as New Tenant Operator

A user of tenant will be assigned as a new tenant operator and further dependencies of existing tenant operator can be fetched using URI:

Get https://<connection-server>/vmrest/subscriberdependencies/<TenantOperatorObjectId>

All the dependent objects on the existing Operator can be made to refer a new operator using the SubscriberDependency API. <<Link will be given later.>>

The below mentioned request can be used to update the tenant operator mapping. If the OperatorObjectId specified in the Request body is wrong then an appropriate error is displayed.

RequestURI :

PUT https://<connection-server>/vmrest/tenants/<TenantObjectId>/operators

Request Body:

<TenantOperator>
     <OperatorObjectId>fd80f02b-ae7a-4253-b48ff3a1e8c16aa3</OperatorObjectId>
</TenantOperator>

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

Request URI:

PUT https://<connection-server>/vmrest/tenants/<TenantObjectId>/operators
Accept: application/json
Content-Type: application/json
Connection: keep-alive

Request Body:

{
     "TenantOperator": { "OperatorObjectId": "fd80f02b-ae7a-4253-b48f-f3a1e8c16aa3" }
}

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 a Tenant and COS Mapping

Before deleting a Schedule Set or a COS mapping, the user has to ensure that the object being deleted has been deleted or unmapped from the objects associated with the Tenant and API will not be taking care of these mappings. This request can be used to disassociate a COS or a Schedule Set from a Tenant. If the CosObjectId or the ScheduleSetObjectId specified in the URI is wrong or is not associated with the Tenant then appropriate error will be thrown.

The following is an example of the DELETE request that will delete a tenant and COS mapping:

DELETE https://<connection-server>/vmrest/tenants/<TenantObjectId>/coses/<CosObjectId>
Response Code: 204

JSON Example

To delete a tenant_COS mapping, do the following:

Request URI:

DELETE https://<connection-server>/vmrest/tenants/<TenantObjectId>/coses/<CosObjectId>
Accept: applicaiton/json
Connection: keep_alive
Response Code: 204

Delete a Tenant and ScheduleSet Mapping

The following is an example of the DELETE request that will delete a tenant and schedule set mapping:

DELETE https://<connectionserver>/vmrest/tenants/<TenantObjectId>/schedulesets/<ScheduleSetObjectId>
Response Code: 204

JSON Example

To delete a Tenant-ScheduleSet mapping, do the following:

DELETE https://<connectionserver>/vmrest/tenants/<TenantObjectId>/schedulesets/<ScheduleSetObjectId>
Accept: appliation/json
Connection: keep_alive
Response Code: 204

Note: Before deleting any schedule set mapping, make sure it is unmapped from its associated tenant.

Explanation of Data Fields

The following chart lists all of the data fields:

Parameter Data Type Operations Comments
CosObjectId Read Only String(36) Specifies the object ID of the COS that is associated with the tenant.
ScheduleSetObjectId Read Only String(36) Specifies the object ID of the schedule set that is associated with the tenant.
CosURI Read Only String Specifies the URI of the COS associated with the tenant.
ScheduleSetURI Read Only String Specifies the URI of the schedule set associated with the tenant.
PartitionURI Read Only String Specifies the URI of the partition associated with the tenant.
PhoneSystemURI Read Only String Specifies the URI of the phone system associated with the tenant.
OperatorsURI Read Only String Specifies the URI of the operator associated with the tenant.

Rating: 0.0/5 (0 votes cast)

Personal tools