1<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">
78  <code><a href="#create">create(fileId, body, sendNotificationEmail=None, transferOwnership=None, emailMessage=None)</a></code></p>
79<p class="firstline">Creates a permission for a file.</p>
80<p class="toc_element">
81  <code><a href="#delete">delete(fileId, permissionId)</a></code></p>
82<p class="firstline">Deletes a permission.</p>
83<p class="toc_element">
84  <code><a href="#get">get(fileId, permissionId)</a></code></p>
85<p class="firstline">Gets a permission by ID.</p>
86<p class="toc_element">
87  <code><a href="#list">list(fileId)</a></code></p>
88<p class="firstline">Lists a file's permissions.</p>
89<p class="toc_element">
90  <code><a href="#update">update(fileId, permissionId, body, removeExpiration=None, transferOwnership=None)</a></code></p>
91<p class="firstline">Updates a permission with patch semantics.</p>
92<h3>Method Details</h3>
93<div class="method">
94    <code class="details" id="create">create(fileId, body, sendNotificationEmail=None, transferOwnership=None, emailMessage=None)</code>
95  <pre>Creates a permission for a file.
96
97Args:
98  fileId: string, The ID of the file. (required)
99  body: object, The request body. (required)
100    The object takes the form of:
101
102{ # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
103  "domain": "A String", # The domain to which this permission refers.
104  "displayName": "A String", # A displayable name for users, groups or domains.
105  "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
106  "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
107  "emailAddress": "A String", # The email address of the user or group to which this permission refers.
108  "photoLink": "A String", # A link to the user's profile photo, if available.
109  "role": "A String", # The role granted by this permission. Valid values are:
110      # - owner
111      # - writer
112      # - commenter
113      # - reader
114  "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time).
115  "type": "A String", # The type of the grantee. Valid values are:
116      # - user
117      # - group
118      # - domain
119      # - anyone
120  "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId.
121}
122
123  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.
124  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.
125  emailMessage: string, A custom message to include in the notification email.
126
127Returns:
128  An object of the form:
129
130    { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
131    "domain": "A String", # The domain to which this permission refers.
132    "displayName": "A String", # A displayable name for users, groups or domains.
133    "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
134    "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
135    "emailAddress": "A String", # The email address of the user or group to which this permission refers.
136    "photoLink": "A String", # A link to the user's profile photo, if available.
137    "role": "A String", # The role granted by this permission. Valid values are:
138        # - owner
139        # - writer
140        # - commenter
141        # - reader
142    "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time).
143    "type": "A String", # The type of the grantee. Valid values are:
144        # - user
145        # - group
146        # - domain
147        # - anyone
148    "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId.
149  }</pre>
150</div>
151
152<div class="method">
153    <code class="details" id="delete">delete(fileId, permissionId)</code>
154  <pre>Deletes a permission.
155
156Args:
157  fileId: string, The ID of the file. (required)
158  permissionId: string, The ID of the permission. (required)
159</pre>
160</div>
161
162<div class="method">
163    <code class="details" id="get">get(fileId, permissionId)</code>
164  <pre>Gets a permission by ID.
165
166Args:
167  fileId: string, The ID of the file. (required)
168  permissionId: string, The ID of the permission. (required)
169
170Returns:
171  An object of the form:
172
173    { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
174    "domain": "A String", # The domain to which this permission refers.
175    "displayName": "A String", # A displayable name for users, groups or domains.
176    "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
177    "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
178    "emailAddress": "A String", # The email address of the user or group to which this permission refers.
179    "photoLink": "A String", # A link to the user's profile photo, if available.
180    "role": "A String", # The role granted by this permission. Valid values are:
181        # - owner
182        # - writer
183        # - commenter
184        # - reader
185    "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time).
186    "type": "A String", # The type of the grantee. Valid values are:
187        # - user
188        # - group
189        # - domain
190        # - anyone
191    "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId.
192  }</pre>
193</div>
194
195<div class="method">
196    <code class="details" id="list">list(fileId)</code>
197  <pre>Lists a file's permissions.
198
199Args:
200  fileId: string, The ID of the file. (required)
201
202Returns:
203  An object of the form:
204
205    { # A list of permissions for a file.
206    "kind": "drive#permissionList", # Identifies what kind of resource this is. Value: the fixed string "drive#permissionList".
207    "permissions": [ # The full list of permissions.
208      { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
209        "domain": "A String", # The domain to which this permission refers.
210        "displayName": "A String", # A displayable name for users, groups or domains.
211        "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
212        "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
213        "emailAddress": "A String", # The email address of the user or group to which this permission refers.
214        "photoLink": "A String", # A link to the user's profile photo, if available.
215        "role": "A String", # The role granted by this permission. Valid values are:
216            # - owner
217            # - writer
218            # - commenter
219            # - reader
220        "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time).
221        "type": "A String", # The type of the grantee. Valid values are:
222            # - user
223            # - group
224            # - domain
225            # - anyone
226        "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId.
227      },
228    ],
229  }</pre>
230</div>
231
232<div class="method">
233    <code class="details" id="update">update(fileId, permissionId, body, removeExpiration=None, transferOwnership=None)</code>
234  <pre>Updates a permission with patch semantics.
235
236Args:
237  fileId: string, The ID of the file. (required)
238  permissionId: string, The ID of the permission. (required)
239  body: object, The request body. (required)
240    The object takes the form of:
241
242{ # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
243  "domain": "A String", # The domain to which this permission refers.
244  "displayName": "A String", # A displayable name for users, groups or domains.
245  "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
246  "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
247  "emailAddress": "A String", # The email address of the user or group to which this permission refers.
248  "photoLink": "A String", # A link to the user's profile photo, if available.
249  "role": "A String", # The role granted by this permission. Valid values are:
250      # - owner
251      # - writer
252      # - commenter
253      # - reader
254  "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time).
255  "type": "A String", # The type of the grantee. Valid values are:
256      # - user
257      # - group
258      # - domain
259      # - anyone
260  "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId.
261}
262
263  removeExpiration: boolean, Whether to remove the expiration date.
264  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.
265
266Returns:
267  An object of the form:
268
269    { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
270    "domain": "A String", # The domain to which this permission refers.
271    "displayName": "A String", # A displayable name for users, groups or domains.
272    "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
273    "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
274    "emailAddress": "A String", # The email address of the user or group to which this permission refers.
275    "photoLink": "A String", # A link to the user's profile photo, if available.
276    "role": "A String", # The role granted by this permission. Valid values are:
277        # - owner
278        # - writer
279        # - commenter
280        # - reader
281    "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time).
282    "type": "A String", # The type of the grantee. Valid values are:
283        # - user
284        # - group
285        # - domain
286        # - anyone
287    "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId.
288  }</pre>
289</div>
290
291</body></html>