4.8 KiB
4.8 KiB
CalDAV Endpoint Requirements
Purpose
Define exact CalDAV URI structure, required methods/reports/properties, and expected status behavior for interoperability.
Scope
This document covers:
- CalDAV URI layout
- Method support by resource type
- Required WebDAV/CalDAV properties and reports
- Required status-code behavior
Normative Boundaries
- This document is authoritative for CalDAV URI structure and method/property/report support.
- Event/recurrence data semantics are defined in
requirements/caldav.mdandrequirements/recurrence_exceptions.md. - Authentication/authorization and error behavior norms are defined in:
requirements/authentication.mdrequirements/authorization.mdrequirements/error_model.md
Endpoint Layout
Base CalDAV root:
/caldav/- If
url_slugis configured in setup, canonical CalDAV root is/<url_slug>/caldav/.
Resource hierarchy:
- Principal collection:
/caldav/principals/ - User principal:
/caldav/principals/{user_id}/ - Calendar home set:
/caldav/calendars/ - Shared public calendar collection:
/caldav/calendars/public/ - Event object resource:
/caldav/calendars/public/{object_id}.ics
URI rules:
{user_id}is stable and URL-safe.{object_id}is stable for object lifetime.- All authenticated principals discover the same shared calendar home set and
publiccollection. - Object rename/move behavior is unsupported in first pass unless explicitly implemented.
Methods by Resource Type
/caldav/
OPTIONSPROPFIND(Depth 0/1)
Principal resources
PROPFINDREPORTwhere applicable for principal discovery support
Calendar collection resources
OPTIONSPROPFINDGET(availability probe support; returns200with empty body on collection URL)REPORT(calendar-query,calendar-multiget,sync-collection)
Event object resources
GETPUTDELETEPROPFIND(Depth 0)
Required DAV/CalDAV Properties
Calendar collection and principal responses must support, at minimum, these properties (where applicable):
resourcetypedisplaynamecurrent-user-principalprincipal-URLcalendar-home-setsupported-calendar-component-setgetctag(or equivalent documented change tag)getetagfor object resourcessync-tokenfor collections supporting sync
REPORT Support
calendar-querywith time-range filteringcalendar-multigetby href setsync-collectionfor incremental changes since sync token- Collection
REPORThandling must accept both canonical and non-canonical trailing-slash variants (for example/caldav/calendars/public/and/caldav/calendars/public). - For
sync-collection, if client sync-token equals server sync-token, server should return207with noD:responsechange entries. sync-collectionresponses must not emit large sets of historical404tombstones for unchanged state.
If a report is unsupported for a resource, server returns standards-appropriate error status with DAV error body.
Status Behavior
200successful read/report/property retrieval201object created byPUT204successful delete/update with no body where applicable207multi-status for PROPFIND/REPORT responses401unauthenticated403authenticated but forbidden404resource not found405method not allowed on resource409parent/resource state conflict412precondition failed (etag/if-match semantics)415unsupported media type
Content Handling
- Event objects use
text/calendarpayloads with RFC 5545-compatibleVCALENDAR. - Authenticated CalDAV object responses (
GET,REPORT,calendar-multiget) return full event details for both public and private events. - Unsupported component types should be rejected unless explicitly mapped.
- Server should normalize line endings/content as required by iCalendar compatibility.
Concurrency
- Object resources must emit
ETag. If-MatchandIf-None-Matchmust be honored onPUT.- Lost-update prevention is required on concurrent writes.
Recurrence Exception Behavior
- Deleting one recurrence occurrence must be represented as an exception for the existing series.
- The resulting data must remain one logical series (same
UID), without splitting into separate series resources unless explicitly required by standards-compatible override semantics.
Verification Requirements
Acceptance should verify:
- URI layout and discovery flows are stable.
- Required methods return expected statuses.
- REPORT responses include correct event sets.
- Collection
GETreturns200for authenticated probe requests. sync-collectionno-change request (current token) returns207with zero change responses.sync-collectionworks with and without trailing slash on collection URI.- Conditional write and etag behavior prevents stale overwrite.