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" NAME="Huey.ics"
ACTION="http://myserver:12345/export.wcap?id=t9u9m0eh8x5pu9b
&calid=jdoe;huey&dtstart=0&dtend=0&content-out=text/calendar">
<ul>
<li>Press Export ICAL Now:<input type="submit" value="Export ICAL now">
</li> </ul> </form>
<form METHOD=POST ENCTYPE="multipart/form-data" NAME="Huey.xml"
ACTION="http://myserver:12345/export.wcap?id=t9u9m0eh8x5pu9b
&calid=jdoe;huey&dtstart=0&dtend=0&content-out=text/xml">
<ul>
<li>Press Export XML Now:<input type="submit" value="Export XML now">
</ul> </form>
The following is part of the output from the query, contained in the returned page:
BEGIN:VCALENDAR
METHOD:PUBLISH
VERSION:2.0
BEGIN:VEVENT
UID:tm-001
RECURRENCE-ID:19990519T010000Z
DTSTAMP:19990603T221548Z
SUMMARY:Calendar Staff
DTSTART:19990518T170000Z
DTEND:19990518T190000Z
CREATED:19990603T024254Z
LAST-MODIFIED:19990603T024254Z
PRIORITY:1
SEQ:1
GEO:37.463581;-121.897606
DESC:This is the description for event with UID = tm-001
URL:http://myserver.mycompany.com/susan?uid=tm-001
LOCATION:Green Conference Room
STATUS:CONFIRMED
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
UID:tm-001
RECURRENCE-ID:19990526T010000Z
DTSTAMP:19990603T221548Z
SUMMARY:Calendar Staff
DTSTART:19990525T170000Z
DTEND:19990525T190000Z
CREATED:19990603T024254Z
LAST-MODIFIED:19990603T024254Z
PRIORITY:1
SEQ:1
GEO:37.463581;-121.897606
DESC:This is the description for event with UID = tm-001
URL:http://myserver.mycompany.com/susan?uid=tm-001
LOCATION:Green Conference Room
STATUS:CONFIRMED
TRANSP:OPAQUE
END:VEVENT
fetchcomponents_by_range
Purpose
Retrieve calendar events and todos.
Parameters
The command takes the following parameters:
Purpose
Use this command to retrieve properties, events, and todos from one or more specified calendars. You must specify the id parameter with the command unless the specified calendar is a public calendar. The server returns data in the format specified by the fmt-out parameter. If this parameter is not passed, the data is returned in the default JavaScript format.
For each calendar specified in calid, the server returns the calendar's properties and the events and todos of that calendar that fall within the range specified by dtstart and dtend. Specify these in the ISO8601 Date String format. For example, to get the events for calendars jdoe and susan from Jan. 1, 1999 to Feb. 1, 1999, use the following URL:
http://myserver.mycompany.com:81/
fetchcomponents_by_range.wcap?id=b5q2o8ve2rk02nv9t6&calid=jdoe
If neither the starting nor ending date-time is specified, all events and todos of the calendar are returned, up to the specified maximum.
Note. If a calendar does not have a valid timezone (tzid) associated with it, the
GMT timezone is used.
If you specify a maximum n, the command returns up to the first n events and first n todos in the specified range. For example, if you specify a maxResults value of 75, the returned Javascript would contain the following variables
var maxResults=75 /* maximum cap passed in */
var size=75 /* event size is capped to 75 */
var todosize=28 /* todo size not affected since it is less than 75 */
If the maxResults parameter is set to 0 or is not passed, then the returned Javascript does not contain the var maxResults statement.
If the operation is successful, the error number of 0 is appended to the error string. If a calendar cannot be accessed or is missing, the error number is appended to the error string.
For an example of the returned output from this command, see "Retrieving Components from Calendars."
fetchevents_by_id
Purpose
Retrieve specific calendar events.
Parameters
The command takes the following parameters:
Purpose
Use this command to retrieve the specified event and its recurrences from the specified calendar. You must specify the id parameter with the command unless the specified calendar is a public calendar. The server returns data in the format specified by the fmt-out parameter. If this parameter is not passed, the data is returned in the default JavaScript format.
The command returns recurrences as specified by the mod parameter. See "Storing Recurrences."
fetchtodos_by_id
Purpose
Retrieve specific calendar todos.
Parameters
The command takes the following parameters:
Purpose
Use this command to retrieve the specificed todo and its recurrences from the specified calendar. You must specify the id parameter with the command unless the specified calendar is a public calendar. The server returns data in the format specified by the fmt-out parameter. If this parameter is not passed, the data is returned in the default JavaScript format.
The command returns recurrences as specified by the mod parameter. See "Storing Recurrences."
get_all_timezones
Purpose
Retrieve data about all timezonessupported by the server.
Parameters
The command takes the following parameters:
Purpose
Use this command to retrieve data about all timezonesthat are supported by the server. The server returns data in the format specified by the fmt-out parameter. If this parameter is not passed, the data is returned in the default JavaScript format.
The crossover dates of a timezone are those dates on which daylight savings begins or ends; for example, 10/26/98. If you specify a range of years with the dtstart and dtend parameters, the command returns only the crossover dates for the years within the range. Otherwise, it returns all crossover dates from the first to the last known year (1987-2087).
This command returns a timezone list, which is a JavaScript array containing the identifying feature of each timezone, including another JavaScript array of the crossover dates. The following is an example of a timezone array element where crossover dates have been limited to the years from mid-1998 to 2006:
timezoneList[20] = new TZ('America/Los_Angeles', 'PST', 'PDT',
'-0800', '-0700', new
Array ('19981025T090000Z', '19990404T100000Z', '19991031T090000Z',
'20000402T100000Z', '20001029T090000Z','20010401T100000Z',
'20011028T090000Z', '20020407T100000Z', '20021027T090000Z',
'20030406T100000Z', '20031026T090000Z', '20040404T100000Z',
'20041031T090000Z', '20050403T100000Z', '20051030T090000Z',
'20060402T100000Z', '20061029T090000Z'))
get_calprops
Purpose
Retrieve calendar properties.
Parameters
The command takes the following parameters:
Purpose
Use this command to retrieve the calendar properties for the specified calendars. The command returns the preferences in the specified format.
The following errors can occur:
The command returns a page with the following property information for the specified calendars:
In the following example, the command tries to get the calendar properties for the calendar jdoe, susan, pub, huey, and hasdf, in that order.
http://myserver/
get_calprops.wcap?id=2mu95r5so0hq68ts6q3&calid=jdoe;susan;pub;huey;hasd
f
In this case, the user does not have read access to the calendar susan, and the calendar hasdf does not exist in the database.
Data is returned for the remaining calendars as follows, and the layer_errno[] value for these calendars' indexes is set to 0.
For an example of the JavaScript output from this command, see "Retrieving Calendar Properties."
get_guids
Purpose
Generate a set of globally unique identifiers.
Parameters
The command takes the following parameters:
Purpose
Use this command to generate the specified number of globally unique identifiers (GUIDs). The client need not be authenticated to call this command.
The following example URLs and their return output show the three formats:
http://jdoe.mycompany.com/get_guids.wcap?guidCount=10
&fmt-out=text/calendar
BEGIN:VCALENDAR
VERSION:2.0
PRODID:iPlanet Calendar Server 4.0
X-NSCP-GUID0:e5e4b537465600000b000000c3000000
X-NSCP-GUID1:e5e4b537d47900000c000000c3000000
X-NSCP-GUID2:e5e4b537961400000d000000c3000000
X-NSCP-GUID3:e5e4b5373d3a00000e000000c3000000
X-NSCP-GUID4:e5e4b537f31400000f000000c3000000
X-NSCP-GUID5:e5e4b5378259000010000000c3000000
X-NSCP-GUID6:e5e4b537b026000011000000c3000000
X-NSCP-GUID7:e5e4b537c263000012000000c3000000
X-NSCP-GUID8:e5e4b537241f000013000000c3000000
X-NSCP-GUID9:e5e4b537e733000014000000c3000000
END:VCALENDAR
http://jdoe.mycompany.com/get_guids.wcap?guidCount=10&fmt-out=text/xml
<?xml version="1.0" encoding="UTF-8"?>
<iCalendar>
<iCal>
<X-NSCP-GUID0>fde4b537d604000015000000c3000000<X-NSCP-GUID0>
<X-NSCP-GUID1>fde4b5379478000016000000c3000000<X-NSCP-GUID1>
<X-NSCP-GUID2>fde4b5372a6d000017000000c3000000<X-NSCP-GUID2>
<X-NSCP-GUID3>fde4b537a355000018000000c3000000<X-NSCP-GUID3>
<X-NSCP-GUID4>fde4b5377768000019000000c3000000<X-NSCP-GUID4>
<X-NSCP-GUID5>fde4b5376e2e00001a000000c3000000<X-NSCP-GUID5>
<X-NSCP-GUID6>fde4b537a07700001b000000c3000000<X-NSCP-GUID6>
<X-NSCP-GUID7>fde4b537744700001c000000c3000000<X-NSCP-GUID7>
<X-NSCP-GUID8>fde4b537ab1f00001d000000c3000000<X-NSCP-GUID8>
<X-NSCP-GUID9>fde4b5371d2200001e000000c3000000<X-NSCP-GUID9>
</iCal>
</iCalendar>
In the final example, the fmt-out parameter defaults to text/java:
http://jdoe.mycompany.com/get_guids.wcap?guidCount=10
<html><head><script>
function color(s) { if (s) document.bgColor=s }
var id='0'
var userid=''
var calid=''
var errno=new Array()
var guid=new Array()
guid[0]=9ee4b5375778000001000000c3000000
guid[1]=9ee4b5376a52000002000000c3000000
guid[2]=9ee4b5375a47000003000000c3000000
guid[3]=9ee4b537bf01000004000000c3000000
guid[4]=9ee4b537e05e000005000000c3000000
guid[5]=9ee4b537be5a000006000000c3000000
guid[6]=9ee4b537d544000007000000c3000000
guid[7]=9ee4b5372867000008000000c3000000
guid[8]=9ee4b5375731000009000000c3000000
guid[9]=9ee4b537830600000a000000c3000000
parent.ceCB(window.name)
</script></head></html>
get_session
Purpose
Retrieve session information for a user.
Parameters
The command takes the following parameters:
Purpose
Use this command to retrieve the session information for the specified user and session. The command returns an HTML page containing the response string.
If one of the parameters tid, addr, or userid is not specified, the command returns information for all users.
Only users with administrative privilege can use this command. The command must be sent to the administrative port.
The following is an example of the response string in the returned page:
<html>
<!-- admin
id=927152557 userid=jdoe addr=208.12.60.179 login=19990519T152156Z
access=19990519T152156Z id=927166888 userid=admin addr=208.12.60.179
login=19990519T152203Z access=19990519T152203Z
-->
</html>
get_userprefs
Purpose
Retrieve the calendar preferences for the current user.
Parameters
The command takes the following parameters:
Purpose
Use this command to retrieve the calendar preferences for the current user. The command returns the preferences in Javascript format.
It is recommended that you prefix all calendar-specific user preferences with "ce."
For an example of the output returned from this command, see "Retrieving User Preferences."
import
Purpose
Import events and todos from a file to a calendar.
Parameters
The command takes the following parameters:
Purpose
Use this command to import to the specified calendar events and todos that have previously been exported to a file using the export command. You must specify the content type of the file.
If you do not specify either the starting or ending date, all events and todos in the file are added to the specified calendar. If you specify a starting and ending date, the command imports only events and todos in the file 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 message(unlike other commands, which can be used with an HTTP GET message). You attach to the POST message the file containing the exported events and todos. This file must be in either iCal (.ics) or XML (.xml) format.
The following POST message imports the attached iCal file to the calendar jdoe using the import command:
POST /import.wcap?id=t95qm0n0es3bo35r&calid=jdoe&dtstart=0&dtend=0
Content-type: multipart/form-data;
boundary=---------------------------33111928916708
Content-Length: 679
-----------------------------33111928916708
Content-Disposition: form-data; name="Upload";
filename="C:\TEMP\ical1.ics"
BEGIN:VCALENDAR
BEGIN:VEVENT
DTSTART:19990105T100000
DTEND:19990105T110000
DTSTAMP:19990104T120000
CREATED:19990105T110000Z
LAST-MODIFIED:19990104T120000Z
SUMMARY:Weekly QA Meeting
UID:random-uid001
END:VEVENT
BEGIN:VEVENT
DTSTART:19990106T100000
DTEND:19990106T110000
DTSTAMP:19990104T120000
CREATED:19990105T110000Z
LAST-MODIFIED:19990104T120000Z
SUMMARY:Weekly QA Meeting 2
UID:random-uid002
END:VEVENT
END:VCALENDAR
-----------------------------33111928916708--
The following HTML form creates such a POST message, attaching a file that the user specifies:
<FORM METHOD=POST ENCTYPE="multipart/form-data"
ACTION="http://myserver:12345/import.wcap?id=t95qm0n0es3bo35r
&calid=jdoe&dtstart=0&dtend=0&content-in=text/calendar">
<ol>
<li>file to import:<input type="file" accept="text" name="Upload">
</li>
<li>Press Import Now:<input type="submit" value="Import Now"></li>
</ol>
</FORM>
login
Purpose
Authenticate as a specific user.
Parameters
The command takes the following parameters:
Purpose
Use this command to log into Calendar Server as a specific user, authenticating the user to the server with a user name and password convention.
The authentication method can use either LDAP or CSAPI.
If the user fails to authenticate correctly, the login window reappears with an error noting a failure to log in.
The following is an example of a URL using this command:
http://myserver/login.wcap?user=jdoe&password=mypword
The returned page contains the session identifier in a line such as the following:
var id='bu9p3eb8x5p2nm0q3'
This is the value that you pass to many WCAP commands in order to gain access to private calendars. It is also a required parameter for certain commands, such as logout.
If you specify 0 for the refresh parameter, the command returns JavaScript output containing the location of the entry page to the Calendar Server's user interface. For example:
HTTP/1.0 302 OK
Date: Tue, 11 May 1999 22:38:33 GMT
Pragma: no-cache
Expires: 0
Cache-Control: no-cache
Content-Length: 0
Last-modified: Tue, 11 May 1999 22:38:33 GMT
Location:
http://jdoe.mycompany.com/en/main.html?id=er6en05tv6n3bv9&lang=en
&host=http://jdoe.mycompany.com/
<html><head><script>
function color(s) { if (s) document.bgColor=s }
var id='er6en05tv6n3bv9'
var userid='jdoe'
var calid='jdoe'
var errno=new Array()
var errstr=''
</script></head>
<body bgcolor='9999CC' onLoad=parent.ceCB(window.name)>
logout
Purpose
Terminate the session of the current user.
Parameters
The command takes the following parameters:
Purpose
This command ends the specified session of the current user, and deletes the session instance of the user in the session table. The user is returned to the login screen.
The following is an example of a URL using this command:
http://myserver/logout.wcap?id=bu9p3eb8x5p2nm0q3
ping
Purpose
Determine whether the server is active.
Parameters
This command takes no parameters.
Purpose
This command returns a minimal HTML page to indicate that the server responded.
Only users with administrative privilege can use this command.
refresh
Purpose
Refresh the server configuration.
Parameters
The command takes the following parameters:
Purpose
This command causes the server to reload the server.conf configuration file. You can use this command to change configuration preferences while the server is running.
Only users with administrative privilege can use this command.
search_calprops
Purpose
Search for 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
|
search-string
|
string
|
The string to search for in calendars.
|
Y
|
N/A
|
searchOpts
|
integer
0,1,2,3
|
How to perform the search. One of the following:
0 = CONTAINS 1 = BEGINS_WITH 2 = ENDS_WITH 3 = EXACT
|
N
|
0
|
maxResults
|
integer
|
The maximum number of results to return.
|
N
|
200
|
primaryOwner
|
integer (0,1)
|
If 1, search primaryOwner property.
|
N
|
0
|
calid
|
integer (0,1)
|
If 1, search calid property.
|
N
|
0, unless both owner and name are 1
|
name
|
integer (0,1)
|
If 1, search name property.
|
N
|
0
|
Purpose
This command searches for a calendar using the query specified by searchOpts. It returns all calendars where a string in the specified properties matches the specified string in the specified way, up to the specified maximum number of matches.
Specify whether to search for the value of a specific property (primaryOwner, calid, or name) by setting that parameter to 1. If both primaryOwner and name are set to 1, calid defaults to 1.
The following example URL searches the primary owner property (primaryOwner=1) in all calendars to see if it contains (searchOpts=0) the string "susan".
http://myserver/search_calprops.wcap?id=b2nehr3eq6bh5s
&search-string=susan&primaryOwner=1&searchOpts=0&maxResults=50
For an example of the output from this command, see "Retrieving Calendar Properties."
set_calprops
Purpose
Set the calendar properties of a calendar.
Parameters
The command takes the following parameters:
Purpose
Use this command to set the properties of the specified calendar to the specified values. Calendar properties include the calendar's name, read and write permission values, the list of owners, and the list of categories.
You must pass all parameters, as the command overwrites the previous calendar properties.
For example, the following URL sets the read and write access of the calendar jdoe to PUBLIC, and specifies a categories list with two entries, business and meeting:
http://myserver?set_calprops.wcap?id=dfasdfzd3ds&calid=jdoe
&read=1&categories=business;meeting&write=1
To set properties of several calendars at one time, set the multiple parameter to the number of calendars to be set, then pass a cal parameter for each calendar. The cal parameter contains an encoded string with the complete property parameter list for the identified calendar. In this string, replace all special characters with a percent character (%), followed by the hexadecimal ASCII code for the special character. ASCII hex codes for common special characters are as follows:
For example, the following URL modifies three calendars with IDs xxxx, yyyy, and zzzz, setting the descriptions to X-Calendar, Y-Calendar, and Z-Calendar, respectively:
http://jdoe.mycompany.com?id=fasdfzd3ds
&multiple=3
&cal=calid%3Dxxxx%26description%3DX-Calendar
&cal=calid%3Dyyyy%26description%3DY-Calendar
&cal=calid%3Dzzzz%26description%3DZ-Calendar
set_userprefs
Purpose
Modify the preferences or password for a session.
Parameters
The command takes the following parameters:
Purpose
Use this command to modify the preferences for the current user. For example, the following URL sets the value of a new preference, ceBgcolor, to black:
http://jdoe/set_userprefs.wcap?id=b5q2o8ve2rk02nv9t6
&add_attrs=ceBgcolor=black
The function returns the result of a call to the get_userprefs command.
shutdown
Purpose
Shut down the calendar server.
Parameters
The command takes the following parameters:
Purpose
Use this command to shut down the currently running calendar server. The command returns an HTML page containing a shutdown message.
Only users with administrative privilege can use this command. The command must be sent to the administrative port.
The server returns a minimal HTML page containing the shutdown message. For example:
HTTP/1.0 200
Date: Thu, 13 May 1999 01:19:25 GMT
Content-type: text/html; charset=iso-8859-1
Content-length: 483
Last-modified: Thu, 13 May 1999 01:19:25 GMT
Pragma: no-cache
Expires: 0
Cache-Control: no-cache
<html>
<!-- admin
Shutting down Calendar Server
-->
</html>
storeevents
Purpose
Add events to 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
|
integer
|
Identifier of a calendar in which to store the event.
|
Y
|
N/A
|
dtstart
|
iCal DateTime string
|
Start time and date of the event.
|
Y
|
N/A
|
dtend
|
iCal DateTime string
|
End time and date of the event.
|
N
|
N/A
|
summary
|
string
|
Summary of the event. A string of any length. To include spaces in the string, use the code %20.
|
N
|
"default summary"
|
desc
|
string
|
Purpose of the event. A string of any length. To include spaces in the string, use the code %20. If not passed, description is set to the summary value.
|
N
|
value in summary field
|
uid
|
string
|
Unique identifier of the event to be stored.
|
N
|
"default uid"
|
location
|
string
|
Location of the event.
|
N
|
""
|
icsClass
|
string
|
Class of the event. One of the following values:
PUBLIC PRIVATE CONFIDENTIAL
|
N
|
PRIVATE
|
icsUrl
|
string
|
URL of the event.
|
N
|
""
|
duration
|
iCal duration string
|
Duration of the event. If an event has both a duration and a dtend, the duration is ignored.
|
N
|
N/A
|
status
|
integer
|
A code for the status of the event. One of the following values:
0 CONFIRMED 1 CANCELLED 2 TENTATIVE 3 NEEDS_ACTION 4 COMPLETED 5 IN_PROCESS 6 DRAFT 7 FINAL
|
N
|
N/A
|
isAllDay
|
integer
|
If passed with a value of 1, the event is all day. If not passed or passed with a value of 0, the event is not all day.
|
N
|
0
|
geo
|
semicolon-separated string of two floats
|
Latitude and longitude of the geographical location of the event.
|
N
|
0;0
|
seq
|
integer
|
Sequence number of the event.
|
N
|
0
|
rrules
|
semicolon-separated list of quoted recurrence-rule strings
|
Recurrence rules of the event.
Each rule value must be enclosed in quotes. See "Storing Recurrences."
|
N
|
N/A
|
exrules
|
semicolon-separated list of quoted recurrence-rule strings
|
Exclusionary recurrence rules of the event.
Each rule value must be enclosed in quotes. See "Storing Recurrences."
|
N
|
N/A
|
rdates
|
semicolon-separated list of iCal date strings
|
Recurrence dates of the event.
|
N
|
N/A
|
exdates
|
semicolon-separated list of iCal date strings
|
Exclusionary recurrence dates of the event.
|
N
|
N/A
|
rid
|
iCal DateTime string
|
Recurrence identifier of the event.
|
N
|
N/A
|
mod
|
integer
|
A modifier indicating which recurrences to store. One of the following values:
1 = THISINSTANCE 2 = THISANDFUTURE 3 = THISANDPRIOR 4 = THISANDALL
|
N
|
N/A
|
rchange
|
integer (0,1)
|
Whether to expand a recurring event. Expand if 1, do not exand if 0.
|
N
|
1
|
priority
|
integer (0-10)
|
The priority of the event. 0 is the lowest priority, and 10 is the highest.
|
N
|
0
|
relatedTos
|
semicolon-separated list of quoted strings
|
Other events to which this event is related.
|
N
|
N/A
|
resources
|
semicolon-separated list of strings
|
The resources associated with the event.
|
N
|
N/A
|
categories
|
semicolon-separated list of strings
|
The categories of the event.
|
N
|
N/A
|
attendees
|
semicolon-separated list of strings
|
The attendees of the event.
|
N
|
N/A
|
contacts
|
semicolon-separated list of strings
|
Contacts for the event.
|
N
|
N/A
|
alarmEmails
|
semicolon-separated list of email addresses
|
Recipients of alarm notifications for the event.
|
N
|
N/A
|
alarmStart
|
iCal DateTime string
|
The time at which to send an alarm notification of the event.
|
N
|
N/A
|
attachments
|
semicolon-separated list of strings
|
Items to be attached to notification emails.
|
N
|
N/A
|
tzid
|
quoted string
|
A timezone. All dates are interpreted with reference to this timezone.
If not passed, all dates are interpreted as being in coordinated universal time (UTC or Z format).
|
N
|
"GMT"
|
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 create an event with the specified attributes and store it in the specified calendar in the database. See "Examples of Command Usage" on page 79 for examples of usage.
The ending date and time (dtend) overrides the duration. If you specify both duration and dtend, the duration is ignored.
Specify the duration in the iCal format. For example:
Notice that the T in the string separates the date information (year, month, day) from the time information (hour, minute, second).
The command creates and stores recurrences as specified by the recurrence rule, rid, mod, and rchange parameters. See "Storing Recurrences."
When the notify value is 1, sends an IMIP publish message to the e-mail attendees of the event.
If the fmt-out parameter is set to text/calendar or text/xml, the command returns the error value in an HTML comment; for example:
<!-- store_errno="0" -->
If the fmt-out parameter is set to text/js, the command returns the javascript from a fetchcomponents_by_range.wcap command on all data.
This command cannot modify a linked event.
For an example that uses all of the parameters of this command, see "Creating and Storing Events."
storetodos
Purpose
Add a todo to a calendar.
Parameters
The command takes the following parameters:
Parameter
|
Type
|
Purpose
|
Required
|
Default
|
id
|
integer
|
The session identifier. Required unless the calendar is public.
|
N
|
null
|
calid
|
integer
|
Identifier of a calendar in which to store the todo.
|
Y
|
N/A
|
dtstart
|
iCal DateTime string
|
Start time and date of the event.
|
Y
|
N/A
|
due
|
iCal DateTime string
|
End time and date of the event. .
|
N
|
N/A
|
completed
|
iCal DateTime string
|
Completion date of the todo. A value of 0 means the todo is not yet completed.
|
N
|
0
|
summary
|
string
|
Summary of the todo. A string of any length. To include spaces in the string, use the code %20.
|
N
|
"default summary"
|
description
|
string
|
Purpose of the todo. A string of any length. To include spaces in the string, use the code %20. If not passed, description is set to the summary value.
|
N
|
value in summary field
|
uid
|
string
|
Unique identifier of the todo to be stored.
|
N
|
"default uid"
|
location
|
string
|
Location of the todo.
|
N
|
""
|
icsClass
|
string
|
Class of the todo. One of the following values:
PUBLIC PRIVATE CONFIDENTIAL
|
N
|
PRIVATE
|
icsUrl
|
string
|
URL of the todo.
|
N
|
""
|
duration
|
iCal duration string
|
Duration of the todo.
|
N
|
N/A
|
status
|
integer
|
A code for the status of the todo. One of the following values:
0 CONFIRMED 1 CANCELLED 2 TENTATIVE 3 NEEDS_ACTION 4 COMPLETED 5 IN_PROCESS 6 DRAFT 7 FINAL
|
N
|
N/A
|
isAllDay
|
NONE
|
If passed, the todo is an all-day todo. If not passed, the todo is not all day. The parameter takes no value.
|
N
|
N/A
|
geo
|
semicolon-separated string of two floats
|
Latitude and longitude of the geographical location of the todo.
|
N
|
0;0
|
seq
|
integer
|
Sequence number of the todo.
|
N
|
0
|
percent
|
integer (0-100)
|
Percentage completion of the todo.
|
N
|
0
|
rrules
|
semicolon-separated list of quoted recurrence-rule strings
|
Recurrence rules of the todo.
|
N
|
N/A
|
exrules
|
semicolon-separated list of quoted recurrence-rule strings
|
Exclusionary recurrence rules of the todo.
|
N
|
N/A
|
rdates
|
semicolon-separated list of iCal date strings
|
Recurrence dates of the todo.
|
N
|
N/A
|
exdates
|
semicolon-separated list of iCal date strings
|
Exclusionary recurrence dates of the todo.
|
N
|
N/A
|
rid
|
iCal DateTime String
|
Recurrence identifier of the todo.
|
N
|
N/A
|
mod
|
integer
|
A modifier indicating which recurrences to store. One of the following values:
1 = THISINSTANCE 2 = THISANDFUTURE 3 = THISANDPRIOR 4 = THISANDALL
|
N
|
N/A
|
rchange
|
integer (0,1)
|
Whether to expand a recurring todo. Expand if 1, do not exand if 0.
|
N
|
1
|
priority
|
integer (0-10)
|
The priority of the todo. 0 is the lowest priority, and 10 is the highest.
|
N
|
0
|
relatedTos
|
semicolon-separated list of quoted strings
|
Other todos to which this todo is related.
|
N
|
N/A
|
resources
|
semicolon-separated list of strings
|
The resources associated with the todo.
|
N
|
N/A
|
categories
|
semicolon-sepaated list of strings
|
The categories of the todo.
|
N
|
N/A
|
attendees
|
semicolon-separated list of strings
|
The attendees of the todo.
|
N
|
N/A
|
contacts
|
semicolon-separated list of strings
|
Contacts for the todo.
|
N
|
N/A
|
alarmEmails
|
semicolon-separated list of email addresses
|
Recipients of alarm notifications for the todo.
|
N
|
N/A
|
alarmStart
|
iCal DateTime string
|
The time at which to send an alarm notification of the todo.
|
N
|
N/A
|
attachments
|
semicolon-separated list of strings
|
Items to be Attached to notification mail messages.
|
N
|
N/A
|
tzid
|
quoted string
|
A timezone. All dates are interpreted with reference to this timezone.
If not passed, all dates are interpreted as being in coordinated universal time (UTC or Z format).
|
N
|
"GMT"
|
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 create a todo with the specified attributes and store it in the specified calendar in the database.
The ending date and time (dtend) overrides the duration. If you specify both duration and dtend, the duration is ignored.
Specify the duration in the iCal format. For example:
Notice that the T in the string separates the date information (year, month, day) from the time information (hour, minute, second).
The command creates and stores recurrences as specified by the recurrence rule, rid, mod, and rchange parameters. See "Storing Recurrences."
When the notify value is 1, sends an IMIP publish message to the e-mail attendees of the todo.
This command cannot modify a linked todo.
version
Purpose
To get the WCAP version that the calendar server supports.
Parameters
The command takes the following parameters:
Purpose
Use this command to get the WCAP version that the server supports. (Note: this is different from the server version as well as the HTTP version.
The commands supports outpute types of iCal, XML, and JavaScript. In iCal and XML, the variable X-NSCP-WCAPVERSION contains the WCAP version number. In Javascript, the variable wcapversion returns the version number.
|