blob: c581de0641390100dc7dd1f20a2985b507b2e9a8 [file] [log] [blame]
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="drive_v3.html">Drive API</a> . <a href="drive_v3.permissions.html">permissions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#create">create(fileId, body=None, emailMessage=None, enforceSingleParent=None, moveToNewOwnersRoot=None, sendNotificationEmail=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates a permission for a file or shared drive.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080080<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#delete">delete(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Deletes a permission.</p>
83<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070084 <code><a href="#get">get(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080085<p class="firstline">Gets a permission by ID.</p>
86<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070087 <code><a href="#list">list(fileId, pageSize=None, pageToken=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Lists a file's or shared drive's permissions.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080089<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#update">update(fileId, permissionId, body=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080094<p class="firstline">Updates a permission with patch semantics.</p>
95<h3>Method Details</h3>
96<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -070097 <code class="details" id="create">create(fileId, body=None, emailMessage=None, enforceSingleParent=None, moveToNewOwnersRoot=None, sendNotificationEmail=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098 <pre>Creates a permission for a file or shared drive.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080099
100Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101 fileId: string, The ID of the file or shared drive. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103 The object takes the form of:
104
105{ # 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 Kim65020912020-05-20 12:08:20 -0700106 &quot;allowFileDiscovery&quot;: 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.
107 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
108 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
109 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
110 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
111 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700112 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700113 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
114 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
115 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
116 # - They can only be set on user and group permissions
117 # - The time must be in the future
118 # - The time cannot be more than a year in the future
119 &quot;id&quot;: &quot;A String&quot;, # 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.
120 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
121 &quot;permissionDetails&quot;: [ # 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 Kim715bd7f2019-06-14 16:50:42 -0700122 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700123 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
124 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
125 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
126 # - file
127 # - member
128 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 # - organizer
130 # - fileOrganizer
131 # - writer
132 # - commenter
133 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134 },
135 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
137 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800138 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139 # - organizer
140 # - fileOrganizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800141 # - writer
142 # - commenter
143 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
145 {
146 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
147 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
148 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
149 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
150 },
151 ],
152 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800153 # - user
154 # - group
155 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700156 # - 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&#x27;t extra information required for a anyone type.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800157}
158
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700159 emailMessage: string, A plain text custom message to include in the notification email.
Bu Sun Kim65020912020-05-20 12:08:20 -0700160 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. See moveToNewOwnersRoot for details.
161 moveToNewOwnersRoot: boolean, This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item is moved to the new owner&#x27;s My Drive root folder and all prior parents removed. If set to false, when enforceSingleParent=true, parents are not changed. If set to false, when enforceSingleParent=false, existing parents are not changed; however, the file will be added to the new owner&#x27;s My Drive root folder, unless it is already in the new owner&#x27;s My Drive.
162 sendNotificationEmail: boolean, Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers.
163 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
164 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
165 transferOwnership: boolean, Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700166 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800167
168Returns:
169 An object of the form:
170
171 { # 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 Kim65020912020-05-20 12:08:20 -0700172 &quot;allowFileDiscovery&quot;: 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.
173 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
174 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
175 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
176 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
177 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700178 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700179 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
180 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
181 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
182 # - They can only be set on user and group permissions
183 # - The time must be in the future
184 # - The time cannot be more than a year in the future
185 &quot;id&quot;: &quot;A String&quot;, # 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.
186 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
187 &quot;permissionDetails&quot;: [ # 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 Kim715bd7f2019-06-14 16:50:42 -0700188 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700189 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
190 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
191 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
192 # - file
193 # - member
194 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700195 # - organizer
196 # - fileOrganizer
197 # - writer
198 # - commenter
199 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 },
201 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700202 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
203 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800204 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700205 # - organizer
206 # - fileOrganizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800207 # - writer
208 # - commenter
209 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
211 {
212 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
213 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
214 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
215 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
216 },
217 ],
218 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800219 # - user
220 # - group
221 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700222 # - 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&#x27;t extra information required for a anyone type.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800223 }</pre>
224</div>
225
226<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700227 <code class="details" id="delete">delete(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800228 <pre>Deletes a permission.
229
230Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231 fileId: string, The ID of the file or shared drive. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800232 permissionId: string, The ID of the permission. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700233 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700235 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800236</pre>
237</div>
238
239<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700240 <code class="details" id="get">get(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800241 <pre>Gets a permission by ID.
242
243Args:
244 fileId: string, The ID of the file. (required)
245 permissionId: string, The ID of the permission. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700246 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700247 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800249
250Returns:
251 An object of the form:
252
253 { # 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 Kim65020912020-05-20 12:08:20 -0700254 &quot;allowFileDiscovery&quot;: 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.
255 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
256 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
257 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
258 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
259 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700260 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700261 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
262 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
263 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
264 # - They can only be set on user and group permissions
265 # - The time must be in the future
266 # - The time cannot be more than a year in the future
267 &quot;id&quot;: &quot;A String&quot;, # 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.
268 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
269 &quot;permissionDetails&quot;: [ # 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 Kim715bd7f2019-06-14 16:50:42 -0700270 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700271 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
272 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
273 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
274 # - file
275 # - member
276 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700277 # - organizer
278 # - fileOrganizer
279 # - writer
280 # - commenter
281 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700282 },
283 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700284 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
285 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800286 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700287 # - organizer
288 # - fileOrganizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800289 # - writer
290 # - commenter
291 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700292 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
293 {
294 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
295 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
296 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
297 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
298 },
299 ],
300 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800301 # - user
302 # - group
303 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700304 # - 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&#x27;t extra information required for a anyone type.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800305 }</pre>
306</div>
307
308<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 <code class="details" id="list">list(fileId, pageSize=None, pageToken=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code>
310 <pre>Lists a file&#x27;s or shared drive&#x27;s permissions.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800311
312Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 fileId: string, The ID of the file or shared drive. (required)
314 pageSize: integer, The maximum number of permissions to return per page. When not set for files in a shared drive, at most 100 results will be returned. When not set for files that are not in a shared drive, the entire list will be returned.
Bu Sun Kim65020912020-05-20 12:08:20 -0700315 pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of &#x27;nextPageToken&#x27; from the previous response.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700317 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800319
320Returns:
321 An object of the form:
322
323 { # A list of permissions for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 &quot;kind&quot;: &quot;drive#permissionList&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permissionList&quot;.
325 &quot;nextPageToken&quot;: &quot;A String&quot;, # 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.
326 &quot;permissions&quot;: [ # The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800327 { # 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 Kim65020912020-05-20 12:08:20 -0700328 &quot;allowFileDiscovery&quot;: 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.
329 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
330 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
331 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
332 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
333 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700334 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700335 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
336 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
337 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
338 # - They can only be set on user and group permissions
339 # - The time must be in the future
340 # - The time cannot be more than a year in the future
341 &quot;id&quot;: &quot;A String&quot;, # 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.
342 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
343 &quot;permissionDetails&quot;: [ # 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 Kim715bd7f2019-06-14 16:50:42 -0700344 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700345 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
346 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
347 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
348 # - file
349 # - member
350 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700351 # - organizer
352 # - fileOrganizer
353 # - writer
354 # - commenter
355 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700356 },
357 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
359 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800360 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700361 # - organizer
362 # - fileOrganizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800363 # - writer
364 # - commenter
365 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700366 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
367 {
368 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
369 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
370 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
371 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
372 },
373 ],
374 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800375 # - user
376 # - group
377 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700378 # - 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&#x27;t extra information required for a anyone type.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800379 },
380 ],
381 }</pre>
382</div>
383
384<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
386 <pre>Retrieves the next page of results.
387
388Args:
389 previous_request: The request for the previous page. (required)
390 previous_response: The response from the request for the previous page. (required)
391
392Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700393 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 page. Returns None if there are no more items in the collection.
395 </pre>
396</div>
397
398<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700399 <code class="details" id="update">update(fileId, permissionId, body=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800400 <pre>Updates a permission with patch semantics.
401
402Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700403 fileId: string, The ID of the file or shared drive. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800404 permissionId: string, The ID of the permission. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700405 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800406 The object takes the form of:
407
408{ # 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 Kim65020912020-05-20 12:08:20 -0700409 &quot;allowFileDiscovery&quot;: 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.
410 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
411 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
412 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
413 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
414 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700415 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700416 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
417 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
418 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
419 # - They can only be set on user and group permissions
420 # - The time must be in the future
421 # - The time cannot be more than a year in the future
422 &quot;id&quot;: &quot;A String&quot;, # 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.
423 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
424 &quot;permissionDetails&quot;: [ # 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 Kim715bd7f2019-06-14 16:50:42 -0700425 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700426 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
427 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
428 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
429 # - file
430 # - member
431 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700432 # - organizer
433 # - fileOrganizer
434 # - writer
435 # - commenter
436 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700437 },
438 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700439 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
440 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800441 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700442 # - organizer
443 # - fileOrganizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800444 # - writer
445 # - commenter
446 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700447 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
448 {
449 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
450 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
451 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
452 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
453 },
454 ],
455 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800456 # - user
457 # - group
458 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700459 # - 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&#x27;t extra information required for a anyone type.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800460}
461
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700462 removeExpiration: boolean, Whether to remove the expiration date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700463 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700464 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800465 transferOwnership: boolean, Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700466 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800467
468Returns:
469 An object of the form:
470
471 { # 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 Kim65020912020-05-20 12:08:20 -0700472 &quot;allowFileDiscovery&quot;: 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.
473 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
474 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
475 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
476 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
477 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700478 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700479 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
480 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
481 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
482 # - They can only be set on user and group permissions
483 # - The time must be in the future
484 # - The time cannot be more than a year in the future
485 &quot;id&quot;: &quot;A String&quot;, # 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.
486 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
487 &quot;permissionDetails&quot;: [ # 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 Kim715bd7f2019-06-14 16:50:42 -0700488 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
490 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
491 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
492 # - file
493 # - member
494 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700495 # - organizer
496 # - fileOrganizer
497 # - writer
498 # - commenter
499 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700500 },
501 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700502 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
503 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800504 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700505 # - organizer
506 # - fileOrganizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800507 # - writer
508 # - commenter
509 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700510 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
511 {
512 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
513 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
514 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
515 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
516 },
517 ],
518 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800519 # - user
520 # - group
521 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700522 # - 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&#x27;t extra information required for a anyone type.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800523 }</pre>
524</div>
525
526</body></html>