Google Drive Activity API 소개
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Google Drive Activity API는 사용자의 Google Drive 내에서 객체에 적용된 변경사항을 나타내는 DriveActivity
리소스와 이러한 변경사항에 관한 정보를 검색할 수 있는 activity.query
메서드로 구성됩니다.
요청
앱이 activity.query
메서드를 사용하여 사용자의 활동 데이터를 요청합니다. 특정 Drive 항목 또는 Drive 폴더에 포함된 모든 항목에 대한 활동을 요청할 수 있습니다. 특정 요청에 대해 시간 범위나 활동 유형과 같은 제약 조건으로 대답을 제한할 수 있으며, 대답에서 활동을 통합하도록 선택할 수 있습니다. 자세한 내용은 Drive Activity API에서 요청하기를 참고하세요.
응답
요청에 대한 응답은 지정된 매개변수와 일치하는 활동 목록이며, 여기서 DriveActivity
리소스는 각 활동을 나타냅니다.
DriveActivity
리소스는 Action
객체의 모음이며, 각 객체는 이벤트와 같이 자체적으로 포함됩니다. Action
에는 ActionDetail
(예: Create
또는 Edit
), Actor
(예: User
또는 Administrator
), Target
(예: DriveItem
또는 Drive
) 및 Timestamp
또는 TimeRange
이 포함됩니다.
DriveActivity
리소스에는 모든 작업의 모든 Actor
및 Target
, 통합된 Timestamp
또는 TimeRange
, Action
의 가장 중요하거나 대표적인 ActionDetail
등 요약 정보도 포함됩니다.
자세한 내용은 Drive Activity API 데이터 모델을 참고하세요.
활동 내역 공개 상태
이 API를 사용하면 Drive의 일부 활동이 보고되지 않을 수 있습니다. Drive Activity API에서 객체에 대한 특정 변경사항을 보고하는지 여부는 변경사항 또는 변경사항에 관한 정보가 인증된 사용자에게 애플리케이션에 표시되는지 여부에 따라 달라집니다.
공개 상태는 객체에 설정된 권한을 기반으로 합니다. Drive에서 파일 및 폴더를 공유하는 데는 다음과 같은 여러 시나리오가 있습니다.
- 작성자가 문서를 공유하면 문서의 활동 기록이 작성자뿐만 아니라 인증된 사용자에게도 표시됩니다.
- 문서가 사용자와 공유된 후 비공개로 설정된 경우 인증된 사용자는 액세스 권한이 있었을 때의 모든 활동 내역과 현재 권한이 제한되어 있음을 확인할 수 있습니다.
- 문서가 사용자와 공유된 적이 없는 경우 사용자는 활동 기록을 볼 수 없습니다.
시작하기
Drive Activity API를 최대한 활용하려면 먼저 앱을 Google Drive API와 통합하세요. Drive Activity API를 시작하려면 프로젝트를 만들고 요청을 승인하는 방법을 알아보세요. 또는 바로 API 참조에서 활동에 관해 읽어보세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-04(UTC)
[null,null,["최종 업데이트: 2025-08-04(UTC)"],[],[],null,["# Introduction to Google Drive Activity API\n\nThe Google Drive Activity API consists of the\n[`DriveActivity`](/workspace/drive/activity/v2/reference/rest/v2/activity/driveactivity) resource, which\nrepresents changes made to objects within a user's Google Drive, and the\n[`activity.query`](/workspace/drive/activity/v2/reference/rest/v2/activity/query) method, which allows you to retrieve\ninformation about those changes.\n\nRequest\n-------\n\nYour app requests a user's activity data using the\n[`activity.query`](/workspace/drive/activity/v2/reference/rest/v2/activity/query) method. You can request activity\neither for a specific Drive item or for everything contained under a Drive\nfolder. For a given request, you can choose to restrict the response by\n[constraints](/workspace/drive/activity/v2/requests#filters) such as time range or action type, and you\ncan choose to have the activity [consolidated](/workspace/drive/activity/v2/requests#consolidation) in the\nresponse. For more information, see [Make requests in the Drive Activity API](/workspace/drive/activity/v2/requests).\n\nResponse\n--------\n\nThe response to a request is a list of activities matching the given parameters,\nwhere a\n[`DriveActivity`](/workspace/drive/activity/v2/reference/rest/v2/activity/driveactivity) resource represents each activity:\n\nA [`DriveActivity`](/workspace/drive/activity/v2/reference/rest/v2/activity/driveactivity) resource is a collection of\n[`Action`](/workspace/drive/activity/v2/reference/rest/v2/activity/action) objects, each of which is\nself-contained like an *event* . An `Action` includes an\n[`ActionDetail`](/workspace/drive/activity/v2/reference/rest/v2/activity/actiondetail) (such as `Create`\nor `Edit`), an [`Actor`](/workspace/drive/activity/v2/reference/rest/v2/activity/actor) (such as `User`\nor `Administrator`), a [`Target`](/workspace/drive/activity/v2/reference/rest/v2/activity/target) (such\nas `DriveItem` or `Drive`), and either a\n[`Timestamp`](/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp)\nor [`TimeRange`](/workspace/drive/activity/v2/reference/rest/v2/activity/timerange).\n\nA `DriveActivity` resource also contains\nsummary information, such as every\n`Actor` and\n`Target` from all the actions, a unified\n`Timestamp`\nor `TimeRange`, and either the most\nimportant or representative\n`ActionDetail` of the\n`Action`.\n\nFor more information, see the [Drive Activity API data model](/workspace/drive/activity/v2/datamodel).\n\nActivity history visibility\n---------------------------\n\nSome activity on Drive may not be reported when you use this API. Whether the\nDrive Activity API reports a given change to an object depends on whether\nthe change, or information about the change, is visible to the authenticated\nuser in your application.\n\nVisibility is based on the permissions set for the object. There's several\nscenarios when files and folders are shared in Drive:\n\n- If an author shares a document, the activity history for the document is visible to not only the creator, but also to the authenticated users with whom it was shared.\n- If a document was shared with a user and then made private, the authenticated user can see all activity history while they had access and that the permissions are now restricted.\n- If a document was never shared with a user, the user can't see any activity history.\n\nGet started\n-----------\n\nTo get the most out of the Drive Activity API, integrate your app with the\n[Google Drive API](/workspace/drive/api) first. To get started with the Drive Activity API,\nlearn how to [create a project](/workspace/drive/activity/v2/guides/project) and\n[authorize requests](/workspace/guides/configure-oauth-consent). Or, dive right in and read\nabout activities in the\n[API reference](/workspace/drive/activity/v2/reference/rest/v2/activity)."]]