Method: projects.databases.bulkDeleteDocuments Stay organized with collections Save and categorize content based on your preferences.
Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated after the underlying system starts to process the request will not be deleted. The bulk delete occurs in the background and its progress can be monitored and managed via the Operation resource that is created.
For more details on bulk delete behavior, refer to:https://cloud.google.com/firestore/docs/manage-data/bulk-delete
HTTP request
POST https://firestore.googleapis.com/v1/{name=projects/*/databases/*}:bulkDeleteDocuments
The URL usesgRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name |
Required. Database to operate. Should be of the form: |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{"collectionIds":[string],"namespaceIds":[string]} |
| Fields | |
|---|---|
collectionIds[] |
Optional. IDs of the collection groups to delete. Unspecified means all collection groups. Each collection group in this list must be unique. |
namespaceIds[] |
Optional. Namespaces to delete. An empty list means all namespaces. This is the recommended usage for databases that don't use namespaces. An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn't want to delete from them. Each namespace in this list must be unique. |
Response body
If successful, the response body contains an instance ofOperation.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/datastorehttps://www.googleapis.com/auth/cloud-platform
For more information, see theOAuth 2.0 Overview.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-20 UTC.