Requests

Request

A single kind of update to apply to a presentation.

JSON representation
{

  // Union field kind can be only one of the following:
  "createSlide": {
    object(CreateSlideRequest)
  },
  "createShape": {
    object(CreateShapeRequest)
  },
  "createTable": {
    object(CreateTableRequest)
  },
  "insertText": {
    object(InsertTextRequest)
  },
  "insertTableRows": {
    object(InsertTableRowsRequest)
  },
  "insertTableColumns": {
    object(InsertTableColumnsRequest)
  },
  "deleteTableRow": {
    object(DeleteTableRowRequest)
  },
  "deleteTableColumn": {
    object(DeleteTableColumnRequest)
  },
  "replaceAllText": {
    object(ReplaceAllTextRequest)
  },
  "deleteObject": {
    object(DeleteObjectRequest)
  },
  "updatePageElementTransform": {
    object(UpdatePageElementTransformRequest)
  },
  "updateSlidesPosition": {
    object(UpdateSlidesPositionRequest)
  },
  "deleteText": {
    object(DeleteTextRequest)
  },
  "createImage": {
    object(CreateImageRequest)
  },
  "createVideo": {
    object(CreateVideoRequest)
  },
  "createSheetsChart": {
    object(CreateSheetsChartRequest)
  },
  "createLine": {
    object(CreateLineRequest)
  },
  "refreshSheetsChart": {
    object(RefreshSheetsChartRequest)
  },
  "updateShapeProperties": {
    object(UpdateShapePropertiesRequest)
  },
  "updateImageProperties": {
    object(UpdateImagePropertiesRequest)
  },
  "updateVideoProperties": {
    object(UpdateVideoPropertiesRequest)
  },
  "updatePageProperties": {
    object(UpdatePagePropertiesRequest)
  },
  "updateTableCellProperties": {
    object(UpdateTableCellPropertiesRequest)
  },
  "updateLineProperties": {
    object(UpdateLinePropertiesRequest)
  },
  "createParagraphBullets": {
    object(CreateParagraphBulletsRequest)
  },
  "replaceAllShapesWithImage": {
    object(ReplaceAllShapesWithImageRequest)
  },
  "duplicateObject": {
    object(DuplicateObjectRequest)
  },
  "updateTextStyle": {
    object(UpdateTextStyleRequest)
  },
  "replaceAllShapesWithSheetsChart": {
    object(ReplaceAllShapesWithSheetsChartRequest)
  },
  "deleteParagraphBullets": {
    object(DeleteParagraphBulletsRequest)
  },
  "updateParagraphStyle": {
    object(UpdateParagraphStyleRequest)
  },
  // End of list of possible types for union field kind.
}
Fields
Union field kind . The kind of update. Exactly one field is required. kind can be only one of the following:
createSlide

object( CreateSlideRequest )

Creates a new slide.

createShape

object( CreateShapeRequest )

Creates a new shape.

createTable

object( CreateTableRequest )

Creates a new table.

insertText

object( InsertTextRequest )

Inserts text into a shape or table cell.

insertTableRows

object( InsertTableRowsRequest )

Inserts rows into a table.

insertTableColumns

object( InsertTableColumnsRequest )

Inserts columns into a table.

deleteTableRow

object( DeleteTableRowRequest )

Deletes a row from a table.

deleteTableColumn

object( DeleteTableColumnRequest )

Deletes a column from a table.

replaceAllText

object( ReplaceAllTextRequest )

Replaces all instances of specified text.

deleteObject

object( DeleteObjectRequest )

Deletes a page or page element from the presentation.

updatePageElementTransform

object( UpdatePageElementTransformRequest )

Updates the transform of a page element.

updateSlidesPosition

object( UpdateSlidesPositionRequest )

Updates the position of a set of slides in the presentation.

deleteText

object( DeleteTextRequest )

Deletes text from a shape or a table cell.

createImage

object( CreateImageRequest )

Creates an image.

createVideo

object( CreateVideoRequest )

Creates a video.

createSheetsChart

object( CreateSheetsChartRequest )

Creates an embedded Google Sheets chart.

createLine

object( CreateLineRequest )

Creates a line.

refreshSheetsChart

object( RefreshSheetsChartRequest )

Refreshes a Google Sheets chart.

updateShapeProperties

object( UpdateShapePropertiesRequest )

Updates the properties of a Shape .

updateImageProperties

object( UpdateImagePropertiesRequest )

Updates the properties of an Image .

updateVideoProperties

object( UpdateVideoPropertiesRequest )

Updates the properties of a Video .

updatePageProperties

object( UpdatePagePropertiesRequest )

Updates the properties of a Page .

updateTableCellProperties

object( UpdateTableCellPropertiesRequest )

Updates the properties of a TableCell .

updateLineProperties

object( UpdateLinePropertiesRequest )

Updates the properties of a Line .

createParagraphBullets

object( CreateParagraphBulletsRequest )

Creates bullets for paragraphs.

replaceAllShapesWithImage

object( ReplaceAllShapesWithImageRequest )

Replaces all shapes matching some criteria with an image.

duplicateObject

object( DuplicateObjectRequest )

Duplicates a slide or page element.

updateTextStyle

object( UpdateTextStyleRequest )

Updates the styling of text within a Shape or Table .

replaceAllShapesWithSheetsChart

object( ReplaceAllShapesWithSheetsChartRequest )

Replaces all shapes matching some criteria with a Google Sheets chart.

deleteParagraphBullets

object( DeleteParagraphBulletsRequest )

Deletes bullets from paragraphs.

updateParagraphStyle

object( UpdateParagraphStyleRequest )

Updates the styling of paragraphs within a Shape or Table .

CreateSlideRequest

Creates a new slide.

JSON representation
{
  "objectId": string,
  "insertionIndex": number,
  "slideLayoutReference": {
    object(LayoutReference)
  },
  "placeholderIdMappings": [
    {
      object(LayoutPlaceholderIdMapping)
    }
  ],
}
Fields
objectId

string

A user-supplied object ID.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_] ); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:] ). The length of the ID must not be less than 5 or greater than 50.

If you don't specify an ID, a unique one is generated.

insertionIndex

number

The optional zero-based index indicating where to insert the slides.

If you don't specify an index, the new slide is created at the end.

slideLayoutReference

object( LayoutReference )

Layout reference of the slide to be inserted, based on the current master , which is one of the following:

  • The master of the previous slide index.
  • The master of the first slide, if the insertionIndex is zero.
  • The first master in the presentation, if there are no slides.

If the LayoutReference is not found in the current master, a 400 bad request error is returned.

If you don't specify a layout reference, then the new slide will use the predefined layout BLANK .

placeholderIdMappings[]

object( LayoutPlaceholderIdMapping )

An optional list of object ID mappings from the placeholder (s) on the layout to the placeholder(s) that will be created on the new slide from that specified layout. Can only be used when slideLayoutReference is specified.

LayoutReference

Slide layout reference. This may reference either:

  • A predefined layout
  • One of the layouts in the presentation.
JSON representation
{

  // Union field kind can be only one of the following:
  "predefinedLayout": enum(PredefinedLayout),
  "layoutId": string,
  // End of list of possible types for union field kind.
}
Fields
Union field kind . The kind of LayoutReference. kind can be only one of the following:
predefinedLayout

enum( PredefinedLayout )

Predefined layout.

layoutId

string

Layout ID: the object ID of one of the layouts in the presentation.

PredefinedLayout

Predefined layout types. These are commonly found layouts in presentations. However, there is no guarantee that these layouts are present in the current master as they could have been deleted or not part of the used theme. Additionally, the placeholders on each layout may have been changed.

Enums
PREDEFINED_LAYOUT_UNSPECIFIED Unspecified layout.
BLANK Blank layout, with no placeholders.
CAPTION_ONLY Layout with a caption at the bottom.
TITLE Layout with a title and a subtitle.
TITLE_AND_BODY Layout with a title and body.
TITLE_AND_TWO_COLUMNS Layout with a title and two columns.
TITLE_ONLY Layout with only a title.
SECTION_HEADER Layout with a section title.
SECTION_TITLE_AND_DESCRIPTION Layout with a title and subtitle on one side and description on the other.
ONE_COLUMN_TEXT Layout with one title and one body, arranged in a single column.
MAIN_POINT Layout with a main point.
BIG_NUMBER Layout with a big number heading.

LayoutPlaceholderIdMapping

The user-specified ID mapping for a placeholder that will be created on a slide from a specified layout.

JSON representation
{
  "objectId": string,

  // Union field kind can be only one of the following:
  "layoutPlaceholder": {
    object(Placeholder)
  },
  "layoutPlaceholderObjectId": string,
  // End of list of possible types for union field kind.
}
Fields
objectId

string

A user-supplied object ID for the placeholder identified above that to be created onto a slide.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_] ); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:] ). The length of the ID must not be less than 5 or greater than 50.

If you don't specify an ID, a unique one is generated.

Union field kind . The kind to identify a placeholder on a layout. kind can be only one of the following:
layoutPlaceholder

object( Placeholder )

The placeholder on a layout that will be applied to a slide. Only type and index are needed. For example, a predefined TITLE_AND_BODY layout may usually have a TITLE placeholder with index 0 and a BODY placeholder with index 0.

layoutPlaceholderObjectId

string

The object ID of the placeholder on a layout that will be applied to a slide.

CreateShapeRequest

Creates a new shape.

JSON representation
{
  "objectId": string,
  "elementProperties": {
    object(PageElementProperties)
  },
  "shapeType": enum(Type),
}
Fields
objectId

string

A user-supplied object ID.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_] ); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:] ). The length of the ID must not be less than 5 or greater than 50. If empty, a unique identifier will be generated.

elementProperties

object( PageElementProperties )

The element properties for the shape.

shapeType

enum( Type )

The shape type.

PageElementProperties

Common properties for a page element.

Note: When you initially create a PageElement , the API may modify the values of both size and transform , but the visual size will be unchanged.

JSON representation
{
  "pageObjectId": string,
  "size": {
    object(Size)
  },
  "transform": {
    object(AffineTransform)
  },
}
Fields
pageObjectId

string

The object ID of the page where the element is located.

size

object( Size )

The size of the element.

transform

object( AffineTransform )

The transform for the element.

CreateTableRequest

Creates a new table.

JSON representation
{
  "objectId": string,
  "elementProperties": {
    object(PageElementProperties)
  },
  "rows": number,
  "columns": number,
}
Fields
objectId

string

A user-supplied object ID.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_] ); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:] ). The length of the ID must not be less than 5 or greater than 50.

If you don't specify an ID, a unique one is generated.

elementProperties

object( PageElementProperties )

The element properties for the table.

The table will be created at the provided size, subject to a minimum size. If no size is provided, the table will be automatically sized.

Table transforms must have a scale of 1 and no shear components. If no transform is provided, the table will be centered on the page.

rows

number

Number of rows in the table.

columns

number

Number of columns in the table.

InsertTextRequest

Inserts text into a shape or a table cell.

JSON representation
{
  "objectId": string,
  "cellLocation": {
    object(TableCellLocation)
  },
  "text": string,
  "insertionIndex": number,
}
Fields
objectId

string

The object ID of the shape or table where the text will be inserted.

cellLocation

object( TableCellLocation )

The optional table cell location if the text is to be inserted into a table cell. If present, the objectId must refer to a table.

text

string

The text to be inserted.

Inserting a newline character will implicitly create a new ParagraphMarker at that index. The paragraph style of the new paragraph will be copied from the paragraph at the current insertion index, including lists and bullets.

Text styles for inserted text will be determined automatically, generally preserving the styling of neighboring text. In most cases, the text will be added to the TextRun that exists at the insertion index.

Some control characters (U+0000-U+0008, U+000C-U+001F) and characters from the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF) will be stripped out of the inserted text.

insertionIndex

number

The index where the text will be inserted, in Unicode code units, based on TextElement indexes.

The index is zero-based and is computed from the start of the string. The index may be adjusted to prevent insertions inside Unicode grapheme clusters. In these cases, the text will be inserted immediately after the grapheme cluster.

InsertTableRowsRequest

Inserts rows into a table.

JSON representation
{
  "tableObjectId": string,
  "cellLocation": {
    object(TableCellLocation)
  },
  "insertBelow": boolean,
  "number": number,
}
Fields
tableObjectId

string

The table to insert rows into.

cellLocation

object( TableCellLocation )

The reference table cell location from which rows will be inserted.

A new row will be inserted above (or below) the row where the reference cell is. If the reference cell is a merged cell, a new row will be inserted above (or below) the merged cell.

insertBelow

boolean

Whether to insert new rows below the reference cell location.

  • True : insert below the cell.
  • False : insert above the cell.

number

number

The number of rows to be inserted. Maximum 20 per request.

InsertTableColumnsRequest

Inserts columns into a table.

Other columns in the table will be resized to fit the new column.

JSON representation
{
  "tableObjectId": string,
  "cellLocation": {
    object(TableCellLocation)
  },
  "insertRight": boolean,
  "number": number,
}
Fields
tableObjectId

string

The table to insert columns into.

cellLocation

object( TableCellLocation )

The reference table cell location from which columns will be inserted.

A new column will be inserted to the left (or right) of the column where the reference cell is. If the reference cell is a merged cell, a new column will be inserted to the left (or right) of the merged cell.

insertRight

boolean

Whether to insert new columns to the right of the reference cell location.

  • True : insert to the right.
  • False : insert to the left.

number

number

The number of columns to be inserted. Maximum 20 per request.

DeleteTableRowRequest

Deletes a row from a table.

JSON representation
{
  "tableObjectId": string,
  "cellLocation": {
    object(TableCellLocation)
  },
}
Fields
tableObjectId

string

The table to delete rows from.

cellLocation

object( TableCellLocation )

The reference table cell location from which a row will be deleted.

The row this cell spans will be deleted. If this is a merged cell, multiple rows will be deleted. If no rows remain in the table after this deletion, the whole table is deleted.

DeleteTableColumnRequest

Deletes a column from a table.

JSON representation
{
  "tableObjectId": string,
  "cellLocation": {
    object(TableCellLocation)
  },
}
Fields
tableObjectId

string

The table to delete columns from.

cellLocation

object( TableCellLocation )

The reference table cell location from which a column will be deleted.

The column this cell spans will be deleted. If this is a merged cell, multiple columns will be deleted. If no columns remain in the table after this deletion, the whole table is deleted.

ReplaceAllTextRequest

Replaces all instances of text matching a criteria with replace text .

JSON representation
{
  "replaceText": string,
  "containsText": {
    object(SubstringMatchCriteria)
  },
}
Fields
replaceText

string

The text that will replace the matched text.

containsText

object( SubstringMatchCriteria )

Finds text in a shape matching this substring.

SubstringMatchCriteria

A criteria that matches a specific string of text in a shape or table.

JSON representation
{
  "text": string,
  "matchCase": boolean,
}
Fields
text

string

The text to search for in the shape or table.

matchCase

boolean

Indicates whether the search should respect case:

  • True : the search is case sensitive.
  • False : the search is case insensitive.

DeleteObjectRequest

Deletes an object, either pages or page elements , from the presentation.

JSON representation
{
  "objectId": string,
}
Fields
objectId

string

The object ID of the page or page element to delete.

If after a delete operation a group contains only 1 or no page elements, the group is also deleted.

If a placeholder is deleted on a layout, any empty inheriting shapes are also deleted.

UpdatePageElementTransformRequest

Updates the transform of a page element.

JSON representation
{
  "objectId": string,
  "transform": {
    object(AffineTransform)
  },
  "applyMode": enum(ApplyMode),
}
Fields
objectId

string

The object ID of the page element to update.

transform

object( AffineTransform )

The input transform matrix used to update the page element.

applyMode

enum( ApplyMode )

The apply mode of the transform update.

ApplyMode

The apply modes of the transform update.

Enums
APPLY_MODE_UNSPECIFIED Unspecified mode.
RELATIVE Applies the new AffineTransform matrix to the existing one, and replaces the existing one with the resulting concatenation.
ABSOLUTE Replaces the existing AffineTransform matrix with the new one.

UpdateSlidesPositionRequest

Updates the position of slides in the presentation.

JSON representation
{
  "slideObjectIds": [
    string
  ],
  "insertionIndex": number,
}
Fields
slideObjectIds[]

string

The IDs of the slides in the presentation that should be moved. The slides in this list must be in existing presentation order, without duplicates.

insertionIndex

number

The index where the slides should be inserted, based on the slide arrangement before the move takes place. Must be between zero and the number of slides in the presentation, inclusive.

DeleteTextRequest

Deletes text from a shape or a table cell.

JSON representation
{
  "objectId": string,
  "cellLocation": {
    object(TableCellLocation)
  },
  "textRange": {
    object(Range)
  },
}
Fields
objectId

string

The object ID of the shape or table from which the text will be deleted.

cellLocation

object( TableCellLocation )

The optional table cell location if the text is to be deleted from a table cell. If present, the objectId must refer to a table.

textRange

object( Range )

The range of text to delete, based on TextElement indexes.

There is always an implicit newline character at the end of a shape's or table cell's text that cannot be deleted. Range.Type.ALL will use the correct bounds, but care must be taken when specifying explicit bounds for range types FROM_START_INDEX and FIXED_RANGE . For example, if the text is "ABC", followed by an implicit newline, then the maximum value is 2 for textRange.start_index and 3 for textRange.end_index .

Deleting text that crosses a paragraph boundary may result in changes to paragraph styles and lists as the two paragraphs are merged.

Ranges that include only one code unit of a surrogate pair are expanded to include both code units.

Range

Specifies a contiguous range of an indexed collection, such as characters in text.

JSON representation
{
  "startIndex": number,
  "endIndex": number,
  "type": enum(Type),
}
Fields
startIndex

number

The optional zero-based index of the beginning of the collection. Required for SPECIFIC_RANGE and FROM_START_INDEX ranges.

endIndex

number

The optional zero-based index of the end of the collection. Required for SPECIFIC_RANGE delete mode.

type

enum( Type )

The type of range.

Type

The types of ranges.

Enums
RANGE_TYPE_UNSPECIFIED Unspecified range type. This value must not be used.
FIXED_RANGE A fixed range. Both the startIndex and endIndex must be specified.
FROM_START_INDEX Starts the range at startIndex and continues until the end of the collection. The endIndex must not be specified.
ALL Sets the range to be the whole length of the collection. Both the startIndex and the endIndex must not be specified.

CreateImageRequest

Creates an image.

JSON representation
{
  "objectId": string,
  "elementProperties": {
    object(PageElementProperties)
  },
  "url": string,
}
Fields
objectId

string

A user-supplied object ID.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_] ); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:] ). The length of the ID must not be less than 5 or greater than 50.

If you don't specify an ID, a unique one is generated.

elementProperties

object( PageElementProperties )

The element properties for the image.

When the aspect ratio of the provided size does not match the image aspect ratio, the image is scaled and centered with respect to the size in order to maintain aspect ratio. The provided transform is applied after this operation.

url

string

The image URL.

The image is fetched once at insertion time and a copy is stored for display inside the presentation. Images must be less than 50MB in size, cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF format.

CreateVideoRequest

Creates a video.

JSON representation
{
  "objectId": string,
  "elementProperties": {
    object(PageElementProperties)
  },
  "source": enum(Source),
  "id": string,
}
Fields
objectId

string

A user-supplied object ID.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_] ); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:] ). The length of the ID must not be less than 5 or greater than 50.

If you don't specify an ID, a unique one is generated.

elementProperties

object( PageElementProperties )

The element properties for the video.

source

enum( Source )

The video source.

id

string

The video source's unique identifier for this video.

e.g. For YouTube video https://www.youtube.com/watch?v=7U3axjORYZ0 , the ID is 7U3axjORYZ0.

CreateSheetsChartRequest

Creates an embedded Google Sheets chart.

NOTE: Chart creation requires at least one of the spreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes.

JSON representation
{
  "objectId": string,
  "elementProperties": {
    object(PageElementProperties)
  },
  "spreadsheetId": string,
  "chartId": number,
  "linkingMode": enum(LinkingMode),
}
Fields
objectId

string

A user-supplied object ID.

If specified, the ID must be unique among all pages and page elements in the presentation. The ID should start with a word character [a-zA-Z0-9_] and then followed by any number of the following characters [a-zA-Z0-9_-:]. The length of the ID should not be less than 5 or greater than 50. If empty, a unique identifier will be generated.

elementProperties

object( PageElementProperties )

The element properties for the chart.

When the aspect ratio of the provided size does not match the chart aspect ratio, the chart is scaled and centered with respect to the size in order to maintain aspect ratio. The provided transform is applied after this operation.

spreadsheetId

string

The ID of the Google Sheets spreadsheet that contains the chart.

chartId

number

The ID of the specific chart in the Google Sheets spreadsheet.

linkingMode

enum( LinkingMode )

The mode with which the chart is linked to the source spreadsheet. When not specified, the chart will be an image that is not linked.

LinkingMode

The mode with which the chart is linked to the source spreadsheet.

Enums
NOT_LINKED_IMAGE The chart is not associated with the source spreadsheet and cannot be updated. A chart that is not linked will be inserted as an image.
LINKED Linking the chart allows it to be updated, and other collaborators will see a link to the spreadsheet.

CreateLineRequest

Creates a line.

JSON representation
{
  "objectId": string,
  "elementProperties": {
    object(PageElementProperties)
  },
  "lineCategory": enum(Category),
}
Fields
objectId

string

A user-supplied object ID.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_] ); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:] ). The length of the ID must not be less than 5 or greater than 50.

If you don't specify an ID, a unique one is generated.

elementProperties

object( PageElementProperties )

The element properties for the line.

lineCategory

enum( Category )

The category of line to be created.

Category

The line categories.

The exact line type created is determined based on the category and how it's routed to connect to other page elements.

Enums
STRAIGHT Straight connectors, including straight connector 1. The is the default category when one is not specified.
BENT Bent connectors, including bent connector 2 to 5.
CURVED Curved connectors, including curved connector 2 to 5.

RefreshSheetsChartRequest

Refreshes an embedded Google Sheets chart by replacing it with the latest version of the chart from Google Sheets.

NOTE: Refreshing charts requires at least one of the spreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes.

JSON representation
{
  "objectId": string,
}
Fields
objectId

string

The object ID of the chart to refresh.

UpdateShapePropertiesRequest

Update the properties of a Shape .

JSON representation
{
  "objectId": string,
  "shapeProperties": {
    object(ShapeProperties)
  },
  "fields": string,
}
Fields
objectId

string

The object ID of the shape the updates are applied to.

shapeProperties

object( ShapeProperties )

The shape properties to update.

fields

string ( FieldMask format)

The fields that should be updated.

At least one field must be specified. The root shapeProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the shape background solid fill color, set fields to "shapeBackgroundFill.solidFill.color" .

To reset a property to its default value, include its field name in the field mask but leave the field itself unset.

UpdateImagePropertiesRequest

Update the properties of an Image .

JSON representation
{
  "objectId": string,
  "imageProperties": {
    object(ImageProperties)
  },
  "fields": string,
}
Fields
objectId

string

The object ID of the image the updates are applied to.

imageProperties

object( ImageProperties )

The image properties to update.

fields

string ( FieldMask format)

The fields that should be updated.

At least one field must be specified. The root imageProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the image outline color, set fields to "outline.outlineFill.solidFill.color" .

To reset a property to its default value, include its field name in the field mask but leave the field itself unset.

UpdateVideoPropertiesRequest

Update the properties of a Video .

JSON representation
{
  "objectId": string,
  "videoProperties": {
    object(VideoProperties)
  },
  "fields": string,
}
Fields
objectId

string

The object ID of the video the updates are applied to.

videoProperties

object( VideoProperties )

The video properties to update.

fields

string ( FieldMask format)

The fields that should be updated.

At least one field must be specified. The root videoProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the video outline color, set fields to "outline.outlineFill.solidFill.color" .

To reset a property to its default value, include its field name in the field mask but leave the field itself unset.

UpdatePagePropertiesRequest

Updates the properties of a Page .

JSON representation
{
  "objectId": string,
  "pageProperties": {
    object(PageProperties)
  },
  "fields": string,
}
Fields
objectId

string

The object ID of the page the update is applied to.

pageProperties

object( PageProperties )

The page properties to update.

fields

string ( FieldMask format)

The fields that should be updated.

At least one field must be specified. The root pageProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the page background solid fill color, set fields to "pageBackgroundFill.solidFill.color" .

To reset a property to its default value, include its field name in the field mask but leave the field itself unset.

UpdateTableCellPropertiesRequest

Update the properties of a TableCell .

JSON representation
{
  "objectId": string,
  "tableRange": {
    object(TableRange)
  },
  "tableCellProperties": {
    object(TableCellProperties)
  },
  "fields": string,
}
Fields
objectId

string

The object ID of the table.

tableRange

object( TableRange )

The table range representing the subset of the table to which the updates are applied. If a table range is not specified, the updates will apply to the entire table.

tableCellProperties

object( TableCellProperties )

The table cell properties to update.

fields

string ( FieldMask format)

The fields that should be updated.

At least one field must be specified. The root tableCellProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the table cell background solid fill color, set fields to "tableCellBackgroundFill.solidFill.color" .

To reset a property to its default value, include its field name in the field mask but leave the field itself unset.

TableRange

A table range represents a reference to a subset of a table.

It's important to note that the cells specified by a table range do not necessarily form a rectangle. For example, let's say we have a 3 x 3 table where all the cells of the last row are merged together. The table looks like this:

[ ][ ][ ] [ ][ ][ ] [ ]

A table range with location = (0, 0), row span = 3 and column span = 2 specifies the following cells:

[ x ][ x ][ ] [ x ][ x ][ ] [ x ]

JSON representation
{
  "location": {
    object(TableCellLocation)
  },
  "rowSpan": number,
  "columnSpan": number,
}
Fields
location

object( TableCellLocation )

The starting location of the table range.

rowSpan

number

The row span of the table range.

columnSpan

number

The column span of the table range.

UpdateLinePropertiesRequest

Updates the properties of a Line .

JSON representation
{
  "objectId": string,
  "lineProperties": {
    object(LineProperties)
  },
  "fields": string,
}
Fields
objectId

string

The object ID of the line the update is applied to.

lineProperties

object( LineProperties )

The line properties to update.

fields

string ( FieldMask format)

The fields that should be updated.

At least one field must be specified. The root lineProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the line solid fill color, set fields to "lineFill.solidFill.color" .

To reset a property to its default value, include its field name in the field mask but leave the field itself unset.

CreateParagraphBulletsRequest

Creates bullets for all of the paragraphs that overlap with the given text index range.

The nesting level of each paragraph will be determined by counting leading tabs in front of each paragraph. To avoid excess space between the bullet and the corresponding paragraph, these leading tabs are removed by this request. This may change the indices of parts of the text.

If the paragraph immediately before paragraphs being updated is in a list with a matching preset, the paragraphs being updated are added to that preceding list.

JSON representation
{
  "objectId": string,
  "cellLocation": {
    object(TableCellLocation)
  },
  "textRange": {
    object(Range)
  },
  "bulletPreset": enum(BulletGlyphPreset),
}
Fields
objectId

string

The object ID of the shape or table containing the text to add bullets to.

cellLocation

object( TableCellLocation )

The optional table cell location if the text to be modified is in a table cell. If present, the objectId must refer to a table.

textRange

object( Range )

The range of text to apply the bullet presets to, based on TextElement indexes.

bulletPreset

enum( BulletGlyphPreset )

The kinds of bullet glyphs to be used. Defaults to the BULLET_DISC_CIRCLE_SQUARE preset.

BulletGlyphPreset

Preset patterns of bullet glyphs for lists in text.

These patterns use these kinds of bullets:

  • ARROW : An arrow, corresponding to a Unicode U+2794 code point
  • ARROW3D : An arrow with 3D shading, corresponding to a Unicode U+27a2 code point
  • CHECKBOX : A hollow square, corresponding to a Unicode U+2713 code point
  • CIRCLE : A hollow circle, corresponding to a Unicode U+25cb code point
  • DIAMOND : A solid diamond, corresponding to a Unicode U+25c6 code point
  • DIAMONDX : A diamond with an 'x', corresponding to a Unicode U+2756 code point
  • HOLLOWDIAMOND : A hollow diamond, corresponding to a Unicode U+25c7 code point
  • DISC : A solid circle, corresponding to a Unicode U+25cf code point
  • SQUARE : A solid square, corresponding to a Unicode U+25a0 code point
  • STAR : A star, corresponding to a Unicode U+2605 code point
  • ALPHA : A lowercase letter, like 'a', 'b', or 'c'.
  • UPPERALPHA : An uppercase letter, like 'A', 'B', or 'C'.
  • DIGIT : A number, like '1', '2', or '3'.
  • ZERODIGIT : A number where single digit numbers are prefixed with a zero, like '01', '02', or '03'. Numbers with more than one digit are not prefixed a zero.
  • ROMAN : A lowercase roman numeral, like 'i', 'ii', or 'iii'.
  • UPPERROMAN : A uppercase roman numeral, like 'I', 'II', or 'III'.
  • LEFTTRIANGLE : A triangle pointing left, corresponding to a Unicode U+24c4 code point
Enums
BULLET_DISC_CIRCLE_SQUARE A bulleted list with a DISC , CIRCLE and SQUARE bullet glyph for the first 3 list nesting levels.
BULLET_DIAMONDX_ARROW3D_SQUARE A bulleted list with a DIAMONDX , ARROW3D and SQUARE bullet glyph for the first 3 list nesting levels.
BULLET_CHECKBOX A bulleted list with CHECKBOX bullet glyphs for all list nesting levels.
BULLET_ARROW_DIAMOND_DISC A bulleted list with a ARROW , DIAMOND and DISC bullet glyph for the first 3 list nesting levels.
BULLET_STAR_CIRCLE_SQUARE A bulleted list with a STAR , CIRCLE and DISC bullet glyph for the first 3 list nesting levels.
BULLET_ARROW3D_CIRCLE_SQUARE A bulleted list with a ARROW3D , CIRCLE and SQUARE bullet glyph for the first 3 list nesting levels.
BULLET_LEFTTRIANGLE_DIAMOND_DISC A bulleted list with a LEFTTRIANGLE , DIAMOND and DISC bullet glyph for the first 3 list nesting levels.
BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE A bulleted list with a DIAMONDX , HOLLOWDIAMOND and SQUARE bullet glyph for the first 3 list nesting levels.
BULLET_DIAMOND_CIRCLE_SQUARE A bulleted list with a DIAMOND , CIRCLE and SQUARE bullet glyph for the first 3 list nesting levels.
NUMBERED_DIGIT_ALPHA_ROMAN A numbered list with DIGIT , ALPHA and ROMAN numeric glyphs for the first 3 list nesting levels, followed by periods.
NUMBERED_DIGIT_ALPHA_ROMAN_PARENS A numbered list with DIGIT , ALPHA and ROMAN numeric glyphs for the first 3 list nesting levels, followed by parenthesis.
NUMBERED_DIGIT_NESTED A numbered list with DIGIT numeric glyphs separated by periods, where each nesting level uses the previous nesting level's glyph as a prefix. For example: '1.', '1.1.', '2.', '2.2.'.
NUMBERED_UPPERALPHA_ALPHA_ROMAN A numbered list with UPPERALPHA , ALPHA and ROMAN numeric glyphs for the first 3 list nesting levels, followed by periods.
NUMBERED_UPPERROMAN_UPPERALPHA_DIGIT A numbered list with UPPERROMAN , UPPERALPHA and DIGIT numeric glyphs for the first 3 list nesting levels, followed by periods.
NUMBERED_ZERODIGIT_ALPHA_ROMAN A numbered list with ZERODIGIT , ALPHA and ROMAN numeric glyphs for the first 3 list nesting levels, followed by periods.

ReplaceAllShapesWithImageRequest

Replaces all shapes that match the given criteria with the provided image.

JSON representation
{
  "imageUrl": string,
  "replaceMethod": enum(ReplaceMethod),
  "containsText": {
    object(SubstringMatchCriteria)
  },
}
Fields
imageUrl

string

The image URL.

The image is fetched once at insertion time and a copy is stored for display inside the presentation. Images must be less than 50MB in size, cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF format.

replaceMethod

enum( ReplaceMethod )

The replace method.

containsText

object( SubstringMatchCriteria )

If set, this request will replace all of the shapes that contain the given text.

ReplaceMethod

The replace method.

Enums
CENTER_INSIDE Scales and centers the image to fit within the bounds of the original shape and maintains the image's aspect ratio. The rendered size of the image may be smaller than the size of the shape. This is the default method when one is not specified.
CENTER_CROP Scales and centers the image to fill the bounds of the original shape. The image may be cropped in order to fill the shape. The rendered size of the image will be the same as that of the original shape.

DuplicateObjectRequest

Duplicates a slide or page element.

When duplicating a slide, the duplicate slide will be created immediately following the specified slide. When duplicating a page element, the duplicate will be placed on the same page at the same position as the original.

JSON representation
{
  "objectId": string,
  "objectIds": {
    string: string,
    ...
  },
}
Fields
objectId

string

The ID of the object to duplicate.

objectIds

map (key: string, value: string)

The object being duplicated may contain other objects, for example when duplicating a slide or a group page element. This map defines how the IDs of duplicated objects are generated: the keys are the IDs of the original objects and its values are the IDs that will be assigned to the corresponding duplicate object. The ID of the source object's duplicate may be specified in this map as well, using the same value of the objectId field as a key and the newly desired ID as the value.

All keys must correspond to existing IDs in the presentation. All values must be unique in the presentation and must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_] ); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:] ). The length of the new ID must not be less than 5 or greater than 50.

If any IDs of source objects are omitted from the map, a new random ID will be assigned. If the map is empty or unset, all duplicate objects will receive a new random ID.

UpdateTextStyleRequest

Update the styling of text in a Shape or Table .

JSON representation
{
  "objectId": string,
  "cellLocation": {
    object(TableCellLocation)
  },
  "style": {
    object(TextStyle)
  },
  "textRange": {
    object(Range)
  },
  "fields": string,
}
Fields
objectId

string

The object ID of the shape or table with the text to be styled.

cellLocation

object( TableCellLocation )

The location of the cell in the table containing the text to style. If objectId refers to a table, cellLocation must have a value. Otherwise, it must not.

style

object( TextStyle )

The style(s) to set on the text.

If the value for a particular style matches that of the parent, that style will be set to inherit.

Certain text style changes may cause other changes meant to mirror the behavior of the Slides editor. See the documentation of TextStyle for more information.

textRange

object( Range )

The range of text to style.

The range may be extended to include adjacent newlines.

If the range fully contains a paragraph belonging to a list, the paragraph's bullet is also updated with the matching text style.

fields

string ( FieldMask format)

The fields that should be updated.

At least one field must be specified. The root style is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example, to update the text style to bold, set fields to "bold" .

To reset a property to its default value, include its field name in the field mask but leave the field itself unset.

ReplaceAllShapesWithSheetsChartRequest

Replaces all shapes that match the given criteria with the provided Google Sheets chart. The chart will be scaled and centered to fit within the bounds of the original shape.

NOTE: Replacing shapes with a chart requires at least one of the spreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes.

JSON representation
{
  "containsText": {
    object(SubstringMatchCriteria)
  },
  "spreadsheetId": string,
  "chartId": number,
  "linkingMode": enum(LinkingMode),
}
Fields
containsText

object( SubstringMatchCriteria )

The criteria that the shapes must match in order to be replaced. The request will replace all of the shapes that contain the given text.

spreadsheetId

string

The ID of the Google Sheets spreadsheet that contains the chart.

chartId

number

The ID of the specific chart in the Google Sheets spreadsheet.

linkingMode

enum( LinkingMode )

The mode with which the chart is linked to the source spreadsheet. When not specified, the chart will be an image that is not linked.

LinkingMode

The mode with which the chart is linked to the source spreadsheet.

Enums
NOT_LINKED_IMAGE The chart is not associated with the source spreadsheet and cannot be updated. A chart that is not linked will be inserted as an image.
LINKED Linking the chart allows it to be updated, and other collaborators will see a link to the spreadsheet.

DeleteParagraphBulletsRequest

Deletes bullets from all of the paragraphs that overlap with the given text index range .

The nesting level of each paragraph will be visually preserved by adding indent to the start of the corresponding paragraph.

JSON representation
{
  "objectId": string,
  "cellLocation": {
    object(TableCellLocation)
  },
  "textRange": {
    object(Range)
  },
}
Fields
objectId

string

The object ID of the shape or table containing the text to delete bullets from.

cellLocation

object( TableCellLocation )

The optional table cell location if the text to be modified is in a table cell. If present, the objectId must refer to a table.

textRange

object( Range )

The range of text to delete bullets from, based on TextElement indexes.

UpdateParagraphStyleRequest

Updates the styling for all of the paragraphs within a Shape or Table that overlap with the given text index range.

JSON representation
{
  "objectId": string,
  "cellLocation": {
    object(TableCellLocation)
  },
  "style": {
    object(ParagraphStyle)
  },
  "textRange": {
    object(Range)
  },
  "fields": string,
}
Fields
objectId

string

The object ID of the shape or table with the text to be styled.

cellLocation

object( TableCellLocation )

The location of the cell in the table containing the paragraph(s) to style. If objectId refers to a table, cellLocation must have a value. Otherwise, it must not.

style

object( ParagraphStyle )

The paragraph's style.

textRange

object( Range )

The range of text containing the paragraph(s) to style.

fields

string ( FieldMask format)

The fields that should be updated.

At least one field must be specified. The root style is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example, to update the paragraph alignment, set fields to "alignment" .

To reset a property to its default value, include its field name in the field mask but leave the field itself unset.

Send feedback about...