2

I have a Baikal CalDav Backend running on an Embedded Linux server. I can successfully create a calendar with the MKCALENDAR call with the following body:

<C:mkcalendar xmlns:D='DAV:'xmlns:C='urn:ietf:params:xml:ns:caldav'> <D:set> <D:prop> <D:displayname>Test Calendar</D:displayname> <C:calendar-description>Calendar Description</C:calendar-description> </D:prop> </D:set> </C:mkcalendar> 

However I have been unable to find an example of how to add events to this calendar.

I have tried the following with no luck:

<C:mkcalendar xmlns:D='DAV:'xmlns:C='urn:ietf:params:xml:ns:caldav'> <D:set> <D:prop> <D:displayname>Test Calendar</D:displayname> <C:calendar-description>I Am Testing</C:calendar-description> <C:calendar-data> <![CDATA[ BEGIN:VCALENDAR BEGIN:VEVENT UID:test123 SUMMARY:Test Event DTSTART=20140920T080000 DTEND=20140920T170000 END:VEVENT END:VCALENDAR]]> </C:calendar-data> </D:prop> </D:set> </C:mkcalendar> 

Can someone please point me in the right direction in adding events to CalDav calendars using html calls.

2
  • 2
    This is a good link Building a CalDAV Client Commented Sep 2, 2014 at 3:01
  • Thanks - it looks like I have something working now. Commented Sep 2, 2014 at 4:41

1 Answer 1

7

Just to turn David's comment a proper answer to this question: This is a good link: Building a CalDAV client

To create an event within a CalDAV calendar, you need to use the HTTP PUT operation. With the iCalendar of the new event as the request body.

Like:

PUT /home/meeting.ics HTTP/1.1 Host: ... Content-Length: ... Content-Type: text/calendar; charset=utf-8 BEGIN:VCALENDAR BEGIN:VEVENT UID:test123 SUMMARY:Test Event DTSTART:20140920T080000Z DTEND:20140920T170000Z END:VEVENT END:VCALENDAR 
Sign up to request clarification or add additional context in comments.

1 Comment

can you please answer this question [stackoverflow.com/questions/66312856/… (caldav 500 server error response)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.