Calendar tools of nshdomapi (read only, built 2026-11-22)
Two tools read the calendar of a mail file as JSON or iCalendar:
calendar-list: entries that START in a range. Arguments: from, to (ISO 8601) or days (default: from now, 7 days, max 366), limit (1-500), cursor (the nextCursor of the last answer), mailFile (optional, see below). The answer has own (true for your own calendar) and nextCursor.
calendar-get: one entry by uid, optional recurrenceId (ISO, for one occurrence of a series), format = json (default) or ics (own calendar only), optional mailFile.
Without mailFile you read the calendar of your own mail file. With mailFile you read another one, if the policy allows it and your ACL in that file allows it. Private and confidential entries of another person show when, but not what (masked). Not built yet: free/busy, creating and changing entries, invitations, contacts, tasks.
Why OpenCode got 'not allowed'
The calendar is off by default. The answer 403 forbidden: reading the calendar is not allowed by the policy of this server (email.calendar) means the policy switch email.calendar is not set. It is its own switch (email.read does not count), so someone can read mail without the calendar and the other way round.
How to switch it on (admin of the server)
- Token: the scope
domapi:read is enough for the calendar (the class of the tools is read).
- Policy file of the task (
/etc/nshdomapi/policy.json, see POLICY.md): add to the section email:
"email": {
"calendar": true,
"calendarOthers": []
}
calendarOthers is the list of mail files whose calendar may be read besides your own (names, wildcards, folders: mail/j*.nsf, team/; no regular expressions). Empty or missing: nobody else's calendar.
- Reload the policy (or restart the task) and check with
policy-check / the console summary: it says calendar on.
Docs: API.md chapter Calendar, POLICY.md section The section email (rows calendar, calendarOthers).
Open lab checks
Character set of the text, the X-LOTUS property names, whether CalReadEntry takes a UNID, a series with a moved occurrence. If you see something odd, post it here.