(a.k.a. .ics) import allows events to be created, updated, or deleted on a Trumba
calendar by sending an iCalendar (RFC 2445) format file to the Trumba server through
an HTTP PUT operation. This allows existing events in Trumba to be modified with the data in the iCal file but without altering other event data or duplicating events.
The service requires authentication using HTTP BASIC authentication. Because the password is sent via clear text, it is recommended (but not required) that the service be accessed via a secure https connection. The feed only supports a single VCALENDAR component per HTTP PUT operation which means that iCalendar CANCEL methods must be sent in separate HTTP PUT operations.
The URL shown below represents the base URL that should be used to perform the HTTP PUT operation. The <ID> portion of the URL must be replaced with the numeric calendar ID of the destination calendar within Trumba.
Example URL for calendar ID=123456 http://www.trumba.com/service/calendar.123456.ics
Example URL for calendar with web name Foobar: https://www.trumba.com/service/Foobar.ics
The URL can also include the following query string parameters:
|Parameter||Description||Allowed Values||Default Value|
The delta parameter controls whether the incoming feed is considered to be a full feed of data or only changes.
When you upload iCal data to your Trumba calendar, the program used to create iCal events can generate UIDs in any format as long as each UID added to a Trumba calendar or any of its sub-calendars is unique. Although you can use the same UIDs for events in different calendars, Trumba recommends that you implement a method that generates unique event IDs across all of your calendars. For recommendations on UID formats, refer to RFC2445.
Delete an event from your Trumba calendar by using HTTP PUT to upload an iCal file that specifies the CANCEL method and supplies only the event UID. For example:
The response to the HTTP PUT operation contains an XML structure with a root "Response" node and one or more "ResponseMessage" nodes providing information and validation feedback. The following messages may be returned. Response messages may include the UID of the related event and a line number in the feed file where appropriate.
|2101||Property not recognized||Warning|
|2102||Content line is invalid||Warning|
|2103||DateTime is invalid||Warning|
|2104||UTC offset is invalid||Warning|
|2105||Duration is invalid||Warning|
|3101||ICS file must contain a single VCALENDAR||Error|
This section provides a simple code snippet that performs an http put of a .ics file. For brevity, it intentionally does not use error handling logic that would be present in most programs.
Note The ics import and related topics assume that you are familiar with programming languages, the http protocol, and how URL parameters work, and that you can easily find your way around HTML or other web programming-language code.
This code will not work unmodified. Various parameters (in CAPS in this example), such as authentication information and the path to the .ics file must be updated to reflect your account and published calendar name.
The resultant xml response stream, output to the console in the above example, might look like this: