blob: fed6faed083096d5d30e5671764aae189558affb [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="drive_v2.html">Drive API</a> . <a href="drive_v2.files.html">files</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#copy">copy(fileId, body, supportsTeamDrives=None, pinned=None, ocrLanguage=None, ocr=None, visibility=None, timedTextTrackName=None, convert=None, supportsAllDrives=None, timedTextLanguage=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040079<p class="firstline">Creates a copy of the specified file.</p>
80<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#delete">delete(fileId, supportsTeamDrives=None, supportsAllDrives=None)</a></code></p>
82<p class="firstline">Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
Craig Citro065b5302014-08-14 00:47:23 -070084 <code><a href="#emptyTrash">emptyTrash()</a></code></p>
85<p class="firstline">Permanently deletes all of the user's trashed files.</p>
86<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070087 <code><a href="#export">export(fileId, mimeType)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070089<p class="toc_element">
90 <code><a href="#export_media">export_media(fileId, mimeType)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070092<p class="toc_element">
Takashi Matsuo06694102015-09-11 13:55:40 -070093 <code><a href="#generateIds">generateIds(space=None, maxResults=None)</a></code></p>
94<p class="firstline">Generates a set of file IDs which can be provided in insert requests.</p>
95<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <code><a href="#get">get(fileId, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080097<p class="firstline">Gets a file's metadata by ID.</p>
98<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099 <code><a href="#get_media">get_media(fileId, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400100<p class="firstline">Gets a file's metadata by ID.</p>
101<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102 <code><a href="#insert">insert(body=None, supportsTeamDrives=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, visibility=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, timedTextLanguage=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400103<p class="firstline">Insert a new file.</p>
104<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700105 <code><a href="#list">list(orderBy=None, projection=None, supportsTeamDrives=None, spaces=None, q=None, pageToken=None, corpus=None, maxResults=None, teamDriveId=None, includeItemsFromAllDrives=None, includeTeamDriveItems=None, corpora=None, supportsAllDrives=None, driveId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400106<p class="firstline">Lists the user's files.</p>
107<p class="toc_element">
108 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700111 <code><a href="#patch">patch(fileId, body, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, pinned=None, ocrLanguage=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400112<p class="firstline">Updates file metadata and/or content. This method supports patch semantics.</p>
113<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 <code><a href="#touch">touch(fileId, supportsTeamDrives=None, supportsAllDrives=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400115<p class="firstline">Set the file's updated time to the current server time.</p>
116<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 <code><a href="#trash">trash(fileId, supportsTeamDrives=None, supportsAllDrives=None)</a></code></p>
118<p class="firstline">Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files.</p>
John Asmuth614db982014-04-24 15:46:26 -0400119<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 <code><a href="#untrash">untrash(fileId, supportsTeamDrives=None, supportsAllDrives=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400121<p class="firstline">Restores a file from the trash.</p>
122<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 <code><a href="#update">update(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400124<p class="firstline">Updates file metadata and/or content.</p>
125<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126 <code><a href="#watch">watch(fileId, body, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800127<p class="firstline">Subscribe to changes on a file</p>
128<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 <code><a href="#watch_media">watch_media(fileId, body, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400130<p class="firstline">Subscribe to changes on a file</p>
131<h3>Method Details</h3>
132<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133 <code class="details" id="copy">copy(fileId, body, supportsTeamDrives=None, pinned=None, ocrLanguage=None, ocr=None, visibility=None, timedTextTrackName=None, convert=None, supportsAllDrives=None, timedTextLanguage=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400134 <pre>Creates a copy of the specified file.
135
136Args:
137 fileId: string, The ID of the file to copy. (required)
138 body: object, The request body. (required)
139 The object takes the form of:
140
141{ # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400142 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -0400143 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -0700145 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
146 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800147 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -0400148 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700149 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800150 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000151 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800152 "hidden": True or False, # Deprecated.
153 "starred": True or False, # Whether this file is starred by the user.
154 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -0400155 },
156 "indexableText": { # Indexable text attributes for the file (can only be written)
157 "text": "A String", # The text to be indexed for this file.
158 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400159 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700160 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700161 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -0400162 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
164 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700165 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -0400166 "picture": { # The user's profile picture.
167 "url": "A String", # A URL that points to a profile picture of this user.
168 },
169 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400170 "displayName": "A String", # A plain text displayable name for this user.
171 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700172 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
173 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400174 },
175 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400177 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700178 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700179 "picture": { # The user's profile picture.
180 "url": "A String", # A URL that points to a profile picture of this user.
181 },
182 "kind": "drive#user", # This is always drive#user.
183 "displayName": "A String", # A plain text displayable name for this user.
184 "permissionId": "A String", # The user's ID as visible in the permissions collection.
185 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
186 "emailAddress": "A String", # The email address of the user.
187 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700188 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400189 "picture": { # The user's profile picture.
190 "url": "A String", # A URL that points to a profile picture of this user.
191 },
192 "kind": "drive#user", # This is always drive#user.
193 "displayName": "A String", # A plain text displayable name for this user.
194 "permissionId": "A String", # The user's ID as visible in the permissions collection.
195 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
196 "emailAddress": "A String", # The email address of the user.
197 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800199 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700200 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -0400201 "picture": { # The user's profile picture.
202 "url": "A String", # A URL that points to a profile picture of this user.
203 },
204 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400205 "displayName": "A String", # A plain text displayable name for this user.
206 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700207 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
208 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400209 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400210 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700211 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700212 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700213 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400214 "A String",
215 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400216 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400218 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700219 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
220 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
221 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
222 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
223 "canRename": True or False, # Whether the current user can rename this file.
224 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
225 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
226 "canChangeRestrictedDownload": True or False, # Deprecated
227 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
228 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
229 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
230 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
231 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
232 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
233 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
234 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
235 "canComment": True or False, # Whether the current user can comment on this file.
236 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
237 "canTrash": True or False, # Whether the current user can move this file to trash.
238 "canDelete": True or False, # Whether the current user can delete this file.
239 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
240 "canDownload": True or False, # Whether the current user can download this file.
241 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
242 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
243 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
244 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
245 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400246 },
John Asmuth614db982014-04-24 15:46:26 -0400247 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
248 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
249 "etag": "A String", # ETag of the file.
250 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700251 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -0400252 { # A reference to a file's parent.
253 "selfLink": "A String", # A link back to this reference.
254 "kind": "drive#parentReference", # This is always drive#parentReference.
255 "id": "A String", # The ID of the parent.
256 "isRoot": True or False, # Whether or not the parent is the root folder.
257 "parentLink": "A String", # A link to the parent.
258 },
259 ],
260 "exportLinks": { # Links for exporting Google Docs to specific formats.
261 "a_key": "A String", # A mapping from export format to URL
262 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700263 "shareable": True or False, # Deprecated: use capabilities/canShare.
264 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
265 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400266 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
267 "a_key": "A String",
268 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400269 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -0400270 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
271 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
272 "exposureTime": 3.14, # The length of the exposure, in seconds.
273 "cameraMake": "A String", # The make of the camera used to create the photo.
274 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
275 "isoSpeed": 42, # The ISO speed used to create the photo.
276 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
277 "exposureMode": "A String", # The exposure mode used to create the photo.
278 "colorSpace": "A String", # The color space of the photo.
279 "location": { # Geographic location information stored in the image.
280 "latitude": 3.14, # The latitude stored in the image.
281 "altitude": 3.14, # The altitude stored in the image.
282 "longitude": 3.14, # The longitude stored in the image.
283 },
284 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
285 "height": 42, # The height of the image in pixels.
286 "lens": "A String", # The lens used to create the photo.
287 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
288 "width": 42, # The width of the image in pixels.
289 "meteringMode": "A String", # The metering mode used to create the photo.
290 "flashUsed": True or False, # Whether a flash was used to create the photo.
291 "aperture": 3.14, # The aperture used to create the photo (f-number).
292 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
293 "sensor": "A String", # The type of sensor used to create the photo.
294 "whiteBalance": "A String", # The white balance mode used to create the photo.
295 "cameraModel": "A String", # The model of the camera used to create the photo.
296 },
297 "description": "A String", # A short description of the file.
298 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800299 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
300 "width": 42, # The width of the video in pixels.
301 "durationMillis": "A String", # The duration of the video in milliseconds.
302 "height": 42, # The height of the video in pixels.
303 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400304 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -0400305 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400306 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -0400307 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700308 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700309 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700310 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -0400311 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000312 { # A key-value pair attached to a file that is either public or private to an application.
313 # The following limits apply to file properties:
314 # - Maximum of 100 properties total per file
315 # - Maximum of 30 private properties per app
316 # - Maximum of 30 public properties
317 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -0400318 "kind": "drive#property", # This is always drive#property.
319 "value": "A String", # The value of this property.
320 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700321 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400322 "key": "A String", # The key of this property.
323 "selfLink": "A String", # The link back to this property.
324 },
325 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700326 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400327 "iconLink": "A String", # A link to the file's icon.
328 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
329 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700330 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700331 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
332 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -0400333 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700334 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700335 "mimeType": "A String", # The MIME type of the thumbnail.
336 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
337 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700338 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400339 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
340 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -0700341 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700342 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400343 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400344 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
345 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700346 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400347 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700348 # - reader
349 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
350 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
351 # - file
352 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400353 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
354 "A String",
355 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400356 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
357 },
358 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700359 "name": "A String", # The name for this permission.
360 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
361 {
362 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
363 "role": "A String", # Deprecated - use permissionDetails/role instead.
364 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
365 "A String",
366 ],
367 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
368 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
369 },
370 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400371 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -0400372 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800373 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
374 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700375 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -0400376 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800377 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400378 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
379 # - They can only be set on user and group permissions
380 # - The date must be in the future
381 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700382 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400383 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -0400384 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 # - organizer
386 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400387 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 # - reader
John Asmuth614db982014-04-24 15:46:26 -0400389 "type": "A String", # The account type. Allowed values are:
390 # - user
391 # - group
392 # - domain
393 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400394 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -0400395 "A String",
396 ],
397 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700398 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -0400399 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700400 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000401 "A String",
402 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700403 "permissionIds": [ # List of permission IDs for users with access to this file.
404 "A String",
405 ],
406 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
407 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
408 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
409 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
410 { # A permission for a file.
411 "withLink": True or False, # Whether the link is required for this permission.
412 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
413 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
414 {
415 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
416 # - organizer
417 # - fileOrganizer
418 # - writer
419 # - reader
420 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
421 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
422 # - file
423 # - member
424 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
425 "A String",
426 ],
427 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
428 },
429 ],
430 "name": "A String", # The name for this permission.
431 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
432 {
433 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
434 "role": "A String", # Deprecated - use permissionDetails/role instead.
435 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
436 "A String",
437 ],
438 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
439 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
440 },
441 ],
442 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
443 "kind": "drive#permission", # This is always drive#permission.
444 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
445 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
446 "authKey": "A String", # Deprecated.
447 "etag": "A String", # The ETag of the permission.
448 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
449 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
450 # - They can only be set on user and group permissions
451 # - The date must be in the future
452 # - The date cannot be more than a year in the future
453 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
454 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
455 # - owner
456 # - organizer
457 # - fileOrganizer
458 # - writer
459 # - reader
460 "type": "A String", # The account type. Allowed values are:
461 # - user
462 # - group
463 # - domain
464 # - anyone
465 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
466 "A String",
467 ],
468 "selfLink": "A String", # A link back to this permission.
469 "photoLink": "A String", # A link to the profile photo, if available.
470 },
471 ],
472 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400473 "selfLink": "A String", # A link back to this file.
474 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
475}
476
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700477 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700478 pinned: boolean, Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400479 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700480 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
John Asmuth614db982014-04-24 15:46:26 -0400481 visibility: string, The visibility of the new file. This parameter is only relevant when the source is not a native Google Doc and convert=false.
482 Allowed values
483 DEFAULT - The visibility of the new file is determined by the user's default visibility/sharing policies.
484 PRIVATE - The new file will be visible to only the owner.
John Asmuth614db982014-04-24 15:46:26 -0400485 timedTextTrackName: string, The timed text track name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700486 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
487 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400488 timedTextLanguage: string, The language of the timed text.
John Asmuth614db982014-04-24 15:46:26 -0400489
490Returns:
491 An object of the form:
492
493 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400494 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -0400495 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700496 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -0700497 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
498 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800499 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -0400500 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700501 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800502 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000503 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800504 "hidden": True or False, # Deprecated.
505 "starred": True or False, # Whether this file is starred by the user.
506 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -0400507 },
508 "indexableText": { # Indexable text attributes for the file (can only be written)
509 "text": "A String", # The text to be indexed for this file.
510 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400511 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700512 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700513 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -0400514 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700515 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
516 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700517 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -0400518 "picture": { # The user's profile picture.
519 "url": "A String", # A URL that points to a profile picture of this user.
520 },
521 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400522 "displayName": "A String", # A plain text displayable name for this user.
523 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700524 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
525 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400526 },
527 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400529 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700530 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700531 "picture": { # The user's profile picture.
532 "url": "A String", # A URL that points to a profile picture of this user.
533 },
534 "kind": "drive#user", # This is always drive#user.
535 "displayName": "A String", # A plain text displayable name for this user.
536 "permissionId": "A String", # The user's ID as visible in the permissions collection.
537 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
538 "emailAddress": "A String", # The email address of the user.
539 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700540 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400541 "picture": { # The user's profile picture.
542 "url": "A String", # A URL that points to a profile picture of this user.
543 },
544 "kind": "drive#user", # This is always drive#user.
545 "displayName": "A String", # A plain text displayable name for this user.
546 "permissionId": "A String", # The user's ID as visible in the permissions collection.
547 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
548 "emailAddress": "A String", # The email address of the user.
549 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700550 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800551 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700552 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -0400553 "picture": { # The user's profile picture.
554 "url": "A String", # A URL that points to a profile picture of this user.
555 },
556 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400557 "displayName": "A String", # A plain text displayable name for this user.
558 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700559 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
560 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400561 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400562 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700564 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400566 "A String",
567 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400568 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400570 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700571 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
572 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
573 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
574 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
575 "canRename": True or False, # Whether the current user can rename this file.
576 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
577 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
578 "canChangeRestrictedDownload": True or False, # Deprecated
579 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
580 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
581 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
582 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
583 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
584 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
585 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
586 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
587 "canComment": True or False, # Whether the current user can comment on this file.
588 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
589 "canTrash": True or False, # Whether the current user can move this file to trash.
590 "canDelete": True or False, # Whether the current user can delete this file.
591 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
592 "canDownload": True or False, # Whether the current user can download this file.
593 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
594 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
595 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
596 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
597 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400598 },
John Asmuth614db982014-04-24 15:46:26 -0400599 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
600 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
601 "etag": "A String", # ETag of the file.
602 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700603 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -0400604 { # A reference to a file's parent.
605 "selfLink": "A String", # A link back to this reference.
606 "kind": "drive#parentReference", # This is always drive#parentReference.
607 "id": "A String", # The ID of the parent.
608 "isRoot": True or False, # Whether or not the parent is the root folder.
609 "parentLink": "A String", # A link to the parent.
610 },
611 ],
612 "exportLinks": { # Links for exporting Google Docs to specific formats.
613 "a_key": "A String", # A mapping from export format to URL
614 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700615 "shareable": True or False, # Deprecated: use capabilities/canShare.
616 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
617 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400618 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
619 "a_key": "A String",
620 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400621 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -0400622 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
623 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
624 "exposureTime": 3.14, # The length of the exposure, in seconds.
625 "cameraMake": "A String", # The make of the camera used to create the photo.
626 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
627 "isoSpeed": 42, # The ISO speed used to create the photo.
628 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
629 "exposureMode": "A String", # The exposure mode used to create the photo.
630 "colorSpace": "A String", # The color space of the photo.
631 "location": { # Geographic location information stored in the image.
632 "latitude": 3.14, # The latitude stored in the image.
633 "altitude": 3.14, # The altitude stored in the image.
634 "longitude": 3.14, # The longitude stored in the image.
635 },
636 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
637 "height": 42, # The height of the image in pixels.
638 "lens": "A String", # The lens used to create the photo.
639 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
640 "width": 42, # The width of the image in pixels.
641 "meteringMode": "A String", # The metering mode used to create the photo.
642 "flashUsed": True or False, # Whether a flash was used to create the photo.
643 "aperture": 3.14, # The aperture used to create the photo (f-number).
644 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
645 "sensor": "A String", # The type of sensor used to create the photo.
646 "whiteBalance": "A String", # The white balance mode used to create the photo.
647 "cameraModel": "A String", # The model of the camera used to create the photo.
648 },
649 "description": "A String", # A short description of the file.
650 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800651 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
652 "width": 42, # The width of the video in pixels.
653 "durationMillis": "A String", # The duration of the video in milliseconds.
654 "height": 42, # The height of the video in pixels.
655 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400656 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -0400657 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400658 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -0400659 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700660 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700661 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700662 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -0400663 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000664 { # A key-value pair attached to a file that is either public or private to an application.
665 # The following limits apply to file properties:
666 # - Maximum of 100 properties total per file
667 # - Maximum of 30 private properties per app
668 # - Maximum of 30 public properties
669 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -0400670 "kind": "drive#property", # This is always drive#property.
671 "value": "A String", # The value of this property.
672 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700673 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400674 "key": "A String", # The key of this property.
675 "selfLink": "A String", # The link back to this property.
676 },
677 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700678 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400679 "iconLink": "A String", # A link to the file's icon.
680 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
681 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700682 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700683 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
684 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -0400685 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700686 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700687 "mimeType": "A String", # The MIME type of the thumbnail.
688 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
689 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700690 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400691 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
692 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -0700693 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700694 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400695 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400696 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
697 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700698 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400699 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700700 # - reader
701 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
702 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
703 # - file
704 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400705 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
706 "A String",
707 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400708 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
709 },
710 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700711 "name": "A String", # The name for this permission.
712 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
713 {
714 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
715 "role": "A String", # Deprecated - use permissionDetails/role instead.
716 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
717 "A String",
718 ],
719 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
720 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
721 },
722 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400723 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -0400724 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800725 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
726 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700727 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -0400728 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800729 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400730 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
731 # - They can only be set on user and group permissions
732 # - The date must be in the future
733 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400735 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -0400736 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700737 # - organizer
738 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400739 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700740 # - reader
John Asmuth614db982014-04-24 15:46:26 -0400741 "type": "A String", # The account type. Allowed values are:
742 # - user
743 # - group
744 # - domain
745 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400746 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -0400747 "A String",
748 ],
749 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700750 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -0400751 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700752 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000753 "A String",
754 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700755 "permissionIds": [ # List of permission IDs for users with access to this file.
756 "A String",
757 ],
758 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
759 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
760 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
761 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
762 { # A permission for a file.
763 "withLink": True or False, # Whether the link is required for this permission.
764 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
765 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
766 {
767 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
768 # - organizer
769 # - fileOrganizer
770 # - writer
771 # - reader
772 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
773 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
774 # - file
775 # - member
776 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
777 "A String",
778 ],
779 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
780 },
781 ],
782 "name": "A String", # The name for this permission.
783 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
784 {
785 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
786 "role": "A String", # Deprecated - use permissionDetails/role instead.
787 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
788 "A String",
789 ],
790 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
791 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
792 },
793 ],
794 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
795 "kind": "drive#permission", # This is always drive#permission.
796 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
797 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
798 "authKey": "A String", # Deprecated.
799 "etag": "A String", # The ETag of the permission.
800 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
801 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
802 # - They can only be set on user and group permissions
803 # - The date must be in the future
804 # - The date cannot be more than a year in the future
805 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
806 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
807 # - owner
808 # - organizer
809 # - fileOrganizer
810 # - writer
811 # - reader
812 "type": "A String", # The account type. Allowed values are:
813 # - user
814 # - group
815 # - domain
816 # - anyone
817 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
818 "A String",
819 ],
820 "selfLink": "A String", # A link back to this permission.
821 "photoLink": "A String", # A link to the profile photo, if available.
822 },
823 ],
824 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400825 "selfLink": "A String", # A link back to this file.
826 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
827 }</pre>
828</div>
829
830<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700831 <code class="details" id="delete">delete(fileId, supportsTeamDrives=None, supportsAllDrives=None)</code>
832 <pre>Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files.
John Asmuth614db982014-04-24 15:46:26 -0400833
834Args:
835 fileId: string, The ID of the file to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700836 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
837 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400838</pre>
839</div>
840
841<div class="method">
Craig Citro065b5302014-08-14 00:47:23 -0700842 <code class="details" id="emptyTrash">emptyTrash()</code>
843 <pre>Permanently deletes all of the user's trashed files.
844
845Args:
846</pre>
847</div>
848
849<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700850 <code class="details" id="export">export(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700851 <pre>Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700852
853Args:
854 fileId: string, The ID of the file. (required)
855 mimeType: string, The MIME type of the format requested for this export. (required)
856</pre>
857</div>
858
859<div class="method">
860 <code class="details" id="export_media">export_media(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700861 <pre>Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700862
863Args:
864 fileId: string, The ID of the file. (required)
865 mimeType: string, The MIME type of the format requested for this export. (required)
866</pre>
867</div>
868
869<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -0700870 <code class="details" id="generateIds">generateIds(space=None, maxResults=None)</code>
871 <pre>Generates a set of file IDs which can be provided in insert requests.
872
873Args:
874 space: string, The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'.
875 maxResults: integer, Maximum number of IDs to return.
876
877Returns:
878 An object of the form:
879
880 { # A list of generated IDs which can be provided in insert requests
881 "kind": "drive#generatedIds", # This is always drive#generatedIds
882 "ids": [ # The IDs generated for the requesting user in the specified space.
883 "A String",
884 ],
885 "space": "A String", # The type of file that can be created with these IDs.
886 }</pre>
887</div>
888
889<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700890 <code class="details" id="get">get(fileId, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400891 <pre>Gets a file's metadata by ID.
892
893Args:
894 fileId: string, The ID for the file in question. (required)
895 projection: string, This parameter is deprecated and has no function.
896 Allowed values
897 BASIC - Deprecated
898 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000899 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700900 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
901 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Craig Citroe633be12015-03-02 13:40:36 -0800902 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700903 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
John Asmuth614db982014-04-24 15:46:26 -0400904
905Returns:
906 An object of the form:
907
908 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400909 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -0400910 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700911 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -0700912 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
913 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800914 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -0400915 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700916 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800917 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000918 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800919 "hidden": True or False, # Deprecated.
920 "starred": True or False, # Whether this file is starred by the user.
921 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -0400922 },
923 "indexableText": { # Indexable text attributes for the file (can only be written)
924 "text": "A String", # The text to be indexed for this file.
925 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400926 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700927 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700928 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -0400929 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700930 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
931 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700932 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -0400933 "picture": { # The user's profile picture.
934 "url": "A String", # A URL that points to a profile picture of this user.
935 },
936 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400937 "displayName": "A String", # A plain text displayable name for this user.
938 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700939 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
940 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400941 },
942 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700943 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400944 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700945 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700946 "picture": { # The user's profile picture.
947 "url": "A String", # A URL that points to a profile picture of this user.
948 },
949 "kind": "drive#user", # This is always drive#user.
950 "displayName": "A String", # A plain text displayable name for this user.
951 "permissionId": "A String", # The user's ID as visible in the permissions collection.
952 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
953 "emailAddress": "A String", # The email address of the user.
954 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700955 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400956 "picture": { # The user's profile picture.
957 "url": "A String", # A URL that points to a profile picture of this user.
958 },
959 "kind": "drive#user", # This is always drive#user.
960 "displayName": "A String", # A plain text displayable name for this user.
961 "permissionId": "A String", # The user's ID as visible in the permissions collection.
962 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
963 "emailAddress": "A String", # The email address of the user.
964 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700965 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800966 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700967 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -0400968 "picture": { # The user's profile picture.
969 "url": "A String", # A URL that points to a profile picture of this user.
970 },
971 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400972 "displayName": "A String", # A plain text displayable name for this user.
973 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700974 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
975 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400976 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400977 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700978 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700979 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700980 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400981 "A String",
982 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400983 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700984 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400985 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700986 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
987 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
988 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
989 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
990 "canRename": True or False, # Whether the current user can rename this file.
991 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
992 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
993 "canChangeRestrictedDownload": True or False, # Deprecated
994 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
995 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
996 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
997 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
998 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
999 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
1000 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1001 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1002 "canComment": True or False, # Whether the current user can comment on this file.
1003 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1004 "canTrash": True or False, # Whether the current user can move this file to trash.
1005 "canDelete": True or False, # Whether the current user can delete this file.
1006 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1007 "canDownload": True or False, # Whether the current user can download this file.
1008 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1009 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1010 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
1011 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
1012 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001013 },
John Asmuth614db982014-04-24 15:46:26 -04001014 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1015 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
1016 "etag": "A String", # ETag of the file.
1017 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001018 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -04001019 { # A reference to a file's parent.
1020 "selfLink": "A String", # A link back to this reference.
1021 "kind": "drive#parentReference", # This is always drive#parentReference.
1022 "id": "A String", # The ID of the parent.
1023 "isRoot": True or False, # Whether or not the parent is the root folder.
1024 "parentLink": "A String", # A link to the parent.
1025 },
1026 ],
1027 "exportLinks": { # Links for exporting Google Docs to specific formats.
1028 "a_key": "A String", # A mapping from export format to URL
1029 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001030 "shareable": True or False, # Deprecated: use capabilities/canShare.
1031 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1032 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001033 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
1034 "a_key": "A String",
1035 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001036 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04001037 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1038 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
1039 "exposureTime": 3.14, # The length of the exposure, in seconds.
1040 "cameraMake": "A String", # The make of the camera used to create the photo.
1041 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1042 "isoSpeed": 42, # The ISO speed used to create the photo.
1043 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
1044 "exposureMode": "A String", # The exposure mode used to create the photo.
1045 "colorSpace": "A String", # The color space of the photo.
1046 "location": { # Geographic location information stored in the image.
1047 "latitude": 3.14, # The latitude stored in the image.
1048 "altitude": 3.14, # The altitude stored in the image.
1049 "longitude": 3.14, # The longitude stored in the image.
1050 },
1051 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1052 "height": 42, # The height of the image in pixels.
1053 "lens": "A String", # The lens used to create the photo.
1054 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1055 "width": 42, # The width of the image in pixels.
1056 "meteringMode": "A String", # The metering mode used to create the photo.
1057 "flashUsed": True or False, # Whether a flash was used to create the photo.
1058 "aperture": 3.14, # The aperture used to create the photo (f-number).
1059 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
1060 "sensor": "A String", # The type of sensor used to create the photo.
1061 "whiteBalance": "A String", # The white balance mode used to create the photo.
1062 "cameraModel": "A String", # The model of the camera used to create the photo.
1063 },
1064 "description": "A String", # A short description of the file.
1065 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001066 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
1067 "width": 42, # The width of the video in pixels.
1068 "durationMillis": "A String", # The duration of the video in milliseconds.
1069 "height": 42, # The height of the video in pixels.
1070 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001071 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04001072 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001073 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04001074 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001075 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001076 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001077 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04001078 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001079 { # A key-value pair attached to a file that is either public or private to an application.
1080 # The following limits apply to file properties:
1081 # - Maximum of 100 properties total per file
1082 # - Maximum of 30 private properties per app
1083 # - Maximum of 30 public properties
1084 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04001085 "kind": "drive#property", # This is always drive#property.
1086 "value": "A String", # The value of this property.
1087 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001088 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04001089 "key": "A String", # The key of this property.
1090 "selfLink": "A String", # The link back to this property.
1091 },
1092 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001093 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001094 "iconLink": "A String", # A link to the file's icon.
1095 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
1096 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001097 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001098 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
1099 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -04001100 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001101 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07001102 "mimeType": "A String", # The MIME type of the thumbnail.
1103 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1104 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001105 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001106 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
1107 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07001108 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001109 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001110 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001111 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1112 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001113 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001114 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001115 # - reader
1116 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
1117 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
1118 # - file
1119 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001120 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1121 "A String",
1122 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001123 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1124 },
1125 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001126 "name": "A String", # The name for this permission.
1127 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
1128 {
1129 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
1130 "role": "A String", # Deprecated - use permissionDetails/role instead.
1131 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
1132 "A String",
1133 ],
1134 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
1135 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
1136 },
1137 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001138 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04001139 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001140 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1141 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001142 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04001143 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08001144 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001145 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1146 # - They can only be set on user and group permissions
1147 # - The date must be in the future
1148 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001149 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001150 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04001151 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001152 # - organizer
1153 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001154 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001155 # - reader
John Asmuth614db982014-04-24 15:46:26 -04001156 "type": "A String", # The account type. Allowed values are:
1157 # - user
1158 # - group
1159 # - domain
1160 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001161 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04001162 "A String",
1163 ],
1164 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001165 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04001166 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001167 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001168 "A String",
1169 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001170 "permissionIds": [ # List of permission IDs for users with access to this file.
1171 "A String",
1172 ],
1173 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
1174 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1175 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
1176 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1177 { # A permission for a file.
1178 "withLink": True or False, # Whether the link is required for this permission.
1179 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1180 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
1181 {
1182 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1183 # - organizer
1184 # - fileOrganizer
1185 # - writer
1186 # - reader
1187 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
1188 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
1189 # - file
1190 # - member
1191 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1192 "A String",
1193 ],
1194 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1195 },
1196 ],
1197 "name": "A String", # The name for this permission.
1198 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
1199 {
1200 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
1201 "role": "A String", # Deprecated - use permissionDetails/role instead.
1202 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
1203 "A String",
1204 ],
1205 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
1206 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
1207 },
1208 ],
1209 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
1210 "kind": "drive#permission", # This is always drive#permission.
1211 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1212 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1213 "authKey": "A String", # Deprecated.
1214 "etag": "A String", # The ETag of the permission.
1215 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1216 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1217 # - They can only be set on user and group permissions
1218 # - The date must be in the future
1219 # - The date cannot be more than a year in the future
1220 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1221 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1222 # - owner
1223 # - organizer
1224 # - fileOrganizer
1225 # - writer
1226 # - reader
1227 "type": "A String", # The account type. Allowed values are:
1228 # - user
1229 # - group
1230 # - domain
1231 # - anyone
1232 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1233 "A String",
1234 ],
1235 "selfLink": "A String", # A link back to this permission.
1236 "photoLink": "A String", # A link to the profile photo, if available.
1237 },
1238 ],
1239 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001240 "selfLink": "A String", # A link back to this file.
1241 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
1242 }</pre>
1243</div>
1244
1245<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001246 <code class="details" id="get_media">get_media(fileId, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08001247 <pre>Gets a file's metadata by ID.
1248
1249Args:
1250 fileId: string, The ID for the file in question. (required)
1251 projection: string, This parameter is deprecated and has no function.
1252 Allowed values
1253 BASIC - Deprecated
1254 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001255 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001256 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
1257 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Craig Citroe633be12015-03-02 13:40:36 -08001258 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001259 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
Craig Citroe633be12015-03-02 13:40:36 -08001260
1261Returns:
1262 The media object as a string.
1263
1264 </pre>
1265</div>
1266
1267<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001268 <code class="details" id="insert">insert(body=None, supportsTeamDrives=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, visibility=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, timedTextLanguage=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001269 <pre>Insert a new file.
1270
1271Args:
1272 body: object, The request body.
1273 The object takes the form of:
1274
1275{ # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001276 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -04001277 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001278 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07001279 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
1280 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001281 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04001282 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001283 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001284 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001285 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001286 "hidden": True or False, # Deprecated.
1287 "starred": True or False, # Whether this file is starred by the user.
1288 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04001289 },
1290 "indexableText": { # Indexable text attributes for the file (can only be written)
1291 "text": "A String", # The text to be indexed for this file.
1292 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001293 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001294 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001295 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04001296 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001297 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
1298 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001299 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04001300 "picture": { # The user's profile picture.
1301 "url": "A String", # A URL that points to a profile picture of this user.
1302 },
1303 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001304 "displayName": "A String", # A plain text displayable name for this user.
1305 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001306 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1307 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001308 },
1309 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001310 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001311 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001312 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07001313 "picture": { # The user's profile picture.
1314 "url": "A String", # A URL that points to a profile picture of this user.
1315 },
1316 "kind": "drive#user", # This is always drive#user.
1317 "displayName": "A String", # A plain text displayable name for this user.
1318 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1319 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1320 "emailAddress": "A String", # The email address of the user.
1321 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001322 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001323 "picture": { # The user's profile picture.
1324 "url": "A String", # A URL that points to a profile picture of this user.
1325 },
1326 "kind": "drive#user", # This is always drive#user.
1327 "displayName": "A String", # A plain text displayable name for this user.
1328 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1329 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1330 "emailAddress": "A String", # The email address of the user.
1331 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001332 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001333 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001334 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04001335 "picture": { # The user's profile picture.
1336 "url": "A String", # A URL that points to a profile picture of this user.
1337 },
1338 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001339 "displayName": "A String", # A plain text displayable name for this user.
1340 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001341 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1342 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001343 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001344 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001345 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001346 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001347 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001348 "A String",
1349 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001350 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001351 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001352 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001353 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
1354 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1355 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1356 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
1357 "canRename": True or False, # Whether the current user can rename this file.
1358 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
1359 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
1360 "canChangeRestrictedDownload": True or False, # Deprecated
1361 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
1362 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1363 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1364 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
1365 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
1366 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
1367 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1368 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1369 "canComment": True or False, # Whether the current user can comment on this file.
1370 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1371 "canTrash": True or False, # Whether the current user can move this file to trash.
1372 "canDelete": True or False, # Whether the current user can delete this file.
1373 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1374 "canDownload": True or False, # Whether the current user can download this file.
1375 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1376 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1377 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
1378 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
1379 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001380 },
John Asmuth614db982014-04-24 15:46:26 -04001381 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1382 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
1383 "etag": "A String", # ETag of the file.
1384 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001385 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -04001386 { # A reference to a file's parent.
1387 "selfLink": "A String", # A link back to this reference.
1388 "kind": "drive#parentReference", # This is always drive#parentReference.
1389 "id": "A String", # The ID of the parent.
1390 "isRoot": True or False, # Whether or not the parent is the root folder.
1391 "parentLink": "A String", # A link to the parent.
1392 },
1393 ],
1394 "exportLinks": { # Links for exporting Google Docs to specific formats.
1395 "a_key": "A String", # A mapping from export format to URL
1396 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001397 "shareable": True or False, # Deprecated: use capabilities/canShare.
1398 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1399 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001400 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
1401 "a_key": "A String",
1402 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001403 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04001404 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1405 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
1406 "exposureTime": 3.14, # The length of the exposure, in seconds.
1407 "cameraMake": "A String", # The make of the camera used to create the photo.
1408 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1409 "isoSpeed": 42, # The ISO speed used to create the photo.
1410 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
1411 "exposureMode": "A String", # The exposure mode used to create the photo.
1412 "colorSpace": "A String", # The color space of the photo.
1413 "location": { # Geographic location information stored in the image.
1414 "latitude": 3.14, # The latitude stored in the image.
1415 "altitude": 3.14, # The altitude stored in the image.
1416 "longitude": 3.14, # The longitude stored in the image.
1417 },
1418 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1419 "height": 42, # The height of the image in pixels.
1420 "lens": "A String", # The lens used to create the photo.
1421 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1422 "width": 42, # The width of the image in pixels.
1423 "meteringMode": "A String", # The metering mode used to create the photo.
1424 "flashUsed": True or False, # Whether a flash was used to create the photo.
1425 "aperture": 3.14, # The aperture used to create the photo (f-number).
1426 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
1427 "sensor": "A String", # The type of sensor used to create the photo.
1428 "whiteBalance": "A String", # The white balance mode used to create the photo.
1429 "cameraModel": "A String", # The model of the camera used to create the photo.
1430 },
1431 "description": "A String", # A short description of the file.
1432 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001433 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
1434 "width": 42, # The width of the video in pixels.
1435 "durationMillis": "A String", # The duration of the video in milliseconds.
1436 "height": 42, # The height of the video in pixels.
1437 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001438 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04001439 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001440 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04001441 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001442 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001443 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001444 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04001445 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001446 { # A key-value pair attached to a file that is either public or private to an application.
1447 # The following limits apply to file properties:
1448 # - Maximum of 100 properties total per file
1449 # - Maximum of 30 private properties per app
1450 # - Maximum of 30 public properties
1451 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04001452 "kind": "drive#property", # This is always drive#property.
1453 "value": "A String", # The value of this property.
1454 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001455 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04001456 "key": "A String", # The key of this property.
1457 "selfLink": "A String", # The link back to this property.
1458 },
1459 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001460 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001461 "iconLink": "A String", # A link to the file's icon.
1462 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
1463 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001464 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001465 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
1466 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -04001467 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001468 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07001469 "mimeType": "A String", # The MIME type of the thumbnail.
1470 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1471 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001472 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001473 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
1474 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07001475 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001476 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001477 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001478 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1479 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001480 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001481 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001482 # - reader
1483 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
1484 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
1485 # - file
1486 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001487 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1488 "A String",
1489 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001490 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1491 },
1492 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001493 "name": "A String", # The name for this permission.
1494 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
1495 {
1496 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
1497 "role": "A String", # Deprecated - use permissionDetails/role instead.
1498 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
1499 "A String",
1500 ],
1501 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
1502 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
1503 },
1504 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001505 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04001506 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001507 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1508 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001509 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04001510 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08001511 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001512 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1513 # - They can only be set on user and group permissions
1514 # - The date must be in the future
1515 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001516 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001517 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04001518 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001519 # - organizer
1520 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001521 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001522 # - reader
John Asmuth614db982014-04-24 15:46:26 -04001523 "type": "A String", # The account type. Allowed values are:
1524 # - user
1525 # - group
1526 # - domain
1527 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001528 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04001529 "A String",
1530 ],
1531 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001532 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04001533 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001534 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001535 "A String",
1536 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001537 "permissionIds": [ # List of permission IDs for users with access to this file.
1538 "A String",
1539 ],
1540 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
1541 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1542 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
1543 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1544 { # A permission for a file.
1545 "withLink": True or False, # Whether the link is required for this permission.
1546 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1547 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
1548 {
1549 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1550 # - organizer
1551 # - fileOrganizer
1552 # - writer
1553 # - reader
1554 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
1555 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
1556 # - file
1557 # - member
1558 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1559 "A String",
1560 ],
1561 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1562 },
1563 ],
1564 "name": "A String", # The name for this permission.
1565 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
1566 {
1567 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
1568 "role": "A String", # Deprecated - use permissionDetails/role instead.
1569 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
1570 "A String",
1571 ],
1572 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
1573 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
1574 },
1575 ],
1576 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
1577 "kind": "drive#permission", # This is always drive#permission.
1578 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1579 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1580 "authKey": "A String", # Deprecated.
1581 "etag": "A String", # The ETag of the permission.
1582 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1583 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1584 # - They can only be set on user and group permissions
1585 # - The date must be in the future
1586 # - The date cannot be more than a year in the future
1587 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1588 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1589 # - owner
1590 # - organizer
1591 # - fileOrganizer
1592 # - writer
1593 # - reader
1594 "type": "A String", # The account type. Allowed values are:
1595 # - user
1596 # - group
1597 # - domain
1598 # - anyone
1599 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1600 "A String",
1601 ],
1602 "selfLink": "A String", # A link back to this permission.
1603 "photoLink": "A String", # A link to the profile photo, if available.
1604 },
1605 ],
1606 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001607 "selfLink": "A String", # A link back to this file.
1608 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
1609}
1610
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001611 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04001612 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001613 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
1614 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1615 pinned: boolean, Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions.
John Asmuth614db982014-04-24 15:46:26 -04001616 visibility: string, The visibility of the new file. This parameter is only relevant when convert=false.
1617 Allowed values
1618 DEFAULT - The visibility of the new file is determined by the user's default visibility/sharing policies.
1619 PRIVATE - The new file will be visible to only the owner.
John Asmuth614db982014-04-24 15:46:26 -04001620 timedTextTrackName: string, The timed text track name.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001621 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
1622 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001623 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001624 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
1625 timedTextLanguage: string, The language of the timed text.
John Asmuth614db982014-04-24 15:46:26 -04001626
1627Returns:
1628 An object of the form:
1629
1630 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001631 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -04001632 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001633 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07001634 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
1635 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001636 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04001637 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001638 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001639 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001640 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001641 "hidden": True or False, # Deprecated.
1642 "starred": True or False, # Whether this file is starred by the user.
1643 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04001644 },
1645 "indexableText": { # Indexable text attributes for the file (can only be written)
1646 "text": "A String", # The text to be indexed for this file.
1647 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001648 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001649 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001650 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04001651 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001652 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
1653 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001654 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04001655 "picture": { # The user's profile picture.
1656 "url": "A String", # A URL that points to a profile picture of this user.
1657 },
1658 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001659 "displayName": "A String", # A plain text displayable name for this user.
1660 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001661 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1662 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001663 },
1664 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001665 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001666 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001667 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07001668 "picture": { # The user's profile picture.
1669 "url": "A String", # A URL that points to a profile picture of this user.
1670 },
1671 "kind": "drive#user", # This is always drive#user.
1672 "displayName": "A String", # A plain text displayable name for this user.
1673 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1674 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1675 "emailAddress": "A String", # The email address of the user.
1676 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001677 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001678 "picture": { # The user's profile picture.
1679 "url": "A String", # A URL that points to a profile picture of this user.
1680 },
1681 "kind": "drive#user", # This is always drive#user.
1682 "displayName": "A String", # A plain text displayable name for this user.
1683 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1684 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1685 "emailAddress": "A String", # The email address of the user.
1686 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001687 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001688 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001689 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04001690 "picture": { # The user's profile picture.
1691 "url": "A String", # A URL that points to a profile picture of this user.
1692 },
1693 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001694 "displayName": "A String", # A plain text displayable name for this user.
1695 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001696 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1697 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001698 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001699 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001700 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001701 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001702 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001703 "A String",
1704 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001705 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001706 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001707 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001708 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
1709 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1710 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1711 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
1712 "canRename": True or False, # Whether the current user can rename this file.
1713 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
1714 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
1715 "canChangeRestrictedDownload": True or False, # Deprecated
1716 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
1717 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1718 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1719 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
1720 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
1721 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
1722 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1723 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1724 "canComment": True or False, # Whether the current user can comment on this file.
1725 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1726 "canTrash": True or False, # Whether the current user can move this file to trash.
1727 "canDelete": True or False, # Whether the current user can delete this file.
1728 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1729 "canDownload": True or False, # Whether the current user can download this file.
1730 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1731 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1732 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
1733 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
1734 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001735 },
John Asmuth614db982014-04-24 15:46:26 -04001736 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1737 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
1738 "etag": "A String", # ETag of the file.
1739 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001740 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -04001741 { # A reference to a file's parent.
1742 "selfLink": "A String", # A link back to this reference.
1743 "kind": "drive#parentReference", # This is always drive#parentReference.
1744 "id": "A String", # The ID of the parent.
1745 "isRoot": True or False, # Whether or not the parent is the root folder.
1746 "parentLink": "A String", # A link to the parent.
1747 },
1748 ],
1749 "exportLinks": { # Links for exporting Google Docs to specific formats.
1750 "a_key": "A String", # A mapping from export format to URL
1751 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001752 "shareable": True or False, # Deprecated: use capabilities/canShare.
1753 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1754 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001755 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
1756 "a_key": "A String",
1757 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001758 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04001759 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1760 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
1761 "exposureTime": 3.14, # The length of the exposure, in seconds.
1762 "cameraMake": "A String", # The make of the camera used to create the photo.
1763 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1764 "isoSpeed": 42, # The ISO speed used to create the photo.
1765 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
1766 "exposureMode": "A String", # The exposure mode used to create the photo.
1767 "colorSpace": "A String", # The color space of the photo.
1768 "location": { # Geographic location information stored in the image.
1769 "latitude": 3.14, # The latitude stored in the image.
1770 "altitude": 3.14, # The altitude stored in the image.
1771 "longitude": 3.14, # The longitude stored in the image.
1772 },
1773 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1774 "height": 42, # The height of the image in pixels.
1775 "lens": "A String", # The lens used to create the photo.
1776 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1777 "width": 42, # The width of the image in pixels.
1778 "meteringMode": "A String", # The metering mode used to create the photo.
1779 "flashUsed": True or False, # Whether a flash was used to create the photo.
1780 "aperture": 3.14, # The aperture used to create the photo (f-number).
1781 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
1782 "sensor": "A String", # The type of sensor used to create the photo.
1783 "whiteBalance": "A String", # The white balance mode used to create the photo.
1784 "cameraModel": "A String", # The model of the camera used to create the photo.
1785 },
1786 "description": "A String", # A short description of the file.
1787 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001788 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
1789 "width": 42, # The width of the video in pixels.
1790 "durationMillis": "A String", # The duration of the video in milliseconds.
1791 "height": 42, # The height of the video in pixels.
1792 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001793 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04001794 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001795 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04001796 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001797 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001798 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001799 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04001800 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001801 { # A key-value pair attached to a file that is either public or private to an application.
1802 # The following limits apply to file properties:
1803 # - Maximum of 100 properties total per file
1804 # - Maximum of 30 private properties per app
1805 # - Maximum of 30 public properties
1806 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04001807 "kind": "drive#property", # This is always drive#property.
1808 "value": "A String", # The value of this property.
1809 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001810 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04001811 "key": "A String", # The key of this property.
1812 "selfLink": "A String", # The link back to this property.
1813 },
1814 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001815 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001816 "iconLink": "A String", # A link to the file's icon.
1817 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
1818 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001819 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001820 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
1821 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -04001822 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001823 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07001824 "mimeType": "A String", # The MIME type of the thumbnail.
1825 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1826 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001827 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001828 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
1829 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07001830 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001831 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001832 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001833 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1834 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001835 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001836 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001837 # - reader
1838 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
1839 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
1840 # - file
1841 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001842 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1843 "A String",
1844 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001845 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1846 },
1847 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001848 "name": "A String", # The name for this permission.
1849 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
1850 {
1851 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
1852 "role": "A String", # Deprecated - use permissionDetails/role instead.
1853 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
1854 "A String",
1855 ],
1856 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
1857 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
1858 },
1859 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001860 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04001861 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001862 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1863 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001864 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04001865 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08001866 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001867 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1868 # - They can only be set on user and group permissions
1869 # - The date must be in the future
1870 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001871 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001872 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04001873 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001874 # - organizer
1875 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001876 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001877 # - reader
John Asmuth614db982014-04-24 15:46:26 -04001878 "type": "A String", # The account type. Allowed values are:
1879 # - user
1880 # - group
1881 # - domain
1882 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001883 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04001884 "A String",
1885 ],
1886 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001887 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04001888 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001889 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001890 "A String",
1891 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001892 "permissionIds": [ # List of permission IDs for users with access to this file.
1893 "A String",
1894 ],
1895 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
1896 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1897 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
1898 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1899 { # A permission for a file.
1900 "withLink": True or False, # Whether the link is required for this permission.
1901 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1902 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
1903 {
1904 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1905 # - organizer
1906 # - fileOrganizer
1907 # - writer
1908 # - reader
1909 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
1910 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
1911 # - file
1912 # - member
1913 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1914 "A String",
1915 ],
1916 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1917 },
1918 ],
1919 "name": "A String", # The name for this permission.
1920 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
1921 {
1922 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
1923 "role": "A String", # Deprecated - use permissionDetails/role instead.
1924 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
1925 "A String",
1926 ],
1927 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
1928 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
1929 },
1930 ],
1931 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
1932 "kind": "drive#permission", # This is always drive#permission.
1933 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1934 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1935 "authKey": "A String", # Deprecated.
1936 "etag": "A String", # The ETag of the permission.
1937 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1938 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1939 # - They can only be set on user and group permissions
1940 # - The date must be in the future
1941 # - The date cannot be more than a year in the future
1942 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1943 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1944 # - owner
1945 # - organizer
1946 # - fileOrganizer
1947 # - writer
1948 # - reader
1949 "type": "A String", # The account type. Allowed values are:
1950 # - user
1951 # - group
1952 # - domain
1953 # - anyone
1954 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1955 "A String",
1956 ],
1957 "selfLink": "A String", # A link back to this permission.
1958 "photoLink": "A String", # A link to the profile photo, if available.
1959 },
1960 ],
1961 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001962 "selfLink": "A String", # A link back to this file.
1963 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
1964 }</pre>
1965</div>
1966
1967<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001968 <code class="details" id="list">list(orderBy=None, projection=None, supportsTeamDrives=None, spaces=None, q=None, pageToken=None, corpus=None, maxResults=None, teamDriveId=None, includeItemsFromAllDrives=None, includeTeamDriveItems=None, corpora=None, supportsAllDrives=None, driveId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001969 <pre>Lists the user's files.
1970
1971Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001972 orderBy: string, A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', 'title', and 'title_natural'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.
John Asmuth614db982014-04-24 15:46:26 -04001973 projection: string, This parameter is deprecated and has no function.
1974 Allowed values
1975 BASIC - Deprecated
1976 FULL - Deprecated
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001977 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Takashi Matsuo06694102015-09-11 13:55:40 -07001978 spaces: string, A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001979 q: string, Query string for searching files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001980 pageToken: string, Page token for files.
1981 corpus: string, The body of items (files/documents) to which the query applies. Deprecated: use 'corpora' instead.
Craig Citro065b5302014-08-14 00:47:23 -07001982 Allowed values
1983 DEFAULT - The items that the user has accessed.
1984 DOMAIN - Items shared to the user's domain.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001985 maxResults: integer, The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001986 teamDriveId: string, Deprecated use driveId instead.
1987 includeItemsFromAllDrives: boolean, Deprecated - Whether both My Drive and shared drive items should be included in results. This parameter will only be effective until June 1, 2020. Afterwards shared drive items will be included in the results.
1988 includeTeamDriveItems: boolean, Deprecated use includeItemsFromAllDrives instead.
1989 corpora: string, Bodies of items (files/documents) to which the query applies. Supported bodies are 'default', 'domain', 'drive' and 'allDrives'. Prefer 'default' or 'drive' to 'allDrives' for efficiency.
1990 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
1991 driveId: string, ID of the shared drive to search.
John Asmuth614db982014-04-24 15:46:26 -04001992
1993Returns:
1994 An object of the form:
1995
1996 { # A list of files.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001997 "incompleteSearch": True or False, # Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple drives with the "allDrives" corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as "default" or "drive".
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001998 "nextPageToken": "A String", # The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.
John Asmuth614db982014-04-24 15:46:26 -04001999 "kind": "drive#fileList", # This is always drive#fileList.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002000 "items": [ # The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
John Asmuth614db982014-04-24 15:46:26 -04002001 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002002 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -04002003 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002004 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07002005 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
2006 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002007 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04002008 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002009 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002010 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002011 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002012 "hidden": True or False, # Deprecated.
2013 "starred": True or False, # Whether this file is starred by the user.
2014 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04002015 },
2016 "indexableText": { # Indexable text attributes for the file (can only be written)
2017 "text": "A String", # The text to be indexed for this file.
2018 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002019 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07002020 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002021 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04002022 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002023 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
2024 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002025 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04002026 "picture": { # The user's profile picture.
2027 "url": "A String", # A URL that points to a profile picture of this user.
2028 },
2029 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002030 "displayName": "A String", # A plain text displayable name for this user.
2031 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002032 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2033 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002034 },
2035 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002036 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002037 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002038 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07002039 "picture": { # The user's profile picture.
2040 "url": "A String", # A URL that points to a profile picture of this user.
2041 },
2042 "kind": "drive#user", # This is always drive#user.
2043 "displayName": "A String", # A plain text displayable name for this user.
2044 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2045 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2046 "emailAddress": "A String", # The email address of the user.
2047 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002048 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002049 "picture": { # The user's profile picture.
2050 "url": "A String", # A URL that points to a profile picture of this user.
2051 },
2052 "kind": "drive#user", # This is always drive#user.
2053 "displayName": "A String", # A plain text displayable name for this user.
2054 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2055 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2056 "emailAddress": "A String", # The email address of the user.
2057 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002058 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002059 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002060 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04002061 "picture": { # The user's profile picture.
2062 "url": "A String", # A URL that points to a profile picture of this user.
2063 },
2064 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002065 "displayName": "A String", # A plain text displayable name for this user.
2066 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002067 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2068 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002069 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002070 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002071 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002072 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002073 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002074 "A String",
2075 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002076 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002077 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002078 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002079 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
2080 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2081 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2082 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
2083 "canRename": True or False, # Whether the current user can rename this file.
2084 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
2085 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
2086 "canChangeRestrictedDownload": True or False, # Deprecated
2087 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
2088 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2089 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2090 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
2091 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
2092 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
2093 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2094 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2095 "canComment": True or False, # Whether the current user can comment on this file.
2096 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2097 "canTrash": True or False, # Whether the current user can move this file to trash.
2098 "canDelete": True or False, # Whether the current user can delete this file.
2099 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2100 "canDownload": True or False, # Whether the current user can download this file.
2101 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2102 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2103 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
2104 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
2105 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002106 },
John Asmuth614db982014-04-24 15:46:26 -04002107 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2108 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
2109 "etag": "A String", # ETag of the file.
2110 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002111 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -04002112 { # A reference to a file's parent.
2113 "selfLink": "A String", # A link back to this reference.
2114 "kind": "drive#parentReference", # This is always drive#parentReference.
2115 "id": "A String", # The ID of the parent.
2116 "isRoot": True or False, # Whether or not the parent is the root folder.
2117 "parentLink": "A String", # A link to the parent.
2118 },
2119 ],
2120 "exportLinks": { # Links for exporting Google Docs to specific formats.
2121 "a_key": "A String", # A mapping from export format to URL
2122 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002123 "shareable": True or False, # Deprecated: use capabilities/canShare.
2124 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2125 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002126 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
2127 "a_key": "A String",
2128 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002129 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04002130 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
2131 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
2132 "exposureTime": 3.14, # The length of the exposure, in seconds.
2133 "cameraMake": "A String", # The make of the camera used to create the photo.
2134 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2135 "isoSpeed": 42, # The ISO speed used to create the photo.
2136 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
2137 "exposureMode": "A String", # The exposure mode used to create the photo.
2138 "colorSpace": "A String", # The color space of the photo.
2139 "location": { # Geographic location information stored in the image.
2140 "latitude": 3.14, # The latitude stored in the image.
2141 "altitude": 3.14, # The altitude stored in the image.
2142 "longitude": 3.14, # The longitude stored in the image.
2143 },
2144 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
2145 "height": 42, # The height of the image in pixels.
2146 "lens": "A String", # The lens used to create the photo.
2147 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
2148 "width": 42, # The width of the image in pixels.
2149 "meteringMode": "A String", # The metering mode used to create the photo.
2150 "flashUsed": True or False, # Whether a flash was used to create the photo.
2151 "aperture": 3.14, # The aperture used to create the photo (f-number).
2152 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
2153 "sensor": "A String", # The type of sensor used to create the photo.
2154 "whiteBalance": "A String", # The white balance mode used to create the photo.
2155 "cameraModel": "A String", # The model of the camera used to create the photo.
2156 },
2157 "description": "A String", # A short description of the file.
2158 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002159 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
2160 "width": 42, # The width of the video in pixels.
2161 "durationMillis": "A String", # The duration of the video in milliseconds.
2162 "height": 42, # The height of the video in pixels.
2163 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002164 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04002165 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002166 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04002167 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002168 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002169 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002170 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04002171 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002172 { # A key-value pair attached to a file that is either public or private to an application.
2173 # The following limits apply to file properties:
2174 # - Maximum of 100 properties total per file
2175 # - Maximum of 30 private properties per app
2176 # - Maximum of 30 public properties
2177 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04002178 "kind": "drive#property", # This is always drive#property.
2179 "value": "A String", # The value of this property.
2180 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002181 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04002182 "key": "A String", # The key of this property.
2183 "selfLink": "A String", # The link back to this property.
2184 },
2185 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002186 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002187 "iconLink": "A String", # A link to the file's icon.
2188 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
2189 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002190 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002191 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
2192 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -04002193 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002194 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07002195 "mimeType": "A String", # The MIME type of the thumbnail.
2196 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2197 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002198 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002199 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
2200 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07002201 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002202 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002203 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002204 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2205 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002206 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002207 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002208 # - reader
2209 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
2210 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
2211 # - file
2212 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002213 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2214 "A String",
2215 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002216 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2217 },
2218 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002219 "name": "A String", # The name for this permission.
2220 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
2221 {
2222 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
2223 "role": "A String", # Deprecated - use permissionDetails/role instead.
2224 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
2225 "A String",
2226 ],
2227 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
2228 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
2229 },
2230 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002231 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04002232 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002233 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2234 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002235 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04002236 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08002237 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002238 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2239 # - They can only be set on user and group permissions
2240 # - The date must be in the future
2241 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002242 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002243 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04002244 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002245 # - organizer
2246 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04002247 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002248 # - reader
John Asmuth614db982014-04-24 15:46:26 -04002249 "type": "A String", # The account type. Allowed values are:
2250 # - user
2251 # - group
2252 # - domain
2253 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002254 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04002255 "A String",
2256 ],
2257 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002258 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04002259 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002260 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002261 "A String",
2262 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002263 "permissionIds": [ # List of permission IDs for users with access to this file.
2264 "A String",
2265 ],
2266 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
2267 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2268 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
2269 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
2270 { # A permission for a file.
2271 "withLink": True or False, # Whether the link is required for this permission.
2272 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
2273 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
2274 {
2275 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2276 # - organizer
2277 # - fileOrganizer
2278 # - writer
2279 # - reader
2280 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
2281 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
2282 # - file
2283 # - member
2284 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2285 "A String",
2286 ],
2287 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2288 },
2289 ],
2290 "name": "A String", # The name for this permission.
2291 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
2292 {
2293 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
2294 "role": "A String", # Deprecated - use permissionDetails/role instead.
2295 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
2296 "A String",
2297 ],
2298 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
2299 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
2300 },
2301 ],
2302 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
2303 "kind": "drive#permission", # This is always drive#permission.
2304 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2305 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2306 "authKey": "A String", # Deprecated.
2307 "etag": "A String", # The ETag of the permission.
2308 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
2309 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2310 # - They can only be set on user and group permissions
2311 # - The date must be in the future
2312 # - The date cannot be more than a year in the future
2313 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
2314 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2315 # - owner
2316 # - organizer
2317 # - fileOrganizer
2318 # - writer
2319 # - reader
2320 "type": "A String", # The account type. Allowed values are:
2321 # - user
2322 # - group
2323 # - domain
2324 # - anyone
2325 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2326 "A String",
2327 ],
2328 "selfLink": "A String", # A link back to this permission.
2329 "photoLink": "A String", # A link to the profile photo, if available.
2330 },
2331 ],
2332 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002333 "selfLink": "A String", # A link back to this file.
2334 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
2335 },
2336 ],
2337 "nextLink": "A String", # A link to the next page of files.
2338 "etag": "A String", # The ETag of the list.
2339 "selfLink": "A String", # A link back to this list.
2340 }</pre>
2341</div>
2342
2343<div class="method">
2344 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2345 <pre>Retrieves the next page of results.
2346
2347Args:
2348 previous_request: The request for the previous page. (required)
2349 previous_response: The response from the request for the previous page. (required)
2350
2351Returns:
2352 A request object that you can call 'execute()' on to request the next
2353 page. Returns None if there are no more items in the collection.
2354 </pre>
2355</div>
2356
2357<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002358 <code class="details" id="patch">patch(fileId, body, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, pinned=None, ocrLanguage=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, setModifiedDate=None, timedTextLanguage=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04002359 <pre>Updates file metadata and/or content. This method supports patch semantics.
2360
2361Args:
2362 fileId: string, The ID of the file to update. (required)
2363 body: object, The request body. (required)
2364 The object takes the form of:
2365
2366{ # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002367 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -04002368 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002369 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07002370 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
2371 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002372 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04002373 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002374 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002375 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002376 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002377 "hidden": True or False, # Deprecated.
2378 "starred": True or False, # Whether this file is starred by the user.
2379 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04002380 },
2381 "indexableText": { # Indexable text attributes for the file (can only be written)
2382 "text": "A String", # The text to be indexed for this file.
2383 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002384 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07002385 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002386 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04002387 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002388 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
2389 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002390 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04002391 "picture": { # The user's profile picture.
2392 "url": "A String", # A URL that points to a profile picture of this user.
2393 },
2394 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002395 "displayName": "A String", # A plain text displayable name for this user.
2396 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002397 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2398 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002399 },
2400 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002401 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002402 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002403 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07002404 "picture": { # The user's profile picture.
2405 "url": "A String", # A URL that points to a profile picture of this user.
2406 },
2407 "kind": "drive#user", # This is always drive#user.
2408 "displayName": "A String", # A plain text displayable name for this user.
2409 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2410 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2411 "emailAddress": "A String", # The email address of the user.
2412 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002413 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002414 "picture": { # The user's profile picture.
2415 "url": "A String", # A URL that points to a profile picture of this user.
2416 },
2417 "kind": "drive#user", # This is always drive#user.
2418 "displayName": "A String", # A plain text displayable name for this user.
2419 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2420 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2421 "emailAddress": "A String", # The email address of the user.
2422 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002423 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002424 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002425 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04002426 "picture": { # The user's profile picture.
2427 "url": "A String", # A URL that points to a profile picture of this user.
2428 },
2429 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002430 "displayName": "A String", # A plain text displayable name for this user.
2431 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002432 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2433 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002434 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002435 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002436 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002437 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002438 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002439 "A String",
2440 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002441 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002442 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002443 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002444 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
2445 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2446 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2447 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
2448 "canRename": True or False, # Whether the current user can rename this file.
2449 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
2450 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
2451 "canChangeRestrictedDownload": True or False, # Deprecated
2452 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
2453 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2454 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2455 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
2456 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
2457 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
2458 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2459 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2460 "canComment": True or False, # Whether the current user can comment on this file.
2461 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2462 "canTrash": True or False, # Whether the current user can move this file to trash.
2463 "canDelete": True or False, # Whether the current user can delete this file.
2464 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2465 "canDownload": True or False, # Whether the current user can download this file.
2466 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2467 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2468 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
2469 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
2470 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002471 },
John Asmuth614db982014-04-24 15:46:26 -04002472 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2473 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
2474 "etag": "A String", # ETag of the file.
2475 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002476 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -04002477 { # A reference to a file's parent.
2478 "selfLink": "A String", # A link back to this reference.
2479 "kind": "drive#parentReference", # This is always drive#parentReference.
2480 "id": "A String", # The ID of the parent.
2481 "isRoot": True or False, # Whether or not the parent is the root folder.
2482 "parentLink": "A String", # A link to the parent.
2483 },
2484 ],
2485 "exportLinks": { # Links for exporting Google Docs to specific formats.
2486 "a_key": "A String", # A mapping from export format to URL
2487 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002488 "shareable": True or False, # Deprecated: use capabilities/canShare.
2489 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2490 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002491 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
2492 "a_key": "A String",
2493 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002494 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04002495 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
2496 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
2497 "exposureTime": 3.14, # The length of the exposure, in seconds.
2498 "cameraMake": "A String", # The make of the camera used to create the photo.
2499 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2500 "isoSpeed": 42, # The ISO speed used to create the photo.
2501 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
2502 "exposureMode": "A String", # The exposure mode used to create the photo.
2503 "colorSpace": "A String", # The color space of the photo.
2504 "location": { # Geographic location information stored in the image.
2505 "latitude": 3.14, # The latitude stored in the image.
2506 "altitude": 3.14, # The altitude stored in the image.
2507 "longitude": 3.14, # The longitude stored in the image.
2508 },
2509 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
2510 "height": 42, # The height of the image in pixels.
2511 "lens": "A String", # The lens used to create the photo.
2512 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
2513 "width": 42, # The width of the image in pixels.
2514 "meteringMode": "A String", # The metering mode used to create the photo.
2515 "flashUsed": True or False, # Whether a flash was used to create the photo.
2516 "aperture": 3.14, # The aperture used to create the photo (f-number).
2517 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
2518 "sensor": "A String", # The type of sensor used to create the photo.
2519 "whiteBalance": "A String", # The white balance mode used to create the photo.
2520 "cameraModel": "A String", # The model of the camera used to create the photo.
2521 },
2522 "description": "A String", # A short description of the file.
2523 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002524 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
2525 "width": 42, # The width of the video in pixels.
2526 "durationMillis": "A String", # The duration of the video in milliseconds.
2527 "height": 42, # The height of the video in pixels.
2528 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002529 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04002530 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002531 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04002532 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002533 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002534 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002535 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04002536 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002537 { # A key-value pair attached to a file that is either public or private to an application.
2538 # The following limits apply to file properties:
2539 # - Maximum of 100 properties total per file
2540 # - Maximum of 30 private properties per app
2541 # - Maximum of 30 public properties
2542 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04002543 "kind": "drive#property", # This is always drive#property.
2544 "value": "A String", # The value of this property.
2545 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002546 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04002547 "key": "A String", # The key of this property.
2548 "selfLink": "A String", # The link back to this property.
2549 },
2550 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002551 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002552 "iconLink": "A String", # A link to the file's icon.
2553 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
2554 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002555 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002556 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
2557 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -04002558 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002559 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07002560 "mimeType": "A String", # The MIME type of the thumbnail.
2561 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2562 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002563 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002564 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
2565 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07002566 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002567 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002568 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002569 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2570 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002571 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002572 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002573 # - reader
2574 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
2575 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
2576 # - file
2577 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002578 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2579 "A String",
2580 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002581 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2582 },
2583 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002584 "name": "A String", # The name for this permission.
2585 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
2586 {
2587 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
2588 "role": "A String", # Deprecated - use permissionDetails/role instead.
2589 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
2590 "A String",
2591 ],
2592 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
2593 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
2594 },
2595 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002596 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04002597 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002598 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2599 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002600 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04002601 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08002602 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002603 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2604 # - They can only be set on user and group permissions
2605 # - The date must be in the future
2606 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002607 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002608 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04002609 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002610 # - organizer
2611 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04002612 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002613 # - reader
John Asmuth614db982014-04-24 15:46:26 -04002614 "type": "A String", # The account type. Allowed values are:
2615 # - user
2616 # - group
2617 # - domain
2618 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002619 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04002620 "A String",
2621 ],
2622 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002623 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04002624 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002625 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002626 "A String",
2627 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002628 "permissionIds": [ # List of permission IDs for users with access to this file.
2629 "A String",
2630 ],
2631 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
2632 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2633 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
2634 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
2635 { # A permission for a file.
2636 "withLink": True or False, # Whether the link is required for this permission.
2637 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
2638 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
2639 {
2640 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2641 # - organizer
2642 # - fileOrganizer
2643 # - writer
2644 # - reader
2645 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
2646 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
2647 # - file
2648 # - member
2649 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2650 "A String",
2651 ],
2652 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2653 },
2654 ],
2655 "name": "A String", # The name for this permission.
2656 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
2657 {
2658 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
2659 "role": "A String", # Deprecated - use permissionDetails/role instead.
2660 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
2661 "A String",
2662 ],
2663 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
2664 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
2665 },
2666 ],
2667 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
2668 "kind": "drive#permission", # This is always drive#permission.
2669 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2670 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2671 "authKey": "A String", # Deprecated.
2672 "etag": "A String", # The ETag of the permission.
2673 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
2674 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2675 # - They can only be set on user and group permissions
2676 # - The date must be in the future
2677 # - The date cannot be more than a year in the future
2678 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
2679 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2680 # - owner
2681 # - organizer
2682 # - fileOrganizer
2683 # - writer
2684 # - reader
2685 "type": "A String", # The account type. Allowed values are:
2686 # - user
2687 # - group
2688 # - domain
2689 # - anyone
2690 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2691 "A String",
2692 ],
2693 "selfLink": "A String", # A link back to this permission.
2694 "photoLink": "A String", # A link to the profile photo, if available.
2695 },
2696 ],
2697 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002698 "selfLink": "A String", # A link back to this file.
2699 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
2700}
2701
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002702 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Takashi Matsuo06694102015-09-11 13:55:40 -07002703 newRevision: boolean, Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center.
2704 modifiedDateBehavior: string, Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
2705 Allowed values
2706 fromBody - Set modifiedDate to the value provided in the body of the request. No change if no value was provided.
2707 fromBodyIfNeeded - Set modifiedDate to the value provided in the body of the request depending on other contents of the update.
2708 fromBodyOrNow - Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.
2709 noChange - Maintain the previous value of modifiedDate.
2710 now - Set modifiedDate to the current time.
2711 nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002712 pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002713 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
John Asmuth614db982014-04-24 15:46:26 -04002714 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Craig Citro065b5302014-08-14 00:47:23 -07002715 addParents: string, Comma-separated list of parent IDs to add.
2716 removeParents: string, Comma-separated list of parent IDs to remove.
John Asmuth614db982014-04-24 15:46:26 -04002717 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
2718 timedTextTrackName: string, The timed text track name.
Takashi Matsuo06694102015-09-11 13:55:40 -07002719 convert: boolean, This parameter is deprecated and has no function.
John Asmuth614db982014-04-24 15:46:26 -04002720 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002721 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
2722 setModifiedDate: boolean, Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange.
John Asmuth614db982014-04-24 15:46:26 -04002723 timedTextLanguage: string, The language of the timed text.
2724
2725Returns:
2726 An object of the form:
2727
2728 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002729 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -04002730 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002731 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07002732 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
2733 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002734 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04002735 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002736 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002737 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002738 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002739 "hidden": True or False, # Deprecated.
2740 "starred": True or False, # Whether this file is starred by the user.
2741 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04002742 },
2743 "indexableText": { # Indexable text attributes for the file (can only be written)
2744 "text": "A String", # The text to be indexed for this file.
2745 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002746 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07002747 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002748 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04002749 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002750 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
2751 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002752 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04002753 "picture": { # The user's profile picture.
2754 "url": "A String", # A URL that points to a profile picture of this user.
2755 },
2756 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002757 "displayName": "A String", # A plain text displayable name for this user.
2758 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002759 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2760 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002761 },
2762 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002763 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002764 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002765 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07002766 "picture": { # The user's profile picture.
2767 "url": "A String", # A URL that points to a profile picture of this user.
2768 },
2769 "kind": "drive#user", # This is always drive#user.
2770 "displayName": "A String", # A plain text displayable name for this user.
2771 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2772 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2773 "emailAddress": "A String", # The email address of the user.
2774 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002775 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002776 "picture": { # The user's profile picture.
2777 "url": "A String", # A URL that points to a profile picture of this user.
2778 },
2779 "kind": "drive#user", # This is always drive#user.
2780 "displayName": "A String", # A plain text displayable name for this user.
2781 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2782 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2783 "emailAddress": "A String", # The email address of the user.
2784 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002785 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002786 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002787 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04002788 "picture": { # The user's profile picture.
2789 "url": "A String", # A URL that points to a profile picture of this user.
2790 },
2791 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002792 "displayName": "A String", # A plain text displayable name for this user.
2793 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002794 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2795 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002796 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002797 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002798 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002799 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002800 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002801 "A String",
2802 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002803 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002804 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002805 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002806 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
2807 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2808 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2809 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
2810 "canRename": True or False, # Whether the current user can rename this file.
2811 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
2812 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
2813 "canChangeRestrictedDownload": True or False, # Deprecated
2814 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
2815 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2816 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2817 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
2818 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
2819 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
2820 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2821 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2822 "canComment": True or False, # Whether the current user can comment on this file.
2823 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2824 "canTrash": True or False, # Whether the current user can move this file to trash.
2825 "canDelete": True or False, # Whether the current user can delete this file.
2826 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2827 "canDownload": True or False, # Whether the current user can download this file.
2828 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2829 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2830 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
2831 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
2832 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002833 },
John Asmuth614db982014-04-24 15:46:26 -04002834 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2835 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
2836 "etag": "A String", # ETag of the file.
2837 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002838 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -04002839 { # A reference to a file's parent.
2840 "selfLink": "A String", # A link back to this reference.
2841 "kind": "drive#parentReference", # This is always drive#parentReference.
2842 "id": "A String", # The ID of the parent.
2843 "isRoot": True or False, # Whether or not the parent is the root folder.
2844 "parentLink": "A String", # A link to the parent.
2845 },
2846 ],
2847 "exportLinks": { # Links for exporting Google Docs to specific formats.
2848 "a_key": "A String", # A mapping from export format to URL
2849 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002850 "shareable": True or False, # Deprecated: use capabilities/canShare.
2851 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2852 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002853 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
2854 "a_key": "A String",
2855 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002856 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04002857 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
2858 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
2859 "exposureTime": 3.14, # The length of the exposure, in seconds.
2860 "cameraMake": "A String", # The make of the camera used to create the photo.
2861 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2862 "isoSpeed": 42, # The ISO speed used to create the photo.
2863 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
2864 "exposureMode": "A String", # The exposure mode used to create the photo.
2865 "colorSpace": "A String", # The color space of the photo.
2866 "location": { # Geographic location information stored in the image.
2867 "latitude": 3.14, # The latitude stored in the image.
2868 "altitude": 3.14, # The altitude stored in the image.
2869 "longitude": 3.14, # The longitude stored in the image.
2870 },
2871 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
2872 "height": 42, # The height of the image in pixels.
2873 "lens": "A String", # The lens used to create the photo.
2874 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
2875 "width": 42, # The width of the image in pixels.
2876 "meteringMode": "A String", # The metering mode used to create the photo.
2877 "flashUsed": True or False, # Whether a flash was used to create the photo.
2878 "aperture": 3.14, # The aperture used to create the photo (f-number).
2879 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
2880 "sensor": "A String", # The type of sensor used to create the photo.
2881 "whiteBalance": "A String", # The white balance mode used to create the photo.
2882 "cameraModel": "A String", # The model of the camera used to create the photo.
2883 },
2884 "description": "A String", # A short description of the file.
2885 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002886 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
2887 "width": 42, # The width of the video in pixels.
2888 "durationMillis": "A String", # The duration of the video in milliseconds.
2889 "height": 42, # The height of the video in pixels.
2890 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002891 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04002892 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002893 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04002894 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002895 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002896 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002897 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04002898 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002899 { # A key-value pair attached to a file that is either public or private to an application.
2900 # The following limits apply to file properties:
2901 # - Maximum of 100 properties total per file
2902 # - Maximum of 30 private properties per app
2903 # - Maximum of 30 public properties
2904 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04002905 "kind": "drive#property", # This is always drive#property.
2906 "value": "A String", # The value of this property.
2907 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002908 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04002909 "key": "A String", # The key of this property.
2910 "selfLink": "A String", # The link back to this property.
2911 },
2912 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002913 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002914 "iconLink": "A String", # A link to the file's icon.
2915 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
2916 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002917 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002918 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
2919 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -04002920 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002921 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07002922 "mimeType": "A String", # The MIME type of the thumbnail.
2923 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2924 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002925 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002926 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
2927 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07002928 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002929 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002930 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002931 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2932 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002933 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002934 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002935 # - reader
2936 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
2937 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
2938 # - file
2939 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002940 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2941 "A String",
2942 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002943 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2944 },
2945 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002946 "name": "A String", # The name for this permission.
2947 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
2948 {
2949 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
2950 "role": "A String", # Deprecated - use permissionDetails/role instead.
2951 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
2952 "A String",
2953 ],
2954 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
2955 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
2956 },
2957 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002958 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04002959 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002960 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2961 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002962 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04002963 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08002964 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002965 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2966 # - They can only be set on user and group permissions
2967 # - The date must be in the future
2968 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002969 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002970 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04002971 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002972 # - organizer
2973 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04002974 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002975 # - reader
John Asmuth614db982014-04-24 15:46:26 -04002976 "type": "A String", # The account type. Allowed values are:
2977 # - user
2978 # - group
2979 # - domain
2980 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002981 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04002982 "A String",
2983 ],
2984 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002985 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04002986 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002987 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002988 "A String",
2989 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002990 "permissionIds": [ # List of permission IDs for users with access to this file.
2991 "A String",
2992 ],
2993 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
2994 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2995 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
2996 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
2997 { # A permission for a file.
2998 "withLink": True or False, # Whether the link is required for this permission.
2999 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3000 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
3001 {
3002 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3003 # - organizer
3004 # - fileOrganizer
3005 # - writer
3006 # - reader
3007 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
3008 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
3009 # - file
3010 # - member
3011 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3012 "A String",
3013 ],
3014 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3015 },
3016 ],
3017 "name": "A String", # The name for this permission.
3018 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
3019 {
3020 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
3021 "role": "A String", # Deprecated - use permissionDetails/role instead.
3022 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
3023 "A String",
3024 ],
3025 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
3026 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
3027 },
3028 ],
3029 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
3030 "kind": "drive#permission", # This is always drive#permission.
3031 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3032 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3033 "authKey": "A String", # Deprecated.
3034 "etag": "A String", # The ETag of the permission.
3035 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3036 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3037 # - They can only be set on user and group permissions
3038 # - The date must be in the future
3039 # - The date cannot be more than a year in the future
3040 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3041 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3042 # - owner
3043 # - organizer
3044 # - fileOrganizer
3045 # - writer
3046 # - reader
3047 "type": "A String", # The account type. Allowed values are:
3048 # - user
3049 # - group
3050 # - domain
3051 # - anyone
3052 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3053 "A String",
3054 ],
3055 "selfLink": "A String", # A link back to this permission.
3056 "photoLink": "A String", # A link to the profile photo, if available.
3057 },
3058 ],
3059 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003060 "selfLink": "A String", # A link back to this file.
3061 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
3062 }</pre>
3063</div>
3064
3065<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003066 <code class="details" id="touch">touch(fileId, supportsTeamDrives=None, supportsAllDrives=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04003067 <pre>Set the file's updated time to the current server time.
3068
3069Args:
3070 fileId: string, The ID of the file to update. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003071 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
3072 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003073
3074Returns:
3075 An object of the form:
3076
3077 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003078 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -04003079 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003080 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07003081 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
3082 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003083 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04003084 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003085 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003086 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003087 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003088 "hidden": True or False, # Deprecated.
3089 "starred": True or False, # Whether this file is starred by the user.
3090 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04003091 },
3092 "indexableText": { # Indexable text attributes for the file (can only be written)
3093 "text": "A String", # The text to be indexed for this file.
3094 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003095 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07003096 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003097 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04003098 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003099 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
3100 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003101 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04003102 "picture": { # The user's profile picture.
3103 "url": "A String", # A URL that points to a profile picture of this user.
3104 },
3105 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003106 "displayName": "A String", # A plain text displayable name for this user.
3107 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003108 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3109 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003110 },
3111 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003112 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003113 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003114 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003115 "picture": { # The user's profile picture.
3116 "url": "A String", # A URL that points to a profile picture of this user.
3117 },
3118 "kind": "drive#user", # This is always drive#user.
3119 "displayName": "A String", # A plain text displayable name for this user.
3120 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3121 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3122 "emailAddress": "A String", # The email address of the user.
3123 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003124 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003125 "picture": { # The user's profile picture.
3126 "url": "A String", # A URL that points to a profile picture of this user.
3127 },
3128 "kind": "drive#user", # This is always drive#user.
3129 "displayName": "A String", # A plain text displayable name for this user.
3130 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3131 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3132 "emailAddress": "A String", # The email address of the user.
3133 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003134 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003135 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003136 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04003137 "picture": { # The user's profile picture.
3138 "url": "A String", # A URL that points to a profile picture of this user.
3139 },
3140 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003141 "displayName": "A String", # A plain text displayable name for this user.
3142 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003143 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3144 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003145 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003146 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003147 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003148 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003149 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003150 "A String",
3151 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003152 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003153 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003154 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003155 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
3156 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3157 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3158 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
3159 "canRename": True or False, # Whether the current user can rename this file.
3160 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
3161 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
3162 "canChangeRestrictedDownload": True or False, # Deprecated
3163 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
3164 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3165 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3166 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
3167 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
3168 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
3169 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3170 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3171 "canComment": True or False, # Whether the current user can comment on this file.
3172 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3173 "canTrash": True or False, # Whether the current user can move this file to trash.
3174 "canDelete": True or False, # Whether the current user can delete this file.
3175 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3176 "canDownload": True or False, # Whether the current user can download this file.
3177 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3178 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3179 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
3180 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
3181 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003182 },
John Asmuth614db982014-04-24 15:46:26 -04003183 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3184 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
3185 "etag": "A String", # ETag of the file.
3186 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003187 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -04003188 { # A reference to a file's parent.
3189 "selfLink": "A String", # A link back to this reference.
3190 "kind": "drive#parentReference", # This is always drive#parentReference.
3191 "id": "A String", # The ID of the parent.
3192 "isRoot": True or False, # Whether or not the parent is the root folder.
3193 "parentLink": "A String", # A link to the parent.
3194 },
3195 ],
3196 "exportLinks": { # Links for exporting Google Docs to specific formats.
3197 "a_key": "A String", # A mapping from export format to URL
3198 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003199 "shareable": True or False, # Deprecated: use capabilities/canShare.
3200 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3201 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003202 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
3203 "a_key": "A String",
3204 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003205 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04003206 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
3207 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
3208 "exposureTime": 3.14, # The length of the exposure, in seconds.
3209 "cameraMake": "A String", # The make of the camera used to create the photo.
3210 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3211 "isoSpeed": 42, # The ISO speed used to create the photo.
3212 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
3213 "exposureMode": "A String", # The exposure mode used to create the photo.
3214 "colorSpace": "A String", # The color space of the photo.
3215 "location": { # Geographic location information stored in the image.
3216 "latitude": 3.14, # The latitude stored in the image.
3217 "altitude": 3.14, # The altitude stored in the image.
3218 "longitude": 3.14, # The longitude stored in the image.
3219 },
3220 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
3221 "height": 42, # The height of the image in pixels.
3222 "lens": "A String", # The lens used to create the photo.
3223 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
3224 "width": 42, # The width of the image in pixels.
3225 "meteringMode": "A String", # The metering mode used to create the photo.
3226 "flashUsed": True or False, # Whether a flash was used to create the photo.
3227 "aperture": 3.14, # The aperture used to create the photo (f-number).
3228 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
3229 "sensor": "A String", # The type of sensor used to create the photo.
3230 "whiteBalance": "A String", # The white balance mode used to create the photo.
3231 "cameraModel": "A String", # The model of the camera used to create the photo.
3232 },
3233 "description": "A String", # A short description of the file.
3234 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003235 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
3236 "width": 42, # The width of the video in pixels.
3237 "durationMillis": "A String", # The duration of the video in milliseconds.
3238 "height": 42, # The height of the video in pixels.
3239 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003240 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04003241 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003242 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04003243 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003244 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003245 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003246 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04003247 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003248 { # A key-value pair attached to a file that is either public or private to an application.
3249 # The following limits apply to file properties:
3250 # - Maximum of 100 properties total per file
3251 # - Maximum of 30 private properties per app
3252 # - Maximum of 30 public properties
3253 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04003254 "kind": "drive#property", # This is always drive#property.
3255 "value": "A String", # The value of this property.
3256 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003257 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04003258 "key": "A String", # The key of this property.
3259 "selfLink": "A String", # The link back to this property.
3260 },
3261 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003262 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003263 "iconLink": "A String", # A link to the file's icon.
3264 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
3265 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003266 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003267 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
3268 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -04003269 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003270 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07003271 "mimeType": "A String", # The MIME type of the thumbnail.
3272 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3273 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003274 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003275 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
3276 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07003277 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003278 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003279 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003280 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3281 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003282 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003283 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003284 # - reader
3285 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
3286 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
3287 # - file
3288 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003289 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3290 "A String",
3291 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003292 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3293 },
3294 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003295 "name": "A String", # The name for this permission.
3296 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
3297 {
3298 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
3299 "role": "A String", # Deprecated - use permissionDetails/role instead.
3300 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
3301 "A String",
3302 ],
3303 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
3304 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
3305 },
3306 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003307 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04003308 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003309 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3310 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003311 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04003312 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08003313 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003314 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3315 # - They can only be set on user and group permissions
3316 # - The date must be in the future
3317 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003318 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003319 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04003320 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003321 # - organizer
3322 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003323 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003324 # - reader
John Asmuth614db982014-04-24 15:46:26 -04003325 "type": "A String", # The account type. Allowed values are:
3326 # - user
3327 # - group
3328 # - domain
3329 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003330 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04003331 "A String",
3332 ],
3333 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003334 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04003335 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003336 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003337 "A String",
3338 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003339 "permissionIds": [ # List of permission IDs for users with access to this file.
3340 "A String",
3341 ],
3342 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
3343 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3344 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
3345 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3346 { # A permission for a file.
3347 "withLink": True or False, # Whether the link is required for this permission.
3348 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3349 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
3350 {
3351 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3352 # - organizer
3353 # - fileOrganizer
3354 # - writer
3355 # - reader
3356 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
3357 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
3358 # - file
3359 # - member
3360 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3361 "A String",
3362 ],
3363 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3364 },
3365 ],
3366 "name": "A String", # The name for this permission.
3367 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
3368 {
3369 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
3370 "role": "A String", # Deprecated - use permissionDetails/role instead.
3371 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
3372 "A String",
3373 ],
3374 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
3375 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
3376 },
3377 ],
3378 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
3379 "kind": "drive#permission", # This is always drive#permission.
3380 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3381 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3382 "authKey": "A String", # Deprecated.
3383 "etag": "A String", # The ETag of the permission.
3384 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3385 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3386 # - They can only be set on user and group permissions
3387 # - The date must be in the future
3388 # - The date cannot be more than a year in the future
3389 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3390 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3391 # - owner
3392 # - organizer
3393 # - fileOrganizer
3394 # - writer
3395 # - reader
3396 "type": "A String", # The account type. Allowed values are:
3397 # - user
3398 # - group
3399 # - domain
3400 # - anyone
3401 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3402 "A String",
3403 ],
3404 "selfLink": "A String", # A link back to this permission.
3405 "photoLink": "A String", # A link to the profile photo, if available.
3406 },
3407 ],
3408 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003409 "selfLink": "A String", # A link back to this file.
3410 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
3411 }</pre>
3412</div>
3413
3414<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003415 <code class="details" id="trash">trash(fileId, supportsTeamDrives=None, supportsAllDrives=None)</code>
3416 <pre>Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files.
John Asmuth614db982014-04-24 15:46:26 -04003417
3418Args:
3419 fileId: string, The ID of the file to trash. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003420 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
3421 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003422
3423Returns:
3424 An object of the form:
3425
3426 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003427 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -04003428 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003429 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07003430 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
3431 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003432 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04003433 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003434 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003435 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003436 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003437 "hidden": True or False, # Deprecated.
3438 "starred": True or False, # Whether this file is starred by the user.
3439 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04003440 },
3441 "indexableText": { # Indexable text attributes for the file (can only be written)
3442 "text": "A String", # The text to be indexed for this file.
3443 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003444 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07003445 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003446 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04003447 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003448 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
3449 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003450 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04003451 "picture": { # The user's profile picture.
3452 "url": "A String", # A URL that points to a profile picture of this user.
3453 },
3454 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003455 "displayName": "A String", # A plain text displayable name for this user.
3456 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003457 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3458 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003459 },
3460 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003461 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003462 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003463 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003464 "picture": { # The user's profile picture.
3465 "url": "A String", # A URL that points to a profile picture of this user.
3466 },
3467 "kind": "drive#user", # This is always drive#user.
3468 "displayName": "A String", # A plain text displayable name for this user.
3469 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3470 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3471 "emailAddress": "A String", # The email address of the user.
3472 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003473 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003474 "picture": { # The user's profile picture.
3475 "url": "A String", # A URL that points to a profile picture of this user.
3476 },
3477 "kind": "drive#user", # This is always drive#user.
3478 "displayName": "A String", # A plain text displayable name for this user.
3479 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3480 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3481 "emailAddress": "A String", # The email address of the user.
3482 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003483 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003484 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003485 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04003486 "picture": { # The user's profile picture.
3487 "url": "A String", # A URL that points to a profile picture of this user.
3488 },
3489 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003490 "displayName": "A String", # A plain text displayable name for this user.
3491 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003492 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3493 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003494 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003495 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003496 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003497 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003498 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003499 "A String",
3500 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003501 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003502 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003503 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003504 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
3505 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3506 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3507 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
3508 "canRename": True or False, # Whether the current user can rename this file.
3509 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
3510 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
3511 "canChangeRestrictedDownload": True or False, # Deprecated
3512 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
3513 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3514 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3515 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
3516 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
3517 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
3518 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3519 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3520 "canComment": True or False, # Whether the current user can comment on this file.
3521 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3522 "canTrash": True or False, # Whether the current user can move this file to trash.
3523 "canDelete": True or False, # Whether the current user can delete this file.
3524 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3525 "canDownload": True or False, # Whether the current user can download this file.
3526 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3527 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3528 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
3529 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
3530 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003531 },
John Asmuth614db982014-04-24 15:46:26 -04003532 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3533 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
3534 "etag": "A String", # ETag of the file.
3535 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003536 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -04003537 { # A reference to a file's parent.
3538 "selfLink": "A String", # A link back to this reference.
3539 "kind": "drive#parentReference", # This is always drive#parentReference.
3540 "id": "A String", # The ID of the parent.
3541 "isRoot": True or False, # Whether or not the parent is the root folder.
3542 "parentLink": "A String", # A link to the parent.
3543 },
3544 ],
3545 "exportLinks": { # Links for exporting Google Docs to specific formats.
3546 "a_key": "A String", # A mapping from export format to URL
3547 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003548 "shareable": True or False, # Deprecated: use capabilities/canShare.
3549 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3550 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003551 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
3552 "a_key": "A String",
3553 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003554 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04003555 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
3556 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
3557 "exposureTime": 3.14, # The length of the exposure, in seconds.
3558 "cameraMake": "A String", # The make of the camera used to create the photo.
3559 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3560 "isoSpeed": 42, # The ISO speed used to create the photo.
3561 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
3562 "exposureMode": "A String", # The exposure mode used to create the photo.
3563 "colorSpace": "A String", # The color space of the photo.
3564 "location": { # Geographic location information stored in the image.
3565 "latitude": 3.14, # The latitude stored in the image.
3566 "altitude": 3.14, # The altitude stored in the image.
3567 "longitude": 3.14, # The longitude stored in the image.
3568 },
3569 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
3570 "height": 42, # The height of the image in pixels.
3571 "lens": "A String", # The lens used to create the photo.
3572 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
3573 "width": 42, # The width of the image in pixels.
3574 "meteringMode": "A String", # The metering mode used to create the photo.
3575 "flashUsed": True or False, # Whether a flash was used to create the photo.
3576 "aperture": 3.14, # The aperture used to create the photo (f-number).
3577 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
3578 "sensor": "A String", # The type of sensor used to create the photo.
3579 "whiteBalance": "A String", # The white balance mode used to create the photo.
3580 "cameraModel": "A String", # The model of the camera used to create the photo.
3581 },
3582 "description": "A String", # A short description of the file.
3583 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003584 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
3585 "width": 42, # The width of the video in pixels.
3586 "durationMillis": "A String", # The duration of the video in milliseconds.
3587 "height": 42, # The height of the video in pixels.
3588 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003589 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04003590 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003591 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04003592 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003593 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003594 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003595 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04003596 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003597 { # A key-value pair attached to a file that is either public or private to an application.
3598 # The following limits apply to file properties:
3599 # - Maximum of 100 properties total per file
3600 # - Maximum of 30 private properties per app
3601 # - Maximum of 30 public properties
3602 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04003603 "kind": "drive#property", # This is always drive#property.
3604 "value": "A String", # The value of this property.
3605 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003606 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04003607 "key": "A String", # The key of this property.
3608 "selfLink": "A String", # The link back to this property.
3609 },
3610 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003611 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003612 "iconLink": "A String", # A link to the file's icon.
3613 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
3614 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003615 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003616 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
3617 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -04003618 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003619 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07003620 "mimeType": "A String", # The MIME type of the thumbnail.
3621 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3622 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003623 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003624 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
3625 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07003626 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003627 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003628 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003629 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3630 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003631 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003632 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003633 # - reader
3634 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
3635 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
3636 # - file
3637 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003638 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3639 "A String",
3640 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003641 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3642 },
3643 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003644 "name": "A String", # The name for this permission.
3645 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
3646 {
3647 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
3648 "role": "A String", # Deprecated - use permissionDetails/role instead.
3649 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
3650 "A String",
3651 ],
3652 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
3653 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
3654 },
3655 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003656 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04003657 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003658 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3659 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003660 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04003661 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08003662 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003663 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3664 # - They can only be set on user and group permissions
3665 # - The date must be in the future
3666 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003667 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003668 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04003669 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003670 # - organizer
3671 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003672 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003673 # - reader
John Asmuth614db982014-04-24 15:46:26 -04003674 "type": "A String", # The account type. Allowed values are:
3675 # - user
3676 # - group
3677 # - domain
3678 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003679 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04003680 "A String",
3681 ],
3682 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003683 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04003684 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003685 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003686 "A String",
3687 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003688 "permissionIds": [ # List of permission IDs for users with access to this file.
3689 "A String",
3690 ],
3691 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
3692 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3693 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
3694 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3695 { # A permission for a file.
3696 "withLink": True or False, # Whether the link is required for this permission.
3697 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3698 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
3699 {
3700 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3701 # - organizer
3702 # - fileOrganizer
3703 # - writer
3704 # - reader
3705 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
3706 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
3707 # - file
3708 # - member
3709 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3710 "A String",
3711 ],
3712 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3713 },
3714 ],
3715 "name": "A String", # The name for this permission.
3716 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
3717 {
3718 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
3719 "role": "A String", # Deprecated - use permissionDetails/role instead.
3720 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
3721 "A String",
3722 ],
3723 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
3724 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
3725 },
3726 ],
3727 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
3728 "kind": "drive#permission", # This is always drive#permission.
3729 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3730 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3731 "authKey": "A String", # Deprecated.
3732 "etag": "A String", # The ETag of the permission.
3733 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3734 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3735 # - They can only be set on user and group permissions
3736 # - The date must be in the future
3737 # - The date cannot be more than a year in the future
3738 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3739 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3740 # - owner
3741 # - organizer
3742 # - fileOrganizer
3743 # - writer
3744 # - reader
3745 "type": "A String", # The account type. Allowed values are:
3746 # - user
3747 # - group
3748 # - domain
3749 # - anyone
3750 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3751 "A String",
3752 ],
3753 "selfLink": "A String", # A link back to this permission.
3754 "photoLink": "A String", # A link to the profile photo, if available.
3755 },
3756 ],
3757 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003758 "selfLink": "A String", # A link back to this file.
3759 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
3760 }</pre>
3761</div>
3762
3763<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003764 <code class="details" id="untrash">untrash(fileId, supportsTeamDrives=None, supportsAllDrives=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04003765 <pre>Restores a file from the trash.
3766
3767Args:
3768 fileId: string, The ID of the file to untrash. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003769 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
3770 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003771
3772Returns:
3773 An object of the form:
3774
3775 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003776 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -04003777 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003778 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07003779 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
3780 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003781 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04003782 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003783 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003784 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003785 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003786 "hidden": True or False, # Deprecated.
3787 "starred": True or False, # Whether this file is starred by the user.
3788 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04003789 },
3790 "indexableText": { # Indexable text attributes for the file (can only be written)
3791 "text": "A String", # The text to be indexed for this file.
3792 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003793 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07003794 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003795 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04003796 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003797 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
3798 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003799 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04003800 "picture": { # The user's profile picture.
3801 "url": "A String", # A URL that points to a profile picture of this user.
3802 },
3803 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003804 "displayName": "A String", # A plain text displayable name for this user.
3805 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003806 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3807 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003808 },
3809 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003810 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003811 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003812 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003813 "picture": { # The user's profile picture.
3814 "url": "A String", # A URL that points to a profile picture of this user.
3815 },
3816 "kind": "drive#user", # This is always drive#user.
3817 "displayName": "A String", # A plain text displayable name for this user.
3818 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3819 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3820 "emailAddress": "A String", # The email address of the user.
3821 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003822 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003823 "picture": { # The user's profile picture.
3824 "url": "A String", # A URL that points to a profile picture of this user.
3825 },
3826 "kind": "drive#user", # This is always drive#user.
3827 "displayName": "A String", # A plain text displayable name for this user.
3828 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3829 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3830 "emailAddress": "A String", # The email address of the user.
3831 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003832 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003833 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003834 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04003835 "picture": { # The user's profile picture.
3836 "url": "A String", # A URL that points to a profile picture of this user.
3837 },
3838 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003839 "displayName": "A String", # A plain text displayable name for this user.
3840 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003841 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3842 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003843 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003844 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003845 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003846 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003847 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003848 "A String",
3849 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003850 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003851 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003852 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003853 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
3854 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3855 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3856 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
3857 "canRename": True or False, # Whether the current user can rename this file.
3858 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
3859 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
3860 "canChangeRestrictedDownload": True or False, # Deprecated
3861 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
3862 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3863 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3864 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
3865 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
3866 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
3867 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3868 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3869 "canComment": True or False, # Whether the current user can comment on this file.
3870 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3871 "canTrash": True or False, # Whether the current user can move this file to trash.
3872 "canDelete": True or False, # Whether the current user can delete this file.
3873 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3874 "canDownload": True or False, # Whether the current user can download this file.
3875 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3876 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3877 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
3878 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
3879 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003880 },
John Asmuth614db982014-04-24 15:46:26 -04003881 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3882 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
3883 "etag": "A String", # ETag of the file.
3884 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003885 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -04003886 { # A reference to a file's parent.
3887 "selfLink": "A String", # A link back to this reference.
3888 "kind": "drive#parentReference", # This is always drive#parentReference.
3889 "id": "A String", # The ID of the parent.
3890 "isRoot": True or False, # Whether or not the parent is the root folder.
3891 "parentLink": "A String", # A link to the parent.
3892 },
3893 ],
3894 "exportLinks": { # Links for exporting Google Docs to specific formats.
3895 "a_key": "A String", # A mapping from export format to URL
3896 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003897 "shareable": True or False, # Deprecated: use capabilities/canShare.
3898 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3899 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003900 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
3901 "a_key": "A String",
3902 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003903 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04003904 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
3905 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
3906 "exposureTime": 3.14, # The length of the exposure, in seconds.
3907 "cameraMake": "A String", # The make of the camera used to create the photo.
3908 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3909 "isoSpeed": 42, # The ISO speed used to create the photo.
3910 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
3911 "exposureMode": "A String", # The exposure mode used to create the photo.
3912 "colorSpace": "A String", # The color space of the photo.
3913 "location": { # Geographic location information stored in the image.
3914 "latitude": 3.14, # The latitude stored in the image.
3915 "altitude": 3.14, # The altitude stored in the image.
3916 "longitude": 3.14, # The longitude stored in the image.
3917 },
3918 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
3919 "height": 42, # The height of the image in pixels.
3920 "lens": "A String", # The lens used to create the photo.
3921 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
3922 "width": 42, # The width of the image in pixels.
3923 "meteringMode": "A String", # The metering mode used to create the photo.
3924 "flashUsed": True or False, # Whether a flash was used to create the photo.
3925 "aperture": 3.14, # The aperture used to create the photo (f-number).
3926 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
3927 "sensor": "A String", # The type of sensor used to create the photo.
3928 "whiteBalance": "A String", # The white balance mode used to create the photo.
3929 "cameraModel": "A String", # The model of the camera used to create the photo.
3930 },
3931 "description": "A String", # A short description of the file.
3932 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003933 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
3934 "width": 42, # The width of the video in pixels.
3935 "durationMillis": "A String", # The duration of the video in milliseconds.
3936 "height": 42, # The height of the video in pixels.
3937 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003938 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04003939 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003940 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04003941 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003942 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003943 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003944 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04003945 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003946 { # A key-value pair attached to a file that is either public or private to an application.
3947 # The following limits apply to file properties:
3948 # - Maximum of 100 properties total per file
3949 # - Maximum of 30 private properties per app
3950 # - Maximum of 30 public properties
3951 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04003952 "kind": "drive#property", # This is always drive#property.
3953 "value": "A String", # The value of this property.
3954 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003955 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04003956 "key": "A String", # The key of this property.
3957 "selfLink": "A String", # The link back to this property.
3958 },
3959 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003960 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003961 "iconLink": "A String", # A link to the file's icon.
3962 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
3963 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003964 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003965 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
3966 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -04003967 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003968 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07003969 "mimeType": "A String", # The MIME type of the thumbnail.
3970 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3971 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003972 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003973 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
3974 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07003975 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003976 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003977 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003978 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3979 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003980 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003981 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003982 # - reader
3983 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
3984 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
3985 # - file
3986 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003987 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3988 "A String",
3989 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003990 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3991 },
3992 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003993 "name": "A String", # The name for this permission.
3994 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
3995 {
3996 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
3997 "role": "A String", # Deprecated - use permissionDetails/role instead.
3998 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
3999 "A String",
4000 ],
4001 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
4002 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
4003 },
4004 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004005 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04004006 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004007 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4008 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004009 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04004010 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08004011 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004012 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
4013 # - They can only be set on user and group permissions
4014 # - The date must be in the future
4015 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004016 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004017 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04004018 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004019 # - organizer
4020 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004021 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004022 # - reader
John Asmuth614db982014-04-24 15:46:26 -04004023 "type": "A String", # The account type. Allowed values are:
4024 # - user
4025 # - group
4026 # - domain
4027 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004028 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04004029 "A String",
4030 ],
4031 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004032 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04004033 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004034 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004035 "A String",
4036 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004037 "permissionIds": [ # List of permission IDs for users with access to this file.
4038 "A String",
4039 ],
4040 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
4041 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4042 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
4043 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4044 { # A permission for a file.
4045 "withLink": True or False, # Whether the link is required for this permission.
4046 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
4047 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
4048 {
4049 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4050 # - organizer
4051 # - fileOrganizer
4052 # - writer
4053 # - reader
4054 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
4055 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
4056 # - file
4057 # - member
4058 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4059 "A String",
4060 ],
4061 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4062 },
4063 ],
4064 "name": "A String", # The name for this permission.
4065 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
4066 {
4067 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
4068 "role": "A String", # Deprecated - use permissionDetails/role instead.
4069 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
4070 "A String",
4071 ],
4072 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
4073 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
4074 },
4075 ],
4076 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
4077 "kind": "drive#permission", # This is always drive#permission.
4078 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4079 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4080 "authKey": "A String", # Deprecated.
4081 "etag": "A String", # The ETag of the permission.
4082 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
4083 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
4084 # - They can only be set on user and group permissions
4085 # - The date must be in the future
4086 # - The date cannot be more than a year in the future
4087 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4088 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
4089 # - owner
4090 # - organizer
4091 # - fileOrganizer
4092 # - writer
4093 # - reader
4094 "type": "A String", # The account type. Allowed values are:
4095 # - user
4096 # - group
4097 # - domain
4098 # - anyone
4099 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4100 "A String",
4101 ],
4102 "selfLink": "A String", # A link back to this permission.
4103 "photoLink": "A String", # A link to the profile photo, if available.
4104 },
4105 ],
4106 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004107 "selfLink": "A String", # A link back to this file.
4108 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
4109 }</pre>
4110</div>
4111
4112<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004113 <code class="details" id="update">update(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, setModifiedDate=None, timedTextLanguage=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04004114 <pre>Updates file metadata and/or content.
4115
4116Args:
4117 fileId: string, The ID of the file to update. (required)
4118 body: object, The request body.
4119 The object takes the form of:
4120
4121{ # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004122 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -04004123 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004124 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07004125 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
4126 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004127 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04004128 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004129 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004130 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004131 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004132 "hidden": True or False, # Deprecated.
4133 "starred": True or False, # Whether this file is starred by the user.
4134 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04004135 },
4136 "indexableText": { # Indexable text attributes for the file (can only be written)
4137 "text": "A String", # The text to be indexed for this file.
4138 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004139 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07004140 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004141 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04004142 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004143 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
4144 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004145 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04004146 "picture": { # The user's profile picture.
4147 "url": "A String", # A URL that points to a profile picture of this user.
4148 },
4149 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04004150 "displayName": "A String", # A plain text displayable name for this user.
4151 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07004152 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4153 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04004154 },
4155 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004156 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004157 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004158 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07004159 "picture": { # The user's profile picture.
4160 "url": "A String", # A URL that points to a profile picture of this user.
4161 },
4162 "kind": "drive#user", # This is always drive#user.
4163 "displayName": "A String", # A plain text displayable name for this user.
4164 "permissionId": "A String", # The user's ID as visible in the permissions collection.
4165 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4166 "emailAddress": "A String", # The email address of the user.
4167 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004168 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004169 "picture": { # The user's profile picture.
4170 "url": "A String", # A URL that points to a profile picture of this user.
4171 },
4172 "kind": "drive#user", # This is always drive#user.
4173 "displayName": "A String", # A plain text displayable name for this user.
4174 "permissionId": "A String", # The user's ID as visible in the permissions collection.
4175 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4176 "emailAddress": "A String", # The email address of the user.
4177 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004178 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004179 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004180 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04004181 "picture": { # The user's profile picture.
4182 "url": "A String", # A URL that points to a profile picture of this user.
4183 },
4184 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04004185 "displayName": "A String", # A plain text displayable name for this user.
4186 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07004187 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4188 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04004189 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004190 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004191 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004192 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004193 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004194 "A String",
4195 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004196 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004197 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004198 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004199 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
4200 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
4201 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
4202 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
4203 "canRename": True or False, # Whether the current user can rename this file.
4204 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
4205 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
4206 "canChangeRestrictedDownload": True or False, # Deprecated
4207 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
4208 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
4209 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
4210 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
4211 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
4212 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
4213 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4214 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4215 "canComment": True or False, # Whether the current user can comment on this file.
4216 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
4217 "canTrash": True or False, # Whether the current user can move this file to trash.
4218 "canDelete": True or False, # Whether the current user can delete this file.
4219 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
4220 "canDownload": True or False, # Whether the current user can download this file.
4221 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
4222 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
4223 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
4224 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
4225 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004226 },
John Asmuth614db982014-04-24 15:46:26 -04004227 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
4228 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
4229 "etag": "A String", # ETag of the file.
4230 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004231 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -04004232 { # A reference to a file's parent.
4233 "selfLink": "A String", # A link back to this reference.
4234 "kind": "drive#parentReference", # This is always drive#parentReference.
4235 "id": "A String", # The ID of the parent.
4236 "isRoot": True or False, # Whether or not the parent is the root folder.
4237 "parentLink": "A String", # A link to the parent.
4238 },
4239 ],
4240 "exportLinks": { # Links for exporting Google Docs to specific formats.
4241 "a_key": "A String", # A mapping from export format to URL
4242 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004243 "shareable": True or False, # Deprecated: use capabilities/canShare.
4244 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
4245 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004246 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
4247 "a_key": "A String",
4248 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004249 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04004250 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
4251 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
4252 "exposureTime": 3.14, # The length of the exposure, in seconds.
4253 "cameraMake": "A String", # The make of the camera used to create the photo.
4254 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4255 "isoSpeed": 42, # The ISO speed used to create the photo.
4256 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
4257 "exposureMode": "A String", # The exposure mode used to create the photo.
4258 "colorSpace": "A String", # The color space of the photo.
4259 "location": { # Geographic location information stored in the image.
4260 "latitude": 3.14, # The latitude stored in the image.
4261 "altitude": 3.14, # The altitude stored in the image.
4262 "longitude": 3.14, # The longitude stored in the image.
4263 },
4264 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
4265 "height": 42, # The height of the image in pixels.
4266 "lens": "A String", # The lens used to create the photo.
4267 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
4268 "width": 42, # The width of the image in pixels.
4269 "meteringMode": "A String", # The metering mode used to create the photo.
4270 "flashUsed": True or False, # Whether a flash was used to create the photo.
4271 "aperture": 3.14, # The aperture used to create the photo (f-number).
4272 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
4273 "sensor": "A String", # The type of sensor used to create the photo.
4274 "whiteBalance": "A String", # The white balance mode used to create the photo.
4275 "cameraModel": "A String", # The model of the camera used to create the photo.
4276 },
4277 "description": "A String", # A short description of the file.
4278 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004279 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
4280 "width": 42, # The width of the video in pixels.
4281 "durationMillis": "A String", # The duration of the video in milliseconds.
4282 "height": 42, # The height of the video in pixels.
4283 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004284 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04004285 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004286 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04004287 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004288 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004289 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004290 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04004291 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004292 { # A key-value pair attached to a file that is either public or private to an application.
4293 # The following limits apply to file properties:
4294 # - Maximum of 100 properties total per file
4295 # - Maximum of 30 private properties per app
4296 # - Maximum of 30 public properties
4297 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04004298 "kind": "drive#property", # This is always drive#property.
4299 "value": "A String", # The value of this property.
4300 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004301 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04004302 "key": "A String", # The key of this property.
4303 "selfLink": "A String", # The link back to this property.
4304 },
4305 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004306 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004307 "iconLink": "A String", # A link to the file's icon.
4308 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
4309 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004310 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004311 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
4312 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -04004313 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004314 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07004315 "mimeType": "A String", # The MIME type of the thumbnail.
4316 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
4317 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004318 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004319 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
4320 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07004321 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004322 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004323 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004324 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4325 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004326 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004327 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004328 # - reader
4329 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
4330 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
4331 # - file
4332 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004333 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4334 "A String",
4335 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004336 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4337 },
4338 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004339 "name": "A String", # The name for this permission.
4340 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
4341 {
4342 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
4343 "role": "A String", # Deprecated - use permissionDetails/role instead.
4344 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
4345 "A String",
4346 ],
4347 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
4348 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
4349 },
4350 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004351 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04004352 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004353 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4354 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004355 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04004356 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08004357 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004358 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
4359 # - They can only be set on user and group permissions
4360 # - The date must be in the future
4361 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004362 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004363 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04004364 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004365 # - organizer
4366 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004367 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004368 # - reader
John Asmuth614db982014-04-24 15:46:26 -04004369 "type": "A String", # The account type. Allowed values are:
4370 # - user
4371 # - group
4372 # - domain
4373 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004374 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04004375 "A String",
4376 ],
4377 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004378 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04004379 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004380 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004381 "A String",
4382 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004383 "permissionIds": [ # List of permission IDs for users with access to this file.
4384 "A String",
4385 ],
4386 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
4387 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4388 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
4389 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4390 { # A permission for a file.
4391 "withLink": True or False, # Whether the link is required for this permission.
4392 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
4393 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
4394 {
4395 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4396 # - organizer
4397 # - fileOrganizer
4398 # - writer
4399 # - reader
4400 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
4401 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
4402 # - file
4403 # - member
4404 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4405 "A String",
4406 ],
4407 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4408 },
4409 ],
4410 "name": "A String", # The name for this permission.
4411 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
4412 {
4413 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
4414 "role": "A String", # Deprecated - use permissionDetails/role instead.
4415 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
4416 "A String",
4417 ],
4418 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
4419 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
4420 },
4421 ],
4422 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
4423 "kind": "drive#permission", # This is always drive#permission.
4424 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4425 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4426 "authKey": "A String", # Deprecated.
4427 "etag": "A String", # The ETag of the permission.
4428 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
4429 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
4430 # - They can only be set on user and group permissions
4431 # - The date must be in the future
4432 # - The date cannot be more than a year in the future
4433 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4434 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
4435 # - owner
4436 # - organizer
4437 # - fileOrganizer
4438 # - writer
4439 # - reader
4440 "type": "A String", # The account type. Allowed values are:
4441 # - user
4442 # - group
4443 # - domain
4444 # - anyone
4445 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4446 "A String",
4447 ],
4448 "selfLink": "A String", # A link back to this permission.
4449 "photoLink": "A String", # A link to the profile photo, if available.
4450 },
4451 ],
4452 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004453 "selfLink": "A String", # A link back to this file.
4454 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
4455}
4456
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004457 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Takashi Matsuo06694102015-09-11 13:55:40 -07004458 newRevision: boolean, Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center.
4459 modifiedDateBehavior: string, Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
4460 Allowed values
4461 fromBody - Set modifiedDate to the value provided in the body of the request. No change if no value was provided.
4462 fromBodyIfNeeded - Set modifiedDate to the value provided in the body of the request depending on other contents of the update.
4463 fromBodyOrNow - Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.
4464 noChange - Maintain the previous value of modifiedDate.
4465 now - Set modifiedDate to the current time.
4466 nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
John Asmuth614db982014-04-24 15:46:26 -04004467 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004468 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
John Asmuth614db982014-04-24 15:46:26 -04004469 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004470 pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.
Craig Citro065b5302014-08-14 00:47:23 -07004471 addParents: string, Comma-separated list of parent IDs to add.
4472 removeParents: string, Comma-separated list of parent IDs to remove.
John Asmuth614db982014-04-24 15:46:26 -04004473 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
4474 timedTextTrackName: string, The timed text track name.
Takashi Matsuo06694102015-09-11 13:55:40 -07004475 convert: boolean, This parameter is deprecated and has no function.
John Asmuth614db982014-04-24 15:46:26 -04004476 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004477 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004478 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004479 setModifiedDate: boolean, Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange.
John Asmuth614db982014-04-24 15:46:26 -04004480 timedTextLanguage: string, The language of the timed text.
4481
4482Returns:
4483 An object of the form:
4484
4485 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004486 "hasThumbnail": True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
John Asmuth614db982014-04-24 15:46:26 -04004487 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004488 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07004489 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
4490 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004491 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04004492 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004493 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004494 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004495 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004496 "hidden": True or False, # Deprecated.
4497 "starred": True or False, # Whether this file is starred by the user.
4498 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04004499 },
4500 "indexableText": { # Indexable text attributes for the file (can only be written)
4501 "text": "A String", # The text to be indexed for this file.
4502 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004503 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07004504 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004505 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04004506 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004507 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
4508 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004509 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04004510 "picture": { # The user's profile picture.
4511 "url": "A String", # A URL that points to a profile picture of this user.
4512 },
4513 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04004514 "displayName": "A String", # A plain text displayable name for this user.
4515 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07004516 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4517 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04004518 },
4519 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004520 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004521 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004522 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07004523 "picture": { # The user's profile picture.
4524 "url": "A String", # A URL that points to a profile picture of this user.
4525 },
4526 "kind": "drive#user", # This is always drive#user.
4527 "displayName": "A String", # A plain text displayable name for this user.
4528 "permissionId": "A String", # The user's ID as visible in the permissions collection.
4529 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4530 "emailAddress": "A String", # The email address of the user.
4531 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004532 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004533 "picture": { # The user's profile picture.
4534 "url": "A String", # A URL that points to a profile picture of this user.
4535 },
4536 "kind": "drive#user", # This is always drive#user.
4537 "displayName": "A String", # A plain text displayable name for this user.
4538 "permissionId": "A String", # The user's ID as visible in the permissions collection.
4539 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4540 "emailAddress": "A String", # The email address of the user.
4541 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004542 "downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004543 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004544 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04004545 "picture": { # The user's profile picture.
4546 "url": "A String", # A URL that points to a profile picture of this user.
4547 },
4548 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04004549 "displayName": "A String", # A plain text displayable name for this user.
4550 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07004551 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4552 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04004553 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004554 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004555 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004556 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004557 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004558 "A String",
4559 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004560 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004561 "canMoveItemOutOfDrive": True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004562 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004563 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
4564 "canDeleteChildren": True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
4565 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
4566 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
4567 "canRename": True or False, # Whether the current user can rename this file.
4568 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
4569 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
4570 "canChangeRestrictedDownload": True or False, # Deprecated
4571 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
4572 "canTrashChildren": True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
4573 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
4574 "canReadRevisions": True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
4575 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
4576 "canCopy": True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
4577 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4578 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4579 "canComment": True or False, # Whether the current user can comment on this file.
4580 "canMoveChildrenOutOfDrive": True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
4581 "canTrash": True or False, # Whether the current user can move this file to trash.
4582 "canDelete": True or False, # Whether the current user can delete this file.
4583 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
4584 "canDownload": True or False, # Whether the current user can download this file.
4585 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
4586 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
4587 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
4588 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
4589 "canEdit": True or False, # Whether the current user can edit this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004590 },
John Asmuth614db982014-04-24 15:46:26 -04004591 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
4592 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
4593 "etag": "A String", # ETag of the file.
4594 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004595 # If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
John Asmuth614db982014-04-24 15:46:26 -04004596 { # A reference to a file's parent.
4597 "selfLink": "A String", # A link back to this reference.
4598 "kind": "drive#parentReference", # This is always drive#parentReference.
4599 "id": "A String", # The ID of the parent.
4600 "isRoot": True or False, # Whether or not the parent is the root folder.
4601 "parentLink": "A String", # A link to the parent.
4602 },
4603 ],
4604 "exportLinks": { # Links for exporting Google Docs to specific formats.
4605 "a_key": "A String", # A mapping from export format to URL
4606 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004607 "shareable": True or False, # Deprecated: use capabilities/canShare.
4608 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
4609 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004610 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
4611 "a_key": "A String",
4612 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004613 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04004614 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
4615 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
4616 "exposureTime": 3.14, # The length of the exposure, in seconds.
4617 "cameraMake": "A String", # The make of the camera used to create the photo.
4618 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4619 "isoSpeed": 42, # The ISO speed used to create the photo.
4620 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
4621 "exposureMode": "A String", # The exposure mode used to create the photo.
4622 "colorSpace": "A String", # The color space of the photo.
4623 "location": { # Geographic location information stored in the image.
4624 "latitude": 3.14, # The latitude stored in the image.
4625 "altitude": 3.14, # The altitude stored in the image.
4626 "longitude": 3.14, # The longitude stored in the image.
4627 },
4628 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
4629 "height": 42, # The height of the image in pixels.
4630 "lens": "A String", # The lens used to create the photo.
4631 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
4632 "width": 42, # The width of the image in pixels.
4633 "meteringMode": "A String", # The metering mode used to create the photo.
4634 "flashUsed": True or False, # Whether a flash was used to create the photo.
4635 "aperture": 3.14, # The aperture used to create the photo (f-number).
4636 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
4637 "sensor": "A String", # The type of sensor used to create the photo.
4638 "whiteBalance": "A String", # The white balance mode used to create the photo.
4639 "cameraModel": "A String", # The model of the camera used to create the photo.
4640 },
4641 "description": "A String", # A short description of the file.
4642 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004643 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
4644 "width": 42, # The width of the video in pixels.
4645 "durationMillis": "A String", # The duration of the video in milliseconds.
4646 "height": 42, # The height of the video in pixels.
4647 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004648 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04004649 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004650 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04004651 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004652 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004653 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004654 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04004655 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004656 { # A key-value pair attached to a file that is either public or private to an application.
4657 # The following limits apply to file properties:
4658 # - Maximum of 100 properties total per file
4659 # - Maximum of 30 private properties per app
4660 # - Maximum of 30 public properties
4661 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04004662 "kind": "drive#property", # This is always drive#property.
4663 "value": "A String", # The value of this property.
4664 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004665 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04004666 "key": "A String", # The key of this property.
4667 "selfLink": "A String", # The link back to this property.
4668 },
4669 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004670 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004671 "iconLink": "A String", # A link to the file's icon.
4672 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
4673 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004674 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004675 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
4676 "title": "A String", # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
John Asmuth614db982014-04-24 15:46:26 -04004677 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004678 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07004679 "mimeType": "A String", # The MIME type of the thumbnail.
4680 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
4681 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004682 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004683 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
4684 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07004685 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004686 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004687 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004688 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4689 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004690 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004691 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004692 # - reader
4693 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
4694 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
4695 # - file
4696 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004697 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4698 "A String",
4699 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004700 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4701 },
4702 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004703 "name": "A String", # The name for this permission.
4704 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
4705 {
4706 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
4707 "role": "A String", # Deprecated - use permissionDetails/role instead.
4708 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
4709 "A String",
4710 ],
4711 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
4712 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
4713 },
4714 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004715 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04004716 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004717 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4718 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004719 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04004720 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08004721 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004722 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
4723 # - They can only be set on user and group permissions
4724 # - The date must be in the future
4725 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004726 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004727 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04004728 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004729 # - organizer
4730 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004731 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004732 # - reader
John Asmuth614db982014-04-24 15:46:26 -04004733 "type": "A String", # The account type. Allowed values are:
4734 # - user
4735 # - group
4736 # - domain
4737 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004738 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04004739 "A String",
4740 ],
4741 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004742 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04004743 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004744 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004745 "A String",
4746 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004747 "permissionIds": [ # List of permission IDs for users with access to this file.
4748 "A String",
4749 ],
4750 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
4751 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4752 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
4753 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4754 { # A permission for a file.
4755 "withLink": True or False, # Whether the link is required for this permission.
4756 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
4757 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
4758 {
4759 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4760 # - organizer
4761 # - fileOrganizer
4762 # - writer
4763 # - reader
4764 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
4765 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
4766 # - file
4767 # - member
4768 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4769 "A String",
4770 ],
4771 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4772 },
4773 ],
4774 "name": "A String", # The name for this permission.
4775 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
4776 {
4777 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
4778 "role": "A String", # Deprecated - use permissionDetails/role instead.
4779 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
4780 "A String",
4781 ],
4782 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
4783 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
4784 },
4785 ],
4786 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
4787 "kind": "drive#permission", # This is always drive#permission.
4788 "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4789 "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4790 "authKey": "A String", # Deprecated.
4791 "etag": "A String", # The ETag of the permission.
4792 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
4793 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
4794 # - They can only be set on user and group permissions
4795 # - The date must be in the future
4796 # - The date cannot be more than a year in the future
4797 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4798 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
4799 # - owner
4800 # - organizer
4801 # - fileOrganizer
4802 # - writer
4803 # - reader
4804 "type": "A String", # The account type. Allowed values are:
4805 # - user
4806 # - group
4807 # - domain
4808 # - anyone
4809 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4810 "A String",
4811 ],
4812 "selfLink": "A String", # A link back to this permission.
4813 "photoLink": "A String", # A link to the profile photo, if available.
4814 },
4815 ],
4816 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004817 "selfLink": "A String", # A link back to this file.
4818 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
4819 }</pre>
4820</div>
4821
4822<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004823 <code class="details" id="watch">watch(fileId, body, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04004824 <pre>Subscribe to changes on a file
4825
4826Args:
4827 fileId: string, The ID for the file in question. (required)
4828 body: object, The request body. (required)
4829 The object takes the form of:
4830
4831{ # An notification channel used to watch for resource changes.
4832 "resourceUri": "A String", # A version-specific identifier for the watched resource.
4833 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
4834 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
4835 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
4836 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
4837 "params": { # Additional parameters controlling delivery channel behavior. Optional.
4838 "a_key": "A String", # Declares a new parameter by name.
4839 },
4840 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
4841 "address": "A String", # The address where notifications are delivered for this channel.
4842 "type": "A String", # The type of delivery mechanism used for this channel.
4843 "id": "A String", # A UUID or similar unique string that identifies this channel.
4844 }
4845
4846 projection: string, This parameter is deprecated and has no function.
4847 Allowed values
4848 BASIC - Deprecated
4849 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004850 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004851 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
4852 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Craig Citroe633be12015-03-02 13:40:36 -08004853 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004854 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
John Asmuth614db982014-04-24 15:46:26 -04004855
4856Returns:
4857 An object of the form:
4858
4859 { # An notification channel used to watch for resource changes.
4860 "resourceUri": "A String", # A version-specific identifier for the watched resource.
4861 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
4862 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
4863 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
4864 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
4865 "params": { # Additional parameters controlling delivery channel behavior. Optional.
4866 "a_key": "A String", # Declares a new parameter by name.
4867 },
4868 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
4869 "address": "A String", # The address where notifications are delivered for this channel.
4870 "type": "A String", # The type of delivery mechanism used for this channel.
4871 "id": "A String", # A UUID or similar unique string that identifies this channel.
4872 }</pre>
4873</div>
4874
Craig Citroe633be12015-03-02 13:40:36 -08004875<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004876 <code class="details" id="watch_media">watch_media(fileId, body, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08004877 <pre>Subscribe to changes on a file
4878
4879Args:
4880 fileId: string, The ID for the file in question. (required)
4881 body: object, The request body. (required)
4882 The object takes the form of:
4883
4884{ # An notification channel used to watch for resource changes.
4885 "resourceUri": "A String", # A version-specific identifier for the watched resource.
4886 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
4887 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
4888 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
4889 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
4890 "params": { # Additional parameters controlling delivery channel behavior. Optional.
4891 "a_key": "A String", # Declares a new parameter by name.
4892 },
4893 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
4894 "address": "A String", # The address where notifications are delivered for this channel.
4895 "type": "A String", # The type of delivery mechanism used for this channel.
4896 "id": "A String", # A UUID or similar unique string that identifies this channel.
4897 }
4898
4899 projection: string, This parameter is deprecated and has no function.
4900 Allowed values
4901 BASIC - Deprecated
4902 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004903 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004904 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
4905 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Craig Citroe633be12015-03-02 13:40:36 -08004906 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004907 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
Craig Citroe633be12015-03-02 13:40:36 -08004908
4909Returns:
4910 The media object as a string.
4911
4912 </pre>
4913</div>
4914
John Asmuth614db982014-04-24 15:46:26 -04004915</body></html>