공유 드라이브와 내 드라이브 API의 차이점
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
공유 드라이브는 내 드라이브와 다른 조직, 공유, 소유권 모델을 따릅니다. 따라서 공유 드라이브의 콘텐츠에는 일부 내 드라이브 작업이 허용되지 않습니다.
이 가이드에서는 files
및 changes
리소스의 공유 드라이브 관련 API 차이점을 설명합니다.
파일 리소스
files
리소스의 다음 필드는 공유 드라이브 내에 있는 파일에 대해서만 채워집니다.
hasAugmentedPermissions
: 이 파일에 직접 파일 액세스 권한이 부여된 사용자가 있는지 여부입니다.
capabilities/canAddFolderFromAnotherDrive
: 현재 사용자가 다른 드라이브 (다른 공유 드라이브 또는 내 드라이브)의 폴더를 이 폴더에 추가할 수 있는지 여부입니다.
capabilities/canDeleteChildren
: 현재 사용자가 이 폴더의 하위 요소를 삭제할 수 있는지 여부입니다.
capabilities/canMoveChildrenOutOfDrive
: 현재 사용자가 이 폴더의 하위 요소를 공유 드라이브 외부로 이동할 수 있는지 여부입니다.
capabilities/canMoveChildrenWithinDrive
: 현재 사용자가 공유 드라이브 내에서 이 폴더의 하위 요소를 이동할 수 있는지 여부입니다.
capabilities/canMoveItemWithinDrive
: 현재 사용자가 공유 드라이브 내에서 이 공유 드라이브 항목을 이동할 수 있는지 여부입니다.
capabilities/canReadDrive
: 현재 사용자에게 이 파일이 속한 공유 드라이브에 대한 읽기 액세스 권한이 있는지 여부입니다.
capabilities/canTrashChildren
: 현재 사용자가 이 폴더의 하위 요소를 휴지통으로 이동할 수 있는지 여부입니다.
driveId
: 파일이 있는 공유 드라이브의 ID입니다.
trashingUser
: 파일이 명시적으로 휴지통에 있는 경우 휴지통에 넣은 사용자입니다.
trashedTime
: 항목이 휴지통으로 이동된 시간입니다. 이전 Drive API v2를 사용하는 경우 이 필드의 이름은 trashedDate
입니다.
공유 드라이브 내에 있는 파일의 경우 다음 필드가 채워지지 않습니다.
permissions
: 공유 드라이브 액세스 제어 목록 (ACL)의 크기가 클 수 있으므로 권한이 파일의 일부로 반환되지 않습니다. 페이지네이션을 지원하는 permissions.list
메서드를 사용하여 공유 드라이브 또는 공유 드라이브 폴더 내 파일의 권한을 나열합니다.
owners
, ownerNames
, ownedByMe
: 공유 드라이브 내 파일은 개별 사용자가 아닌 공유 드라이브가 소유합니다.
folderColorRgb
: 폴더는 개별적으로 색상을 지정할 수 없습니다.
shared
: 공유 드라이브의 모든 항목이 공유됩니다.
writersCanShare
: 공유 드라이브에서는 역할별로 공유를 제한할 수 없습니다.
다음 필드는 사용자에게 항목에 대한 파일 액세스 권한이 부여된 경우에만 설정됩니다.
sharedWithMeDate
sharingUser
다음 필드는 공유 드라이브와 함께 사용할 때 특별히 고려해야 합니다.
parents.isRoot
: 이 필드는 내 드라이브 루트 폴더에만 true이고 공유 드라이브 최상위 폴더에는 false입니다.
parents
: 요청하는 사용자가 공유 드라이브의 구성원이 아니고 상위 항목에 액세스할 수 없는 경우 상위 항목이 상위 항목 목록에 표시되지 않습니다. 또한 최상위 폴더를 제외하고 파일이 공유 드라이브 내에 있는 경우 parents 목록에는 항목이 정확히 하나 포함되어야 합니다.
capabilities/canRemoveChildren
: capabilities/canDeleteChildren
또는 capabilities/canTrashChildren
를 사용합니다.
리소스 변경
공유 드라이브의 changes
리소스에서 다음 새 필드를 사용할 수 있습니다.
changeType
: 변경 유형입니다. 가능한 값은 file
, drive
입니다.
driveId
: 이 변경사항과 연결된 공유 드라이브의 ID입니다.
drive
: 업데이트된 공유 드라이브 상태입니다. changeType
이 drive
이고 사용자가 여전히 공유 드라이브의 구성원인 경우에 표시됩니다.
공유 드라이브와 콘텐츠를 동기화하거나 활동을 추적해야 하는 애플리케이션에는 추가 변경사항이 필요할 수 있습니다. 자세한 내용은 사용자 및 공유 드라이브의 변경사항 추적하기를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[],[],null,["# Shared drive versus My Drive API differences\n\nShared drives follow different organization, sharing, and ownership models from\na My Drive. As such, some My Drive operations\naren't permitted for content in a shared drive.\n\nThis guide outlines shared drive-specific API differences in the `files` and\n`changes` resources.\n\nFile resource\n-------------\n\nThe following fields in the [`files`](/workspace/drive/api/reference/rest/v3/files) resource are\nonly populated for files located within a shared drive:\n\n- `hasAugmentedPermissions`: Whether any users are granted file access directly on this file.\n- `capabilities/canAddFolderFromAnotherDrive`: Whether the current user can add a folder from another drive (a different shared drive or My Drive) to this folder.\n- `capabilities/canDeleteChildren`: Whether the current user can delete children of this folder.\n- `capabilities/canMoveChildrenOutOfDrive`: Whether the current user can move children of this folder outside of the shared drive.\n- `capabilities/canMoveChildrenWithinDrive`: Whether the current user can move children of this folder within the shared drive.\n- `capabilities/canMoveItemWithinDrive`: Whether the current user can move this shared drive item within the shared drive.\n- `capabilities/canReadDrive`: Whether the current user has read access to the shared drive to which this file belongs.\n- `capabilities/canTrashChildren`: Whether the current user can trash children of this folder.\n- `driveId`: The ID of the shared drive where the file is located.\n- `trashingUser`: If the file has been explicitly trashed, the user who trashed it.\n- `trashedTime`: The time that the item was trashed. If you're using the older Drive API v2, this field is called `trashedDate`.\n\nThe following fields aren't populated for files located within a shared drive:\n\n- `permissions`: Due to the potential size of shared drive access control lists (ACLs), permissions aren't returned as part of files. Use the `permissions.list` method, which supports pagination, to list permissions for a file within a shared drive or the shared drive folder.\n- `owners`, `ownerNames`, `ownedByMe`: Files within a shared drive are owned by the shared drive, not individual users.\n- `folderColorRgb`: Folders cannot be colored individually.\n- `shared`: All items in a shared drive are shared.\n- `writersCanShare`: It's not possible to restrict sharing by role in shared drives.\n\nThe following fields are only set when the user has been granted file access\npermissions on an item:\n\n- `sharedWithMeDate`\n- `sharingUser`\n\nThe following fields require special consideration when you use them with shared\ndrives:\n\n- `parents.isRoot`: This field is only true for the My Drive root folder; it's false for the shared drive top-level folder.\n- `parents`: A parent doesn't appear in the parents list if the requesting\n user isn't a member of the shared drive and doesn't have access to the\n parent. In addition, with the exception of the top level folder, the parents\n list must contain exactly one item if the file is located within a shared\n drive.\n\n | **Note:** If you're using the older Drive API v2:\n | - `shareable`: Deprecated. Use `capabilities/canShare`.\n | - `editable`: Deprecated. Use `capabilities/canEdit`.\n | - `copyable`: Deprecated. Use `capabilities/canCopy`.\n | - `canComment`: Deprecated. Use `capabilities/canComment`.\n | - `canReadRevisions`: Deprecated. Use `capabilities/canReadRevisions`.\n- `capabilities/canRemoveChildren`: Use `capabilities/canDeleteChildren` or\n `capabilities/canTrashChildren`.\n\nChange resource\n---------------\n\nThe following new fields are available in the\n[`changes`](/workspace/drive/api/reference/rest/v3/changes) resource for a shared drive:\n\n- `changeType`: The change type. Possible values are `file` and `drive`.\n- `driveId`: The ID of the shared drive associated with this change.\n- `drive`: The updated state of the shared drive. Present if the `changeType` is `drive` and the user is still a member of the shared drive.\n\nAdditional changes might be required for applications that need to sync content\nwith shared drives or track activity. For details, see [Track changes for users\nand shared drives](/workspace/drive/api/guides/about-changes).\n\nRelated topics\n--------------\n\n- [Files and folders overview](/workspace/drive/api/guides/about-files)\n- [Changes and revisions overview](/workspace/drive/api/guides/change-overview)"]]