REST API - saveCalendar Create a Base Calendar
The table summarizes the REST API - saveCalendar: Create a Base Calendar.
Request
Format | PUT <baseurl>/calendar/base |
Body | xmlBaseCalendar (required): The component of the saveCalendar element (from the WorkCalService schema) that defines the calendar name, namespace, working-day exceptions, and timezone. |
Response
JSON | Returns a JSON representation of the xmlBaseCalendar element. |
XML | Returns the content of a xmlBaseCalendar element (from the WorkCalService schema). |
Example
Request | PUT <baseurl>/calendar/base |
Request body | <base-calendar calendar-type="BASE" namespace="LONDON" name="LONDON01" date-created="?" date-modified="?" version="-1" time-zone="GMT" min-hours="4"> <working-days day-of-week="MO"> <time-slot start="08:00:00.000Z" end="12:00:00.000Z"/> <time-slot start="13:00:00.000Z" end="18:00:00.000Z"/> </working-days> <working-days day-of-week="TU"> <time-slot start="08:00:00.000Z" end="12:00:00.000Z"/> <time-slot start="13:00:00.000Z" end="18:00:00.000Z"/> </working-days> <working-days day-of-week="WE"> <time-slot start="08:00:00.000Z" end="12:00:00.000Z"/> <time-slot start="13:00:00.000Z" end="18:00:00.000Z"/> </working-days> <working-days day-of-week="TH"> <time-slot start="08:00:00.000Z" end="12:00:00.000Z"/> <time-slot start="13:00:00.000Z" end="18:00:00.000Z"/> </working-days> <working-days day-of-week="FR"> <time-slot start="08:00:00.000Z" end="12:00:00.000Z"/> <time-slot start="13:00:00.000Z" end="16:00:00.000Z"/> </working-days> </base-calendar> |
Response | "xml-fragment": { "@version": "0", "@namespace": "LONDON", "@name": "LONDON01", "@date-created": "2012-12-20T10:30:09.862Z", "@date-modified": "2012-12-20T10:30:09.867Z", "@calendar-type": "BASE", "@time-zone": "GMT", "@min-hours": "4", "working-days": [ { "@day-of-week": "MO", "time-slot": [ { "@start": "08:00:00.000Z", "@end": "12:00:00.000Z" }, { "@start": "13:00:00.000Z", "@end": "18:00:00.000Z" } ] }, . . . . . "@day-of-week": "FR", "time-slot": [ { "@start": "08:00:00.000Z", "@end": "12:00:00.000Z" }, { "@start": "13:00:00.000Z", "@end": "16:00:00.000Z" } ] } ] } } |
Copyright © Cloud Software Group, Inc. All rights reserved.