The Apps Activity API lets your app retrieve information about a user's G Suite activity. Currently, the API supports retrieving activity from the Google Drive service about changes to a user's Google Drive files. This provides additional functionality on top the existing Drive API for your app to do things like:
- Display activity on a user's files.
- Track changes to specific files or folders.
- Alert a user to new comments or changes to files.
Who is this API useful for?
The Apps Activity API is useful for developers whose applications are already integrated with Google Drive and need to track or display changes to a user's Google Drive files. If you are new to developing with Google services or your app is not currently integrated with Google Drive, and would like a good place to get started, try the Google Drive API. If you were looking for information about G Suite, check out the G Suite overview.
The Activity API consists of the
Activity resource, which represents changes made to
objects within a user's Google Drive, and the
method, which allows you to retrieve information about those changes.
Whether the Apps Activities API can see 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.
Activity resource represents a change as an
of which there are two types:
combinedEvent object, and a
singleEvents list contains all of the individual changes that
are required to complete the change initiated by a user. For example, if a user
creates a file in Google Drive, this action may include events related to
changing permissions, edits to the content, or other events as part of the
file-creation process—all of which are captured in the
combinedEvent represents the net change, or end result of
the events in a
singleEvents list by capturing the common set of
fields shared by all items in a
singleEvents or fields that are
otherwise related. This can include file-creation events, or more complex actions
such as when a user moves multiple files in a single operation, or makes multiple
edits to a file within a short span of time.
To get the most out of the Apps Activity API, integrate your app with the Google Drive API first.