This section describes the usage and parameters for WCAP commands in alphabetical order. WCAP commands and what they do are listed and summarized briefly.
addlink
Purpose
Add links from one calendar to events or todos in another calendar.
Parameters
The command takes the following parameters:
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:
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:
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:
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:
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:
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:
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:
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:
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 |