documents

POST /v1/documents/{documentId}:batchUpdate

Changed on

Applies one or more updates to the document. 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 document, the document might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the document should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically.

Request

  • Base URL
    https://docs.googleapis.com
  • URL
    https://docs.googleapis.com/v1/documents/{documentId}:batchUpdate
  • Auth
    • OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/documents
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/documents
    • or OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/drive
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/drive
    • or OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/drive.file
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/drive.file

Path parameters

documentIdstring required

The ID of the document to update.

Request body

Response

Successful response

commentUpdateState'COMMENT_UPDATE_STATE_UNSPECIFIED' | 'NO_UPDATES_REQUESTED' | 'ALL_SAVED' | 'ALL_FAILED_UNKNOWN_REASON'

Whether comment updates were applied in the batch request.

documentIdstring

The ID of the document to which the updates were applied to.

Changes

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status

    • info

      the security scope https://www.googleapis.com/auth/documents was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/documents was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/drive.file was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/drive.file was removed from the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/documents was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/documents was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/drive.file was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/drive.file was removed from the endpoint's security scheme Oauth2c

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property /

    • info

      added the optional property to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property / to the response with the status