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

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 03-02-2011, 08:40 AM
New Member
 
Posts: 4
Default [SOLVED] problems with REST API: Get Calendar

Hi Guys,
I'm building some mini-portal where users will be able to login and see company information including they calendar.
So for calendar part, I decided to use Zimbra_REST_API_Reference:Get_Calendar but I have little problems. Docs says:
Quote:
http://localhost:7070/home/john.doe/calendar?{params}
* fmt. Optional. The response format. Defaults to ics format.
* start. Optional. The start time range (milliseconds | yyyy/dd/mm | mm/dd/yyy | relative dates ).
* end. Optional. The end time range (milliseconds | yyyy/dd/mm | mm/dd/yyy | relative dates ).
* query. Optional. A query string.
So, if I'll go to:
Quote:
http://localhost:7070/home/john.doe/calendar?fmt=json&start=20110504&end=20110704
It should bring me events in JSON format for period of 3 days (from april 5 until april 7) but it brings me whole calendar in json format.
If I change fmt to RSS it brings empty XML and I'm sure that i have few event for that period.
Code:
<?xml version="1.0"?> <rss version="2.0"><channel><title>Zimbra calendar</title><link>http://www.zimbra.com</link><description>Zimbra item calendar in RSS format.</description><generator>Zimbra RSS Feed Servlet</generator></channel></rss>
Am I missing something?
Can anyone confirm?

Last edited by confiq; 03-03-2011 at 12:42 AM..
Reply With Quote
  #2 (permalink)  
Old 03-07-2011, 09:46 AM
Member
 
Posts: 14
Default

Hi.

All parameters do not work with all formats !
begin and end dates are fine with ICS format. Don't know about other formats.
Reply With Quote
  #3 (permalink)  
Old 03-07-2011, 12:42 PM
New Member
 
Posts: 4
Default

well, IMHO it would be good to mention that in documentation !
I'm looking to import data for only one day, what is best way to do that?
I'm preferring XML/JSON format!

EDIT:
I also changed fmt to ics and i didn't get any events in that period. ex:

Quote:
https://webmail.company.com/zimbra/home/USER/calendar?fmt=ics&start=20110504&end=20110704
And I'm sure i have few events in that period....

Last edited by confiq; 03-08-2011 at 01:24 AM..
Reply With Quote
  #4 (permalink)  
Old 03-08-2011, 07:05 AM
Member
 
Posts: 14
Default

I am using ics format with an url like this :
The end day is the next day, not the same day as the start day, when looking for a given day events.

The only way to find the correct url is to try.. Sigh.

Last edited by BDY35; 03-08-2011 at 07:11 AM..
Reply With Quote
  #5 (permalink)  
Old 03-08-2011, 07:21 AM
New Member
 
Posts: 4
Default

actualy,
i figured out few things:
1) date format is not 20090123 as given in example
2) format yyyy/dd/mm didn't work for me, however m/d/Y do work
3) json format ALWAYS returns whole calendar instead of start/end period. If you use rss/ics it works fine.

none of these are mention in documentation....
Hope it helps somebody....
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.