0

Using Admin Directory API, I can retrieve the rooms details by making a call in Google Apps Script.

Using something like this:

var res = AdminDirectory.Resources.Calendars.list(calendarId);

Then going ahead to loop over it and retrieving the rooms.

Is it possible to find out all the events booked using the above rooms using Google Calendar API or Admin Directory API? Or is it just not possible?

Update: I tried this API where I typed in the resourceEmail as the calendarID and it works but somehow coding this in Google apps script gives error as not found or undefined - please see comments: https://developers.google.com/google-apps/calendar/v3/reference/events/list?apix=true

user5711693
  • 113
  • 5
  • 17
  • I tried this Calendar.Events.list(roomID,optionalArgs); where roomID is the resource email and optional arguments are optionalArgs = { timeMin: "2017-12-27T00:00:00+02:00", showDeleted: false, singleEvents: true, maxResults: 10, orderBy: 'startTime' }; I get an error "Not Found" - what does this error mean? – user5711693 Feb 01 '18 at 15:15
  • It means the event you're trying to fetch doesn't exist - nothing was found. Try playing with the official Calendar API [Events.list Try-it](https://developers.google.com/google-apps/calendar/v3/reference/calendarList/list#try-it). Also, make sure your timeMin, etc are valid. You can check the time format in [Events.insert](https://developers.google.com/google-apps/calendar/v3/reference/events/insert). – ReyAnthonyRenacia Feb 02 '18 at 15:01

0 Answers0