Complete Contents
Preface
Chapter 1 Overview of Architecture
Chapter 2 Web Calendar Access Protocol (WCAP)
Chapter 3 Calendar Server API (CSAPI)
Index
iPlanet Calendar Server: Programmer's Reference: Web Calendar Access Protocol
Previous Next Contents Index


Chapter 2 Web Calendar Access Protocol (WCAP)

This chapter describes the Web Calendar Access Protocol (WCAP), which is a high level command-based protocol that clients use to communicate with Netscape iPlanet Calendar Server. This chapter has the following sections:


Command Overview
This section introduces the commands supported in WCAP in each usage category, according to functionality. Detailed information about each command is given in the Command Details section later in this chapter.

WCAP commands include client requests and server responses for transmitting calendar data. WCAP commands perform three general types of function:

Table 2.1 describes the commands that are concerned with user configuration information:

Table 2.1 WCAP user configuration command overview
WCAP Command
Purpose
login
Authenticate a user.
logout
Terminate the current user's session and return to login screen.
change_password
Change the password for the current user.
get_userprefs
Retrieve calendar preferences.
set_userprefs
Set calendar preferences.
version
Get the wcap version that the calendar server supports.

Table 2.2 describes the commands that are concerned with calendar administration. These commands can only by used by an administrator with the proper privileges, and must be issued on the administrative port:

Table 2.2 WCAP administrative command overview
WCAP Command
Purpose
shutdown
Shut down the server.
admin_logout
Terminate the session of a specific user.
get_session
Retrieve session information for a user.
get_all_timezones
Retrieve data about all timezones supported by the server.
refresh
Refresh the server configuration.

Table 2.3 describes the commands that are concerned with manipulating calendar data:

Table 2.3 WCAP data manipulation command overview
WCAP Command
Purpose
createcalendar
Create a new calendar.
deletecalendar
Delete a calendar.
get_calprops
Retrieve calendar properties.
get_guids
Generate a set of globally unique identifiers.
set_calprops
Set calendar properties.
search_calprops
Search all calendars for specific properties.
fetchcomponents_by_range
Retrieve a list of events over a specific time period, using an attribute filter.
fetchevents_by_id
Retrieve a specific event and its recurrences.
storeevents
Store event in the database.
deleteevents_by_id
Delete events from a calendar.
deleteevents_by_range
Delete events within a range from one or more calendars.
deletecomponents_by_range
Delete events and todos with a range from one or more calendars.
deleteevents_by_range
Delete events within a range from one or more calendars.
fetchtodos_by_id
Retrieve a specific todo and its recurrences.
storetodos
Store todos in the database.
deletetodos_by_id
Delete todos from a specific calendar.
deletetodos_by_range
Delete todos within a range from one or more calendars.
addlink
Add a link from one calendar to an event or todo in another.
export
Export events and todos from a calendar to a file.
import
Import events and todos from a file to a calendar.

Session Identifiers
For most commands, you must specify the session identifier that is returned by the login command. For some commands this parameter is required, while for others it is required only to access a private calendar. The session identifier ensures that data is accessible only to users with the required level of privilege or ownership.

When logging into the system, a user provides authentication of identity. The default authentication mechanism uses plain-text passwords and user names. Calendar Server generates the session identifier only when authentication is successful. The identifier then serves as proof of authentication in subsequent calendaring operations.

You can customize the authentication mechanism to use a local or external authentication scheme. For more information on customization, see Chapter 2, "Web Calendar Access Protocol (WCAP)."


Command Formats
The plug-iCalin architecture of Calendar Server allows it to support multiple command formats. Both client and server can use a variety of data formats to meet various ISP needs.

Currently, the command protocol is used with HTTP, and follows the standards defined by the WC3 URL specifications. It supports SSL for encrypted communication.

WCAP in Calendar Server consist of JavaScript objects formatted as XML or iCal, communicated as HTML documents over HTTP on both the client and server side. The client supports version 3 of the major browsers running JavaScript.

Client Request Formats
Clients can submit the following data formats to Calendar Server in command requests:

Table 2.4 Supported client request formats
Command Format
Purpose
Universal Resource Identifier (URI)
Requests are made using standard URI syntax
HTML Form - encoding of application/x-www-form-urlencoded
Requests are made using native JavaScript objects
HTML Form - encoding of text/xml
Requests are made using JavaScript objects formatted as XML
HTML Form - encoding of text/calendar
Requests are made using JavaScript objects formatted as iCal

URI Request Format
Use the following format to submit a URI request:

http[s]://webcal.host.com/COMMAND?PARAM=VAL&PARAM=VAL...

Multiple items are delimited by semicolons. If a string contains a semicolon character, replace the semicolon with its quoted-printable equivalent, =3B. For example, to represent the string "gh;i" in a list of IDs, use the following:

uid=abc;def;gh=3bi;jkl

HTML Request Formats
Submit a form with method=get|post and action=command, where command is the WebCal command to execute. Format parameters as specified in the encoding.

Client-Side Event Notification
All client-side JavaScript code in the parent frame of the response page must implement a method called CalCommandCallback(), where Command is the name of the command requested. This callback is invoked when the HTML response has completed loading.

Server Response Formats
Calendar Server responds to client requests by serving HTML containing JavaScript objects. The JavaScript objects can be formatted as either of the following:

The default format for JavaScript objects in HTML responses is iCal format. A client can request that responses be in XML. You can configure a response format preference for a server or user, or specify the desired response format for an individual request.


Recurrence Handling
This section describes how you specify recurrence parameters for WCAP commands.

Specifying Recurrences
When you modify or delete an event or todo, you can (and sometimes must) specify whether or not it is recurrent, and, if it is, whether and how to modify the recurrences as well as the original event or todo.

An event or todo can have a recurrence identifier, in the form of a DateTime string. Use the rid parameter to specify the date of a specific recurrence you want to modify or delete.

When there are multiple recurrences, you can specify whether to modify them or not, using the mod parameter. The mod parameter specifies whether to apply the changes to one or more instances of the event or todo. The mod values result in the following behavior:

Table 2.5
1
Modify only the specified instance of the event or todo
2
Modify the specified event or todo and all subsequent related recurrences.
3
Modify the specified event or todo and all prior related recurrences.
4
Modify all instances of the event or todo.

When deleting an event or todo by id, you must specify the rid and mod parameters. For a non-recurring event or todo, the rid is 0.

Note. An event or todo can recur a maximum of 60 times.

Storing Recurrences
When you create and store new events or todos, you use the following rule parameters to specify exactly how to create or modify recurrences:

rid: . This parameter specifies a unique recurrence date of an event or todo. If you specify this parameter when storing an event or todo, there is no expansion of the event; that is, there is only one recurrence.

For example:

http://myserver.mycompany.com/ storecomponents.wcap?id=b5q2o8ve2rk02nv9t6
&calid=jdoe&uid=333&dtstart=19990301T112233Z
&rid=19990331T112233;dtend=19990301T112233&summary=uuuu

rrules: . The rrules parameter takes a semicolon-separated list of quoted recurrence rule strings. Each string represents a recurrence rule of the event. Each string must be enclosed in quotes.

This example shows an rrules parameter that specifies to recurrence rules:

rrules="count%3D10%3Bfreq%3Ddaily";"freq%3Dweekly%3Bcount%3D4"

(COUNT=10;FREQ=DAILY and FREQ=WEEKLY;COUNT=4 encoded)

The first rule specifies that the event is to occur daily for 10 instances. The second rule specifies that the event is to occur weekly for 4 instances.

The following example URL passes the example rrules parameter:

http://myserver.mycompany.com/ storecomponents.wcap?id=b5q2o8ve2rk02nv9t6
&calid=jdoe&uid=333&dtstart=19990301T112233Z
&rrules="count%3D10%3Bfreq%3Ddaily";"freq%3Dweekly%3Bcount%3D4"
&dtend=19990301T112233&summary=uuuu

exrules:. The exrules parameter takes a semicolon-separated list of quoted recurrence rule strings where each rule is an excluded recurrence of the event.

For example, the following exrules parameter specifies a recurring event that does not recur at the times specified by the two rules:

exrules="count%3D10%3Bfreq%3Ddaily";"freq%3Dweekly%3Bcount%3D4"

(COUNT=10;FREQ=DAILY and FREQ=WEEEKLY;COUNT=4 encoded)

The first rule is for the event not to occur daily for 10 instances. The second rule is for the event not to occur weekly for 4 instances.

The following example URL passes the example exrules parameter:

http://myserver.mycompany.com/ storecomponents.wcap?id=b5q2o8ve2rk02nv9t6
&calid=jdoe&uid=333&dtstart=19990301T112233Z
&exrules="count%3D10%3Bfreq%3Ddaily";"freq%3Dweekly%3Bcount%3D4"
&rrules="count%3D100%3Bfreq%3Ddaily"&dtend=19990301T112233&summary=uuuu

rchange: . The rchange parameter specifies whether recurrences are expanded in storeevents and storetodos. Normally, events and to do calendar components are expanded, so the parameter defaults to 1.

You might not want to expand recurrences when you are modifying multiple events. For example, suppose a meeting recurs every Friday starting Jan 1, 2000. Use the following URL to change the summary of each event after Feb. 1, 2000 to changed-event. This example sets the rchange parameter to 0, to make the modification without adding additional events:

http://jdoe.mycompany.com/storeevents.wcap?id=b5q2o8ve2rk02nv9t6
&calid=jdoe&uid=abcxyz&dtstart=19990201T112233Z
&rrules="byday%3Dfr%3Bfreq%3Dweekly"&summary=changed-event
&rid=19990201T112233Z&mod=2&rchange=0

rdates:. The rdates parameter takes a semicolon-separated list of date-time specifications where each date-time gives a recurrence date of the event.

For example, the following rdates parameter specifies a recurring event with two recurrence dates (3/31/99 11:22:33 and 5/31/99 11:22:33):

rdates=19990331T112233;19990531T112233

The following example URL passes the example rdates parameter:

http://myserver.mycompany.com/ storecomponents.wcap?id=b5q2o8ve2rk02nv9t6
&calid=jdoe&uid=333&dtstart=19990301T112233Z
&rdates=19990331T112233;19990531T112233
&dtend=19990301T112233&summary=uuuu

If you want to the change the recurrence rule after a certain date, you must set rchange to 1.

exdates:. The exdates parameter takes a semicolon-separated list of date-time specifications. Each date-time represents an excluded date of the event.

For example, the following exdates parameter specifies a recurring event that does not occur on the two specified dates (3/31/99 11:22:33 and 5/31/99 11:22:33):

exdates=19990331T112233;19990531T112233

The following example URL passes the example exdates parameter:

http://myserver.mycompany.com/ storecomponents.wcap?id=b5q2o8ve2rk02nv9t6
&calid=jdoe&uid=333&dtstart=19990301T112233Z
&exdates=19990331T112233;19990531T112233
&rrules="COUNT%3D200%3BFREQ=DAILY";dtend=19990301T112233&summary=uuuu


Command Details
This section describes the usage and parameters for WCAP commands in alphabetical order. WCAP commands and what they do are listed and summarized briefly.

Command

Purpose

addlink
Add a link from one calendar to an event or todo in another.
admin_logout
Terminate the session of a specific user.
change_password
Change the password for the current user.
createcalendar
Create a new calendar.
deletecalendar
Delete a calendar.
deletecomponents_by_range
Delete events or todos within a range from one or more calendars.
deleteevents_by_id
Delete events or todos from a specific calendar.
deleteevents_by_range
Delete events within a range from one or more calendars.
deletetodos_by_id
Delete todos from a specific calendar.
deletetodos_by_range
Delete todos within a range from one or more calendars.
export
Export events and todos from a calendar to a file.
fetchcomponents_by_range
Retrieve properties, events, and todos within a range from one or more calendars.
fetchevents_by_id
Retrieve an event and its recurrences.
fetchtodos_by_id
Retrieve a todo and its recurrences.
get_all_timezones
Retrieve all timezones supported by the server.
get_calprops
Retrieve calendar properties.
get_guids
Generate a set of globally unique identifiers.
get_session
Retrieve session information for a user.
get_userprefs
Retrieve calendar preferences.
import
Import events and todos from a file to a calendar
login
Authenticate a user.
logout
Terminate the current user's session and return to login screen.
ping
Query the server to see if it is active.
refresh
Refresh the server configuration.
search_calprops
Search all calendars for specific properties.
set_calprops
Set the calendar properties of a calendar.
set_userprefs
Set calendar preferences.
shutdown
Shut down the server.
storeevents
Store events in the database.
storetodos
Store todos in the database.
version
get the wcap version that the calendar server supports.

addlink
Purpose
Add links from one calendar to events or todos in another calendar.

Parameters
The command takes the following parameters:

Parameter
Type
Purpose
Required
Default
id
unique ID string
The session identifier. Required if the destination calendar is not public.
N
null
srcCal
string
The calendar containing the events or todos. You must have READ access to this calendar.
Y
N/A
destCal
string
The calendar to contain the links. You must have WRITE access to this calendar.
Y
N/A
uid
semicolon-separated list of strings
A list of event and/or todo identifiers to which to create links.
Y
N/A
rid
semicolon-separated list of strings
A list of event and/or todo recurrence identifiers to which to create links.
Y
N/A

Purpose
Use this command to add links in the destination calendar to the specified events and/or todos in the source calendar. You must specify the id parameter with the command unless the specified destination calendar is a public calendar.

The number of items in the uid and rid lists must match exactly, with each rid corresponding to the uid in the same position in the list. If an event or todo has no recurrence ID, use 0 in the rid list.

admin_logout
Purpose
Terminate the session of a specific user.

Parameters
The command takes the following parameters:

Parameter
Type
Purpose
Required
Default
user
string
Administrative user ID (must be contained in the service.http.admins server preference).
Y
N/A
password
string
Administrative user password.
Y
N/A
tid
integer
The session identifier for the target session to be terminated.
N
N/A
addr
IP address
The IP address of the user whose session is to be terminated.
N
N/A
userid
string
The user ID of the user whose session is to be terminated.
N
N/A

Purpose
Use this command to terminate the specified session information for the specified user. This command ends the specified session, and deletes the session instance of the user in the session table. The user is returned to the login screen. The command returns an HTML page containing the response string.

At least one of the parameters tid, addr, or userid must be specified.

Only users with administrative privilege can use this command. The command must be sent to the administrative port.

change_password
Purpose
Change the password of the current user.

Parameters
The command takes the following parameters:

Parameter
Type
Purpose
Required
Default
id
string
The session identifier.
Y
N/A
oldPassword
string
The previous user password.
Y
N/A
newPassword
string
The new user password.
Y
N/A
fmt-out
string
The output content-type in which data is to be returned. One of the following:
text/calendar
text/xml
text/js

N
text/js

Purpose
Passwords are passed as plain text.

To use this function, non-administrative users must have the service.wcap.allowchangepassword preference set.

createcalendar
Purpose
Create a new calendar.

Parameters
The command takes the following parameters:

Parameter
Type
Purpose
Required
Default
id
unique ID string
The session identifier.
Y
N/A
calid
string
A string from which to generate the ID of the new calendar. The generated ID is of the form username:calid.
Y
N/A
fmt-out
string
The output content-type in which data is to be returned. One of the following:
text/calendar
text/xml
text/js

N
text/js
set_calprops
integer (0 or 1)
Whether to set the properties of the new calendar.
N
0

Purpose
Use this command to create a new calendar for the current user as the child of the specified existing calendar. When you pass the set_calprops parameter as 1, you can also pass any additional parameters as defined for the set_calprops command.

The command returns the output from a call to the fetchcomponents_by_range command, formatted according to the fmt-out value, showing the calendar properties.

This function is only available for non-administrative users if the service.wcap.allowcreatecalendars preference is set.

The following example URL creates a calendar with the ID jdoe:newcalfor the user jdoe, sets the name to New-Calendar, and the categories to business and work:

http://myserver/createcalendar.wcap?id=b5q2o8ve2rk02nv9t6&calid=newcal
&set_calprops=1&name=New-Calendar&categories=business;work

For more information on calendar properties you can set, see the set_calprops command.

deletecalendar
Purpose
Deletes a calendar.

Parameters
The command takes the following parameters:

Parameter
Type
Purpose
Required
Default
id
unique ID string
The session identifier.
Y
N/A
calid
string
The name of the calendar to delete.
Y
N/A
fmt-out
string
The output content-type in which data is to be returned. One of the following:
text/calendar
text/xml
text/js

N
text/js

Purpose
Use this command to delete the specified calendar belonging to the current user.

This function is only available for non-administrative users if the service.wcap.allowdeletecalendars preference is set.

The following example URL deletes a calendar named newcal:

http://myserver/deletecalendar.wcap?id='bu9p3eb8x5p2nm0q3'&calid=newcal

deletecomponents_by_range
Purpose
Delete events and todos in a range from a calendar.

Parameters
The command takes the following parameters:

Parameter
Type
Purpose
Required
Default
id
unique id string
The session identifier. Required unless the calendar is public.
N
null
dtstart
ISO8601 DateTime string (UTC)
Start time and date of events or todos to be deleted. A value of 0 means delete all events and todos up to a specified start-time. This value must be in coordinated universal time (Z).
N
0
dtend
ISO8601 DateTime string (UTC)
End time and date of events or todos to be deleted. A value of 0 means delete all events and todos up to the latest date. This value must be in coordinated universal time (Z).
N
0
calid
string
Semicolon-separated list of calendar identifiers from which to delete events and todos. For example, jdoe,jdoe;susan, jdoe;huey;susan.
N
username of current user
brief
integer (0,1)
When 1, print out a brief version of output. When 0, print complete output of event/todo data.
Applies only when output type is Javascript
N
0
fmt-out
string
The output content-type in which data is to be returned. One of the following:
text/calendar
text/xml
text/js

N
text/js

Purpose
Use this command to delete the events and todos that fall completely within the specified range from the specified calendars. If a range is not specified, it deletes all events and todos. If the rid parameter is passed, the command also deletes recurrences, as specified by the mod parameter. See "Storing Recurrences."

When the notify value is 1, sends an IMIP cancellation message to the e-mail attendees.

For example, assuming the user has read access to the calendars jdoe and huey, the following URL deletes all events and todos from those two calendars:

http://deletecomponents_by_range.wcap?id=2342347923479asdf
&calid=jdoe;huey&dtstart=0&dtend=0

If there was an error in deleting from jdoe, the delete_layer_errno[0] value would be set to 1. The javascript would return the error DELETECOMPONENTS_BY_RANGE_FAILED in the errno[0] variable.

deleteevents_by_id
Purpose
Delete an event or events from a calendar.

Parameters
The command takes the following parameters:

Parameter
Type
Purpose
Required
Default
id
unique id string
The session identifier. Required unless the calendar is public.
N
null
calid
string
Identifier of a calendar is which event is stored
Y
N/A
uid
string
Identifier of an event to be deleted, or semicolon-separated list of identifiers.
Y
N/A
rid
string
Recurrence identifier of the event, or semicolon-separated list of recurrence identifiers. If a list, must have same number or elements as uid list.
If there are no recurrences, the value is 0.
Y
N/A
mod
integer
1,2,3,4
A modifier indicating which recurrences to delete, or semicolon-separated list of modifiers. If a list, must have same number or elements as uid list.
One of the following values:
1 = THISINSTANCE
2 = THISANDFUTURE
3 = THISANDPRIOR
4 = THISANDALL

Y
N/A
notify
integer
0,1
When 1, notify attendees of the change. When 0, do not notify attendees.
N
0
brief
integer (0,1)
When 1, print out a brief version of output. When 0, print complete output of event/todo data.
Applies only when output type is Javascript.
N
0
fmt-out
string
The output content-type in which data is to be returned. One of the following:
text/calendar
text/xml
text/js

N
text/js

Purpose
Use this command to delete the specified event or events from the specified calendar. If the rid parameter is passed, the command also deletes recurrences, as specified by the mod parameter. See "Storing Recurrences."

When the notify value is 1, sends an IMIP cancellation message to the e-mail attendees of the event.

To delete multiple events, specify a semicolon-separated list for the uid, rid, and mod parameters. The three lists must have the same number of elements. Each list element corresponds to the same element in the other two lists.

For example, suppose there are two non-recurring events in the database with UIDs of uid-EVENT1 and uid-EVENT2. Use the following URL to delete the two events:

http://myserver:81/deleteevents_by_id.wcap?id=br6p3t6bh5po35r
&uid=uid-EVENT1;uid-EVENT2&rid=0;0&mod=1;1

Because the events are non-recurring, the rid value for each event is set to 0 and mod value for each event is set to 1.

deleteevents_by_range
Purpose
Delete events in a range from a calendar.

Parameters
The command takes the following parameters:

Parameter
Type
Purpose
Required
Default
id
unique ID string
The session identifier. Required unless the calendar is public.
N
null
dtstart
ISO8601 DateTime string
Start time and date of events to be deleted. A value of 0 means delete all events up to a specified start-time.
N
0
dtend
ISO8601 DateTime string
End time and date of events to be deleted. A value of 0 means delete all events up to the latest time.
N
0
calid
string
Semicolon-separated list of calendar identifiers from which to delete events. For example, jdoe,jdoe;susan, jdoe;huey;susan.
N
username of current user
brief
integer (0,1)
When 1, print out a brief version of output. When 0, print complete output of event/todo data.
Applies only when output type is Javascript
N
0
fmt-out
string
The output content-type in which data is to be returned. One of the following:
text/calendar
text/xml
text/js

N
text/js

Purpose
Use this command to delete the events that fall completely within the specified range from the specified calendars. If a range is not specified, it deletes all events. If the rid parameter is passed, the command also deletes recurrences, as specified by the mod parameter. See "Storing Recurrences."

When the notify value is 1, sends an IMIP cancellation message to the e-mail attendees.

deletetodos_by_id
Purpose
Delete a todo or todos from a calendar.

Parameters
The command takes the following parameters:

Parameter
Type
Purpose
Required
Default
id
unique ID string
The session identifier. Required unless the calendar is public.
Y
null
calid
string
Identifier of a calendar is which todo is stored
Y
N/A
uid
string
Identifier of a todo to be deleted, or semicolon-separated list of identifiers.
Y
N/A
rid
string
Recurrence identifier of the todo, or semicolon-separated list of recurrence identifiers. If a list, must have same number or elements as uid list.
If there are no recurrences, the value is 0.
Y
N/A
mod
integer
A modifier indicating which recurrences to delete, or semicolon-separated list of modifiers. If a list, must have same number or elements as uid list.
One of the following values:
1 = THISINSTANCE
2 = THISANDFUTURE
3 = THISANDPRIOR
4 = THISANDALL

Y
N/A
notify
integer
0,1
When 1, notify attendees of the change. When 0, do not notify attendees.
N
0
brief
integer (0,1)
When 1, print out a brief version of output. When 0, print complete output of event/todo data.
Applies only when output type is Javascript
N
0
fmt-out
string
The output content-type in which data is to be returned. One of the following:
text/calendar
text/xml
text/js

N
text/js

Purpose
Use this command to delete the specified todo from the specified calendar. If the rid parameter is passed, the command also deletes recurrences, as specified by the mod parameter. See "Storing Recurrences."

To delete multiple todos, specify a semicolon-separated list for the uid, rid, and mod parameters. The three lists must have the same number of elements. Each list element corresponds to the same element in the other two lists.

When the notify value is 1, sends an IMIP cancellation message to the e-mail attendees of the todo.

deletetodos_by_range
Purpose
Delete todos in a range from a calendar.

Parameters
The command takes the following parameters:

Parameter
Type
Purpose
Required
Default
id
unique id string
The session identifier. Required unless the calendar is public.
N
null
dtstart
ISO8601 DateTime string
Start time and date of todos to be deleted. A value of 0 means delete all todos up to a specified start-time.
N
0
dtend
ISO8601 DateTime string
End time and date of todos to be deleted. A value of 0 means delete all todos up to the latest time.
N
0
calid
string
Semicolon-separated list of calendar identifiers from which to delete todos. For example, jdoe,jdoe;susan,jdoe;huey;susan.
N
username of current user
brief
integer (0,1)
When 1, print out a brief version of output. When 0, print complete output of event/todo data.
Applies only when output type is Javascript
N
0
fmt-out
string
The output content-type in which data is to be returned. One of the following:
text/calendar
text/xml
text/js

N
text/js

Purpose
Use this command to delete the todos that fall completely within the specified range from the specified calendars. If a range is not specified, it deletes all todos. If the rid parameter is passed, the command also deletes recurrences, as specified by the mod parameter. See "Storing Recurrences."

When the notify value is 1, sends an IMIP cancellation message to the e-mail attendees.

export
Purpose
Export events and todos from a calendar to a file.

Parameters
The command takes the following parameters:

Parameter
Type
Purpose
Required
Default
id
unique id string
The session identifier. Required unless the calendar is public.
N
null
calid
semicolon-separated list of strings
A list of identifiers for calendars from which to export events and todos. The user must have read access to all calendars in the list.
N
user name of current user
dtstart
iCal DateTime
string
Start time and date of events and todos to export. A value of 0 means export all components from the earliest date to the end date.
N
0
dtend
iCal DateTime
string
End time and date of the events and todos to export. A value of 0 means export all components from the start date to the latest date.
N
0
content-out
string
Content type for output file. One of the following:
text/calendar
text/xml

Y
N/A

Purpose
Use this command to export events and todos from one or more specified calendars to a file. The contents of the file can later be imported to a calendar using the import command. The command creates a file called export.ics or export.xml, depending on the value of the content-out parameter.

If you do not specify either the starting or ending date, all events and todos in the calendars are added to the file. If you specify a starting and ending date, the command exports only events and todos in the calendars that fall within the time range. Specify starting and ending dates in UTC time (indicated by Z at the end of the datetime).

You must use this command with an HTTP POST (unlike other commands, which can be used with an HTTP GET).

The following HTTP POST message exports all component of the calendars jdoe and huey to an iCal file named export.ica:

POST
/export.wcap?id=t95qm0n0es3bo35r&calid=jdoe;huey&dtstart=0&dtend=0
&content-out=text/calendar
Content-type: multipart/form-data;
boundary=---------------------------41091400621290
Content-Length: 47
-----------------------------41091400621290--
WinNT; U)
Host: jdoe:12345
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png
*/*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8

The following HTML could be used to generate POST messages using the export command, producing files in both iCal and XML formats:

<form METHOD=POST ENCTYPE="multipart/form-data" N