Method: projects.databases.documents.beginTransaction

Starts a new transaction.

HTTP request

POST https://firestore.googleapis.com/v1beta1/{database=projects/*/databases/*}/documents:beginTransaction

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
database

string

The database name. In the format: projects/{project_id}/databases/{database_id}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "options": {
    object (TransactionOptions)
  }
}
Fields
options

object (TransactionOptions)

The options for the transaction. Defaults to a read-write transaction.

Response body

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

The response for Firestore.BeginTransaction.

JSON representation
{
  "transaction": string
}
Fields
transaction

string (bytes format)

The transaction that was started.

A base64-encoded string.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/datastore
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

¿Te ha resultado útil esta página? Enviar comentarios:

Enviar comentarios sobre...