0

I know how to use Google Drive API to watch user's activity with files. For that I create 'changes' objects with that url: drive/v3/changes/watch. But how to deal with Google Workspaces API? As an admin, I want to watch for all users' drives activities (adding new files, changing them). I'm as an admin, can get a list of users. And how I can watch all drives of all users in the Workspace?

goodgrief
  • 378
  • 1
  • 8
  • 23

1 Answers1

1

Use Google Workspace Admin SDK > Reports API

Specifically Method: activities.list on this API which allows you to retrieve all user activities given certain parameters, i.e.

Try API

https://developers.google.com/admin-sdk/reports/reference/rest/v1/activities/list?apix_params={"userKey":"all", "applicationName":"drive", "eventName":"edit", "startTime":"2021-02-22T10:26:35.000Z"}

Or

Request

GET https://admin.googleapis.com/admin/reports/v1/activity/users/all/applications/drive?eventName=edit&startTime=2021-02-22T10:26:35.000Z

The parameter eventName can be edit, add_to_folder, create, delete, ... among several events.

All Drive Audit Activity Events can be consulted here

Jose Vasquez
  • 1,678
  • 1
  • 6
  • 14