Skip to content

Instantly share code, notes, and snippets.

@mikelehen
Created December 18, 2018 20:17
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mikelehen/6c8f67164f18b7b49135231f1cc0cf29 to your computer and use it in GitHub Desktop.
Save mikelehen/6c8f67164f18b7b49135231f1cc0cf29 to your computer and use it in GitHub Desktop.
POST https://firestore.googleapis.com/v1beta1/projects/firestore-fun/databases/(default)/documents:commit?key={YOUR_API_KEY}
{
"writes": [
{
"update": {
"name": "projects/firestore-fun/databases/(default)/documents/foo/bar",
"fields": {
"some-field": {
"stringValue": "some-value"
}
}
}
},
{
"transform": {
"document": "projects/firestore-fun/databases/(default)/documents/foo/bar",
"fieldTransforms": [
{
"fieldPath": "servertime",
"setToServerValue": "REQUEST_TIME"
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment