API Spotlight: Glip Calendar Events API

Pawan Venugopal
RingCentral Developers
5 min readAug 15, 2018
The RingCentral Glip Calendar Events API

Glip’s shared calendar is a popular way for users to manage team events and schedule tasks. Unlike personal appointment calendars like the one most of us keep in Outlook and Google, Glip Calendar is a shared calendar, used for viewing events that are relevant to the whole team. Glip tasks are also displayed according to their deadline, letting you to see at a glance which ones have and have not been checked off as complete. You can view tasks and events from all your teams or filter to show just the events for a specific team. We are now happy to introduce Glip Events API, that allow developers to create, update and delete calendar events.

Use Cases

Some common use cases the shared calender events can be used are:

  1. Creating a project plan that can be shared across team members and what tasks are assigned to users.
  2. Mapping out vacation scheduled, so people are aware who is in office and not many people are off at the same time.
  3. Planning out a big events like conference, and the shared calendar helps you plan the lineup of keynote speakers, panel discussions and lunch breaks.

Glip Calendar Events API Overview

It’s easy to get a quick overview of the Calendar Events API with a few steps:

  • Step 1: User should first have a free RingCentral developer account to use the Events APIs. If you don’t have one, you can signup for a new account here.
  • Step 2: Follow the steps in the Getting Started Guide to create a new app. Since its a sample app, select the platform type as “Server only” and add the following permissions — Glip and SubscriptionWebhooks
  • Step 3: Make API Calls — We will use cURL to demonstrate how to use the Glip Events API.

The following will be covered:

  • Creating calendar events
  • Listing events for a user
  • Listing events for a group
  • Updating an event
  • Deleting an event

Create Calendar Events

To create a calendar event we will use postman for demonstration:

curl -X POST \
https://platform.ringcentral.com/restapi/v1.0/glip/groups/16799145986/posts \
-H 'Accept: application/json' \
-H 'Authorization: Bearer Token' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: b052f42f-a2f3-4b6d-8b3b-1fb7d4384024' \
-d '{
"groupId": "16799145986",
"attachments": [ {
"type": "Event",
"title": "Testing Events API in Glip",
"startTime": "2018-08-09T13:00:00Z",
"endTime": "2018-08-11T15:00:00Z",
"color": "Green",
"endingCondition": "None"
} ]
}'

In the request above, the key property elements are:

  • groupID*: ( string) Id of the group where the events needs to be posted.
  • attachment[].type*: (string) Type of attachment. In our case its “Events”
  • attachment[].title*:(string) Event title
  • attachment[].startTime*: (datetime string) Event start date/time.
  • attachment[].endTime*: (datetime string) Event end date/time.
  • attachment[].allDay: (bool) Indicates whether event has some specific time slot or lasts for whole day(s). If true, time part of startTime and endTime should be truncated.
  • attachment[].recurrence: (Enum: None | Day | Weekday | Week| Month | Year ) Event recurrence settings. None for non-periodic events.
    Must be greater or equal to event duration: 1 day for Day and Weekday; 7 days for Week; 28 days for Month; 365 days for Year
  • attachment[].endingCondition:(None | Count | Date) Event ending condition
  • attachment[].endingAfter: (Integer) Count of iterations. For periodic events only.
  • attachment[].endingOn: (datetime string) Iterations end date for periodic events.
  • attachment[].color: (Enum: Black | Red | Orange | Yellow
    Green | Blue | Purple | Magenta
    ) Font Color.
  • attachment[].location (string): Event Location
  • attachment[].description (string): Description of Event

Note: * are required parameters.

You will receive a response like the following:

{
"id": "5204886110212",
"groupId": "16799145986",
"type": "TextMessage",
"text": null,
"creatorId": "1332997021",
"addedPersonIds": null,
"creationTime": "2018-08-09T20:42:14.781Z",
"lastModifiedTime": "2018-08-09T20:42:14.781Z",
"attachments": [
{
"id": "11354742798",
"type": "Event",
"creatorId": "1332997021",
"title": "Testing Events API in Glip",
"startTime": "2018-08-09T13:00:00Z",
"endTime": "2018-08-11T15:00:00Z",
"recurrence": "None",
"endingCondition": "None",
"color": "Green",
"allDay": false
}
],
"activity": null,
"title": null,
"iconUri": null,
"iconEmoji": null,
"mentions": null
}

List all Events for Current User:

This API will return the list of events for the authorized user.

curl -X GET \
https://platform.ringcentral.com/restapi/v1.0/glip/events \
-H 'Accept: application/json' \
-H 'Authorization: Bearer Token' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: 416bd3bd-98d2-4d89-a93f-64a7845c262d'

The response is an array of events similar to the events creation response object.

{
"records": [
{
"id": "11354742798",
"type": "Event",
"creatorId": "1332997021",
"title": "Testing Events API in Glip",
"startTime": "2018-08-09T13:00:00Z",
"endTime": "2018-08-11T15:00:00Z",
"recurrence": "None",
"endingCondition": "None",
"color": "Green",
"allDay": false
}
]
}

List all Events in a Glip Group

This API will return the list of events within a specific group.

curl -X GET \
https://platform.ringcentral.com/restapi/v1.0/glip/groups/16799145986/events \
-H 'Accept: application/json' \
-H 'Authorization: Bearer Token' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: 5cbe053b-6014-4161-b4bf-287d254ee53d'

Response:

The response is an array of events similar to the events creation response object.

{
"records": [
{
"id": "11354742798",
"type": "Event",
"creatorId": "1332997021",
"title": "Testing Events API in Glip",
"startTime": "2018-08-09T13:00:00Z",
"endTime": "2018-08-11T15:00:00Z",
"recurrence": "None",
"endingCondition": "None",
"color": "Green",
"allDay": false
}
]
}

Get a single event:

The API will return a single event based on the eventID.

curl -X GET \
https://platform.ringcentral.com/restapi/v1.0/glip/events/11354742798 \
-H 'Accept: application/json' \
-H 'Authorization: Bearer Token' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: 45f29dd6-5942-4df3-9de9-fb9bc0bd98a7'

Response:

The response is an array of events similar to the events creation response object.

{
"records": [
{
"id": "11354742798",
"type": "Event",
"creatorId": "1332997021",
"title": "Testing Events API in Glip",
"startTime": "2018-08-09T13:00:00Z",
"endTime": "2018-08-11T15:00:00Z",
"recurrence": "None",
"endingCondition": "None",
"color": "Green",
"allDay": false
}
]
}

Update an existing Event:

We can update existing event using the PUT request by providing an eventID. All attributes except event type can be updated.

{
"title": "Rock",
"startTime": "2017-08-01T13:00:00Z",
"endTime": "2017-08-01T13:00:00Z",
"allDay": false,
"location": "There"
}

As you can see, the title and other attributes have been update to the new values.

{
"id": "11354742798",
"type": "Event",
"creatorId": "1332997021",
"title": "Rock",
"location": "There",
"startTime": "2017-08-01T13:00:00Z",
"endTime": "2017-08-01T13:00:00Z",
"recurrence": "None",
"endingCondition": "None",
"color": "Green",
"allDay": false
}

Delete an Event:

This API will allow the user to delete a single event. The response obtained is a `HTTP 204 No Content`

curl -X DELETE \
https://platform.ringcentral.com/restapi/v1.0/glip/events/11354742798 \
-H 'Accept: application/json' \
-H 'Authorization: Bearer Token' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: a22a6bc7-8cff-453b-ac39-119253832036'
Response:
HTTP 204 No Content

Next Steps

To learn more about Glip visit: https://glip.com/ or our Developer Community at: https://devcommunity.ringcentral.com .

Please feel free to leave your comments and questions.

--

--