Skip to main content

files_labels

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

Overview

Namefiles_labels
TypeResource
Idgoogleworkspace.drivev2.files_labels

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the label.
fieldsobjectA map of the fields on the label, keyed by the field's ID.
kindstringThis is always drive#label (default: drive#label)
revisionIdstringThe revision ID of the label.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_labelsselectfileIdmaxResults, pageTokenLists the labels on a file.

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
fileIdstring
maxResultsinteger (int32)
pageTokenstring

SELECT examples

Lists the labels on a file.

SELECT
id,
fields,
kind,
revisionId
FROM googleworkspace.drivev2.files_labels
WHERE fileId = '{{ fileId }}' -- required
AND maxResults = '{{ maxResults }}'
AND pageToken = '{{ pageToken }}'
;