Fetch a list of components that have changed during a specified time period.
Parameter |
Type |
Purpose |
Required |
Default |
---|---|---|---|---|
calid |
string |
A semicolon-separated list of calendar identifiers. The calid can be supplied in two formats:
|
N |
Current user’s calid |
component-type |
keyword (event, todo, all) |
Indicates which components to return: event returns only eventstodo returns only todos all returns both events and todos If an invalid value is passed in, the system assumes all. |
N |
all |
compressed |
integer (0,1) |
This parameter is deprecated in this release and might be deleted in future releases. For compressed=0, returns less data. Specifically, it does not return the following parameters:rrules, rdates, exrules, and exdates. For compressed=1, all recurrence data is returned. |
N |
0 |
compstate |
semicolon-separated list of component state keywords |
The list of component states to fetch. For compstate values, see Fetching Component State Data |
N |
ALL |
dtend |
Date Time string |
End time and date of events to be returned. A value of 0 means fetch all events. |
N |
0 |
dtstart |
Date Time string |
Start time and date of events to be returned. A value of 0 means fetch all events from the beginning of time. |
N |
0 |
emailorcalid |
integer (0, 1) |
0 = The calid is returned in the calendar address part of the ATTENDEE and ORGANIZER properties. The X-Token X-S1CS-EMAIL has the RFC 822 email address of the invitee or organization. 1 = The email address is returned in the calendar address part of the ATTENDEE and ORGANIZER properties. The X-Token X-S1CS-CALID contains the calid value. |
N |
0 |
fetchorder |
integer |
Specifies the order in which the events and todos are returned. The values are:
|
N |
0 |
emailorcalid |
integer (0, 1) |
0 = Returns calid in calendar address part of the attendee or organizer property and returns the RFC 822 address of the invitee or organizer in X-S1CS-EMAIL. 1 = Returns the RFC 822 compliant email address in the calendar address part of the attendee or organizer property, and returns the calid in X-S1CS-CALID. |
N |
0 |
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. |
Y |
N/A |
maxResults |
integer |
The maximum number of events and todos to be returned. When 0, no maximum is applied and the command returns all events and todos found. |
N |
0 |
recurring |
integer (0, 1) |
1 = Returns all components in compressed form. Compressed form has master entry plus exceptions. 0 = Returns all components expanded with individual instances, not with a master record plus exceptions. |
N |
0 (not compressed) |
relativealarm |
integer (0, 4) |
Return the alarm as relative or absolute. 0 = Return alarm values as absolute. 4 = Return alarms as originally created. |
N |
0(absolute) |
tzid |
time zone ID string |
Time zone to use if dtstart, or dtend parameters are not in Zulu time. For example, “America/Los_Angeles” |
N |
server’s default time zone |
tzidout |
time zone ID string |
Time zone to report returned data in. |
N |
Zulu time |
Use this command to retrieve a list of events and todos that have changed during a specific time period. This command works almost like fetchcomponents_by_range.
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.
For each calendar specified in calid, the server returns the calendar's the events and todos that changed during the range specified by dtstart and dtend.
If the times specified in the dtstart and dtend parameters is not Zulu time, the system uses the time zone specified in the tzid parameter to translate the times into Zulu time for data retrieval. If the tzid parameter is missing, the system uses the server’s default time zone.
The system uses the tzidout parameter to determine what time zone to translate retrieved data into before returning it. If the tzidout parameter is missing, the system returns the data in Zulu time.
If neither the starting nor ending date-time is specified, the server returns all events and todos that have changed, up to the specified maximum.
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 example, the calendar jdoe has these three events:
eventA: last-modified on Feb. 10, 2002, 10:00 AM GMT.
eventB: last-modified on Dec. 25, 2001, 12:30 PM GMT.
todoA: last-modified on Jan. 20, 2002, 1:15 PM GMT.
Here are some queries and their return values:
http://calendarserver/fetchcomponents_by_lastmod.wcap ?id=jdoe &dtstart=0 &dtend=0
The above query would fetch all events and todos that have ever been modified. Thus eventA, eventB, and todoA would be returned.
http://calendarserver/fetchcomponents_by_lastmod.wcap ?id=jdoe &dtstart=20011201T112233Z &dtend=20020131T112233Z
The above query would fetch all modified events and todos between 12/1/2001 and 1/31/2002. Thus eventB and todoA would be returned.
http://calendarserver/fetchcomponents_by_lastmod.wcap ?id=jdoe &dtstart=20020101T112233Z &dtend=20020601T112233Z
The above query would fetch all events and todos that have been modified between 1/1/2002 and 6/1/2002. Thus eventA and todoA would be returned.