Deletes one or more events from a calendar by event identifier.
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 |
N/A |
calid |
string |
Calendar identifier of event to delete. The calid can be supplied in two formats:
|
Y |
N/A |
fmt-out |
string |
The format for the returned data. Two format types: text/calendar text/xml |
Y |
text/calendar |
id |
unique identifier string |
The session identifier. Required unless the calendar is public. |
Y |
NULL |
mod |
integer 1,2,3,4 |
A modifier indicating which recurrences to delete, or semicolon-separated list of modifiers. If a list, it must have same number of elements as uid list. One of the following values: 1 = THISINSTANCE2 = THISANDFUTURE3 = THISANDPRIOR 4 = THISANDALL |
Y |
N/A |
notify |
integer 0,1 |
A boolean indicating whether or not to notify attendees of this change. 1 = Notify attendees. 0 = Do not notify attendees. |
N |
0 |
rid |
string |
Recurrence identifier of the event, or semicolon-separated list of recurrence identifiers. If a list, it must have same number of elements as the uid list. If there are no recurrences, the value is 0. |
Y |
N/A |
smtp |
integer (0, 1) |
Send email cancellation to user with no calendar. 0 = No 1 = Yes |
N |
1 |
tzid |
time zone ID string |
Default time zone to use if the rid parameter does not have a time zone specified. For example, “America/Los_Angeles” |
N |
server’s default time zone |
uid |
string |
Unique Identifier of an event to be deleted, or semicolon-separated list of unique identifiers. |
Y |
N/A |
Use this command to delete the specified event or events from the specified calendar.
If the operation is successful, the error number of 0 is appended to the error string. If the uid does not exist, the server returns error code 59. See also, Error Handling
If the rid parameter is passed, the command also deletes recurrences, as specified by the mod parameter. (See Recurring Components–Deleting.) 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, there are two non-recurring events in the database with UID's of uid-EVENT1 and uid-EVENT2. Since 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.
The following URL deletes the two events:
http://calendarserver/deleteevents_by_id.wcap ?id=br6p3t6bh5po35r &uid=uid-EVENT1;uid-EVENT2 &rid=0;0&mod=0;0 &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:VEVENT UID:uid-EVENT1 REQUEST-STATUS:2.0;Success. Delete successful. END:VEVENT BEGIN:VEVENT UID:uid-EVENT2 REQUEST-STATUS:2.0;Success. Delete successful. END:VEVENT X-NSCP-WCAP-ERRNO:0 END:VCALENDAR