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

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

Response message from a batch update.

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 OAuth 2.0 Overview.

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 requiredRevisionId doesn't exactly match the presentation's current revisionId, the request will not be processed and will return a 400 bad request error.

Try it!

다음에 대한 의견 보내기...

도움이 필요하시나요? 지원 페이지를 방문하세요.