Permanently deletes all selected Document
s in a branch.
This process is asynchronous. Depending on the number of Document
s to be deleted, this operation can take hours to complete. Before the delete operation completes, some Document
s might still be returned by DocumentService.GetDocument
or DocumentService.ListDocuments
.
To get a list of the Document
s 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 |
error |
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: |
|
gcs |
Cloud Storage location for the input content. Supported |
inline |
Inline source for the input content for purge. |
Response body
If successful, the response body contains an instance of Operation
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
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.