Method: presentations.batchUpdate

Applies one or more updates to the presentation.

Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied.

Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests.

For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies: the reply to the third request, and another empty reply, in that order.

Because other users may be editing the presentation, the presentation might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the presentation should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically.

HTTP request

POST https://slides.googleapis.com/v1/presentations/{presentationId}:batchUpdate

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
presentationId

string

The presentation to apply the updates to.

Request body

The request body contains data with the following structure:

JSON representation
{
  "requests": [
    {
      object (Request)
    }
  ],
  "writeControl": {
    object (WriteControl)
  }
}
Fields
requests[]

object (Request)

A list of updates to apply to the presentation.

writeControl

object (WriteControl)

Provides control over how write requests are executed.

Response body

Response message from a batch update.

If successful, the response body contains data with the following structure:

JSON representation
{
  "presentationId": string,
  "replies": [
    {
      object (Response)
    }
  ],
  "writeControl": {
    object (WriteControl)
  }
}
Fields
presentationId

string

The presentation the updates were applied to.

replies[]

object (Response)

The reply of the updates. This maps 1:1 with the updates, although replies to some requests may be empty.

writeControl

object (WriteControl)

The updated write control after applying the request.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.readonly
  • https://www.googleapis.com/auth/presentations
  • https://www.googleapis.com/auth/spreadsheets
  • https://www.googleapis.com/auth/spreadsheets.readonly

For more information, see the Authorization guide.

WriteControl

Provides control over how write requests are executed.

JSON representation
{
  "requiredRevisionId": string
}
Fields
requiredRevisionId

string

The revision ID of the presentation required for the write request. If specified and the required revision ID doesn't match the presentation's current revision ID, the request is not processed and returns a 400 bad request error.

When a required revision ID is returned in a response, it indicates the revision ID of the document after the request was applied.