-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathrfc4791-caldav.txt
5995 lines (4155 loc) · 202 KB
/
rfc4791-caldav.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Network Working Group C. Daboo
Request for Comments: 4791 Apple
Category: Standards Track B. Desruisseaux
Oracle
L. Dusseault
CommerceNet
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 Notice
Copyright (C) The IETF Trust (2007).
Abstract
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.
Daboo, et al. Standards Track [Page 1]
RFC 4791 CalDAV March 2007
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1. Notational Conventions . . . . . . . . . . . . . . . . . . 5
1.2. XML Namespaces and Processing . . . . . . . . . . . . . . 5
1.3. Method Preconditions and Postconditions . . . . . . . . . 6
2. Requirements Overview . . . . . . . . . . . . . . . . . . . . 6
3. Calendaring Data Model . . . . . . . . . . . . . . . . . . . . 7
3.1. Calendar Server . . . . . . . . . . . . . . . . . . . . . 7
3.2. Recurrence and the Data Model . . . . . . . . . . . . . . 8
4. Calendar Resources . . . . . . . . . . . . . . . . . . . . . . 9
4.1. Calendar Object Resources . . . . . . . . . . . . . . . . 9
4.2. Calendar Collection . . . . . . . . . . . . . . . . . . . 10
5. Calendar Access Feature . . . . . . . . . . . . . . . . . . . 11
5.1. Calendar Access Support . . . . . . . . . . . . . . . . . 11
5.1.1. Example: Using OPTIONS for the Discovery of
Calendar Access Support . . . . . . . . . . . . . . . 12
5.2. Calendar Collection Properties . . . . . . . . . . . . . . 12
5.2.1. CALDAV:calendar-description Property . . . . . . . . . 12
5.2.2. CALDAV:calendar-timezone Property . . . . . . . . . . 13
5.2.3. CALDAV:supported-calendar-component-set Property . . . 14
5.2.4. CALDAV:supported-calendar-data Property . . . . . . . 15
5.2.5. CALDAV:max-resource-size Property . . . . . . . . . . 16
5.2.6. CALDAV:min-date-time Property . . . . . . . . . . . . 17
5.2.7. CALDAV:max-date-time Property . . . . . . . . . . . . 18
5.2.8. CALDAV:max-instances Property . . . . . . . . . . . . 19
5.2.9. CALDAV:max-attendees-per-instance Property . . . . . . 19
5.2.10. Additional Precondition for PROPPATCH . . . . . . . . 20
5.3. Creating Resources . . . . . . . . . . . . . . . . . . . . 20
5.3.1. MKCALENDAR Method . . . . . . . . . . . . . . . . . . 20
5.3.1.1. Status Codes . . . . . . . . . . . . . . . . . . . 22
5.3.1.2. Example: Successful MKCALENDAR Request . . . . . . 23
5.3.2. Creating Calendar Object Resources . . . . . . . . . . 25
5.3.2.1. Additional Preconditions for PUT, COPY, and
MOVE . . . . . . . . . . . . . . . . . . . . . . . 26
5.3.3. Non-Standard Components, Properties, and Parameters . 28
5.3.4. Calendar Object Resource Entity Tag . . . . . . . . . 28
6. Calendaring Access Control . . . . . . . . . . . . . . . . . . 29
6.1. Calendaring Privilege . . . . . . . . . . . . . . . . . . 29
6.1.1. CALDAV:read-free-busy Privilege . . . . . . . . . . . 29
6.2. Additional Principal Property . . . . . . . . . . . . . . 30
6.2.1. CALDAV:calendar-home-set Property . . . . . . . . . . 30
7. Calendaring Reports . . . . . . . . . . . . . . . . . . . . . 31
7.1. REPORT Method . . . . . . . . . . . . . . . . . . . . . . 31
7.2. Ordinary Collections . . . . . . . . . . . . . . . . . . . 31
7.3. Date and Floating Time . . . . . . . . . . . . . . . . . . 32
7.4. Time Range Filtering . . . . . . . . . . . . . . . . . . . 32
7.5. Searching Text: Collations . . . . . . . . . . . . . . . . 33
Daboo, et al. Standards Track [Page 2]
RFC 4791 CalDAV March 2007
7.5.1. CALDAV:supported-collation-set Property . . . . . . . 34
7.6. Partial Retrieval . . . . . . . . . . . . . . . . . . . . 34
7.7. Non-Standard Components, Properties, and Parameters . . . 35
7.8. CALDAV:calendar-query REPORT . . . . . . . . . . . . . . . 36
7.8.1. Example: Partial Retrieval of Events by Time Range . . 38
7.8.2. Example: Partial Retrieval of Recurring Events . . . . 42
7.8.3. Example: Expanded Retrieval of Recurring Events . . . 45
7.8.4. Example: Partial Retrieval of Stored Free Busy
Components . . . . . . . . . . . . . . . . . . . . . . 48
7.8.5. Example: Retrieval of To-Dos by Alarm Time Range . . . 50
7.8.6. Example: Retrieval of Event by UID . . . . . . . . . . 51
7.8.7. Example: Retrieval of Events by PARTSTAT . . . . . . . 53
7.8.8. Example: Retrieval of Events Only . . . . . . . . . . 55
7.8.9. Example: Retrieval of All Pending To-Dos . . . . . . . 59
7.8.10. Example: Attempt to Query Unsupported Property . . . . 62
7.9. CALDAV:calendar-multiget REPORT . . . . . . . . . . . . . 63
7.9.1. Example: Successful CALDAV:calendar-multiget REPORT . 64
7.10. CALDAV:free-busy-query REPORT . . . . . . . . . . . . . . 66
7.10.1. Example: Successful CALDAV:free-busy-query REPORT . . 68
8. Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.1. Client-to-Client Interoperability . . . . . . . . . . . . 69
8.2. Synchronization Operations . . . . . . . . . . . . . . . . 69
8.2.1. Use of Reports . . . . . . . . . . . . . . . . . . . . 69
8.2.1.1. Restrict the Time Range . . . . . . . . . . . . . 69
8.2.1.2. Synchronize by Time Range . . . . . . . . . . . . 70
8.2.1.3. Synchronization Process . . . . . . . . . . . . . 70
8.2.2. Restrict the Properties Returned . . . . . . . . . . . 72
8.3. Use of Locking . . . . . . . . . . . . . . . . . . . . . . 72
8.4. Finding Calendars . . . . . . . . . . . . . . . . . . . . 72
8.5. Storing and Using Attachments . . . . . . . . . . . . . . 74
8.5.1. Inline Attachments . . . . . . . . . . . . . . . . . . 74
8.5.2. External Attachments . . . . . . . . . . . . . . . . . 75
8.6. Storing and Using Alarms . . . . . . . . . . . . . . . . . 76
9. XML Element Definitions . . . . . . . . . . . . . . . . . . . 77
9.1. CALDAV:calendar XML Element . . . . . . . . . . . . . . . 77
9.2. CALDAV:mkcalendar XML Element . . . . . . . . . . . . . . 77
9.3. CALDAV:mkcalendar-response XML Element . . . . . . . . . . 78
9.4. CALDAV:supported-collation XML Element . . . . . . . . . . 78
9.5. CALDAV:calendar-query XML Element . . . . . . . . . . . . 78
9.6. CALDAV:calendar-data XML Element . . . . . . . . . . . . . 79
9.6.1. CALDAV:comp XML Element . . . . . . . . . . . . . . . 80
9.6.2. CALDAV:allcomp XML Element . . . . . . . . . . . . . . 81
9.6.3. CALDAV:allprop XML Element . . . . . . . . . . . . . . 81
9.6.4. CALDAV:prop XML Element . . . . . . . . . . . . . . . 82
9.6.5. CALDAV:expand XML Element . . . . . . . . . . . . . . 82
9.6.6. CALDAV:limit-recurrence-set XML Element . . . . . . . 83
9.6.7. CALDAV:limit-freebusy-set XML Element . . . . . . . . 84
9.7. CALDAV:filter XML Element . . . . . . . . . . . . . . . . 85
Daboo, et al. Standards Track [Page 3]
RFC 4791 CalDAV March 2007
9.7.1. CALDAV:comp-filter XML Element . . . . . . . . . . . . 85
9.7.2. CALDAV:prop-filter XML Element . . . . . . . . . . . . 86
9.7.3. CALDAV:param-filter XML Element . . . . . . . . . . . 87
9.7.4. CALDAV:is-not-defined XML Element . . . . . . . . . . 88
9.7.5. CALDAV:text-match XML Element . . . . . . . . . . . . 88
9.8. CALDAV:timezone XML Element . . . . . . . . . . . . . . . 89
9.9. CALDAV:time-range XML Element . . . . . . . . . . . . . . 90
9.10. CALDAV:calendar-multiget XML Element . . . . . . . . . . . 94
9.11. CALDAV:free-busy-query XML Element . . . . . . . . . . . . 95
10. Internationalization Considerations . . . . . . . . . . . . . 95
11. Security Considerations . . . . . . . . . . . . . . . . . . . 95
12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 96
12.1. Namespace Registration . . . . . . . . . . . . . . . . . . 96
13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 96
14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 97
14.1. Normative References . . . . . . . . . . . . . . . . . . . 97
14.2. Informative References . . . . . . . . . . . . . . . . . . 98
Appendix A. CalDAV Method Privilege Table (Normative) . . . . . . 99
Appendix B. Calendar Collections Used in the Examples . . . . . . 99
Daboo, et al. Standards Track [Page 4]
RFC 4791 CalDAV March 2007
1. Introduction
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
access protocol.
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.
Daboo, et al. Standards Track [Page 5]
RFC 4791 CalDAV March 2007
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
that specification.
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
request.
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;
Daboo, et al. Standards Track [Page 6]
RFC 4791 CalDAV March 2007
o MUST support all calendaring reports defined in Section 7 of this
document; and
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
[RFC3253].
In addition, a server:
o SHOULD support the MKCALENDAR method defined in Section 5.3.1 of
this document.
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
data model.
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
Daboo, et al. Standards Track [Page 7]
RFC 4791 CalDAV March 2007
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
instances.
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
time range.
Daboo, et al. Standards Track [Page 8]
RFC 4791 CalDAV March 2007
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).
Daboo, et al. Standards Track [Page 9]
RFC 4791 CalDAV March 2007
For example, given the following iCalendar object:
BEGIN:VCALENDAR
PRODID:-//Example Corp.//CalDAV Client//EN
VERSION:2.0
BEGIN:VEVENT
UID:1@example.com
SUMMARY:One-off Meeting
DTSTAMP:20041210T183904Z
DTSTART:20041207T120000Z
DTEND:20041207T130000Z
END:VEVENT
BEGIN:VEVENT
UID:2@example.com
SUMMARY:Weekly Meeting
DTSTAMP:20041210T183838Z
DTSTART:20041206T120000Z
DTEND:20041206T130000Z
RRULE:FREQ=WEEKLY
END:VEVENT
BEGIN:VEVENT
UID:2@example.com
SUMMARY:Weekly Meeting
RECURRENCE-ID:20041213T120000Z
DTSTAMP:20041210T183838Z
DTSTART:20041213T130000Z
DTEND:20041213T140000Z
END:VEVENT
END:VCALENDAR
The VEVENT component with the UID value "1@example.com" would be
stored in its own calendar object resource. The two VEVENT
components with the UID value "2@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:
calendar is:
<!ELEMENT calendar EMPTY>
Daboo, et al. Standards Track [Page 10]
RFC 4791 CalDAV March 2007
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
calendar collection:
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
collection.
Multiple calendar collections MAY be children of the same collection.
5. Calendar Access Feature
5.1. Calendar Access Support
A server supporting the features described in this document MUST
include "calendar-access" as a field in the DAV response header from
an OPTIONS request on any resource that supports any calendar
properties, reports, method, or privilege. A value of "calendar-
access" in the DAV response header MUST indicate that the server
supports all MUST level requirements specified in this document.
Daboo, et al. Standards Track [Page 11]
RFC 4791 CalDAV March 2007
5.1.1. Example: Using OPTIONS for the Discovery of Calendar Access
Support
>> Request <<
OPTIONS /home/bernard/calendars/ HTTP/1.1
Host: cal.example.com
>> Response <<
HTTP/1.1 200 OK
Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE
Allow: PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL
DAV: 1, 2, access-control, calendar-access
Date: Sat, 11 Nov 2006 09:32:12 GMT
Content-Length: 0
In this example, the OPTIONS method returns the value "calendar-
access" in the DAV response header to indicate that the collection
"/home/bernard/calendars/" supports the properties, reports, method,
or privilege defined in this specification.
5.2. Calendar Collection Properties
This section defines properties for calendar collections.
5.2.1. CALDAV:calendar-description Property
Name: calendar-description
Namespace: urn:ietf:params:xml:ns:caldav
Purpose: Provides a human-readable description of the calendar
collection.
Conformance: This property MAY be defined on any calendar
collection. If defined, it MAY be protected and SHOULD NOT be
returned by a PROPFIND DAV:allprop request (as defined in Section
12.14.1 of [RFC2518]). An xml:lang attribute indicating the human
language of the description SHOULD be set for this property by
clients or through server provisioning. Servers MUST return any
xml:lang attribute if set for the property.
Description: If present, the property contains a description of the
calendar collection that is suitable for presentation to a user.
If not present, the client should assume no description for the
calendar collection.
Daboo, et al. Standards Track [Page 12]
RFC 4791 CalDAV March 2007
Definition:
<!ELEMENT calendar-description (#PCDATA)>
PCDATA value: string
Example:
<C:calendar-description xml:lang="fr-CA"
xmlns:C="urn:ietf:params:xml:ns:caldav"
>Calendrier de Mathilde Desruisseaux</C:calendar-description>
5.2.2. CALDAV:calendar-timezone Property
Name: calendar-timezone
Namespace: urn:ietf:params:xml:ns:caldav
Purpose: Specifies a time zone on a calendar collection.
Conformance: This property SHOULD be defined on all calendar
collections. If defined, it SHOULD NOT be returned by a PROPFIND
DAV:allprop request (as defined in Section 12.14.1 of [RFC2518]).
Description: The CALDAV:calendar-timezone property is used to
specify the time zone the server should rely on to resolve "date"
values and "date with local time" values (i.e., floating time) to
"date with UTC time" values. The server will require this
information to determine if a calendar component scheduled with
"date" values or "date with local time" values overlaps a CALDAV:
time-range specified in a CALDAV:calendar-query REPORT. The
server will also require this information to compute the proper
FREEBUSY time period as "date with UTC time" in the VFREEBUSY
component returned in a response to a CALDAV:free-busy-query
REPORT request that takes into account calendar components
scheduled with "date" values or "date with local time" values. In
the absence of this property, the server MAY rely on the time zone
of their choice.
Note: The iCalendar data embedded within the CALDAV:calendar-
timezone XML element MUST follow the standard XML character data
encoding rules, including use of <, >, & etc. entity
encoding or the use of a <![CDATA[ ... ]]> construct. In the
later case, the iCalendar data cannot contain the character
sequence "]]>", which is the end delimiter for the CDATA section.
Daboo, et al. Standards Track [Page 13]
RFC 4791 CalDAV March 2007
Definition:
<!ELEMENT calendar-timezone (#PCDATA)>
PCDATA value: an iCalendar object with exactly one VTIMEZONE
component.
Example:
<C:calendar-timezone
xmlns:C="urn:ietf:params:xml:ns:caldav">BEGIN:VCALENDAR
PRODID:-//Example Corp.//CalDAV Client//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:US-Eastern
LAST-MODIFIED:19870101T000000Z
BEGIN:STANDARD
DTSTART:19671029T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:Eastern Standard Time (US & Canada)
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19870405T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:Eastern Daylight Time (US & Canada)
END:DAYLIGHT
END:VTIMEZONE
END:VCALENDAR
</C:calendar-timezone>
5.2.3. CALDAV:supported-calendar-component-set Property
Name: supported-calendar-component-set
Namespace: urn:ietf:params:xml:ns:caldav
Purpose: Specifies the calendar component types (e.g., VEVENT,
VTODO, etc.) that calendar object resources can contain in the
calendar collection.
Conformance: This property MAY be defined on any calendar
collection. If defined, it MUST be protected and SHOULD NOT be
returned by a PROPFIND DAV:allprop request (as defined in Section
12.14.1 of [RFC2518]).
Daboo, et al. Standards Track [Page 14]
RFC 4791 CalDAV March 2007
Description: The CALDAV:supported-calendar-component-set property is
used to specify restrictions on the calendar component types that
calendar object resources may contain in a calendar collection.
Any attempt by the client to store calendar object resources with
component types not listed in this property, if it exists, MUST
result in an error, with the CALDAV:supported-calendar-component
precondition (Section 5.3.2.1) being violated. Since this
property is protected, it cannot be changed by clients using a
PROPPATCH request. However, clients can initialize the value of
this property when creating a new calendar collection with
MKCALENDAR. The empty-element tag <C:comp name="VTIMEZONE"/> MUST
only be specified if support for calendar object resources that
only contain VTIMEZONE components is provided or desired. Support
for VTIMEZONE components in calendar object resources that contain
VEVENT or VTODO components is always assumed. In the absence of
this property, the server MUST accept all component types, and the
client can assume that all component types are accepted.
Definition:
<!ELEMENT supported-calendar-component-set (comp+)>
Example:
<C:supported-calendar-component-set
xmlns:C="urn:ietf:params:xml:ns:caldav">
<C:comp name="VEVENT"/>
<C:comp name="VTODO"/>
</C:supported-calendar-component-set>
5.2.4. CALDAV:supported-calendar-data Property
Name: supported-calendar-data
Namespace: urn:ietf:params:xml:ns:caldav
Purpose: Specifies what media types are allowed for calendar object
resources in a calendar collection.
Conformance: This property MAY be defined on any calendar
collection. If defined, it MUST be protected and SHOULD NOT be
returned by a PROPFIND DAV:allprop request (as defined in Section
12.14.1 of [RFC2518]).
Description: The CALDAV:supported-calendar-data property is used to
specify the media type supported for the calendar object resources
contained in a given calendar collection (e.g., iCalendar version
2.0). Any attempt by the client to store calendar object
Daboo, et al. Standards Track [Page 15]
RFC 4791 CalDAV March 2007
resources with a media type not listed in this property MUST
result in an error, with the CALDAV:supported-calendar-data
precondition (Section 5.3.2.1) being violated. In the absence of
this property, the server MUST only accept data with the media
type "text/calendar" and iCalendar version 2.0, and clients can
assume that the server will only accept this data.
Definition:
<!ELEMENT supported-calendar-data (calendar-data+)>
Example:
<C:supported-calendar-data
xmlns:C="urn:ietf:params:xml:ns:caldav">
<C:calendar-data content-type="text/calendar" version="2.0"/>
</C:supported-calendar-data>
5.2.5. CALDAV:max-resource-size Property
Name: max-resource-size
Namespace: urn:ietf:params:xml:ns:caldav
Purpose: Provides a numeric value indicating the maximum size of a
resource in octets that the server is willing to accept when a
calendar object resource is stored in a calendar collection.
Conformance: This property MAY be defined on any calendar
collection. If defined, it MUST be protected and SHOULD NOT be
returned by a PROPFIND DAV:allprop request (as defined in Section
12.14.1 of [RFC2518]).
Description: The CALDAV:max-resource-size is used to specify a
numeric value that represents the maximum size in octets that the
server is willing to accept when a calendar object resource is
stored in a calendar collection. Any attempt to store a calendar
object resource exceeding this size MUST result in an error, with
the CALDAV:max-resource-size precondition (Section 5.3.2.1) being
violated. In the absence of this property, the client can assume
that the server will allow storing a resource of any reasonable
size.
Definition:
<!ELEMENT max-resource-size (#PCDATA)>
PCDATA value: a numeric value (positive integer)
Daboo, et al. Standards Track [Page 16]
RFC 4791 CalDAV March 2007
Example:
<C:max-resource-size xmlns:C="urn:ietf:params:xml:ns:caldav"
>102400</C:max-resource-size>
5.2.6. CALDAV:min-date-time Property
Name: min-date-time
Namespace: urn:ietf:params:xml:ns:caldav
Purpose: Provides a DATE-TIME value indicating the earliest date and
time (in UTC) that the server is willing to accept for any DATE or
DATE-TIME value in a calendar object resource stored in a calendar
collection.
Conformance: This property MAY be defined on any calendar
collection. If defined, it MUST be protected and SHOULD NOT be
returned by a PROPFIND DAV:allprop request (as defined in Section
12.14.1 of [RFC2518]).
Description: The CALDAV:min-date-time is used to specify an
iCalendar DATE-TIME value in UTC that indicates the earliest
inclusive date that the server is willing to accept for any
explicit DATE or DATE-TIME value in a calendar object resource
stored in a calendar collection. Any attempt to store a calendar
object resource using a DATE or DATE-TIME value earlier than this
value MUST result in an error, with the CALDAV:min-date-time
precondition (Section 5.3.2.1) being violated. Note that servers
MUST accept recurring components that specify instances beyond
this limit, provided none of those instances have been overridden.
In that case, the server MAY simply ignore those instances outside
of the acceptable range when processing reports on the calendar
object resource. In the absence of this property, the client can
assume any valid iCalendar date may be used at least up to the
CALDAV:max-date-time value, if that is defined.
Definition:
<!ELEMENT min-date-time (#PCDATA)>
PCDATA value: an iCalendar format DATE-TIME value in UTC
Example:
<C:min-date-time xmlns:C="urn:ietf:params:xml:ns:caldav"
>19000101T000000Z</C:min-date-time>
Daboo, et al. Standards Track [Page 17]
RFC 4791 CalDAV March 2007
5.2.7. CALDAV:max-date-time Property
Name: max-date-time
Namespace: urn:ietf:params:xml:ns:caldav
Purpose: Provides a DATE-TIME value indicating the latest date and
time (in UTC) that the server is willing to accept for any DATE or
DATE-TIME value in a calendar object resource stored in a calendar
collection.
Conformance: This property MAY be defined on any calendar
collection. If defined, it MUST be protected and SHOULD NOT be
returned by a PROPFIND DAV:allprop request (as defined in Section
12.14.1 of [RFC2518]).
Description: The CALDAV:max-date-time is used to specify an
iCalendar DATE-TIME value in UTC that indicates the inclusive
latest date that the server is willing to accept for any date or
time value in a calendar object resource stored in a calendar
collection. Any attempt to store a calendar object resource using
a DATE or DATE-TIME value later than this value MUST result in an
error, with the CALDAV:max-date-time precondition
(Section 5.3.2.1) being violated. Note that servers MUST accept
recurring components that specify instances beyond this limit,
provided none of those instances have been overridden. In that
case, the server MAY simply ignore those instances outside of the
acceptable range when processing reports on the calendar object
resource. In the absence of this property, the client can assume
any valid iCalendar date may be used at least down to the CALDAV:
min-date-time value, if that is defined.
Definition:
<!ELEMENT max-date-time (#PCDATA)>
PCDATA value: an iCalendar format DATE-TIME value in UTC
Example:
<C:max-date-time xmlns:C="urn:ietf:params:xml:ns:caldav"
>20491231T235959Z</C:max-date-time>