changes
Creates, updates, deletes, gets or lists a changes
resource.
Overview
Name | changes |
Type | Resource |
Id | googleworkspace.drivev3.changes |
Fields
The following fields are returned by SELECT
queries:
- list
Name | Datatype | Description |
---|---|---|
changeType | string | The type of the change. Possible values are file and drive . |
drive | object | The updated state of the shared drive. Present if the changeType is drive, the user is still a member of the shared drive, and the shared drive has not been deleted. (id: Drive) |
driveId | string | The ID of the shared drive associated with this change. |
file | object | The updated state of the file. Present if the type is file and the file has not been removed from this list of changes. (id: File) |
fileId | string | The ID of the file which has changed. |
kind | string | Identifies what kind of resource this is. Value: the fixed string "drive#change" . (default: drive#change) |
removed | boolean | Whether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access. |
teamDrive | object | Deprecated: Use drive instead. (id: TeamDrive) |
teamDriveId | string | Deprecated: Use driveId instead. |
time | string (date-time) | The time of this change (RFC 3339 date-time). |
type | string | Deprecated: Use changeType instead. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | pageToken | driveId , includeCorpusRemovals , includeItemsFromAllDrives , includeRemoved , includeTeamDriveItems , pageSize , restrictToMyDrive , spaces , supportsAllDrives , supportsTeamDrives , teamDriveId , includePermissionsForView , includeLabels | Lists the changes for a user or shared drive. For more information, see Retrieve changes. |
watch | exec | pageToken | driveId , includeCorpusRemovals , includeItemsFromAllDrives , includeRemoved , includeTeamDriveItems , pageSize , restrictToMyDrive , spaces , supportsAllDrives , supportsTeamDrives , teamDriveId , includePermissionsForView , includeLabels | Subscribes to changes for a user. For more information, see Notifications for resource changes. |
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.
Name | Datatype | Description |
---|---|---|
pageToken | string | |
driveId | string | |
includeCorpusRemovals | boolean | |
includeItemsFromAllDrives | boolean | |
includeLabels | string | |
includePermissionsForView | string | |
includeRemoved | boolean | |
includeTeamDriveItems | boolean | |
pageSize | integer (int32) | |
restrictToMyDrive | boolean | |
spaces | string | |
supportsAllDrives | boolean | |
supportsTeamDrives | boolean | |
teamDriveId | string |
SELECT
examples
- list
Lists the changes for a user or shared drive. For more information, see Retrieve changes.
SELECT
changeType,
drive,
driveId,
file,
fileId,
kind,
removed,
teamDrive,
teamDriveId,
time,
type
FROM googleworkspace.drivev3.changes
WHERE pageToken = '{{ pageToken }}' -- required
AND driveId = '{{ driveId }}'
AND includeCorpusRemovals = '{{ includeCorpusRemovals }}'
AND includeItemsFromAllDrives = '{{ includeItemsFromAllDrives }}'
AND includeRemoved = '{{ includeRemoved }}'
AND includeTeamDriveItems = '{{ includeTeamDriveItems }}'
AND pageSize = '{{ pageSize }}'
AND restrictToMyDrive = '{{ restrictToMyDrive }}'
AND spaces = '{{ spaces }}'
AND supportsAllDrives = '{{ supportsAllDrives }}'
AND supportsTeamDrives = '{{ supportsTeamDrives }}'
AND teamDriveId = '{{ teamDriveId }}'
AND includePermissionsForView = '{{ includePermissionsForView }}'
AND includeLabels = '{{ includeLabels }}'
;
Lifecycle Methods
- watch
Subscribes to changes for a user. For more information, see Notifications for resource changes.
EXEC googleworkspace.drivev3.changes.watch
@pageToken='{{ pageToken }}' --required,
@driveId='{{ driveId }}',
@includeCorpusRemovals={{ includeCorpusRemovals }},
@includeItemsFromAllDrives={{ includeItemsFromAllDrives }},
@includeRemoved={{ includeRemoved }},
@includeTeamDriveItems={{ includeTeamDriveItems }},
@pageSize='{{ pageSize }}',
@restrictToMyDrive={{ restrictToMyDrive }},
@spaces='{{ spaces }}',
@supportsAllDrives={{ supportsAllDrives }},
@supportsTeamDrives={{ supportsTeamDrives }},
@teamDriveId='{{ teamDriveId }}',
@includePermissionsForView='{{ includePermissionsForView }}',
@includeLabels='{{ includeLabels }}'
@@json=
'{
"payload": {{ payload }},
"id": "{{ id }}",
"resourceId": "{{ resourceId }}",
"resourceUri": "{{ resourceUri }}",
"token": "{{ token }}",
"expiration": "{{ expiration }}",
"type": "{{ type }}",
"address": "{{ address }}",
"params": "{{ params }}",
"kind": "{{ kind }}"
}'
;