drive.files.modifyLabels
Add, update, or remove labels and label fields on a Google Drive file by file ID, returning the labels that were added or modified.
Instructions
Modifies the set of labels applied to a file. For more information, see Set a label field on a file. Returns a list of the labels that were added or modified [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 ModifyLabelsRequest object accepting kind, labelModifications; 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, update, watch.
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 to which the labels belong. | |
| 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 ModifyLabelsRequest object. | |
| request_body | No | Request body of type ModifyLabelsRequest: pass it via `params` (merged into the built body) or whole via `body_file`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| modifiedLabels | No |