Responses
Stay organized with collections
Save and categorize content based on your preferences.
Response
A single response from an update.
Fields
|
Union field
response . The response for the corresponding request. May have no fields set if the request had no response.
response
can be only one of the following:
|
replaceAllText
|
object (ReplaceAllTextResponse )
The result of replacing text.
|
createNamedRange
|
object (CreateNamedRangeResponse )
The result of creating a named range.
|
insertInlineImage
|
object (InsertInlineImageResponse )
The result of inserting an inline image.
|
insertInlineSheetsChart
|
object (InsertInlineSheetsChartResponse )
The result of inserting an inline Google Sheets chart.
|
ReplaceAllTextResponse
The result of replacing text.
JSON representation
|
{
"occurrencesChanged": integer
}
|
Fields
|
occurrencesChanged
|
integer
The number of occurrences changed by replacing all text.
|
CreateNamedRangeResponse
The result of creating a named range.
JSON representation
|
{
"namedRangeId": string
}
|
Fields
|
namedRangeId
|
string
The ID of the created named range.
|
InsertInlineImageResponse
The result of inserting an inline image.
JSON representation
|
{
"objectId": string
}
|
InsertInlineSheetsChartResponse
The result of inserting an embedded Google Sheets chart.
JSON representation
|
{
"objectId": string
}
|
Fields
|
objectId
|
string
The object ID of the inserted chart.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-24 UTC.
[null,null,["Last updated 2025-03-24 UTC."],[],[],null,["# Responses\n\nResponse\n--------\n\n\nA single response from an update.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { // Union field `response` can be only one of the following: \"replaceAllText\": { object (/workspace/docs/api/reference/rest/v1/documents/response#ReplaceAllTextResponse) }, \"createNamedRange\": { object (/workspace/docs/api/reference/rest/v1/documents/response#CreateNamedRangeResponse) }, \"insertInlineImage\": { object (/workspace/docs/api/reference/rest/v1/documents/response#InsertInlineImageResponse) }, \"insertInlineSheetsChart\": { object (/workspace/docs/api/reference/rest/v1/documents/response#InsertInlineSheetsChartResponse) }, \"createHeader\": { object (/workspace/docs/api/reference/rest/v1/documents/response#CreateHeaderResponse) }, \"createFooter\": { object (/workspace/docs/api/reference/rest/v1/documents/response#CreateFooterResponse) }, \"createFootnote\": { object (/workspace/docs/api/reference/rest/v1/documents/response#CreateFootnoteResponse) } // End of list of possible types for union field `response`. } ``` |\n\n| Fields ||\n|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Union field `response`. The response for the corresponding request. May have no fields set if the request had no response. `response` can be only one of the following: ||\n| `replaceAllText` | `object (`[ReplaceAllTextResponse](/workspace/docs/api/reference/rest/v1/documents/response#ReplaceAllTextResponse)`)` The result of replacing text. |\n| `createNamedRange` | `object (`[CreateNamedRangeResponse](/workspace/docs/api/reference/rest/v1/documents/response#CreateNamedRangeResponse)`)` The result of creating a named range. |\n| `insertInlineImage` | `object (`[InsertInlineImageResponse](/workspace/docs/api/reference/rest/v1/documents/response#InsertInlineImageResponse)`)` The result of inserting an inline image. |\n| `insertInlineSheetsChart` | `object (`[InsertInlineSheetsChartResponse](/workspace/docs/api/reference/rest/v1/documents/response#InsertInlineSheetsChartResponse)`)` The result of inserting an inline Google Sheets chart. |\n| `createHeader` | `object (`[CreateHeaderResponse](/workspace/docs/api/reference/rest/v1/documents/response#CreateHeaderResponse)`)` The result of creating a header. |\n| `createFooter` | `object (`[CreateFooterResponse](/workspace/docs/api/reference/rest/v1/documents/response#CreateFooterResponse)`)` The result of creating a footer. |\n| `createFootnote` | `object (`[CreateFootnoteResponse](/workspace/docs/api/reference/rest/v1/documents/response#CreateFootnoteResponse)`)` The result of creating a footnote. |\n\nReplaceAllTextResponse\n----------------------\n\n\nThe result of replacing text.\n\n| JSON representation |\n|-------------------------------------------|\n| ``` { \"occurrencesChanged\": integer } ``` |\n\n| Fields ||\n|----------------------|--------------------------------------------------------------------|\n| `occurrencesChanged` | `integer` The number of occurrences changed by replacing all text. |\n\nCreateNamedRangeResponse\n------------------------\n\n\nThe result of creating a named range.\n\n| JSON representation |\n|------------------------------------|\n| ``` { \"namedRangeId\": string } ``` |\n\n| Fields ||\n|----------------|---------------------------------------------|\n| `namedRangeId` | `string` The ID of the created named range. |\n\nInsertInlineImageResponse\n-------------------------\n\n\nThe result of inserting an inline image.\n\n| JSON representation |\n|--------------------------------|\n| ``` { \"objectId\": string } ``` |\n\n| Fields ||\n|------------|--------------------------------------------------------------------------------------------------------------|\n| `objectId` | `string` The ID of the created [InlineObject](/workspace/docs/api/reference/rest/v1/documents#InlineObject). |\n\nInsertInlineSheetsChartResponse\n-------------------------------\n\n\nThe result of inserting an embedded Google Sheets chart.\n\n| JSON representation |\n|--------------------------------|\n| ``` { \"objectId\": string } ``` |\n\n| Fields ||\n|------------|-----------------------------------------------|\n| `objectId` | `string` The object ID of the inserted chart. |\n\nCreateHeaderResponse\n--------------------\n\n\nThe result of creating a header.\n\n| JSON representation |\n|--------------------------------|\n| ``` { \"headerId\": string } ``` |\n\n| Fields ||\n|------------|----------------------------------------|\n| `headerId` | `string` The ID of the created header. |\n\nCreateFooterResponse\n--------------------\n\n\nThe result of creating a footer.\n\n| JSON representation |\n|--------------------------------|\n| ``` { \"footerId\": string } ``` |\n\n| Fields ||\n|------------|----------------------------------------|\n| `footerId` | `string` The ID of the created footer. |\n\nCreateFootnoteResponse\n----------------------\n\n\nThe result of creating a footnote.\n\n| JSON representation |\n|----------------------------------|\n| ``` { \"footnoteId\": string } ``` |\n\n| Fields ||\n|--------------|------------------------------------------|\n| `footnoteId` | `string` The ID of the created footnote. |"]]