Application-level commands are all encoded inside the iCalendar objects that get sent to calendar stores. CAP specifies some extensions to iCalendar in CAP draft section 2.7. In particular:
The new VCOMMAND component is used for CAP commands. It has two possible properties, TARGET and CMDID. TARGET specifies the calendar IDs to which this command relates; CMDID is a unique identifier for this command.
There's a new iCalendar method, QUERY, which uses a new component type, VQUERY, to ask a calendar server about elements within a calendar. VQUERY has new properties: EXPAND, MAXRESULTS, MAXRESULTSSIZE, QUERY, and QUERYNAME. The QUERY property is essentially a filter for what elements in a calendar on the server should be returned to the client. VQUERY is specified in detail in CAP draft section 5; it can use either a SQL-92 syntax or an SQL-MIN syntax. (Requesting events looks like talking to a database.)
The application-level calendaring commands are:
CREATE
DELETE
GENERATEUID
MODIFY
MOVE
NOOP
READ
The CREATE method makes a new calendar with a calendar ID equal to the TARGET property. See CAP draft 7.2.1.2 for details and examples.
The DELETE method deletes the calendar(s) specified in TARGET. See CAP draft 7.2.1.3 for details and examples.
The GENERATEUID method requests a certain number of unique IDs from a calendar server (presumably for use in creating new iCalendar objects). See CAP draft 7.2.1.4 for details and examples.
The MODIFY method updates a given object in a calendar by giving the old element and the new element that is to replace it. If a VQUERY occurs inside the VCOMMAND object, all the elements matching the QUERY will be modified. See CAP draft 7.2.1.5 for details and examples, which in this case are very useful for seeing how this works.
The MOVE method allows one calendar to be moved around within a calendar store so that it has a different parent/child relationship with the other calendars on the server. It seems that the Working Group isn't really clear yet about this one. See CAP draft 7.2.1.6 for details and examples.
The NOOP method can be used to keep a server from timing out a connection. See CAP draft 7.2.1.7 for details and examples.
The READ method is used to get a list of calendar elements from the server. By specifying a VQUERY, the set of elements that the calendar returns can be filtered. See CAP draft 7.2.1.8 for details and examples.