On Sep 9, 2011, at 1:30 AM, Matthew Ford wrote: > On 8 Sep 2011, at 22:27, Morgen Sagen wrote: > >> >> On Sep 8, 2011, at 1:30 PM, Matthew Ford wrote: >> >>> On 8 Sep 2011, at 19:15, Morgen Sagen wrote: >>> >>>> If you perform an HTTP GET on a calendar collection, the server will >>>> return a monolithic icalendar containing all the events. So a combination >>>> of crontab + curl on the external machine should do the trick. Something >>>> like: >>>> >>>> curl -u user:password -o calendar.ics >>>> http://calendarserver.example.com:8008/calendars/users/username/17E1DFCF-66B5-41C1-9A71-8E1FFAD92EB0/ >>>> >>> >>> Hmm. I'm not certain what UID to feed that URL with, but all obvious >>> choices return: >>> >>> <html><head><title>Unauthorized</title></head><body><h1>Unauthorized</h1><p>You >>> are not authorized to access this resource.</p></body></html> >>> >>> Mat >> >> >> Your best bet is to use a web browser first to determine the correct URL for >> the calendar you are interested in: >> >> If you're using SSL start with: >> https://hostname:8443/calendars/users/username/ >> >> Otherwise: >> http://hostname:8008/calendars/users/username/ >> >> Of course replace hostname and username with your own. Log in when you are >> presented with the username/password dialog. This will present you with a >> list of calendars, including some "internal" collections like "inbox". Look >> in the list for the ones with MIME Type = (collection, calendar) . If >> you're using the default calendar, it will be called "calendar", and >> therefore your URL should be /calendars/users/username/calendar/ , otherwise >> it will have a guid for its name. To find which guid-named calendar is the >> one you want, click on each one and look for "displayname" within the page. >> Once you find the right calendar, that's the guid you want to use for the >> URL. >> > > I have two calendars. One is the default 'calendar', the other has a GUID > name. I want the default. So I'm > trying: > > http://hostname:8008/calendars/users/username/calendar/ > > and still getting: > > <html><head><title>Unauthorized</title></head><body><h1>Unauthorized</h1><p>You > are not authorized to access this resource.</p></body></html> > > When I use a browser, I do see a Collection Listing page with a bunch of .ics > files listed (after logging in). > > This is on Lion Server in case that makes a difference. > > Mat >
Ah, assuming you are passing the right username and password to curl, try using --digest in your curl command line because basic auth is off by default for Lion calendar server. _______________________________________________ calendarserver-users mailing list calendarserver-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/calendarserver-users