firestore.projects.databases.documents.commit

POST {{baseUrl}}/v1/:database/documents:commit?$.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>

Commits a transaction, while optionally updating documents.

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

{"transaction"=>"<byte>", "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"=>"cupidatat sed ea", "name"=>"ea dolor id occaecat aliquip", "updateTime"=>"nisi"}, "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"=>"exercitation", "name"=>"sed a", "updateTime"=>"id"}, "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;commitTime&quot;:&quot;pariatur e&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;nisi consequat est ad&quot;,&quot;doubleValue&quot;:40882950.9345752,&quot;geoPointValue&quot;:{&quot;latitude&quot;:22934307.384380713,&quot;longitude&quot;:4995337.125383601},&quot;integerValue&quot;:&quot;est&quot;,&quot;mapValue&quot;:{&quot;fields&quot;:{}},&quot;nullValue&quot;:&quot;NULL_VALUE&quot;,&quot;referenceValue&quot;:&quot;cupidatat ullamco veniam&quot;,&quot;stringValue&quot;:&quot;fugiat nulla ad voluptate elit&quot;,&quot;timestampValue&quot;:&quot;incididunt exercitation&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;mollit&quot;,&quot;doubleValue&quot;:-67537547.39717071,&quot;geoPointValue&quot;:{&quot;latitude&quot;:58822569.660485476,&quot;longitude&quot;:63206536.40883544},&quot;integerValue&quot;:&quot;do nisi&quot;,&quot;mapValue&quot;:{&quot;fields&quot;:{}},&quot;nullValue&quot;:&quot;NULL_VALUE&quot;,&quot;referenceValue&quot;:&quot;dolore fugiat ullamco est elit&quot;,&quot;stringValue&quot;:&quot;cupidatat dolore dolor proident do&quot;,&quot;timestampValue&quot;:&quot;Ut dolor&quot;}],&quot;updateTime&quot;:&quot;ea nulla ut&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;tempor aliquip Excepteur sed&quot;,&quot;doubleValue&quot;:50523055.853957325,&quot;geoPointValue&quot;:{&quot;latitude&quot;:93545159.9324775,&quot;longitude&quot;:96790627.54553846},&quot;integerValue&quot;:&quot;non ad ipsum cupidatat&quot;,&quot;mapValue&quot;:{&quot;fields&quot;:{}},&quot;nullValue&quot;:&quot;NULL_VALUE&quot;,&quot;referenceValue&quot;:&quot;deserunt ipsum&quot;,&quot;stringValue&quot;:&quot;sunt proident pariatur a&quot;,&quot;timestampValue&quot;:&quot;incididunt exercitation do Lorem&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;dolor quis&quot;,&quot;doubleValue&quot;:46270054.00004122,&quot;geoPointValue&quot;:{&quot;latitude&quot;:57868137.20750409,&quot;longitude&quot;:83455643.38198322},&quot;integerValue&quot;:&quot;minim consequat dolore dolore&quot;,&quot;mapValue&quot;:{&quot;fields&quot;:{}},&quot;nullValue&quot;:&quot;NULL_VALUE&quot;,&quot;referenceValue&quot;:&quot;ea irure&quot;,&quot;stringValue&quot;:&quot;ex officia laborum&quot;,&quot;timestampValue&quot;:&quot;commodo pariatur minim&quot;}],&quot;updateTime&quot;:&quot;in&quot;}]}