Content in Drive is organized in various collections based on the user's relationship with the content as well as it's storage location.
Each user has a "root" folder. The user's "My Drive" is their primary hierarchy, and consists of everything which is descended from this root folder.
Shared with me
The "Shared with me" category includes files owned and shared by others users which have been either: directly shared with the current user, a group containing the current user, or have been accessed by the current user.
A Team Drive is a type of organizational structure within Google Drive that lives parallel to My Drive. An individual file may be organized within a Team Drive or My Drive, but not both.
Spaces and corpora
In addition to per-user organizational structures, there are two additional organizational concepts used in the API. These are spaces and corpora.
Spaces are isolated storage spaces. Currently there are 3 defined spaces
- The default
drivespace includes all user-visible files created or stored in Google Drive. PDFs, Google Docs, Sheets, and slides, as well as any other content the user uploads is located in the
appDataFolderspace is a separate storage area for per-user application data. Applications typically store configuration files and other data not intended to be directly accessed by users.
- (DEPRECATED) The
photosspace includes all images and videos uploaded to Google Photos.
Files can not move between spaces.
Corpora, like spaces, represent different collections of items and are used to direct searches. Unlike spaces, they're not isolated storage. Files within a space may move freely from one corpus to another.
The corpora in the Drive API are:
defaultcorpus includes all files in "My Drive" and "Shared with me"
domaincorpus includes all files shared to the user's domain that are searchable.
teamDrivecorpus includes all files contained in a single Team Drive.
allTeamDrivescorpus includes all files in Team Drives that the user is a member of. Use of the
allTeamDrivescorpus is discouraged for efficiency reasons. Only valid when used with the
Files can move between corpora as permissions and ownership change.