drive.files.watch
Subscribes to change notifications for a Google Drive file by creating a push channel, returning the API response as JSON; rejected in read-only safety profiles.
Instructions
Subscribes to changes to a file. 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: copy, create, delete, download, emptyTrash, export, generateCseToken, generateIds, get, list, listLabels, modifyLabels, update.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| fileId | Yes | [URL path segment] The ID of the file. | |
| params | No | Parameter map merged into the request; typed parameters win. | |
| dry_run | No | Return the request that would be sent, without sending it. | |
| 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. | |
| 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. | |
| acknowledgeAbuse | No | [query parameter] Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when the `alt` parameter is set to `medi | 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 |
| 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 |