Sun Java System Calendar Server 6.3 WCAP Developer's Guide

fetchattachment.wcap

Purpose

Retrieves attachments for a specific event or todo.

Parameters

Table 3–10 fetchattachment Parameters

Parameter  

Type  

Purpose  

Required  

Default  

attachid

string 

Attachment ID for the attachment to be retrieved.  

N/A 

calid

string 

A semicolon-separated list of calendar identifiers. 

The calid can be supplied in two formats: 

  • string - calendar identifier

  • mailto:rfc822addr - An email address appended to “mailto:”. The address is mapped to a user with an LDAP lookup, and then the user’s default calendar ID is used. Returns: X-SICS-EMAIL and X-NSCP-CALPROPS-RELATIVE-CALID

Current user’s calid

id

unique identifier string (uid)

The session identifier. 

NULL

rid

ISO 8601 Date Time string 

The recurrence identifier for the event. For a nonrecurring event, set to 0.

0

tzid

time zone ID string 

If rid parameter is not already in Zulu time, the time zone to use for translating them to Zulu time. 

For example, “America/Los_Angeles” 

server’s default time zone 

uid

string 

The unique identifier for the event todo. 

N/A 

Description

This command retrieves attachments using the attachment ID created when the attachment was stored.

Output

Returns attachments in the form of mime type multipart/mixed data as part of the http reponse message body.

Example

In the following example, the attachment output is generated in response to the command shown:

/fetchattachment.wcap?id=${SESSIONID}&calid=savri&uid=10122&rid=0
&attachid=20051012005&fmt-out=text/calendar

The output for this command is as follows:

HTTP/1.1 200
Date: Wed, 12 Oct 2005 22:04:35 GMT
Content-type: multipart/mixed; boundary= -------------------abcdefghij
Content-length: 347
Last-modified: Wed, 12 Oct 2005 22:04:35 GMT
Pragma: no-cache
Expires: 0
Cache-Control: no-cache
Connection: Keep-Alive

<>-------------------------------abcdefghij
Content-Disposition:attachment; filename=/home/jane/cal.txt
Content-Transfer-Encoding: base64
Content-Type: text/plain


W2FrYW5rc2hhOi9ob21lL3NhdnJpXSUgY2FsIDExIDIwMDIKICAgTm92ZW1iZXIgMjAwMgog
UyAgTSBUdSAgVyBUaCAgRiAgUwogICAgICAgICAgICAgICAgMSAgMgogMyAgNCAgNSAgNiAg
NyAgOCAgOQoxMCAxMSAxMiAxMyAxNCAxNSAxNgoxNyAxOCAxOSAyMCAyMSAyMiAyMwoyNCAy
NSAyNiAyNyAyOCAyOSAzMAoKW2FrYW5rc2hhOi9ob21lL3NhdnJpXSUgY2FsIDEyIDIwMDIK
ICAgRGVjZW1iZXIgMjAwMgogUyAgTSBUdSAgVyBUaCAgRiAgUwogMSAgMiAgMyAgNCAgNSAgN
iAgNwogOCAgOSAxMCAxMSAxMiAxMyAxNAoxNSAxNiAxNyAxOCAxOSAyMCAyMQoyMiAyMyAyNC
AyNSAyNiAyNyAyOAoyOSAzMCAzMQo=
-------------------------------abcdefghij--