The Activity API consists of the
DriveActivity resource, which
represents changes made to objects within a user's Google Drive, and the
query method, which allows you to retrieve
information about those changes.
Your app requests a user's activity data using the
query method. You can request activity
either for a specific Drive item or for everything contained underneath a Drive
folder. For a given request, you can choose to restrict the response by
constraints such as time range or type of action, and you
can choose to have the activity consolidated in the
response. See the Making Requests guide for more information.
The response to a request is a list of activities matching the given parameters,
where each activity is represented by a
DriveActivity is a collection of
Actions, each of which is
self-contained like an event, comprising an
ActionDetail (such as
Actor (such as
TeamDrive), and either a
DriveActivity also contains
summary information, such as the collected
Targets from all the actions, a unified
TimeRange, and either the most
important or representative
ActionDetail of the contained
See the Data Model guide for more information.
Some activity on Drive may not be reported when you use this API. Whether the Drive Activity API will report a given change to an object depends on whether the change, or information about the change, is visible to the user authenticated in your application.
This visibility is based on the permissions set for that object. For example, if an author shares a document in Drive, the activity history for that document will be visible to not only the creator, but also to the authenticated users with whom it was shared. And if the document is then made private again, users will see that the permissions were restricted and will see no further activity on the document.
To get the most out of the Drive Activity API, integrate your app with the Google Drive API first. To get started with the Drive Activity API, learn how to create a project and authorize requests. Or, dive right in and read about activities in the API reference.