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 uses gRPC 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 | |
---|---|
collection |
Optional. IDs of the collection groups to delete. Unspecified means all collection groups. Each collection group in this list must be unique. |
namespace |
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 of Operation
.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/datastore
https://www.googleapis.com/auth/cloud-platform
For more information, see the OAuth 2.0 Overview.