drive.changes.watch
Subscribe to Google Drive change notifications by creating a push channel, so your app can receive updates when files or shared drive items change.
Instructions
Subscribes to changes for a user. For more information, see Notifications for resource changes [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON Channel object accepting address, expiration, id, kind, params, payload, resourceId, resourceUri and 2 more fields; pass it via params or whole via body_file Siblings over the same resource: getStartPageToken, list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| params | No | Parameter map merged into the request; typed parameters win. | |
| spaces | No | [query parameter] A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'. | drive |
| driveId | No | [query parameter] The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change I | |
| dry_run | No | Return the request that would be sent, without sending it. | |
| pageSize | No | [query parameter] The maximum number of changes to return. The service may return fewer than this value. If unspecified, at most 100 changes will be returned. The maximum value i | 100 |
| body_file | No | Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON Channel object. | |
| pageToken | Yes | [query parameter] The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the respo | |
| teamDriveId | No | [query parameter] Deprecated: Use `driveId` instead. | |
| request_body | No | Request body of type Channel: pass it via `params` (merged into the built body) or whole via `body_file`. | |
| includeLabels | No | [query parameter] A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. | |
| includeRemoved | No | [query parameter] Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. | true |
| restrictToMyDrive | No | [query parameter] Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared fil | false |
| supportsAllDrives | No | [query parameter] Whether the requesting application supports both My Drives and shared drives. | false |
| supportsTeamDrives | No | [query parameter] Deprecated: Use `supportsAllDrives` instead. | false |
| includeCorpusRemovals | No | [query parameter] Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the l | false |
| includeTeamDriveItems | No | [query parameter] Deprecated: Use `includeItemsFromAllDrives` instead. | false |
| includeItemsFromAllDrives | No | [query parameter] Whether both My Drive and shared drive items should be included in results. | false |
| includePermissionsForView | No | [query parameter] Specifies which additional view's permissions to include in the response. Only 'published' is supported. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| kind | No | ||
| type | No | ||
| token | No | ||
| params | No | ||
| address | No | ||
| payload | No | ||
| expiration | No | ||
| resourceId | No | ||
| resourceUri | No |