Community articleCalendar events GET9.0.1
Added by api wiki on October 23, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Gets events from a calendar on a Domino server.

 

Input
Method URI Description
GET /{database}/api/calendar/events Gets events from a calendar on a Domino server.
Name Type Optional Description
database
string No Path name of a database on the server relative to the data directory.
Name Type Optional Description
format
string Yes Requested format for the response. By default, the service returns the events in JSON format. To request iCalendar format, specify "format=icalendar".
since
date Yes The start time of the date range. If since is not specified, the default is the time of the request.
before
date Yes The end time of the date range. If before is not specified, the default is one year from the value of the since parameter.
count
number Yes Maximum number of events to return.The default count is 50 events.
start
number Yes Start index used for paging through large event feeds. The default start index is 0.
fields
string Yes Filters the fields (or properties) returned for each event. By default, all the available fields are returned. You use the fields parameter to reduce the amount of data returned. Example : fields=start,end
Output
Name Type Optional Description
Content-Range
string No Range of returned events.
Code Description
200
OK. Indicates that the request was handled successfully.
Examples
This request gets a list of events since 01 July 2013 and before 31 July 2013.
GET /mail/sdayrn.nsf/api/calendar/events?since=2013-07-01T00:00:00Z&before=2013-07-31T00:00:00Z

Response returned by the server
{
  "events": [
    {
      "href":"/mail/sdayrn.nsf/api/calendar/events/B0158BBBE291805900257BB100140A84-Lotus_Auto_Generated",
      "id":"B0158BBBE291805900257BB100140A84-Lotus_Auto_Generated",
      "summary":"Code review",
      "start": {
        "date":"2013-07-25",
        "time":"11:25:00",
        "utc":true
      },
      "end": {
        "date":"2013-07-25",
        "time":"11:45:00",
        "utc":true
      },
      "class":"public",
      "transparency":"opaque",
      "sequence":0,
      "x-lotus-summarydataonly": {
        "data":"TRUE"
      },
      "x-lotus-appttype": {
        "data":"0"
      }
    },
    {
      "href":"/mail/sdayrn.nsf/api/calendar/events/77DE07AFA67E221200257BB100137F19-Lotus_Auto_Generated",
      "id":"77DE07AFA67E221200257BB100137F19-Lotus_Auto_Generated",
      "summary":"Team building",
      "start": {
        "date":"2013-07-26",
        "time":"01:15:00",
        "utc":true
      },
      "end": {
        "date":"2013-07-26",
        "time":"01:45:00",
        "utc":true
      },
      "class":"public",
      "transparency":"opaque",
      "sequence":0,
      "x-lotus-summarydataonly": {
        "data":"TRUE"
      },
      "x-lotus-appttype": {
        "data":"0"
      }
    }
  ]
}
This request get a list of events in iCalendar format.
GET /mail/sdayrn.nsf/api/calendar/events?format=icalendar

Response returned by the server
BEGIN:VCALENDAR
X-LOTUS-CHARSET:UTF-8
VERSION:2.0
BEGIN:VEVENT
DTSTART:20130725T112500Z
DTEND:20130725T113500Z
TRANSP:OPAQUE
DTSTAMP:20130724T083841Z
SEQUENCE:0
CLASS:PUBLIC
SUMMARY:event1
UID:B0158BBBE291805900257BB100140A84-Lotus_Auto_Generated
X-LOTUS-SUMMARYDATAONLY:TRUE
X-LOTUS-APPTTYPE:0
END:VEVENT
BEGIN:VEVENT
DTSTART:20130726T011500Z
DTEND:20130726T014500Z
TRANSP:OPAQUE
DTSTAMP:20130724T083841Z
SEQUENCE:0
CLASS:PUBLIC
SUMMARY:event2
UID:77DE07AFA67E221200257BB100137F19-Lotus_Auto_Generated
X-LOTUS-SUMMARYDATAONLY:TRUE
X-LOTUS-APPTTYPE:0
END:VEVENT
END:VCALENDAR
This request gets a list of events. The response fields are filtered as specified by the field parameter.
GET /mail/sdayrn.nsf/api/calendar/events?field=start,summary

Response returned by the server
{
  "x-lotus-charset":  {
    "data":"UTF-8"
  },
  "events": [
    {
      "href":"/mail/sdayrn.nsf/api/calendar/events/B0158BBBE291805900257BB100140A84-Lotus_Auto_Generated",
      "id":"B0158BBBE291805900257BB100140A84-Lotus_Auto_Generated",
      "summary":"event1",
      "start": {
        "date":"2013-07-25",
        "time":"11:25:00",
        "utc":true
      },
      "x-lotus-summarydataonly": {
        "data":"TRUE"
      }
    },
    {
      "href":"/mail/sdayrn.nsf/api/calendar/events/77DE07AFA67E221200257BB100137F19-Lotus_Auto_Generated",
      "id":"77DE07AFA67E221200257BB100137F19-Lotus_Auto_Generated",
      "summary":"event2",
      "start": {
        "date":"2013-07-26",
        "time":"01:15:00",
        "utc":true
      },
      "x-lotus-summarydataonly": {
        "data":"TRUE"
      }
    }
   ]
}
This request gets a list of events starting at a specific index. The Content-Range header in the HTTP response will show like this: items 2-3, 2 is the start index and 3 is the end index.
GET /mail/sdayrn.nsf/api/calendar/events?start=2&count=2

Response returned by the server
{
  "events": [
    {
      "href":"/mail/sdayrn.nsf/api/calendar/events/B0158BBBE291805900257BB100140A84-Lotus_Auto_Generated",
      "id":"B0158BBBE291805900257BB100140A84-Lotus_Auto_Generated",
      "summary":"Code review",
      "start": {
        "date":"2013-07-25",
        "time":"11:25:00",
        "utc":true
      },
      "end": {
        "date":"2013-07-25",
        "time":"11:45:00",
        "utc":true
      },
      "class":"public",
      "transparency":"opaque",
      "sequence":0,
      "x-lotus-summarydataonly": {
        "data":"TRUE"
      },
      "x-lotus-appttype": {
        "data":"0"
      }
    },
    {
      "href":"/mail/sdayrn.nsf/api/calendar/events/77DE07AFA67E221200257BB100137F19-Lotus_Auto_Generated",
      "id":"77DE07AFA67E221200257BB100137F19-Lotus_Auto_Generated",
      "summary":"Team building",
      "start": {
        "date":"2013-07-26",
        "time":"01:15:00",
        "utc":true
      },
      "end": {
        "date":"2013-07-26",
        "time":"01:45:00",
        "utc":true
      },
      "class":"public",
      "transparency":"opaque",
      "sequence":0,
      "x-lotus-summarydataonly": {
        "data":"TRUE"
      },
      "x-lotus-appttype": {
        "data":"0"
      }
    }
  ]
}