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

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 Members API

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

Listing the Schedule Set Members

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

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

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

<ScheduleSetMembers total="2">
     <ScheduleSetMember>
          <URI>/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e/schedulesetmembers/2008f07d-4265-4570-ab6f-362228dd8180</URI>
          <ScheduleSetObjectId>c309414c-0c72-4d37-8a22-9ed7d9ee9b3e</ScheduleSetObjectId>
          <ScheduleSetURI>/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e</ScheduleSetURI>
          <ScheduleObjectId>2008f07d-4265-4570-ab6f-362228dd8180</ScheduleObjectId>
          <ScheduleURI>/vmrest/schedules/2008f07d-4265-4570-ab6f-362228dd8180</ScheduleURI>
          <Exclude>false</Exclude>
     </ScheduleSetMember>
     <ScheduleSetMember>
          <URI>/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e/schedulesetmembers/c1bdc7d4-fd7c-4ae7-a836-6094f987ad74</URI>
          <ScheduleSetObjectId>c309414c-0c72-4d37-8a22-9ed7d9ee9b3e</ScheduleSetObjectId>
          <ScheduleSetURI>/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e</ScheduleSetURI>
          <ScheduleObjectId>c1bdc7d4-fd7c-4ae7-a836-6094f987ad74</ScheduleObjectId>
          <ScheduleURI>/vmrest/schedules/c1bdc7d4-fd7c-4ae7-a836-6094f987ad74</ScheduleURI>
          <Exclude>true</Exclude>
     </ScheduleSetMember>
</ScheduleSetMembers>
<pre>
Response Code: 200

JSON Example

To list all the schedule set members, do the following:

GET https://<connection-server>/vmrest/schedulesets/<scheduleset-objectid>/schedulesetmembers
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",
     "ScheduleSetMember[
     {
          "URI": "/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e/schedulesetmembers/2008f07d-4265-4570-ab6f-362228dd8180",
          "ScheduleSetObjectId": "c309414c-0c72-4d37-8a22-9ed7d9ee9b3e",
          "ScheduleSetURI": "/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e",
          "ScheduleObjectId": "2008f07d-4265-4570-ab6f-362228dd8180",
          "ScheduleURI": "/vmrest/schedules/2008f07d-4265-4570-ab6f-362228dd8180",
          "Exclude": "false"
     },
     {
          "URI": "/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e/schedulesetmembers/c1bdc7d4-fd7c-4ae7-a836-6094f987ad74",
          "ScheduleSetObjectId": "c309414c-0c72-4d37-8a22-9ed7d9ee9b3e",
          "ScheduleSetURI": "/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e",
          "ScheduleObjectId": "c1bdc7d4-fd7c-4ae7-a836-6094f987ad74",
          "ScheduleURI": "/vmrest/schedules/c1bdc7d4-fd7c-4ae7-a836-6094f987ad74",
          "Exclude": "true"
     }
]
}
Response Code: 200

Viewing the Specific Schedule Set Member

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

GET https://<connection-server>/vmrest/schedulesets/<schedulesetobjectid>/schedulesetmembers/<schedulesetmember-objectid>

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

    <URI>/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e/schedulesetmembers/2008f07d-4265-4570-ab6f-362228dd8180</URI>
    <ScheduleSetObjectId>c309414c-0c72-4d37-8a22-9ed7d9ee9b3e</ScheduleSetObjectId>
    <ScheduleSetURI>/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e</ScheduleSetURI>
    <ScheduleObjectId>2008f07d-4265-4570-ab6f-362228dd8180</ScheduleObjectId>
    <ScheduleURI>/vmrest/schedules/2008f07d-4265-4570-ab6f-362228dd8180</ScheduleURI>
    <Exclude>false</Exclude>

</ScheduleSetMember> </pre>

Response Code: 200

JSON Example

To view a specific schedule set member, do the following:

GET https://<connection-server>/vmrest/schedulesets/<schedulesetobjectid>/schedulesetmembers/<schedulesetmember-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/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e/schedulesetmembers/2008f07d-4265-4570-ab6f-362228dd8180",
     "ScheduleSetObjectId": "c309414c-0c72-4d37-8a22-9ed7d9ee9b3e",
     "ScheduleSetURI": "/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e",
     "ScheduleObjectId": "2008f07d-4265-4570-ab6f-362228dd8180",
     "ScheduleURI": "/vmrest/schedules/2008f07d-4265-4570-ab6f-362228dd8180",
     "Exclude": "false"
}
Response Code: 200

Creating a New Schedule Set Member

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

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

Request Body for a Non-Holiday Schedule:

<ScheduleSetMember>
     <ScheduleSetObjectId>11a4f6b1-c926-4404-9bba-964ebb3075c3</ScheduleSetObjectId>
     <ScheduleObjectId>4ac392b8-e276-46a1-978a-9b648c2c785b</ScheduleObjectId>
     <Exclude>false</Exclude>
</ScheduleSetMember>

The following is the response from the above *POST* request and the actual response will depend upon the information given by you:
<pre>
Response Code: 201
/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e/schedulesetmembers/2008f07d-4265-4570-ab6f-362228dd8180

NOTE: A schedule set can have at most 1 schedule marked as included, and that schedule must not be a holiday schedule. A schedule set can also have at most 1 schedule marked as excluded, and that schedule must be a holiday schedule.

JSON Example for a non-holiday schedule

To create a new schedule set member, do the following:

POST https://<connection-server>/vmrest/schedulesets/<scheduleset-objectid>/schedulesetmembers
Accept: application/json
Content-Type: application/json
Connection: keep-alive
{
     "ScheduleSetObjectId":"11a4f6b1-c926-4404-9bba-964ebb3075c3",
     "ScheduleObjectId":"4ac392b8-e276-46a1-978a-9b648c2c785b",
     "Exclude":"false"
}
The following is the response from the above *POST* request and the actual response will depend upon the information given by you:
<pre>
Response Code: 201
/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e/schedulesetmembers/2008f07d-4265-4570-ab6f-362228dd8180

Request Body for a Holiday Schedule:

<ScheduleSetMember>
     <ScheduleSetObjectId>11a4f6b1-c926-4404-9bba-964ebb3075c3</ScheduleSetObjectId>
     <ScheduleObjectId>4ac392b8-e276-46a1-978a-9b648c2c785b</ScheduleObjectId>
     <Exclude>true</Exclude>
</ScheduleSetMember>
Response Code: 201
/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e/schedulesetmembers/2008f07d-4265-4570-ab6f-362228dd8180

JSON Example to create Schedule set member which is a Holiday Schedule:

POST https://<connection-ip>/vmrest/schedulesets/<scheduleset-objectid>/schedulesetmembers
Accept: application/json
Content-Type: application/json
Connection: keep-alive
{
     "ScheduleSetObjectId":"11a4f6b1-c926-4404-9bba-964ebb3075c3",
     "ScheduleObjectId":"4ac392b8-e276-46a1-978a-9b648c2c785b",
     "Exclude":"true"
}
Response Code: 201
/vmrest/schedulesets/c309414c-0c72-4d37-8a22-9ed7d9ee9b3e/schedulesetmembers/2008f07d-4265-4570-ab6f-362228dd8180

Updating the Schedule Set Members

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

PUT https://<connection-server>/vmrest/schedulesets/<schedulesetobjectid>/schedulesetmembers/<schedulesetmember-objectid>

Request Body:

<ScheduleSetMember>
     <ScheduleSetObjectId>11a4f6b1-c926-4404-9bba-964ebb3075c3</ScheduleSetObjectId>
     <ScheduleObjectId>f4e064d5-e21e-4234-a157-91554fd657e5</ScheduleObjectId>
     <Exclude>true</Exclude>
</ScheduleSetMember>
Response Code: 204

JSON Example

To update the schedule set member, do the following:

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

Request Body:

{
     "ScheduleSetObjectId":"11a4f6b1-c926-4404-9bba-964ebb3075c3",
     "ScheduleObjectId":"4ac392b8-e276-46a1-978a-9b648c2c785b",
     "Exclude":"true"
}

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 Schedule Set Member

To delete an existing schedule set member, an administrator makes a DELETE to the schedule set members resource, specifying the object ID of the schedule set member they wish to delete in the URI:

DELETE https://<connection-server>/vmrest/schedulesets/<schedulesetobjectid>/schedulesetmembers/<schedulesetmember-objectid>
Response Code: 204

JSON Example to delete an existing ScheduleSet Member:

DELETE https://<connection-ip>/vmrest/schedulesets/<schedulesetobjectid>/schedulesetmembers/<schedulesetmember-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
ScheduleSetObjectId String(36) Read Only The unique identifier of the ScheduleSet object to which the schedule belongs.
ScheduleSetURI String Read Only URI of the ScheduleSet
ScheduleObjectId String(36) Read Only The unique identifier of the Schedule object that is a member of the schedule set
ScheduleURI String Read Only URI of the Schedule
Exclude Boolean Read/Write A flag indicating whether the schedule is to be included or excluded from the schedule set.

Default value is false

Rating: 0.0/5 (0 votes cast)

Personal tools