John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [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_v2.html">Drive API</a> . <a href="drive_v2.permissions.html">permissions</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 78 | <code><a href="#delete">delete(fileId, permissionId, supportsTeamDrives=None)</a></code></p> |
| 79 | <p class="firstline">Deletes a permission from a file or Team Drive.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 80 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 81 | <code><a href="#get">get(fileId, permissionId, supportsTeamDrives=None)</a></code></p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 82 | <p class="firstline">Gets a permission by ID.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#getIdForEmail">getIdForEmail(email)</a></code></p> |
| 85 | <p class="firstline">Returns the permission ID for an email address.</p> |
| 86 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 87 | <code><a href="#insert">insert(fileId, body, supportsTeamDrives=None, sendNotificationEmails=None, emailMessage=None)</a></code></p> |
| 88 | <p class="firstline">Inserts a permission for a file or Team Drive.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 89 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 90 | <code><a href="#list">list(fileId, pageToken=None, supportsTeamDrives=None, maxResults=None)</a></code></p> |
| 91 | <p class="firstline">Lists a file's or Team Drive's permissions.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 92 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 93 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 94 | <p class="firstline">Retrieves the next page of results.</p> |
| 95 | <p class="toc_element"> |
| 96 | <code><a href="#patch">patch(fileId, permissionId, body, removeExpiration=None, supportsTeamDrives=None, transferOwnership=None)</a></code></p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 97 | <p class="firstline">Updates a permission using patch semantics.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 98 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 99 | <code><a href="#update">update(fileId, permissionId, body, removeExpiration=None, supportsTeamDrives=None, transferOwnership=None)</a></code></p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 100 | <p class="firstline">Updates a permission.</p> |
| 101 | <h3>Method Details</h3> |
| 102 | <div class="method"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 103 | <code class="details" id="delete">delete(fileId, permissionId, supportsTeamDrives=None)</code> |
| 104 | <pre>Deletes a permission from a file or Team Drive. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 105 | |
| 106 | Args: |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 107 | fileId: string, The ID for the file or Team Drive. (required) |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 108 | permissionId: string, The ID for the permission. (required) |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 109 | supportsTeamDrives: boolean, Whether the requesting application supports Team Drives. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 110 | </pre> |
| 111 | </div> |
| 112 | |
| 113 | <div class="method"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 114 | <code class="details" id="get">get(fileId, permissionId, supportsTeamDrives=None)</code> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 115 | <pre>Gets a permission by ID. |
| 116 | |
| 117 | Args: |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 118 | fileId: string, The ID for the file or Team Drive. (required) |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 119 | permissionId: string, The ID for the permission. (required) |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 120 | supportsTeamDrives: boolean, Whether the requesting application supports Team Drives. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 121 | |
| 122 | Returns: |
| 123 | An object of the form: |
| 124 | |
| 125 | { # A permission for a file. |
| 126 | "withLink": True or False, # Whether the link is required for this permission. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 127 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 128 | "name": "A String", # The name for this permission. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 129 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 130 | { |
| 131 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 132 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 133 | # - organizer |
| 134 | # - reader |
| 135 | # - writer |
| 136 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future. |
| 137 | "A String", |
| 138 | ], |
| 139 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 140 | # - file |
| 141 | # - member |
| 142 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 143 | }, |
| 144 | ], |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 145 | "kind": "drive#permission", # This is always drive#permission. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 146 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
| 147 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 148 | "authKey": "A String", # The authkey parameter required for this permission. |
| 149 | "etag": "A String", # The ETag of the permission. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 150 | "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 151 | "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions: |
| 152 | # - They can only be set on user and group permissions |
| 153 | # - The date must be in the future |
| 154 | # - The date cannot be more than a year in the future |
| 155 | # - The date can only be set on drive.permissions.update requests |
| 156 | "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed: |
| 157 | # - organizer |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 158 | # - owner |
| 159 | # - reader |
| 160 | # - writer |
| 161 | "type": "A String", # The account type. Allowed values are: |
| 162 | # - user |
| 163 | # - group |
| 164 | # - domain |
| 165 | # - anyone |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 166 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 167 | "A String", |
| 168 | ], |
| 169 | "selfLink": "A String", # A link back to this permission. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 170 | "photoLink": "A String", # A link to the profile photo, if available. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 171 | }</pre> |
| 172 | </div> |
| 173 | |
| 174 | <div class="method"> |
| 175 | <code class="details" id="getIdForEmail">getIdForEmail(email)</code> |
| 176 | <pre>Returns the permission ID for an email address. |
| 177 | |
| 178 | Args: |
| 179 | email: string, The email address for which to return a permission ID (required) |
| 180 | |
| 181 | Returns: |
| 182 | An object of the form: |
| 183 | |
| 184 | { # An ID for a user or group as seen in Permission items. |
| 185 | "kind": "drive#permissionId", # This is always drive#permissionId. |
| 186 | "id": "A String", # The permission ID. |
| 187 | }</pre> |
| 188 | </div> |
| 189 | |
| 190 | <div class="method"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 191 | <code class="details" id="insert">insert(fileId, body, supportsTeamDrives=None, sendNotificationEmails=None, emailMessage=None)</code> |
| 192 | <pre>Inserts a permission for a file or Team Drive. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 193 | |
| 194 | Args: |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 195 | fileId: string, The ID for the file or Team Drive. (required) |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 196 | body: object, The request body. (required) |
| 197 | The object takes the form of: |
| 198 | |
| 199 | { # A permission for a file. |
| 200 | "withLink": True or False, # Whether the link is required for this permission. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 201 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 202 | "name": "A String", # The name for this permission. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 203 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 204 | { |
| 205 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 206 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 207 | # - organizer |
| 208 | # - reader |
| 209 | # - writer |
| 210 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future. |
| 211 | "A String", |
| 212 | ], |
| 213 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 214 | # - file |
| 215 | # - member |
| 216 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 217 | }, |
| 218 | ], |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 219 | "kind": "drive#permission", # This is always drive#permission. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 220 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
| 221 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 222 | "authKey": "A String", # The authkey parameter required for this permission. |
| 223 | "etag": "A String", # The ETag of the permission. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 224 | "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 225 | "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions: |
| 226 | # - They can only be set on user and group permissions |
| 227 | # - The date must be in the future |
| 228 | # - The date cannot be more than a year in the future |
| 229 | # - The date can only be set on drive.permissions.update requests |
| 230 | "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed: |
| 231 | # - organizer |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 232 | # - owner |
| 233 | # - reader |
| 234 | # - writer |
| 235 | "type": "A String", # The account type. Allowed values are: |
| 236 | # - user |
| 237 | # - group |
| 238 | # - domain |
| 239 | # - anyone |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 240 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 241 | "A String", |
| 242 | ], |
| 243 | "selfLink": "A String", # A link back to this permission. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 244 | "photoLink": "A String", # A link to the profile photo, if available. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 245 | } |
| 246 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 247 | supportsTeamDrives: boolean, Whether the requesting application supports Team Drives. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 248 | sendNotificationEmails: boolean, Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the role is owner. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 249 | emailMessage: string, A custom message to include in notification emails. |
| 250 | |
| 251 | Returns: |
| 252 | An object of the form: |
| 253 | |
| 254 | { # A permission for a file. |
| 255 | "withLink": True or False, # Whether the link is required for this permission. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 256 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 257 | "name": "A String", # The name for this permission. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 258 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 259 | { |
| 260 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 261 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 262 | # - organizer |
| 263 | # - reader |
| 264 | # - writer |
| 265 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future. |
| 266 | "A String", |
| 267 | ], |
| 268 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 269 | # - file |
| 270 | # - member |
| 271 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 272 | }, |
| 273 | ], |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 274 | "kind": "drive#permission", # This is always drive#permission. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 275 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
| 276 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 277 | "authKey": "A String", # The authkey parameter required for this permission. |
| 278 | "etag": "A String", # The ETag of the permission. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 279 | "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 280 | "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions: |
| 281 | # - They can only be set on user and group permissions |
| 282 | # - The date must be in the future |
| 283 | # - The date cannot be more than a year in the future |
| 284 | # - The date can only be set on drive.permissions.update requests |
| 285 | "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed: |
| 286 | # - organizer |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 287 | # - owner |
| 288 | # - reader |
| 289 | # - writer |
| 290 | "type": "A String", # The account type. Allowed values are: |
| 291 | # - user |
| 292 | # - group |
| 293 | # - domain |
| 294 | # - anyone |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 295 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 296 | "A String", |
| 297 | ], |
| 298 | "selfLink": "A String", # A link back to this permission. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 299 | "photoLink": "A String", # A link to the profile photo, if available. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 300 | }</pre> |
| 301 | </div> |
| 302 | |
| 303 | <div class="method"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 304 | <code class="details" id="list">list(fileId, pageToken=None, supportsTeamDrives=None, maxResults=None)</code> |
| 305 | <pre>Lists a file's or Team Drive's permissions. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 306 | |
| 307 | Args: |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 308 | fileId: string, The ID for the file or Team Drive. (required) |
| 309 | 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. |
| 310 | supportsTeamDrives: boolean, Whether the requesting application supports Team Drives. |
| 311 | maxResults: integer, The maximum number of permissions to return per page. When not set for files in a Team Drive, at most 100 results will be returned. When not set for files that are not in a Team Drive, the entire list will be returned. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 312 | |
| 313 | Returns: |
| 314 | An object of the form: |
| 315 | |
| 316 | { # A list of permissions associated with a file. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 317 | "nextPageToken": "A String", # The page token for the next page of permissions. This field will be absent if the end of the permissions 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. |
| 318 | "items": [ # The list of permissions. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 319 | { # A permission for a file. |
| 320 | "withLink": True or False, # Whether the link is required for this permission. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 321 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 322 | "name": "A String", # The name for this permission. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 323 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 324 | { |
| 325 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 326 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 327 | # - organizer |
| 328 | # - reader |
| 329 | # - writer |
| 330 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future. |
| 331 | "A String", |
| 332 | ], |
| 333 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 334 | # - file |
| 335 | # - member |
| 336 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 337 | }, |
| 338 | ], |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 339 | "kind": "drive#permission", # This is always drive#permission. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 340 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
| 341 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 342 | "authKey": "A String", # The authkey parameter required for this permission. |
| 343 | "etag": "A String", # The ETag of the permission. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 344 | "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 345 | "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions: |
| 346 | # - They can only be set on user and group permissions |
| 347 | # - The date must be in the future |
| 348 | # - The date cannot be more than a year in the future |
| 349 | # - The date can only be set on drive.permissions.update requests |
| 350 | "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed: |
| 351 | # - organizer |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 352 | # - owner |
| 353 | # - reader |
| 354 | # - writer |
| 355 | "type": "A String", # The account type. Allowed values are: |
| 356 | # - user |
| 357 | # - group |
| 358 | # - domain |
| 359 | # - anyone |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 360 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 361 | "A String", |
| 362 | ], |
| 363 | "selfLink": "A String", # A link back to this permission. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 364 | "photoLink": "A String", # A link to the profile photo, if available. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 365 | }, |
| 366 | ], |
| 367 | "kind": "drive#permissionList", # This is always drive#permissionList. |
| 368 | "etag": "A String", # The ETag of the list. |
| 369 | "selfLink": "A String", # A link back to this list. |
| 370 | }</pre> |
| 371 | </div> |
| 372 | |
| 373 | <div class="method"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 374 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 375 | <pre>Retrieves the next page of results. |
| 376 | |
| 377 | Args: |
| 378 | previous_request: The request for the previous page. (required) |
| 379 | previous_response: The response from the request for the previous page. (required) |
| 380 | |
| 381 | Returns: |
| 382 | A request object that you can call 'execute()' on to request the next |
| 383 | page. Returns None if there are no more items in the collection. |
| 384 | </pre> |
| 385 | </div> |
| 386 | |
| 387 | <div class="method"> |
| 388 | <code class="details" id="patch">patch(fileId, permissionId, body, removeExpiration=None, supportsTeamDrives=None, transferOwnership=None)</code> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 389 | <pre>Updates a permission using patch semantics. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 390 | |
| 391 | Args: |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 392 | fileId: string, The ID for the file or Team Drive. (required) |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 393 | permissionId: string, The ID for the permission. (required) |
| 394 | body: object, The request body. (required) |
| 395 | The object takes the form of: |
| 396 | |
| 397 | { # A permission for a file. |
| 398 | "withLink": True or False, # Whether the link is required for this permission. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 399 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 400 | "name": "A String", # The name for this permission. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 401 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 402 | { |
| 403 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 404 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 405 | # - organizer |
| 406 | # - reader |
| 407 | # - writer |
| 408 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future. |
| 409 | "A String", |
| 410 | ], |
| 411 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 412 | # - file |
| 413 | # - member |
| 414 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 415 | }, |
| 416 | ], |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 417 | "kind": "drive#permission", # This is always drive#permission. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 418 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
| 419 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 420 | "authKey": "A String", # The authkey parameter required for this permission. |
| 421 | "etag": "A String", # The ETag of the permission. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 422 | "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 423 | "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions: |
| 424 | # - They can only be set on user and group permissions |
| 425 | # - The date must be in the future |
| 426 | # - The date cannot be more than a year in the future |
| 427 | # - The date can only be set on drive.permissions.update requests |
| 428 | "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed: |
| 429 | # - organizer |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 430 | # - owner |
| 431 | # - reader |
| 432 | # - writer |
| 433 | "type": "A String", # The account type. Allowed values are: |
| 434 | # - user |
| 435 | # - group |
| 436 | # - domain |
| 437 | # - anyone |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 438 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 439 | "A String", |
| 440 | ], |
| 441 | "selfLink": "A String", # A link back to this permission. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 442 | "photoLink": "A String", # A link to the profile photo, if available. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 443 | } |
| 444 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 445 | removeExpiration: boolean, Whether to remove the expiration date. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 446 | supportsTeamDrives: boolean, Whether the requesting application supports Team Drives. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 447 | transferOwnership: boolean, Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 448 | |
| 449 | Returns: |
| 450 | An object of the form: |
| 451 | |
| 452 | { # A permission for a file. |
| 453 | "withLink": True or False, # Whether the link is required for this permission. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 454 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 455 | "name": "A String", # The name for this permission. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 456 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 457 | { |
| 458 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 459 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 460 | # - organizer |
| 461 | # - reader |
| 462 | # - writer |
| 463 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future. |
| 464 | "A String", |
| 465 | ], |
| 466 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 467 | # - file |
| 468 | # - member |
| 469 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 470 | }, |
| 471 | ], |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 472 | "kind": "drive#permission", # This is always drive#permission. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 473 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
| 474 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 475 | "authKey": "A String", # The authkey parameter required for this permission. |
| 476 | "etag": "A String", # The ETag of the permission. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 477 | "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 478 | "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions: |
| 479 | # - They can only be set on user and group permissions |
| 480 | # - The date must be in the future |
| 481 | # - The date cannot be more than a year in the future |
| 482 | # - The date can only be set on drive.permissions.update requests |
| 483 | "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed: |
| 484 | # - organizer |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 485 | # - owner |
| 486 | # - reader |
| 487 | # - writer |
| 488 | "type": "A String", # The account type. Allowed values are: |
| 489 | # - user |
| 490 | # - group |
| 491 | # - domain |
| 492 | # - anyone |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 493 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 494 | "A String", |
| 495 | ], |
| 496 | "selfLink": "A String", # A link back to this permission. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 497 | "photoLink": "A String", # A link to the profile photo, if available. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 498 | }</pre> |
| 499 | </div> |
| 500 | |
| 501 | <div class="method"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 502 | <code class="details" id="update">update(fileId, permissionId, body, removeExpiration=None, supportsTeamDrives=None, transferOwnership=None)</code> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 503 | <pre>Updates a permission. |
| 504 | |
| 505 | Args: |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 506 | fileId: string, The ID for the file or Team Drive. (required) |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 507 | permissionId: string, The ID for the permission. (required) |
| 508 | body: object, The request body. (required) |
| 509 | The object takes the form of: |
| 510 | |
| 511 | { # A permission for a file. |
| 512 | "withLink": True or False, # Whether the link is required for this permission. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 513 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 514 | "name": "A String", # The name for this permission. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 515 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 516 | { |
| 517 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 518 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 519 | # - organizer |
| 520 | # - reader |
| 521 | # - writer |
| 522 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future. |
| 523 | "A String", |
| 524 | ], |
| 525 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 526 | # - file |
| 527 | # - member |
| 528 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 529 | }, |
| 530 | ], |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 531 | "kind": "drive#permission", # This is always drive#permission. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 532 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
| 533 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 534 | "authKey": "A String", # The authkey parameter required for this permission. |
| 535 | "etag": "A String", # The ETag of the permission. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 536 | "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 537 | "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions: |
| 538 | # - They can only be set on user and group permissions |
| 539 | # - The date must be in the future |
| 540 | # - The date cannot be more than a year in the future |
| 541 | # - The date can only be set on drive.permissions.update requests |
| 542 | "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed: |
| 543 | # - organizer |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 544 | # - owner |
| 545 | # - reader |
| 546 | # - writer |
| 547 | "type": "A String", # The account type. Allowed values are: |
| 548 | # - user |
| 549 | # - group |
| 550 | # - domain |
| 551 | # - anyone |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 552 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 553 | "A String", |
| 554 | ], |
| 555 | "selfLink": "A String", # A link back to this permission. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 556 | "photoLink": "A String", # A link to the profile photo, if available. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 557 | } |
| 558 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 559 | removeExpiration: boolean, Whether to remove the expiration date. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 560 | supportsTeamDrives: boolean, Whether the requesting application supports Team Drives. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 561 | transferOwnership: boolean, Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 562 | |
| 563 | Returns: |
| 564 | An object of the form: |
| 565 | |
| 566 | { # A permission for a file. |
| 567 | "withLink": True or False, # Whether the link is required for this permission. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 568 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 569 | "name": "A String", # The name for this permission. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 570 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 571 | { |
| 572 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 573 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 574 | # - organizer |
| 575 | # - reader |
| 576 | # - writer |
| 577 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future. |
| 578 | "A String", |
| 579 | ], |
| 580 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 581 | # - file |
| 582 | # - member |
| 583 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 584 | }, |
| 585 | ], |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 586 | "kind": "drive#permission", # This is always drive#permission. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 587 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
| 588 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 589 | "authKey": "A String", # The authkey parameter required for this permission. |
| 590 | "etag": "A String", # The ETag of the permission. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 591 | "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 592 | "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions: |
| 593 | # - They can only be set on user and group permissions |
| 594 | # - The date must be in the future |
| 595 | # - The date cannot be more than a year in the future |
| 596 | # - The date can only be set on drive.permissions.update requests |
| 597 | "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed: |
| 598 | # - organizer |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 599 | # - owner |
| 600 | # - reader |
| 601 | # - writer |
| 602 | "type": "A String", # The account type. Allowed values are: |
| 603 | # - user |
| 604 | # - group |
| 605 | # - domain |
| 606 | # - anyone |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 607 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 608 | "A String", |
| 609 | ], |
| 610 | "selfLink": "A String", # A link back to this permission. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 611 | "photoLink": "A String", # A link to the profile photo, if available. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 612 | }</pre> |
| 613 | </div> |
| 614 | |
| 615 | </body></html> |