Cisco Unity Connection Provisioning Interface (CUPI) API -- Schedules Set

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
Schedule Example

Contents


Schedule Set API

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

Listing the Schedule Sets

The following is an example of the GET request that list the schedule sets:

GET https://<connection-server>/vmrest/schedulesets
The following is the response from the above *GET* request and the actual response will depend upon the information given by you:
<pre>
<ScheduleSets total="3">
     <ScheduleSet>
          <URI>/vmrest/schedulesets/e01b7fa7-521b-47f7-82d0-bb898aeec903</URI>
          <ObjectId>e01b7fa7-521b-47f7-82d0-bb898aeec903</ObjectId>
          <DisplayName>Weekdays</DisplayName>
          <OwnerLocationObjectId>51bff648-e60f-44ec-b2c8-ae854dfc1f41</OwnerLocationObjectId>
          <OwnerLocationURI>/vmrest/locations/connectionlocations/51bff648-e60f-44ec-b2c8-ae854dfc1f41</OwnerLocationURI>
          <Undeletable>true</Undeletable>
          <ScheduleSetMembersURI>/vmrest/schedulesets/e01b7fa7-521b-47f7-82d0-bb898aeec903/schedulesetmembers</ScheduleSetMembersURI>
     </ScheduleSet>
     <ScheduleSet>
          <URI>/vmrest/schedulesets/8f2e394c-1d09-412e-8e09-c26b152344c1</URI>
          <ObjectId>8f2e394c-1d09-412e-8e09-c26b152344c1</ObjectId>
          <DisplayName>All Hours</DisplayName>
          <OwnerLocationObjectId>51bff648-e60f-44ec-b2c8-ae854dfc1f41</OwnerLocationObjectId>
          <OwnerLocationURI>/vmrest/locations/connectionlocations/51bff648-e60f-44ec-b2c8-ae854dfc1f41</OwnerLocationURI>
          <Undeletable>true</Undeletable>
          <ScheduleSetMembersURI>/vmrest/schedulesets/8f2e394c-1d09-412e-8e09-c26b152344c1/schedulesetmembers</ScheduleSetMembersURI>
     </ScheduleSet>
     <ScheduleSet>
          <URI>/vmrest/schedulesets/31c9ff78-f6b3-4731-9df2-dce8de411f33</URI>
          <ObjectId>31c9ff78-f6b3-4731-9df2-dce8de411f33</ObjectId>
          <TenantObjectId>fe6541fb-b42c-44f2-8404-ded14cbf7438</TenantObjectId>
          <DisplayName>Voice Recognition Update Schedule</DisplayName>
          <OwnerLocationObjectId>51bff648-e60f-44ec-b2c8-ae854dfc1f41</OwnerLocationObjectId>
          <OwnerLocationURI>/vmrest/locations/connectionlocations/51bff648-e60f-44ec-b2c8-ae854dfc1f41</OwnerLocationURI>
          <Undeletable>false</Undeletable>
          <ScheduleSetMembersURI>/vmrest/schedulesets/31c9ff78-f6b3-4731-9df2-dce8de411f33/schedulesetmembers</ScheduleSetMembersURI>
          </ScheduleSet>
</ScheduleSets>
Response Code: 200

JSON Example

To list all the schedule sets, do the following:

GET https://<connection-server>/vmrest/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": "3",
     "ScheduleSet": [
     {
          "URI": "/vmrest/schedulesets/e01b7fa7-521b-47f7-82d0-bb898aeec903",
          "ObjectId": "e01b7fa7-521b-47f7-82d0-bb898aeec903",
          "DisplayName": "Weekdays",
          "OwnerLocationObjectId": "51bff648-e60f-44ec-b2c8-ae854dfc1f41",
          "OwnerLocationURI": "/vmrest/locations/connectionlocations/51bff648-e60f-44ec-b2c8-ae854dfc1f41",
          "Undeletable": "true",
          "ScheduleSetMembersURI": "/vmrest/schedulesets/e01b7fa7-521b-47f7-82d0-bb898aeec903/schedulesetmembers"
     },
     {     
          "URI": "/vmrest/schedulesets/8f2e394c-1d09-412e-8e09-c26b152344c1",
          "ObjectId": "8f2e394c-1d09-412e-8e09-c26b152344c1",
          "DisplayName": "All Hours",
          "OwnerLocationObjectId": "51bff648-e60f-44ec-b2c8-ae854dfc1f41",
          "OwnerLocationURI": "/vmrest/locations/connectionlocations/51bff648-e60f-44ec-b2c8-ae854dfc1f41",
          "Undeletable": "true",
          "ScheduleSetMembersURI": "/vmrest/schedulesets/8f2e394c-1d09-412e-8e09-c26b152344c1/schedulesetmembers"
     },
     {
          "URI": "/vmrest/schedulesets/31c9ff78-f6b3-4731-9df2-dce8de411f33",
          "ObjectId": "31c9ff78-f6b3-4731-9df2-dce8de411f33",
          "TenantObjectId": "fe6541fb-b42c-44f2-8404-ded14cbf7438",
          "DisplayName": "Voice Recognition Update Schedule",
          "OwnerLocationObjectId": "51bff648-e60f-44ec-b2c8-ae854dfc1f41",
          "OwnerLocationURI": "/vmrest/locations/connectionlocations/51bff648-e60f-44ec-b2c8-ae854dfc1f41",
          "Undeletable": "false",
          "ScheduleSetMembersURI": "/vmrest/schedulesets/31c9ff78-f6b3-4731-9df2-dce8de411f33/schedulesetmembers"
     }
]
}
Response Code: 200

Listing Specific Tenant Related ScheduleSets by System Administrator

In Cisco Unity Connection 10.5(2) and later, the system administrator can use TenantObjectID to list the specific tenant related schedulesets using the following URI:

 GET https://<connection-server>/vmrest/schedulesets?query=(TenantObjectId is <Tenant-ObjectId>)

To get the TenantObjectID, use the following URI:

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

Viewing the Specific Schedule Set

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

GET https://<connection-server>/vmrest/schedulesets/<scheduleset-objectid>

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

<ScheduleSet>
     <URI>/vmrest/schedulesets/e01b7fa7-521b-47f7-82d0-bb898aeec903</URI>
     <ObjectId>e01b7fa7-521b-47f7-82d0-bb898aeec903</ObjectId>
     <DisplayName>Weekdays</DisplayName>
     <OwnerLocationObjectId>51bff648-e60f-44ec-b2c8-ae854dfc1f41</OwnerLocationObjectId>
     <OwnerLocationURI>/vmrest/locations/connectionlocations/51bff648-e60f-44ec-b2c8-ae854dfc1f41</OwnerLocationURI>
     <Undeletable>true</Undeletable>
     <ScheduleSetMembersURI>/vmrest/schedulesets/e01b7fa7-521b-47f7-82d0-bb898aeec903/schedulesetmembers</ScheduleSetMembersURI>
</ScheduleSet>
Response Code: 200

JSON Example

To view a specific schedule set, do the following:

GET https://<connection-server>/vmrest/schedulesets/<scheduleset-objectid>
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/schedulesets/e01b7fa7-521b-47f7-82d0-bb898aeec903",
     "ObjectId": "e01b7fa7-521b-47f7-82d0-bb898aeec903",
     "DisplayName": "Weekdays",
     "OwnerLocationObjectId": "51bff648-e60f-44ec-b2c8-ae854dfc1f41",
     "OwnerLocationURI": "/vmrest/locations/connectionlocations/51bff648-e60f-44ec-b2c8-ae854dfc1f41",
     "Undeletable": "true",
     "ScheduleSetMembersURI": "/vmrest/schedulesets/e01b7fa7-521b-47f7-82d0-bb898aeec903/schedulesetmembers"
}
Response Code: 200

Creating a New Schedule Set

The following is an example of POST request that can be used to create a new schedule set:

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

Request Body:

<ScheduleSet>
     <DisplayName>Texoma_DayShift </DisplayName>
     <OwnerLocationObjectId>5150cb31-a665-47d8-a311-9cc4524810d3</OwnerLocationObjectId>
</ScheduleSet>

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/schedulesets/e01b7fa7-521b-47f7-82d0-bb898aeec903

JSON Example

To create a new schedule set, do the following:

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

Request Body:

{
     "DisplayName":"Texoma_DayShift ",
     "OwnerLocationObjectId":"5150cb31-a665-47d8-a311-9cc4524810d3"
}

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/schedulesets/e01b7fa7-521b-47f7-82d0-bb898aeec903

Updating the Schedule Set

The following is an example of the PUT request that can be used to modify the schedule set where only description field can be updated:

PUT https://<connection-server>/vmrest/schedulesets/<scheduleset-objectid>

Request Body:

<ScheduleSet>
     <DisplayName>Texoma_Evening</DisplayName>
     <OwnerLocationObjectId>5150cb31-a665-47d8-a311-9cc4524810d3</OwnerLocationObjectId>
</ScheduleSet>
Response Code: 204

JSON Example

To update the schedule set, do the following:

PUT https://<connection-server>/vmrest/schedulesets/<scheduleset-objectid>
Accept: application/json
Content-Type: application/json
Connection: keep-alive

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

Request Body:

{
     "DisplayName":"Texoma_Evening ",
     "OwnerLocationObjectId":"5150cb31-a665-47d8-a311-9cc4524810d3"
}
Response Code: 204

Delete a Schedule Set

This request can be used to delete an existing schedule set; an administrator makes a DELETE to the schedule sets resource, specifying the object ID of the schedule set they wish to delete in the URI.

DELETE https://<connection-server>/vmrest/schedulesets/<scheduleset-objectid>
Response Code: 204

JSON Example

DELETE: https://<connection-ip>/vmrest/schedulesets/<scheduleset-objectid>
Accept: application/json
Connection: keep-alive
Response code: 204

Explanation of Data Fields

The following chart lists all of the data fields:

Parameter Data Type Operations Comments
ObjectId String(36) Read Only Specifies a globally unique, system-generated identifier for a schedule set object.
TenantObjectId Read Only String (36) The unique identifier of the tenant to which the schedule set belongs. This field is reflected in the response only if the schedule set belongs to a particular tenant.
URI String Read Only Specifies the URI for schedule set.
DisplayName String(64) Read/Write Specifies the unique text name of this schedule set to be used when displaying entries in the administrative console and Cisco Personal Assistant.
OwnerLocationObjectId String(36) Read Only The owner of this schedule set. If the owner is a LocationVMS, the unique identifiers of the LocationVMS object to which this schedule set (i.e., "system" schedule) belongs. Otherwise, this attribute is set to NULL.
OwnerPersonalRuleSetObjectId String(36) Read Only The owner of this schedule set. If the owner is a personal rule set, the unique identifier of the personal rule set to which this schedule set belongs. Otherwise, this attribute is set to NULL.
OwnerSubscriberObjectId String(36) Read Only The owner of this schedule set. If the owner is a subscriber, the unique identifier of the Subscriber object to which this schedule set belongs. Otherwise, this attribute is set to NULL.
Undeletable Boolean Read/Write Indicates a flag which checks whether this schedule set can be deleted via an administrative application such as Cisco Unity Connection Administration. It is used to prevent deletion of factory defaults.
  • Default value: false.
ScheduleSetMembersURI String Read Only Specifies the URI for schedule set members.

Rating: 0.0/5 (0 votes cast)

Personal tools