api:pbx:calendar:list
Table of Contents
API : PBX : Calendar list
Request
This request returns an employees calendar events.
The calendar is primarily used as a local sync'ed cache for Microsoft 365 calendar integration, and as such only holds event from 7 days ago to 31 days into the future. SeriesMaster events for recurring events are not cached, only the occurrences.
Calendar events are personal, but other employees can be given readCalendar and/or writeCalendar permissions through PBX groups.
| URL | https://api.telecomx.dk/pbx/calendar | |
|---|---|---|
| Method | GET | |
| Access level | PERSONAL VIEWER, MANAGE, OWNER if employee self or if granted readCalendar via PBX groups RESELLER, RESELLER_ADMIN and ADMIN has no access. |
|
| Query | offset | [optional] Index of the first item to return, default 0. |
| limit | [optional] The number of items to return, default 50, min 1, max 10000. |
|
| filter | [optional] Search query that will match against the subject fields. |
|
| employee | [optional] Id of employee, defaults to the user self. |
|
Query examples
https://api.telecomx.dk/pbx/calendar https://api.telecomx.dk/pbx/calendar?limit=20&offset=100 https://api.telecomx.dk/pbx/calendar?filter=meeting https://api.telecomx.dk/pbx/calendar?employee=1234567890123457890ABCD
Response
| JSON object | |
|---|---|
| offset | Index of the first calendar event returned. |
| limit | Number of calendar events to return. Note that the actual number of returned calendar event may be lower. |
| total | Number of calendar events that can be returned when offset and limit is not considered. This is to be used for paging through the data. |
| events | Array of calendar events, see definition below. |
| Calendar event object | ||
|---|---|---|
| _id | Id | Unique id of the calendar event. |
| externalId | String | External ID, can be used to reference events from another system. |
| customer | Id | Id of the customer. |
| employee | Id | Id of the employee the event belongs to. |
| subject | String | Subject. |
| body | Object | Body. |
| body.content | String | Body content. |
| body.type | String | Type of body: html or text. |
| body.preview | String | Textual preview of the body. |
| start | Date | Start |
| end | Date | End |
| isAllDay | Boolean | True if event is all day. |
| importance | String | Event importance: low, normal, high |
| type | String | Type of event: singleInstance - single event, occurrence - occurrence of a series, exception - exception from a series, seriesMaster - recurring series of events. |
| seriesMasterId | String | Id of the series master. Only applies for types occurrence and exception. |
| showAs | String | State of employee during event: unknown, free, tentative, busy, oof, workingElsewhere. |
| sensitivity | String | Sensitivity: normal - all may view, personal - marked as non-work, private - non-work visible to owner only, confidential - work, visible to owner only. |
| isCancelled | Boolean | True if cancelled. |
| isOnlineMeeting | Boolean | True if this is an online meeting. |
| onlineMeetingJoinUrl | String | If this is an online meeting (teams) this is the url to join the meeting. |
| isOrganizer | Boolean | True if employee has created this event. |
| isReminderOn | Boolean | True if a reminder for this event is enabled. |
| reminderMinutesBeforeStart | Number | Number of minutes to be reminded before start. |
| created | Date | When it was created. |
| lastModified | Date | When it was last modified. |
| location | Object | Location data. |
| location.displayName | String | Optional name of location. |
| location.emailAddress | String | Optional email address of the location. |
| location.address | Object | Optional address of the location. |
| location.address.street | String | Street. |
| location.address.zip | String | Zip. |
| location.address.city | String | City. |
| location.address.state | String | State. |
| location.address.country | String | Country. |
| recurrence | Object | Recurrence settings |
| recurrence.pattern | Object | Recurrence pattern |
| recurrence.pattern.dayOfMonth | Number | day of month the event occurs or null, if type=absoluteMonthly,absoluteYearly. |
| recurrence.pattern.daysOfWeek | Array | Days of the week the event occurs or null: sunday, monday, tuesday, wednesday, thursday, friday, saturday, if type=weekly,relativeMonthly,relativeYearly. |
| recurrence.pattern.firstDayOfWeek | String | First day of week, if type=weekly. |
| recurrence.pattern.index | String | which instance of allow days in daysOfWeek, counted from start of month to invoke: first, second, third, fourth, last, if type=relativeMonthly,relativeYearly. |
| recurrence.pattern.interval | Number | The number of units between occurrences, where units can be in days, weeks, months, or years, depending on the type. |
| recurrence.pattern.month | Number | The month in which the event occurs. This is a number from 1 to 12. |
| recurrence.pattern.type | String | daily, weekly, absoluteMonthly, relativeMonthly, absoluteYearly, relativeYearly. |
| recurrence.range | Object | Recurrence range |
| recurrence.range.endDate | Date | Last date it may occur. |
| recurrence.range.numberOfOccurrences | Number | Number of occurrences, if range-type=numbered. |
| recurrence.range.startDate | Date | Must be same as start of master event. |
| recurrence.range.type | String | endDate, noEnd, numbered. |
| attendees | Array | List of attendees |
| attendees[].type | String | required, optional, resource. |
| attendees[].emailAddress | String | email address. |
| attendees[].name | String | Name of attendee. |
| attendees[].statusResponse | String | Status response: none, organizer, tentativelyAccepted, accepted, declined, notResponded. |
| attendees[].statusTime | Date | When attendee responded. |
| statusResponse | String | Users response to an invite for this event: none, organizer, tentativelyAccepted, accepted, declined, notResponded. |
| statusTime | Date | When user responded to the invite. |
| categories | Array | Optional list of names of categories the event is tagged with. |
Example - normal
{ "offset": 0, "limit": 50, "total": 25, "events": [ { "_id":"12345678901234567890ABCD", "externalId": "MS365-sfhu3hfnbjob3u09ihfionbuoeh0hcnonboeunonsc", "customer": "12345678901234567890AAAA", "employee": "12345678901234567890BBBB", "subject": "My event", "body": { "content": "<b>this</b> is the message body", "type": "HTML", "preview": "this is the message body" }, "start": "2024-01-01T00:00:00.000Z", "end": "2024-01-01T01:00:00.000Z", "isAllDay": false, "importance": "normal", "type": "singleInstance", "seriesMasterId": null, "showAs": "busy", "sensitivity": "normal", "isCancelled": false, "isOnlineMeeting": false, "onlineMeetingJoinUrl": "", "isOrganizer": true, "isReminderOn": true, "reminderMinutesBeforeStart": 15, "created": "2024-01-01T00:00:00.000Z", "lastModified": "2024-01-01T00:00:00.000Z", "location": { "displayName": "Restaurant Beef", "emailAddress": "location@mail.com", "address": { "street": "Main street 24", "zip": "1234", "city": "Copenhagen", "state": null, "country": "Danmark" } }, "recurrence": { "pattern": { "dayOfMonth": null, "daysOfWeek": [ "monday","tuesday" ], "firstDayOfWeek": "monday", "index": "first", "interval": 2, "month": null, "type": "absoluteMonthly" }, "range": { "endDate": "2024-06-01T00:00:00.000Z", "numberOfOccurrences": null, "startDate": "2024-01-01T00:00:00.000Z", "type": "endDate" } }, "attendees": [ { "type": "required", "emailAddress": "user1@telecomx.dk", "name": "User 1", "statusResponse": "accepted", "statusTime": "2024-01-01T00:00:00.000Z" }, { "type": "required", "emailAddress": "user2@telecomx.dk", "name": "User 2", "statusResponse": "declined", "statusTime": "2024-01-01T00:02:00.000Z" } ], "statusResponse": "accepted", "statusTime": "2024-01-01T00:00:00.000Z", "categories": [ "Internal meeting", "Coffee", "Buns" ] } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | customer | Customer not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/pbx/calendar/list.txt · Last modified: 2025/01/14 12:45 by Per Møller