Results 1 to 6 of 6

Thread: Updating Calendar Entries with REST

  1. #1
    Bevan Bennett is offline Active Member
    Join Date
    May 2007
    Location
    Los Angeles, CA
    Posts
    31
    Rep Power
    7

    Default Updating Calendar Entries with REST

    I'm trying to help my users by making programmatic modifications to some of their calendar entries. I've read all the available blog and docs on updating items using REST, but my updates don't appear to do anything. Also, there's an appalling lack of usable examples of sending actual files.

    I'm using the recommended posting command line:

    curl -u 'myuserassword' \
    --data-binary '@./test.ics' \
    'https://server.example.com/service/home/myuser/calendar?fmt=ics'
    I have an ics file that looks like this:
    BEGIN:VCALENDAR
    VERSION:2.0
    BEGIN:VEVENT
    ORGANIZER:MAILTO:bevan@example.com
    UID:f0359778-ce86-4dd0-aaeb-11e7a5308ba9
    SUMMARY:Iron Mountain Intro
    DESCRIPTION:The following is a new meeting request
    DTSTART;TZID="(GMT-08.00) Pacific Time (US & Canada)":20070927T100000
    DTEND;TZID="(GMT-08.00) Pacific Time (US & Canada)":20070927T110000
    LOCATION:Pasadena Boardroom
    STATUS:CONFIRMED
    X-MICROSOFT-CDO-BUSYSTATUS:BUSY
    X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
    TRANSP:OPAQUE
    ATTENDEE;CN=Pasadena Boardroom;CUTYPE=RESOURCE;ROLE=NON-PARTICIPANT;PARTSTAT
    =NEEDS-ACTION;RSVP=TRUE:MAILTOasadena@example.com
    DTSTAMP:20070918T182540Z
    SEQUENCE:0
    END:VEVENT
    END:VCALENDAR
    I then try changing something in the file, like the summary or start time. The curl completes with no errors (if I remove the BEGIN:VCALENDAR I do get an error back) but the entry never gets updated.

    Has anyone gotten this sort of thing to work properly and update an existing entry?

  2. #2
    Bevan Bennett is offline Active Member
    Join Date
    May 2007
    Location
    Los Angeles, CA
    Posts
    31
    Rep Power
    7

    Default Bump

    Anyone? Bueller?

    Does anyone else have any tips for updating existing calendar entries rather than just adding new entries?

    It seems like it should be possible, and it would be -really- useful.

    Do I have to switch to doing some funky SOAP thing instead?
    Anyone have at least a working example???

  3. #3
    JoshuaPrismon is offline Zimlet Guru & Moderator
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    9

    Default

    Quote Originally Posted by Bevan Bennett View Post
    Anyone? Bueller?

    Does anyone else have any tips for updating existing calendar entries rather than just adding new entries?

    It seems like it should be possible, and it would be -really- useful.

    Do I have to switch to doing some funky SOAP thing instead?
    Anyone have at least a working example???
    My suspicion is that only a GET on a ICS file that is subscribed will work. Take a look at the Java Zclient classes. You should be able to pull the message and replace the ICS file, though I have never tried it.

  4. #4
    Bevan Bennett is offline Active Member
    Join Date
    May 2007
    Location
    Los Angeles, CA
    Posts
    31
    Rep Power
    7

    Default

    My suspicion is that only a GET on a ICS file that is subscribed will work.
    I can GET files just fine. I can also POST an ics for a new appointment.
    What I can't do is POST an ics file to modify an existing appointment.
    I suspect that may be because REST "just doesn't do that", but there still must be -some- option.

    Take a look at the Java Zclient classes.
    Where would these be?

    I'm also going to try using a debugger to capture what my browser sends out when I use it to edit an appointment.

  5. #5
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default

    First, are you seeing anything in your server logfiles? That's usually the first place to look when data import doesn't behave as you'd expect.

    Second (and please note that I Am Not The Calendar Guy), does it work if you put METHOD:REQUEST as the second line of the content?
    Bugzilla - Wiki - Downloads - Before posting... Search!

  6. #6
    Bevan Bennett is offline Active Member
    Join Date
    May 2007
    Location
    Los Angeles, CA
    Posts
    31
    Rep Power
    7

    Default Solved!!!

    I was seeing nothing in the server logs, but I have now solved the mystery!!!

    The keys to updating a calendar entry with REST are as follows:

    1) Include a DTSTAMP value HIGHER than the one in the database (the current time would be good). This was my main problem, since the server quietly discarded all the "obsolete" versions that I sent it.

    2) Keep everything else the same, as the entry will be replaced in it's entirety with the new values (so any element you remove from your ics will be removed from the entry).

    3) If using the admin login, use the admin URL. If using a user's login, use the regular URL.

    Hooray! Now I can go programmatically fix some entries for a user!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. postfix build error while building Zimbra source
    By anuradha_mihsra in forum Developers
    Replies: 6
    Last Post: 07-19-2007, 10:22 AM
  2. Calendar entries are uneditable after username change.
    By Guest6400 in forum Administrators
    Replies: 2
    Last Post: 06-11-2007, 09:18 AM
  3. Calendar entries uneditable...
    By Guest6400 in forum Administrators
    Replies: 2
    Last Post: 03-30-2007, 03:57 PM
  4. Outlook/Zimbra Private Appointments Issue
    By Smurthey in forum Zimbra Connector for Outlook
    Replies: 0
    Last Post: 03-09-2007, 07:29 AM
  5. Replies: 3
    Last Post: 08-03-2006, 04:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •