firestore.projects.databases.documents.batch Write

POST {{baseUrl}}/v1/:database/documents:batchWrite?$.xgafv=<string>&access_token=<string>&alt=<string>&callback=<string>&fields=<string>&key=<string>&oauth_token=<string>&prettyPrint=<boolean>&quotaUser=<string>&upload_protocol=<string>&uploadType=<string>

Applies a batch of write operations. The BatchWrite method does not apply the write operations atomically and can apply them out of order. Method does not allow more than one write per document. Each write succeeds or fails independently. See the BatchWriteResponse for the success status of each write. If you require an atomically applied set of writes, use Commit instead.

Request Params

KeyDatatypeRequiredDescription
$.xgafvstringV1 error format.
access_tokenstringOAuth access token.
altstringData format for response.
callbackstringJSONP
fieldsstringSelector specifying which fields to include in a partial response.
keystringAPI key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
oauth_tokenstringOAuth 2.0 token for the current user.
prettyPrintstringReturns response with indentations and line breaks.
quotaUserstringAvailable to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
upload_protocolstringUpload protocol for media (e.g. "raw", "multipart").
uploadTypestringLegacy upload protocol for media (e.g. "media", "multipart").

Request Body

{"labels"=>"<object>", "writes"=>[{"currentDocument"=>{"exists"=>"<boolean>", "updateTime"=>"<google-datetime>"}, "delete"=>"<string>", "transform"=>{"document"=>"<string>", "fieldTransforms"=>[{"appendMissingElements"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "fieldPath"=>"<string>", "increment"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "maximum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "minimum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "removeAllFromArray"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "setToServerValue"=>"<string>"}, {"appendMissingElements"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "fieldPath"=>"<string>", "increment"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "maximum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "minimum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "removeAllFromArray"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "setToServerValue"=>"<string>"}]}, "update"=>{"createTime"=>"dolor labore exercitation ad mollit", "name"=>"Lorem reprehenderit eiusmod", "updateTime"=>"veniam"}, "updateMask"=>{"fieldPaths"=>["<string>", "<string>"]}, "updateTransforms"=>[{"appendMissingElements"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "fieldPath"=>"<string>", "increment"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "maximum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "minimum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "removeAllFromArray"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "setToServerValue"=>"<string>"}, {"appendMissingElements"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "fieldPath"=>"<string>", "increment"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "maximum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "minimum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "removeAllFromArray"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "setToServerValue"=>"<string>"}]}, {"currentDocument"=>{"exists"=>"<boolean>", "updateTime"=>"<google-datetime>"}, "delete"=>"<string>", "transform"=>{"document"=>"<string>", "fieldTransforms"=>[{"appendMissingElements"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "fieldPath"=>"<string>", "increment"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "maximum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "minimum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "removeAllFromArray"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "setToServerValue"=>"<string>"}, {"appendMissingElements"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "fieldPath"=>"<string>", "increment"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "maximum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "minimum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "removeAllFromArray"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "setToServerValue"=>"<string>"}]}, "update"=>{"createTime"=>"qui dolore ea la", "name"=>"consequat sint Ut", "updateTime"=>"ut in commodo pariatur"}, "updateMask"=>{"fieldPaths"=>["<string>", "<string>"]}, "updateTransforms"=>[{"appendMissingElements"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "fieldPath"=>"<string>", "increment"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "maximum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "minimum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "removeAllFromArray"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "setToServerValue"=>"<string>"}, {"appendMissingElements"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "fieldPath"=>"<string>", "increment"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "maximum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "minimum"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "removeAllFromArray"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "setToServerValue"=>"<string>"}]}]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{&quot;status&quot;:[{&quot;code&quot;:70844905,&quot;message&quot;:&quot;deserunt cillum Excepteur ea ad&quot;},{&quot;code&quot;:-55648647,&quot;message&quot;:&quot;amet&quot;}],&quot;writeResults&quot;:[{&quot;transformResults&quot;:[{&quot;arrayValue&quot;:{&quot;values&quot;:[{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}]},&quot;booleanValue&quot;:false,&quot;bytesValue&quot;:&quot;aliquip qui dolore&quot;,&quot;doubleValue&quot;:-76953873.52714036,&quot;geoPointValue&quot;:{&quot;latitude&quot;:84347385.88250718,&quot;longitude&quot;:-60171698.296356626},&quot;integerValue&quot;:&quot;esse veniam pariatur ut&quot;,&quot;mapValue&quot;:{&quot;fields&quot;:{}},&quot;nullValue&quot;:&quot;NULL_VALUE&quot;,&quot;referenceValue&quot;:&quot;elit ut eiusmod in&quot;,&quot;stringValue&quot;:&quot;laboris ut&quot;,&quot;timestampValue&quot;:&quot;do in&quot;},{&quot;arrayValue&quot;:{&quot;values&quot;:[{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}]},&quot;booleanValue&quot;:true,&quot;bytesValue&quot;:&quot;enim tempor&quot;,&quot;doubleValue&quot;:51719321.08397317,&quot;geoPointValue&quot;:{&quot;latitude&quot;:-56925834.41963888,&quot;longitude&quot;:-26175978.78604853},&quot;integerValue&quot;:&quot;do&quot;,&quot;mapValue&quot;:{&quot;fields&quot;:{}},&quot;nullValue&quot;:&quot;NULL_VALUE&quot;,&quot;referenceValue&quot;:&quot;enim esse laborum adipisicing Duis&quot;,&quot;stringValue&quot;:&quot;irure aliquip reprehenderit&quot;,&quot;timestampValue&quot;:&quot;pariatur Lorem&quot;}],&quot;updateTime&quot;:&quot;occaecat aliquip quis dolor&quot;},{&quot;transformResults&quot;:[{&quot;arrayValue&quot;:{&quot;values&quot;:[{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}]},&quot;booleanValue&quot;:true,&quot;bytesValue&quot;:&quot;officia amet ullamco aliquip sint&quot;,&quot;doubleValue&quot;:-40753662.12103422,&quot;geoPointValue&quot;:{&quot;latitude&quot;:-45415638.33800737,&quot;longitude&quot;:-38286515.78631797},&quot;integerValue&quot;:&quot;laborum tempor ex nulla&quot;,&quot;mapValue&quot;:{&quot;fields&quot;:{}},&quot;nullValue&quot;:&quot;NULL_VALUE&quot;,&quot;referenceValue&quot;:&quot;do anim et volup&quot;,&quot;stringValue&quot;:&quot;Duis id reprehenderit proident aliqua&quot;,&quot;timestampValue&quot;:&quot;cillum&quot;},{&quot;arrayValue&quot;:{&quot;values&quot;:[{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}]},&quot;booleanValue&quot;:false,&quot;bytesValue&quot;:&quot;proident in adipisicing&quot;,&quot;doubleValue&quot;:-3014407.062126696,&quot;geoPointValue&quot;:{&quot;latitude&quot;:22002278.098179013,&quot;longitude&quot;:-13915351.28170158},&quot;integerValue&quot;:&quot;incididunt elit esse veniam aute&quot;,&quot;mapValue&quot;:{&quot;fields&quot;:{}},&quot;nullValue&quot;:&quot;NULL_VALUE&quot;,&quot;referenceValue&quot;:&quot;sunt Excepteur do sit&quot;,&quot;stringValue&quot;:&quot;non Lorem dolor fugiat ullamco&quot;,&quot;timestampValue&quot;:&quot;fugiat nostrud ex&quot;}],&quot;updateTime&quot;:&quot;et qui consequat&quot;}]}