Skip to main content

teamdrives

Creates, updates, deletes, gets or lists a teamdrives resource.

Overview

Nameteamdrives
TypeResource
Idgoogleworkspace.drivev2.teamdrives

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of this Team Drive which is also the ID of the top level folder of this Team Drive.
namestringThe name of this Team Drive.
backgroundImageFileobjectAn 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.
backgroundImageLinkstringA short-lived link to this Team Drive's background image.
capabilitiesobjectCapabilities the current user has on this Team Drive.
colorRgbstringThe 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.
createdDatestring (date-time)The time at which the Team Drive was created (RFC 3339 date-time).
kindstringThis is always drive#teamDrive (default: drive#teamDrive)
orgUnitIdstringThe organizational unit of this shared drive. This field is only populated on drives.list responses when the useDomainAdminAccess parameter is set to true.
restrictionsobjectA set of restrictions that apply to this Team Drive or items inside this Team Drive.
themeIdstringThe 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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectteamDriveIduseDomainAdminAccessDeprecated: Use drives.get instead.
listselectmaxResults, pageToken, q, useDomainAdminAccessDeprecated: Use drives.list instead.
insertinsertrequestIdDeprecated: Use drives.insert instead.
updatereplaceteamDriveIduseDomainAdminAccessDeprecated: Use drives.update instead.
deletedeleteteamDriveIdDeprecated: Use drives.delete instead.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
requestIdstring
teamDriveIdstring
maxResultsinteger (int32)
pageTokenstring
qstring
useDomainAdminAccessboolean

SELECT examples

Deprecated: Use drives.get instead.

SELECT
id,
name,
backgroundImageFile,
backgroundImageLink,
capabilities,
colorRgb,
createdDate,
kind,
orgUnitId,
restrictions,
themeId
FROM googleworkspace.drivev2.teamdrives
WHERE teamDriveId = '{{ teamDriveId }}' -- required
AND useDomainAdminAccess = '{{ useDomainAdminAccess }}'
;

INSERT examples

Deprecated: Use drives.insert instead.

INSERT INTO googleworkspace.drivev2.teamdrives (
data__id,
data__name,
data__colorRgb,
data__kind,
data__backgroundImageLink,
data__capabilities,
data__themeId,
data__backgroundImageFile,
data__createdDate,
data__restrictions,
data__orgUnitId,
requestId
)
SELECT
'{{ id }}',
'{{ name }}',
'{{ colorRgb }}',
'{{ kind }}',
'{{ backgroundImageLink }}',
'{{ capabilities }}',
'{{ themeId }}',
'{{ backgroundImageFile }}',
'{{ createdDate }}',
'{{ restrictions }}',
'{{ orgUnitId }}',
'{{ requestId }}'
RETURNING
id,
name,
backgroundImageFile,
backgroundImageLink,
capabilities,
colorRgb,
createdDate,
kind,
orgUnitId,
restrictions,
themeId
;

REPLACE examples

Deprecated: Use drives.update instead.

REPLACE googleworkspace.drivev2.teamdrives
SET
data__id = '{{ id }}',
data__name = '{{ name }}',
data__colorRgb = '{{ colorRgb }}',
data__kind = '{{ kind }}',
data__backgroundImageLink = '{{ backgroundImageLink }}',
data__capabilities = '{{ capabilities }}',
data__themeId = '{{ themeId }}',
data__backgroundImageFile = '{{ backgroundImageFile }}',
data__createdDate = '{{ createdDate }}',
data__restrictions = '{{ restrictions }}',
data__orgUnitId = '{{ orgUnitId }}'
WHERE
teamDriveId = '{{ teamDriveId }}' --required
AND useDomainAdminAccess = {{ useDomainAdminAccess}}
RETURNING
id,
name,
backgroundImageFile,
backgroundImageLink,
capabilities,
colorRgb,
createdDate,
kind,
orgUnitId,
restrictions,
themeId;

DELETE examples

Deprecated: Use drives.delete instead.

DELETE FROM googleworkspace.drivev2.teamdrives
WHERE teamDriveId = '{{ teamDriveId }}' --required
;