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
exportDocuments POST /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.
importDocuments POST /v1beta2/{name=projects/*/databases/*}:importDocuments
Imports documents into Google Cloud Firestore.

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

Methods
get GET /v1beta2/{name=projects/*/databases/*/collectionGroups/*/fields/*}
Gets the metadata and configuration for a Field.
list GET /v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/fields
Lists the field configuration and metadata for this database.
patch PATCH /v1beta2/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}
Updates a field configuration.

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

Methods
create POST /v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/indexes
Creates a composite index.
delete DELETE /v1beta2/{name=projects/*/databases/*/collectionGroups/*/indexes/*}
Deletes a composite index.
get GET /v1beta2/{name=projects/*/databases/*/collectionGroups/*/indexes/*}
Gets a composite index.
list GET /v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/indexes
Lists composite indexes.

REST Resource: v1beta1.projects.databases

Methods
exportDocuments POST /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.
importDocuments POST /v1beta1/{name=projects/*/databases/*}:importDocuments
Imports documents into Google Cloud Firestore.

REST Resource: v1beta1.projects.databases.documents

Methods
batchGet POST /v1beta1/{database=projects/*/databases/*}/documents:batchGet
Gets multiple documents.
batchWrite POST /v1beta1/{database=projects/*/databases/*}/documents:batchWrite
Applies a batch of write operations.
beginTransaction POST /v1beta1/{database=projects/*/databases/*}/documents:beginTransaction
Starts a new transaction.
commit POST /v1beta1/{database=projects/*/databases/*}/documents:commit
Commits a transaction, while optionally updating documents.
createDocument POST /v1beta1/{parent=projects/*/databases/*/documents/**}/{collectionId}
Creates a new document.
delete DELETE /v1beta1/{name=projects/*/databases/*/documents/*/**}
Deletes a document.
get GET /v1beta1/{name=projects/*/databases/*/documents/*/**}
Gets a single document.
list GET /v1beta1/{parent=projects/*/databases/*/documents/*/**}/{collectionId}
Lists documents.
listCollectionIds POST /v1beta1/{parent=projects/*/databases/*/documents}:listCollectionIds
Lists all the collection IDs underneath a document.
listDocuments GET /v1beta1/{parent=projects/*/databases/*/documents}/{collectionId}
Lists documents.
partitionQuery POST /v1beta1/{parent=projects/*/databases/*/documents}:partitionQuery
Partitions a query by returning partition cursors that can be used to run the query in parallel.
patch PATCH /v1beta1/{document.name=projects/*/databases/*/documents/*/**}
Updates or inserts a document.
rollback POST /v1beta1/{database=projects/*/databases/*}/documents:rollback
Rolls back a transaction.
runAggregationQuery POST /v1beta1/{parent=projects/*/databases/*/documents}:runAggregationQuery
Runs an aggregation query.
runQuery POST /v1beta1/{parent=projects/*/databases/*/documents}:runQuery
Runs a query.

REST Resource: v1beta1.projects.databases.indexes

Methods
create POST /v1beta1/{parent=projects/*/databases/*}/indexes
Creates the specified index.
delete DELETE /v1beta1/{name=projects/*/databases/*/indexes/*}
Deletes an index.
get GET /v1beta1/{name=projects/*/databases/*/indexes/*}
Gets an index.
list GET /v1beta1/{parent=projects/*/databases/*}/indexes
Lists the indexes that match the specified filters.

REST Resource: v1.projects.databases

Methods
create POST /v1/{parent=projects/*}/databases
Create a database.
delete DELETE /v1/{name=projects/*/databases/*}
Deletes a database.
exportDocuments POST /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.
get GET /v1/{name=projects/*/databases/*}
Gets information about a database.
importDocuments POST /v1/{name=projects/*/databases/*}:importDocuments
Imports documents into Google Cloud Firestore.
list GET /v1/{parent=projects/*}/databases
List all the databases in the project.
patch PATCH /v1/{database.name=projects/*/databases/*}
Updates a database.
restore POST /v1/{parent=projects/*}/databases:restore
Creates a new database by restoring from an existing backup.

REST Resource: v1.projects.databases.backupSchedules

Methods
create POST /v1/{parent=projects/*/databases/*}/backupSchedules
Creates a backup schedule on a database.
delete DELETE /v1/{name=projects/*/databases/*/backupSchedules/*}
Deletes a backup schedule.
get GET /v1/{name=projects/*/databases/*/backupSchedules/*}
Gets information about a backup schedule.
list GET /v1/{parent=projects/*/databases/*}/backupSchedules
List backup schedules.
patch PATCH /v1/{backupSchedule.name=projects/*/databases/*/backupSchedules/*}
Updates a backup schedule.

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

Methods
get GET /v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}
Gets the metadata and configuration for a Field.
list GET /v1/{parent=projects/*/databases/*/collectionGroups/*}/fields
Lists the field configuration and metadata for this database.
patch PATCH /v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}
Updates a field configuration.

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

Methods
create POST /v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes
Creates a composite index.
delete DELETE /v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}
Deletes a composite index.
get GET /v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}
Gets a composite index.
list GET /v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes
Lists composite indexes.

REST Resource: v1.projects.databases.documents

Methods
batchGet POST /v1/{database=projects/*/databases/*}/documents:batchGet
Gets multiple documents.
batchWrite POST /v1/{database=projects/*/databases/*}/documents:batchWrite
Applies a batch of write operations.
beginTransaction POST /v1/{database=projects/*/databases/*}/documents:beginTransaction
Starts a new transaction.
commit POST /v1/{database=projects/*/databases/*}/documents:commit
Commits a transaction, while optionally updating documents.
createDocument POST /v1/{parent=projects/*/databases/*/documents/**}/{collectionId}
Creates a new document.
delete DELETE /v1/{name=projects/*/databases/*/documents/*/**}
Deletes a document.
get GET /v1/{name=projects/*/databases/*/documents/*/**}
Gets a single document.
list GET /v1/{parent=projects/*/databases/*/documents/*/**}/{collectionId}
Lists documents.
listCollectionIds POST /v1/{parent=projects/*/databases/*/documents}:listCollectionIds
Lists all the collection IDs underneath a document.
listDocuments GET /v1/{parent=projects/*/databases/*/documents}/{collectionId}
Lists documents.
partitionQuery POST /v1/{parent=projects/*/databases/*/documents}:partitionQuery
Partitions a query by returning partition cursors that can be used to run the query in parallel.
patch PATCH /v1/{document.name=projects/*/databases/*/documents/*/**}
Updates or inserts a document.
rollback POST /v1/{database=projects/*/databases/*}/documents:rollback
Rolls back a transaction.
runAggregationQuery POST /v1/{parent=projects/*/databases/*/documents}:runAggregationQuery
Runs an aggregation query.
runQuery POST /v1/{parent=projects/*/databases/*/documents}:runQuery
Runs a query.

REST Resource: v1.projects.databases.operations

Methods
cancel POST /v1/{name=projects/*/databases/*/operations/*}:cancel
Starts asynchronous cancellation on a long-running operation.
delete DELETE /v1/{name=projects/*/databases/*/operations/*}
Deletes a long-running operation.
get GET /v1/{name=projects/*/databases/*/operations/*}
Gets the latest state of a long-running operation.
list GET /v1/{name=projects/*/databases/*}/operations
Lists operations that match the specified filter in the request.

REST Resource: v1.projects.locations

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

REST Resource: v1.projects.locations.backups

Methods
delete DELETE /v1/{name=projects/*/locations/*/backups/*}
Deletes a backup.
get GET /v1/{name=projects/*/locations/*/backups/*}
Gets information about a backup.
list GET /v1/{parent=projects/*/locations/*}/backups
Lists all the backups.