Zimbra REST API Reference:Get Calendar: Difference between revisions

(Remove old ZCS_6.0 prefixes)
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[ZCS_6.0:Zimbra_REST_API_Reference|<< Back to Zimbra REST API Reference]]
{{Template:TabHeader}}
{{Template:Tab2|[[Zimbra_REST_API_Reference|Introduction]]}}
{{Template:Tab2|[[Zimbra_REST_API_Reference:Get_Folder|Method: Get Folder]]}}
{{Template:Tab2|[[Zimbra_REST_API_Reference:Import_Message|Method: Import Message]]}}
{{Template:Tab2|[[Zimbra_REST_API_Reference:Get_Contacts|Method: Get Contacts]]}}
{{Template:Tab2|[[Zimbra_REST_API_Reference:Import_Contacts|Method: Import Contacts]]}}
{{Template:Tab1|[[Zimbra_REST_API_Reference:Get_Calendar|Method: Get Calendar]]}}
{{Template:Tab2|[[Zimbra_REST_API_Reference:Get_FreeBusy|Method: Get FreeBusy]]}}
{{Template:Tab2|[[Zimbra_REST_API_Reference:Import_Appointments|Method: Import Appointments]]}}
{{Template:Tab2|[[Zimbra_REST_API_Reference:Get_Tasks|Method: Get Tasks]]}}
{{Template:Tab2|[[Zimbra_REST_API_Reference:Get_Item|Method: Get Item]]}}
{{Template:Tab2|[[Zimbra_REST_API_Reference:Get_Briefcase|Method: Get Briefcase]]}}
{{Template:Tab2|[[Zimbra_REST_API_Reference:Get_Briefcase_Item|Method: Get Briefcase Item]]}}
{{Template:Tab2|[[Zimbra_REST_API_Reference:Export_Mailbox|Method: Export Mailbox]]}}
{{Template:TabFooter}}
 
{{Article Infobox|{{devel}}|{{ZCS 8.0}}|{{ZCS 7.0}}|{{ZCS 6.0}}|}}[[ZCS_6.0:Zimbra_REST_API_Reference|<< Back to Zimbra REST API Reference]]


== REST API Method: Get Calendar ==
== REST API Method: Get Calendar ==


Gets the calendar.
Gets the appointments from the calendar. The default folder is "calendar" but user-defined folders are also supported.  


=== URL ===
=== URL ===
Line 10: Line 26:
http://localhost:7070/home/john.doe/calendar?{params}
http://localhost:7070/home/john.doe/calendar?{params}
</pre>
</pre>
Go to [[ZCS_6.0:Zimbra_REST_API_Reference#Command_Format|Command Format]]
=== HTTP Method ===
<code>GET</code>


=== Formats ===
=== Formats ===
Line 22: Line 44:


<ul>
<ul>
<li><code>fmt</code>. Optional. The response format. Defaults to <code>ics</code></li>
<li><code>fmt</code>. Optional. The response format. Defaults to <code>ics</code> format.</li>
<li><code>query</code>. Optional. A query keyword.</li>
<li><code>start</code>. Optional. The start time range (milliseconds | yyyy/dd/mm | mm/dd/yyy | [[ZCS_6.0:Zimbra_REST_API_Reference:Get_Calendar#Relative_Dates|relative dates]] ).</li>
<li><code>end</code>. Optional. The end time range (milliseconds | yyyy/dd/mm | mm/dd/yyy | [[ZCS_6.0:Zimbra_REST_API_Reference:Get_Calendar#Relative_Dates|relative dates]] ).</li>
<li><code>query</code>. Optional. A query string.</li>
</ul>
</ul>


Line 31: Line 55:
<li><code>view</code>. Optional. Designates the display when using the <code>html</code> format. Options include: <code>day, week, workWeek, month</code>.
<li><code>view</code>. Optional. Designates the display when using the <code>html</code> format. Options include: <code>day, week, workWeek, month</code>.
<li><code>date</code>. Optional. Designates the date to display when using the <code>html</code> format. Format is date=[yyyymmdd]. For example, 2/15/2010 is <code>date=20100215</code>.
<li><code>date</code>. Optional. Designates the date to display when using the <code>html</code> format. Format is date=[yyyymmdd]. For example, 2/15/2010 is <code>date=20100215</code>.
<li><code>notoolbar</code>. Optional. Specifies to not include the toolbar (<code>notoolbar=1</code>)</li>
<li><code>color</code>. Optional. The color of the appointment text. Options include:
<li><code>color</code>. Optional. The color of the appointment text. Options include:
{|cellpadding="5" cellspacing="0" border="1" width="30%"
{|cellpadding="5" cellspacing="0" border="1" width="30%"
Line 67: Line 92:
|}
|}
</li>
</li>
<li><code>notoolbar</code>. Optional. Specifies to not include the toolbar (<code>notoolbar=1</code>)</li>
</ul>
 
==== Relative Dates ====
 
Relative dates are either in the future (p/+/{not-specified}) or the past (m/-), along with a numeric value, followed by the units. For units, everything after the first character is ignored (except for the "mi" case):
 
<ul>
<li>m(onths)</li>
<li>mi(nutes)</li>
<li>d(ays)</li>
<li>w(eeks)</li>
<li>h(ours)</li>
<li>y(ears)</li>
</ul>
 
Examples:
<ul>
<li><code>start=1day</code> is "1 day from now"</li>
<li><code>end=+2days</code> is "2 days from now"</li>
<li><code>start=p1day</code> is "1 day from now"</li>
<li><code>end=-2days</code> is "2 days ago"</li>
<li><code>start=+60mi</code> is "60 minutes from now"</li>
<li><code>end=+1week</code> is "1 week from now"</li>
<li><code>end=+6mon</code> is "6 months from now"</li>
<li><code>start=1year</code> is "1 year from now"</li>
</ul>
</ul>


Line 83: Line 132:
<pre>
<pre>
http://localhost:7070/home/john.doe/calendar?fmt=xml
http://localhost:7070/home/john.doe/calendar?fmt=xml
</pre>
Retrieve the calendar from the user-defined folder "MyHolidays" in JSON format:
<pre>
http://localhost:7070/home/john.doe/myholidays?fmt=json
</pre>
</pre>


Line 110: Line 164:




{{Article Footer|Zimbra Collaboration Suite 6.0|01/16/2010}}
{{Article Footer|Zimbra Collaboration Server 7.0|01/16/2010}}
 
 
[[Category:REST]]
[[Category:ZCS 7.0]]
[[Category:ZCS 6.0]]
[[Category:Developers]]

Latest revision as of 17:24, 5 August 2014

Introduction  


Method: Get Folder  


Method: Import Message  


Method: Get Contacts  


Method: Import Contacts  


Method: Get Calendar  


Method: Get FreeBusy  


Method: Import Appointments  


Method: Get Tasks  


Method: Get Item  


Method: Get Briefcase  


Method: Get Briefcase Item  


Method: Export Mailbox  


 


Developer Article

Article Information

This article applies to the following ZCS versions.

ZCS 8.0 Article ZCS 8.0 ZCS 7.0 Article ZCS 7.0 ZCS 6.0 Article ZCS 6.0

<< Back to Zimbra REST API Reference

REST API Method: Get Calendar

Gets the appointments from the calendar. The default folder is "calendar" but user-defined folders are also supported.

URL

http://localhost:7070/home/john.doe/calendar?{params}

Go to Command Format

HTTP Method

GET

Formats

ics,json,xml,rss,atom,html (Go to Response Formats)

Requires Authentication

true (Go to Authentication)

Parameters

  • fmt. Optional. The response format. Defaults to ics format.
  • start. Optional. The start time range (milliseconds | yyyy/dd/mm | mm/dd/yyy | relative dates ).
  • end. Optional. The end time range (milliseconds | yyyy/dd/mm | mm/dd/yyy | relative dates ).
  • query. Optional. A query string.

HTML Format Parameters

  • view. Optional. Designates the display when using the html format. Options include: day, week, workWeek, month.
  • date. Optional. Designates the date to display when using the html format. Format is date=[yyyymmdd]. For example, 2/15/2010 is date=20100215.
  • notoolbar. Optional. Specifies to not include the toolbar (notoolbar=1)
  • color. Optional. The color of the appointment text. Options include:
    Value Color
    0 defaultColor
    1 blue
    2 cyan
    3 green
    4 purple
    5 red
    6 yellow
    7 pink
    8 gray
    9 orange

Relative Dates

Relative dates are either in the future (p/+/{not-specified}) or the past (m/-), along with a numeric value, followed by the units. For units, everything after the first character is ignored (except for the "mi" case):

  • m(onths)
  • mi(nutes)
  • d(ays)
  • w(eeks)
  • h(ours)
  • y(ears)

Examples:

  • start=1day is "1 day from now"
  • end=+2days is "2 days from now"
  • start=p1day is "1 day from now"
  • end=-2days is "2 days ago"
  • start=+60mi is "60 minutes from now"
  • end=+1week is "1 week from now"
  • end=+6mon is "6 months from now"
  • start=1year is "1 year from now"

Usage Examples

Download the calendar as an iCalendar (ICS) file:

http://localhost:7070/home/john.doe/calendar
http://localhost:7070/home/john.doe/calendar?fmt=ics

Retrieve the calendar in XML format:

http://localhost:7070/home/john.doe/calendar?fmt=xml

Retrieve the calendar from the user-defined folder "MyHolidays" in JSON format:

http://localhost:7070/home/john.doe/myholidays?fmt=json

Retrieve the calendar in JSON format:

http://localhost:7070/home/john.doe/calendar?fmt=json

Retrieve the calendar HTML "month" view:

http://localhost:7070/home/john.doe/calendar.html
http://localhost:7070/home/john.doe/calendar?fmt=html

Retrieve the calendar HTML "workWeek" view:

http://localhost:7070/home/john.doe/calendar?fmt=html&view=workWeek

Retrieve the calendar HTML "day" view on January 23, 2009 (01/23/2009):

http://localhost:7070/home/john.doe/calendar?fmt=html&view=day&date=20090123


Verified Against: Zimbra Collaboration Server 7.0 Date Created: 01/16/2010
Article ID: https://wiki.zimbra.com/index.php?title=Zimbra_REST_API_Reference:Get_Calendar Date Modified: 2014-08-05



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search