Sun Java System Calendar Server 6 2005Q4 Developer's Guide

Command: get_calprops

Purpose

Retrieve calendar properties.

Parameters

Table 7–18 get_calprops Parameters

Parameter  

Type  

Purpose  

Required  

Default  

calid

semicolon-separated list of strings 

Semicolon-separated list of calendar identifiers from which to retrieve properties. 

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

fmt-out

string 

The format for the returned data. 

Two format types: 

text/calendar

text/xml

text/calendar

id

unique identifier string 

The session identifier. 

N/A 

invitecount

integer (0, 1)

1 = Requests the server to return the open invitations count, that is, events where PARSTAT=needs-action. The integer count is returned in the X-Token X-S1CS-CALPROPS-INVITATION-COUNT.

if more than one calid is specified in the calid parameter, the open invitation count for each calendar is returned in the corresponding iCal or iCal XML block.

0 = Count not requested.

0

invitecount

integer (0, 1)

0 = Do not return a count of the open invitations, meaning events and todos where PARTSTAT=needs-action).

1 = Returns the count of open invitations in X-S1CS-CALPROPS-INVITATION-COUNT

If more than one calid is specified, the open invitation count for each calendar is returned in the corresponding iCal or XML block. 

0

Description

Use this command to retrieve the calendar properties for the specified calendars.

Returns

The command returns a page with the following X-Tokens containing property information for the specified calendars:

Error Codes

If the calendar exists, but the user does not have READ access to it, errno is set to FAILED: ACCESS_DENIED_TO_CALENDAR (28).

If the fetch fails for any calendar, its error number, errno, is set to FAILED: GET_CALPROPS_FAILED (20).

Example

In the following example, you want to retrieve the calendar properties for the calendars jdoe, jsmith, and susan, in that order.

This is the URL:

http://calendarserver/get_calprops.wcap
                     ?id=2mu95r5so0hq68ts6q3
                     &calid=jdoe;jsmith;susan
                     &fmt-out=text/calendar

This is the returned data:

BEGIN:VCALENDAR
PRODID:-//SunJavaSystem/Calendar Hosting Server//EN
METHOD:PUBLISH
VERSION:2.0
X-NSCP-CALPROPS-LAST-MODIFIED:20030415T001028Z
X-NSCP-CALPROPS-CREATED:20030415T001028Z
X-NSCP-CALPROPS-READ:999
X-NSCP-CALPROPS-WRITE:999
X-NSCP-CALPROPS-RELATIVE-CALID;X-S1CS-EMAIL=room1a@netscape.com:Room1A
X-NSCP-CALPROPS-NAME:Galaxy
X-NSCP-CALPROPS-PRIMARY-OWNER:calmaster
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^rsf^g
X-NSCP-CALPROPS-RESOURCE:1
X-S1CS-CALPROPS-ALLOW-DOUBLEBOOKING:1
X-S1CS-CALPROPS-FB-INCLUDE:1
X-S1CS-CALPROPS-COMMON-NAME: Calendar Master
X-S1CS-CALPROPS-INVITATION-COUNT: 3
X-NSCP-WCAP-ERRNO:0
END:VCALENDAR