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

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

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

Listing the Schedule Set Details

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

GET https://<connection-server>/vmrest/schedules/<scheduleobjectid>/scheduledetails

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

<ScheduleDetails total="1">
     <ScheduleDetail>
          <URI>/vmrest/schedules/2008f07d-4265-4570-ab6f-362228dd8180/scheduledetails/e377a09d-46f8-4bec-8b61-7fecdc688467</URI>
          <ObjectId>e377a09d-46f8-4bec-8b61-7fecdc688467</ObjectId>
          <ScheduleObjectId>2008f07d-4265-4570-ab6f-362228dd8180</ScheduleObjectId>
          <ScheduleURI>/vmrest/schedules/2008f07d-4265-4570-ab6f-362228dd8180</ScheduleURI>
          <IsActiveMonday>true</IsActiveMonday>
          <IsActiveTuesday>true</IsActiveTuesday>
          <IsActiveWednesday>true</IsActiveWednesday>
          <IsActiveThursday>true</IsActiveThursday>
          <IsActiveFriday>true</IsActiveFriday>
          <IsActiveSaturday>false</IsActiveSaturday>
          <IsActiveSunday>false</IsActiveSunday>
          <StartTime>480</StartTime>
          <EndTime>1020</EndTime>
     </ScheduleDetail>
</ScheduleDetails>
Response Code: 200

JSON Example

To list all the schedule set details, do the following: Request URI:

GET https://<connection-server>/vmrest/schedules/<scheduleobjectid>/scheduledetails
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",
     "ScheduleDetail":
     {
          "URI": "/vmrest/schedules/2008f07d-4265-4570-ab6f-362228dd8180/scheduledetails/e377a09d-46f8-4bec-8b61-7fecdc688467",
          "ObjectId": "e377a09d-46f8-4bec-8b61-7fecdc688467",
          "ScheduleObjectId": "2008f07d-4265-4570-ab6f-362228dd8180",
          "ScheduleURI": "/vmrest/schedules/2008f07d-4265-4570-ab6f-362228dd8180",
          "IsActiveMonday": "true",
          "IsActiveTuesday": "true",
          "IsActiveWednesday": "true",
          "IsActiveThursday": "true",
          "IsActiveFriday": "true",
          "IsActiveSaturday": "false",
          "IsActiveSunday": "false",
          "StartTime": "480",
          "EndTime": "1020"
     }
}
Response Code: 200

Viewing the Specific Schedule Set Detail

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

GET https://<connectionserver>/vmrest/schedules/<scheduleobjectid>/scheduledetails/<scheduledetail-objectid>

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

<ScheduleDetail>
     <URI>/vmrest/schedules/2008f07d-4265-4570-ab6f-362228dd8180/scheduledetails/e377a09d-46f8-4bec-8b61-7fecdc688467</URI>
     <ObjectId>e377a09d-46f8-4bec-8b61-7fecdc688467</ObjectId>
     <ScheduleObjectId>2008f07d-4265-4570-ab6f-362228dd8180</ScheduleObjectId>
     <ScheduleURI>/vmrest/schedules/2008f07d-4265-4570-ab6f-362228dd8180</ScheduleURI>
     <IsActiveMonday>true</IsActiveMonday>
     <IsActiveTuesday>true</IsActiveTuesday>
     <IsActiveWednesday>true</IsActiveWednesday>
     <IsActiveThursday>true</IsActiveThursday>
     <IsActiveFriday>true</IsActiveFriday>
     <IsActiveSaturday>false</IsActiveSaturday>
     <IsActiveSunday>false</IsActiveSunday>
     <StartTime>480</StartTime>
     <EndTime>1020</EndTime>
</ScheduleDetail>
Response Code: 200

JSON Example

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

GET https://<connection-server>/vmrest/schedules/<scheduleobjectid>/scheduledetails/<scheduledetailobjectid>
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/schedules/2008f07d-4265-4570-ab6f-362228dd8180/scheduledetails/e377a09d-46f8-4bec-8b61-7fecdc688467",
     "ObjectId": "e377a09d-46f8-4bec-8b61-7fecdc688467",
     "ScheduleObjectId": "2008f07d-4265-4570-ab6f-362228dd8180",
     "ScheduleURI": "/vmrest/schedules/2008f07d-4265-4570-ab6f-362228dd8180",
     "IsActiveMonday": "true",
     "IsActiveTuesday": "true",
     "IsActiveWednesday": "true",
     "IsActiveThursday": "true",
     "IsActiveFriday": "true",
     "IsActiveSaturday": "false",
     "IsActiveSunday": "false",
     "StartTime": "480",
     "EndTime": "1020"
}
Response Code: 200

Creating a New Schedule Set Detail

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

POST https://<connection-server>/vmrest/schedules/<scheduleobjectid>/scheduledetails

Request Body:

<ScheduleDetail>
     <Subject>Saturday(Half-day)</Subject>
     <StartTime>540</StartTime>
     <EndTime>780</EndTime>
     <IsActiveSaturday>true</IsActiveSaturday>
     </ScheduleDetail>

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/schedules/2008f07d-4265-4570-ab6f-362228dd8180/scheduledetails/e377a09d-46f8-4bec-8b61-7fecdc688467

JSON Example

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

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

''Request Body''
<pre>
{
     "Subject":"Saturday(Half-day)",
     "StartTime":"540",
     "EndTime":"780",
     "IsActiveSaturday","true"
}

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/schedules/2008f07d-4265-4570-ab6f-362228dd8180/scheduledetails/e377a09d-46f8-4bec-8b61-7fecdc688467

Updating the Schedule Set Detail

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

PUT https://<connectionserver>/vmrest/schedules/<scheduleobjectid>/scheduledetails/<scheduledetail-objectid>

Request Body:

<ScheduleDetail>
     <Subject>Texoma_Saturday(Full-day)</Subject>
     <StartTime>540</StartTime>
     <EndTime>780</EndTime>
     <IsActiveSaturday>true</IsActiveSaturday>
</ScheduleDetail>
Response Code: 204

JSON Example

To update the schedule set detail, do the following:

PUT https://<connection-server>/vmrest/schedules/<scheduleobjectid>/scheduledetails/<scheduledetailobjectid>
Accept: application/json
Content-Type: application/json
Connection: keep-alive
{
     "Subject":"Texoma_Saturday(Full-day)",
     "StartTime":"540",
     "EndTime":"780",
     "IsActiveSaturday","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

Delete a Schedule Set Detail

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

DELETE https://<connectionserver>/vmrest/schedules/<scheduleobjectid>/scheduledetails/<scheduledetail-objectid>
Response Code: 204

JSON Example

DELETE https://<connection-ip>/vmrest/schedules/<scheduleobjectid>/scheduledetails/<scheduledetailobjectid>
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 detail object.
Subject String(2048) Read/Write Specifies the subject matter or description for this schedule detail row. Any character except non-printing ASCII characters.
ScheduleObjectId String(36) Read-only Specifies the unique identifier of the parent Schedule object to which this schedule detail row belongs.
StartTime Integer Read/Write Indicates the start time (in minutes) for the active day or days. The start time is stored as the number of minutes from midnight. So a value of 480 would mean 8:00 AM and 1020 would mean 5:00 PM. In addition, a value of NULL for the start time indicates 12:00 AM.
EndTime Integer Read/Write The end time (in minutes) for the active day or days. The end time is stored as the number of minutes from midnight. So a value of 480 would mean 8:00 AM and 1020 would mean 5:00 PM. In addition, a value of NULL means "till the end of the day" (e.g. 11:59:59 PM in Linux land).
  • Range 0-1440
IsActiveMonday Boolean Read/Write Indicates a flag that checks whether this schedule is active on Monday.
  • Default value is false.
IsActiveTuesday Boolean Read/Write A flag indicating whether this schedule is active on Tuesday.
  • Default value is false.
IsActiveWednessday Boolean Read/Write A flag indicating whether this schedule is active on Wednesday.
  • Default value is false.
IsActiveThursday Boolean Read/Write A flag indicating whether this schedule is active on Thursday.

Default value is false.

IsActiveFriday Boolean Read/Write A flag indicating whether this schedule is active on Friday.
  • Default value is false.
IsActiveSaturday Boolean Read/Write A flag indicating whether this schedule is active on Saturday.
  • Default value is false.
IsActiveSunday Boolean Read/Write A flag indicating whether this schedule is active on Sunday.
  • Default value is false.
EndOfDay Boolean Read/Write A flag indicating if this value is set as true , the schedule will become inactive at midnight:

Possible Values:

  • true
  • false
  • Default value: true

Rating: 0.0/5 (0 votes cast)

Personal tools