8 messages in com.googlegroups.google-calendar-help-dataapiRe: DELETE with curl
FromSent OnAttachments
ric...@gmail.com20 Mar 2008 15:02 
Austin (Google)20 Mar 2008 16:21 
ric...@gmail.com20 Mar 2008 17:16 
Austin (Google)20 Mar 2008 17:30 
ric...@gmail.com20 Mar 2008 18:38 
picp...@sidelinestats.com21 Mar 2008 09:32 
picp...@sidelinestats.com21 Mar 2008 13:40 
picp...@sidelinestats.com21 Mar 2008 15:05 
Subject:Re: DELETE with curl
From:Austin (Google) (api.@google.com)
Date:03/20/2008 05:30:41 PM
List:com.googlegroups.google-calendar-help-dataapi

Hi,

Ooops, my apology for misunderstanding, =)

I see, to delete an event you need to submit the DELETE command to the "edit" link of an event. The edit link does contain the "version" number at the end of the edit URL, which is there for optimistic concurrency (essentially to make sure no two users are updating the same event).

So the edit URL looks something like this -

http://www.google.com/calendar/feeds/default/private/full/entryID/version

To retrieve this edit URL for an event you need to retrieve the event feed and locate your event entry, there will be an element within the entry that looks like this where you can find the edit URL-

<link rel='edit' type='application/atom+xml' href=' http://www.google.com/calendar/feeds...@gmail.com/private/fu@' />

For more info on the protocol to delete event, please go to -

http://code.google.com/apis/calendar/developers_guide_protocol.html#DeletingEvents

Hope that helps, Austin On Thu, Mar 20, 2008 at 5:16 PM, <ric@gmail.com> wrote:

Thanks for the info but I think you misunderstand. I'm trying to delete an entry on a calendar, not the entire calendar.

Rick

On Mar 20, 4:21 pm, "Austin (Google)" <api.@google.com> wrote:

Hi,

I think the invalid URI error you are getting is because you are not using the right feed URL to perform delete.

To delete a calendar, you need to use the owncalendars feed (in your example, you are using the event feed). So the feed that you should be sending the DELETE request to should look like this -

http://www.google.com//calendar/feeds/default/owncalendars/full/[CALENDAR_ID]<http://www.google.com//calendar/feeds/default/owncalendars/full/%5BCALENDAR_ID%5D>

replace CALENDAR_ID with the ID of the calendar you try to delete

For more details on calendar protocol, please refer to this -

http://code.google.com/apis/calendar/developers_guide_protocol.html#D...

Hope that helps, Austin

On Thu, Mar 20, 2008 at 3:02 PM, <ric@gmail.com> wrote:

I'm trying to delete a calendar entry using curl. The calendar API has a reference to a /version but I can't seem to find what that means. Below is the code I'm using. I'm getting an invalid URI returned.

TIA, Rick

curl --silent --request DELETE --header "Authorization: GoogleLogin Auth=DQAAAHgAAABsfqgIlBa9vsbHFYvrEaZbJCB-

wEkE9fseuj72k2gaatmhjTFb6ZnHCt81jRsAt6TQJyN3T9dkRvepD4fJagjBWo36UXBUwpKx9PKepocAkXW_CwaNrzHqUnVloxZr1SUTNFgdZ1QMIlyGm7slxGWDphuECc_5PYxfx0VKwwRhOA"

dWlwbTBucW1rZ2J1MjBibDhhMzlxcms0ZzQgcGljcGxhbm5lckBzaWRlbGluZXN0YXRzLmNvbQ< http://www.google.com/calendar/feeds/default/private/full/dWlwbTBucW1...>

"