Query calendar events
Added by IBM contributorAnna G O'Neal | Edited by Claudia R Elbourn on June 26, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Create queries for events in the calendars of individual users based on their email addresses.

Table 1. API details

Method Resource address
REPORT REPORT /calendar/r/dav/calendar/<user_email><calendar_guid>/, where <user_email> is email address of the user, and <calendar_guid> is the globally unique identifier of the calendar.

The following code provides a sample implementation of the API. For details about using the API in your own development environment, see the Internet Engineering Task Force (IETF) Request for Comments (RFC) resources at the end of this topic.

Sample request


REPORT https://mail-usw.lotuslive.com/calendar/r/dav/calendar/bgs_demo07%40try.lotuslive.com/8a869f8e35dc722f01360a2b61244352/ HTTP/1.1

Host: mail-usw.lotuslive.com

User-Agent: iOS/5.0.1 (9A405) dataaccessd/1.0

Content-Length: 390

Accept: */*

Depth: 1

Accept-Encoding: gzip, deflate

Content-Type: text/xml

Accept-Language: en-us

Cookie: JSESSIONID=8841B7ECB71E8BADB7F92EFCA40A73FA

Authorization: Basic <base64 encoding of user_email:password>

Connection: keep-alive

Proxy-Connection: keep-alive



<?xml version="1.0" encoding="UTF-8"?>

<C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav">

<A:prop xmlns:A="DAV:">

<A:getetag/>

<A:getcontenttype/>

</A:prop>

<C:filter>

<C:comp-filter name="VCALENDAR">

<C:comp-filter name="VEVENT">

<C:time-range start="20120402T000000Z"/>

</C:comp-filter>

</C:comp-filter>

</C:filter>

</C:calendar-query>


Sample response


HTTP/1.1 207 Multi-Status

Server: nginx

Content-Type: application/xml;charset=utf-8

Cache-Control: private, max-age=0

Expires: Thu May 03 07:52:31 GMT 2012

DAV: 1, access-control, calendar-access, calendar-schedule, calendar-proxy, calendar-auto-schedule

Date: Thu, 03 May 2012 07:52:31 GMT

Content-Length: 1010

Connection: close

Set-Cookie: JSESSIONID=0CDD38AF867A74E6FE1D06CEFC058481; Path=/calendar

Set-Cookie: JSESSIONID=0CDD38AF867A74E6FE1D06CEFC058481; Path=/calendar; Secure



<D:multistatus xmlns:CS="http://calendarserver.org/ns/" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="DAV:">

<D:response>

<D:href>/calendar/r/dav/calendar/bgs_demo07@try.lotuslive.com/8a869f8e35dc722f01360a2b61244352/</D:href>

<D:propstat>

<D:prop>

<D:getcontenttype>text/calendar; component=vevent</D:getcontenttype>

<D:getetag>1336031324000</D:getetag>

</D:prop>

<D:status>HTTP/1.1 200 OK</D:status>

</D:propstat>

</D:response>

<D:response>

<D:href>/calendar/r/dav/calendar/bgs_demo07@try.lotuslive.com/8a869f8e35dc722f01360a2b61244352/0DDC79F9-4134-4F41-925D-

25D10EEE7AAE.ics</D:href>

<D:propstat>

<D:prop>

<D:getcontenttype>text/calendar; component=vevent</D:getcontenttype>

<D:getetag>1336031324000</D:getetag>

</D:prop>

<D:status>HTTP/1.1 200 OK</D:status>

</D:propstat>

</D:response>

</D:multistatus>

 

Related Resources

Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol

Calendaring Extensions to WebDAV (CalDAV)