Send feedback
REST Resource: projects.databases.documents
Stay organized with collections
Save and categorize content based on your preferences.
Resource: Document
A Firestore document.
Must not exceed 1 MiB - 4 bytes.
JSON representation
{
"name" : string ,
"fields" : {
string : {
object (Value
)
} ,
...
} ,
"createTime" : string ,
"updateTime" : string
}
Fields
name
string
The resource name of the document, for example projects/{projectId}/databases/{databaseId}/documents/{document_path}
.
fields
map (key: string, value: object (Value
))
An object containing a list of "key": value
pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }
.
createTime
string (Timestamp
format)
Output only. The time at which the document was created.
This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the readTime
of a query.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z"
and "2014-10-02T15:01:23.045123456Z"
.
updateTime
string (Timestamp
format)
Output only. The time at which the document was last changed.
This value is initially set to the createTime
then increases monotonically with each change to the document. It can also be compared to values from other documents and the readTime
of a query.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z"
and "2014-10-02T15:01:23.045123456Z"
.
Methods
Gets multiple documents.
Applies a batch of write operations.
Starts a new transaction.
Commits a transaction, while optionally updating documents.
Creates a new document.
Deletes a document.
Gets a single document.
Lists documents.
Lists all the collection IDs underneath a document.
Lists documents.
Partitions a query by returning partition cursors that can be used to run the query in parallel.
Updates or inserts a document.
Rolls back a transaction.
Runs an aggregation query.
Runs a query.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-08 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-07-08 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-08 UTC."]]