Cloud Firestore API

Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development.

Service: firestore.googleapis.com

To call this service, we recommend that you use the Google-provided client libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.

Discovery document

A Discovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery documents:

Service endpoint

A service endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:

  • https://firestore.googleapis.com

REST Resource: v1beta2.projects.databases

Methods
exportDocumentsPOST /v1beta2/{name=projects/*/databases/*}:exportDocuments
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage.
importDocumentsPOST /v1beta2/{name=projects/*/databases/*}:importDocuments
Imports documents into Google Cloud Firestore.

REST Resource: v1beta2.projects.databases.collectionGroups.fields

Methods
getGET /v1beta2/{name=projects/*/databases/*/collectionGroups/*/fields/*}
Gets the metadata and configuration for a Field.
listGET /v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/fields
Lists the field configuration and metadata for this database.
/v1beta2/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}
Updates a field configuration.

REST Resource: v1beta2.projects.databases.collectionGroups.indexes

Methods
createPOST /v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/indexes
Creates a composite index.
deleteDELETE /v1beta2/{name=projects/*/databases/*/collectionGroups/*/indexes/*}
Deletes a composite index.
getGET /v1beta2/{name=projects/*/databases/*/collectionGroups/*/indexes/*}
Gets a composite index.
listGET /v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/indexes
Lists composite indexes.

REST Resource: v1beta1.projects.databases

Methods
exportDocumentsPOST /v1beta1/{name=projects/*/databases/*}:exportDocuments
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage.
importDocumentsPOST /v1beta1/{name=projects/*/databases/*}:importDocuments
Imports documents into Google Cloud Firestore.

REST Resource: v1beta1.projects.databases.documents

Methods
batchGetPOST /v1beta1/{database=projects/*/databases/*}/documents:batchGet
Gets multiple documents.
batchWritePOST /v1beta1/{database=projects/*/databases/*}/documents:batchWrite
Applies a batch of write operations.
beginTransactionPOST /v1beta1/{database=projects/*/databases/*}/documents:beginTransaction
Starts a new transaction.
commitPOST /v1beta1/{database=projects/*/databases/*}/documents:commit
Commits a transaction, while optionally updating documents.
createDocumentPOST /v1beta1/{parent=projects/*/databases/*/documents/**}/{collectionId}
Creates a new document.
deleteDELETE /v1beta1/{name=projects/*/databases/*/documents/*/**}
Deletes a document.
getGET /v1beta1/{name=projects/*/databases/*/documents/*/**}
Gets a single document.
listGET /v1beta1/{parent=projects/*/databases/*/documents/*/**}/{collectionId}
Lists documents.
listCollectionIdsPOST /v1beta1/{parent=projects/*/databases/*/documents}:listCollectionIds
Lists all the collection IDs underneath a document.
listDocumentsGET /v1beta1/{parent=projects/*/databases/*/documents}/{collectionId}
Lists documents.
partitionQueryPOST /v1beta1/{parent=projects/*/databases/*/documents}:partitionQuery
Partitions a query by returning partition cursors that can be used to run the query in parallel.
/v1beta1/{document.name=projects/*/databases/*/documents/*/**}
Updates or inserts a document.
rollbackPOST /v1beta1/{database=projects/*/databases/*}/documents:rollback
Rolls back a transaction.
runAggregationQueryPOST /v1beta1/{parent=projects/*/databases/*/documents}:runAggregationQuery
Runs an aggregation query.
runQueryPOST /v1beta1/{parent=projects/*/databases/*/documents}:runQuery
Runs a query.

REST Resource: v1beta1.projects.databases.indexes

Methods
createPOST /v1beta1/{parent=projects/*/databases/*}/indexes
Creates the specified index.
deleteDELETE /v1beta1/{name=projects/*/databases/*/indexes/*}
Deletes an index.
getGET /v1beta1/{name=projects/*/databases/*/indexes/*}
Gets an index.
listGET /v1beta1/{parent=projects/*/databases/*}/indexes
Lists the indexes that match the specified filters.

REST Resource: v1.projects.databases

Methods
bulkDeleteDocumentsPOST /v1/{name=projects/*/databases/*}:bulkDeleteDocuments
Bulk deletes a subset of documents from Google Cloud Firestore.
createPOST /v1/{parent=projects/*}/databases
Create a database.
deleteDELETE /v1/{name=projects/*/databases/*}
Deletes a database.
exportDocumentsPOST /v1/{name=projects/*/databases/*}:exportDocuments
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage.
getGET /v1/{name=projects/*/databases/*}
Gets information about a database.
importDocumentsPOST /v1/{name=projects/*/databases/*}:importDocuments
Imports documents into Google Cloud Firestore.
listGET /v1/{parent=projects/*}/databases
List all the databases in the project.
/v1/{database.name=projects/*/databases/*}
Updates a database.
restorePOST /v1/{parent=projects/*}/databases:restore
Creates a new database by restoring from an existing backup.

REST Resource: v1.projects.databases.backupSchedules

Methods
createPOST /v1/{parent=projects/*/databases/*}/backupSchedules
Creates a backup schedule on a database.
deleteDELETE /v1/{name=projects/*/databases/*/backupSchedules/*}
Deletes a backup schedule.
getGET /v1/{name=projects/*/databases/*/backupSchedules/*}
Gets information about a backup schedule.
listGET /v1/{parent=projects/*/databases/*}/backupSchedules
List backup schedules.
/v1/{backupSchedule.name=projects/*/databases/*/backupSchedules/*}
Updates a backup schedule.

REST Resource: v1.projects.databases.collectionGroups.fields

Methods
getGET /v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}
Gets the metadata and configuration for a Field.
listGET /v1/{parent=projects/*/databases/*/collectionGroups/*}/fields
Lists the field configuration and metadata for this database.
/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}
Updates a field configuration.

REST Resource: v1.projects.databases.collectionGroups.indexes

Methods
createPOST /v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes
Creates a composite index.
deleteDELETE /v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}
Deletes a composite index.
getGET /v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}
Gets a composite index.
listGET /v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes
Lists composite indexes.

REST Resource: v1.projects.databases.documents

Methods
batchGetPOST /v1/{database=projects/*/databases/*}/documents:batchGet
Gets multiple documents.
batchWritePOST /v1/{database=projects/*/databases/*}/documents:batchWrite
Applies a batch of write operations.
beginTransactionPOST /v1/{database=projects/*/databases/*}/documents:beginTransaction
Starts a new transaction.
commitPOST /v1/{database=projects/*/databases/*}/documents:commit
Commits a transaction, while optionally updating documents.
createDocumentPOST /v1/{parent=projects/*/databases/*/documents/**}/{collectionId}
Creates a new document.
deleteDELETE /v1/{name=projects/*/databases/*/documents/*/**}
Deletes a document.
getGET /v1/{name=projects/*/databases/*/documents/*/**}
Gets a single document.
listGET /v1/{parent=projects/*/databases/*/documents/*/**}/{collectionId}
Lists documents.
listCollectionIdsPOST /v1/{parent=projects/*/databases/*/documents}:listCollectionIds
Lists all the collection IDs underneath a document.
listDocumentsGET /v1/{parent=projects/*/databases/*/documents}/{collectionId}
Lists documents.
partitionQueryPOST /v1/{parent=projects/*/databases/*/documents}:partitionQuery
Partitions a query by returning partition cursors that can be used to run the query in parallel.
/v1/{document.name=projects/*/databases/*/documents/*/**}
Updates or inserts a document.
rollbackPOST /v1/{database=projects/*/databases/*}/documents:rollback
Rolls back a transaction.
runAggregationQueryPOST /v1/{parent=projects/*/databases/*/documents}:runAggregationQuery
Runs an aggregation query.
runQueryPOST /v1/{parent=projects/*/databases/*/documents}:runQuery
Runs a query.

REST Resource: v1.projects.databases.operations

Methods
cancelPOST /v1/{name=projects/*/databases/*/operations/*}:cancel
Starts asynchronous cancellation on a long-running operation.
deleteDELETE /v1/{name=projects/*/databases/*/operations/*}
Deletes a long-running operation.
getGET /v1/{name=projects/*/databases/*/operations/*}
Gets the latest state of a long-running operation.
listGET /v1/{name=projects/*/databases/*}/operations
Lists operations that match the specified filter in the request.

REST Resource: v1.projects.databases.userCreds

Methods
createPOST /v1/{parent=projects/*/databases/*}/userCreds
Create a user creds.
deleteDELETE /v1/{name=projects/*/databases/*/userCreds/*}
Deletes a user creds.
disablePOST /v1/{name=projects/*/databases/*/userCreds/*}:disable
Disables a user creds.
enablePOST /v1/{name=projects/*/databases/*/userCreds/*}:enable
Enables a user creds.
getGET /v1/{name=projects/*/databases/*/userCreds/*}
Gets a user creds resource.
listGET /v1/{parent=projects/*/databases/*}/userCreds
List all user creds in the database.
resetPasswordPOST /v1/{name=projects/*/databases/*/userCreds/*}:resetPassword
Resets the password of a user creds.

REST Resource: v1.projects.locations

Methods
getGET /v1/{name=projects/*/locations/*}
Gets information about a location.
listGET /v1/{name=projects/*}/locations
Lists information about the supported locations for this service.

REST Resource: v1.projects.locations.backups

Methods
deleteDELETE /v1/{name=projects/*/locations/*/backups/*}
Deletes a backup.
getGET /v1/{name=projects/*/locations/*/backups/*}
Gets information about a backup.
listGET /v1/{parent=projects/*/locations/*}/backups
Lists all the backups.