Google Drive Activity API

The Google Drive Activity API lets your app retrieve information about a user's Google Drive activity. 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 Google Drive 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.

API Overview

The Activity API consists of the Activity resource, which represents changes made to objects within a user's Google Drive, and the list method, which allows you to retrieve information about those changes.

Whether the Drive Activity 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.

The Activity resource represents a change as an Event, of which there are two types: a combinedEvent object, and a singleEvents list.

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 singleEvents list. A 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.

Getting Started

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, setup a client library, and authorize requests. Or, dive right in and read about events in the API reference.

Kirim masukan tentang...

Google Drive Activity API
Butuh bantuan? Kunjungi halaman dukungan kami.