Begins a new transaction. This step can often be skipped: sessions.read, sessions.executeSql and sessions.commit can begin a new transaction as a side-effect.
HTTP request
The URLs use gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
session | 
                
                   
 Required. The session in which the transaction runs. Authorization requires one or more of the following IAM permissions on the specified resource  
  | 
              
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
{ "options": { object (  | 
                
| Fields | |
|---|---|
options | 
                  
                     
 Required. Options for the new transaction.  | 
                
requestOptions | 
                  
                     
 Common options for this request. Priority is ignored for this request. Setting the priority in this   | 
                
mutationKey | 
                  
                     
 Optional. Required for read-write transactions on a multiplexed session that commit mutations but don't perform any reads or queries. You must randomly select one of the mutations from the mutation set and send it as a part of this request.  | 
                
Response body
If successful, the response body contains an instance of Transaction.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/spanner.datahttps://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.