• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_v2.html">Drive API</a> . <a href="drive_v2.teamdrives.html">teamdrives</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#delete">delete(teamDriveId)</a></code></p>
79<p class="firstline">Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items.</p>
80<p class="toc_element">
81  <code><a href="#get">get(teamDriveId)</a></code></p>
82<p class="firstline">Gets a Team Drive's metadata by ID.</p>
83<p class="toc_element">
84  <code><a href="#insert">insert(requestId, body)</a></code></p>
85<p class="firstline">Creates a new Team Drive.</p>
86<p class="toc_element">
87  <code><a href="#list">list(pageToken=None, maxResults=None)</a></code></p>
88<p class="firstline">Lists the user's Team Drives.</p>
89<p class="toc_element">
90  <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">
93  <code><a href="#update">update(teamDriveId, body)</a></code></p>
94<p class="firstline">Updates a Team Drive's metadata</p>
95<h3>Method Details</h3>
96<div class="method">
97    <code class="details" id="delete">delete(teamDriveId)</code>
98  <pre>Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items.
99
100Args:
101  teamDriveId: string, The ID of the Team Drive (required)
102</pre>
103</div>
104
105<div class="method">
106    <code class="details" id="get">get(teamDriveId)</code>
107  <pre>Gets a Team Drive's metadata by ID.
108
109Args:
110  teamDriveId: string, The ID of the Team Drive (required)
111
112Returns:
113  An object of the form:
114
115    { # Representation of a Team Drive.
116    "kind": "drive#teamDrive", # This is always drive#teamDrive
117    "backgroundImageLink": "A String", # A short-lived link to this Team Drive's background image.
118    "name": "A String", # The name of this Team Drive.
119    "themeId": "A String", # The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.insert request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.
120    "colorRgb": "A String", # The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId.
121    "capabilities": { # Capabilities the current user has on this Team Drive.
122      "canReadRevisions": True or False, # Whether the current user can read the revisions resource of files in this Team Drive.
123      "canCopy": True or False, # Whether the current user can copy files in this Team Drive.
124      "canRename": True or False, # Whether the current user can rename files or folders in this Team Drive.
125      "canListChildren": True or False, # Whether the current user can list the children of folders in this Team Drive.
126      "canShare": True or False, # Whether the current user can share files or folders in this Team Drive.
127      "canManageMembers": True or False, # Whether the current user can add members to this Team Drive or remove them or change their role.
128      "canDownload": True or False, # Whether the current user can download files in this Team Drive.
129      "canComment": True or False, # Whether the current user can comment on files in this Team Drive.
130      "canChangeTeamDriveBackground": True or False, # Whether the current user can change the background of this Team Drive.
131      "canDeleteTeamDrive": True or False, # Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive.
132      "canRenameTeamDrive": True or False, # Whether the current user can rename this Team Drive.
133      "canRemoveChildren": True or False, # Whether the current user can remove children from folders in this Team Drive.
134      "canAddChildren": True or False, # Whether the current user can add children to folders in this Team Drive.
135      "canEdit": True or False, # Whether the current user can edit files in this Team Drive
136    },
137    "backgroundImageFile": { # An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.
138      "width": 3.14, # The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.
139      "yCoordinate": 3.14, # The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.
140      "id": "A String", # The ID of an image file in Drive to use for the background image.
141      "xCoordinate": 3.14, # The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.
142    },
143    "id": "A String", # The ID of this Team Drive which is also the ID of the top level folder for this Team Drive.
144  }</pre>
145</div>
146
147<div class="method">
148    <code class="details" id="insert">insert(requestId, body)</code>
149  <pre>Creates a new Team Drive.
150
151Args:
152  requestId: string, An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned. (required)
153  body: object, The request body. (required)
154    The object takes the form of:
155
156{ # Representation of a Team Drive.
157  "kind": "drive#teamDrive", # This is always drive#teamDrive
158  "backgroundImageLink": "A String", # A short-lived link to this Team Drive's background image.
159  "name": "A String", # The name of this Team Drive.
160  "themeId": "A String", # The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.insert request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.
161  "colorRgb": "A String", # The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId.
162  "capabilities": { # Capabilities the current user has on this Team Drive.
163    "canReadRevisions": True or False, # Whether the current user can read the revisions resource of files in this Team Drive.
164    "canCopy": True or False, # Whether the current user can copy files in this Team Drive.
165    "canRename": True or False, # Whether the current user can rename files or folders in this Team Drive.
166    "canListChildren": True or False, # Whether the current user can list the children of folders in this Team Drive.
167    "canShare": True or False, # Whether the current user can share files or folders in this Team Drive.
168    "canManageMembers": True or False, # Whether the current user can add members to this Team Drive or remove them or change their role.
169    "canDownload": True or False, # Whether the current user can download files in this Team Drive.
170    "canComment": True or False, # Whether the current user can comment on files in this Team Drive.
171    "canChangeTeamDriveBackground": True or False, # Whether the current user can change the background of this Team Drive.
172    "canDeleteTeamDrive": True or False, # Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive.
173    "canRenameTeamDrive": True or False, # Whether the current user can rename this Team Drive.
174    "canRemoveChildren": True or False, # Whether the current user can remove children from folders in this Team Drive.
175    "canAddChildren": True or False, # Whether the current user can add children to folders in this Team Drive.
176    "canEdit": True or False, # Whether the current user can edit files in this Team Drive
177  },
178  "backgroundImageFile": { # An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.
179    "width": 3.14, # The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.
180    "yCoordinate": 3.14, # The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.
181    "id": "A String", # The ID of an image file in Drive to use for the background image.
182    "xCoordinate": 3.14, # The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.
183  },
184  "id": "A String", # The ID of this Team Drive which is also the ID of the top level folder for this Team Drive.
185}
186
187
188Returns:
189  An object of the form:
190
191    { # Representation of a Team Drive.
192    "kind": "drive#teamDrive", # This is always drive#teamDrive
193    "backgroundImageLink": "A String", # A short-lived link to this Team Drive's background image.
194    "name": "A String", # The name of this Team Drive.
195    "themeId": "A String", # The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.insert request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.
196    "colorRgb": "A String", # The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId.
197    "capabilities": { # Capabilities the current user has on this Team Drive.
198      "canReadRevisions": True or False, # Whether the current user can read the revisions resource of files in this Team Drive.
199      "canCopy": True or False, # Whether the current user can copy files in this Team Drive.
200      "canRename": True or False, # Whether the current user can rename files or folders in this Team Drive.
201      "canListChildren": True or False, # Whether the current user can list the children of folders in this Team Drive.
202      "canShare": True or False, # Whether the current user can share files or folders in this Team Drive.
203      "canManageMembers": True or False, # Whether the current user can add members to this Team Drive or remove them or change their role.
204      "canDownload": True or False, # Whether the current user can download files in this Team Drive.
205      "canComment": True or False, # Whether the current user can comment on files in this Team Drive.
206      "canChangeTeamDriveBackground": True or False, # Whether the current user can change the background of this Team Drive.
207      "canDeleteTeamDrive": True or False, # Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive.
208      "canRenameTeamDrive": True or False, # Whether the current user can rename this Team Drive.
209      "canRemoveChildren": True or False, # Whether the current user can remove children from folders in this Team Drive.
210      "canAddChildren": True or False, # Whether the current user can add children to folders in this Team Drive.
211      "canEdit": True or False, # Whether the current user can edit files in this Team Drive
212    },
213    "backgroundImageFile": { # An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.
214      "width": 3.14, # The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.
215      "yCoordinate": 3.14, # The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.
216      "id": "A String", # The ID of an image file in Drive to use for the background image.
217      "xCoordinate": 3.14, # The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.
218    },
219    "id": "A String", # The ID of this Team Drive which is also the ID of the top level folder for this Team Drive.
220  }</pre>
221</div>
222
223<div class="method">
224    <code class="details" id="list">list(pageToken=None, maxResults=None)</code>
225  <pre>Lists the user's Team Drives.
226
227Args:
228  pageToken: string, Page token for Team Drives.
229  maxResults: integer, Maximum number of Team Drives to return.
230
231Returns:
232  An object of the form:
233
234    { # A list of Team Drives.
235    "nextPageToken": "A String", # The page token for the next page of Team Drives.
236    "items": [ # The list of Team Drives.
237      { # Representation of a Team Drive.
238        "kind": "drive#teamDrive", # This is always drive#teamDrive
239        "backgroundImageLink": "A String", # A short-lived link to this Team Drive's background image.
240        "name": "A String", # The name of this Team Drive.
241        "themeId": "A String", # The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.insert request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.
242        "colorRgb": "A String", # The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId.
243        "capabilities": { # Capabilities the current user has on this Team Drive.
244          "canReadRevisions": True or False, # Whether the current user can read the revisions resource of files in this Team Drive.
245          "canCopy": True or False, # Whether the current user can copy files in this Team Drive.
246          "canRename": True or False, # Whether the current user can rename files or folders in this Team Drive.
247          "canListChildren": True or False, # Whether the current user can list the children of folders in this Team Drive.
248          "canShare": True or False, # Whether the current user can share files or folders in this Team Drive.
249          "canManageMembers": True or False, # Whether the current user can add members to this Team Drive or remove them or change their role.
250          "canDownload": True or False, # Whether the current user can download files in this Team Drive.
251          "canComment": True or False, # Whether the current user can comment on files in this Team Drive.
252          "canChangeTeamDriveBackground": True or False, # Whether the current user can change the background of this Team Drive.
253          "canDeleteTeamDrive": True or False, # Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive.
254          "canRenameTeamDrive": True or False, # Whether the current user can rename this Team Drive.
255          "canRemoveChildren": True or False, # Whether the current user can remove children from folders in this Team Drive.
256          "canAddChildren": True or False, # Whether the current user can add children to folders in this Team Drive.
257          "canEdit": True or False, # Whether the current user can edit files in this Team Drive
258        },
259        "backgroundImageFile": { # An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.
260          "width": 3.14, # The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.
261          "yCoordinate": 3.14, # The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.
262          "id": "A String", # The ID of an image file in Drive to use for the background image.
263          "xCoordinate": 3.14, # The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.
264        },
265        "id": "A String", # The ID of this Team Drive which is also the ID of the top level folder for this Team Drive.
266      },
267    ],
268    "kind": "drive#teamDriveList", # This is always drive#teamDriveList
269  }</pre>
270</div>
271
272<div class="method">
273    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
274  <pre>Retrieves the next page of results.
275
276Args:
277  previous_request: The request for the previous page. (required)
278  previous_response: The response from the request for the previous page. (required)
279
280Returns:
281  A request object that you can call 'execute()' on to request the next
282  page. Returns None if there are no more items in the collection.
283    </pre>
284</div>
285
286<div class="method">
287    <code class="details" id="update">update(teamDriveId, body)</code>
288  <pre>Updates a Team Drive's metadata
289
290Args:
291  teamDriveId: string, The ID of the Team Drive (required)
292  body: object, The request body. (required)
293    The object takes the form of:
294
295{ # Representation of a Team Drive.
296  "kind": "drive#teamDrive", # This is always drive#teamDrive
297  "backgroundImageLink": "A String", # A short-lived link to this Team Drive's background image.
298  "name": "A String", # The name of this Team Drive.
299  "themeId": "A String", # The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.insert request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.
300  "colorRgb": "A String", # The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId.
301  "capabilities": { # Capabilities the current user has on this Team Drive.
302    "canReadRevisions": True or False, # Whether the current user can read the revisions resource of files in this Team Drive.
303    "canCopy": True or False, # Whether the current user can copy files in this Team Drive.
304    "canRename": True or False, # Whether the current user can rename files or folders in this Team Drive.
305    "canListChildren": True or False, # Whether the current user can list the children of folders in this Team Drive.
306    "canShare": True or False, # Whether the current user can share files or folders in this Team Drive.
307    "canManageMembers": True or False, # Whether the current user can add members to this Team Drive or remove them or change their role.
308    "canDownload": True or False, # Whether the current user can download files in this Team Drive.
309    "canComment": True or False, # Whether the current user can comment on files in this Team Drive.
310    "canChangeTeamDriveBackground": True or False, # Whether the current user can change the background of this Team Drive.
311    "canDeleteTeamDrive": True or False, # Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive.
312    "canRenameTeamDrive": True or False, # Whether the current user can rename this Team Drive.
313    "canRemoveChildren": True or False, # Whether the current user can remove children from folders in this Team Drive.
314    "canAddChildren": True or False, # Whether the current user can add children to folders in this Team Drive.
315    "canEdit": True or False, # Whether the current user can edit files in this Team Drive
316  },
317  "backgroundImageFile": { # An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.
318    "width": 3.14, # The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.
319    "yCoordinate": 3.14, # The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.
320    "id": "A String", # The ID of an image file in Drive to use for the background image.
321    "xCoordinate": 3.14, # The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.
322  },
323  "id": "A String", # The ID of this Team Drive which is also the ID of the top level folder for this Team Drive.
324}
325
326
327Returns:
328  An object of the form:
329
330    { # Representation of a Team Drive.
331    "kind": "drive#teamDrive", # This is always drive#teamDrive
332    "backgroundImageLink": "A String", # A short-lived link to this Team Drive's background image.
333    "name": "A String", # The name of this Team Drive.
334    "themeId": "A String", # The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.insert request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.
335    "colorRgb": "A String", # The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId.
336    "capabilities": { # Capabilities the current user has on this Team Drive.
337      "canReadRevisions": True or False, # Whether the current user can read the revisions resource of files in this Team Drive.
338      "canCopy": True or False, # Whether the current user can copy files in this Team Drive.
339      "canRename": True or False, # Whether the current user can rename files or folders in this Team Drive.
340      "canListChildren": True or False, # Whether the current user can list the children of folders in this Team Drive.
341      "canShare": True or False, # Whether the current user can share files or folders in this Team Drive.
342      "canManageMembers": True or False, # Whether the current user can add members to this Team Drive or remove them or change their role.
343      "canDownload": True or False, # Whether the current user can download files in this Team Drive.
344      "canComment": True or False, # Whether the current user can comment on files in this Team Drive.
345      "canChangeTeamDriveBackground": True or False, # Whether the current user can change the background of this Team Drive.
346      "canDeleteTeamDrive": True or False, # Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive.
347      "canRenameTeamDrive": True or False, # Whether the current user can rename this Team Drive.
348      "canRemoveChildren": True or False, # Whether the current user can remove children from folders in this Team Drive.
349      "canAddChildren": True or False, # Whether the current user can add children to folders in this Team Drive.
350      "canEdit": True or False, # Whether the current user can edit files in this Team Drive
351    },
352    "backgroundImageFile": { # An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.
353      "width": 3.14, # The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.
354      "yCoordinate": 3.14, # The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.
355      "id": "A String", # The ID of an image file in Drive to use for the background image.
356      "xCoordinate": 3.14, # The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.
357    },
358    "id": "A String", # The ID of this Team Drive which is also the ID of the top level folder for this Team Drive.
359  }</pre>
360</div>
361
362</body></html>