r2 - 30 Jun 2008 - 07:54:53 - RandyLetnessYou are here: OSAF >  Projects Web  > WebcalProtocol

Cosmo Webcal Service

The webcal service provides a read-only iCalendar representation of a collection.

Retrieving a collection via the webcal service

A collection's iCalendar representation may be returned by sending a GET request to the the URI following the template /webcal/collection/{uid}.

The response includes an iCalendar representation of all items in the collection. The content-type of the response is text/calendar. The response also includes ETag and Last-Modified headers allowing the client to issue conditional GETs.

Response Status Codes

  • 200: Success
  • 304: Resource has not changed (assuming conditional GET)
  • 500: Unknown server error

Examples

GET a collection:

<<< REQUEST >>>
GET /chandler/webcal/collection/2688d960-4453-11dd-b4f8-914ad5b72b4 HTTP/1.1
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
<<< RESPONSE >>>
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Cosmo-Version: 0.16-SNAPSHOT
ETag: "XFDx87ELTDrKuwk1+Mv495e/Jcg="
Last-Modified: Fri, 27 Jun 2008 14:13:35 GMT
Content-Disposition: attachment; filename="test.ics"
Content-Type: text/calendar;charset=UTF-8
Content-Length: 495
Date: Fri, 27 Jun 2008 14:14:23 GMT
BEGIN:VCALENDAR
PRODID:-//Open Source Applications Foundation//NONSGML Chandler Server//E
 N
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VTODO
DTSTAMP:20080627T141326Z
UID:32428ee0-4453-11dd-b4f8-914ad5b72b43
SUMMARY:note
DESCRIPTION:this is a note
END:VTODO
BEGIN:VEVENT
DTSTAMP:20080627T141335Z
UID:28be08e0-4453-11dd-b4f8-914ad5b72b43
DTSTART:20080624T103000
LOCATION:somewhere
DURATION:PT1H
STATUS:CONFIRMED
SUMMARY:event
DESCRIPTION:this is an event
END:VEVENT
END:VCALENDAR

Conditional GET using If-None-Match (assuming content does not match):

<<< REQUEST >>>
GET /chandler/webcal/collection/2688d960-4453-11dd-b4f8-914ad5b72b4 HTTP/1.1
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
If-None-Match: "XFDx87ELTDrKuwk1+Mv495e/Jcg="
<<< RESPONSE >>>
HTTP/1.1 304 Not Modified

Conditional GET using If-Modified-Since (assuming content has not been modified):

<<< REQUEST >>>
GET /chandler/webcal/collection/2688d960-4453-11dd-b4f8-914ad5b72b4 HTTP/1.1
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
If-Modified-Since: Fri, 27 Jun 2008 14:13:35 GMT
<<< RESPONSE >>>
HTTP/1.1 304 Not Modified

-- RandyLetness - 27 Jun 2008

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.