Drive의 항목 변경사항을 추적해야 하는 Google Drive 앱의 경우 변경사항 컬렉션을 사용하면 변경사항을 효율적으로 감지할 수 있습니다. 이 컬렉션은 특정 시점 이후 항목이 변경된 경우에만 각 항목의 현재 상태를 제공하여 작동합니다.
Google Drive는 사용자 및 공유 드라이브별로 변경 로그를 유지합니다. 각각은 관심 있는 항목의 변경사항 기록을 보유합니다.
사용자에게 표시되는 모든 항목의 변경사항을 추적하려면 사용자 변경 로그와 사용자가 속한 모든 공유 드라이브의 변경 로그를 모두 재생해야 합니다.
변경 항목 사용 설정
변경사항 항목은 특정 시점의 파일 또는 공유 드라이브 상태를 나타냅니다. 변경사항은 버전 간의 델타를 제공하지 않습니다. 어떤 속성이 변경되었는지 알아야 하는 애플리케이션은 이전에 알려진 항목의 상태를 유지하고 비교해야 합니다.
변경사항은 항목의 현재 상태를 나타내므로 개별 변경사항 항목이 무효화되고 해당 항목의 최신 변경사항 항목으로 대체될 수 있습니다.
Tombstone
사용자가 더 이상 사용할 수 없는 항목의 변경사항 항목은 변경사항 항목에서 deleted로 표시됩니다. 변경사항 항목에는 상품의 ID만 사용할 수 있습니다.
공유 드라이브 추적
각 공유 드라이브에는 자체 변경 로그가 있습니다. 사용자가 공유 드라이브의 멤버인 경우에도 특정 변경사항은 공유 드라이브 변경 로그에만 반영되고 사용자의 변경 로그에는 반영되지 않습니다. 파일이 공유 드라이브에 속하는 경우 과거에 사용자의 변경 로그에 파일이 표시되었더라도 사용자의 변경 로그만 재생하면 파일의 상태가 올바르게 업데이트되지 않습니다. 대신 공유 드라이브의 변경 로그를 재생하여 모든 변경사항을 캡처해야 합니다.
사용자의 변경 로그에 포함되는 항목
사용자의 변경 로그에는 사용자가 멤버로 속한 공유 드라이브의 변경사항과 사용자 말뭉치의 파일 변경사항이 포함됩니다. 코퍼스에 관한 자세한 내용은 변경사항 및 수정사항 개요를 참고하세요.
이러한 공유 드라이브 변경사항은 사용자의 변경 로그에 표시됩니다.
사용자가 공유 드라이브의 멤버가 됩니다.
사용자가 더 이상 공유 드라이브의 구성원이 아닙니다.
사용자가 회원인 공유 드라이브에 직접 관련된 변경사항이 있습니다. 예를 들면 다음과 같습니다.
해당 공유 드라이브에 대한 사용자의 액세스 수준이 변경되었습니다.
공유 드라이브의 이름이 변경됩니다.
사용자가 공유 드라이브의 멤버가 되면 공유 드라이브의 단일 변경 이벤트가 사용자의 변경 로그에 표시됩니다. 이는 공유 드라이브의 모든 항목에 대한 액세스를 의미합니다. 사용자가 멤버가 되면 공유 드라이브 내에 포함된 항목의 변경사항을 수신하지 않습니다.
공유 드라이브의 멤버는 사용량에 따라 공유 드라이브에 있는 항목의 변경 이벤트를 볼 수 있습니다. 하지만 사용자가 공유 드라이브의 멤버인 경우 애플리케이션은 이러한 이벤트를 사용하면 안 됩니다. 대신 공유 드라이브의 변경 로그를 사용하여 변경사항을 추적하세요.
비회원에게 공유 드라이브의 개별 항목에 대한 파일 액세스 권한이 부여되면 해당 항목의 변경사항이 사용자의 변경 로그에 추적됩니다. 이는 사용자와 직접 공유된 공유되지 않은 Drive 항목과 동일합니다.
공유 드라이브 변경사항 로그에 표시되는 변경사항
사용자가 공유 드라이브의 멤버인 경우 다음이 포함된 공유 드라이브의 변경 로그에 액세스할 수 있습니다.
구성원 추가 또는 삭제와 같은 공유 드라이브 자체의 변경사항
공유 드라이브에 포함된 항목을 직접 변경합니다.
권한 및 기능 동기화
공유 드라이브 또는 공유 드라이브 내 항목의 권한 변경사항은 항목 자체에만 반영됩니다. 해당 항목의 모든 직접 또는 간접 하위 요소는 이 변경사항을 상속하지만 이러한 항목 각각에 대한 별도의 항목은 변경 로그에 없습니다. 변경사항을 완전히 재구성하려면 상위 항목이 변경된 경우 클라이언트가 새 기능을 전파하거나 각 항목을 다시 가져와야 합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-04(UTC)"],[],[],null,["# Track changes for users and shared drives\n\nFor Google Drive apps that need to keep track of changes to items in Drive, the\n[Changes collection](/workspace/drive/api/reference/rest/v3/changes) provides an efficient way to\ndetect changes. The collection works by providing the current state of each\nitem, if and only if the item has changed since a given point in time.\n\nGoogle Drive keeps a change log for each user and shared drive. Each has\ntheir own record of changes to items that are of interest to them.\n\nTo track changes for *all* items visible to a user, both the user change log and the\nchange logs for all shared drives the user is a member of need to be replayed.\n\nEnable change entries\n---------------------\n\nA change entry represents the state of the file or shared drive at a given point\nin time. A change does not provide a delta between revisions. Applications\nthat need to know which properties have changed should persist the\npreviously known state of the item and compare.\n\nSince changes represent the current state of an item, individual change\nentries may be invalidated and replaced with a newer change entry for\nthe corresponding item.\n\nTombstones\n----------\n\nChange entries for items no longer available to a user are marked as `deleted`\nin the change entry. Only the ID of the item is available in the change entry.\n| **Note:** Because change logs are scoped to a user or shared drive, a deleted item may still physically exist and be accessible by other users. The change entry does not distinguish between loss of access and deletion. When a file moves between corpora it may also appear as a delete even though the user still retains access to the file. If querying change logs for multiple corpora, use the `includeCorpusRemovals` query parameter to disambiguate corpus moves from loss of access.\n\nTrack shared drives\n-------------------\n\nEach shared drive has its own change log. Even though a user may be a member\nof a shared drive, certain changes are only reflected in the shared drive change\nlog and never in the user's change log. If a file belongs to a shared drive,\neven if the file still appeared on the user's change log at some point in the\npast, replaying the user's change log alone won't correctly update the file's\nstatus. Instead you must replay the shared drive's change log to capture all\nchanges.\n\n### What is included in a user's change log\n\nA user's change log includes changes to shared drives they're a member of as well\nas changes to files in the user's corpus. For more information about corpora, see [Changes and revisions overview](/workspace/drive/api/guides/change-overview).\n\nThese shared drive changes appear on the user's change log:\n\n- The user becomes a member of a shared drive.\n- The user is no longer a member of a shared drive.\n- There is a directly relevant change to a shared drive in which the user is a member, for example:\n - The user's access level on that shared drive changed.\n - The shared drive is renamed.\n\nWhen a user becomes a member of a shared drive, a single change event\nfor the shared drive appears in the user's change log. This implies\naccess to all items in the shared drive. The user does not receive changes for\nitems contained inside the shared drive when they become a member.\n\nMembers of a shared drive *may* see change events for items in a shared drive based\non their usage. However, applications should not rely on these events when the\nuser is a member of the shared drive. Instead, use the shared drive's change log to\ntrack changes.\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's change log. This is the same\nas non-shared Drive items that are shared directly with users.\n\n### Changes that appear on a shared drive change log\n\nIf a user is a member of a shared drive, they can access that shared drive's change\nlog which contains:\n\n- Any changes to the shared drive itself, such as addition or removal of a member\n- Direct changes to the items contained in the shared drive.\n\n### Syncing permissions and capabilities\n\nPermission changes to shared drive or items inside a shared drive are only\nreflected on the item itself. While all direct or indirect children of that\nitem will inherit this change there will not be a separate entry in the change\nlog for each of those items. Clients must either\npropagate the new capabilities or refetch each item if a parent has\nchanged in order to fully reconstruct the changes."]]