Permanently deletes all selected Documents in a branch.
This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments.
To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.
HTTP request
POST https://discoveryengine.googleapis.com/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. The parent resource name, such as |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "filter": string, "errorConfig": { object ( |
| Fields | |
|---|---|
filter |
Required. Filter matching documents to purge. Only currently supported value is |
errorConfig |
The desired location of errors incurred during the purge. |
force |
Actually performs the purge. If |
Union field source. The desired input source for the purging documents based on document IDs. source can be only one of the following: |
|
gcsSource |
Cloud Storage location for the input content. Supported |
inlineSource |
Inline source for the input content for purge. |
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/cloud-platformhttps://www.googleapis.com/auth/discoveryengine.readwrite
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the parent resource:
discoveryengine.documents.purge
For more information, see the IAM documentation.