Network Working Group C. Daboo
Request for Comments: 4791 Apple
Category: Standards Track B. Desruisseaux
March 2007 Calendaring Extensions to WebDAV (CalDAV)
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright (C) The IETF Trust (2007).
This document defines extensions to the Web Distributed Authoring and
Versioning (WebDAV) protocol to specify a standard way of accessing,
managing, and sharing calendaring and scheduling information based on
the iCalendar format. This document defines the "calendar-access"
feature of CalDAV.
The concept of using HTTP [RFC2616] and WebDAV [RFC2518] as a basis
for a calendar access protocol is by no means a new concept: it was
discussed in the IETF CALSCH working group as early as 1997 or 1998.
Several companies have implemented calendar access protocols using
HTTP to upload and download iCalendar [RFC2445] objects, and using
WebDAV to get listings of resources. However, those implementations
do not interoperate because there are many small and big decisions to
be made in how to model calendaring data as WebDAV resources, as well
as how to implement required features that aren't already part of
WebDAV. This document proposes a way to model calendar data in
WebDAV, with additional features to make an interoperable calendar
1.1. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119].
The term "protected" is used in the Conformance field of property
definitions as defined in Section 1.4.2 of [RFC3253].
When XML element types in the namespaces "DAV:" and
"urn:ietf:params:xml:ns:caldav" are referenced in this document
outside of the context of an XML fragment, the string "DAV:" and
"CALDAV:" will be prefixed to the element type names, respectively.
1.2. XML Namespaces and Processing
Definitions of XML elements in this document use XML element type
declarations (as found in XML Document Type Declarations), described
in Section 3.2 of [W3C.REC-xml-20060816].
The namespace "urn:ietf:params:xml:ns:caldav" is reserved for the XML
elements defined in this specification, its revisions, and related
CalDAV specifications. XML elements defined by individual
implementations MUST NOT use the "urn:ietf:params:xml:ns:caldav"
namespace, and instead should use a namespace that they control.
The XML declarations used in this document do not include namespace
information. Thus, implementers must not use these declarations as
the only way to create valid CalDAV properties or to validate CalDAV
XML element types. Some of the declarations refer to XML elements
defined by WebDAV [RFC2518], which use the "DAV:" namespace.
Wherever such XML elements appear, they are explicitly prefixed with
"DAV:" to avoid confusion.
Also note that some CalDAV XML element names are identical to WebDAV
XML element names, though their namespace differs. Care must be
taken not to confuse the two sets of names.
Processing of XML by CalDAV clients and servers MUST follow the rules
described in [RFC2518]; in particular, Section 14, and Appendix 3 of
1.3. Method Preconditions and Postconditions
A "precondition" of a method describes the state of the server that
must be true for that method to be performed. A "postcondition" of a
method describes the state of the server that must be true after that
method has been completed. If a method precondition or postcondition
for a request is not satisfied, the response status of the request
MUST either be 403 (Forbidden), if the request should not be repeated
because it will always fail, or 409 (Conflict), if it is expected
that the user might be able to resolve the conflict and resubmit the
In order to allow better client handling of 403 and 409 responses, a
distinct XML element type is associated with each method precondition
and postcondition of a request. When a particular precondition is
not satisfied or a particular postcondition cannot be achieved, the
appropriate XML element MUST be returned as the child of a top-level
DAV:error element in the response body, unless otherwise negotiated
by the request.
2. Requirements Overview
This section lists what functionality is required of a CalDAV server.
To advertise support for CalDAV, a server:
o MUST support iCalendar [RFC2445] as a media type for the calendar
object resource format;
o MUST support WebDAV Class 1 [RFC2518] (note that [rfc2518bis]
describes clarifications to [RFC2518] that aid interoperability);
o MUST support WebDAV ACL [RFC3744] with the additional privilege
defined in Section 6.1 of this document;
o MUST support transport over TLS [RFC2246] as defined in [RFC2818]
(note that [RFC2246] has been obsoleted by [RFC4346]);
o MUST support ETags [RFC2616] with additional requirements
specified in Section 5.3.4 of this document;
o MUST support all calendaring reports defined in Section 7 of this
o MUST advertise support on all calendar collections and calendar
object resources for the calendaring reports in the DAV:supported-
report-set property, as defined in Versioning Extensions to WebDAV
In addition, a server:
o SHOULD support the MKCALENDAR method defined in Section 5.3.1 of
3. Calendaring Data Model
One of the features that has made WebDAV a successful protocol is its
firm data model. This makes it a useful framework for other
applications such as calendaring. This specification follows the
same pattern by developing all features based on a well-described
As a brief overview, a CalDAV calendar is modeled as a WebDAV
collection with a defined structure; each calendar collection
contains a number of resources representing calendar objects as its
direct child resource. Each resource representing a calendar object
(event, to-do, journal entry, or other calendar components) is called
a "calendar object resource". Each calendar object resource and each
calendar collection can be individually locked and have individual
WebDAV properties. Requirements derived from this model are provided
in Section 4.1 and Section 4.2.
3.1. Calendar Server
A CalDAV server is a calendaring-aware engine combined with a WebDAV
repository. A WebDAV repository is a set of WebDAV collections,
containing other WebDAV resources, within a unified URL namespace.
For example, the repository "http://www.example.com/webdav/" may
contain WebDAV collections and resources, all of which have URLs
beginning with "http://www.example.com/webdav/". Note that the root
URL, "http://www.example.com/", may not itself be a WebDAV repository
(for example, if the WebDAV support is implemented through a servlet
or other Web server extension).
A WebDAV repository MAY include calendar data in some parts of its
URL namespace, and non-calendaring data in other parts.
A WebDAV repository can advertise itself as a CalDAV server if it
supports the functionality defined in this specification at any point
within the root of the repository. That might mean that calendaring
data is spread throughout the repository and mixed with non-calendar
data in nearby collections (e.g., calendar data may be found in
/home/lisa/calendars/ as well as in /home/bernard/calendars/, and
non-calendar data in /home/lisa/contacts/). Or, it might mean that
calendar data can be found only in certain sections of the repository
(e.g., /calendar/). Calendaring features are only required in the
repository sections that are or contain calendar object resources.
Therefore, a repository confining calendar data to the /calendar/
collection would only need to support the CalDAV required features
within that collection.
The CalDAV server or repository is the canonical location for
calendar data and state information. Clients may submit requests to
change data or download data. Clients may store calendar objects
offline and attempt to synchronize at a later time. However, clients
MUST be prepared for calendar data on the server to change between
the time of last synchronization and when attempting an update, as
calendar collections may be shared and accessible via multiple
clients. Entity tags and other features make this possible.
3.2. Recurrence and the Data Model
Recurrence is an important part of the data model because it governs
how many resources are expected to exist. This specification models
a recurring calendar component and its recurrence exceptions as a
single resource. In this model, recurrence rules, recurrence dates,
exception rules, and exception dates are all part of the data in a
single calendar object resource. This model avoids problems of
limiting how many recurrence instances to store in the repository,
how to keep recurrence instances in sync with the recurring calendar
component, and how to link recurrence exceptions with the recurring
calendar component. It also results in less data to synchronize
between client and server, and makes it easier to make changes to all
recurrence instances or to a recurrence rule. It makes it easier to
create a recurring calendar component and to delete all recurrence
Clients are not forced to retrieve information about all recurrence
instances of a recurring component. The CALDAV:calendar-query and
CALDAV:calendar-multiget reports defined in this document allow
clients to retrieve only recurrence instances that overlap a given
4. Calendar Resources
4.1. Calendar Object Resources
Calendar object resources contained in calendar collections MUST NOT
contain more than one type of calendar component (e.g., VEVENT,
VTODO, VJOURNAL, VFREEBUSY, etc.) with the exception of VTIMEZONE
components, which MUST be specified for each unique TZID parameter
value specified in the iCalendar object. For instance, a calendar
object resource can contain one VEVENT component and one VTIMEZONE
component, but it cannot contain one VEVENT component and one VTODO
component. Instead, the VEVENT and VTODO components would have to be
stored in separate calendar object resources in the same collection.
Calendar object resources contained in calendar collections MUST NOT
specify the iCalendar METHOD property.
The UID property value of the calendar components contained in a
calendar object resource MUST be unique in the scope of the calendar
collection in which they are stored.
Calendar components in a calendar collection that have different UID
property values MUST be stored in separate calendar object resources.
Calendar components with the same UID property value, in a given
calendar collection, MUST be contained in the same calendar object
resource. This ensures that all components in a recurrence "set" are
contained in the same calendar object resource. It is possible for a
calendar object resource to just contain components that represent
"overridden" instances (ones that modify the behavior of a regular
instance, and thus include a RECURRENCE-ID property) without also
including the "master" recurring component (the one that defines the
recurrence "set" and does not contain any RECURRENCE-ID property).
For example, given the following iCalendar object:
PRODID:-//Example Corp.//CalDAV Client//EN
The VEVENT component with the UID value "firstname.lastname@example.org" would be
stored in its own calendar object resource. The two VEVENT
components with the UID value "email@example.com", which represent a
recurring event where one recurrence instance has been overridden,
would be stored in the same calendar object resource.
4.2. Calendar Collection
A calendar collection contains calendar object resources that
represent calendar components within a calendar. A calendar
collection is manifested to clients as a WebDAV resource collection
identified by a URL. A calendar collection MUST report the DAV:
collection and CALDAV:calendar XML elements in the value of the DAV:
resourcetype property. The element type declaration for CALDAV:
<!ELEMENT calendar EMPTY>
A calendar collection can be created through provisioning (i.e.,
automatically created when a user's account is provisioned), or it
can be created with the MKCALENDAR method (see Section 5.3.1). This
method can be useful for a user to create additional calendars (e.g.,
soccer schedule) or for users to share a calendar (e.g., team events
or conference rooms). However, note that this document doesn't
define the purpose of extra calendar collections. Users must rely on
non-standard cues to find out what a calendar collection is for, or
use the CALDAV:calendar-description property defined in Section 5.2.1
to provide such a cue.
The following restrictions are applied to the resources within a
a. Calendar collections MUST only contain calendar object resources
and collections that are not calendar collections, i.e., the only
"top-level" non-collection resources allowed in a calendar
collection are calendar object resources. This ensures that
calendar clients do not have to deal with non-calendar data in a
calendar collection, though they do have to distinguish between
calendar object resources and collections when using standard
WebDAV techniques to examine the contents of a collection.
b. Collections contained in calendar collections MUST NOT contain
calendar collections at any depth, i.e., "nesting" of calendar
collections within other calendar collections at any depth is not
allowed. This specification does not define how collections
contained in a calendar collection are used or how they relate to
any calendar object resources contained in the calendar
Multiple calendar collections MAY be children of the same collection.