Changes: list

Stay organized with collections Save and categorize content based on your preferences.

Lists the changes for a user or shared drive. Try it now or see an example.

For more information, see the Changes and revisions overview.


HTTP request



Parameter name Value Description
Optional query parameters
driveId string The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.
includeCorpusRemovals boolean Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. (Default: false)
includeDeleted boolean Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. (Default: true)
includeItemsFromAllDrives boolean Whether both My Drive and shared drive items should be included in results. (Default: false)
includeLabels string A comma-separated list of IDs of labels to include in the labelInfo part of the response.
includePermissionsForView string Specifies which additional view's permissions to include in the response. Only 'published' is supported.
includeSubscribed boolean Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive are omitted from the result. (Default: true)
includeTeamDriveItems boolean Deprecated use includeItemsFromAllDrives instead. (Default: false)
maxResults integer Maximum number of changes to return. Acceptable values are 0 to 1000, inclusive. (Default: 100)
pageToken string The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.
spaces string A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.
startChangeId long Deprecated - use pageToken instead.
supportsAllDrives boolean Whether the requesting application supports both My Drives and shared drives. (Default: false)
supportsTeamDrives boolean Deprecated use supportsAllDrives instead. (Default: false)
teamDriveId string Deprecated use driveId instead.


This request requires authorization with at least one of the following scopes:


Some scopes are restricted and require a security assessment for your app to use them. For more information, see the authentication and authorization page.

Request body

Do not supply a request body with this method.


If successful, this method returns a response body with the following structure:

  "kind": "drive#changeList",
  "etag": etag,
  "selfLink": string,
  "nextPageToken": string,
  "newStartPageToken": string,
  "nextLink": string,
  "largestChangeId": long,
  "items": [
    changes Resource
Property name Value Description Notes
kind string This is always drive#changeList.
etag etag The ETag of the list.
nextPageToken string The page token for the next page of changes. This will be absent if the end of the changes list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.
largestChangeId long The current largest change ID.
items[] list The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
newStartPageToken string The starting page token for future changes. This will be present only if the end of the current changes list has been reached.


Note: The code examples available for this method do not represent all supported programming languages (see the client libraries page for a list of supported languages).


Uses the Java client library.


import java.util.ArrayList;
import java.util.List;

// ...

public class MyClass {

  // ...

   * Retrieve a list of Change resources.
   * @param service Drive API service instance.
   * @param startChangeId ID of the change to start retrieving subsequent
                          changes from or {@code null}.
   * @return List of Change resources.
  private static List<Change> retrieveAllChanges(Drive service,
      Long startChangeId) throws IOException {
    List<Change> result = new ArrayList<Change>();
    Changes.List request = service.changes().list();

    if (startChangeId != null) {
    do {
      try {
        ChangeList changes = request.execute();

      } catch (IOException e) {
        System.out.println("An error occurred: " + e);
    } while (request.getPageToken() != null &&
             request.getPageToken().length() > 0);

    return result;

  // ...



Uses the .NET client library.

using Google.Apis.Authentication;
using Google.Apis.Drive.v2;
using Google.Apis.Drive.v2.Data;

using System.Collections.Generic;
// ...

public class MyClass {

  // ...

  /// <summary>
  /// Retrieve a list of Change resources.
  /// </summary>
  /// <param name="service">Drive API service instance.</param>
  /// <param name="startChangeId">
  /// ID of the change to start retrieving subsequent changes from or null.
  /// </param>
  /// <returns>List of Change resources.</returns>
  public static List<Change> retrieveAllChanges(DriveService service,
      String startChangeId) {
    List<Change> result = new List<Change>();
    ChangesResource.ListRequest request = service.Changes.List();

    if (!String.IsNullOrEmpty(startChangeId)) {
      request.StartChangeId = startChangeId;
    do {
      try {
        ChangeList changes = request.Execute();

        request.PageToken = changes.NextPageToken;
      } catch (Exception e) {
        Console.WriteLine("An error occurred: " + e.Message);
        request.PageToken = null;
    } while (!String.IsNullOrEmpty(request.PageToken));
    return result;

  // ...


Uses the PHP client library.

 * Retrieve a list of Change resources.
 * @param Google_Service_Drive $service Drive API service instance.
 * @param String $startChangeId ID of the change to start retrieving subsequent
 *     changes from or NULL.
 * @return Array List of Google_Service_Drive_Change resources.
function retrieveAllChanges($service, $startChangeId = NULL) {
  $result = array();
  $pageToken = NULL;

  do {
    try {
      $parameters = array();
      if ($startChangeId) {
        $parameters['startChangeId'] = $startChangeId;
      if ($pageToken) {
        $parameters['pageToken'] = $pageToken;
      $changes = $service->changes->listChanges($parameters);

      $result = array_merge($result, $changes->getItems());
      $pageToken = $changes->getNextPageToken();
    } catch (Exception $e) {
      print "An error occurred: " . $e->getMessage();
      $pageToken = NULL;
  } while ($pageToken);
  return $result;


Uses the Python client library.

from apiclient import errors
# ...

def retrieve_all_changes(service, start_change_id=None):
  """Retrieve a list of Change resources.

    service: Drive API service instance.
    start_change_id: ID of the change to start retrieving subsequent changes
                     from or None.
    List of Change resources.
  result = []
  page_token = None
  while True:
      param = {}
      if start_change_id:
        param['startChangeId'] = start_change_id
      if page_token:
        param['pageToken'] = page_token
      changes = service.changes().list(**param).execute()

      page_token = changes.get('nextPageToken')
      if not page_token:
    except errors.HttpError, error:
      print 'An error occurred: %s' % error
  return result


Uses the JavaScript client library.

 * Retrieve a list of Change resources.
 * @param {Function} callback Function to call when the request is complete.
 * @param {String} startChangeId ID of the change to start retrieving subsequent
 *                               changes from or {@code null}.
function retrieveAllChanges(callback, startChangeId) {
  var retrievePageOfChanges = function(request, result) {
    request.execute(function(resp) {
      result = result.concat(resp.items);
      var nextPageToken = resp.nextPageToken;
      if (nextPageToken) {
        request ={
          'pageToken': nextPageToken
        retrievePageOfChanges(request, result);
      } else {
  var initialRequest;
  if (startChangeId) {
    initialRequest ={
      'startChangeId' : startChangeId
  } else {
    initialRequest =;
  retrievePageOfChanges(initialRequest, []);


Uses the Go client library.

import (

// AllChanges fetches all changes after a starting change
func AllChanges(d *drive.Service,
    startChangeId string) ([]*drive.Change, error) {
  var cs []*drive.Change
  pageToken := ""
  for {
    q := d.Changes.List()
    // If we have a pageToken set, apply it to the query
    if pageToken != "" {
      q = q.PageToken(pageToken)
    r, err := q.Do()
    if err != nil {
      fmt.Printf("An error occurred: %v\n", err)
      return cs, err
    cs = append(cs, r.Items...)
    pageToken = string(r.NextPageToken)
    if pageToken == "" {
  return cs, nil


Uses the Objective-C client library.

#import "GTLDrive.h"
// ...

+ (void)retrieveAllChangesWithService:(GTLServiceDrive *)service
                        startChangeId:(long long)startChangeId
                      completionBlock:(void (^)(NSArray *, NSError *))completionBlock {
  // The service can be set to automatically fetch all pages of the result. More information
  // can be found on <a href=""></a>.
  service.shouldFetchNextPages = YES;

  GTLQueryDrive *query = [GTLQueryDrive queryForChangesList];
  if (startChangeId != -1) {
    query.startChangeId =  startChangeId;
  // queryTicket can be used to track the status of the request.
  GTLServiceTicket *queryTicket =
    [service executeQuery:query
        completionHandler:^(GTLServiceTicket *ticket, GTLDriveChangeList *changes,
                            NSError *error) {
          if (error == nil) {
            completionBlock(changes.items, nil);
          } else {
            NSLog(@"An error occurred: %@", error);
            completionBlock(nil, error);

// ...

Try it!

Use the APIs Explorer below to call this method on live data and see the response.