GET/users/{userId}/calendar

Gets shared properties of a specified user's default calendar.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

calendar
calendar.read

HTTP Request

GEThttps://www.worksapis.com/v1.0/users/{userId}/calendar

Path Parameters

ParameterTypeDescription
userId string 

User ID


required
example : userf7da-f82c-4284-13e7-030f3b4c756x 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Response

HTTP 200

OK

PropertyTypeDescription
calendarId string 

Calendar ID


required 
calendarName string 

Calendar name


required
maxLength : 50 
members array (CalendarMember) 

List of users


required
minItems : 0
uniqueItems : true 
description string 

Calendar description

 
isPublic boolean 

Default : false
Indicates whether the calendar is public.

 
calendarEmail string 

Calendar's unique email address.
It is used as the value of the organizer, which is required to create an appointment event in a shared calendar.
Example)
"organizer": { "email": "{calendarEmail}" }

 
type string 

Calendar type


Allowed values : DOMAIN, INDIVIDUAL, GROUP, ORGUNIT, MESSAGE
readOnly : true 

CalendarMember

PropertyTypeDescription
id string 

user, group, orgunit unique id


required 
type string 

Member type

  • USER: Individual user
  • GROUP: Group
  • ORGUNIT: Team

required
Allowed values : USER, GROUP, ORGUNIT 
role string 

Calendar roles

  • CALENDAR_EVENT_READ_WRITE: Calendar and events management
  • EVENT_READ_WRITE: Manage events
  • EVENT_READ: Inquire event details
  • EVENT_READ_FREE_BUSY: Show only the time of the event

required
Allowed values : CALENDAR_EVENT_READ_WRITE, EVENT_READ_WRITE, EVENT_READ, EVENT_READ_FREE_BUSY 

Response Example

example

1{2  "calendarName": "calendar",3  "description": "memo",4  "members": [5    {6      "id": "member1@example.com",7      "type": "USER",8      "role": "CALENDAR_EVENT_READ_WRITE"9    },10    {11      "id": "member2@example.com",12      "type": "USER",13      "role": "EVENT_READ_WRITE"14    }15  ],16  "calendarEmail": "calendar-96b8-4c74-8277-7953e0b4604a@jp1-groups.example.com",17  "calendarId": "calendar-96b8-4c74-8277-7953e0b4604a",18  "isPublic": true,19  "type": "INDIVIDUAL"20}

HTTP 403

Forbidden

HTTP 404

Not Found