v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1350180291.1 KB
projects

Batches the supplied mutation groups in a collection of efficient transactions. All mutations in a group are committed atomically. However, mutations across groups can be committed non-atomically in an unspecified order and thus, they must be independent of each other. Partial failure is possible, that is, some groups might have been committed successfully, while some might have failed. The results of individual batches are streamed into the response as the batches are applied. BatchWrite requests are not replay protected, meaning that each mutation group can be applied more than once. Replays of non-idempotent mutations can have undesirable effects. For example, replays of an insert mutation can produce an already exists error or if you use generated or commit timestamp-based keys, it can result in additional rows being added to the mutation's table. We recommend structuring your mutation groups to be idempotent to avoid this issue.

post/v1/{+session}:batchWrite

Path parameters

sessionstring required

Required. The session in which the batch request is to be run.

Request body

excludeTxnFromChangeStreamsboolean

Optional. If you don't set the exclude_txn_from_change_streams option or if it's set to false, then any change streams monitoring columns modified by transactions will capture the updates made within that transaction.

Response

Successful response