Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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_v3.html">Drive API</a> . <a href="drive_v3.files.html">files</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#copy">copy(fileId, body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, includePermissionsForView=None, keepRevisionForever=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 82 | <p class="firstline">Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 83 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 84 | <code><a href="#create">create(body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, includePermissionsForView=None, keepRevisionForever=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 85 | <p class="firstline">Creates a new file.</p> |
| 86 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 87 | <code><a href="#delete">delete(fileId, enforceSingleParent=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 88 | <p class="firstline">Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 89 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 90 | <code><a href="#emptyTrash">emptyTrash(enforceSingleParent=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 91 | <p class="firstline">Permanently deletes all of the user's trashed files.</p> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#export">export(fileId, mimeType)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <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> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 95 | <p class="toc_element"> |
| 96 | <code><a href="#export_media">export_media(fileId, mimeType)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 97 | <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> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 98 | <p class="toc_element"> |
| 99 | <code><a href="#generateIds">generateIds(count=None, space=None)</a></code></p> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 100 | <p class="firstline">Generates a set of file IDs which can be provided in create or copy requests.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 101 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 102 | <code><a href="#get">get(fileId, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 103 | <p class="firstline">Gets a file's metadata or content by ID.</p> |
| 104 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 105 | <code><a href="#get_media">get_media(fileId, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 106 | <p class="firstline">Gets a file's metadata or content by ID.</p> |
| 107 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 108 | <code><a href="#list">list(corpora=None, corpus=None, driveId=None, includeItemsFromAllDrives=None, includePermissionsForView=None, includeTeamDriveItems=None, orderBy=None, pageSize=None, pageToken=None, q=None, spaces=None, supportsAllDrives=None, supportsTeamDrives=None, teamDriveId=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 109 | <p class="firstline">Lists or searches files.</p> |
| 110 | <p class="toc_element"> |
| 111 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 112 | <p class="firstline">Retrieves the next page of results.</p> |
| 113 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 114 | <code><a href="#update">update(fileId, body=None, addParents=None, enforceSingleParent=None, includePermissionsForView=None, keepRevisionForever=None, ocrLanguage=None, removeParents=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</a></code></p> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 115 | <p class="firstline">Updates a file's metadata and/or content. This method supports patch semantics.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 116 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 117 | <code><a href="#watch">watch(fileId, body=None, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 118 | <p class="firstline">Subscribes to changes to a file</p> |
| 119 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 120 | <code><a href="#watch_media">watch_media(fileId, body=None, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 121 | <p class="firstline">Subscribes to changes to a file</p> |
| 122 | <h3>Method Details</h3> |
| 123 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 124 | <code class="details" id="close">close()</code> |
| 125 | <pre>Close httplib2 connections.</pre> |
| 126 | </div> |
| 127 | |
| 128 | <div class="method"> |
| 129 | <code class="details" id="copy">copy(fileId, body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, includePermissionsForView=None, keepRevisionForever=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None)</code> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 130 | <pre>Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 131 | |
| 132 | Args: |
| 133 | fileId: string, The ID of the file. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 134 | body: object, The request body. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 135 | The object takes the form of: |
| 136 | |
| 137 | { # The metadata for a file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 138 | "appProperties": { # A collection of arbitrary key-value pairs which are private to the requesting app. |
| 139 | # Entries with null values are cleared in update and copy requests. |
| 140 | "a_key": "A String", |
| 141 | }, |
| 142 | "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. |
| 143 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 144 | "canAddFolderFromAnotherDrive": True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 145 | "canAddMyDriveParent": True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files. |
| 146 | "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file. |
| 147 | "canChangeViewersCanCopyContent": True or False, # Deprecated |
| 148 | "canComment": True or False, # Whether the current user can comment on this file. |
| 149 | "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. |
| 150 | "canDelete": True or False, # Whether the current user can delete this file. |
| 151 | "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. |
| 152 | "canDownload": True or False, # Whether the current user can download this file. |
| 153 | "canEdit": True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent. |
| 154 | "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. |
| 155 | "canModifyContent": True or False, # Whether the current user can modify the content of this file. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 156 | "canModifyContentRestriction": True or False, # Whether the current user can modify restrictions on content of this file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 157 | "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. |
| 158 | "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 159 | "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 160 | "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead. |
| 161 | "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
| 162 | "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. |
| 163 | "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 164 | "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 165 | "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead. |
| 166 | "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. |
| 167 | "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. |
| 168 | "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. |
| 169 | "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead. |
| 170 | "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. |
| 171 | "canRemoveMyDriveParent": True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files. |
| 172 | "canRename": True or False, # Whether the current user can rename this file. |
| 173 | "canShare": True or False, # Whether the current user can modify the sharing settings for this file. |
| 174 | "canTrash": True or False, # Whether the current user can move this file to trash. |
| 175 | "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. |
| 176 | "canUntrash": True or False, # Whether the current user can restore this file from trash. |
| 177 | }, |
| 178 | "contentHints": { # Additional information about the content of the file. These fields are never populated in responses. |
| 179 | "indexableText": "A String", # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. |
| 180 | "thumbnail": { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail. |
| 181 | "image": "A String", # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). |
| 182 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 183 | }, |
| 184 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 185 | "contentRestrictions": [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists. |
| 186 | { # A restriction for accessing the content of the file. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 187 | "readOnly": True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 188 | "reason": "A String", # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true. |
| 189 | "restrictingUser": { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true. |
| 190 | "displayName": "A String", # A plain text displayable name for this user. |
| 191 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 192 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 193 | "me": True or False, # Whether this user is the requesting user. |
| 194 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 195 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 196 | }, |
| 197 | "restrictionTime": "A String", # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true. |
| 198 | "type": "A String", # The type of the content restriction. Currently the only possible value is globalContentRestriction. |
| 199 | }, |
| 200 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 201 | "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters. |
| 202 | "createdTime": "A String", # The time at which the file was created (RFC 3339 date-time). |
| 203 | "description": "A String", # A short description of the file. |
| 204 | "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives. |
| 205 | "explicitlyTrashed": True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 206 | "exportLinks": { # Links for exporting Docs Editors files to specific formats. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 207 | "a_key": "A String", # A mapping from export format to URL |
| 208 | }, |
| 209 | "fileExtension": "A String", # The final component of fullFileExtension. This is only available for files with binary content in Google Drive. |
| 210 | "folderColorRgb": "A String", # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. |
| 211 | # If an unsupported color is specified, the closest color in the palette will be used instead. |
| 212 | "fullFileExtension": "A String", # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. |
| 213 | # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension. |
| 214 | "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives. |
| 215 | "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. |
| 216 | "headRevisionId": "A String", # The ID of the file's head revision. This is currently only available for files with binary content in Google Drive. |
| 217 | "iconLink": "A String", # A static, unauthenticated link to the file's icon. |
| 218 | "id": "A String", # The ID of the file. |
| 219 | "imageMediaMetadata": { # Additional metadata about image media, if available. |
| 220 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 221 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 222 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 223 | "colorSpace": "A String", # The color space of the photo. |
| 224 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 225 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 226 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 227 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 228 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 229 | "height": 42, # The height of the image in pixels. |
| 230 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 231 | "lens": "A String", # The lens used to create the photo. |
| 232 | "location": { # Geographic location information stored in the image. |
| 233 | "altitude": 3.14, # The altitude stored in the image. |
| 234 | "latitude": 3.14, # The latitude stored in the image. |
| 235 | "longitude": 3.14, # The longitude stored in the image. |
| 236 | }, |
| 237 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 238 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 239 | "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation. |
| 240 | "sensor": "A String", # The type of sensor used to create the photo. |
| 241 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 242 | "time": "A String", # The date and time the photo was taken (EXIF DateTime). |
| 243 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 244 | "width": 42, # The width of the image in pixels. |
| 245 | }, |
| 246 | "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app. |
| 247 | "kind": "drive#file", # Identifies what kind of resource this is. Value: the fixed string "drive#file". |
| 248 | "lastModifyingUser": { # Information about a Drive user. # The last user to modify the file. |
| 249 | "displayName": "A String", # A plain text displayable name for this user. |
| 250 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 251 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 252 | "me": True or False, # Whether this user is the requesting user. |
| 253 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 254 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 255 | }, |
| 256 | "md5Checksum": "A String", # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive. |
| 257 | "mimeType": "A String", # The MIME type of the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 258 | # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 259 | # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 260 | "modifiedByMe": True or False, # Whether the file has been modified by this user. |
| 261 | "modifiedByMeTime": "A String", # The last time the file was modified by the user (RFC 3339 date-time). |
| 262 | "modifiedTime": "A String", # The last time the file was modified by anyone (RFC 3339 date-time). |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 263 | # Note that setting modifiedTime will also update modifiedByMeTime for the user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 264 | "name": "A String", # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. |
| 265 | "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive. |
| 266 | "ownedByMe": True or False, # Whether the user owns the file. Not populated for items in shared drives. |
| 267 | "owners": [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 268 | { # Information about a Drive user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 269 | "displayName": "A String", # A plain text displayable name for this user. |
| 270 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 271 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 272 | "me": True or False, # Whether this user is the requesting user. |
| 273 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 274 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 275 | }, |
| 276 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 277 | "parents": [ # The IDs of the parent folders which contain the file. |
| 278 | # If not specified as part of a create 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 must use the addParents and removeParents parameters to modify the parents list. |
| 279 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 280 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 281 | "permissionIds": [ # List of permission IDs for users with access to this file. |
| 282 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 283 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 284 | "permissions": [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 285 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 286 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
| 287 | "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. |
| 288 | "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: |
| 289 | # - user - User's full name, as defined for their Google account, such as "Joe Smith." |
| 290 | # - group - Name of the Google Group, such as "The Company Administrators." |
| 291 | # - domain - String domain name, such as "thecompany.com." |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 292 | # - anyone - No displayName is present. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 293 | "domain": "A String", # The domain to which this permission refers. |
| 294 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 295 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 296 | # - They can only be set on user and group permissions |
| 297 | # - The time must be in the future |
| 298 | # - The time cannot be more than a year in the future |
| 299 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. |
| 300 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
| 301 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 302 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 303 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 304 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. |
| 305 | "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: |
| 306 | # - file |
| 307 | # - member |
| 308 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 309 | # - organizer |
| 310 | # - fileOrganizer |
| 311 | # - writer |
| 312 | # - commenter |
| 313 | # - reader |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 314 | }, |
| 315 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 316 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 317 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 318 | # - owner |
| 319 | # - organizer |
| 320 | # - fileOrganizer |
| 321 | # - writer |
| 322 | # - commenter |
| 323 | # - reader |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 324 | "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. |
| 325 | { |
| 326 | "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. |
| 327 | "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. |
| 328 | "role": "A String", # Deprecated - use permissionDetails/role instead. |
| 329 | "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. |
| 330 | }, |
| 331 | ], |
| 332 | "type": "A String", # The type of the grantee. Valid values are: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 333 | # - user |
| 334 | # - group |
| 335 | # - domain |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 336 | # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 337 | "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 338 | }, |
| 339 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 340 | "properties": { # A collection of arbitrary key-value pairs which are visible to all apps. |
| 341 | # Entries with null values are cleared in update and copy requests. |
| 342 | "a_key": "A String", |
| 343 | }, |
| 344 | "quotaBytesUsed": "A String", # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. |
| 345 | "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives. |
| 346 | "sharedWithMeTime": "A String", # The time at which the file was shared with the user, if applicable (RFC 3339 date-time). |
| 347 | "sharingUser": { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable. |
| 348 | "displayName": "A String", # A plain text displayable name for this user. |
| 349 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 350 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 351 | "me": True or False, # Whether this user is the requesting user. |
| 352 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 353 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 354 | }, |
| 355 | "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut. |
| 356 | "targetId": "A String", # The ID of the file that this shortcut points to. |
| 357 | "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created. |
| 358 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 359 | "size": "A String", # The size of the file's content in bytes. This is applicable to binary files in Google Drive and Google Docs files. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 360 | "spaces": [ # The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'. |
| 361 | "A String", |
| 362 | ], |
| 363 | "starred": True or False, # Whether the user has starred the file. |
| 364 | "teamDriveId": "A String", # Deprecated - use driveId instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 365 | "thumbnailLink": "A String", # A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 366 | "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 367 | "trashed": True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 368 | "trashedTime": "A String", # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. |
| 369 | "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. |
| 370 | "displayName": "A String", # A plain text displayable name for this user. |
| 371 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 372 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 373 | "me": True or False, # Whether this user is the requesting user. |
| 374 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 375 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 376 | }, |
| 377 | "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 user. |
| 378 | "videoMediaMetadata": { # Additional metadata about video media. This may not be available immediately upon upload. |
| 379 | "durationMillis": "A String", # The duration of the video in milliseconds. |
| 380 | "height": 42, # The height of the video in pixels. |
| 381 | "width": 42, # The width of the video in pixels. |
| 382 | }, |
| 383 | "viewedByMe": True or False, # Whether the file has been viewed by this user. |
| 384 | "viewedByMeTime": "A String", # The last time the file was viewed by the user (RFC 3339 date-time). |
| 385 | "viewersCanCopyContent": True or False, # Deprecated - use copyRequiresWriterPermission instead. |
| 386 | "webContentLink": "A String", # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive. |
| 387 | "webViewLink": "A String", # A link for opening the file in a relevant Google editor or viewer in a browser. |
| 388 | "writersCanShare": True or False, # Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 389 | } |
| 390 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 391 | enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. Requests that specify more than one parent fail. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 392 | ignoreDefaultVisibility: boolean, Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 393 | includePermissionsForView: string, Specifies which additional view's permissions to include in the response. Only 'published' is supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 394 | keepRevisionForever: boolean, Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 395 | ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 396 | supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 397 | supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 398 | |
| 399 | Returns: |
| 400 | An object of the form: |
| 401 | |
| 402 | { # The metadata for a file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 403 | "appProperties": { # A collection of arbitrary key-value pairs which are private to the requesting app. |
| 404 | # Entries with null values are cleared in update and copy requests. |
| 405 | "a_key": "A String", |
| 406 | }, |
| 407 | "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. |
| 408 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 409 | "canAddFolderFromAnotherDrive": True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 410 | "canAddMyDriveParent": True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files. |
| 411 | "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file. |
| 412 | "canChangeViewersCanCopyContent": True or False, # Deprecated |
| 413 | "canComment": True or False, # Whether the current user can comment on this file. |
| 414 | "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. |
| 415 | "canDelete": True or False, # Whether the current user can delete this file. |
| 416 | "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. |
| 417 | "canDownload": True or False, # Whether the current user can download this file. |
| 418 | "canEdit": True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent. |
| 419 | "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. |
| 420 | "canModifyContent": True or False, # Whether the current user can modify the content of this file. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 421 | "canModifyContentRestriction": True or False, # Whether the current user can modify restrictions on content of this file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 422 | "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. |
| 423 | "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 424 | "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 425 | "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead. |
| 426 | "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
| 427 | "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. |
| 428 | "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 429 | "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 430 | "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead. |
| 431 | "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. |
| 432 | "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. |
| 433 | "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. |
| 434 | "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead. |
| 435 | "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. |
| 436 | "canRemoveMyDriveParent": True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files. |
| 437 | "canRename": True or False, # Whether the current user can rename this file. |
| 438 | "canShare": True or False, # Whether the current user can modify the sharing settings for this file. |
| 439 | "canTrash": True or False, # Whether the current user can move this file to trash. |
| 440 | "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. |
| 441 | "canUntrash": True or False, # Whether the current user can restore this file from trash. |
| 442 | }, |
| 443 | "contentHints": { # Additional information about the content of the file. These fields are never populated in responses. |
| 444 | "indexableText": "A String", # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. |
| 445 | "thumbnail": { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail. |
| 446 | "image": "A String", # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). |
| 447 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 448 | }, |
| 449 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 450 | "contentRestrictions": [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists. |
| 451 | { # A restriction for accessing the content of the file. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 452 | "readOnly": True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 453 | "reason": "A String", # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true. |
| 454 | "restrictingUser": { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true. |
| 455 | "displayName": "A String", # A plain text displayable name for this user. |
| 456 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 457 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 458 | "me": True or False, # Whether this user is the requesting user. |
| 459 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 460 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 461 | }, |
| 462 | "restrictionTime": "A String", # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true. |
| 463 | "type": "A String", # The type of the content restriction. Currently the only possible value is globalContentRestriction. |
| 464 | }, |
| 465 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 466 | "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters. |
| 467 | "createdTime": "A String", # The time at which the file was created (RFC 3339 date-time). |
| 468 | "description": "A String", # A short description of the file. |
| 469 | "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives. |
| 470 | "explicitlyTrashed": True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 471 | "exportLinks": { # Links for exporting Docs Editors files to specific formats. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 472 | "a_key": "A String", # A mapping from export format to URL |
| 473 | }, |
| 474 | "fileExtension": "A String", # The final component of fullFileExtension. This is only available for files with binary content in Google Drive. |
| 475 | "folderColorRgb": "A String", # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. |
| 476 | # If an unsupported color is specified, the closest color in the palette will be used instead. |
| 477 | "fullFileExtension": "A String", # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. |
| 478 | # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension. |
| 479 | "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives. |
| 480 | "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. |
| 481 | "headRevisionId": "A String", # The ID of the file's head revision. This is currently only available for files with binary content in Google Drive. |
| 482 | "iconLink": "A String", # A static, unauthenticated link to the file's icon. |
| 483 | "id": "A String", # The ID of the file. |
| 484 | "imageMediaMetadata": { # Additional metadata about image media, if available. |
| 485 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 486 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 487 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 488 | "colorSpace": "A String", # The color space of the photo. |
| 489 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 490 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 491 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 492 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 493 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 494 | "height": 42, # The height of the image in pixels. |
| 495 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 496 | "lens": "A String", # The lens used to create the photo. |
| 497 | "location": { # Geographic location information stored in the image. |
| 498 | "altitude": 3.14, # The altitude stored in the image. |
| 499 | "latitude": 3.14, # The latitude stored in the image. |
| 500 | "longitude": 3.14, # The longitude stored in the image. |
| 501 | }, |
| 502 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 503 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 504 | "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation. |
| 505 | "sensor": "A String", # The type of sensor used to create the photo. |
| 506 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 507 | "time": "A String", # The date and time the photo was taken (EXIF DateTime). |
| 508 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 509 | "width": 42, # The width of the image in pixels. |
| 510 | }, |
| 511 | "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app. |
| 512 | "kind": "drive#file", # Identifies what kind of resource this is. Value: the fixed string "drive#file". |
| 513 | "lastModifyingUser": { # Information about a Drive user. # The last user to modify the file. |
| 514 | "displayName": "A String", # A plain text displayable name for this user. |
| 515 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 516 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 517 | "me": True or False, # Whether this user is the requesting user. |
| 518 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 519 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 520 | }, |
| 521 | "md5Checksum": "A String", # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive. |
| 522 | "mimeType": "A String", # The MIME type of the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 523 | # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 524 | # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 525 | "modifiedByMe": True or False, # Whether the file has been modified by this user. |
| 526 | "modifiedByMeTime": "A String", # The last time the file was modified by the user (RFC 3339 date-time). |
| 527 | "modifiedTime": "A String", # The last time the file was modified by anyone (RFC 3339 date-time). |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 528 | # Note that setting modifiedTime will also update modifiedByMeTime for the user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 529 | "name": "A String", # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. |
| 530 | "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive. |
| 531 | "ownedByMe": True or False, # Whether the user owns the file. Not populated for items in shared drives. |
| 532 | "owners": [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 533 | { # Information about a Drive user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 534 | "displayName": "A String", # A plain text displayable name for this user. |
| 535 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 536 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 537 | "me": True or False, # Whether this user is the requesting user. |
| 538 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 539 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 540 | }, |
| 541 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 542 | "parents": [ # The IDs of the parent folders which contain the file. |
| 543 | # If not specified as part of a create 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 must use the addParents and removeParents parameters to modify the parents list. |
| 544 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 545 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 546 | "permissionIds": [ # List of permission IDs for users with access to this file. |
| 547 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 548 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 549 | "permissions": [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 550 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 551 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
| 552 | "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. |
| 553 | "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: |
| 554 | # - user - User's full name, as defined for their Google account, such as "Joe Smith." |
| 555 | # - group - Name of the Google Group, such as "The Company Administrators." |
| 556 | # - domain - String domain name, such as "thecompany.com." |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 557 | # - anyone - No displayName is present. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 558 | "domain": "A String", # The domain to which this permission refers. |
| 559 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 560 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 561 | # - They can only be set on user and group permissions |
| 562 | # - The time must be in the future |
| 563 | # - The time cannot be more than a year in the future |
| 564 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. |
| 565 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
| 566 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 567 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 568 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 569 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. |
| 570 | "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: |
| 571 | # - file |
| 572 | # - member |
| 573 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 574 | # - organizer |
| 575 | # - fileOrganizer |
| 576 | # - writer |
| 577 | # - commenter |
| 578 | # - reader |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 579 | }, |
| 580 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 581 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 582 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 583 | # - owner |
| 584 | # - organizer |
| 585 | # - fileOrganizer |
| 586 | # - writer |
| 587 | # - commenter |
| 588 | # - reader |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 589 | "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. |
| 590 | { |
| 591 | "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. |
| 592 | "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. |
| 593 | "role": "A String", # Deprecated - use permissionDetails/role instead. |
| 594 | "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. |
| 595 | }, |
| 596 | ], |
| 597 | "type": "A String", # The type of the grantee. Valid values are: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 598 | # - user |
| 599 | # - group |
| 600 | # - domain |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 601 | # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 602 | "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 603 | }, |
| 604 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 605 | "properties": { # A collection of arbitrary key-value pairs which are visible to all apps. |
| 606 | # Entries with null values are cleared in update and copy requests. |
| 607 | "a_key": "A String", |
| 608 | }, |
| 609 | "quotaBytesUsed": "A String", # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. |
| 610 | "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives. |
| 611 | "sharedWithMeTime": "A String", # The time at which the file was shared with the user, if applicable (RFC 3339 date-time). |
| 612 | "sharingUser": { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable. |
| 613 | "displayName": "A String", # A plain text displayable name for this user. |
| 614 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 615 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 616 | "me": True or False, # Whether this user is the requesting user. |
| 617 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 618 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 619 | }, |
| 620 | "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut. |
| 621 | "targetId": "A String", # The ID of the file that this shortcut points to. |
| 622 | "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created. |
| 623 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 624 | "size": "A String", # The size of the file's content in bytes. This is applicable to binary files in Google Drive and Google Docs files. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 625 | "spaces": [ # The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'. |
| 626 | "A String", |
| 627 | ], |
| 628 | "starred": True or False, # Whether the user has starred the file. |
| 629 | "teamDriveId": "A String", # Deprecated - use driveId instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 630 | "thumbnailLink": "A String", # A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 631 | "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 632 | "trashed": True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 633 | "trashedTime": "A String", # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. |
| 634 | "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. |
| 635 | "displayName": "A String", # A plain text displayable name for this user. |
| 636 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 637 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 638 | "me": True or False, # Whether this user is the requesting user. |
| 639 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 640 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 641 | }, |
| 642 | "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 user. |
| 643 | "videoMediaMetadata": { # Additional metadata about video media. This may not be available immediately upon upload. |
| 644 | "durationMillis": "A String", # The duration of the video in milliseconds. |
| 645 | "height": 42, # The height of the video in pixels. |
| 646 | "width": 42, # The width of the video in pixels. |
| 647 | }, |
| 648 | "viewedByMe": True or False, # Whether the file has been viewed by this user. |
| 649 | "viewedByMeTime": "A String", # The last time the file was viewed by the user (RFC 3339 date-time). |
| 650 | "viewersCanCopyContent": True or False, # Deprecated - use copyRequiresWriterPermission instead. |
| 651 | "webContentLink": "A String", # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive. |
| 652 | "webViewLink": "A String", # A link for opening the file in a relevant Google editor or viewer in a browser. |
| 653 | "writersCanShare": True or False, # Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 654 | }</pre> |
| 655 | </div> |
| 656 | |
| 657 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 658 | <code class="details" id="create">create(body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, includePermissionsForView=None, keepRevisionForever=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 659 | <pre>Creates a new file. |
| 660 | |
| 661 | Args: |
| 662 | body: object, The request body. |
| 663 | The object takes the form of: |
| 664 | |
| 665 | { # The metadata for a file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 666 | "appProperties": { # A collection of arbitrary key-value pairs which are private to the requesting app. |
| 667 | # Entries with null values are cleared in update and copy requests. |
| 668 | "a_key": "A String", |
| 669 | }, |
| 670 | "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. |
| 671 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 672 | "canAddFolderFromAnotherDrive": True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 673 | "canAddMyDriveParent": True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files. |
| 674 | "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file. |
| 675 | "canChangeViewersCanCopyContent": True or False, # Deprecated |
| 676 | "canComment": True or False, # Whether the current user can comment on this file. |
| 677 | "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. |
| 678 | "canDelete": True or False, # Whether the current user can delete this file. |
| 679 | "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. |
| 680 | "canDownload": True or False, # Whether the current user can download this file. |
| 681 | "canEdit": True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent. |
| 682 | "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. |
| 683 | "canModifyContent": True or False, # Whether the current user can modify the content of this file. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 684 | "canModifyContentRestriction": True or False, # Whether the current user can modify restrictions on content of this file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 685 | "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. |
| 686 | "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 687 | "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 688 | "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead. |
| 689 | "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
| 690 | "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. |
| 691 | "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 692 | "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 693 | "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead. |
| 694 | "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. |
| 695 | "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. |
| 696 | "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. |
| 697 | "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead. |
| 698 | "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. |
| 699 | "canRemoveMyDriveParent": True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files. |
| 700 | "canRename": True or False, # Whether the current user can rename this file. |
| 701 | "canShare": True or False, # Whether the current user can modify the sharing settings for this file. |
| 702 | "canTrash": True or False, # Whether the current user can move this file to trash. |
| 703 | "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. |
| 704 | "canUntrash": True or False, # Whether the current user can restore this file from trash. |
| 705 | }, |
| 706 | "contentHints": { # Additional information about the content of the file. These fields are never populated in responses. |
| 707 | "indexableText": "A String", # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. |
| 708 | "thumbnail": { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail. |
| 709 | "image": "A String", # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). |
| 710 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 711 | }, |
| 712 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 713 | "contentRestrictions": [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists. |
| 714 | { # A restriction for accessing the content of the file. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 715 | "readOnly": True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 716 | "reason": "A String", # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true. |
| 717 | "restrictingUser": { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true. |
| 718 | "displayName": "A String", # A plain text displayable name for this user. |
| 719 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 720 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 721 | "me": True or False, # Whether this user is the requesting user. |
| 722 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 723 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 724 | }, |
| 725 | "restrictionTime": "A String", # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true. |
| 726 | "type": "A String", # The type of the content restriction. Currently the only possible value is globalContentRestriction. |
| 727 | }, |
| 728 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 729 | "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters. |
| 730 | "createdTime": "A String", # The time at which the file was created (RFC 3339 date-time). |
| 731 | "description": "A String", # A short description of the file. |
| 732 | "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives. |
| 733 | "explicitlyTrashed": True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 734 | "exportLinks": { # Links for exporting Docs Editors files to specific formats. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 735 | "a_key": "A String", # A mapping from export format to URL |
| 736 | }, |
| 737 | "fileExtension": "A String", # The final component of fullFileExtension. This is only available for files with binary content in Google Drive. |
| 738 | "folderColorRgb": "A String", # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. |
| 739 | # If an unsupported color is specified, the closest color in the palette will be used instead. |
| 740 | "fullFileExtension": "A String", # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. |
| 741 | # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension. |
| 742 | "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives. |
| 743 | "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. |
| 744 | "headRevisionId": "A String", # The ID of the file's head revision. This is currently only available for files with binary content in Google Drive. |
| 745 | "iconLink": "A String", # A static, unauthenticated link to the file's icon. |
| 746 | "id": "A String", # The ID of the file. |
| 747 | "imageMediaMetadata": { # Additional metadata about image media, if available. |
| 748 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 749 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 750 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 751 | "colorSpace": "A String", # The color space of the photo. |
| 752 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 753 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 754 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 755 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 756 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 757 | "height": 42, # The height of the image in pixels. |
| 758 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 759 | "lens": "A String", # The lens used to create the photo. |
| 760 | "location": { # Geographic location information stored in the image. |
| 761 | "altitude": 3.14, # The altitude stored in the image. |
| 762 | "latitude": 3.14, # The latitude stored in the image. |
| 763 | "longitude": 3.14, # The longitude stored in the image. |
| 764 | }, |
| 765 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 766 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 767 | "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation. |
| 768 | "sensor": "A String", # The type of sensor used to create the photo. |
| 769 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 770 | "time": "A String", # The date and time the photo was taken (EXIF DateTime). |
| 771 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 772 | "width": 42, # The width of the image in pixels. |
| 773 | }, |
| 774 | "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app. |
| 775 | "kind": "drive#file", # Identifies what kind of resource this is. Value: the fixed string "drive#file". |
| 776 | "lastModifyingUser": { # Information about a Drive user. # The last user to modify the file. |
| 777 | "displayName": "A String", # A plain text displayable name for this user. |
| 778 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 779 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 780 | "me": True or False, # Whether this user is the requesting user. |
| 781 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 782 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 783 | }, |
| 784 | "md5Checksum": "A String", # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive. |
| 785 | "mimeType": "A String", # The MIME type of the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 786 | # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 787 | # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 788 | "modifiedByMe": True or False, # Whether the file has been modified by this user. |
| 789 | "modifiedByMeTime": "A String", # The last time the file was modified by the user (RFC 3339 date-time). |
| 790 | "modifiedTime": "A String", # The last time the file was modified by anyone (RFC 3339 date-time). |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 791 | # Note that setting modifiedTime will also update modifiedByMeTime for the user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 792 | "name": "A String", # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. |
| 793 | "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive. |
| 794 | "ownedByMe": True or False, # Whether the user owns the file. Not populated for items in shared drives. |
| 795 | "owners": [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 796 | { # Information about a Drive user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 797 | "displayName": "A String", # A plain text displayable name for this user. |
| 798 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 799 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 800 | "me": True or False, # Whether this user is the requesting user. |
| 801 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 802 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 803 | }, |
| 804 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 805 | "parents": [ # The IDs of the parent folders which contain the file. |
| 806 | # If not specified as part of a create 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 must use the addParents and removeParents parameters to modify the parents list. |
| 807 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 808 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 809 | "permissionIds": [ # List of permission IDs for users with access to this file. |
| 810 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 811 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 812 | "permissions": [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 813 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 814 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
| 815 | "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. |
| 816 | "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: |
| 817 | # - user - User's full name, as defined for their Google account, such as "Joe Smith." |
| 818 | # - group - Name of the Google Group, such as "The Company Administrators." |
| 819 | # - domain - String domain name, such as "thecompany.com." |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 820 | # - anyone - No displayName is present. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 821 | "domain": "A String", # The domain to which this permission refers. |
| 822 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 823 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 824 | # - They can only be set on user and group permissions |
| 825 | # - The time must be in the future |
| 826 | # - The time cannot be more than a year in the future |
| 827 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. |
| 828 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
| 829 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 830 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 831 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 832 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. |
| 833 | "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: |
| 834 | # - file |
| 835 | # - member |
| 836 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 837 | # - organizer |
| 838 | # - fileOrganizer |
| 839 | # - writer |
| 840 | # - commenter |
| 841 | # - reader |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 842 | }, |
| 843 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 844 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 845 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 846 | # - owner |
| 847 | # - organizer |
| 848 | # - fileOrganizer |
| 849 | # - writer |
| 850 | # - commenter |
| 851 | # - reader |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 852 | "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. |
| 853 | { |
| 854 | "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. |
| 855 | "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. |
| 856 | "role": "A String", # Deprecated - use permissionDetails/role instead. |
| 857 | "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. |
| 858 | }, |
| 859 | ], |
| 860 | "type": "A String", # The type of the grantee. Valid values are: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 861 | # - user |
| 862 | # - group |
| 863 | # - domain |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 864 | # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 865 | "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 866 | }, |
| 867 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 868 | "properties": { # A collection of arbitrary key-value pairs which are visible to all apps. |
| 869 | # Entries with null values are cleared in update and copy requests. |
| 870 | "a_key": "A String", |
| 871 | }, |
| 872 | "quotaBytesUsed": "A String", # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. |
| 873 | "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives. |
| 874 | "sharedWithMeTime": "A String", # The time at which the file was shared with the user, if applicable (RFC 3339 date-time). |
| 875 | "sharingUser": { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable. |
| 876 | "displayName": "A String", # A plain text displayable name for this user. |
| 877 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 878 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 879 | "me": True or False, # Whether this user is the requesting user. |
| 880 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 881 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 882 | }, |
| 883 | "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut. |
| 884 | "targetId": "A String", # The ID of the file that this shortcut points to. |
| 885 | "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created. |
| 886 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 887 | "size": "A String", # The size of the file's content in bytes. This is applicable to binary files in Google Drive and Google Docs files. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 888 | "spaces": [ # The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'. |
| 889 | "A String", |
| 890 | ], |
| 891 | "starred": True or False, # Whether the user has starred the file. |
| 892 | "teamDriveId": "A String", # Deprecated - use driveId instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 893 | "thumbnailLink": "A String", # A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 894 | "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 895 | "trashed": True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 896 | "trashedTime": "A String", # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. |
| 897 | "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. |
| 898 | "displayName": "A String", # A plain text displayable name for this user. |
| 899 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 900 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 901 | "me": True or False, # Whether this user is the requesting user. |
| 902 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 903 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 904 | }, |
| 905 | "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 user. |
| 906 | "videoMediaMetadata": { # Additional metadata about video media. This may not be available immediately upon upload. |
| 907 | "durationMillis": "A String", # The duration of the video in milliseconds. |
| 908 | "height": 42, # The height of the video in pixels. |
| 909 | "width": 42, # The width of the video in pixels. |
| 910 | }, |
| 911 | "viewedByMe": True or False, # Whether the file has been viewed by this user. |
| 912 | "viewedByMeTime": "A String", # The last time the file was viewed by the user (RFC 3339 date-time). |
| 913 | "viewersCanCopyContent": True or False, # Deprecated - use copyRequiresWriterPermission instead. |
| 914 | "webContentLink": "A String", # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive. |
| 915 | "webViewLink": "A String", # A link for opening the file in a relevant Google editor or viewer in a browser. |
| 916 | "writersCanShare": True or False, # Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 917 | } |
| 918 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 919 | enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. Requests that specify more than one parent fail. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 920 | ignoreDefaultVisibility: boolean, Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 921 | includePermissionsForView: string, Specifies which additional view's permissions to include in the response. Only 'published' is supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 922 | keepRevisionForever: boolean, Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 923 | ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 924 | supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 925 | supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. |
| 926 | useContentAsIndexableText: boolean, Whether to use the uploaded content as indexable text. |
| 927 | media_body: string, The filename of the media request body, or an instance of a MediaUpload object. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 928 | media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 929 | |
| 930 | Returns: |
| 931 | An object of the form: |
| 932 | |
| 933 | { # The metadata for a file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 934 | "appProperties": { # A collection of arbitrary key-value pairs which are private to the requesting app. |
| 935 | # Entries with null values are cleared in update and copy requests. |
| 936 | "a_key": "A String", |
| 937 | }, |
| 938 | "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. |
| 939 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 940 | "canAddFolderFromAnotherDrive": True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 941 | "canAddMyDriveParent": True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files. |
| 942 | "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file. |
| 943 | "canChangeViewersCanCopyContent": True or False, # Deprecated |
| 944 | "canComment": True or False, # Whether the current user can comment on this file. |
| 945 | "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. |
| 946 | "canDelete": True or False, # Whether the current user can delete this file. |
| 947 | "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. |
| 948 | "canDownload": True or False, # Whether the current user can download this file. |
| 949 | "canEdit": True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent. |
| 950 | "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. |
| 951 | "canModifyContent": True or False, # Whether the current user can modify the content of this file. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 952 | "canModifyContentRestriction": True or False, # Whether the current user can modify restrictions on content of this file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 953 | "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. |
| 954 | "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 955 | "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 956 | "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead. |
| 957 | "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
| 958 | "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. |
| 959 | "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 960 | "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 961 | "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead. |
| 962 | "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. |
| 963 | "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. |
| 964 | "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. |
| 965 | "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead. |
| 966 | "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. |
| 967 | "canRemoveMyDriveParent": True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files. |
| 968 | "canRename": True or False, # Whether the current user can rename this file. |
| 969 | "canShare": True or False, # Whether the current user can modify the sharing settings for this file. |
| 970 | "canTrash": True or False, # Whether the current user can move this file to trash. |
| 971 | "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. |
| 972 | "canUntrash": True or False, # Whether the current user can restore this file from trash. |
| 973 | }, |
| 974 | "contentHints": { # Additional information about the content of the file. These fields are never populated in responses. |
| 975 | "indexableText": "A String", # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. |
| 976 | "thumbnail": { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail. |
| 977 | "image": "A String", # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). |
| 978 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 979 | }, |
| 980 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 981 | "contentRestrictions": [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists. |
| 982 | { # A restriction for accessing the content of the file. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 983 | "readOnly": True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 984 | "reason": "A String", # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true. |
| 985 | "restrictingUser": { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true. |
| 986 | "displayName": "A String", # A plain text displayable name for this user. |
| 987 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 988 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 989 | "me": True or False, # Whether this user is the requesting user. |
| 990 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 991 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 992 | }, |
| 993 | "restrictionTime": "A String", # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true. |
| 994 | "type": "A String", # The type of the content restriction. Currently the only possible value is globalContentRestriction. |
| 995 | }, |
| 996 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 997 | "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters. |
| 998 | "createdTime": "A String", # The time at which the file was created (RFC 3339 date-time). |
| 999 | "description": "A String", # A short description of the file. |
| 1000 | "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives. |
| 1001 | "explicitlyTrashed": True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 1002 | "exportLinks": { # Links for exporting Docs Editors files to specific formats. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1003 | "a_key": "A String", # A mapping from export format to URL |
| 1004 | }, |
| 1005 | "fileExtension": "A String", # The final component of fullFileExtension. This is only available for files with binary content in Google Drive. |
| 1006 | "folderColorRgb": "A String", # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. |
| 1007 | # If an unsupported color is specified, the closest color in the palette will be used instead. |
| 1008 | "fullFileExtension": "A String", # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. |
| 1009 | # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension. |
| 1010 | "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives. |
| 1011 | "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. |
| 1012 | "headRevisionId": "A String", # The ID of the file's head revision. This is currently only available for files with binary content in Google Drive. |
| 1013 | "iconLink": "A String", # A static, unauthenticated link to the file's icon. |
| 1014 | "id": "A String", # The ID of the file. |
| 1015 | "imageMediaMetadata": { # Additional metadata about image media, if available. |
| 1016 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 1017 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 1018 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 1019 | "colorSpace": "A String", # The color space of the photo. |
| 1020 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 1021 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 1022 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 1023 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 1024 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 1025 | "height": 42, # The height of the image in pixels. |
| 1026 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 1027 | "lens": "A String", # The lens used to create the photo. |
| 1028 | "location": { # Geographic location information stored in the image. |
| 1029 | "altitude": 3.14, # The altitude stored in the image. |
| 1030 | "latitude": 3.14, # The latitude stored in the image. |
| 1031 | "longitude": 3.14, # The longitude stored in the image. |
| 1032 | }, |
| 1033 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 1034 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 1035 | "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation. |
| 1036 | "sensor": "A String", # The type of sensor used to create the photo. |
| 1037 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 1038 | "time": "A String", # The date and time the photo was taken (EXIF DateTime). |
| 1039 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 1040 | "width": 42, # The width of the image in pixels. |
| 1041 | }, |
| 1042 | "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app. |
| 1043 | "kind": "drive#file", # Identifies what kind of resource this is. Value: the fixed string "drive#file". |
| 1044 | "lastModifyingUser": { # Information about a Drive user. # The last user to modify the file. |
| 1045 | "displayName": "A String", # A plain text displayable name for this user. |
| 1046 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1047 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1048 | "me": True or False, # Whether this user is the requesting user. |
| 1049 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1050 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1051 | }, |
| 1052 | "md5Checksum": "A String", # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive. |
| 1053 | "mimeType": "A String", # The MIME type of the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1054 | # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1055 | # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1056 | "modifiedByMe": True or False, # Whether the file has been modified by this user. |
| 1057 | "modifiedByMeTime": "A String", # The last time the file was modified by the user (RFC 3339 date-time). |
| 1058 | "modifiedTime": "A String", # The last time the file was modified by anyone (RFC 3339 date-time). |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1059 | # Note that setting modifiedTime will also update modifiedByMeTime for the user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1060 | "name": "A String", # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. |
| 1061 | "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive. |
| 1062 | "ownedByMe": True or False, # Whether the user owns the file. Not populated for items in shared drives. |
| 1063 | "owners": [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1064 | { # Information about a Drive user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1065 | "displayName": "A String", # A plain text displayable name for this user. |
| 1066 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1067 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1068 | "me": True or False, # Whether this user is the requesting user. |
| 1069 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1070 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1071 | }, |
| 1072 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1073 | "parents": [ # The IDs of the parent folders which contain the file. |
| 1074 | # If not specified as part of a create 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 must use the addParents and removeParents parameters to modify the parents list. |
| 1075 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1076 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1077 | "permissionIds": [ # List of permission IDs for users with access to this file. |
| 1078 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1079 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1080 | "permissions": [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1081 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1082 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
| 1083 | "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. |
| 1084 | "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: |
| 1085 | # - user - User's full name, as defined for their Google account, such as "Joe Smith." |
| 1086 | # - group - Name of the Google Group, such as "The Company Administrators." |
| 1087 | # - domain - String domain name, such as "thecompany.com." |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1088 | # - anyone - No displayName is present. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1089 | "domain": "A String", # The domain to which this permission refers. |
| 1090 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 1091 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 1092 | # - They can only be set on user and group permissions |
| 1093 | # - The time must be in the future |
| 1094 | # - The time cannot be more than a year in the future |
| 1095 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. |
| 1096 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
| 1097 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1098 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1099 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 1100 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. |
| 1101 | "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: |
| 1102 | # - file |
| 1103 | # - member |
| 1104 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1105 | # - organizer |
| 1106 | # - fileOrganizer |
| 1107 | # - writer |
| 1108 | # - commenter |
| 1109 | # - reader |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1110 | }, |
| 1111 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1112 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1113 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1114 | # - owner |
| 1115 | # - organizer |
| 1116 | # - fileOrganizer |
| 1117 | # - writer |
| 1118 | # - commenter |
| 1119 | # - reader |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1120 | "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. |
| 1121 | { |
| 1122 | "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. |
| 1123 | "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. |
| 1124 | "role": "A String", # Deprecated - use permissionDetails/role instead. |
| 1125 | "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. |
| 1126 | }, |
| 1127 | ], |
| 1128 | "type": "A String", # The type of the grantee. Valid values are: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1129 | # - user |
| 1130 | # - group |
| 1131 | # - domain |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1132 | # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1133 | "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1134 | }, |
| 1135 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1136 | "properties": { # A collection of arbitrary key-value pairs which are visible to all apps. |
| 1137 | # Entries with null values are cleared in update and copy requests. |
| 1138 | "a_key": "A String", |
| 1139 | }, |
| 1140 | "quotaBytesUsed": "A String", # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. |
| 1141 | "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives. |
| 1142 | "sharedWithMeTime": "A String", # The time at which the file was shared with the user, if applicable (RFC 3339 date-time). |
| 1143 | "sharingUser": { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable. |
| 1144 | "displayName": "A String", # A plain text displayable name for this user. |
| 1145 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1146 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1147 | "me": True or False, # Whether this user is the requesting user. |
| 1148 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1149 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1150 | }, |
| 1151 | "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut. |
| 1152 | "targetId": "A String", # The ID of the file that this shortcut points to. |
| 1153 | "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created. |
| 1154 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 1155 | "size": "A String", # The size of the file's content in bytes. This is applicable to binary files in Google Drive and Google Docs files. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1156 | "spaces": [ # The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'. |
| 1157 | "A String", |
| 1158 | ], |
| 1159 | "starred": True or False, # Whether the user has starred the file. |
| 1160 | "teamDriveId": "A String", # Deprecated - use driveId instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 1161 | "thumbnailLink": "A String", # A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1162 | "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1163 | "trashed": True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1164 | "trashedTime": "A String", # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. |
| 1165 | "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. |
| 1166 | "displayName": "A String", # A plain text displayable name for this user. |
| 1167 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1168 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1169 | "me": True or False, # Whether this user is the requesting user. |
| 1170 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1171 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1172 | }, |
| 1173 | "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 user. |
| 1174 | "videoMediaMetadata": { # Additional metadata about video media. This may not be available immediately upon upload. |
| 1175 | "durationMillis": "A String", # The duration of the video in milliseconds. |
| 1176 | "height": 42, # The height of the video in pixels. |
| 1177 | "width": 42, # The width of the video in pixels. |
| 1178 | }, |
| 1179 | "viewedByMe": True or False, # Whether the file has been viewed by this user. |
| 1180 | "viewedByMeTime": "A String", # The last time the file was viewed by the user (RFC 3339 date-time). |
| 1181 | "viewersCanCopyContent": True or False, # Deprecated - use copyRequiresWriterPermission instead. |
| 1182 | "webContentLink": "A String", # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive. |
| 1183 | "webViewLink": "A String", # A link for opening the file in a relevant Google editor or viewer in a browser. |
| 1184 | "writersCanShare": True or False, # Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1185 | }</pre> |
| 1186 | </div> |
| 1187 | |
| 1188 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1189 | <code class="details" id="delete">delete(fileId, enforceSingleParent=None, supportsAllDrives=None, supportsTeamDrives=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1190 | <pre>Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1191 | |
| 1192 | Args: |
| 1193 | fileId: string, The ID of the file. (required) |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1194 | enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If an item's last parent is deleted but the item itself is not, the item will be placed under its owner's root. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1195 | supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1196 | supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1197 | </pre> |
| 1198 | </div> |
| 1199 | |
| 1200 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1201 | <code class="details" id="emptyTrash">emptyTrash(enforceSingleParent=None)</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1202 | <pre>Permanently deletes all of the user's trashed files. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1203 | |
| 1204 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1205 | enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If an item's last parent is deleted but the item itself is not, the item will be placed under its owner's root. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1206 | </pre> |
| 1207 | </div> |
| 1208 | |
| 1209 | <div class="method"> |
| 1210 | <code class="details" id="export">export(fileId, mimeType)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1211 | <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. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1212 | |
| 1213 | Args: |
| 1214 | fileId: string, The ID of the file. (required) |
| 1215 | mimeType: string, The MIME type of the format requested for this export. (required) |
| 1216 | </pre> |
| 1217 | </div> |
| 1218 | |
| 1219 | <div class="method"> |
| 1220 | <code class="details" id="export_media">export_media(fileId, mimeType)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1221 | <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. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1222 | |
| 1223 | Args: |
| 1224 | fileId: string, The ID of the file. (required) |
| 1225 | mimeType: string, The MIME type of the format requested for this export. (required) |
| 1226 | </pre> |
| 1227 | </div> |
| 1228 | |
| 1229 | <div class="method"> |
| 1230 | <code class="details" id="generateIds">generateIds(count=None, space=None)</code> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1231 | <pre>Generates a set of file IDs which can be provided in create or copy requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1232 | |
| 1233 | Args: |
| 1234 | count: integer, The number of IDs to return. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1235 | space: string, The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1236 | |
| 1237 | Returns: |
| 1238 | An object of the form: |
| 1239 | |
| 1240 | { # A list of generated file IDs which can be provided in create requests. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1241 | "ids": [ # The IDs generated for the requesting user in the specified space. |
| 1242 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1243 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1244 | "kind": "drive#generatedIds", # Identifies what kind of resource this is. Value: the fixed string "drive#generatedIds". |
| 1245 | "space": "A String", # The type of file that can be created with these IDs. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1246 | }</pre> |
| 1247 | </div> |
| 1248 | |
| 1249 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1250 | <code class="details" id="get">get(fileId, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1251 | <pre>Gets a file's metadata or content by ID. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1252 | |
| 1253 | Args: |
| 1254 | fileId: string, The ID of the file. (required) |
| 1255 | acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1256 | includePermissionsForView: string, Specifies which additional view's permissions to include in the response. Only 'published' is supported. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1257 | supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1258 | supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1259 | |
| 1260 | Returns: |
| 1261 | An object of the form: |
| 1262 | |
| 1263 | { # The metadata for a file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1264 | "appProperties": { # A collection of arbitrary key-value pairs which are private to the requesting app. |
| 1265 | # Entries with null values are cleared in update and copy requests. |
| 1266 | "a_key": "A String", |
| 1267 | }, |
| 1268 | "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. |
| 1269 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1270 | "canAddFolderFromAnotherDrive": True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1271 | "canAddMyDriveParent": True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files. |
| 1272 | "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file. |
| 1273 | "canChangeViewersCanCopyContent": True or False, # Deprecated |
| 1274 | "canComment": True or False, # Whether the current user can comment on this file. |
| 1275 | "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. |
| 1276 | "canDelete": True or False, # Whether the current user can delete this file. |
| 1277 | "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. |
| 1278 | "canDownload": True or False, # Whether the current user can download this file. |
| 1279 | "canEdit": True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent. |
| 1280 | "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. |
| 1281 | "canModifyContent": True or False, # Whether the current user can modify the content of this file. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1282 | "canModifyContentRestriction": True or False, # Whether the current user can modify restrictions on content of this file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1283 | "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. |
| 1284 | "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1285 | "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1286 | "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead. |
| 1287 | "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
| 1288 | "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. |
| 1289 | "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1290 | "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1291 | "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead. |
| 1292 | "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. |
| 1293 | "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. |
| 1294 | "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. |
| 1295 | "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead. |
| 1296 | "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. |
| 1297 | "canRemoveMyDriveParent": True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files. |
| 1298 | "canRename": True or False, # Whether the current user can rename this file. |
| 1299 | "canShare": True or False, # Whether the current user can modify the sharing settings for this file. |
| 1300 | "canTrash": True or False, # Whether the current user can move this file to trash. |
| 1301 | "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. |
| 1302 | "canUntrash": True or False, # Whether the current user can restore this file from trash. |
| 1303 | }, |
| 1304 | "contentHints": { # Additional information about the content of the file. These fields are never populated in responses. |
| 1305 | "indexableText": "A String", # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. |
| 1306 | "thumbnail": { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail. |
| 1307 | "image": "A String", # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). |
| 1308 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 1309 | }, |
| 1310 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1311 | "contentRestrictions": [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists. |
| 1312 | { # A restriction for accessing the content of the file. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1313 | "readOnly": True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1314 | "reason": "A String", # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true. |
| 1315 | "restrictingUser": { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true. |
| 1316 | "displayName": "A String", # A plain text displayable name for this user. |
| 1317 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1318 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1319 | "me": True or False, # Whether this user is the requesting user. |
| 1320 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1321 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1322 | }, |
| 1323 | "restrictionTime": "A String", # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true. |
| 1324 | "type": "A String", # The type of the content restriction. Currently the only possible value is globalContentRestriction. |
| 1325 | }, |
| 1326 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1327 | "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters. |
| 1328 | "createdTime": "A String", # The time at which the file was created (RFC 3339 date-time). |
| 1329 | "description": "A String", # A short description of the file. |
| 1330 | "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives. |
| 1331 | "explicitlyTrashed": True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 1332 | "exportLinks": { # Links for exporting Docs Editors files to specific formats. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1333 | "a_key": "A String", # A mapping from export format to URL |
| 1334 | }, |
| 1335 | "fileExtension": "A String", # The final component of fullFileExtension. This is only available for files with binary content in Google Drive. |
| 1336 | "folderColorRgb": "A String", # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. |
| 1337 | # If an unsupported color is specified, the closest color in the palette will be used instead. |
| 1338 | "fullFileExtension": "A String", # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. |
| 1339 | # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension. |
| 1340 | "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives. |
| 1341 | "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. |
| 1342 | "headRevisionId": "A String", # The ID of the file's head revision. This is currently only available for files with binary content in Google Drive. |
| 1343 | "iconLink": "A String", # A static, unauthenticated link to the file's icon. |
| 1344 | "id": "A String", # The ID of the file. |
| 1345 | "imageMediaMetadata": { # Additional metadata about image media, if available. |
| 1346 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 1347 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 1348 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 1349 | "colorSpace": "A String", # The color space of the photo. |
| 1350 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 1351 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 1352 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 1353 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 1354 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 1355 | "height": 42, # The height of the image in pixels. |
| 1356 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 1357 | "lens": "A String", # The lens used to create the photo. |
| 1358 | "location": { # Geographic location information stored in the image. |
| 1359 | "altitude": 3.14, # The altitude stored in the image. |
| 1360 | "latitude": 3.14, # The latitude stored in the image. |
| 1361 | "longitude": 3.14, # The longitude stored in the image. |
| 1362 | }, |
| 1363 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 1364 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 1365 | "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation. |
| 1366 | "sensor": "A String", # The type of sensor used to create the photo. |
| 1367 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 1368 | "time": "A String", # The date and time the photo was taken (EXIF DateTime). |
| 1369 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 1370 | "width": 42, # The width of the image in pixels. |
| 1371 | }, |
| 1372 | "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app. |
| 1373 | "kind": "drive#file", # Identifies what kind of resource this is. Value: the fixed string "drive#file". |
| 1374 | "lastModifyingUser": { # Information about a Drive user. # The last user to modify the file. |
| 1375 | "displayName": "A String", # A plain text displayable name for this user. |
| 1376 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1377 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1378 | "me": True or False, # Whether this user is the requesting user. |
| 1379 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1380 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1381 | }, |
| 1382 | "md5Checksum": "A String", # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive. |
| 1383 | "mimeType": "A String", # The MIME type of the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1384 | # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1385 | # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1386 | "modifiedByMe": True or False, # Whether the file has been modified by this user. |
| 1387 | "modifiedByMeTime": "A String", # The last time the file was modified by the user (RFC 3339 date-time). |
| 1388 | "modifiedTime": "A String", # The last time the file was modified by anyone (RFC 3339 date-time). |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1389 | # Note that setting modifiedTime will also update modifiedByMeTime for the user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1390 | "name": "A String", # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. |
| 1391 | "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive. |
| 1392 | "ownedByMe": True or False, # Whether the user owns the file. Not populated for items in shared drives. |
| 1393 | "owners": [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1394 | { # Information about a Drive user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1395 | "displayName": "A String", # A plain text displayable name for this user. |
| 1396 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1397 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1398 | "me": True or False, # Whether this user is the requesting user. |
| 1399 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1400 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1401 | }, |
| 1402 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1403 | "parents": [ # The IDs of the parent folders which contain the file. |
| 1404 | # If not specified as part of a create 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 must use the addParents and removeParents parameters to modify the parents list. |
| 1405 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1406 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1407 | "permissionIds": [ # List of permission IDs for users with access to this file. |
| 1408 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1409 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1410 | "permissions": [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1411 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1412 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
| 1413 | "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. |
| 1414 | "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: |
| 1415 | # - user - User's full name, as defined for their Google account, such as "Joe Smith." |
| 1416 | # - group - Name of the Google Group, such as "The Company Administrators." |
| 1417 | # - domain - String domain name, such as "thecompany.com." |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1418 | # - anyone - No displayName is present. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1419 | "domain": "A String", # The domain to which this permission refers. |
| 1420 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 1421 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 1422 | # - They can only be set on user and group permissions |
| 1423 | # - The time must be in the future |
| 1424 | # - The time cannot be more than a year in the future |
| 1425 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. |
| 1426 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
| 1427 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1428 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1429 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 1430 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. |
| 1431 | "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: |
| 1432 | # - file |
| 1433 | # - member |
| 1434 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1435 | # - organizer |
| 1436 | # - fileOrganizer |
| 1437 | # - writer |
| 1438 | # - commenter |
| 1439 | # - reader |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1440 | }, |
| 1441 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1442 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1443 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1444 | # - owner |
| 1445 | # - organizer |
| 1446 | # - fileOrganizer |
| 1447 | # - writer |
| 1448 | # - commenter |
| 1449 | # - reader |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1450 | "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. |
| 1451 | { |
| 1452 | "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. |
| 1453 | "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. |
| 1454 | "role": "A String", # Deprecated - use permissionDetails/role instead. |
| 1455 | "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. |
| 1456 | }, |
| 1457 | ], |
| 1458 | "type": "A String", # The type of the grantee. Valid values are: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1459 | # - user |
| 1460 | # - group |
| 1461 | # - domain |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1462 | # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1463 | "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1464 | }, |
| 1465 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1466 | "properties": { # A collection of arbitrary key-value pairs which are visible to all apps. |
| 1467 | # Entries with null values are cleared in update and copy requests. |
| 1468 | "a_key": "A String", |
| 1469 | }, |
| 1470 | "quotaBytesUsed": "A String", # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. |
| 1471 | "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives. |
| 1472 | "sharedWithMeTime": "A String", # The time at which the file was shared with the user, if applicable (RFC 3339 date-time). |
| 1473 | "sharingUser": { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable. |
| 1474 | "displayName": "A String", # A plain text displayable name for this user. |
| 1475 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1476 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1477 | "me": True or False, # Whether this user is the requesting user. |
| 1478 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1479 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1480 | }, |
| 1481 | "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut. |
| 1482 | "targetId": "A String", # The ID of the file that this shortcut points to. |
| 1483 | "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created. |
| 1484 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 1485 | "size": "A String", # The size of the file's content in bytes. This is applicable to binary files in Google Drive and Google Docs files. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1486 | "spaces": [ # The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'. |
| 1487 | "A String", |
| 1488 | ], |
| 1489 | "starred": True or False, # Whether the user has starred the file. |
| 1490 | "teamDriveId": "A String", # Deprecated - use driveId instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 1491 | "thumbnailLink": "A String", # A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1492 | "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1493 | "trashed": True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1494 | "trashedTime": "A String", # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. |
| 1495 | "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. |
| 1496 | "displayName": "A String", # A plain text displayable name for this user. |
| 1497 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1498 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1499 | "me": True or False, # Whether this user is the requesting user. |
| 1500 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1501 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1502 | }, |
| 1503 | "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 user. |
| 1504 | "videoMediaMetadata": { # Additional metadata about video media. This may not be available immediately upon upload. |
| 1505 | "durationMillis": "A String", # The duration of the video in milliseconds. |
| 1506 | "height": 42, # The height of the video in pixels. |
| 1507 | "width": 42, # The width of the video in pixels. |
| 1508 | }, |
| 1509 | "viewedByMe": True or False, # Whether the file has been viewed by this user. |
| 1510 | "viewedByMeTime": "A String", # The last time the file was viewed by the user (RFC 3339 date-time). |
| 1511 | "viewersCanCopyContent": True or False, # Deprecated - use copyRequiresWriterPermission instead. |
| 1512 | "webContentLink": "A String", # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive. |
| 1513 | "webViewLink": "A String", # A link for opening the file in a relevant Google editor or viewer in a browser. |
| 1514 | "writersCanShare": True or False, # Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1515 | }</pre> |
| 1516 | </div> |
| 1517 | |
| 1518 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1519 | <code class="details" id="get_media">get_media(fileId, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1520 | <pre>Gets a file's metadata or content by ID. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1521 | |
| 1522 | Args: |
| 1523 | fileId: string, The ID of the file. (required) |
| 1524 | acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1525 | includePermissionsForView: string, Specifies which additional view's permissions to include in the response. Only 'published' is supported. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1526 | supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1527 | supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1528 | |
| 1529 | Returns: |
| 1530 | The media object as a string. |
| 1531 | |
| 1532 | </pre> |
| 1533 | </div> |
| 1534 | |
| 1535 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1536 | <code class="details" id="list">list(corpora=None, corpus=None, driveId=None, includeItemsFromAllDrives=None, includePermissionsForView=None, includeTeamDriveItems=None, orderBy=None, pageSize=None, pageToken=None, q=None, spaces=None, supportsAllDrives=None, supportsTeamDrives=None, teamDriveId=None)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1537 | <pre>Lists or searches files. |
| 1538 | |
| 1539 | Args: |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1540 | corpora: string, Groupings of files to which the query applies. Supported groupings are: 'user' (files created by, opened by, or shared directly with the user), 'drive' (files in the specified shared drive as indicated by the 'driveId'), 'domain' (files shared to the user's domain), and 'allDrives' (A combination of 'user' and 'drive' for all drives where the user is a member). When able, use 'user' or 'drive', instead of 'allDrives', for efficiency. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1541 | corpus: string, The source of files to list. Deprecated: use 'corpora' instead. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1542 | Allowed values |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1543 | domain - Files shared to the user's domain. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1544 | user - Files owned by or shared to the user. If a user has permissions on a Shared Drive, the files inside it won't be retrieved unless the user has created, opened, or shared the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1545 | driveId: string, ID of the shared drive to search. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1546 | includeItemsFromAllDrives: boolean, Whether both My Drive and shared drive items should be included in results. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1547 | includePermissionsForView: string, Specifies which additional view's permissions to include in the response. Only 'published' is supported. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1548 | includeTeamDriveItems: boolean, Deprecated use includeItemsFromAllDrives instead. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1549 | orderBy: string, A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored. |
| 1550 | pageSize: 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. |
| 1551 | pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response. |
| 1552 | q: string, A query for filtering the file results. See the "Search for Files" guide for supported syntax. |
| 1553 | spaces: string, A comma-separated list of spaces to query within the corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1554 | supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1555 | supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. |
| 1556 | teamDriveId: string, Deprecated use driveId instead. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1557 | |
| 1558 | Returns: |
| 1559 | An object of the form: |
| 1560 | |
| 1561 | { # A list of files. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1562 | "files": [ # The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1563 | { # The metadata for a file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1564 | "appProperties": { # A collection of arbitrary key-value pairs which are private to the requesting app. |
| 1565 | # Entries with null values are cleared in update and copy requests. |
| 1566 | "a_key": "A String", |
| 1567 | }, |
| 1568 | "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. |
| 1569 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1570 | "canAddFolderFromAnotherDrive": True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1571 | "canAddMyDriveParent": True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files. |
| 1572 | "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file. |
| 1573 | "canChangeViewersCanCopyContent": True or False, # Deprecated |
| 1574 | "canComment": True or False, # Whether the current user can comment on this file. |
| 1575 | "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. |
| 1576 | "canDelete": True or False, # Whether the current user can delete this file. |
| 1577 | "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. |
| 1578 | "canDownload": True or False, # Whether the current user can download this file. |
| 1579 | "canEdit": True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent. |
| 1580 | "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. |
| 1581 | "canModifyContent": True or False, # Whether the current user can modify the content of this file. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1582 | "canModifyContentRestriction": True or False, # Whether the current user can modify restrictions on content of this file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1583 | "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. |
| 1584 | "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1585 | "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1586 | "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead. |
| 1587 | "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
| 1588 | "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. |
| 1589 | "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1590 | "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1591 | "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead. |
| 1592 | "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. |
| 1593 | "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. |
| 1594 | "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. |
| 1595 | "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead. |
| 1596 | "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. |
| 1597 | "canRemoveMyDriveParent": True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files. |
| 1598 | "canRename": True or False, # Whether the current user can rename this file. |
| 1599 | "canShare": True or False, # Whether the current user can modify the sharing settings for this file. |
| 1600 | "canTrash": True or False, # Whether the current user can move this file to trash. |
| 1601 | "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. |
| 1602 | "canUntrash": True or False, # Whether the current user can restore this file from trash. |
| 1603 | }, |
| 1604 | "contentHints": { # Additional information about the content of the file. These fields are never populated in responses. |
| 1605 | "indexableText": "A String", # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. |
| 1606 | "thumbnail": { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail. |
| 1607 | "image": "A String", # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). |
| 1608 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 1609 | }, |
| 1610 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1611 | "contentRestrictions": [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists. |
| 1612 | { # A restriction for accessing the content of the file. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1613 | "readOnly": True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1614 | "reason": "A String", # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true. |
| 1615 | "restrictingUser": { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true. |
| 1616 | "displayName": "A String", # A plain text displayable name for this user. |
| 1617 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1618 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1619 | "me": True or False, # Whether this user is the requesting user. |
| 1620 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1621 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1622 | }, |
| 1623 | "restrictionTime": "A String", # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true. |
| 1624 | "type": "A String", # The type of the content restriction. Currently the only possible value is globalContentRestriction. |
| 1625 | }, |
| 1626 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1627 | "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters. |
| 1628 | "createdTime": "A String", # The time at which the file was created (RFC 3339 date-time). |
| 1629 | "description": "A String", # A short description of the file. |
| 1630 | "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives. |
| 1631 | "explicitlyTrashed": True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 1632 | "exportLinks": { # Links for exporting Docs Editors files to specific formats. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1633 | "a_key": "A String", # A mapping from export format to URL |
| 1634 | }, |
| 1635 | "fileExtension": "A String", # The final component of fullFileExtension. This is only available for files with binary content in Google Drive. |
| 1636 | "folderColorRgb": "A String", # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. |
| 1637 | # If an unsupported color is specified, the closest color in the palette will be used instead. |
| 1638 | "fullFileExtension": "A String", # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. |
| 1639 | # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension. |
| 1640 | "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives. |
| 1641 | "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. |
| 1642 | "headRevisionId": "A String", # The ID of the file's head revision. This is currently only available for files with binary content in Google Drive. |
| 1643 | "iconLink": "A String", # A static, unauthenticated link to the file's icon. |
| 1644 | "id": "A String", # The ID of the file. |
| 1645 | "imageMediaMetadata": { # Additional metadata about image media, if available. |
| 1646 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 1647 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 1648 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 1649 | "colorSpace": "A String", # The color space of the photo. |
| 1650 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 1651 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 1652 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 1653 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 1654 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 1655 | "height": 42, # The height of the image in pixels. |
| 1656 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 1657 | "lens": "A String", # The lens used to create the photo. |
| 1658 | "location": { # Geographic location information stored in the image. |
| 1659 | "altitude": 3.14, # The altitude stored in the image. |
| 1660 | "latitude": 3.14, # The latitude stored in the image. |
| 1661 | "longitude": 3.14, # The longitude stored in the image. |
| 1662 | }, |
| 1663 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 1664 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 1665 | "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation. |
| 1666 | "sensor": "A String", # The type of sensor used to create the photo. |
| 1667 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 1668 | "time": "A String", # The date and time the photo was taken (EXIF DateTime). |
| 1669 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 1670 | "width": 42, # The width of the image in pixels. |
| 1671 | }, |
| 1672 | "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app. |
| 1673 | "kind": "drive#file", # Identifies what kind of resource this is. Value: the fixed string "drive#file". |
| 1674 | "lastModifyingUser": { # Information about a Drive user. # The last user to modify the file. |
| 1675 | "displayName": "A String", # A plain text displayable name for this user. |
| 1676 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1677 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1678 | "me": True or False, # Whether this user is the requesting user. |
| 1679 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1680 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1681 | }, |
| 1682 | "md5Checksum": "A String", # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive. |
| 1683 | "mimeType": "A String", # The MIME type of the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1684 | # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1685 | # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1686 | "modifiedByMe": True or False, # Whether the file has been modified by this user. |
| 1687 | "modifiedByMeTime": "A String", # The last time the file was modified by the user (RFC 3339 date-time). |
| 1688 | "modifiedTime": "A String", # The last time the file was modified by anyone (RFC 3339 date-time). |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1689 | # Note that setting modifiedTime will also update modifiedByMeTime for the user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1690 | "name": "A String", # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. |
| 1691 | "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive. |
| 1692 | "ownedByMe": True or False, # Whether the user owns the file. Not populated for items in shared drives. |
| 1693 | "owners": [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1694 | { # Information about a Drive user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1695 | "displayName": "A String", # A plain text displayable name for this user. |
| 1696 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1697 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1698 | "me": True or False, # Whether this user is the requesting user. |
| 1699 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1700 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1701 | }, |
| 1702 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1703 | "parents": [ # The IDs of the parent folders which contain the file. |
| 1704 | # If not specified as part of a create 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 must use the addParents and removeParents parameters to modify the parents list. |
| 1705 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1706 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1707 | "permissionIds": [ # List of permission IDs for users with access to this file. |
| 1708 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1709 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1710 | "permissions": [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1711 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1712 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
| 1713 | "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. |
| 1714 | "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: |
| 1715 | # - user - User's full name, as defined for their Google account, such as "Joe Smith." |
| 1716 | # - group - Name of the Google Group, such as "The Company Administrators." |
| 1717 | # - domain - String domain name, such as "thecompany.com." |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1718 | # - anyone - No displayName is present. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1719 | "domain": "A String", # The domain to which this permission refers. |
| 1720 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 1721 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 1722 | # - They can only be set on user and group permissions |
| 1723 | # - The time must be in the future |
| 1724 | # - The time cannot be more than a year in the future |
| 1725 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. |
| 1726 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
| 1727 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1728 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1729 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 1730 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. |
| 1731 | "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: |
| 1732 | # - file |
| 1733 | # - member |
| 1734 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1735 | # - organizer |
| 1736 | # - fileOrganizer |
| 1737 | # - writer |
| 1738 | # - commenter |
| 1739 | # - reader |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1740 | }, |
| 1741 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1742 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1743 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1744 | # - owner |
| 1745 | # - organizer |
| 1746 | # - fileOrganizer |
| 1747 | # - writer |
| 1748 | # - commenter |
| 1749 | # - reader |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1750 | "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. |
| 1751 | { |
| 1752 | "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. |
| 1753 | "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. |
| 1754 | "role": "A String", # Deprecated - use permissionDetails/role instead. |
| 1755 | "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. |
| 1756 | }, |
| 1757 | ], |
| 1758 | "type": "A String", # The type of the grantee. Valid values are: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1759 | # - user |
| 1760 | # - group |
| 1761 | # - domain |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1762 | # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1763 | "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1764 | }, |
| 1765 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1766 | "properties": { # A collection of arbitrary key-value pairs which are visible to all apps. |
| 1767 | # Entries with null values are cleared in update and copy requests. |
| 1768 | "a_key": "A String", |
| 1769 | }, |
| 1770 | "quotaBytesUsed": "A String", # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. |
| 1771 | "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives. |
| 1772 | "sharedWithMeTime": "A String", # The time at which the file was shared with the user, if applicable (RFC 3339 date-time). |
| 1773 | "sharingUser": { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable. |
| 1774 | "displayName": "A String", # A plain text displayable name for this user. |
| 1775 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1776 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1777 | "me": True or False, # Whether this user is the requesting user. |
| 1778 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1779 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1780 | }, |
| 1781 | "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut. |
| 1782 | "targetId": "A String", # The ID of the file that this shortcut points to. |
| 1783 | "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created. |
| 1784 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 1785 | "size": "A String", # The size of the file's content in bytes. This is applicable to binary files in Google Drive and Google Docs files. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1786 | "spaces": [ # The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'. |
| 1787 | "A String", |
| 1788 | ], |
| 1789 | "starred": True or False, # Whether the user has starred the file. |
| 1790 | "teamDriveId": "A String", # Deprecated - use driveId instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 1791 | "thumbnailLink": "A String", # A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1792 | "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1793 | "trashed": True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1794 | "trashedTime": "A String", # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. |
| 1795 | "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. |
| 1796 | "displayName": "A String", # A plain text displayable name for this user. |
| 1797 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1798 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1799 | "me": True or False, # Whether this user is the requesting user. |
| 1800 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1801 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1802 | }, |
| 1803 | "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 user. |
| 1804 | "videoMediaMetadata": { # Additional metadata about video media. This may not be available immediately upon upload. |
| 1805 | "durationMillis": "A String", # The duration of the video in milliseconds. |
| 1806 | "height": 42, # The height of the video in pixels. |
| 1807 | "width": 42, # The width of the video in pixels. |
| 1808 | }, |
| 1809 | "viewedByMe": True or False, # Whether the file has been viewed by this user. |
| 1810 | "viewedByMeTime": "A String", # The last time the file was viewed by the user (RFC 3339 date-time). |
| 1811 | "viewersCanCopyContent": True or False, # Deprecated - use copyRequiresWriterPermission instead. |
| 1812 | "webContentLink": "A String", # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive. |
| 1813 | "webViewLink": "A String", # A link for opening the file in a relevant Google editor or viewer in a browser. |
| 1814 | "writersCanShare": True or False, # Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1815 | }, |
| 1816 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1817 | "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 "user" or "drive". |
| 1818 | "kind": "drive#fileList", # Identifies what kind of resource this is. Value: the fixed string "drive#fileList". |
| 1819 | "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. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1820 | }</pre> |
| 1821 | </div> |
| 1822 | |
| 1823 | <div class="method"> |
| 1824 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 1825 | <pre>Retrieves the next page of results. |
| 1826 | |
| 1827 | Args: |
| 1828 | previous_request: The request for the previous page. (required) |
| 1829 | previous_response: The response from the request for the previous page. (required) |
| 1830 | |
| 1831 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1832 | A request object that you can call 'execute()' on to request the next |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1833 | page. Returns None if there are no more items in the collection. |
| 1834 | </pre> |
| 1835 | </div> |
| 1836 | |
| 1837 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1838 | <code class="details" id="update">update(fileId, body=None, addParents=None, enforceSingleParent=None, includePermissionsForView=None, keepRevisionForever=None, ocrLanguage=None, removeParents=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</code> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1839 | <pre>Updates a file's metadata and/or content. This method supports patch semantics. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1840 | |
| 1841 | Args: |
| 1842 | fileId: string, The ID of the file. (required) |
| 1843 | body: object, The request body. |
| 1844 | The object takes the form of: |
| 1845 | |
| 1846 | { # The metadata for a file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1847 | "appProperties": { # A collection of arbitrary key-value pairs which are private to the requesting app. |
| 1848 | # Entries with null values are cleared in update and copy requests. |
| 1849 | "a_key": "A String", |
| 1850 | }, |
| 1851 | "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. |
| 1852 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1853 | "canAddFolderFromAnotherDrive": True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1854 | "canAddMyDriveParent": True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files. |
| 1855 | "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file. |
| 1856 | "canChangeViewersCanCopyContent": True or False, # Deprecated |
| 1857 | "canComment": True or False, # Whether the current user can comment on this file. |
| 1858 | "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. |
| 1859 | "canDelete": True or False, # Whether the current user can delete this file. |
| 1860 | "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. |
| 1861 | "canDownload": True or False, # Whether the current user can download this file. |
| 1862 | "canEdit": True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent. |
| 1863 | "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. |
| 1864 | "canModifyContent": True or False, # Whether the current user can modify the content of this file. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1865 | "canModifyContentRestriction": True or False, # Whether the current user can modify restrictions on content of this file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1866 | "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. |
| 1867 | "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1868 | "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1869 | "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead. |
| 1870 | "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
| 1871 | "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. |
| 1872 | "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1873 | "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1874 | "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead. |
| 1875 | "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. |
| 1876 | "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. |
| 1877 | "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. |
| 1878 | "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead. |
| 1879 | "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. |
| 1880 | "canRemoveMyDriveParent": True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files. |
| 1881 | "canRename": True or False, # Whether the current user can rename this file. |
| 1882 | "canShare": True or False, # Whether the current user can modify the sharing settings for this file. |
| 1883 | "canTrash": True or False, # Whether the current user can move this file to trash. |
| 1884 | "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. |
| 1885 | "canUntrash": True or False, # Whether the current user can restore this file from trash. |
| 1886 | }, |
| 1887 | "contentHints": { # Additional information about the content of the file. These fields are never populated in responses. |
| 1888 | "indexableText": "A String", # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. |
| 1889 | "thumbnail": { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail. |
| 1890 | "image": "A String", # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). |
| 1891 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 1892 | }, |
| 1893 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1894 | "contentRestrictions": [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists. |
| 1895 | { # A restriction for accessing the content of the file. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1896 | "readOnly": True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1897 | "reason": "A String", # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true. |
| 1898 | "restrictingUser": { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true. |
| 1899 | "displayName": "A String", # A plain text displayable name for this user. |
| 1900 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1901 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1902 | "me": True or False, # Whether this user is the requesting user. |
| 1903 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1904 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1905 | }, |
| 1906 | "restrictionTime": "A String", # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true. |
| 1907 | "type": "A String", # The type of the content restriction. Currently the only possible value is globalContentRestriction. |
| 1908 | }, |
| 1909 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1910 | "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters. |
| 1911 | "createdTime": "A String", # The time at which the file was created (RFC 3339 date-time). |
| 1912 | "description": "A String", # A short description of the file. |
| 1913 | "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives. |
| 1914 | "explicitlyTrashed": True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 1915 | "exportLinks": { # Links for exporting Docs Editors files to specific formats. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1916 | "a_key": "A String", # A mapping from export format to URL |
| 1917 | }, |
| 1918 | "fileExtension": "A String", # The final component of fullFileExtension. This is only available for files with binary content in Google Drive. |
| 1919 | "folderColorRgb": "A String", # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. |
| 1920 | # If an unsupported color is specified, the closest color in the palette will be used instead. |
| 1921 | "fullFileExtension": "A String", # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. |
| 1922 | # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension. |
| 1923 | "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives. |
| 1924 | "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. |
| 1925 | "headRevisionId": "A String", # The ID of the file's head revision. This is currently only available for files with binary content in Google Drive. |
| 1926 | "iconLink": "A String", # A static, unauthenticated link to the file's icon. |
| 1927 | "id": "A String", # The ID of the file. |
| 1928 | "imageMediaMetadata": { # Additional metadata about image media, if available. |
| 1929 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 1930 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 1931 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 1932 | "colorSpace": "A String", # The color space of the photo. |
| 1933 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 1934 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 1935 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 1936 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 1937 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 1938 | "height": 42, # The height of the image in pixels. |
| 1939 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 1940 | "lens": "A String", # The lens used to create the photo. |
| 1941 | "location": { # Geographic location information stored in the image. |
| 1942 | "altitude": 3.14, # The altitude stored in the image. |
| 1943 | "latitude": 3.14, # The latitude stored in the image. |
| 1944 | "longitude": 3.14, # The longitude stored in the image. |
| 1945 | }, |
| 1946 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 1947 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 1948 | "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation. |
| 1949 | "sensor": "A String", # The type of sensor used to create the photo. |
| 1950 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 1951 | "time": "A String", # The date and time the photo was taken (EXIF DateTime). |
| 1952 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 1953 | "width": 42, # The width of the image in pixels. |
| 1954 | }, |
| 1955 | "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app. |
| 1956 | "kind": "drive#file", # Identifies what kind of resource this is. Value: the fixed string "drive#file". |
| 1957 | "lastModifyingUser": { # Information about a Drive user. # The last user to modify the file. |
| 1958 | "displayName": "A String", # A plain text displayable name for this user. |
| 1959 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1960 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1961 | "me": True or False, # Whether this user is the requesting user. |
| 1962 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1963 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 1964 | }, |
| 1965 | "md5Checksum": "A String", # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive. |
| 1966 | "mimeType": "A String", # The MIME type of the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1967 | # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1968 | # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1969 | "modifiedByMe": True or False, # Whether the file has been modified by this user. |
| 1970 | "modifiedByMeTime": "A String", # The last time the file was modified by the user (RFC 3339 date-time). |
| 1971 | "modifiedTime": "A String", # The last time the file was modified by anyone (RFC 3339 date-time). |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1972 | # Note that setting modifiedTime will also update modifiedByMeTime for the user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1973 | "name": "A String", # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. |
| 1974 | "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive. |
| 1975 | "ownedByMe": True or False, # Whether the user owns the file. Not populated for items in shared drives. |
| 1976 | "owners": [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1977 | { # Information about a Drive user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1978 | "displayName": "A String", # A plain text displayable name for this user. |
| 1979 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 1980 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 1981 | "me": True or False, # Whether this user is the requesting user. |
| 1982 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 1983 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1984 | }, |
| 1985 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1986 | "parents": [ # The IDs of the parent folders which contain the file. |
| 1987 | # If not specified as part of a create 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 must use the addParents and removeParents parameters to modify the parents list. |
| 1988 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1989 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1990 | "permissionIds": [ # List of permission IDs for users with access to this file. |
| 1991 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1992 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1993 | "permissions": [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1994 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1995 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
| 1996 | "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. |
| 1997 | "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: |
| 1998 | # - user - User's full name, as defined for their Google account, such as "Joe Smith." |
| 1999 | # - group - Name of the Google Group, such as "The Company Administrators." |
| 2000 | # - domain - String domain name, such as "thecompany.com." |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2001 | # - anyone - No displayName is present. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2002 | "domain": "A String", # The domain to which this permission refers. |
| 2003 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 2004 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 2005 | # - They can only be set on user and group permissions |
| 2006 | # - The time must be in the future |
| 2007 | # - The time cannot be more than a year in the future |
| 2008 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. |
| 2009 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
| 2010 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2011 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2012 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 2013 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. |
| 2014 | "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: |
| 2015 | # - file |
| 2016 | # - member |
| 2017 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2018 | # - organizer |
| 2019 | # - fileOrganizer |
| 2020 | # - writer |
| 2021 | # - commenter |
| 2022 | # - reader |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2023 | }, |
| 2024 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2025 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 2026 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2027 | # - owner |
| 2028 | # - organizer |
| 2029 | # - fileOrganizer |
| 2030 | # - writer |
| 2031 | # - commenter |
| 2032 | # - reader |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2033 | "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. |
| 2034 | { |
| 2035 | "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. |
| 2036 | "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. |
| 2037 | "role": "A String", # Deprecated - use permissionDetails/role instead. |
| 2038 | "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. |
| 2039 | }, |
| 2040 | ], |
| 2041 | "type": "A String", # The type of the grantee. Valid values are: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2042 | # - user |
| 2043 | # - group |
| 2044 | # - domain |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2045 | # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2046 | "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2047 | }, |
| 2048 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2049 | "properties": { # A collection of arbitrary key-value pairs which are visible to all apps. |
| 2050 | # Entries with null values are cleared in update and copy requests. |
| 2051 | "a_key": "A String", |
| 2052 | }, |
| 2053 | "quotaBytesUsed": "A String", # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. |
| 2054 | "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives. |
| 2055 | "sharedWithMeTime": "A String", # The time at which the file was shared with the user, if applicable (RFC 3339 date-time). |
| 2056 | "sharingUser": { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable. |
| 2057 | "displayName": "A String", # A plain text displayable name for this user. |
| 2058 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 2059 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 2060 | "me": True or False, # Whether this user is the requesting user. |
| 2061 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 2062 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 2063 | }, |
| 2064 | "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut. |
| 2065 | "targetId": "A String", # The ID of the file that this shortcut points to. |
| 2066 | "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created. |
| 2067 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 2068 | "size": "A String", # The size of the file's content in bytes. This is applicable to binary files in Google Drive and Google Docs files. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2069 | "spaces": [ # The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'. |
| 2070 | "A String", |
| 2071 | ], |
| 2072 | "starred": True or False, # Whether the user has starred the file. |
| 2073 | "teamDriveId": "A String", # Deprecated - use driveId instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 2074 | "thumbnailLink": "A String", # A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2075 | "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2076 | "trashed": True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2077 | "trashedTime": "A String", # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. |
| 2078 | "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. |
| 2079 | "displayName": "A String", # A plain text displayable name for this user. |
| 2080 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 2081 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 2082 | "me": True or False, # Whether this user is the requesting user. |
| 2083 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 2084 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 2085 | }, |
| 2086 | "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 user. |
| 2087 | "videoMediaMetadata": { # Additional metadata about video media. This may not be available immediately upon upload. |
| 2088 | "durationMillis": "A String", # The duration of the video in milliseconds. |
| 2089 | "height": 42, # The height of the video in pixels. |
| 2090 | "width": 42, # The width of the video in pixels. |
| 2091 | }, |
| 2092 | "viewedByMe": True or False, # Whether the file has been viewed by this user. |
| 2093 | "viewedByMeTime": "A String", # The last time the file was viewed by the user (RFC 3339 date-time). |
| 2094 | "viewersCanCopyContent": True or False, # Deprecated - use copyRequiresWriterPermission instead. |
| 2095 | "webContentLink": "A String", # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive. |
| 2096 | "webViewLink": "A String", # A link for opening the file in a relevant Google editor or viewer in a browser. |
| 2097 | "writersCanShare": True or False, # Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2098 | } |
| 2099 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2100 | addParents: string, A comma-separated list of parent IDs to add. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2101 | enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item is removed from all current folders and placed in the requested folder. Other requests that increase the number of parents fail, except when the canAddMyDriveParent file capability is true and a single parent is being added. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2102 | includePermissionsForView: string, Specifies which additional view's permissions to include in the response. Only 'published' is supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2103 | keepRevisionForever: boolean, Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. |
| 2104 | ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code). |
| 2105 | removeParents: string, A comma-separated list of parent IDs to remove. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2106 | supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2107 | supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. |
| 2108 | useContentAsIndexableText: boolean, Whether to use the uploaded content as indexable text. |
| 2109 | media_body: string, The filename of the media request body, or an instance of a MediaUpload object. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2110 | media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2111 | |
| 2112 | Returns: |
| 2113 | An object of the form: |
| 2114 | |
| 2115 | { # The metadata for a file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2116 | "appProperties": { # A collection of arbitrary key-value pairs which are private to the requesting app. |
| 2117 | # Entries with null values are cleared in update and copy requests. |
| 2118 | "a_key": "A String", |
| 2119 | }, |
| 2120 | "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. |
| 2121 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2122 | "canAddFolderFromAnotherDrive": True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2123 | "canAddMyDriveParent": True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files. |
| 2124 | "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file. |
| 2125 | "canChangeViewersCanCopyContent": True or False, # Deprecated |
| 2126 | "canComment": True or False, # Whether the current user can comment on this file. |
| 2127 | "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. |
| 2128 | "canDelete": True or False, # Whether the current user can delete this file. |
| 2129 | "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. |
| 2130 | "canDownload": True or False, # Whether the current user can download this file. |
| 2131 | "canEdit": True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent. |
| 2132 | "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. |
| 2133 | "canModifyContent": True or False, # Whether the current user can modify the content of this file. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2134 | "canModifyContentRestriction": True or False, # Whether the current user can modify restrictions on content of this file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2135 | "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. |
| 2136 | "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2137 | "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2138 | "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead. |
| 2139 | "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
| 2140 | "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. |
| 2141 | "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2142 | "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2143 | "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead. |
| 2144 | "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. |
| 2145 | "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. |
| 2146 | "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. |
| 2147 | "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead. |
| 2148 | "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. |
| 2149 | "canRemoveMyDriveParent": True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files. |
| 2150 | "canRename": True or False, # Whether the current user can rename this file. |
| 2151 | "canShare": True or False, # Whether the current user can modify the sharing settings for this file. |
| 2152 | "canTrash": True or False, # Whether the current user can move this file to trash. |
| 2153 | "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. |
| 2154 | "canUntrash": True or False, # Whether the current user can restore this file from trash. |
| 2155 | }, |
| 2156 | "contentHints": { # Additional information about the content of the file. These fields are never populated in responses. |
| 2157 | "indexableText": "A String", # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. |
| 2158 | "thumbnail": { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail. |
| 2159 | "image": "A String", # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). |
| 2160 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 2161 | }, |
| 2162 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2163 | "contentRestrictions": [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists. |
| 2164 | { # A restriction for accessing the content of the file. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2165 | "readOnly": True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2166 | "reason": "A String", # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true. |
| 2167 | "restrictingUser": { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true. |
| 2168 | "displayName": "A String", # A plain text displayable name for this user. |
| 2169 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 2170 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 2171 | "me": True or False, # Whether this user is the requesting user. |
| 2172 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 2173 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 2174 | }, |
| 2175 | "restrictionTime": "A String", # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true. |
| 2176 | "type": "A String", # The type of the content restriction. Currently the only possible value is globalContentRestriction. |
| 2177 | }, |
| 2178 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2179 | "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters. |
| 2180 | "createdTime": "A String", # The time at which the file was created (RFC 3339 date-time). |
| 2181 | "description": "A String", # A short description of the file. |
| 2182 | "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives. |
| 2183 | "explicitlyTrashed": True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 2184 | "exportLinks": { # Links for exporting Docs Editors files to specific formats. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2185 | "a_key": "A String", # A mapping from export format to URL |
| 2186 | }, |
| 2187 | "fileExtension": "A String", # The final component of fullFileExtension. This is only available for files with binary content in Google Drive. |
| 2188 | "folderColorRgb": "A String", # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. |
| 2189 | # If an unsupported color is specified, the closest color in the palette will be used instead. |
| 2190 | "fullFileExtension": "A String", # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. |
| 2191 | # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension. |
| 2192 | "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives. |
| 2193 | "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. |
| 2194 | "headRevisionId": "A String", # The ID of the file's head revision. This is currently only available for files with binary content in Google Drive. |
| 2195 | "iconLink": "A String", # A static, unauthenticated link to the file's icon. |
| 2196 | "id": "A String", # The ID of the file. |
| 2197 | "imageMediaMetadata": { # Additional metadata about image media, if available. |
| 2198 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 2199 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 2200 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 2201 | "colorSpace": "A String", # The color space of the photo. |
| 2202 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 2203 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 2204 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 2205 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 2206 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 2207 | "height": 42, # The height of the image in pixels. |
| 2208 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 2209 | "lens": "A String", # The lens used to create the photo. |
| 2210 | "location": { # Geographic location information stored in the image. |
| 2211 | "altitude": 3.14, # The altitude stored in the image. |
| 2212 | "latitude": 3.14, # The latitude stored in the image. |
| 2213 | "longitude": 3.14, # The longitude stored in the image. |
| 2214 | }, |
| 2215 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 2216 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 2217 | "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation. |
| 2218 | "sensor": "A String", # The type of sensor used to create the photo. |
| 2219 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 2220 | "time": "A String", # The date and time the photo was taken (EXIF DateTime). |
| 2221 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 2222 | "width": 42, # The width of the image in pixels. |
| 2223 | }, |
| 2224 | "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app. |
| 2225 | "kind": "drive#file", # Identifies what kind of resource this is. Value: the fixed string "drive#file". |
| 2226 | "lastModifyingUser": { # Information about a Drive user. # The last user to modify the file. |
| 2227 | "displayName": "A String", # A plain text displayable name for this user. |
| 2228 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 2229 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 2230 | "me": True or False, # Whether this user is the requesting user. |
| 2231 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 2232 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 2233 | }, |
| 2234 | "md5Checksum": "A String", # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive. |
| 2235 | "mimeType": "A String", # The MIME type of the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2236 | # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2237 | # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2238 | "modifiedByMe": True or False, # Whether the file has been modified by this user. |
| 2239 | "modifiedByMeTime": "A String", # The last time the file was modified by the user (RFC 3339 date-time). |
| 2240 | "modifiedTime": "A String", # The last time the file was modified by anyone (RFC 3339 date-time). |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2241 | # Note that setting modifiedTime will also update modifiedByMeTime for the user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2242 | "name": "A String", # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. |
| 2243 | "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive. |
| 2244 | "ownedByMe": True or False, # Whether the user owns the file. Not populated for items in shared drives. |
| 2245 | "owners": [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2246 | { # Information about a Drive user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2247 | "displayName": "A String", # A plain text displayable name for this user. |
| 2248 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 2249 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 2250 | "me": True or False, # Whether this user is the requesting user. |
| 2251 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 2252 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2253 | }, |
| 2254 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2255 | "parents": [ # The IDs of the parent folders which contain the file. |
| 2256 | # If not specified as part of a create 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 must use the addParents and removeParents parameters to modify the parents list. |
| 2257 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2258 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2259 | "permissionIds": [ # List of permission IDs for users with access to this file. |
| 2260 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2261 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2262 | "permissions": [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2263 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2264 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
| 2265 | "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. |
| 2266 | "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: |
| 2267 | # - user - User's full name, as defined for their Google account, such as "Joe Smith." |
| 2268 | # - group - Name of the Google Group, such as "The Company Administrators." |
| 2269 | # - domain - String domain name, such as "thecompany.com." |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2270 | # - anyone - No displayName is present. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2271 | "domain": "A String", # The domain to which this permission refers. |
| 2272 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 2273 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 2274 | # - They can only be set on user and group permissions |
| 2275 | # - The time must be in the future |
| 2276 | # - The time cannot be more than a year in the future |
| 2277 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. |
| 2278 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
| 2279 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2280 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2281 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 2282 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. |
| 2283 | "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: |
| 2284 | # - file |
| 2285 | # - member |
| 2286 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2287 | # - organizer |
| 2288 | # - fileOrganizer |
| 2289 | # - writer |
| 2290 | # - commenter |
| 2291 | # - reader |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2292 | }, |
| 2293 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2294 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 2295 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2296 | # - owner |
| 2297 | # - organizer |
| 2298 | # - fileOrganizer |
| 2299 | # - writer |
| 2300 | # - commenter |
| 2301 | # - reader |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2302 | "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. |
| 2303 | { |
| 2304 | "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. |
| 2305 | "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. |
| 2306 | "role": "A String", # Deprecated - use permissionDetails/role instead. |
| 2307 | "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. |
| 2308 | }, |
| 2309 | ], |
| 2310 | "type": "A String", # The type of the grantee. Valid values are: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2311 | # - user |
| 2312 | # - group |
| 2313 | # - domain |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2314 | # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2315 | "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2316 | }, |
| 2317 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2318 | "properties": { # A collection of arbitrary key-value pairs which are visible to all apps. |
| 2319 | # Entries with null values are cleared in update and copy requests. |
| 2320 | "a_key": "A String", |
| 2321 | }, |
| 2322 | "quotaBytesUsed": "A String", # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. |
| 2323 | "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives. |
| 2324 | "sharedWithMeTime": "A String", # The time at which the file was shared with the user, if applicable (RFC 3339 date-time). |
| 2325 | "sharingUser": { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable. |
| 2326 | "displayName": "A String", # A plain text displayable name for this user. |
| 2327 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 2328 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 2329 | "me": True or False, # Whether this user is the requesting user. |
| 2330 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 2331 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 2332 | }, |
| 2333 | "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut. |
| 2334 | "targetId": "A String", # The ID of the file that this shortcut points to. |
| 2335 | "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created. |
| 2336 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 2337 | "size": "A String", # The size of the file's content in bytes. This is applicable to binary files in Google Drive and Google Docs files. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2338 | "spaces": [ # The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'. |
| 2339 | "A String", |
| 2340 | ], |
| 2341 | "starred": True or False, # Whether the user has starred the file. |
| 2342 | "teamDriveId": "A String", # Deprecated - use driveId instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame^] | 2343 | "thumbnailLink": "A String", # A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2344 | "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2345 | "trashed": True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2346 | "trashedTime": "A String", # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. |
| 2347 | "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. |
| 2348 | "displayName": "A String", # A plain text displayable name for this user. |
| 2349 | "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. |
| 2350 | "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user". |
| 2351 | "me": True or False, # Whether this user is the requesting user. |
| 2352 | "permissionId": "A String", # The user's ID as visible in Permission resources. |
| 2353 | "photoLink": "A String", # A link to the user's profile photo, if available. |
| 2354 | }, |
| 2355 | "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 user. |
| 2356 | "videoMediaMetadata": { # Additional metadata about video media. This may not be available immediately upon upload. |
| 2357 | "durationMillis": "A String", # The duration of the video in milliseconds. |
| 2358 | "height": 42, # The height of the video in pixels. |
| 2359 | "width": 42, # The width of the video in pixels. |
| 2360 | }, |
| 2361 | "viewedByMe": True or False, # Whether the file has been viewed by this user. |
| 2362 | "viewedByMeTime": "A String", # The last time the file was viewed by the user (RFC 3339 date-time). |
| 2363 | "viewersCanCopyContent": True or False, # Deprecated - use copyRequiresWriterPermission instead. |
| 2364 | "webContentLink": "A String", # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive. |
| 2365 | "webViewLink": "A String", # A link for opening the file in a relevant Google editor or viewer in a browser. |
| 2366 | "writersCanShare": True or False, # Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2367 | }</pre> |
| 2368 | </div> |
| 2369 | |
| 2370 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2371 | <code class="details" id="watch">watch(fileId, body=None, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2372 | <pre>Subscribes to changes to a file |
| 2373 | |
| 2374 | Args: |
| 2375 | fileId: string, The ID of the file. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2376 | body: object, The request body. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2377 | The object takes the form of: |
| 2378 | |
| 2379 | { # An notification channel used to watch for resource changes. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2380 | "address": "A String", # The address where notifications are delivered for this channel. |
| 2381 | "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. |
| 2382 | "id": "A String", # A UUID or similar unique string that identifies this channel. |
| 2383 | "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel". |
| 2384 | "params": { # Additional parameters controlling delivery channel behavior. Optional. |
| 2385 | "a_key": "A String", # Declares a new parameter by name. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2386 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2387 | "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional. |
| 2388 | "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. |
| 2389 | "resourceUri": "A String", # A version-specific identifier for the watched resource. |
| 2390 | "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. |
| 2391 | "type": "A String", # The type of delivery mechanism used for this channel. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2392 | } |
| 2393 | |
| 2394 | acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2395 | includePermissionsForView: string, Specifies which additional view's permissions to include in the response. Only 'published' is supported. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2396 | supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2397 | supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2398 | |
| 2399 | Returns: |
| 2400 | An object of the form: |
| 2401 | |
| 2402 | { # An notification channel used to watch for resource changes. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2403 | "address": "A String", # The address where notifications are delivered for this channel. |
| 2404 | "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. |
| 2405 | "id": "A String", # A UUID or similar unique string that identifies this channel. |
| 2406 | "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel". |
| 2407 | "params": { # Additional parameters controlling delivery channel behavior. Optional. |
| 2408 | "a_key": "A String", # Declares a new parameter by name. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2409 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2410 | "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional. |
| 2411 | "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. |
| 2412 | "resourceUri": "A String", # A version-specific identifier for the watched resource. |
| 2413 | "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. |
| 2414 | "type": "A String", # The type of delivery mechanism used for this channel. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2415 | }</pre> |
| 2416 | </div> |
| 2417 | |
| 2418 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2419 | <code class="details" id="watch_media">watch_media(fileId, body=None, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2420 | <pre>Subscribes to changes to a file |
| 2421 | |
| 2422 | Args: |
| 2423 | fileId: string, The ID of the file. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2424 | body: object, The request body. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2425 | The object takes the form of: |
| 2426 | |
| 2427 | { # An notification channel used to watch for resource changes. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2428 | "address": "A String", # The address where notifications are delivered for this channel. |
| 2429 | "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. |
| 2430 | "id": "A String", # A UUID or similar unique string that identifies this channel. |
| 2431 | "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel". |
| 2432 | "params": { # Additional parameters controlling delivery channel behavior. Optional. |
| 2433 | "a_key": "A String", # Declares a new parameter by name. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2434 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2435 | "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional. |
| 2436 | "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. |
| 2437 | "resourceUri": "A String", # A version-specific identifier for the watched resource. |
| 2438 | "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. |
| 2439 | "type": "A String", # The type of delivery mechanism used for this channel. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2440 | } |
| 2441 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2442 | acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2443 | includePermissionsForView: string, Specifies which additional view's permissions to include in the response. Only 'published' is supported. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2444 | supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2445 | supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2446 | |
| 2447 | Returns: |
| 2448 | The media object as a string. |
| 2449 | |
| 2450 | </pre> |
| 2451 | </div> |
| 2452 | |
| 2453 | </body></html> |