Sun Java System Calendar Server 6 2005Q4 Developer's Guide

Command: deleteevents_by_range

Purpose

Delete events from a calendar in a specified range.


Note –

ENS notifications for appid are not yet implemented.


Parameters

Table 7–6 deleteevents_by_range Parameters

Parameter  

Type  

Purpose  

Required  

Default  

appid

string 

A runtime parameter (not stored in the database) that specifies which application is making the request. ENS uses this parameter to determine which X-Tokens to return. Does not affect WCAP command output. 

For more information on the ENS X-Tokens, see theSun Java System Communications Services 6 2005Q4 Event Notification Service Guide

N/A 

calid

string 

Semicolon-separated list of calendar identifiers from which to delete events. 

The calid can be supplied in two formats: 

  • string - calendar identifier

  • mailto:rfc822addr - An email address appended to “mailto:”. The address is mapped to a user with an LDAP lookup, and then the user’s default calendar ID is used. Returns: X-SICS-EMAIL and X-NSCP-CALPROPS-RELATIVE-CALID

Current user’s calid

dtend

Date Time string 

End time and date of events to be deleted. 

A value of 0 means delete all events until the end of time.

0

dtstart

Date Time string 

Start time and date of events to be deleted. 

A value of 0 means delete all events from the beginning of time.

0

fmt-out

string 

The format for the returned data. 

Two format types: 

text/calendar

text/xml

text/calendar

id

unique identifier string 

The session identifier. 

N/A 

smtp

integer (0, 1)

Send email cancellation to user with no calendar. 

0 = No

1 = Yes

1

Description

Use this command to delete the events that fall completely within the specified range from the specified calendars. If a range is not specified (dtstart and dtend), it deletes all events from the 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 returns in the default text/calendar format.

Error Codes

If the operation is successful, the error number of 0 is appended to the error string, errno. If the operation is not successful, the errno variable contains the error: FAILED: DELETEEVENTS_BY_RANGE_FAILED (22).

See also, Error Handling

Example

For example, assuming the user has read access to the calendars jdoe and john, the following URL would result in deleting all events from the calendars jdoe and john:

http://calendarserver/deleteevents_by_range.wcap
                     ?id=2342347923479asdf
                     &calid=jdoe;john
                     &dtstart=0
                     &dtend=0