changes
Creates, updates, deletes, gets or lists a changes
resource.
Overview
Name | changes |
Type | Resource |
Id | googleworkspace.drivev2.changes |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Name | Datatype | Description |
---|---|---|
id | string (int64) | The ID of the change. |
changeType | string | The type of the change. Possible values are file and drive . |
deleted | boolean | Whether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access. |
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 associated with this change. |
kind | string | This is always drive#change . (default: drive#change) |
modificationDate | string (date-time) | The time of this modification. |
selfLink | string | A link back to this change. |
teamDrive | object | Deprecated: Use drive instead. (id: TeamDrive) |
teamDriveId | string | Deprecated: Use driveId instead. |
type | string | Deprecated: Use changeType instead. |
Name | Datatype | Description |
---|---|---|
id | string (int64) | The ID of the change. |
changeType | string | The type of the change. Possible values are file and drive . |
deleted | boolean | Whether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access. |
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 associated with this change. |
kind | string | This is always drive#change . (default: drive#change) |
modificationDate | string (date-time) | The time of this modification. |
selfLink | string | A link back to this change. |
teamDrive | object | Deprecated: Use drive instead. (id: TeamDrive) |
teamDriveId | string | Deprecated: Use driveId instead. |
type | string | Deprecated: Use changeType instead. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | changeId | driveId , supportsAllDrives , supportsTeamDrives , teamDriveId | Deprecated: Use changes.getStartPageToken and changes.list to retrieve recent changes. |
list | select | driveId , includeCorpusRemovals , includeDeleted , includeItemsFromAllDrives , includeSubscribed , includeTeamDriveItems , maxResults , pageToken , spaces , startChangeId , supportsAllDrives , supportsTeamDrives , teamDriveId , includePermissionsForView , includeLabels | Lists the changes for a user or shared drive. | |
watch | exec | driveId , includeCorpusRemovals , includeDeleted , includeItemsFromAllDrives , includeSubscribed , includeTeamDriveItems , maxResults , pageToken , spaces , startChangeId , supportsAllDrives , supportsTeamDrives , teamDriveId , includePermissionsForView , includeLabels | Subscribe to changes for a user. |
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 |
---|---|---|
changeId | string | |
driveId | string | |
includeCorpusRemovals | boolean | |
includeDeleted | boolean | |
includeItemsFromAllDrives | boolean | |
includeLabels | string | |
includePermissionsForView | string | |
includeSubscribed | boolean | |
includeTeamDriveItems | boolean | |
maxResults | integer (int32) | |
pageToken | string | |
spaces | string | |
startChangeId | string (int64) | |
supportsAllDrives | boolean | |
supportsTeamDrives | boolean | |
teamDriveId | string |
SELECT
examples
- get
- list
Deprecated: Use changes.getStartPageToken
and changes.list
to retrieve recent changes.
SELECT
id,
changeType,
deleted,
drive,
driveId,
file,
fileId,
kind,
modificationDate,
selfLink,
teamDrive,
teamDriveId,
type
FROM googleworkspace.drivev2.changes
WHERE changeId = '{{ changeId }}' -- required
AND driveId = '{{ driveId }}'
AND supportsAllDrives = '{{ supportsAllDrives }}'
AND supportsTeamDrives = '{{ supportsTeamDrives }}'
AND teamDriveId = '{{ teamDriveId }}'
;
Lists the changes for a user or shared drive.
SELECT
id,
changeType,
deleted,
drive,
driveId,
file,
fileId,
kind,
modificationDate,
selfLink,
teamDrive,
teamDriveId,
type
FROM googleworkspace.drivev2.changes
WHERE driveId = '{{ driveId }}'
AND includeCorpusRemovals = '{{ includeCorpusRemovals }}'
AND includeDeleted = '{{ includeDeleted }}'
AND includeItemsFromAllDrives = '{{ includeItemsFromAllDrives }}'
AND includeSubscribed = '{{ includeSubscribed }}'
AND includeTeamDriveItems = '{{ includeTeamDriveItems }}'
AND maxResults = '{{ maxResults }}'
AND pageToken = '{{ pageToken }}'
AND spaces = '{{ spaces }}'
AND startChangeId = '{{ startChangeId }}'
AND supportsAllDrives = '{{ supportsAllDrives }}'
AND supportsTeamDrives = '{{ supportsTeamDrives }}'
AND teamDriveId = '{{ teamDriveId }}'
AND includePermissionsForView = '{{ includePermissionsForView }}'
AND includeLabels = '{{ includeLabels }}'
;
Lifecycle Methods
- watch
Subscribe to changes for a user.
EXEC googleworkspace.drivev2.changes.watch
@driveId='{{ driveId }}',
@includeCorpusRemovals={{ includeCorpusRemovals }},
@includeDeleted={{ includeDeleted }},
@includeItemsFromAllDrives={{ includeItemsFromAllDrives }},
@includeSubscribed={{ includeSubscribed }},
@includeTeamDriveItems={{ includeTeamDriveItems }},
@maxResults='{{ maxResults }}',
@pageToken='{{ pageToken }}',
@spaces='{{ spaces }}',
@startChangeId='{{ startChangeId }}',
@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 }}"
}'
;