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>"aUser=<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
Key | Datatype | Required | Description |
---|---|---|---|
$.xgafv | string | V1 error format. | |
access_token | string | OAuth access token. | |
alt | string | Data format for response. | |
callback | string | JSONP | |
fields | string | Selector specifying which fields to include in a partial response. | |
key | string | API 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_token | string | OAuth 2.0 token for the current user. | |
prettyPrint | string | Returns response with indentations and line breaks. | |
quotaUser | string | Available 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_protocol | string | Upload protocol for media (e.g. "raw", "multipart"). | |
uploadType | string | Legacy 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
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"status":[{"code":70844905,"message":"deserunt cillum Excepteur ea ad"},{"code":-55648647,"message":"amet"}],"writeResults":[{"transformResults":[{"arrayValue":{"values":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}]},"booleanValue":false,"bytesValue":"aliquip qui dolore","doubleValue":-76953873.52714036,"geoPointValue":{"latitude":84347385.88250718,"longitude":-60171698.296356626},"integerValue":"esse veniam pariatur ut","mapValue":{"fields":{}},"nullValue":"NULL_VALUE","referenceValue":"elit ut eiusmod in","stringValue":"laboris ut","timestampValue":"do in"},{"arrayValue":{"values":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}]},"booleanValue":true,"bytesValue":"enim tempor","doubleValue":51719321.08397317,"geoPointValue":{"latitude":-56925834.41963888,"longitude":-26175978.78604853},"integerValue":"do","mapValue":{"fields":{}},"nullValue":"NULL_VALUE","referenceValue":"enim esse laborum adipisicing Duis","stringValue":"irure aliquip reprehenderit","timestampValue":"pariatur Lorem"}],"updateTime":"occaecat aliquip quis dolor"},{"transformResults":[{"arrayValue":{"values":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}]},"booleanValue":true,"bytesValue":"officia amet ullamco aliquip sint","doubleValue":-40753662.12103422,"geoPointValue":{"latitude":-45415638.33800737,"longitude":-38286515.78631797},"integerValue":"laborum tempor ex nulla","mapValue":{"fields":{}},"nullValue":"NULL_VALUE","referenceValue":"do anim et volup","stringValue":"Duis id reprehenderit proident aliqua","timestampValue":"cillum"},{"arrayValue":{"values":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}]},"booleanValue":false,"bytesValue":"proident in adipisicing","doubleValue":-3014407.062126696,"geoPointValue":{"latitude":22002278.098179013,"longitude":-13915351.28170158},"integerValue":"incididunt elit esse veniam aute","mapValue":{"fields":{}},"nullValue":"NULL_VALUE","referenceValue":"sunt Excepteur do sit","stringValue":"non Lorem dolor fugiat ullamco","timestampValue":"fugiat nostrud ex"}],"updateTime":"et qui consequat"}]}