4

For my application I need to use an open source calendar server. After some research I selected Bedework Server for my task. Basically what I want is to use this server to handle my application's calendar events. Even though I have setup a local server using quick start package, I kinda still confused on how I can use this. I can create events using it's web UI. But I want to use this as a service from my server (Something like a REST service). I read their documentation but I could not find anything that will help. I am really grateful if you can help me on this. Thanks in advance.

igk
  • 96
  • 6

2 Answers2

0

You can access the server using the CalDAV protocol. This is a standard REST protocol which specifies how you create/query/delete events and todos. It is the same protocol the Calendar or Reminders apps on OS X and iOS use to talk to the server.

The CalConnect CalDAV website is a good entry point to learn more about this.

Community
  • 1
  • 1
hnh
  • 13,957
  • 6
  • 30
  • 40
  • Hey thanks a lot for your info. I will definitely check on this. The problem for me is say I want to create a calendar event. For that what will be the URL I should talk to? I still have a very blurred understanding on this. Hopefully your inputs will drop more light on it. – igk Apr 01 '15 at 14:16
  • So what part of the RFC is unclear to you? It's an in-detail explanation on how this works? Another resource: http://sabre.io/dav/building-a-caldav-client/ – hnh Apr 01 '15 at 20:14
  • @hnh, I just installed bedework 3.10.2 and tried to access /ucaldav/user/vbede/calendar as the protocol specifies to get events, but there is nothing returned, well, it returns html if I remove the ACCEPT header.... is it possible that bedework implements it differently? Thanks for any advise in advance :) – Ryan Chu Sep 14 '16 at 17:23
  • details please. what request do you run? a principal propfind? did you read (and understand) the sabredav article? – hnh Sep 14 '16 at 18:35
0

If you are still looking this, you can try using any CalDAV Client Libraries -

CalDAV-libraries

I tried CalDAV4j library. For all basic use cases, it works fine.

There is also a demo github project on this library developed to list down the events in the server -

list-events-caldav4j-example

You can make use of the ListCalendarTest.java in the project and give appropriate endpoints to the Host configuration. For Example (for Bedework) -

    HttpClient httpClient = new HttpClient();
    // I tried it with zimbra - but I had no luck using google calendar
    httpClient.getHostConfiguration().setHost("localhost", 8080, "http");
    String username = "vbede";
    UsernamePasswordCredentials httpCredentials = new UsernamePasswordCredentials(username, "bedework");
    ...
    ...
    CalDAVCollection collection = new CalDAVCollection("/ucaldav/user/" + username + "/calendar",
            (HostConfiguration) httpClient.getHostConfiguration().clone(), new CalDAV4JMethodFactory(),
            CalDAVConstants.PROC_ID_DEFAULT);
    ...
    ...
    GenerateQuery gq = new GenerateQuery();
    // TODO you might want to adjust the date
    gq.setFilter("VEVENT [20131001T000000Z;20131010T000000Z] : STATUS!=CANCELLED");
    CalendarQuery calendarQuery = gq.generate();
SaratBhaswanth
  • 340
  • 7
  • 18