Returns a list of deleted components from the deletelog.db for a specified time period.
Use this command to retrieve a list of events and todos that have been deleted during a specific time period. For recurring format components, this command should be used in conjunction with fetchcomponents_by_lastmod in order to return recurring instances that are still active.
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 text/calendar format.
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 data 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 data does not contain the var maxResults statement.
When this command is called in compressed mode, that is, with recurring =1, the query interface goes through the Delete Log database and returns all the non-repeating entries and the master components deleted that match the criteria. This pass ignores the recurring instances that are stored in the database. This does not return any master entries associated with the deleted recurring instances that are still active. Those active master entries are returned using the fetchcomponents_by_lastmod command. If all the instances in a recurring chain are deleted, the master component returns dtstart, dtend, rrules, rdates, exrules, exdates and uid.
When the command is called in expanded mode, that is, with recurring=0, the query interface goes through the Delete Log database and returns all instances of recurring components. Specifically, it does not return the master component.
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.
The following failure codes can be returned:
X-NSCP-WCAP-ERRNO:1 - Session ID timed out or Invalid session ID
X-NSCP-WCAP-ERRNO:28 - Command failed. User denied access to a calendar
X-NSCP-WCAP-ERRNO:29 - Command failed. The calendar does not exist in the database
X-NSCP-WCAP-ERRNO:56 - Fetch deleted components failed
X-NSCP-WCAP-ERRNO:57 - Success but partial result
The first example shows the command defaulting to recurring=0, which returns components expanded to individual instances. The second example shows the command using recurring=1, which returns the master record plus exceptions.
http://calendarserver/fetch_deletedcomponents.wcap ?id=8sh8ubh2rbl08u &fmt-out=text/calendar &calid=jdoe |
BEGIN:VCALENDAR PRODID:-//SunONE/Calendar Hosting Server//EN METHOD:PUBLISH VERSION:2.0 X-NSCP-CALPROPS-LAST-MODIFIED:20030110T222754Z X-NSCP-CALPROPS-CREATED:20030110T221814Z X-NSCP-CALPROPS-READ:999 X-NSCP-CALPROPS-WRITE:999 X-NSCP-CALPROPS-RELATIVE-CALID:jdoe X-NSCP-CALPROPS-NAME:john doe X-NSCP-CALPROPS-LANGUAGE:en X-NSCP-CALPROPS-PRIMARY-OWNER:jdoe X-NSCP-CALPROPS-OWNERS:"" X-NSCP-CALPROPS-ACCESS-CONTROL-ENTRY:@@o^a^r^g X-NSCP-CALPROPS-ACCESS-CONTROL-ENTRY:@@o^c^wdeic^g X-NSCP-CALPROPS-ACCESS-CONTROL-ENTRY:@^a^sf^g X-NSCP-CALPROPS-ACCESS-CONTROL-ENTRY:@^c^^g X-NSCP-CALPROPS-ACCESS-CONTROL-ENTRY:@^p^r^g X-NSCP-CALPROPS-RESOURCE:0 BEGIN:VEVENT UID:3e224e5b000041c6000000010000664b DTSTAMP:20030113T055314Z DTSTART:20030114T060000Z DTEND:20030114T070000Z LAST-MODIFIED:20030113T052800Z X-NSCP-TRIGGERED_BY:jdoe END:VEVENT
http://calendarserver/fetch_deletedcomponents.wcap ?id=8sh8ubh2rbl08u &fmt-out=text/calendar &calid=jdoe &recurring=1 |
BEGIN:VCALENDAR PRODID:-//SunONE/Calendar Hosting Server//EN METHOD:PUBLISH VERSION:2.0 X-NSCP-CALPROPS-LAST-MODIFIED:20030110T222754Z X-NSCP-CALPROPS-CREATED:20030110T221814Z X-NSCP-CALPROPS-READ:999 X-NSCP-CALPROPS-WRITE:999 X-NSCP-CALPROPS-RELATIVE-CALID:jdoe X-NSCP-CALPROPS-NAME:john doe X-NSCP-CALPROPS-LANGUAGE:en X-NSCP-CALPROPS-PRIMARY-OWNER:jdoe X-NSCP-CALPROPS-OWNERS:"" X-NSCP-CALPROPS-ACCESS-CONTROL-ENTRY:@@o^a^r^g X-NSCP-CALPROPS-ACCESS-CONTROL-ENTRY:@@o^c^wdeic^g X-NSCP-CALPROPS-ACCESS-CONTROL-ENTRY:@^a^sf^g X-NSCP-CALPROPS-ACCESS-CONTROL-ENTRY:@^c^^g X-NSCP-CALPROPS-ACCESS-CONTROL-ENTRY:@^p^r^g X-NSCP-CALPROPS-RESOURCE:0 BEGIN:VEVENT UID:3e224e5b000041c6000000010000664b DTSTAMP:20030113T055314Z DTSTART:20030114T060000Z DTEND:20030114T070000Z LAST-MODIFIED:20030113T052800Z X-NSCP-TRIGGERED_BY:jdoe END:VEVENT BEGIN:VEVENT UID:3e2255380000278100000003000066eb DTSTAMP:20030113T055758Z DTSTART:20030114T060000Z DTEND:20030114T070000Z LAST-MODIFIED:20030113T055721Z RRULE:FREQ=WEEKLY;INTERVAL=1;WKST=SU;COUNT=5 X-NSCP-TRIGGERED_BY:jdoe END:VEVENT BEGIN:VEVENT UID:3e2255ed00000ff60000000a000066eb DTSTAMP:20030113T060117Z DTSTART:20030114T060000Z DTEND:20030114T070000Z LAST-MODIFIED:20030113T060107Z EXDATE:20030116T060000Z EXDATE:20030116T060000Z EXDATE:20030116T060000Z RRULE:FREQ=DAILY;INTERVAL=1;WKST=SU;COUNT=5 X-NSCP-TRIGGERED_BY:jdoe END:VEVENT BEGIN:VTODO UID:3e2254bd000041c600000001000066eb DTSTAMP:20030113T055517Z DTSTART:20030113T055509Z DUE:20030114T060000Z LAST-MODIFIED:20030113T055513Z END:VTODO X-NSCP-WCAP-ERRNO:0 END:VCALENDAR