Menu
Firestore.projects.databases.documents.commit
Commits a transaction, while optionally updating documents.
POST
/v1/{database}/documents:commitUse it in a workflow
- Add a step and choose the Firestore connector.
- Pick the Firestore.projects.databases.documents.commit action (under projects).
- Fill in the fields below, then reference the result from later steps as
{{firestoreProjectsDatabasesDocumentsCommit.response.data}}.
Request
Path parameters
Query parameters
Request body
Enter the body as JSON in the step's Body field.
{
"transaction": "string",
"writes": [
{
"currentDocument": {
"exists": false,
"updateTime": "string"
},
"delete": "string",
"transform": {
"document": "string",
"fieldTransforms": [
{
"appendMissingElements": {
"values": null
},
"fieldPath": "string",
"increment": {
"arrayValue": null,
"booleanValue": null,
"bytesValue": null,
"doubleValue": null,
"geoPointValue": null,
"integerValue": null,
"mapValue": null,
"nullValue": null,
"referenceValue": null,
"stringValue": null,
"timestampValue": null
},
"maximum": {
"arrayValue": null,
"booleanValue": null,
"bytesValue": null,
"doubleValue": null,
"geoPointValue": null,
"integerValue": null,
"mapValue": null,
"nullValue": null,
"referenceValue": null,
"stringValue": null,
"timestampValue": null
},
"minimum": {
"arrayValue": null,
"booleanValue": null,
"bytesValue": null,
"doubleValue": null,
"geoPointValue": null,
"integerValue": null,
"mapValue": null,
"nullValue": null,
"referenceValue": null,
"stringValue": null,
"timestampValue": null
},
"removeAllFromArray": {
"values": null
},
"setToServerValue": "SERVER_VALUE_UNSPECIFIED"
}
]
},
"update": {
"createTime": "string",
"fields": {},
"name": "string",
"updateTime": "string"
},
"updateMask": {
"fieldPaths": [
"string"
]
},
"updateTransforms": [
{
"appendMissingElements": {
"values": [
null
]
},
"fieldPath": "string",
"increment": {
"arrayValue": {
"values": null
},
"booleanValue": false,
"bytesValue": "string",
"doubleValue": 0,
"geoPointValue": {
"latitude": null,
"longitude": null
},
"integerValue": "string",
"mapValue": {
"fields": null
},
"nullValue": "NULL_VALUE",
"referenceValue": "string",
"stringValue": "string",
"timestampValue": "string"
},
"maximum": {
"arrayValue": {
"values": null
},
"booleanValue": false,
"bytesValue": "string",
"doubleValue": 0,
"geoPointValue": {
"latitude": null,
"longitude": null
},
"integerValue": "string",
"mapValue": {
"fields": null
},
"nullValue": "NULL_VALUE",
"referenceValue": "string",
"stringValue": "string",
"timestampValue": "string"
},
"minimum": {
"arrayValue": {
"values": null
},
"booleanValue": false,
"bytesValue": "string",
"doubleValue": 0,
"geoPointValue": {
"latitude": null,
"longitude": null
},
"integerValue": "string",
"mapValue": {
"fields": null
},
"nullValue": "NULL_VALUE",
"referenceValue": "string",
"stringValue": "string",
"timestampValue": "string"
},
"removeAllFromArray": {
"values": [
null
]
},
"setToServerValue": "SERVER_VALUE_UNSPECIFIED"
}
]
}
]
}
Response
Returns 200 with an object. Read it in later steps with {{firestoreProjectsDatabasesDocumentsCommit.response.data.<field>}}.
{
"commitTime": "string",
"writeResults": [
{
"transformResults": [
{
"arrayValue": {
"values": [
null
]
},
"booleanValue": false,
"bytesValue": "string",
"doubleValue": 0,
"geoPointValue": {
"latitude": 0,
"longitude": 0
},
"integerValue": "string",
"mapValue": {
"fields": {}
},
"nullValue": "NULL_VALUE",
"referenceValue": "string",
"stringValue": "string",
"timestampValue": "string"
}
],
"updateTime": "string"
}
]
}
Need more? See the Firestore guide for connection setup and behaviour shared by every action.
Was this page helpful?