Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-13-2009, 02:40 PM
New Member
 
Posts: 3
Default Zimbra Calendar API

Hi,
At our school, we are using Zimbra 5.0.11 as our email and calendaring system. We have a requirement to build a calendar UI on our web-site to display public calendars on campus - possibly a Java (JSP) based web application. We would need to query the Zimbra calendar server and display events in a daily/weekly/monthly format - there are no updates or deletes.

I'm new to Zimbra and I'm exploring the possibility of using Zimbra calendar API for the same. I have a few newbie questions:

1. Which API should be used to query the Zimbra calendar - I see SOAP/XML and REST APIs mentioned on these forums - which is the appropriate/easier API to use for queries?

2. Can the UI be implemented with zimlets? Are there any standard calendar objects/interfaces that I could use on our web page?

3. Do you have any sample Java code that shows how to query the Zimbra calendar server and display events?

4. I would like to know how long it would take to implement a calendar UI with Zimbra API, for a newbie to Zimbra/SOAP/REST - is 2 months reasonable for an experienced Java web developer?

5. It would be great if somebody could point me to the right documentation to get started with the calendar API.

Any help/suggestions/pointers will be greatly appreciated.

Thanks,
Shyam
Reply With Quote
  #2 (permalink)  
Old 01-23-2009, 02:15 PM
Moderator
 
Posts: 75
Default

Quote:
Originally Posted by saki View Post
Hi,
1. Which API should be used to query the Zimbra calendar - I see SOAP/XML and REST APIs mentioned on these forums - which is the appropriate/easier API to use for queries?

2. Can the UI be implemented with zimlets? Are there any standard calendar objects/interfaces that I could use on our web page?

3. Do you have any sample Java code that shows how to query the Zimbra calendar server and display events?

4. I would like to know how long it would take to implement a calendar UI with Zimbra API, for a newbie to Zimbra/SOAP/REST - is 2 months reasonable for an experienced Java web developer?

5. It would be great if somebody could point me to the right documentation to get started with the calendar API.
1. My personal inclination would be to use REST for a read-only interface. SOAP requires the setup and tear-down of a session and that's really only advantageous if you're doing a lot of interaction with the server (e.g. migrating data into Zimbra). REST is dead-simple - you have a static URL that you can use to access a particular set of data, and that URL never has to change

2. Zimlets really are for integrating into the Zimbra UI. It sounds like you want to built your own web pages, but populate them with data from Zimbra, so you're going to be looking at a back-end service that sucks its data from Zimbra (either in real-time when the user tries to view the page, or at scheduled intervals, depending on how dynamic the data is.

3. If you don't actually have a predefined "look" that your UI must have, you may want to just play with the HTML 'view' into Zimbra's calendars. These can be exposed to the public so that no authentication is necessary.

For example, here's my public calendar in html format

Public: January 2009

If you want the same thing as an RSS or a .ics file, just change the suffix from .html to .rss or .ics, respectively.

It may not be necessary to write much code at all -- even if you don't like Zimbra's "public" view, you might be able to find a GNU tool that produces a view you like and populate it using the .ics file (retrieved via REST)

4. That depends *entirely* on how complex you make it, how much you have to parse the data, what you intend to import it into, etc.

5. Zimbra's REST interface is documented, to some extent, in the zimbra source (in the ZimbraServer/docs directory). There are also some blog posts and Wiki articles that cover some of their REST. I noticed in the notes for 5.0.12 that some docs are being rolled into the binary distrib too
__________________
Steve Hillman
IT Architect
Simon Fraser University
Reply With Quote
  #3 (permalink)  
Old 01-26-2009, 09:36 AM
New Member
 
Posts: 3
Default RSS seems limited

When I view your public HTML calendar, I can navigate forward and backward. The RSS feed is only giving me the current month. Is there any way to get more results from the RSS feed than just the current month?

Carl Olsen
Drake University
Reply With Quote
  #4 (permalink)  
Old 01-26-2009, 09:52 AM
New Member
 
Posts: 3
Default ICS is giving me 2 months

the ICS format is giving me calendar events for December and January, which is what I see on the HTML format version of your calendar. RSS only gives me January. The RSS looks a lot easier to use than the ICS, but I suppose I can live with ICS if that is the only way to get more than one month back. Are there any configuration options, or query string name value pairs I can use to modify the RSS return results?

Do you have any PHP code for parsing an ICS file into object oriented code (calendar item)?

Carl Olsen
Drake University

Last edited by Carl; 01-26-2009 at 11:25 AM..
Reply With Quote
  #5 (permalink)  
Old 02-08-2009, 02:52 AM
Moderator
 
Posts: 75
Default

Unfortunately I don't know what options are available for REST. What I have found has just been through various blog posts and the little big of documentation that's included with the source. You might just have to go spelunking around in the actual source code to find out what's available (assuming you can read Java )

I don't write in PHP either, but a quick search for perl ics on Google actually turned up this Apple web page which talks about parsing .ics files using both Perl and PHP: iCalendar Files on Mac OS X
__________________
Steve Hillman
IT Architect
Simon Fraser University
Reply With Quote
  #6 (permalink)  
Old 02-09-2009, 06:08 AM
New Member
 
Posts: 3
Default PHP ICS parsing

I found some PHP code for parsing the ICS files to get the title, description, location, and dates, which is fairly basic (the only trouble is the VALARM which has a description field that duplicates the field name from the event). I added the extracted data to a database table and created an object class for my calendar events. I'm using CURL to parse the ICS files every 60 minutes to keep the data fairly current. The ICS files have a sequence number that lets me know when an event has been updated so I can update it in my database. Each event has a unique UID, so I can tell if an event is new or already exists in my database table. It works great with test calendar events. I'll have to wait and see how it works with actual calendar events (there will be a lot more of them than I have in my test database table).

Carl Olsen
Drake University
Reply With Quote
  #7 (permalink)  
Old 08-06-2009, 11:21 AM
New Member
 
Posts: 3
Default changing zimbra calendar size

Hi,

I am sharing my zimbra calendar on my website by embedding it in an iframe.

I want to change the size of the zimbra calendar so that it appears in a small iframe on my website and not be huge! Changing the iframe size does not help as it does not shrink the calendar size and just adds scroll bars to it.

Thanks!
-Ron
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.