## Request


A single kind of update to apply to a spreadsheet.

| JSON representation |
|---|
| ``` { "updateSpreadsheetProperties": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateSpreadsheetPropertiesRequest`) }, "updateSheetProperties": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateSheetPropertiesRequest`) }, "updateDimensionProperties": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateDimensionPropertiesRequest`) }, "updateNamedRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateNamedRangeRequest`) }, "repeatCell": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#RepeatCellRequest`) }, "addNamedRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddNamedRangeRequest`) }, "deleteNamedRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteNamedRangeRequest`) }, "addSheet": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddSheetRequest`) }, "deleteSheet": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteSheetRequest`) }, "autoFill": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AutoFillRequest`) }, "cutPaste": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#CutPasteRequest`) }, "copyPaste": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#CopyPasteRequest`) }, "mergeCells": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#MergeCellsRequest`) }, "unmergeCells": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UnmergeCellsRequest`) }, "updateBorders": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateBordersRequest`) }, "updateCells": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateCellsRequest`) }, "addFilterView": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddFilterViewRequest`) }, "appendCells": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AppendCellsRequest`) }, "clearBasicFilter": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#ClearBasicFilterRequest`) }, "deleteDimension": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteDimensionRequest`) }, "deleteEmbeddedObject": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteEmbeddedObjectRequest`) }, "deleteFilterView": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteFilterViewRequest`) }, "duplicateFilterView": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DuplicateFilterViewRequest`) }, "duplicateSheet": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DuplicateSheetRequest`) }, "findReplace": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#FindReplaceRequest`) }, "insertDimension": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#InsertDimensionRequest`) }, "insertRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#InsertRangeRequest`) }, "moveDimension": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#MoveDimensionRequest`) }, "updateEmbeddedObjectPosition": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateEmbeddedObjectPositionRequest`) }, "pasteData": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#PasteDataRequest`) }, "textToColumns": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#TextToColumnsRequest`) }, "updateFilterView": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateFilterViewRequest`) }, "deleteRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteRangeRequest`) }, "appendDimension": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AppendDimensionRequest`) }, "addConditionalFormatRule": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddConditionalFormatRuleRequest`) }, "updateConditionalFormatRule": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateConditionalFormatRuleRequest`) }, "deleteConditionalFormatRule": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteConditionalFormatRuleRequest`) }, "sortRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#SortRangeRequest`) }, "setDataValidation": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#SetDataValidationRequest`) }, "setBasicFilter": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#SetBasicFilterRequest`) }, "addProtectedRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddProtectedRangeRequest`) }, "updateProtectedRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateProtectedRangeRequest`) }, "deleteProtectedRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteProtectedRangeRequest`) }, "autoResizeDimensions": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AutoResizeDimensionsRequest`) }, "addChart": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddChartRequest`) }, "updateChartSpec": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateChartSpecRequest`) }, "updateBanding": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateBandingRequest`) }, "addBanding": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddBandingRequest`) }, "deleteBanding": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteBandingRequest`) }, "createDeveloperMetadata": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#CreateDeveloperMetadataRequest`) }, "updateDeveloperMetadata": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateDeveloperMetadataRequest`) }, "deleteDeveloperMetadata": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteDeveloperMetadataRequest`) }, "randomizeRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#RandomizeRangeRequest`) }, "addDimensionGroup": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddDimensionGroupRequest`) }, "deleteDimensionGroup": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteDimensionGroupRequest`) }, "updateDimensionGroup": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateDimensionGroupRequest`) }, "trimWhitespace": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#TrimWhitespaceRequest`) }, "deleteDuplicates": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteDuplicatesRequest`) }, "updateEmbeddedObjectBorder": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateEmbeddedObjectBorderRequest`) }, "addSlicer": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddSlicerRequest`) }, "updateSlicerSpec": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateSlicerSpecRequest`) }, "addDataSource": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddDataSourceRequest`) }, "updateDataSource": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateDataSourceRequest`) }, "deleteDataSource": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteDataSourceRequest`) }, "refreshDataSource": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#RefreshDataSourceRequest`) }, "cancelDataSourceRefresh": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#CancelDataSourceRefreshRequest`) }, "addTable": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddTableRequest`) }, "updateTable": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateTableRequest`) }, "deleteTable": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteTableRequest`) }, "insertComment": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#InsertCommentRequest`) }, "addCommentReply": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddCommentReplyRequest`) }, "updateCommentPost": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateCommentPostRequest`) }, "deleteComment": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteCommentRequest`) }, "deleteCommentReply": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteCommentReplyRequest`) } } ``` |

| Fields ||
|---|---|
| The kind of update. Exactly one field is required. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `updateSpreadsheetProperties` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateSpreadsheetPropertiesRequest`)`` Updates the spreadsheet's properties. |
| `updateSheetProperties` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateSheetPropertiesRequest`)`` Updates a sheet's properties. |
| `updateDimensionProperties` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateDimensionPropertiesRequest`)`` Updates dimensions' properties. |
| `updateNamedRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateNamedRangeRequest`)`` Updates a named range. |
| `repeatCell` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#RepeatCellRequest`)`` Repeats a single cell across a range. |
| `addNamedRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddNamedRangeRequest`)`` Adds a named range. |
| `deleteNamedRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteNamedRangeRequest`)`` Deletes a named range. |
| `addSheet` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddSheetRequest`)`` Adds a sheet. |
| `deleteSheet` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteSheetRequest`)`` Deletes a sheet. |
| `autoFill` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AutoFillRequest`)`` Automatically fills in more data based on existing data. |
| `cutPaste` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#CutPasteRequest`)`` Cuts data from one area and pastes it to another. |
| `copyPaste` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#CopyPasteRequest`)`` Copies data from one area and pastes it to another. |
| `mergeCells` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#MergeCellsRequest`)`` Merges cells together. |
| `unmergeCells` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UnmergeCellsRequest`)`` Unmerges merged cells. |
| `updateBorders` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateBordersRequest`)`` Updates the borders in a range of cells. |
| `updateCells` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateCellsRequest`)`` Updates many cells at once. |
| `addFilterView` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddFilterViewRequest`)`` Adds a filter view. |
| `appendCells` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AppendCellsRequest`)`` Appends cells after the last row with data in a sheet. |
| `clearBasicFilter` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#ClearBasicFilterRequest`)`` Clears the basic filter on a sheet. |
| `deleteDimension` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteDimensionRequest`)`` Deletes rows or columns in a sheet. |
| `deleteEmbeddedObject` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteEmbeddedObjectRequest`)`` Deletes an embedded object (e.g, chart, image) in a sheet. |
| `deleteFilterView` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteFilterViewRequest`)`` Deletes a filter view from a sheet. |
| `duplicateFilterView` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DuplicateFilterViewRequest`)`` Duplicates a filter view. |
| `duplicateSheet` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DuplicateSheetRequest`)`` Duplicates a sheet. |
| `findReplace` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#FindReplaceRequest`)`` Finds and replaces occurrences of some text with other text. |
| `insertDimension` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#InsertDimensionRequest`)`` Inserts new rows or columns in a sheet. |
| `insertRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#InsertRangeRequest`)`` Inserts new cells in a sheet, shifting the existing cells. |
| `moveDimension` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#MoveDimensionRequest`)`` Moves rows or columns to another location in a sheet. |
| `updateEmbeddedObjectPosition` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateEmbeddedObjectPositionRequest`)`` Updates an embedded object's (e.g. chart, image) position. |
| `pasteData` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#PasteDataRequest`)`` Pastes data (HTML or delimited) into a sheet. |
| `textToColumns` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#TextToColumnsRequest`)`` Converts a column of text into many columns of text. |
| `updateFilterView` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateFilterViewRequest`)`` Updates the properties of a filter view. |
| `deleteRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteRangeRequest`)`` Deletes a range of cells from a sheet, shifting the remaining cells. |
| `appendDimension` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AppendDimensionRequest`)`` Appends dimensions to the end of a sheet. |
| `addConditionalFormatRule` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddConditionalFormatRuleRequest`)`` Adds a new conditional format rule. |
| `updateConditionalFormatRule` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateConditionalFormatRuleRequest`)`` Updates an existing conditional format rule. |
| `deleteConditionalFormatRule` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteConditionalFormatRuleRequest`)`` Deletes an existing conditional format rule. |
| `sortRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#SortRangeRequest`)`` Sorts data in a range. |
| `setDataValidation` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#SetDataValidationRequest`)`` Sets data validation for one or more cells. |
| `setBasicFilter` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#SetBasicFilterRequest`)`` Sets the basic filter on a sheet. |
| `addProtectedRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddProtectedRangeRequest`)`` Adds a protected range. |
| `updateProtectedRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateProtectedRangeRequest`)`` Updates a protected range. |
| `deleteProtectedRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteProtectedRangeRequest`)`` Deletes a protected range. |
| `autoResizeDimensions` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AutoResizeDimensionsRequest`)`` Automatically resizes one or more dimensions based on the contents of the cells in that dimension. |
| `addChart` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddChartRequest`)`` Adds a chart. |
| `updateChartSpec` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateChartSpecRequest`)`` Updates a chart's specifications. |
| `updateBanding` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateBandingRequest`)`` Updates a banded range |
| `addBanding` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddBandingRequest`)`` Adds a new banded range |
| `deleteBanding` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteBandingRequest`)`` Removes a banded range |
| `createDeveloperMetadata` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#CreateDeveloperMetadataRequest`)`` Creates new developer metadata |
| `updateDeveloperMetadata` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateDeveloperMetadataRequest`)`` Updates an existing developer metadata entry |
| `deleteDeveloperMetadata` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteDeveloperMetadataRequest`)`` Deletes developer metadata |
| `randomizeRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#RandomizeRangeRequest`)`` Randomizes the order of the rows in a range. |
| `addDimensionGroup` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddDimensionGroupRequest`)`` Creates a group over the specified range. |
| `deleteDimensionGroup` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteDimensionGroupRequest`)`` Deletes a group over the specified range. |
| `updateDimensionGroup` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateDimensionGroupRequest`)`` Updates the state of the specified group. |
| `trimWhitespace` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#TrimWhitespaceRequest`)`` Trims cells of whitespace (such as spaces, tabs, or new lines). |
| `deleteDuplicates` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteDuplicatesRequest`)`` Removes rows containing duplicate values in specified columns of a cell range. |
| `updateEmbeddedObjectBorder` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateEmbeddedObjectBorderRequest`)`` Updates an embedded object's border. |
| `addSlicer` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddSlicerRequest`)`` Adds a slicer. |
| `updateSlicerSpec` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateSlicerSpecRequest`)`` Updates a slicer's specifications. |
| `addDataSource` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddDataSourceRequest`)`` Adds a data source. |
| `updateDataSource` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateDataSourceRequest`)`` Updates a data source. |
| `deleteDataSource` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteDataSourceRequest`)`` Deletes a data source. |
| `refreshDataSource` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#RefreshDataSourceRequest`)`` Refreshes one or multiple data sources and associated dbobjects. |
| `cancelDataSourceRefresh` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#CancelDataSourceRefreshRequest`)`` Cancels refreshes of one or multiple data sources and associated dbobjects. |
| `addTable` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddTableRequest`)`` Adds a table. |
| `updateTable` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateTableRequest`)`` Updates a table. |
| `deleteTable` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteTableRequest`)`` A request for deleting a table. |
| `insertComment` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#InsertCommentRequest`)`` Inserts a `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread` into the spreadsheet. |
| `addCommentReply` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddCommentReplyRequest`)`` Adds a reply to a `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread`. |
| `updateCommentPost` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateCommentPostRequest`)`` Updates an existing post (head post or reply) of a `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread`. |
| `deleteComment` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteCommentRequest`)`` Deletes a `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread`. |
| `deleteCommentReply` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DeleteCommentReplyRequest`)`` Deletes a reply `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#Post` from a `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread` |
| End of mutually exclusive fields. ||

## UpdateSpreadsheetPropertiesRequest


Updates properties of a spreadsheet.

| JSON representation |
|---|
| ``` { "properties": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#SpreadsheetProperties`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `properties` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#SpreadsheetProperties`)`` The properties to update. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root 'properties' is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## UpdateSheetPropertiesRequest


Updates properties of the sheet with the specified
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetProperties.FIELDS.sheet_id`.

| JSON representation |
|---|
| ``` { "properties": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetProperties`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `properties` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetProperties`)`` The properties to update. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `properties` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## UpdateDimensionPropertiesRequest


Updates properties of dimensions within the specified range.

| JSON representation |
|---|
| ``` { "properties": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#DimensionProperties`) }, "fields": string, "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`) }, "dataSourceSheetRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DataSourceSheetDimensionRange`) } } ``` |

| Fields ||
|---|---|
| `properties` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#DimensionProperties`)`` Properties to update. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `properties` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |
| The dimension range. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`)`` The rows or columns to update. |
| `dataSourceSheetRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DataSourceSheetDimensionRange`)`` The columns on a data source sheet to update. |
| End of mutually exclusive fields. ||

## DataSourceSheetDimensionRange


A range along a single dimension on a
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetType`
sheet.

| JSON representation |
|---|
| ``` { "sheetId": integer, "columnReferences": [ { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#DataSourceColumnReference`) } ] } ``` |

| Fields ||
|---|---|
| `sheetId` | `integer` The ID of the data source sheet the range is on. |
| `columnReferences[]` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#DataSourceColumnReference`)`` The columns on the data source sheet. |

## UpdateNamedRangeRequest


Updates properties of the named range with the specified
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#NamedRange.FIELDS.named_range_id`.

| JSON representation |
|---|
| ``` { "namedRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#NamedRange`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `namedRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#NamedRange`)`` The named range to update with the new properties. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `namedRange` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## RepeatCellRequest


Updates all cells in the range to the values in the given Cell object. Only the fields listed in the
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#RepeatCellRequest.FIELDS.fields`
field are updated; others are unchanged.


If writing a cell with a formula, the formula's ranges will automatically increment for each field in the range. For example, if writing a cell with formula
`=A1`
into range B2:C4, B2 would be
`=A1`, B3 would be
`=A2`, B4 would be
`=A3`, C2 would be
`=B1`, C3 would be
`=B2`, C4 would be
`=B3`.


To keep the formula's ranges static, use the
`$`
indicator. For example, use the formula
`=$A$1`
to prevent both the row and the column from incrementing.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "cell": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#CellData`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range to repeat the cell in. |
| `cell` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#CellData`)`` The data to write. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `cell` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## AddNamedRangeRequest


Adds a named range to the spreadsheet.

| JSON representation |
|---|
| ``` { "namedRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#NamedRange`) } } ``` |

| Fields ||
|---|---|
| `namedRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#NamedRange`)`` The named range to add. The `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#NamedRange.FIELDS.named_range_id` field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.) |

## DeleteNamedRangeRequest


Removes the named range with the given ID from the spreadsheet.

| JSON representation |
|---|
| ``` { "namedRangeId": string } ``` |

| Fields ||
|---|---|
| `namedRangeId` | `string` The ID of the named range to delete. |

## AddSheetRequest


Adds a new sheet. When a sheet is added at a given index, all subsequent sheets' indexes are incremented. To add an object sheet, use
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#AddChartRequest`
instead and specify
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#EmbeddedObjectPosition.FIELDS.sheet_id`
or
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#EmbeddedObjectPosition.FIELDS.new_sheet`.

| JSON representation |
|---|
| ``` { "properties": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetProperties`) } } ``` |

| Fields ||
|---|---|
| `properties` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetProperties`)`` The properties the new sheet should have. All properties are optional. The `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetProperties.FIELDS.sheet_id` field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a sheet that already exists.) |

## DeleteSheetRequest


Deletes the requested sheet.

| JSON representation |
|---|
| ``` { "sheetId": integer } ``` |

| Fields ||
|---|---|
| `sheetId` | `integer` The ID of the sheet to delete. If the sheet is of `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetType` type, the associated `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#DataSource` is also deleted. |

## AutoFillRequest


Fills in more data based on existing data.

| JSON representation |
|---|
| ``` { "useAlternateSeries": boolean, "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "sourceAndDestination": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#SourceAndDestination`) } } ``` |

| Fields ||
|---|---|
| `useAlternateSeries` | `boolean` True if we should generate data with the "alternate" series. This differs based on the type and amount of source data. |
| The area to autofill. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range to autofill. This will examine the range and detect the location that has data and automatically fill that data in to the rest of the range. |
| `sourceAndDestination` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#SourceAndDestination`)`` The source and destination areas to autofill. This explicitly lists the source of the autofill and where to extend that data. |
| End of mutually exclusive fields. ||

## SourceAndDestination


A combination of a source range and how to extend that source.

| JSON representation |
|---|
| ``` { "source": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "dimension": enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/Dimension`), "fillLength": integer } ``` |

| Fields ||
|---|---|
| `source` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The location of the data to use as the source of the autofill. |
| `dimension` | ``enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/Dimension`)`` The dimension that data should be filled into. |
| `fillLength` | `integer` The number of rows or columns that data should be filled into. Positive numbers expand beyond the last row or last column of the source. Negative numbers expand before the first row or first column of the source. |

## CutPasteRequest


Moves data from the source to the destination.

| JSON representation |
|---|
| ``` { "source": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "destination": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridCoordinate`) }, "pasteType": enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#PasteType`) } ``` |

| Fields ||
|---|---|
| `source` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The source data to cut. |
| `destination` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridCoordinate`)`` The top-left coordinate where the data should be pasted. |
| `pasteType` | ``enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#PasteType`)`` What kind of data to paste. All the source data will be cut, regardless of what is pasted. |

## PasteType


What kind of data should be pasted.

| Enums ||
|---|---|
| `PASTE_NORMAL` | Paste values, formulas, formats, and merges. |
| `PASTE_VALUES` | Paste the values ONLY without formats, formulas, or merges. |
| `PASTE_FORMAT` | Paste the format only, excluding data validation. |
| `PASTE_NO_BORDERS` | Like `PASTE_NORMAL` but without borders. |
| `PASTE_FORMULA` | Paste the formulas only. |
| `PASTE_DATA_VALIDATION` | Paste the data validation only. |
| `PASTE_CONDITIONAL_FORMATTING` | Paste the conditional formatting rules only. |

## CopyPasteRequest


Copies data from the source to the destination.

| JSON representation |
|---|
| ``` { "source": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "destination": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "pasteType": enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#PasteType`), "pasteOrientation": enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#PasteOrientation`) } ``` |

| Fields ||
|---|---|
| `source` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The source range to copy. |
| `destination` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The location to paste to. If the range covers a span that's a multiple of the source's height or width, then the data will be repeated to fill in the destination range. If the range is smaller than the source range, the entire source data will still be copied (beyond the end of the destination range). |
| `pasteType` | ``enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#PasteType`)`` What kind of data to paste. |
| `pasteOrientation` | ``enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#PasteOrientation`)`` How that data should be oriented when pasting. |

## PasteOrientation


How a paste operation should be performed.

| Enums ||
|---|---|
| `NORMAL` | Paste normally. |
| `TRANSPOSE` | Paste transposed, where all rows become columns and vice versa. |

## MergeCellsRequest


Merges all cells in the range.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "mergeType": enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#MergeType`) } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range of cells to merge. |
| `mergeType` | ``enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#MergeType`)`` How the cells should be merged. |

## MergeType


The type of merge to create.

| Enums ||
|---|---|
| `MERGE_ALL` | Create a single merge from the range |
| `MERGE_COLUMNS` | Create a merge for each column in the range |
| `MERGE_ROWS` | Create a merge for each row in the range |

## UnmergeCellsRequest


Unmerges cells in the given range.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) } } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range within which all cells should be unmerged. If the range spans multiple merges, all will be unmerged. The range must not partially span any merge. |

## UpdateBordersRequest


Updates the borders of a range. If a field is not set in the request, that means the border remains as-is. For example, with two subsequent UpdateBordersRequest:

1. range: A1:A5 `{ top: RED, bottom: WHITE }`
2. range: A1:A5 `{ left: BLUE }`


That would result in A1:A5 having a borders of
`{ top: RED, bottom: WHITE, left: BLUE }`. If you want to clear a border, explicitly set the style to
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Style`.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "top": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Border`) }, "bottom": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Border`) }, "left": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Border`) }, "right": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Border`) }, "innerHorizontal": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Border`) }, "innerVertical": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Border`) } } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range whose borders should be updated. |
| `top` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Border`)`` The border to put at the top of the range. |
| `bottom` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Border`)`` The border to put at the bottom of the range. |
| `left` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Border`)`` The border to put at the left of the range. |
| `right` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Border`)`` The border to put at the right of the range. |
| `innerHorizontal` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Border`)`` The horizontal border to put within the range. |
| `innerVertical` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#Border`)`` The vertical border to put within the range. |

## UpdateCellsRequest


Updates all cells in a range with new data.

| JSON representation |
|---|
| ``` { "rows": [ { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#RowData`) } ], "fields": string, "start": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridCoordinate`) }, "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) } } ``` |

| Fields ||
|---|---|
| `rows[]` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#RowData`)`` The data to write. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields of CellData that should be updated. At least one field must be specified. The root is the CellData; 'row.values.' should not be specified. A single `"*"` can be used as short-hand for listing every field. |
| The location data should be written. Exactly one value must be set. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `start` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridCoordinate`)`` The coordinate to start writing data at. Any number of rows and columns (including a different number of columns per row) may be written. |
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range to write data to. If the data in rows does not cover the entire requested range, the fields matching those set in `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateCellsRequest.FIELDS.fields` will be cleared. |
| End of mutually exclusive fields. ||

## AddFilterViewRequest


Adds a filter view.

| JSON representation |
|---|
| ``` { "filter": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#FilterView`) } } ``` |

| Fields ||
|---|---|
| `filter` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#FilterView`)`` The filter to add. The `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#FilterView.FIELDS.filter_view_id` field is optional. If one is not set, an ID will be randomly generated. (It is an error to specify the ID of a filter that already exists.) |

## AppendCellsRequest


Adds new cells after the last row with data in a sheet, inserting new rows into the sheet if necessary.

| JSON representation |
|---|
| ``` { "sheetId": integer, "rows": [ { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#RowData`) } ], "fields": string, "tableId": string } ``` |

| Fields ||
|---|---|
| `sheetId` | `integer` The sheet ID to append the data to. |
| `rows[]` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#RowData`)`` The data to append. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields of CellData that should be updated. At least one field must be specified. The root is the CellData; 'row.values.' should not be specified. A single `"*"` can be used as short-hand for listing every field. |
| The location data should be written. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `tableId` | `string` The ID of the table to append data to. The data will be only appended to the table body. This field also takes precedence over the `sheetId` field. |
| End of mutually exclusive fields. ||

## ClearBasicFilterRequest


Clears the basic filter, if any exists on the sheet.

| JSON representation |
|---|
| ``` { "sheetId": integer } ``` |

| Fields ||
|---|---|
| `sheetId` | `integer` The sheet ID on which the basic filter should be cleared. |

## DeleteDimensionRequest


Deletes the dimensions from the sheet.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`) } } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`)`` The dimensions to delete from the sheet. |

## DeleteEmbeddedObjectRequest


Deletes the embedded object with the given ID.

| JSON representation |
|---|
| ``` { "objectId": integer } ``` |

| Fields ||
|---|---|
| `objectId` | `integer` The ID of the embedded object to delete. |

## DeleteFilterViewRequest


Deletes a particular filter view.

| JSON representation |
|---|
| ``` { "filterId": integer } ``` |

| Fields ||
|---|---|
| `filterId` | `integer` The ID of the filter to delete. |

## DuplicateFilterViewRequest


Duplicates a particular filter view.

| JSON representation |
|---|
| ``` { "filterId": integer } ``` |

| Fields ||
|---|---|
| `filterId` | `integer` The ID of the filter being duplicated. |

## DuplicateSheetRequest


Duplicates the contents of a sheet.

| JSON representation |
|---|
| ``` { "sourceSheetId": integer, "insertSheetIndex": integer, "newSheetId": integer, "newSheetName": string } ``` |

| Fields ||
|---|---|
| `sourceSheetId` | `integer` The sheet to duplicate. If the source sheet is of `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetType` type, its backing `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#DataSource` is also duplicated and associated with the new copy of the sheet. No data execution is triggered, the grid data of this sheet is also copied over but only available after the batch request completes. |
| `insertSheetIndex` | `integer` The zero-based index where the new sheet should be inserted. The index of all sheets after this are incremented. |
| `newSheetId` | `integer` If set, the ID of the new sheet. If not set, an ID is chosen. If set, the ID must not conflict with any existing sheet ID. If set, it must be non-negative. |
| `newSheetName` | `string` The name of the new sheet. If empty, a new name is chosen for you. |

## FindReplaceRequest


Finds and replaces data in cells over a range, sheet, or all sheets.

| JSON representation |
|---|
| ``` { "find": string, "replacement": string, "matchCase": boolean, "matchEntireCell": boolean, "searchByRegex": boolean, "includeFormulas": boolean, "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "sheetId": integer, "allSheets": boolean } ``` |

| Fields ||
|---|---|
| `find` | `string` The value to search. |
| `replacement` | `string` The value to use as the replacement. |
| `matchCase` | `boolean` True if the search is case sensitive. |
| `matchEntireCell` | `boolean` True if the find value should match the entire cell. |
| `searchByRegex` | `boolean` True if the find value is a regex. The regular expression and replacement should follow Java regex rules at <https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html>. The replacement string is allowed to refer to capturing groups. For example, if one cell has the contents `"Google Sheets"` and another has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of `"$1 Rocks"` would change the contents of the cells to `"GSheets Rocks"` and `"GDocs Rocks"` respectively. |
| `includeFormulas` | `boolean` True if the search should include cells with formulas. False to skip cells with formulas. |
| The scope over which to find/replace -- one and only one must be set. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range to find/replace over. |
| `sheetId` | `integer` The sheet to find/replace over. |
| `allSheets` | `boolean` True to find/replace over all sheets. |
| End of mutually exclusive fields. ||

## InsertDimensionRequest


Inserts rows or columns in a sheet at a particular index.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`) }, "inheritFromBefore": boolean } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`)`` The dimensions to insert. Both the start and end indexes must be bounded. |
| `inheritFromBefore` | `boolean` Whether dimension properties should be extended from the dimensions before or after the newly inserted dimensions. True to inherit from the dimensions before (in which case the start index must be greater than 0), and false to inherit from the dimensions after. For example, if row index 0 has red background and row index 1 has a green background, then inserting 2 rows at index 1 can inherit either the green or red background. If `inheritFromBefore` is true, the two new rows will be red (because the row before the insertion point was red), whereas if `inheritFromBefore` is false, the two new rows will be green (because the row after the insertion point was green). |

## InsertRangeRequest


Inserts cells into a range, shifting the existing cells over or down.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "shiftDimension": enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/Dimension`) } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range to insert new cells into. The range is constrained to the current sheet boundaries. |
| `shiftDimension` | ``enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/Dimension`)`` The dimension which will be shifted when inserting cells. If `https://developers.google.com/workspace/sheets/api/reference/rest/v4/Dimension`, existing cells will be shifted down. If `https://developers.google.com/workspace/sheets/api/reference/rest/v4/Dimension`, existing cells will be shifted right. |

## MoveDimensionRequest


Moves one or more rows or columns.

| JSON representation |
|---|
| ``` { "source": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`) }, "destinationIndex": integer } ``` |

| Fields ||
|---|---|
| `source` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`)`` The source dimensions to move. |
| `destinationIndex` | `integer` The zero-based start index of where to move the source data to, based on the coordinates *before* the source data is removed from the grid. Existing data will be shifted down or right (depending on the dimension) to make room for the moved dimensions. The source dimensions are removed from the grid, so the the data may end up in a different index than specified. For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move `"1"` and `"2"` to between `"3"` and `"4"`, the source would be `ROWS [1..3)`,and the destination index would be `"4"` (the zero-based index of row 5). The end result would be `A1..A5` of `0, 3, 1, 2, 4`. |

## UpdateEmbeddedObjectPositionRequest


Update an embedded object's position (such as a moving or resizing a chart or image).

| JSON representation |
|---|
| ``` { "objectId": integer, "newPosition": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#EmbeddedObjectPosition`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `objectId` | `integer` The ID of the object to moved. |
| `newPosition` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#EmbeddedObjectPosition`)`` An explicit position to move the embedded object to. If `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#EmbeddedObjectPosition.FIELDS.sheet_id` is set, a new sheet with that ID will be created. If `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#EmbeddedObjectPosition.FIELDS.new_sheet` is set to true, a new sheet will be created with an ID that will be chosen for you. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields of `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#OverlayPosition` that should be updated when setting a new position. Used only if `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#EmbeddedObjectPosition.FIELDS.overlay_position` is set, in which case at least one field must be specified. The root `newPosition.overlayPosition` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## PasteDataRequest


Inserts data into the spreadsheet starting at the specified coordinate.

| JSON representation |
|---|
| ``` { "coordinate": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridCoordinate`) }, "data": string, "type": enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#PasteType`), "delimiter": string, "html": boolean } ``` |

| Fields ||
|---|---|
| `coordinate` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridCoordinate`)`` The coordinate at which the data should start being inserted. |
| `data` | `string` The data to insert. |
| `type` | ``enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#PasteType`)`` How the data should be pasted. |
| How to interpret the data, exactly one value must be set. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `delimiter` | `string` The delimiter in the data. |
| `html` | `boolean` True if the data is HTML. |
| End of mutually exclusive fields. ||

## TextToColumnsRequest


Splits a column of text into multiple columns, based on a delimiter in each cell.

| JSON representation |
|---|
| ``` { "source": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "delimiter": string, "delimiterType": enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DelimiterType`) } ``` |

| Fields ||
|---|---|
| `source` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The source data range. This must span exactly one column. |
| `delimiter` | `string` The delimiter to use. Used only if delimiterType is `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DelimiterType`. |
| `delimiterType` | ``enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DelimiterType`)`` The delimiter type to use. |

## DelimiterType


The delimiter to split on.

| Enums ||
|---|---|
| `DELIMITER_TYPE_UNSPECIFIED` | Default value. This value must not be used. |
| `COMMA` | "," |
| `SEMICOLON` | ";" |
| `PERIOD` | "." |
| `SPACE` | " " |
| `CUSTOM` | A custom value as defined in delimiter. |
| `AUTODETECT` | Automatically detect columns. |

## UpdateFilterViewRequest


Updates properties of the filter view.

| JSON representation |
|---|
| ``` { "filter": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#FilterView`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `filter` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#FilterView`)`` The new properties of the filter view. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `filter` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## DeleteRangeRequest


Deletes a range of cells, shifting other cells into the deleted area.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "shiftDimension": enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/Dimension`) } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range of cells to delete. |
| `shiftDimension` | ``enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/Dimension`)`` The dimension from which deleted cells will be replaced with. If `https://developers.google.com/workspace/sheets/api/reference/rest/v4/Dimension`, existing cells will be shifted upward to replace the deleted cells. If `https://developers.google.com/workspace/sheets/api/reference/rest/v4/Dimension`, existing cells will be shifted left to replace the deleted cells. |

## AppendDimensionRequest


Appends rows or columns to the end of a sheet.

| JSON representation |
|---|
| ``` { "sheetId": integer, "dimension": enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/Dimension`), "length": integer } ``` |

| Fields ||
|---|---|
| `sheetId` | `integer` The sheet to append rows or columns to. |
| `dimension` | ``enum (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/Dimension`)`` Whether rows or columns should be appended. |
| `length` | `integer` The number of rows or columns to append. |

## AddConditionalFormatRuleRequest


Adds a new conditional format rule at the given index. All subsequent rules' indexes are incremented.

| JSON representation |
|---|
| ``` { "rule": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#ConditionalFormatRule`) }, "index": integer } ``` |

| Fields ||
|---|---|
| `rule` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#ConditionalFormatRule`)`` The rule to add. |
| `index` | `integer` The zero-based index where the rule should be inserted. |

## UpdateConditionalFormatRuleRequest


Updates a conditional format rule at the given index, or moves a conditional format rule to another index.

| JSON representation |
|---|
| ``` { "index": integer, "sheetId": integer, "rule": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#ConditionalFormatRule`) }, "newIndex": integer } ``` |

| Fields ||
|---|---|
| `index` | `integer` The zero-based index of the rule that should be replaced or moved. |
| `sheetId` | `integer` The sheet of the rule to move. Required if `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateConditionalFormatRuleRequest.FIELDS.new_index` is set, unused otherwise. |
| The kind of update that should happen. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `rule` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#ConditionalFormatRule`)`` The rule that should replace the rule at the given index. |
| `newIndex` | `integer` The zero-based new index the rule should end up at. |
| End of mutually exclusive fields. ||

## DeleteConditionalFormatRuleRequest


Deletes a conditional format rule at the given index. All subsequent rules' indexes are decremented.

| JSON representation |
|---|
| ``` { "index": integer, "sheetId": integer } ``` |

| Fields ||
|---|---|
| `index` | `integer` The zero-based index of the rule to be deleted. |
| `sheetId` | `integer` The sheet the rule is being deleted from. |

## SortRangeRequest


Sorts data in rows based on a sort order per column.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "sortSpecs": [ { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#SortSpec`) } ] } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range to sort. |
| `sortSpecs[]` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#SortSpec`)`` The sort order per column. Later specifications are used when values are equal in the earlier specifications. |

## SetDataValidationRequest


Sets a data validation rule to every cell in the range. To clear validation in a range, call this with no rule specified.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "rule": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#DataValidationRule`) }, "filteredRowsIncluded": boolean } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range the data validation rule should apply to. |
| `rule` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#DataValidationRule`)`` The data validation rule to set on each cell in the range, or empty to clear the data validation in the range. |
| `filteredRowsIncluded` | `boolean` Optional. If true, the data validation rule will be applied to the filtered rows as well. |

## SetBasicFilterRequest


Sets the basic filter associated with a sheet.

| JSON representation |
|---|
| ``` { "filter": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#BasicFilter`) } } ``` |

| Fields ||
|---|---|
| `filter` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#BasicFilter`)`` The filter to set. |

## AddProtectedRangeRequest


Adds a new protected range.

| JSON representation |
|---|
| ``` { "protectedRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#ProtectedRange`) } } ``` |

| Fields ||
|---|---|
| `protectedRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#ProtectedRange`)`` The protected range to be added. The `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#ProtectedRange.FIELDS.protected_range_id` field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.) |

## UpdateProtectedRangeRequest


Updates an existing protected range with the specified
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#ProtectedRange.FIELDS.protected_range_id`.

| JSON representation |
|---|
| ``` { "protectedRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#ProtectedRange`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `protectedRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#ProtectedRange`)`` The protected range to update with the new properties. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `protectedRange` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## DeleteProtectedRangeRequest


Deletes the protected range with the given ID.

| JSON representation |
|---|
| ``` { "protectedRangeId": integer } ``` |

| Fields ||
|---|---|
| `protectedRangeId` | `integer` The ID of the protected range to delete. |

## AutoResizeDimensionsRequest


Automatically resizes one or more dimensions based on the contents of the cells in that dimension.

| JSON representation |
|---|
| ``` { "dimensions": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`) }, "dataSourceSheetDimensions": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DataSourceSheetDimensionRange`) } } ``` |

| Fields ||
|---|---|
| The dimension range. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `dimensions` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`)`` The dimensions to automatically resize. |
| `dataSourceSheetDimensions` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DataSourceSheetDimensionRange`)`` The dimensions on a data source sheet to automatically resize. |
| End of mutually exclusive fields. ||

## AddChartRequest


Adds a chart to a sheet in the spreadsheet.

| JSON representation |
|---|
| ``` { "chart": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/charts#EmbeddedChart`) } } ``` |

| Fields ||
|---|---|
| `chart` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/charts#EmbeddedChart`)`` The chart that should be added to the spreadsheet, including the position where it should be placed. The `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/charts#EmbeddedChart.FIELDS.chart_id` field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of an embedded object that already exists.) |

## UpdateChartSpecRequest


Updates a chart's specifications. (This does not move or resize a chart. To move or resize a chart, use
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateEmbeddedObjectPositionRequest`.)

| JSON representation |
|---|
| ``` { "chartId": integer, "spec": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/charts#ChartSpec`) } } ``` |

| Fields ||
|---|---|
| `chartId` | `integer` The ID of the chart to update. |
| `spec` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/charts#ChartSpec`)`` The specification to apply to the chart. |

## UpdateBandingRequest


Updates properties of the supplied banded range.

| JSON representation |
|---|
| ``` { "bandedRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#BandedRange`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `bandedRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#BandedRange`)`` The banded range to update with the new properties. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `bandedRange` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## AddBandingRequest


Adds a new banded range to the spreadsheet.

| JSON representation |
|---|
| ``` { "bandedRange": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#BandedRange`) } } ``` |

| Fields ||
|---|---|
| `bandedRange` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#BandedRange`)`` The banded range to add. The `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#BandedRange.FIELDS.banded_range_id` field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.) |

## DeleteBandingRequest


Removes the banded range with the given ID from the spreadsheet.

| JSON representation |
|---|
| ``` { "bandedRangeId": integer } ``` |

| Fields ||
|---|---|
| `bandedRangeId` | `integer` The ID of the banded range to delete. |

## CreateDeveloperMetadataRequest


A request to create developer metadata.

| JSON representation |
|---|
| ``` { "developerMetadata": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.developerMetadata#DeveloperMetadata`) } } ``` |

| Fields ||
|---|---|
| `developerMetadata` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.developerMetadata#DeveloperMetadata`)`` The developer metadata to create. |

## UpdateDeveloperMetadataRequest


A request to update properties of developer metadata. Updates the properties of the developer metadata selected by the filters to the values provided in the
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.developerMetadata#DeveloperMetadata`
resource. Callers must specify the properties they wish to update in the fields parameter, as well as specify at least one
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DataFilter`
matching the metadata they wish to update.

| JSON representation |
|---|
| ``` { "dataFilters": [ { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DataFilter`) } ], "developerMetadata": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.developerMetadata#DeveloperMetadata`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `dataFilters[]` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DataFilter`)`` The filters matching the developer metadata entries to update. |
| `developerMetadata` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.developerMetadata#DeveloperMetadata`)`` The value that all metadata matched by the data filters will be updated to. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `developerMetadata` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## DeleteDeveloperMetadataRequest


A request to delete developer metadata.

| JSON representation |
|---|
| ``` { "dataFilter": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DataFilter`) } } ``` |

| Fields ||
|---|---|
| `dataFilter` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DataFilter`)`` The data filter describing the criteria used to select which developer metadata entry to delete. |

## RandomizeRangeRequest


Randomizes the order of the rows in a range.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) } } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range to randomize. |

## AddDimensionGroupRequest


Creates a group over the specified range.


If the requested range is a superset of the range of an existing group G, then the depth of G is incremented and this new group G' has the depth of that group. For example, a group \[C:D, depth 1\] + \[B:E\] results in groups \[B:E, depth 1\] and \[C:D, depth 2\]. If the requested range is a subset of the range of an existing group G, then the depth of the new group G' becomes one greater than the depth of G. For example, a group \[B:E, depth 1\] + \[C:D\] results in groups \[B:E, depth 1\] and \[C:D, depth 2\]. If the requested range starts before and ends within, or starts within and ends after, the range of an existing group G, then the range of the existing group G becomes the union of the ranges, and the new group G' has depth one greater than the depth of G and range as the intersection of the ranges. For example, a group \[B:D, depth 1\] + \[C:E\] results in groups \[B:E, depth 1\] and \[C:D, depth 2\].

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`) } } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`)`` The range over which to create a group. |

## DeleteDimensionGroupRequest


Deletes a group over the specified range by decrementing the depth of the dimensions in the range.


For example, assume the sheet has a depth-1 group over B:E and a depth-2 group over C:D. Deleting a group over D:E leaves the sheet with a depth-1 group over B:D and a depth-2 group over C:C.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`) } } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`)`` The range of the group to be deleted. |

## UpdateDimensionGroupRequest


Updates the state of the specified group.

| JSON representation |
|---|
| ``` { "dimensionGroup": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#DimensionGroup`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `dimensionGroup` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#DimensionGroup`)`` The group whose state should be updated. The range and depth of the group should specify a valid group on the sheet, and all other fields updated. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `dimensionGroup` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## TrimWhitespaceRequest


Trims the whitespace (such as spaces, tabs, or new lines) in every cell in the specified range. This request removes all whitespace from the start and end of each cell's text, and reduces any subsequence of remaining whitespace characters to a single space. If the resulting trimmed text starts with a '+' or '=' character, the text remains as a string value and isn't interpreted as a formula.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) } } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range whose cells to trim. |

## DeleteDuplicatesRequest


Removes rows within this range that contain values in the specified columns that are duplicates of values in any previous row. Rows with identical values but different letter cases, formatting, or formulas are considered to be duplicates.


This request also removes duplicate rows hidden from view (for example, due to a filter). When removing duplicates, the first instance of each duplicate row scanning from the top downwards is kept in the resulting range. Content outside of the specified range isn't removed, and rows considered duplicates do not have to be adjacent to each other in the range.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`) }, "comparisonColumns": [ { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`) } ] } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridRange`)`` The range to remove duplicates rows from. |
| `comparisonColumns[]` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/DimensionRange`)`` The columns in the range to analyze for duplicate values. If no columns are selected then all columns are analyzed for duplicates. |

## UpdateEmbeddedObjectBorderRequest


Updates an embedded object's border property.

| JSON representation |
|---|
| ``` { "objectId": integer, "border": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/charts#EmbeddedObjectBorder`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `objectId` | `integer` The ID of the embedded object to update. |
| `border` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/charts#EmbeddedObjectBorder`)`` The border that applies to the embedded object. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `border` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## AddSlicerRequest


Adds a slicer to a sheet in the spreadsheet.

| JSON representation |
|---|
| ``` { "slicer": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#Slicer`) } } ``` |

| Fields ||
|---|---|
| `slicer` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#Slicer`)`` The slicer that should be added to the spreadsheet, including the position where it should be placed. The `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#Slicer.FIELDS.slicer_id` field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a slicer that already exists.) |

## UpdateSlicerSpecRequest


Updates a slicer's specifications. (This does not move or resize a slicer. To move or resize a slicer use
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#UpdateEmbeddedObjectPositionRequest`.

| JSON representation |
|---|
| ``` { "slicerId": integer, "spec": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SlicerSpec`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `slicerId` | `integer` The id of the slicer to update. |
| `spec` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SlicerSpec`)`` The specification to apply to the slicer. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `SlicerSpec` is implied and should not be specified. A single "\*"\` can be used as short-hand for listing every field. |

## AddDataSourceRequest


Adds a data source. After the data source is added successfully, an associated
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetType`
sheet is created and an execution is triggered to refresh the sheet to read data from the data source.


The request requires an additional
`bigquery.readonly`
OAuth scope if you are adding a BigQuery data source.

| JSON representation |
|---|
| ``` { "dataSource": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#DataSource`) } } ``` |

| Fields ||
|---|---|
| `dataSource` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#DataSource`)`` The data source to add. |

## UpdateDataSourceRequest


Updates a data source. After the data source is updated successfully, an execution is triggered to refresh the associated
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetType`
sheet to read data from the updated data source.


The request requires an additional
`bigquery.readonly`
OAuth scope if you are updating a BigQuery data source.

| JSON representation |
|---|
| ``` { "dataSource": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#DataSource`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `dataSource` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#DataSource`)`` The data source to update. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `dataSource` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## DeleteDataSourceRequest


Deletes a data source. The request also deletes the associated data source sheet, and unlinks all associated data source objects.

| JSON representation |
|---|
| ``` { "dataSourceId": string } ``` |

| Fields ||
|---|---|
| `dataSourceId` | `string` The ID of the data source to delete. |

## RefreshDataSourceRequest


Refreshes one or multiple data source objects in the spreadsheet by the specified references.


The request requires an additional
`bigquery.readonly`
OAuth scope if you are refreshing a BigQuery data source.


If there are multiple refresh requests referencing the same data source objects in one batch, only the last refresh request is processed, and all those requests will have the same response accordingly.

| JSON representation |
|---|
| ``` { "force": boolean, "references": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DataSourceObjectReferences`) }, "dataSourceId": string, "isAll": boolean } ``` |

| Fields ||
|---|---|
| `force` | `boolean` Refreshes the data source objects regardless of the current state. If not set and a referenced data source object was in error state, the refresh will fail immediately. |
| Specifies what to refresh. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `references` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DataSourceObjectReferences`)`` References to data source objects to refresh. |
| `dataSourceId` | `string` Reference to a `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#DataSource`. If specified, refreshes all associated data source objects for the data source. |
| `isAll` | `boolean` Refreshes all existing data source objects in the spreadsheet. |
| End of mutually exclusive fields. ||

## DataSourceObjectReferences


A list of references to data source objects.

| JSON representation |
|---|
| ``` { "references": [ { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/response#DataSourceObjectReference`) } ] } ``` |

| Fields ||
|---|---|
| `references[]` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/response#DataSourceObjectReference`)`` The references. |

## CancelDataSourceRefreshRequest


Cancels one or multiple refreshes of data source objects in the spreadsheet by the specified references.


The request requires an additional
`bigquery.readonly`
OAuth scope if you are cancelling a refresh on a BigQuery data source.

| JSON representation |
|---|
| ``` { "references": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DataSourceObjectReferences`) }, "dataSourceId": string, "isAll": boolean } ``` |

| Fields ||
|---|---|
| Specifies what to cancel. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `references` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request#DataSourceObjectReferences`)`` References to data source objects whose refreshes are to be cancelled. |
| `dataSourceId` | `string` Reference to a `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#DataSource`. If specified, cancels all associated data source object refreshes for this data source. |
| `isAll` | `boolean` Cancels all existing data source object refreshes for all data sources in the spreadsheet. |
| End of mutually exclusive fields. ||

## AddTableRequest


Adds a new table to the spreadsheet.

| JSON representation |
|---|
| ``` { "table": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#Table`) } } ``` |

| Fields ||
|---|---|
| `table` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#Table`)`` Required. The table to add. |

## UpdateTableRequest


Updates a table in the spreadsheet.

| JSON representation |
|---|
| ``` { "table": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#Table`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `table` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#Table`)`` Required. The table to update. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Required. The fields that should be updated. At least one field must be specified. The root `table` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## DeleteTableRequest


Removes the table with the given ID from the spreadsheet.

| JSON representation |
|---|
| ``` { "tableId": string } ``` |

| Fields ||
|---|---|
| `tableId` | `string` The ID of the table to delete. |

## InsertCommentRequest


Inserts a
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread`
into the spreadsheet.

| JSON representation |
|---|
| ``` { "content": string, "assigneeEmailAddress": string, "coordinate": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridCoordinate`) } } ``` |

| Fields ||
|---|---|
| `content` | `string` The text of the comment, as plain text. This text content will be handled similarly to comments created in the Sheets editor. It will have similar behaviors for formatting, notifications, etc. This field cannot be empty, and must not exceed 2048 UTF-8 code units. |
| `assigneeEmailAddress` | `string` Optional. The email address of the assignee of the comment. Leave empty for a non-assigned comment. May not exceed 2048 UTF-8 code units. |
| The location in the sheet that is tied to this comment. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `coordinate` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridCoordinate`)`` The `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#GridCoordinate` in the sheet that is tied to this comment. |
| End of mutually exclusive fields. ||

## AddCommentReplyRequest


Inserts a reply
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#Post`
into a
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread`.

| JSON representation |
|---|
| ``` { "commentId": string, "post": { object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#Post`) } } ``` |

| Fields ||
|---|---|
| `commentId` | `string` The ID of the `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread` to add the reply to. |
| `post` | ``object (`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#Post`)`` The `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#Post` representing the reply. |

## UpdateCommentPostRequest


Updates a
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#Post`
in a
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread`.


Returns a 400 bad request error if:

- The requesting user is not the author of the post.

| JSON representation |
|---|
| ``` { "commentId": string, "postId": string, "content": string } ``` |

| Fields ||
|---|---|
| `commentId` | `string` The ID of the `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread` which the post belongs to. |
| `postId` | `string` The ID of the post being updated. |
| `content` | `string` The new text of the comment, as plain text. This text content will be handled similarly to comments created in the Sheets editor. It will have similar behaviors for formatting, notifications, etc. This field cannot be empty, and must not exceed 2048 UTF-8 code units. |

## DeleteCommentRequest


Deletes a
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread`.


Returns a 400 bad request error if the requesting user is not the author of the
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread.FIELDS.head_post`.

| JSON representation |
|---|
| ``` { "commentId": string } ``` |

| Fields ||
|---|---|
| `commentId` | `string` The ID of the `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread` that is being deleted. |

## DeleteCommentReplyRequest


Deletes a reply
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#Post`
from a
`https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread`.


Returns a 400 bad request error if:

-
  The requesting user is not the author of the post.

-
  The reply post contains a
  `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#Post.FIELDS.comment_action`.

-
  The reply post contains an
  `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#Post.FIELDS.assignee_email`.

| JSON representation |
|---|
| ``` { "commentId": string, "postId": string } ``` |

| Fields ||
|---|---|
| `commentId` | `string` The ID of the `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#CommentThread` which the post belongs to. |
| `postId` | `string` The ID of the reply `https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets#Post` being deleted. |