追跡する変更ログを特定する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ユーザーと共有ドライブの変更ログについては、変更とリビジョンの概要で説明しています。このガイドでは、個々の変更ログ エントリの詳細と、ユーザーの変更ログまたは共有ドライブの変更ログで変更を追跡するタイミングに関するヒントについて説明します。
ファイルが共有ドライブに移動された後のエントリを変更する
ファイルを共有ドライブに移動すると、そのファイルの変更ログはユーザーの変更ログではなく、共有ドライブの変更ログに記録されるようになります。次に、共有ドライブの変更ログをクエリして、そのアイテムに対する新しい変更を検出します。
共有ドライブ内の個々のアイテムのエントリを変更する
共有ドライブ内の個々のアイテムに対するファイル アクセス権がメンバー以外のユーザーに付与された場合、それらのアイテムに対する変更は、共有ドライブの変更ログではなく、ユーザーの変更ログに記録されます。この動作は、ユーザーと直接共有されている共有ドライブ以外のアイテムと同じです。
アクセス権限を失った場合のエントリを変更する
ユーザーがファイルへのアクセス権を失った場合、変更ログのエントリには deleted
と表示されます。ただし、ファイルへのアクセス権がまだある他のユーザーは、引き続きファイルにアクセスできます。すべてのユーザーに対してアイテムが削除されると、すべてのユーザーの変更ログで deleted
とマークされます。
ファイルがユーザー コーパス間で移動すると、ユーザーがファイルへのアクセス権を保持していても、deleted
と表示されることがあります。複数のコーパスの変更ログをクエリする場合は、Changes.list の includeCorpusRemovals
パラメータを使用して、コーパスの移動とアクセス権の喪失を区別します。さまざまなコーパスの定義については、ファイルとフォルダの概要をご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-04 UTC。
[null,null,["最終更新日 2025-08-04 UTC。"],[],[],null,["# Identify which change log to track\n\nThe user and shared drive change logs are defined in the [Changes and revisions overview](/workspace/drive/api/guides/change-overview). This guide provides more information about individual change log entries and tips for when to track changes in either the user change log or the shared drive change log.\n\nChange entry after file moves to a shared drive\n-----------------------------------------------\n\nAfter a file is moved to a shared drive, that shared drive change log continues logging changes for that file, not the user change log. You should then query the shared drive change log to detect new changes to that item.\n\nChange entry for individual items in a shared drive\n---------------------------------------------------\n\nIf a non-member is granted file access to individual items in a shared drive,\nchanges to those items are tracked in the user change log, not the shared drive change log. This behavior is the same as non-shared drive items that are shared directly with users.\n\nChange entry for lost access permission\n---------------------------------------\n\nIf a user loses access permission to a file, the change log entry will say `deleted`.\nHowever, the file is still available to other users who still have permission to access the file. If the item is deleted for all users, it will get marked `deleted` in all user change logs.\n\nWhen a file moves between user corpora it may also appear `deleted` even though the user still retains access to the file. If you query change logs for multiple corpora, use the `includeCorpusRemovals` parameter in [Changes.list](/workspace/drive/api/reference/rest/v3/changes/list) to disambiguate corpus moves from loss of access.\nFor definitions of different corpora, see [Files and folders overview](/workspace/drive/api/guides/about-files)."]]