Method: dataset.batchDeleteDocuments

Full name: projects.locations.processors.dataset.batchDeleteDocuments

Deletes a set of documents.

HTTP request

POST https://{endpoint}/v1beta3/{dataset}:batchDeleteDocuments

Where {endpoint} is one of the supported service endpoints.

Path parameters

Parameters
dataset

string

Required. The dataset resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset It takes the form projects/{project}/locations/{location}/processors/{processor}/dataset.

Request body

The request body contains data with the following structure:

JSON representation
{
  "datasetDocuments": {
    object (BatchDatasetDocuments)
  }
}
Fields
datasetDocuments

object (BatchDatasetDocuments)

Required. Dataset documents input. If given filter, all documents satisfying the filter will be deleted. If given documentIds, a maximum of 50 documents can be deleted in a batch. The request will be rejected if more than 50 documentIds are provided.

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 dataset resource:

  • documentai.datasets.deleteDocuments

For more information, see the IAM documentation.

BatchDatasetDocuments

Dataset documents that the batch operation will be applied to.

JSON representation
{

  // Union field criteria can be only one of the following:
  "individualDocumentIds": {
    object (IndividualDocumentIds)
  },
  "filter": string
  // End of list of possible types for union field criteria.
}
Fields

Union field criteria.

criteria can be only one of the following:

individualDocumentIds

object (IndividualDocumentIds)

Document identifiers.

filter

string

A filter matching the documents. Follows the same format and restriction as [google.cloud.documentai.master.ListDocumentsRequest.filter].

IndividualDocumentIds

List of individual DocumentIds.

JSON representation
{
  "documentIds": [
    {
      object (DocumentId)
    }
  ]
}
Fields
documentIds[]

object (DocumentId)

Required. List of Document IDs indicating where the actual documents are stored.