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

Command: deletetodos_by_id

Purpose

Delete one or more todos from a calendar.

Parameters

Table 7–7 deletetodos_by_id Parameters

Parameter  

Type  

Purpose  

Required  

Default  

appid

string 

A runtime parameter that is not stored in the database. This parameter 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 

Calendar identifier of the todos to delete. 

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

N/A 

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 

mod

integer 

A modifier indicating which recurrences to delete, or semicolon-separated list of modifiers. If a list, must have same number of elements as uid list.

One of the following values: 

1 = THISINSTANCE

2 = THISANDFUTURE

3 = THISANDPRIOR

4 = THISANDALL

N/A 

notify

integer (0,1)

A boolean telling whether or not to notify attendees of this change. 

1 = Notify attendees. 0 = Do not notify attendees.

0

rid

string 

The recurrence identifier of the todo, or a semicolon-separated list of recurrence identifiers. 

If a list, it must have the same number of elements as the uid list.

If there are no recurrences, the value is 0.

N/A 

tzid

time zone ID string 

Default time zone to use if dtstart, or dtend parameters do not have a time zone specified.

For example, “America/Los_Angeles” 

server’s default time zone 

uid

string 

The unique identifier of a todo to be deleted, or a semicolon-separated list of unique identifiers. 

N/A 

Description

Use this command to delete the specified todo 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 returns in the default text/calendar format.

Error Codes

If the uid does not exist, returns error 59.

See also, Error Handling

Recurrences

If the rid parameter is passed, the command also deletes recurrences, as specified by the mod parameter. See Recurring Components–Deleting

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.

If the rid parameter is passed, the command also deletes recurrences, as specified by the mod parameter.

Example

For example, there are two non-recurring todos in the database with UID's of uid-TODO1 and uid-TODO2. Since the todos are non-recurring, the rid value for each todo is set to 0 and mod value for each todo is set to 1.

The following URL deletes the two todos:

http://calendarserver/deletetodos_by_id.wcap
                     ?id=br6p3t6bh5po35r
                     &uid=uid-TODO1;uid-TODO2
                     &rid=0;0
                     &mod=1;1
                     &fmt-out=text/calendar

The resulting data would look like this:

BEGIN:VCALENDAR
PRODID:-//SunJavaSystem/Calendar Hosting Server//EN
METHOD:PUBLISH
VERSION:6.0
BEGIN:VTODO
UID:uid-TODO1
REQUEST-STATUS:2.0;Success.  Delete successful.
END:VTODO
BEGIN:VTODO
UID:uid-TODO2
REQUEST-STATUS:2.0;Success.  Delete successful.
END:VTODO
X-NSCP-WCAP-ERRNO:0
END:VCALENDAR