google-apigoogle-calendar-apigoogle-workspacegoogle-reporting-api

Is there a way to retrieve G Suite resources usage information per user?


In our organizational G Suite service, we defined rooms in "Building and Resources".

We schedule meetings in these rooms through Google Calendar.

Is it possible to get an organized report, that shows room usage per user? We would like to know which user used which room and for how many hours per time unit (month). Is there a way to get this information? An organized report? Any form of raw data?

We could only find general high-level data about the usage of each room, but no specific user data.


Solution

  • Issue:

    There's no built-in method to retrieve this information.

    If you think this feature could be useful, I'd suggest you to file a feature request on this Issue Tracker component.

    Workaround:

    Even though there's currently no direct method to retrieve an organized report for this, you could retrieve the information about how much a resource is being used by the different users, using Calendar API.

    You could do the following:

    1. A Calendar is created for each resource. This Calendar contains all events in which the resource is present (a resource can be added as an attendee for the event, or the event can be directly created on the resource calendar; either way, all events will be present in the resource calendar). Find the corresponding calendar ID by clicking Settings and sharing for the calendar, and scrolling to the section Integrate calendar.
    2. Call Events: list, setting the calendarId property to the ID you retrieved in previous step. This will return all events in which this resource has been used. You could also retrieve the events between a specific time interval, by specifying the properties timeMin and timeMax.
    3. Each event in this retrieved list will have information about: (1) the event attendees, including its organizer (check the attendees property on the Events resource), and (2) the event start and end time (check the properties start and end). With this information, you can know which users used each resource and for how much time. You'd just need to filter the events according to the attendees, and calculate the event durations using the start and end dates.
    4. Repeat steps 1 to 3 for each resource.

    Update:

    Feature request reported on Issue Tracker: