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 | 
                
                   
 Required. The database name. In the format:   | 
              
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
{
  "options": {
    object ( | 
                
| Fields | |
|---|---|
options | 
                  
                     
 The options for the transaction. Defaults to a read-write transaction.  | 
                
Response body
The response for Firestore.BeginTransaction.
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
{ "transaction": string }  | 
                  
| Fields | |
|---|---|
transaction | 
                    
                       
 The transaction that was started. A base64-encoded string.  | 
                  
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/datastorehttps://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.